PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 2.11.0
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v2.11.0
2.11.0 2.10.0 2.10.01 2.9.1 2.9.0 2.8.1 2.8.0 2.7.7 2.7.5 2.7.0 2.6.01 2.6.0 2.5.0 2.4.01 trunk 1.0.90 1.0.91 1.0.92 1.0.93 1.0.94 1.0.95 1.0.96 1.0.97 1.0.98 1.0.99 All 78 releases
← All changes | assets/admin_app.js +1112 -166 1.0.912.11.0 View file →
@@ -1,62 +1,63 @@
1 -var CR=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Yk=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var kt=(e,t,n)=>(Yk(e,t,"read from private field"),n?n.call(e):t.get(e)),xs=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Lo=(e,t,n,o)=>(Yk(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);var EFe=CR((fr,pr)=>{const kR="modulepreload",SR=function(e){return"/"+e},Zk={},Yd=function(t,n,o){if(!n||n.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=SR(s),s in Zk)return;Zk[s]=!0;const i=s.endsWith(".css"),l=i?'[rel="stylesheet"]':"";if(!!o)for(let c=r.length-1;c>=0;c--){const d=r[c];if(d.href===s&&(!i||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${l}`))return;const u=document.createElement("link");if(u.rel=i?"stylesheet":kR,i||(u.as="script",u.crossOrigin=""),u.href=s,document.head.appendChild(u),i)return new Promise((c,d)=>{u.addEventListener("load",c),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t()).catch(s=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=s,window.dispatchEvent(i),!i.defaultPrevented)throw s})};/**
2 -* @vue/shared v3.4.23
1 +var UW=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var g9=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var Xt=(t,e,n)=>(g9(t,e,"read from private field"),n?n.call(t):e.get(t)),ha=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Qi=(t,e,n,i)=>(g9(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);var YSt=UW((Do,Ro)=>{const jW="modulepreload",WW=function(t){return"/"+t},v9={},ti=function(e,n,i){if(!n||n.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=WW(o),o in v9)return;v9[o]=!0;const r=o.endsWith(".css"),a=r?'[rel="stylesheet"]':"";if(!!i)for(let u=s.length-1;u>=0;u--){const d=s[u];if(d.href===o&&(!r||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${a}`))return;const c=document.createElement("link");if(c.rel=r?"stylesheet":jW,r||(c.as="script",c.crossOrigin=""),c.href=o,document.head.appendChild(c),r)return new Promise((u,d)=>{c.addEventListener("load",u),c.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e()).catch(o=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=o,window.dispatchEvent(r),!r.defaultPrevented)throw o})};/**
2 +* @vue/shared v3.5.27
3 3 * (c) 2018-present Yuxi (Evan) You and Vue contributors
4 4 * @license MIT
5 -**//*! #__NO_SIDE_EFFECTS__ */function yr(e,t){const n=new Set(e.split(","));return t?o=>n.has(o.toLowerCase()):o=>n.has(o)}const Wt={},mc=[],yt=()=>{},Dm=()=>!1,vu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),K2=e=>e.startsWith("onUpdate:"),Bt=Object.assign,q2=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},$R=Object.prototype.hasOwnProperty,vt=(e,t)=>$R.call(e,t),Me=Array.isArray,gc=e=>vd(e)==="[object Map]",yu=e=>vd(e)==="[object Set]",og=e=>vd(e)==="[object Date]",ER=e=>vd(e)==="[object RegExp]",Xe=e=>typeof e=="function",tt=e=>typeof e=="string",Fr=e=>typeof e=="symbol",ft=e=>e!==null&&typeof e=="object",G2=e=>(ft(e)||Xe(e))&&Xe(e.then)&&Xe(e.catch),b$=Object.prototype.toString,vd=e=>b$.call(e),Fm=e=>vd(e).slice(8,-1),rg=e=>vd(e)==="[object Object]",Y2=e=>tt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Al=yr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),xR=yr("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),u0=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},MR=/-(\w)/g,yn=u0(e=>e.replace(MR,(t,n)=>n?n.toUpperCase():"")),TR=/\B([A-Z])/g,zo=u0(e=>e.replace(TR,"-$1").toLowerCase()),ql=u0(e=>e.charAt(0).toUpperCase()+e.slice(1)),vc=u0(e=>e?`on${ql(e)}`:""),ps=(e,t)=>!Object.is(e,t),yc=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},w$=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},sg=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ig=e=>{const t=tt(e)?Number(e):NaN;return isNaN(t)?e:t};let Jk;const C$=()=>Jk||(Jk=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),OR="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",IR=yr(OR);function Qe(e){if(Me(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],r=tt(o)?k$(o):Qe(o);if(r)for(const s in r)t[s]=r[s]}return t}else if(tt(e)||ft(e))return e}const AR=/;(?![^(]*\))/g,NR=/:([^]+)/,PR=/\/\*[^]*?\*\//g;function k$(e){const t={};return e.replace(PR,"").split(AR).forEach(n=>{if(n){const o=n.split(NR);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function D(e){let t="";if(tt(e))t=e;else if(Me(e))for(let n=0;n<e.length;n++){const o=D(e[n]);o&&(t+=o+" ")}else if(ft(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Z2(e){if(!e)return null;let{class:t,style:n}=e;return t&&!tt(t)&&(e.class=D(t)),n&&(e.style=Qe(n)),e}const LR="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",RR="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",DR="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",FR="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",VR=yr(LR),BR=yr(RR),zR=yr(DR),jR=yr(FR),HR="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",UR=yr(HR);function S$(e){return!!e||e===""}function WR(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=Vl(e[o],t[o]);return n}function Vl(e,t){if(e===t)return!0;let n=og(e),o=og(t);if(n||o)return n&&o?e.getTime()===t.getTime():!1;if(n=Fr(e),o=Fr(t),n||o)return e===t;if(n=Me(e),o=Me(t),n||o)return n&&o?WR(e,t):!1;if(n=ft(e),o=ft(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||!Vl(e[i],t[i]))return!1}}return String(e)===String(t)}function c0(e,t){return e.findIndex(n=>Vl(n,t))}const A=e=>tt(e)?e:e==null?"":Me(e)||ft(e)&&(e.toString===b$||!Xe(e.toString))?JSON.stringify(e,$$,2):String(e),$$=(e,t)=>t&&t.__v_isRef?$$(e,t.value):gc(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,r],s)=>(n[Av(o,s)+" =>"]=r,n),{})}:yu(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Av(n))}:Fr(t)?Av(t):ft(t)&&!Me(t)&&!rg(t)?String(t):t,Av=(e,t="")=>{var n;return Fr(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
6 -* @vue/reactivity v3.4.23
5 +**/function Uo(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const pn={},Zh=[],Dt=()=>{},qh=()=>!1,Id=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),b6=t=>t.startsWith("onUpdate:"),cn=Object.assign,w6=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},YW=Object.prototype.hasOwnProperty,zt=(t,e)=>YW.call(t,e),Ee=Array.isArray,Jh=t=>rp(t)==="[object Map]",Ld=t=>rp(t)==="[object Set]",Yy=t=>rp(t)==="[object Date]",qW=t=>rp(t)==="[object RegExp]",et=t=>typeof t=="function",Ke=t=>typeof t=="string",mo=t=>typeof t=="symbol",yt=t=>t!==null&&typeof t=="object",hd=t=>(yt(t)||et(t))&&et(t.then)&&et(t.catch),RP=Object.prototype.toString,rp=t=>RP.call(t),GW=t=>rp(t).slice(8,-1),fd=t=>rp(t)==="[object Object]",fb=t=>Ke(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,ul=Uo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),XW=Uo("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),pb=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},KW=/-\w/g,Un=pb(t=>t.replace(KW,e=>e.slice(1).toUpperCase())),ZW=/\B([A-Z])/g,zi=pb(t=>t.replace(ZW,"-$1").toLowerCase()),Gc=pb(t=>t.charAt(0).toUpperCase()+t.slice(1)),Gu=pb(t=>t?`on${Gc(t)}`:""),Ni=(t,e)=>!Object.is(t,e),Qh=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},VP=(t,e,n,i=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},mb=t=>{const e=parseFloat(t);return isNaN(e)?t:e},qy=t=>{const e=Ke(t)?Number(t):NaN;return isNaN(e)?t:e};let _9;const gb=()=>_9||(_9=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function JW(t,e){return t+JSON.stringify(e,(n,i)=>typeof i=="function"?i.toString():i)}const QW="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,Symbol",eY=Uo(QW);function Xe(t){if(Ee(t)){const e={};for(let n=0;n<t.length;n++){const i=t[n],s=Ke(i)?FP(i):Xe(i);if(s)for(const o in s)e[o]=s[o]}return e}else if(Ke(t)||yt(t))return t}const tY=/;(?![^(]*\))/g,nY=/:([^]+)/,sY=/\/\*[^]*?\*\//g;function FP(t){const e={};return t.replace(sY,"").split(tY).forEach(n=>{if(n){const i=n.split(nY);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function q(t){let e="";if(Ke(t))e=t;else if(Ee(t))for(let n=0;n<t.length;n++){const i=q(t[n]);i&&(e+=i+" ")}else if(yt(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function ef(t){if(!t)return null;let{class:e,style:n}=t;return e&&!Ke(e)&&(t.class=q(e)),n&&(t.style=Xe(n)),t}const iY="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",oY="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",rY="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",aY="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",lY=Uo(iY),cY=Uo(oY),uY=Uo(rY),dY=Uo(aY),hY="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",fY=Uo(hY);function NP(t){return!!t||t===""}function pY(t,e){if(t.length!==e.length)return!1;let n=!0;for(let i=0;n&&i<t.length;i++)n=Dc(t[i],e[i]);return n}function Dc(t,e){if(t===e)return!0;let n=Yy(t),i=Yy(e);if(n||i)return n&&i?t.getTime()===e.getTime():!1;if(n=mo(t),i=mo(e),n||i)return t===e;if(n=Ee(t),i=Ee(e),n||i)return n&&i?pY(t,e):!1;if(n=yt(t),i=yt(e),n||i){if(!n||!i)return!1;const s=Object.keys(t).length,o=Object.keys(e).length;if(s!==o)return!1;for(const r in t){const a=t.hasOwnProperty(r),l=e.hasOwnProperty(r);if(a&&!l||!a&&l||!Dc(t[r],e[r]))return!1}}return String(t)===String(e)}function vb(t,e){return t.findIndex(n=>Dc(n,e))}const BP=t=>!!(t&&t.__v_isRef===!0),x=t=>Ke(t)?t:t==null?"":Ee(t)||yt(t)&&(t.toString===RP||!et(t.toString))?BP(t)?x(t.value):JSON.stringify(t,zP,2):String(t),zP=(t,e)=>BP(e)?zP(t,e.value):Jh(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,s],o)=>(n[aw(i,o)+" =>"]=s,n),{})}:Ld(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>aw(n))}:mo(e)?aw(e):yt(e)&&!Ee(e)&&!fd(e)?String(e):e,aw=(t,e="")=>{var n;return mo(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};function mY(t){return t==null?"initial":typeof t=="string"?t===""?" ":t:String(t)}/**
6 +* @vue/reactivity v3.5.27
7 7 * (c) 2018-present Yuxi (Evan) You and Vue contributors
8 8 * @license MIT
9 -**/let ir;class J2{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=ir,!t&&ir&&(this.index=(ir.scopes||(ir.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=ir;try{return ir=this,t()}finally{ir=n}}}on(){ir=this}off(){ir=this.parent}stop(t){if(this._active){let n,o;for(n=0,o=this.effects.length;n<o;n++)this.effects[n].stop();for(n=0,o=this.cleanups.length;n<o;n++)this.cleanups[n]();if(this.scopes)for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this._active=!1}}}function E$(e){return new J2(e)}function x$(e,t=ir){t&&t.active&&t.effects.push(e)}function X2(){return ir}function Q2(e){ir&&ir.cleanups.push(e)}let Va;class Rc{constructor(t,n,o,r){this.fn=t,this.trigger=n,this.scheduler=o,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,x$(this,r)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,Gl();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(KR(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),Yl()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Nl,n=Va;try{return Nl=!0,Va=this,this._runnings++,Xk(this),this.fn()}finally{Qk(this),this._runnings--,Va=n,Nl=t}}stop(){var t;this.active&&(Xk(this),Qk(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function KR(e){return e.value}function Xk(e){e._trackId++,e._depsLength=0}function Qk(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)M$(e.deps[t],e);e.deps.length=e._depsLength}}function M$(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}function qR(e,t){e.effect instanceof Rc&&(e=e.effect.fn);const n=new Rc(e,yt,()=>{n.dirty&&n.run()});t&&(Bt(n,t),t.scope&&x$(n,t.scope)),(!t||!t.lazy)&&n.run();const o=n.run.bind(n);return o.effect=n,o}function GR(e){e.effect.stop()}let Nl=!0,a_=0;const T$=[];function Gl(){T$.push(Nl),Nl=!1}function Yl(){const e=T$.pop();Nl=e===void 0?!0:e}function ew(){a_++}function tw(){for(a_--;!a_&&u_.length;)u_.shift()()}function O$(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const o=e.deps[e._depsLength];o!==t?(o&&M$(o,e),e.deps[e._depsLength++]=t):e._depsLength++}}const u_=[];function I$(e,t,n){ew();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&&u_.push(o.scheduler)))}tw()}const A$=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},lg=new WeakMap,Ba=Symbol(""),c_=Symbol("");function Yo(e,t,n){if(Nl&&Va){let o=lg.get(e);o||lg.set(e,o=new Map);let r=o.get(n);r||o.set(n,r=A$(()=>o.delete(n))),O$(Va,r)}}function Ei(e,t,n,o,r,s){const i=lg.get(e);if(!i)return;let l=[];if(t==="clear")l=[...i.values()];else if(n==="length"&&Me(e)){const a=Number(o);i.forEach((u,c)=>{(c==="length"||!Fr(c)&&c>=a)&&l.push(u)})}else switch(n!==void 0&&l.push(i.get(n)),t){case"add":Me(e)?Y2(n)&&l.push(i.get("length")):(l.push(i.get(Ba)),gc(e)&&l.push(i.get(c_)));break;case"delete":Me(e)||(l.push(i.get(Ba)),gc(e)&&l.push(i.get(c_)));break;case"set":gc(e)&&l.push(i.get(Ba));break}ew();for(const a of l)a&&I$(a,4);tw()}function YR(e,t){var n;return(n=lg.get(e))==null?void 0:n.get(t)}const ZR=yr("__proto__,__v_isRef,__isVue"),N$=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Fr)),e4=JR();function JR(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const o=Mt(this);for(let s=0,i=this.length;s<i;s++)Yo(o,"get",s+"");const r=o[t](...n);return r===-1||r===!1?o[t](...n.map(Mt)):r}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){Gl(),ew();const o=Mt(this)[t].apply(this,n);return tw(),Yl(),o}}),e}function XR(e){Fr(e)||(e=String(e));const t=Mt(this);return Yo(t,"has",e),t.hasOwnProperty(e)}class P${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?B$:V$:s?F$:D$).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const i=Me(t);if(!r){if(i&&vt(e4,n))return Reflect.get(e4,n,o);if(n==="hasOwnProperty")return XR}const l=Reflect.get(t,n,o);return(Fr(n)?N$.has(n):ZR(n))||(r||Yo(t,"get",n),s)?l:on(l)?i&&Y2(n)?l:l.value:ft(l)?r?_u(l):Dn(l):l}}class L$ extends P${constructor(t=!1){super(!1,t)}set(t,n,o,r){let s=t[n];if(!this._isShallow){const a=Dc(s);if(!fp(o)&&!Dc(o)&&(s=Mt(s),o=Mt(o)),!Me(t)&&on(s)&&!on(o))return a?!1:(s.value=o,!0)}const i=Me(t)&&Y2(n)?Number(n)<t.length:vt(t,n),l=Reflect.set(t,n,o,r);return t===Mt(r)&&(i?ps(o,s)&&Ei(t,"set",n,o):Ei(t,"add",n,o)),l}deleteProperty(t,n){const o=vt(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&o&&Ei(t,"delete",n,void 0),r}has(t,n){const o=Reflect.has(t,n);return(!Fr(n)||!N$.has(n))&&Yo(t,"has",n),o}ownKeys(t){return Yo(t,"iterate",Me(t)?"length":Ba),Reflect.ownKeys(t)}}class R$ extends P${constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const QR=new L$,eD=new R$,tD=new L$(!0),nD=new R$(!0),nw=e=>e,d0=e=>Reflect.getPrototypeOf(e);function Wh(e,t,n=!1,o=!1){e=e.__v_raw;const r=Mt(e),s=Mt(t);n||(ps(t,s)&&Yo(r,"get",t),Yo(r,"get",s));const{has:i}=d0(r),l=o?nw:n?sw:pp;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 Kh(e,t=!1){const n=this.__v_raw,o=Mt(n),r=Mt(e);return t||(ps(e,r)&&Yo(o,"has",e),Yo(o,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function qh(e,t=!1){return e=e.__v_raw,!t&&Yo(Mt(e),"iterate",Ba),Reflect.get(e,"size",e)}function t4(e){e=Mt(e);const t=Mt(this);return d0(t).has.call(t,e)||(t.add(e),Ei(t,"add",e,e)),this}function n4(e,t){t=Mt(t);const n=Mt(this),{has:o,get:r}=d0(n);let s=o.call(n,e);s||(e=Mt(e),s=o.call(n,e));const i=r.call(n,e);return n.set(e,t),s?ps(t,i)&&Ei(n,"set",e,t):Ei(n,"add",e,t),this}function o4(e){const t=Mt(this),{has:n,get:o}=d0(t);let r=n.call(t,e);r||(e=Mt(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&Ei(t,"delete",e,void 0),s}function r4(){const e=Mt(this),t=e.size!==0,n=e.clear();return t&&Ei(e,"clear",void 0,void 0),n}function Gh(e,t){return function(o,r){const s=this,i=s.__v_raw,l=Mt(i),a=t?nw:e?sw:pp;return!e&&Yo(l,"iterate",Ba),i.forEach((u,c)=>o.call(r,a(u),a(c),s))}}function Yh(e,t,n){return function(...o){const r=this.__v_raw,s=Mt(r),i=gc(s),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,u=r[e](...o),c=n?nw:t?sw:pp;return!t&&Yo(s,"iterate",a?c_:Ba),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:l?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Wi(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function oD(){const e={get(s){return Wh(this,s)},get size(){return qh(this)},has:Kh,add:t4,set:n4,delete:o4,clear:r4,forEach:Gh(!1,!1)},t={get(s){return Wh(this,s,!1,!0)},get size(){return qh(this)},has:Kh,add:t4,set:n4,delete:o4,clear:r4,forEach:Gh(!1,!0)},n={get(s){return Wh(this,s,!0)},get size(){return qh(this,!0)},has(s){return Kh.call(this,s,!0)},add:Wi("add"),set:Wi("set"),delete:Wi("delete"),clear:Wi("clear"),forEach:Gh(!0,!1)},o={get(s){return Wh(this,s,!0,!0)},get size(){return qh(this,!0)},has(s){return Kh.call(this,s,!0)},add:Wi("add"),set:Wi("set"),delete:Wi("delete"),clear:Wi("clear"),forEach:Gh(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=Yh(s,!1,!1),n[s]=Yh(s,!0,!1),t[s]=Yh(s,!1,!0),o[s]=Yh(s,!0,!0)}),[e,n,t,o]}const[rD,sD,iD,lD]=oD();function f0(e,t){const n=t?e?lD:iD:e?sD:rD;return(o,r,s)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?o:Reflect.get(vt(n,r)&&r in o?n:o,r,s)}const aD={get:f0(!1,!1)},uD={get:f0(!1,!0)},cD={get:f0(!0,!1)},dD={get:f0(!0,!0)},D$=new WeakMap,F$=new WeakMap,V$=new WeakMap,B$=new WeakMap;function fD(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function pD(e){return e.__v_skip||!Object.isExtensible(e)?0:fD(Fm(e))}function Dn(e){return Dc(e)?e:p0(e,!1,QR,aD,D$)}function ow(e){return p0(e,!1,tD,uD,F$)}function _u(e){return p0(e,!0,eD,cD,V$)}function hD(e){return p0(e,!0,nD,dD,B$)}function p0(e,t,n,o,r){if(!ft(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=pD(e);if(i===0)return e;const l=new Proxy(e,i===2?o:n);return r.set(e,l),l}function _c(e){return Dc(e)?_c(e.__v_raw):!!(e&&e.__v_isReactive)}function Dc(e){return!!(e&&e.__v_isReadonly)}function fp(e){return!!(e&&e.__v_isShallow)}function rw(e){return e?!!e.__v_raw:!1}function Mt(e){const t=e&&e.__v_raw;return t?Mt(t):e}function Ii(e){return Object.isExtensible(e)&&w$(e,"__v_skip",!0),e}const pp=e=>ft(e)?Dn(e):e,sw=e=>ft(e)?_u(e):e;class z${constructor(t,n,o,r){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Rc(()=>t(this._value),()=>bc(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=o}get value(){const t=Mt(this);return(!t._cacheable||t.effect.dirty)&&ps(t._value,t._value=t.effect.run())&&bc(t,4),iw(t),t.effect._dirtyLevel>=2&&bc(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function j$(e,t,n=!1){let o,r;const s=Xe(e);return s?(o=e,r=yt):(o=e.get,r=e.set),new z$(o,r,s||!r,n)}function iw(e){var t;Nl&&Va&&(e=Mt(e),O$(Va,(t=e.dep)!=null?t:e.dep=A$(()=>e.dep=void 0,e instanceof z$?e:void 0)))}function bc(e,t=4,n){e=Mt(e);const o=e.dep;o&&I$(o,t)}function on(e){return!!(e&&e.__v_isRef===!0)}function K(e){return H$(e,!1)}function Tn(e){return H$(e,!0)}function H$(e,t){return on(e)?e:new mD(e,t)}class mD{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Mt(t),this._value=n?t:pp(t)}get value(){return iw(this),this._value}set value(t){const n=this.__v_isShallow||fp(t)||Dc(t);t=n?t:Mt(t),ps(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:pp(t),bc(this,4))}}function gD(e){bc(e,4)}function g(e){return on(e)?e.value:e}function vD(e){return Xe(e)?e():g(e)}const yD={get:(e,t,n)=>g(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return on(r)&&!on(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function lw(e){return _c(e)?e:new Proxy(e,yD)}class _D{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:o}=t(()=>iw(this),()=>bc(this));this._get=n,this._set=o}get value(){return this._get()}set value(t){this._set(t)}}function U$(e){return new _D(e)}function ei(e){const t=Me(e)?new Array(e.length):{};for(const n in e)t[n]=W$(e,n);return t}class bD{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 YR(Mt(this._object),this._key)}}class wD{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function pn(e,t,n){return on(e)?e:Xe(e)?new wD(e):ft(e)&&arguments.length>1?W$(e,t,n):K(e)}function W$(e,t,n){const o=e[t];return on(o)?o:new bD(e,t,n)}const CD={GET:"get",HAS:"has",ITERATE:"iterate"},kD={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"};/**
10 -* @vue/runtime-core v3.4.23
9 +**/let xi;class k6{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=xi,!e&&xi&&(this.index=(xi.scopes||(xi.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].pause();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].resume();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].resume()}}run(e){if(this._active){const n=xi;try{return xi=this,e()}finally{xi=n}}}on(){++this._on===1&&(this.prevScope=xi,xi=this)}off(){this._on>0&&--this._on===0&&(xi=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(this.effects.length=0,n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function _b(t){return new k6(t)}function yb(){return xi}function bb(t,e=!1){xi&&xi.cleanups.push(t)}let Gn;const lw=new WeakSet;class $g{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,xi&&xi.active&&xi.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,lw.has(this)&&(lw.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||UP(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,y9(this),jP(this);const e=Gn,n=Nr;Gn=this,Nr=!0;try{return this.fn()}finally{WP(this),Gn=e,Nr=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)S6(e);this.deps=this.depsTail=void 0,y9(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?lw.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){pk(this)&&this.run()}get dirty(){return pk(this)}}let HP=0,jm,Wm;function UP(t,e=!1){if(t.flags|=8,e){t.next=Wm,Wm=t;return}t.next=jm,jm=t}function C6(){HP++}function x6(){if(--HP>0)return;if(Wm){let e=Wm;for(Wm=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;jm;){let e=jm;for(jm=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){t||(t=i)}e=n}}if(t)throw t}function jP(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function WP(t){let e,n=t.depsTail,i=n;for(;i;){const s=i.prevDep;i.version===-1?(i===n&&(n=s),S6(i),gY(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}t.deps=e,t.depsTail=n}function pk(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(YP(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function YP(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Ag)||(t.globalVersion=Ag,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!pk(t))))return;t.flags|=2;const e=t.dep,n=Gn,i=Nr;Gn=t,Nr=!0;try{jP(t);const s=t.fn(t._value);(e.version===0||Ni(s,t._value))&&(t.flags|=128,t._value=s,e.version++)}catch(s){throw e.version++,s}finally{Gn=n,Nr=i,WP(t),t.flags&=-3}}function S6(t,e=!1){const{dep:n,prevSub:i,nextSub:s}=t;if(i&&(i.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=i,t.nextSub=void 0),n.subs===t&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)S6(o,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function gY(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}function vY(t,e){t.effect instanceof $g&&(t=t.effect.fn);const n=new $g(t);e&&cn(n,e);try{n.run()}catch(s){throw n.stop(),s}const i=n.run.bind(n);return i.effect=n,i}function _Y(t){t.effect.stop()}let Nr=!0;const qP=[];function gl(){qP.push(Nr),Nr=!1}function vl(){const t=qP.pop();Nr=t===void 0?!0:t}function y9(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=Gn;Gn=void 0;try{e()}finally{Gn=n}}}let Ag=0;class yY{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class wb{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Gn||!Nr||Gn===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Gn)n=this.activeLink=new yY(Gn,this),Gn.deps?(n.prevDep=Gn.depsTail,Gn.depsTail.nextDep=n,Gn.depsTail=n):Gn.deps=Gn.depsTail=n,GP(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=Gn.depsTail,n.nextDep=void 0,Gn.depsTail.nextDep=n,Gn.depsTail=n,Gn.deps===n&&(Gn.deps=i)}return n}trigger(e){this.version++,Ag++,this.notify(e)}notify(e){C6();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{x6()}}}function GP(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)GP(i)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const Gy=new WeakMap,Xu=Symbol(""),mk=Symbol(""),Eg=Symbol("");function Ai(t,e,n){if(Nr&&Gn){let i=Gy.get(t);i||Gy.set(t,i=new Map);let s=i.get(n);s||(i.set(n,s=new wb),s.map=i,s.key=n),s.track()}}function tl(t,e,n,i,s,o){const r=Gy.get(t);if(!r){Ag++;return}const a=l=>{l&&l.trigger()};if(C6(),e==="clear")r.forEach(a);else{const l=Ee(t),c=l&&fb(n);if(l&&n==="length"){const u=Number(i);r.forEach((d,h)=>{(h==="length"||h===Eg||!mo(h)&&h>=u)&&a(d)})}else switch((n!==void 0||r.has(void 0))&&a(r.get(n)),c&&a(r.get(Eg)),e){case"add":l?c&&a(r.get("length")):(a(r.get(Xu)),Jh(t)&&a(r.get(mk)));break;case"delete":l||(a(r.get(Xu)),Jh(t)&&a(r.get(mk)));break;case"set":Jh(t)&&a(r.get(Xu));break}}x6()}function bY(t,e){const n=Gy.get(t);return n&&n.get(e)}function sh(t){const e=an(t);return e===t?e:(Ai(e,"iterate",Eg),uo(t)?e:e.map(Kr))}function kb(t){return Ai(t=an(t),"iterate",Eg),t}function rc(t,e){return Ma(t)?Cf(Br(t)?Kr(e):e):Kr(e)}const wY={__proto__:null,[Symbol.iterator](){return cw(this,Symbol.iterator,t=>rc(this,t))},concat(...t){return sh(this).concat(...t.map(e=>Ee(e)?sh(e):e))},entries(){return cw(this,"entries",t=>(t[1]=rc(this,t[1]),t))},every(t,e){return Ua(this,"every",t,e,void 0,arguments)},filter(t,e){return Ua(this,"filter",t,e,n=>n.map(i=>rc(this,i)),arguments)},find(t,e){return Ua(this,"find",t,e,n=>rc(this,n),arguments)},findIndex(t,e){return Ua(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return Ua(this,"findLast",t,e,n=>rc(this,n),arguments)},findLastIndex(t,e){return Ua(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return Ua(this,"forEach",t,e,void 0,arguments)},includes(...t){return uw(this,"includes",t)},indexOf(...t){return uw(this,"indexOf",t)},join(t){return sh(this).join(t)},lastIndexOf(...t){return uw(this,"lastIndexOf",t)},map(t,e){return Ua(this,"map",t,e,void 0,arguments)},pop(){return jp(this,"pop")},push(...t){return jp(this,"push",t)},reduce(t,...e){return b9(this,"reduce",t,e)},reduceRight(t,...e){return b9(this,"reduceRight",t,e)},shift(){return jp(this,"shift")},some(t,e){return Ua(this,"some",t,e,void 0,arguments)},splice(...t){return jp(this,"splice",t)},toReversed(){return sh(this).toReversed()},toSorted(t){return sh(this).toSorted(t)},toSpliced(...t){return sh(this).toSpliced(...t)},unshift(...t){return jp(this,"unshift",t)},values(){return cw(this,"values",t=>rc(this,t))}};function cw(t,e,n){const i=kb(t),s=i[e]();return i!==t&&!uo(t)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.done||(o.value=n(o.value)),o}),s}const kY=Array.prototype;function Ua(t,e,n,i,s,o){const r=kb(t),a=r!==t&&!uo(t),l=r[e];if(l!==kY[e]){const d=l.apply(t,o);return a?Kr(d):d}let c=n;r!==t&&(a?c=function(d,h){return n.call(this,rc(t,d),h,t)}:n.length>2&&(c=function(d,h){return n.call(this,d,h,t)}));const u=l.call(r,c,i);return a&&s?s(u):u}function b9(t,e,n,i){const s=kb(t);let o=n;return s!==t&&(uo(t)?n.length>3&&(o=function(r,a,l){return n.call(this,r,a,l,t)}):o=function(r,a,l){return n.call(this,r,rc(t,a),l,t)}),s[e](o,...i)}function uw(t,e,n){const i=an(t);Ai(i,"iterate",Eg);const s=i[e](...n);return(s===-1||s===!1)&&A1(n[0])?(n[0]=an(n[0]),i[e](...n)):s}function jp(t,e,n=[]){gl(),C6();const i=an(t)[e].apply(t,n);return x6(),vl(),i}const CY=Uo("__proto__,__v_isRef,__isVue"),XP=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(mo));function xY(t){mo(t)||(t=String(t));const e=an(this);return Ai(e,"has",t),e.hasOwnProperty(t)}class KP{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,i){if(n==="__v_skip")return e.__v_skip;const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return i===(s?o?nI:tI:o?eI:QP).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const r=Ee(e);if(!s){let l;if(r&&(l=wY[n]))return l;if(n==="hasOwnProperty")return xY}const a=Reflect.get(e,n,hn(e)?e:i);if((mo(n)?XP.has(n):CY(n))||(s||Ai(e,"get",n),o))return a;if(hn(a)){const l=r&&fb(n)?a:a.value;return s&&yt(l)?Rc(l):l}return yt(a)?s?Rc(a):In(a):a}}class ZP extends KP{constructor(e=!1){super(!1,e)}set(e,n,i,s){let o=e[n];const r=Ee(e)&&fb(n);if(!this._isShallow){const c=Ma(o);if(!uo(i)&&!Ma(i)&&(o=an(o),i=an(i)),!r&&hn(o)&&!hn(i))return c||(o.value=i),!0}const a=r?Number(n)<e.length:zt(e,n),l=Reflect.set(e,n,i,hn(e)?e:s);return e===an(s)&&(a?Ni(i,o)&&tl(e,"set",n,i):tl(e,"add",n,i)),l}deleteProperty(e,n){const i=zt(e,n);e[n];const s=Reflect.deleteProperty(e,n);return s&&i&&tl(e,"delete",n,void 0),s}has(e,n){const i=Reflect.has(e,n);return(!mo(n)||!XP.has(n))&&Ai(e,"has",n),i}ownKeys(e){return Ai(e,"iterate",Ee(e)?"length":Xu),Reflect.ownKeys(e)}}class JP extends KP{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}}const SY=new ZP,$Y=new JP,AY=new ZP(!0),EY=new JP(!0),gk=t=>t,Ov=t=>Reflect.getPrototypeOf(t);function MY(t,e,n){return function(...i){const s=this.__v_raw,o=an(s),r=Jh(o),a=t==="entries"||t===Symbol.iterator&&r,l=t==="keys"&&r,c=s[t](...i),u=n?gk:e?Cf:Kr;return!e&&Ai(o,"iterate",l?mk:Xu),cn(Object.create(c),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:a?[u(d[0]),u(d[1])]:u(d),done:h}}})}}function Dv(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function TY(t,e){const n={get(s){const o=this.__v_raw,r=an(o),a=an(s);t||(Ni(s,a)&&Ai(r,"get",s),Ai(r,"get",a));const{has:l}=Ov(r),c=e?gk:t?Cf:Kr;if(l.call(r,s))return c(o.get(s));if(l.call(r,a))return c(o.get(a));o!==r&&o.get(s)},get size(){const s=this.__v_raw;return!t&&Ai(an(s),"iterate",Xu),s.size},has(s){const o=this.__v_raw,r=an(o),a=an(s);return t||(Ni(s,a)&&Ai(r,"has",s),Ai(r,"has",a)),s===a?o.has(s):o.has(s)||o.has(a)},forEach(s,o){const r=this,a=r.__v_raw,l=an(a),c=e?gk:t?Cf:Kr;return!t&&Ai(l,"iterate",Xu),a.forEach((u,d)=>s.call(o,c(u),c(d),r))}};return cn(n,t?{add:Dv("add"),set:Dv("set"),delete:Dv("delete"),clear:Dv("clear")}:{add(s){!e&&!uo(s)&&!Ma(s)&&(s=an(s));const o=an(this);return Ov(o).has.call(o,s)||(o.add(s),tl(o,"add",s,s)),this},set(s,o){!e&&!uo(o)&&!Ma(o)&&(o=an(o));const r=an(this),{has:a,get:l}=Ov(r);let c=a.call(r,s);c||(s=an(s),c=a.call(r,s));const u=l.call(r,s);return r.set(s,o),c?Ni(o,u)&&tl(r,"set",s,o):tl(r,"add",s,o),this},delete(s){const o=an(this),{has:r,get:a}=Ov(o);let l=r.call(o,s);l||(s=an(s),l=r.call(o,s)),a&&a.call(o,s);const c=o.delete(s);return l&&tl(o,"delete",s,void 0),c},clear(){const s=an(this),o=s.size!==0,r=s.clear();return o&&tl(s,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=MY(s,t,e)}),n}function Cb(t,e){const n=TY(t,e);return(i,s,o)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?i:Reflect.get(zt(n,s)&&s in i?n:i,s,o)}const PY={get:Cb(!1,!1)},IY={get:Cb(!1,!0)},LY={get:Cb(!0,!1)},OY={get:Cb(!0,!0)},QP=new WeakMap,eI=new WeakMap,tI=new WeakMap,nI=new WeakMap;function DY(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function RY(t){return t.__v_skip||!Object.isExtensible(t)?0:DY(GW(t))}function In(t){return Ma(t)?t:xb(t,!1,SY,PY,QP)}function $6(t){return xb(t,!1,AY,IY,eI)}function Rc(t){return xb(t,!0,$Y,LY,tI)}function VY(t){return xb(t,!0,EY,OY,nI)}function xb(t,e,n,i,s){if(!yt(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=RY(t);if(o===0)return t;const r=s.get(t);if(r)return r;const a=new Proxy(t,o===2?i:n);return s.set(t,a),a}function Br(t){return Ma(t)?Br(t.__v_raw):!!(t&&t.__v_isReactive)}function Ma(t){return!!(t&&t.__v_isReadonly)}function uo(t){return!!(t&&t.__v_isShallow)}function A1(t){return t?!!t.__v_raw:!1}function an(t){const e=t&&t.__v_raw;return e?an(e):t}function Xs(t){return!zt(t,"__v_skip")&&Object.isExtensible(t)&&VP(t,"__v_skip",!0),t}const Kr=t=>yt(t)?In(t):t,Cf=t=>yt(t)?Rc(t):t;function hn(t){return t?t.__v_isRef===!0:!1}function ee(t){return sI(t,!1)}function Fn(t){return sI(t,!0)}function sI(t,e){return hn(t)?t:new FY(t,e)}class FY{constructor(e,n){this.dep=new wb,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:an(e),this._value=n?e:Kr(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,i=this.__v_isShallow||uo(e)||Ma(e);e=i?e:an(e),Ni(e,n)&&(this._rawValue=e,this._value=i?e:Kr(e),this.dep.trigger())}}function Ym(t){t.dep&&t.dep.trigger()}function E(t){return hn(t)?t.value:t}function vk(t){return et(t)?t():E(t)}const NY={get:(t,e,n)=>e==="__v_raw"?t:E(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const s=t[e];return hn(s)&&!hn(n)?(s.value=n,!0):Reflect.set(t,e,n,i)}};function A6(t){return Br(t)?t:new Proxy(t,NY)}class BY{constructor(e){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new wb,{get:i,set:s}=e(n.track.bind(n),n.trigger.bind(n));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}}function iI(t){return new BY(t)}function go(t){const e=Ee(t)?new Array(t.length):{};for(const n in t)e[n]=oI(t,n);return e}class zY{constructor(e,n,i){this._object=e,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0,this._raw=an(e);let s=!0,o=e;if(!Ee(e)||!fb(String(n)))do s=!A1(o)||uo(o);while(s&&(o=o.__v_raw));this._shallow=s}get value(){let e=this._object[this._key];return this._shallow&&(e=E(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&hn(this._raw[this._key])){const n=this._object[this._key];if(hn(n)){n.value=e;return}}this._object[this._key]=e}get dep(){return bY(this._raw,this._key)}}class HY{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Sn(t,e,n){return hn(t)?t:et(t)?new HY(t):yt(t)&&arguments.length>1?oI(t,e,n):ee(t)}function oI(t,e,n){return new zY(t,e,n)}class UY{constructor(e,n,i){this.fn=e,this.setter=n,this._value=void 0,this.dep=new wb(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ag-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Gn!==this)return UP(this,!0),!0}get value(){const e=this.dep.track();return YP(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function jY(t,e,n=!1){let i,s;return et(t)?i=t:(i=t.get,s=t.set),new UY(i,s,n)}const WY={GET:"get",HAS:"has",ITERATE:"iterate"},YY={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Rv={},Xy=new WeakMap;let ac;function qY(){return ac}function rI(t,e=!1,n=ac){if(n){let i=Xy.get(n);i||Xy.set(n,i=[]),i.push(t)}}function GY(t,e,n=pn){const{immediate:i,deep:s,once:o,scheduler:r,augmentJob:a,call:l}=n,c=A=>s?A:uo(A)||s===!1||s===0?nl(A,1):nl(A);let u,d,h,f,p=!1,m=!1;if(hn(t)?(d=()=>t.value,p=uo(t)):Br(t)?(d=()=>c(t),p=!0):Ee(t)?(m=!0,p=t.some(A=>Br(A)||uo(A)),d=()=>t.map(A=>{if(hn(A))return A.value;if(Br(A))return c(A);if(et(A))return l?l(A,2):A()})):et(t)?e?d=l?()=>l(t,2):t:d=()=>{if(h){gl();try{h()}finally{vl()}}const A=ac;ac=u;try{return l?l(t,3,[f]):t(f)}finally{ac=A}}:d=Dt,e&&s){const A=d,S=s===!0?1/0:s;d=()=>nl(A(),S)}const b=yb(),w=()=>{u.stop(),b&&b.active&&w6(b.effects,u)};if(o&&e){const A=e;e=(...S)=>{A(...S),w()}}let k=m?new Array(t.length).fill(Rv):Rv;const C=A=>{if(!(!(u.flags&1)||!u.dirty&&!A))if(e){const S=u.run();if(s||p||(m?S.some((M,P)=>Ni(M,k[P])):Ni(S,k))){h&&h();const M=ac;ac=u;try{const P=[S,k===Rv?void 0:m&&k[0]===Rv?[]:k,f];k=S,l?l(e,3,P):e(...P)}finally{ac=M}}}else u.run()};return a&&a(C),u=new $g(d),u.scheduler=r?()=>r(C,!1):C,f=A=>rI(A,!1,u),h=u.onStop=()=>{const A=Xy.get(u);if(A){if(l)l(A,4);else for(const S of A)S();Xy.delete(u)}},e?i?C(!0):k=u.run():r?r(C.bind(null,!0),!0):u.run(),w.pause=u.pause.bind(u),w.resume=u.resume.bind(u),w.stop=w,w}function nl(t,e=1/0,n){if(e<=0||!yt(t)||t.__v_skip||(n=n||new Map,(n.get(t)||0)>=e))return t;if(n.set(t,e),e--,hn(t))nl(t.value,e,n);else if(Ee(t))for(let i=0;i<t.length;i++)nl(t[i],e,n);else if(Ld(t)||Jh(t))t.forEach(i=>{nl(i,e,n)});else if(fd(t)){for(const i in t)nl(t[i],e,n);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&nl(t[i],e,n)}return t}/**
10 +* @vue/runtime-core v3.5.27
11 11 * (c) 2018-present Yuxi (Evan) You and Vue contributors
12 12 * @license MIT
13 -**/function SD(e,t){}const $D={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"},ED={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 xi(e,t,n,o){try{return o?e(...o):e()}catch(r){bu(r,t,n)}}function hr(e,t,n,o){if(Xe(e)){const r=xi(e,t,n,o);return r&&G2(r)&&r.catch(s=>{bu(s,t,n)}),r}if(Me(e)){const r=[];for(let s=0;s<e.length;s++)r.push(hr(e[s],t,n,o));return r}}function bu(e,t,n,o=!0){const r=t?t.vnode:null;if(t){let s=t.parent;const i=t.proxy,l=`https://vuejs.org/error-reference/#runtime-${n}`;for(;s;){const u=s.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](e,i,l)===!1)return}s=s.parent}const a=t.appContext.config.errorHandler;if(a){Gl(),xi(a,null,10,[e,i,l]),Yl();return}}xD(e,n,r,o)}function xD(e,t,n,o=!0){console.error(e)}let hp=!1,d_=!1;const ho=[];let Vs=0;const wc=[];let pl=null,$a=0;const K$=Promise.resolve();let aw=null;function ot(e){const t=aw||K$;return e?t.then(this?e.bind(this):e):t}function MD(e){let t=Vs+1,n=ho.length;for(;t<n;){const o=t+n>>>1,r=ho[o],s=mp(r);s<e||s===e&&r.pre?t=o+1:n=o}return t}function h0(e){(!ho.length||!ho.includes(e,hp&&e.allowRecurse?Vs+1:Vs))&&(e.id==null?ho.push(e):ho.splice(MD(e.id),0,e),q$())}function q$(){!hp&&!d_&&(d_=!0,aw=K$.then(G$))}function TD(e){const t=ho.indexOf(e);t>Vs&&ho.splice(t,1)}function ag(e){Me(e)?wc.push(...e):(!pl||!pl.includes(e,e.allowRecurse?$a+1:$a))&&wc.push(e),q$()}function s4(e,t,n=hp?Vs+1:0){for(;n<ho.length;n++){const o=ho[n];if(o&&o.pre){if(e&&o.id!==e.uid)continue;ho.splice(n,1),n--,o()}}}function ug(e){if(wc.length){const t=[...new Set(wc)].sort((n,o)=>mp(n)-mp(o));if(wc.length=0,pl){pl.push(...t);return}for(pl=t,$a=0;$a<pl.length;$a++)pl[$a]();pl=null,$a=0}}const mp=e=>e.id==null?1/0:e.id,OD=(e,t)=>{const n=mp(e)-mp(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function G$(e){d_=!1,hp=!0,ho.sort(OD);const t=yt;try{for(Vs=0;Vs<ho.length;Vs++){const n=ho[Vs];n&&n.active!==!1&&xi(n,null,14)}}finally{Vs=0,ho.length=0,ug(),hp=!1,aw=null,(ho.length||wc.length)&&G$()}}let Uu,Zh=[];function Y$(e,t){var n,o;Uu=e,Uu?(Uu.enabled=!0,Zh.forEach(({event:r,args:s})=>Uu.emit(r,...s)),Zh=[]):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=>{Y$(s,t)}),setTimeout(()=>{Uu||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Zh=[])},3e3)):Zh=[]}function ID(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||Wt;let r=n;const s=t.startsWith("update:"),i=s&&t.slice(7);if(i&&i in o){const c=`${i==="modelValue"?"model":i}Modifiers`,{number:d,trim:f}=o[c]||Wt;f&&(r=n.map(p=>tt(p)?p.trim():p)),d&&(r=n.map(sg))}let l,a=o[l=vc(t)]||o[l=vc(yn(t))];!a&&s&&(a=o[l=vc(zo(t))]),a&&hr(a,e,6,r);const u=o[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,hr(u,e,6,r)}}function Z$(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(!Xe(e)){const a=u=>{const c=Z$(u,t,!0);c&&(l=!0,Bt(i,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!s&&!l?(ft(e)&&o.set(e,null),null):(Me(s)?s.forEach(a=>i[a]=null):Bt(i,s),ft(e)&&o.set(e,i),i)}function m0(e,t){return!e||!vu(t)?!1:(t=t.slice(2).replace(/Once$/,""),vt(e,t[0].toLowerCase()+t.slice(1))||vt(e,zo(t))||vt(e,t))}let Pn=null,g0=null;function gp(e){const t=Pn;return Pn=e,g0=e&&e.type.__scopeId||null,t}function J$(e){g0=e}function X$(){g0=null}const AD=e=>$;function $(e,t=Pn,n){if(!t||e._n)return e;const o=(...r)=>{o._d&&b_(-1);const s=gp(t);let i;try{i=e(...r)}finally{gp(s),o._d&&b_(1)}return i};return o._n=!0,o._c=!0,o._d=!0,o}function Vm(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[i],slots:l,attrs:a,emit:u,render:c,renderCache:d,data:f,setupState:p,ctx:h,inheritAttrs:m}=e;let y,v;const w=gp(e);try{if(n.shapeFlag&4){const S=r||o,x=S;y=ur(c.call(x,S,d,s,p,f,h)),v=a}else{const S=t;y=ur(S.length>1?S(s,{attrs:a,slots:l,emit:u}):S(s,null)),v=t.props?a:PD(a)}}catch(S){Rf.length=0,bu(S,e,1),y=k(Kn)}let _=y;if(v&&m!==!1){const S=Object.keys(v),{shapeFlag:x}=_;S.length&&x&7&&(i&&S.some(K2)&&(v=LD(v,i)),_=hs(_,v))}return n.dirs&&(_=hs(_),_.dirs=_.dirs?_.dirs.concat(n.dirs):n.dirs),n.transition&&(_.transition=n.transition),y=_,gp(w),y}function ND(e,t=!0){let n;for(let o=0;o<e.length;o++){const r=e[o];if(yo(r)){if(r.type!==Kn||r.children==="v-if"){if(n)return;n=r}}else return}return n}const PD=e=>{let t;for(const n in e)(n==="class"||n==="style"||vu(n))&&((t||(t={}))[n]=e[n]);return t},LD=(e,t)=>{const n={};for(const o in e)(!K2(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function RD(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:l,patchFlag:a}=t,u=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?i4(o,i,u):!!i;if(a&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(i[f]!==o[f]&&!m0(u,f))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:o===i?!1:o?i?i4(o,i,u):!0:!!i;return!1}function i4(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]&&!m0(n,s))return!0}return!1}function uw({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 cw="components",DD="directives";function re(e,t){return dw(cw,e,!0,t)||e}const Q$=Symbol.for("v-ndc");function Lt(e){return tt(e)?dw(cw,e,!1)||e:e||Q$}function zt(e){return dw(DD,e)}function dw(e,t,n=!0,o=!1){const r=Pn||Bn;if(r){const s=r.type;if(e===cw){const l=$_(s,!1);if(l&&(l===t||l===yn(t)||l===ql(yn(t))))return s}const i=l4(r[e]||s[e],t)||l4(r.appContext[e],t);return!i&&o?s:i}}function l4(e,t){return e&&(e[t]||e[yn(t)]||e[ql(yn(t))])}const eE=e=>e.__isSuspense;let f_=0;const FD={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,i,l,a,u){if(e==null)BD(t,n,o,r,s,i,l,a,u);else{if(s&&s.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}zD(e,t,n,o,r,i,l,a,u)}},hydrate:jD,create:fw,normalize:HD},VD=FD;function vp(e,t){const n=e.props&&e.props[t];Xe(n)&&n()}function BD(e,t,n,o,r,s,i,l,a){const{p:u,o:{createElement:c}}=a,d=c("div"),f=e.suspense=fw(e,r,o,t,d,n,s,i,l,a);u(null,f.pendingBranch=e.ssContent,d,null,o,f,s,i),f.deps>0?(vp(e,"onPending"),vp(e,"onFallback"),u(null,e.ssFallback,t,n,o,null,s,i),Cc(f,e.ssFallback)):f.resolve(!1,!0)}function zD(e,t,n,o,r,s,i,l,{p:a,um:u,o:{createElement:c}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,p=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:y,isHydrating:v}=d;if(m)d.pendingBranch=f,ss(f,m)?(a(m,f,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0?d.resolve():y&&(v||(a(h,p,n,o,r,null,s,i,l),Cc(d,p)))):(d.pendingId=f_++,v?(d.isHydrating=!1,d.activeBranch=m):u(m,r,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),y?(a(null,f,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0?d.resolve():(a(h,p,n,o,r,null,s,i,l),Cc(d,p))):h&&ss(f,h)?(a(h,f,n,o,r,d,s,i,l),d.resolve(!0)):(a(null,f,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0&&d.resolve()));else if(h&&ss(f,h))a(h,f,n,o,r,d,s,i,l),Cc(d,f);else if(vp(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=f_++,a(null,f,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0)d.resolve();else{const{timeout:w,pendingId:_}=d;w>0?setTimeout(()=>{d.pendingId===_&&d.fallback(p)},w):w===0&&d.fallback(p)}}function fw(e,t,n,o,r,s,i,l,a,u,c=!1){const{p:d,m:f,um:p,n:h,o:{parentNode:m,remove:y}}=u;let v;const w=UD(e);w&&t!=null&&t.pendingBranch&&(v=t.pendingId,t.deps++);const _=e.props?ig(e.props.timeout):void 0,S=s,x={vnode:e,parent:t,parentComponent:n,namespace:i,container:o,hiddenContainer:r,deps:0,pendingId:f_++,timeout:typeof _=="number"?_:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(E=!1,T=!1){const{vnode:O,activeBranch:P,pendingBranch:N,pendingId:F,effects:B,parentComponent:Y,container:Z}=x;let U=!1;x.isHydrating?x.isHydrating=!1:E||(U=P&&N.transition&&N.transition.mode==="out-in",U&&(P.transition.afterLeave=()=>{F===x.pendingId&&(f(N,Z,s===S?h(P):s,0),ag(B))}),P&&(m(P.el)!==x.hiddenContainer&&(s=h(P)),p(P,Y,x,!0)),U||f(N,Z,s,0)),Cc(x,N),x.pendingBranch=null,x.isInFallback=!1;let j=x.parent,V=!1;for(;j;){if(j.pendingBranch){j.effects.push(...B),V=!0;break}j=j.parent}!V&&!U&&ag(B),x.effects=[],w&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,t.deps===0&&!T&&t.resolve()),vp(O,"onResolve")},fallback(E){if(!x.pendingBranch)return;const{vnode:T,activeBranch:O,parentComponent:P,container:N,namespace:F}=x;vp(T,"onFallback");const B=h(O),Y=()=>{x.isInFallback&&(d(null,E,N,B,P,null,F,l,a),Cc(x,E))},Z=E.transition&&E.transition.mode==="out-in";Z&&(O.transition.afterLeave=Y),x.isInFallback=!0,p(O,P,null,!0),Z||Y()},move(E,T,O){x.activeBranch&&f(x.activeBranch,E,T,O),x.container=E},next(){return x.activeBranch&&h(x.activeBranch)},registerDep(E,T){const O=!!x.pendingBranch;O&&x.deps++;const P=E.vnode.el;E.asyncDep.catch(N=>{bu(N,E,0)}).then(N=>{if(E.isUnmounted||x.isUnmounted||x.pendingId!==E.suspenseId)return;E.asyncResolved=!0;const{vnode:F}=E;k_(E,N,!1),P&&(F.el=P);const B=!P&&E.subTree.el;T(E,F,m(P||E.subTree.el),P?null:h(E.subTree),x,i,a),B&&y(B),uw(E,F.el),O&&--x.deps===0&&x.resolve()})},unmount(E,T){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,n,E,T),x.pendingBranch&&p(x.pendingBranch,n,E,T)}};return x}function jD(e,t,n,o,r,s,i,l,a){const u=t.suspense=fw(t,o,n,e.parentNode,document.createElement("div"),null,r,s,i,l,!0),c=a(e,u.pendingBranch=t.ssContent,n,u,s,i);return u.deps===0&&u.resolve(!1,!0),c}function HD(e){const{shapeFlag:t,children:n}=e,o=t&32;e.ssContent=a4(o?n.default:n),e.ssFallback=o?a4(n.fallback):k(Kn)}function a4(e){let t;if(Xe(e)){const n=nu&&e._c;n&&(e._d=!1,C()),e=e(),n&&(e._d=!0,t=jo,PE())}return Me(e)&&(e=ND(e)),e=ur(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function tE(e,t){t&&t.pendingBranch?Me(e)?t.effects.push(...e):t.effects.push(e):ag(e)}function Cc(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let r=t.el;for(;!r&&t.component;)t=t.component.subTree,r=t.el;n.el=r,o&&o.subTree===n&&(o.vnode.el=r,uw(o,r))}function UD(e){var t;return((t=e.props)==null?void 0:t.suspensible)!=null&&e.props.suspensible!==!1}const nE=Symbol.for("v-scx"),oE=()=>Be(nE);function ls(e,t){return Yp(e,null,t)}function rE(e,t){return Yp(e,null,{flush:"post"})}function sE(e,t){return Yp(e,null,{flush:"sync"})}const Jh={};function Te(e,t,n){return Yp(e,t,n)}function Yp(e,t,{immediate:n,deep:o,flush:r,once:s,onTrack:i,onTrigger:l}=Wt){if(t&&s){const E=t;t=(...T)=>{E(...T),x()}}const a=Bn,u=E=>o===!0?E:Ma(E,o===!1?1:void 0);let c,d=!1,f=!1;if(on(e)?(c=()=>e.value,d=fp(e)):_c(e)?(c=()=>u(e),d=!0):Me(e)?(f=!0,d=e.some(E=>_c(E)||fp(E)),c=()=>e.map(E=>{if(on(E))return E.value;if(_c(E))return u(E);if(Xe(E))return xi(E,a,2)})):Xe(e)?t?c=()=>xi(e,a,2):c=()=>(p&&p(),hr(e,a,3,[h])):c=yt,t&&o){const E=c;c=()=>Ma(E())}let p,h=E=>{p=_.onStop=()=>{xi(E,a,4),p=_.onStop=void 0}},m;if(Jp)if(h=yt,t?n&&hr(t,a,3,[c(),f?[]:void 0,h]):c(),r==="sync"){const E=oE();m=E.__watcherHandles||(E.__watcherHandles=[])}else return yt;let y=f?new Array(e.length).fill(Jh):Jh;const v=()=>{if(!(!_.active||!_.dirty))if(t){const E=_.run();(o||d||(f?E.some((T,O)=>ps(T,y[O])):ps(E,y)))&&(p&&p(),hr(t,a,3,[E,y===Jh?void 0:f&&y[0]===Jh?[]:y,h]),y=E)}else _.run()};v.allowRecurse=!!t;let w;r==="sync"?w=v:r==="post"?w=()=>Qn(v,a&&a.suspense):(v.pre=!0,a&&(v.id=a.uid),w=()=>h0(v));const _=new Rc(c,yt,w),S=X2(),x=()=>{_.stop(),S&&q2(S.effects,_)};return t?n?v():y=_.run():r==="post"?Qn(_.run.bind(_),a&&a.suspense):_.run(),m&&m.push(x),x}function WD(e,t,n){const o=this.proxy,r=tt(e)?e.includes(".")?iE(o,e):()=>o[e]:e.bind(o,o);let s;Xe(t)?s=t:(s=t.handler,n=t);const i=ou(this),l=Yp(r,s.bind(o),n);return i(),l}function iE(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 Ma(e,t,n=0,o){if(!ft(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if(o=o||new Set,o.has(e))return e;if(o.add(e),on(e))Ma(e.value,t,n,o);else if(Me(e))for(let r=0;r<e.length;r++)Ma(e[r],t,n,o);else if(yu(e)||gc(e))e.forEach(r=>{Ma(r,t,n,o)});else if(rg(e))for(const r in e)Ma(e[r],t,n,o);return e}function He(e,t){if(Pn===null)return e;const n=_0(Pn)||Pn.proxy,o=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[s,i,l,a=Wt]=t[r];s&&(Xe(s)&&(s={mounted:s,updated:s}),s.deep&&Ma(i),o.push({dir:s,instance:n,value:i,oldValue:void 0,arg:l,modifiers:a}))}return e}function Ds(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&&(Gl(),hr(a,n,8,[e.el,l,e,t]),Yl())}}const hl=Symbol("_leaveCb"),Xh=Symbol("_enterCb");function pw(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ct(()=>{e.isMounted=!0}),En(()=>{e.isUnmounting=!0}),e}const kr=[Function,Array],hw={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:kr,onEnter:kr,onAfterEnter:kr,onEnterCancelled:kr,onBeforeLeave:kr,onLeave:kr,onAfterLeave:kr,onLeaveCancelled:kr,onBeforeAppear:kr,onAppear:kr,onAfterAppear:kr,onAppearCancelled:kr},KD={name:"BaseTransition",props:hw,setup(e,{slots:t}){const n=at(),o=pw();return()=>{const r=t.default&&v0(t.default(),!0);if(!r||!r.length)return;let s=r[0];if(r.length>1){for(const f of r)if(f.type!==Kn){s=f;break}}const i=Mt(e),{mode:l}=i;if(o.isLeaving)return Nv(s);const a=u4(s);if(!a)return Nv(s);const u=Fc(a,i,o,n);eu(a,u);const c=n.subTree,d=c&&u4(c);if(d&&d.type!==Kn&&!ss(a,d)){const f=Fc(d,i,o,n);if(eu(d,f),l==="out-in")return o.isLeaving=!0,f.afterLeave=()=>{o.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Nv(s);l==="in-out"&&a.type!==Kn&&(f.delayLeave=(p,h,m)=>{const y=aE(o,d);y[String(d.key)]=d,p[hl]=()=>{h(),p[hl]=void 0,delete u.delayedLeave},u.delayedLeave=m})}return s}}},lE=KD;function aE(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 Fc(e,t,n,o){const{appear:r,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:a,onAfterEnter:u,onEnterCancelled:c,onBeforeLeave:d,onLeave:f,onAfterLeave:p,onLeaveCancelled:h,onBeforeAppear:m,onAppear:y,onAfterAppear:v,onAppearCancelled:w}=t,_=String(e.key),S=aE(n,e),x=(O,P)=>{O&&hr(O,o,9,P)},E=(O,P)=>{const N=P[1];x(O,P),Me(O)?O.every(F=>F.length<=1)&&N():O.length<=1&&N()},T={mode:s,persisted:i,beforeEnter(O){let P=l;if(!n.isMounted)if(r)P=m||l;else return;O[hl]&&O[hl](!0);const N=S[_];N&&ss(e,N)&&N.el[hl]&&N.el[hl](),x(P,[O])},enter(O){let P=a,N=u,F=c;if(!n.isMounted)if(r)P=y||a,N=v||u,F=w||c;else return;let B=!1;const Y=O[Xh]=Z=>{B||(B=!0,Z?x(F,[O]):x(N,[O]),T.delayedLeave&&T.delayedLeave(),O[Xh]=void 0)};P?E(P,[O,Y]):Y()},leave(O,P){const N=String(e.key);if(O[Xh]&&O[Xh](!0),n.isUnmounting)return P();x(d,[O]);let F=!1;const B=O[hl]=Y=>{F||(F=!0,P(),Y?x(h,[O]):x(p,[O]),O[hl]=void 0,S[N]===e&&delete S[N])};S[N]=e,f?E(f,[O,B]):B()},clone(O){return Fc(O,t,n,o)}};return T}function Nv(e){if(Zp(e))return e=hs(e),e.children=null,e}function u4(e){return Zp(e)?e.children?e.children[0]:void 0:e}function eu(e,t){e.shapeFlag&6&&e.component?eu(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 v0(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===fe?(i.patchFlag&128&&r++,o=o.concat(v0(i.children,t,l))):(t||i.type!==Kn)&&o.push(l!=null?hs(i,{key:l}):i)}if(r>1)for(let s=0;s<o.length;s++)o[s].patchFlag=-2;return o}/*! #__NO_SIDE_EFFECTS__ */function Q(e,t){return Xe(e)?(()=>Bt({name:e.name},t,{setup:e}))():e}const za=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function qD(e){Xe(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:i=!0,onError:l}=e;let a=null,u,c=0;const d=()=>(c++,a=null,f()),f=()=>{let p;return a||(p=a=t().catch(h=>{if(h=h instanceof Error?h:new Error(String(h)),l)return new Promise((m,y)=>{l(h,()=>m(d()),()=>y(h),c+1)});throw h}).then(h=>p!==a&&a?a:(h&&(h.__esModule||h[Symbol.toStringTag]==="Module")&&(h=h.default),u=h,h)))};return Q({name:"AsyncComponentWrapper",__asyncLoader:f,get __asyncResolved(){return u},setup(){const p=Bn;if(u)return()=>Pv(u,p);const h=w=>{a=null,bu(w,p,13,!o)};if(i&&p.suspense||Jp)return f().then(w=>()=>Pv(w,p)).catch(w=>(h(w),()=>o?k(o,{error:w}):null));const m=K(!1),y=K(),v=K(!!r);return r&&setTimeout(()=>{v.value=!1},r),s!=null&&setTimeout(()=>{if(!m.value&&!y.value){const w=new Error(`Async component timed out after ${s}ms.`);h(w),y.value=w}},s),f().then(()=>{m.value=!0,p.parent&&Zp(p.parent.vnode)&&(p.parent.effect.dirty=!0,h0(p.parent.update))}).catch(w=>{h(w),y.value=w}),()=>{if(m.value&&u)return Pv(u,p);if(y.value&&o)return k(o,{error:y.value});if(n&&!v.value)return k(n)}}})}function Pv(e,t){const{ref:n,props:o,children:r,ce:s}=t.vnode,i=k(e,o,r);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const Zp=e=>e.type.__isKeepAlive,GD={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=at(),o=n.ctx;if(!o.renderer)return()=>{const w=t.default&&t.default();return w&&w.length===1?w[0]:w};const r=new Map,s=new Set;let i=null;const l=n.suspense,{renderer:{p:a,m:u,um:c,o:{createElement:d}}}=o,f=d("div");o.activate=(w,_,S,x,E)=>{const T=w.component;u(w,_,S,0,l),a(T.vnode,w,_,S,T,l,x,w.slotScopeIds,E),Qn(()=>{T.isDeactivated=!1,T.a&&yc(T.a);const O=w.props&&w.props.onVnodeMounted;O&&Vo(O,T.parent,w)},l)},o.deactivate=w=>{const _=w.component;u(w,f,null,1,l),Qn(()=>{_.da&&yc(_.da);const S=w.props&&w.props.onVnodeUnmounted;S&&Vo(S,_.parent,w),_.isDeactivated=!0},l)};function p(w){Lv(w),c(w,n,l,!0)}function h(w){r.forEach((_,S)=>{const x=$_(_.type);x&&(!w||!w(x))&&m(S)})}function m(w){const _=r.get(w);!i||!ss(_,i)?p(_):i&&Lv(i),r.delete(w),s.delete(w)}Te(()=>[e.include,e.exclude],([w,_])=>{w&&h(S=>Zd(w,S)),_&&h(S=>!Zd(_,S))},{flush:"post",deep:!0});let y=null;const v=()=>{y!=null&&r.set(y,Rv(n.subTree))};return Ct(v),Fi(v),En(()=>{r.forEach(w=>{const{subTree:_,suspense:S}=n,x=Rv(_);if(w.type===x.type&&w.key===x.key){Lv(x);const E=x.component.da;E&&Qn(E,S);return}p(w)})}),()=>{if(y=null,!t.default)return i=null;const w=t.default(),_=w[0];if(w.length>1)return i=null,w;if(!yo(_)||!(_.shapeFlag&4)&&!(_.shapeFlag&128))return i=null,_;let S=Rv(_);const x=S.type,E=$_(za(S)?S.type.__asyncResolved||{}:x),{include:T,exclude:O,max:P}=e;if(T&&(!E||!Zd(T,E))||O&&E&&Zd(O,E))return i=S,_;const N=S.key==null?x:S.key,F=r.get(N);return S.el&&(S=hs(S),_.shapeFlag&128&&(_.ssContent=S)),y=N,F?(S.el=F.el,S.component=F.component,S.transition&&eu(S,S.transition),S.shapeFlag|=512,s.delete(N),s.add(N)):(s.add(N),P&&s.size>parseInt(P,10)&&m(s.values().next().value)),S.shapeFlag|=256,i=S,eE(_.type)?_:S}}},YD=GD;function Zd(e,t){return Me(e)?e.some(n=>Zd(n,t)):tt(e)?e.split(",").includes(t):ER(e)?e.test(t):!1}function uE(e,t){cE(e,"a",t)}function mw(e,t){cE(e,"da",t)}function cE(e,t,n=Bn){const o=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(y0(t,o,n),n){let r=n.parent;for(;r&&r.parent;)Zp(r.parent.vnode)&&ZD(o,t,n,r),r=r.parent}}function ZD(e,t,n,o){const r=y0(t,e,o,!0);ti(()=>{q2(o[t],r)},n)}function Lv(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Rv(e){return e.shapeFlag&128?e.ssContent:e}function y0(e,t,n=Bn,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;Gl();const l=ou(n),a=hr(t,n,e,i);return l(),Yl(),a});return o?r.unshift(s):r.push(s),s}}const Di=e=>(t,n=Bn)=>(!Jp||e==="sp")&&y0(e,(...o)=>t(...o),n),yd=Di("bm"),Ct=Di("m"),dE=Di("bu"),Fi=Di("u"),En=Di("bum"),ti=Di("um"),fE=Di("sp"),pE=Di("rtg"),hE=Di("rtc");function mE(e,t=Bn){y0("ec",e,t)}function nt(e,t,n,o){let r;const s=n&&n[o];if(Me(e)||tt(e)){r=new Array(e.length);for(let i=0,l=e.length;i<l;i++)r[i]=t(e[i],i,void 0,s&&s[i])}else if(typeof e=="number"){r=new Array(e);for(let i=0;i<e;i++)r[i]=t(i+1,i,void 0,s&&s[i])}else if(ft(e))if(e[Symbol.iterator])r=Array.from(e,(i,l)=>t(i,l,void 0,s&&s[l]));else{const i=Object.keys(e);r=new Array(i.length);for(let l=0,a=i.length;l<a;l++){const u=i[l];r[l]=t(e[u],u,l,s&&s[l])}}else r=[];return n&&(n[o]=r),r}function tu(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(Me(o))for(let r=0;r<o.length;r++)e[o[r].name]=o[r].fn;else o&&(e[o.name]=o.key?(...r)=>{const s=o.fn(...r);return s&&(s.key=o.key),s}:o.fn)}return e}function he(e,t,n={},o,r){if(Pn.isCE||Pn.parent&&za(Pn.parent)&&Pn.parent.isCE)return t!=="default"&&(n.name=t),k("slot",n,o&&o());let s=e[t];s&&s._c&&(s._d=!1),C();const i=s&&gE(s(n)),l=q(fe,{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 gE(e){return e.some(t=>yo(t)?!(t.type===Kn||t.type===fe&&!gE(t.children)):!0)?e:null}function vE(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:vc(o)]=e[o];return n}const p_=e=>e?VE(e)?_0(e)||e.proxy:p_(e.parent):null,Pf=Bt(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=>p_(e.parent),$root:e=>p_(e.root),$emit:e=>e.emit,$options:e=>gw(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,h0(e.update)}),$nextTick:e=>e.n||(e.n=ot.bind(e.proxy)),$watch:e=>WD.bind(e)}),Dv=(e,t)=>e!==Wt&&!e.__isScriptSetup&&vt(e,t),h_={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:r,props:s,accessCache:i,type:l,appContext:a}=e;let u;if(t[0]!=="$"){const p=i[t];if(p!==void 0)switch(p){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return s[t]}else{if(Dv(o,t))return i[t]=1,o[t];if(r!==Wt&&vt(r,t))return i[t]=2,r[t];if((u=e.propsOptions[0])&&vt(u,t))return i[t]=3,s[t];if(n!==Wt&&vt(n,t))return i[t]=4,n[t];m_&&(i[t]=0)}}const c=Pf[t];let d,f;if(c)return t==="$attrs"&&Yo(e.attrs,"get",""),c(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==Wt&&vt(n,t))return i[t]=4,n[t];if(f=a.config.globalProperties,vt(f,t))return f[t]},set({_:e},t,n){const{data:o,setupState:r,ctx:s}=e;return Dv(r,t)?(r[t]=n,!0):o!==Wt&&vt(o,t)?(o[t]=n,!0):vt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:s}},i){let l;return!!n[i]||e!==Wt&&vt(e,i)||Dv(t,i)||(l=s[0])&&vt(l,i)||vt(o,i)||vt(Pf,i)||vt(r.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:vt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},JD=Bt({},h_,{get(e,t){if(t!==Symbol.unscopables)return h_.get(e,t,e)},has(e,t){return t[0]!=="_"&&!IR(t)}});function XD(){return null}function QD(){return null}function eF(e){}function tF(e){}function nF(){return null}function oF(){}function rF(e,t){return null}function Kr(){return yE().slots}function _d(){return yE().attrs}function yE(){const e=at();return e.setupContext||(e.setupContext=HE(e))}function yp(e){return Me(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function sF(e,t){const n=yp(e);for(const o in t){if(o.startsWith("__skip"))continue;let r=n[o];r?Me(r)||Xe(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 iF(e,t){return!e||!t?e||t:Me(e)&&Me(t)?e.concat(t):Bt({},yp(e),yp(t))}function lF(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function aF(e){const t=at();let n=e();return C_(),G2(n)&&(n=n.catch(o=>{throw ou(t),o})),[n,()=>ou(t)]}let m_=!0;function uF(e){const t=gw(e),n=e.proxy,o=e.ctx;m_=!1,t.beforeCreate&&c4(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:i,watch:l,provide:a,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:p,updated:h,activated:m,deactivated:y,beforeDestroy:v,beforeUnmount:w,destroyed:_,unmounted:S,render:x,renderTracked:E,renderTriggered:T,errorCaptured:O,serverPrefetch:P,expose:N,inheritAttrs:F,components:B,directives:Y,filters:Z}=t;if(u&&cF(u,o,null),i)for(const V in i){const H=i[V];Xe(H)&&(o[V]=H.bind(n))}if(r){const V=r.call(n,n);ft(V)&&(e.data=Dn(V))}if(m_=!0,s)for(const V in s){const H=s[V],L=Xe(H)?H.bind(n,n):Xe(H.get)?H.get.bind(n,n):yt,I=!Xe(H)&&Xe(H.set)?H.set.bind(n):yt,X=R({get:L,set:I});Object.defineProperty(o,V,{enumerable:!0,configurable:!0,get:()=>X.value,set:oe=>X.value=oe})}if(l)for(const V in l)_E(l[V],o,n,V);if(a){const V=Xe(a)?a.call(n):a;Reflect.ownKeys(V).forEach(H=>{wt(H,V[H])})}c&&c4(c,e,"c");function j(V,H){Me(H)?H.forEach(L=>V(L.bind(n))):H&&V(H.bind(n))}if(j(yd,d),j(Ct,f),j(dE,p),j(Fi,h),j(uE,m),j(mw,y),j(mE,O),j(hE,E),j(pE,T),j(En,w),j(ti,S),j(fE,P),Me(N))if(N.length){const V=e.exposed||(e.exposed={});N.forEach(H=>{Object.defineProperty(V,H,{get:()=>n[H],set:L=>n[H]=L})})}else e.exposed||(e.exposed={});x&&e.render===yt&&(e.render=x),F!=null&&(e.inheritAttrs=F),B&&(e.components=B),Y&&(e.directives=Y)}function cF(e,t,n=yt){Me(e)&&(e=g_(e));for(const o in e){const r=e[o];let s;ft(r)?"default"in r?s=Be(r.from||o,r.default,!0):s=Be(r.from||o):s=Be(r),on(s)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[o]=s}}function c4(e,t,n){hr(Me(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function _E(e,t,n,o){const r=o.includes(".")?iE(n,o):()=>n[o];if(tt(e)){const s=t[e];Xe(s)&&Te(r,s)}else if(Xe(e))Te(r,e.bind(n));else if(ft(e))if(Me(e))e.forEach(s=>_E(s,t,n,o));else{const s=Xe(e.handler)?e.handler.bind(n):t[e.handler];Xe(s)&&Te(r,s,e)}}function gw(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let a;return l?a=l:!r.length&&!n&&!o?a=t:(a={},r.length&&r.forEach(u=>cg(a,u,i,!0)),cg(a,t,i)),ft(t)&&s.set(t,a),a}function cg(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&cg(e,s,n,!0),r&&r.forEach(i=>cg(e,i,n,!0));for(const i in t)if(!(o&&i==="expose")){const l=dF[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const dF={data:d4,props:f4,emits:f4,methods:Jd,computed:Jd,beforeCreate:Co,created:Co,beforeMount:Co,mounted:Co,beforeUpdate:Co,updated:Co,beforeDestroy:Co,beforeUnmount:Co,destroyed:Co,unmounted:Co,activated:Co,deactivated:Co,errorCaptured:Co,serverPrefetch:Co,components:Jd,directives:Jd,watch:pF,provide:d4,inject:fF};function d4(e,t){return t?e?function(){return Bt(Xe(e)?e.call(this,this):e,Xe(t)?t.call(this,this):t)}:t:e}function fF(e,t){return Jd(g_(e),g_(t))}function g_(e){if(Me(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Co(e,t){return e?[...new Set([].concat(e,t))]:t}function Jd(e,t){return e?Bt(Object.create(null),e,t):t}function f4(e,t){return e?Me(e)&&Me(t)?[...new Set([...e,...t])]:Bt(Object.create(null),yp(e),yp(t??{})):t}function pF(e,t){if(!e)return t;if(!t)return e;const n=Bt(Object.create(null),e);for(const o in t)n[o]=Co(e[o],t[o]);return n}function bE(){return{app:null,config:{isNativeTag:Dm,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 hF=0;function mF(e,t){return function(o,r=null){Xe(o)||(o=Bt({},o)),r!=null&&!ft(r)&&(r=null);const s=bE(),i=new WeakSet;let l=!1;const a=s.app={_uid:hF++,_component:o,_props:r,_container:null,_context:s,_instance:null,version:WE,get config(){return s.config},set config(u){},use(u,...c){return i.has(u)||(u&&Xe(u.install)?(i.add(u),u.install(a,...c)):Xe(u)&&(i.add(u),u(a,...c))),a},mixin(u){return s.mixins.includes(u)||s.mixins.push(u),a},component(u,c){return c?(s.components[u]=c,a):s.components[u]},directive(u,c){return c?(s.directives[u]=c,a):s.directives[u]},mount(u,c,d){if(!l){const f=k(o,r);return f.appContext=s,d===!0?d="svg":d===!1&&(d=void 0),c&&t?t(f,u):e(f,u,d),l=!0,a._container=u,u.__vue_app__=a,_0(f.component)||f.component.proxy}},unmount(){l&&(e(null,a._container),delete a._container.__vue_app__)},provide(u,c){return s.provides[u]=c,a},runWithContext(u){const c=kc;kc=a;try{return u()}finally{kc=c}}};return a}}let kc=null;function wt(e,t){if(Bn){let n=Bn.provides;const o=Bn.parent&&Bn.parent.provides;o===n&&(n=Bn.provides=Object.create(o)),n[e]=t}}function Be(e,t,n=!1){const o=Bn||Pn;if(o||kc){const r=o?o.parent==null?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:kc._context.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&Xe(t)?t.call(o&&o.proxy):t}}function gF(){return!!(Bn||Pn||kc)}const wE=Object.create(null),v_=()=>Object.create(wE),CE=e=>Object.getPrototypeOf(e)===wE;function vF(e,t,n,o=!1){const r={},s=v_();e.propsDefaults=Object.create(null),kE(e,t,r,s);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=o?r:ow(r):e.type.props?e.props=r:e.props=s,e.attrs=s}function yF(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,l=Mt(r),[a]=e.propsOptions;let u=!1;if((o||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(m0(e.emitsOptions,f))continue;const p=t[f];if(a)if(vt(s,f))p!==s[f]&&(s[f]=p,u=!0);else{const h=yn(f);r[h]=y_(a,l,h,p,e,!1)}else p!==s[f]&&(s[f]=p,u=!0)}}}else{kE(e,t,r,s)&&(u=!0);let c;for(const d in l)(!t||!vt(t,d)&&((c=zo(d))===d||!vt(t,c)))&&(a?n&&(n[d]!==void 0||n[c]!==void 0)&&(r[d]=y_(a,l,d,void 0,e,!0)):delete r[d]);if(s!==l)for(const d in s)(!t||!vt(t,d))&&(delete s[d],u=!0)}u&&Ei(e.attrs,"set","")}function kE(e,t,n,o){const[r,s]=e.propsOptions;let i=!1,l;if(t)for(let a in t){if(Al(a))continue;const u=t[a];let c;r&&vt(r,c=yn(a))?!s||!s.includes(c)?n[c]=u:(l||(l={}))[c]=u:m0(e.emitsOptions,a)||(!(a in o)||u!==o[a])&&(o[a]=u,i=!0)}if(s){const a=Mt(n),u=l||Wt;for(let c=0;c<s.length;c++){const d=s[c];n[d]=y_(r,a,d,u[d],e,!vt(u,d))}}return i}function y_(e,t,n,o,r,s){const i=e[n];if(i!=null){const l=vt(i,"default");if(l&&o===void 0){const a=i.default;if(i.type!==Function&&!i.skipFactory&&Xe(a)){const{propsDefaults:u}=r;if(n in u)o=u[n];else{const c=ou(r);o=u[n]=a.call(null,t),c()}}else o=a}i[0]&&(s&&!l?o=!1:i[1]&&(o===""||o===zo(n))&&(o=!0))}return o}function SE(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(!Xe(e)){const c=d=>{a=!0;const[f,p]=SE(d,t,!0);Bt(i,f),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!a)return ft(e)&&o.set(e,mc),mc;if(Me(s))for(let c=0;c<s.length;c++){const d=yn(s[c]);p4(d)&&(i[d]=Wt)}else if(s)for(const c in s){const d=yn(c);if(p4(d)){const f=s[c],p=i[d]=Me(f)||Xe(f)?{type:f}:Bt({},f);if(p){const h=g4(Boolean,p.type),m=g4(String,p.type);p[0]=h>-1,p[1]=m<0||h<m,(h>-1||vt(p,"default"))&&l.push(d)}}}const u=[i,l];return ft(e)&&o.set(e,u),u}function p4(e){return e[0]!=="$"&&!Al(e)}function h4(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function m4(e,t){return h4(e)===h4(t)}function g4(e,t){return Me(t)?t.findIndex(n=>m4(n,e)):Xe(t)&&m4(t,e)?0:-1}const $E=e=>e[0]==="_"||e==="$stable",vw=e=>Me(e)?e.map(ur):[ur(e)],_F=(e,t,n)=>{if(t._n)return t;const o=$((...r)=>vw(t(...r)),n);return o._c=!1,o},EE=(e,t,n)=>{const o=e._ctx;for(const r in e){if($E(r))continue;const s=e[r];if(Xe(s))t[r]=_F(r,s,o);else if(s!=null){const i=vw(s);t[r]=()=>i}}},xE=(e,t)=>{const n=vw(t);e.slots.default=()=>n},bF=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Mt(t),w$(e.slots,"_",n)):EE(t,e.slots=v_())}else e.slots=v_(),t&&xE(e,t)},wF=(e,t,n)=>{const{vnode:o,slots:r}=e;let s=!0,i=Wt;if(o.shapeFlag&32){const l=t._;l?n&&l===1?s=!1:(Bt(r,t),!n&&l===1&&delete r._):(s=!t.$stable,EE(t,r)),i=t}else t&&(xE(e,t),i={default:1});if(s)for(const l in r)!$E(l)&&i[l]==null&&delete r[l]};function dg(e,t,n,o,r=!1){if(Me(e)){e.forEach((f,p)=>dg(f,t&&(Me(t)?t[p]:t),n,o,r));return}if(za(o)&&!r)return;const s=o.shapeFlag&4?_0(o.component)||o.component.proxy:o.el,i=r?null:s,{i:l,r:a}=e,u=t&&t.r,c=l.refs===Wt?l.refs={}:l.refs,d=l.setupState;if(u!=null&&u!==a&&(tt(u)?(c[u]=null,vt(d,u)&&(d[u]=null)):on(u)&&(u.value=null)),Xe(a))xi(a,l,12,[i,c]);else{const f=tt(a),p=on(a);if(f||p){const h=()=>{if(e.f){const m=f?vt(d,a)?d[a]:c[a]:a.value;r?Me(m)&&q2(m,s):Me(m)?m.includes(s)||m.push(s):f?(c[a]=[s],vt(d,a)&&(d[a]=c[a])):(a.value=[s],e.k&&(c[e.k]=a.value))}else f?(c[a]=i,vt(d,a)&&(d[a]=i)):p&&(a.value=i,e.k&&(c[e.k]=i))};i?(h.id=-1,Qn(h,n)):h()}}}let Ki=!1;const CF=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",kF=e=>e.namespaceURI.includes("MathML"),Qh=e=>{if(CF(e))return"svg";if(kF(e))return"mathml"},em=e=>e.nodeType===8;function SF(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:s,parentNode:i,remove:l,insert:a,createComment:u}}=e,c=(_,S)=>{if(!S.hasChildNodes()){n(null,_,S),ug(),S._vnode=_;return}Ki=!1,d(S.firstChild,_,null,null,null),ug(),S._vnode=_,Ki&&console.error("Hydration completed but contains mismatches.")},d=(_,S,x,E,T,O=!1)=>{O=O||!!S.dynamicChildren;const P=em(_)&&_.data==="[",N=()=>m(_,S,x,E,T,P),{type:F,ref:B,shapeFlag:Y,patchFlag:Z}=S;let U=_.nodeType;S.el=_,Z===-2&&(O=!1,S.dynamicChildren=null);let j=null;switch(F){case Ai:U!==3?S.children===""?(a(S.el=r(""),i(_),_),j=_):j=N():(_.data!==S.children&&(Ki=!0,_.data=S.children),j=s(_));break;case Kn:w(_)?(j=s(_),v(S.el=_.content.firstChild,_,x)):U!==8||P?j=N():j=s(_);break;case ja:if(P&&(_=s(_),U=_.nodeType),U===1||U===3){j=_;const V=!S.children.length;for(let H=0;H<S.staticCount;H++)V&&(S.children+=j.nodeType===1?j.outerHTML:j.data),H===S.staticCount-1&&(S.anchor=j),j=s(j);return P?s(j):j}else N();break;case fe:P?j=h(_,S,x,E,T,O):j=N();break;default:if(Y&1)(U!==1||S.type.toLowerCase()!==_.tagName.toLowerCase())&&!w(_)?j=N():j=f(_,S,x,E,T,O);else if(Y&6){S.slotScopeIds=T;const V=i(_);if(P?j=y(_):em(_)&&_.data==="teleport start"?j=y(_,_.data,"teleport end"):j=s(_),t(S,V,null,x,E,Qh(V),O),za(S)){let H;P?(H=k(fe),H.anchor=j?j.previousSibling:V.lastChild):H=_.nodeType===3?ne(""):k("div"),H.el=_,S.component.subTree=H}}else Y&64?U!==8?j=N():j=S.type.hydrate(_,S,x,E,T,O,e,p):Y&128&&(j=S.type.hydrate(_,S,x,E,Qh(i(_)),T,O,e,d))}return B!=null&&dg(B,null,E,S),j},f=(_,S,x,E,T,O)=>{O=O||!!S.dynamicChildren;const{type:P,props:N,patchFlag:F,shapeFlag:B,dirs:Y,transition:Z}=S,U=P==="input"||P==="option";if(U||F!==-1){Y&&Ds(S,null,x,"created");let j=!1;if(w(_)){j=IE(E,Z)&&x&&x.vnode.props&&x.vnode.props.appear;const H=_.content.firstChild;j&&Z.beforeEnter(H),v(H,_,x),S.el=_=H}if(B&16&&!(N&&(N.innerHTML||N.textContent))){let H=p(_.firstChild,S,_,x,E,T,O);for(;H;){Ki=!0;const L=H;H=H.nextSibling,l(L)}}else B&8&&_.textContent!==S.children&&(Ki=!0,_.textContent=S.children);if(N)if(U||!O||F&48)for(const H in N)(U&&(H.endsWith("value")||H==="indeterminate")||vu(H)&&!Al(H)||H[0]===".")&&o(_,H,null,N[H],void 0,void 0,x);else N.onClick&&o(_,"onClick",null,N.onClick,void 0,void 0,x);let V;(V=N&&N.onVnodeBeforeMount)&&Vo(V,x,S),Y&&Ds(S,null,x,"beforeMount"),((V=N&&N.onVnodeMounted)||Y||j)&&tE(()=>{V&&Vo(V,x,S),j&&Z.enter(_),Y&&Ds(S,null,x,"mounted")},E)}return _.nextSibling},p=(_,S,x,E,T,O,P)=>{P=P||!!S.dynamicChildren;const N=S.children,F=N.length;for(let B=0;B<F;B++){const Y=P?N[B]:N[B]=ur(N[B]);if(_)_=d(_,Y,E,T,O,P);else{if(Y.type===Ai&&!Y.children)continue;Ki=!0,n(null,Y,x,null,E,T,Qh(x),O)}}return _},h=(_,S,x,E,T,O)=>{const{slotScopeIds:P}=S;P&&(T=T?T.concat(P):P);const N=i(_),F=p(s(_),S,N,x,E,T,O);return F&&em(F)&&F.data==="]"?s(S.anchor=F):(Ki=!0,a(S.anchor=u("]"),N,F),F)},m=(_,S,x,E,T,O)=>{if(Ki=!0,S.el=null,O){const F=y(_);for(;;){const B=s(_);if(B&&B!==F)l(B);else break}}const P=s(_),N=i(_);return l(_),n(null,S,N,P,x,E,Qh(N),T),P},y=(_,S="[",x="]")=>{let E=0;for(;_;)if(_=s(_),_&&em(_)&&(_.data===S&&E++,_.data===x)){if(E===0)return s(_);E--}return _},v=(_,S,x)=>{const E=S.parentNode;E&&E.replaceChild(_,S);let T=x;for(;T;)T.vnode.el===S&&(T.vnode.el=T.subTree.el=_),T=T.parent},w=_=>_.nodeType===1&&_.tagName.toLowerCase()==="template";return[c,d]}const Qn=tE;function ME(e){return OE(e)}function TE(e){return OE(e,SF)}function OE(e,t){const n=C$();n.__VUE__=!0;const{insert:o,remove:r,patchProp:s,createElement:i,createText:l,createComment:a,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:p=yt,insertStaticContent:h}=e,m=(G,J,ue,_e=null,ye=null,Ae=null,Le=void 0,Ee=null,Pe=!!J.dynamicChildren)=>{if(G===J)return;G&&!ss(G,J)&&(_e=ee(G),oe(G,ye,Ae,!0),G=null),J.patchFlag===-2&&(Pe=!1,J.dynamicChildren=null);const{type:me,ref:je,shapeFlag:Ze}=J;switch(me){case Ai:y(G,J,ue,_e);break;case Kn:v(G,J,ue,_e);break;case ja:G==null&&w(J,ue,_e,Le);break;case fe:B(G,J,ue,_e,ye,Ae,Le,Ee,Pe);break;default:Ze&1?x(G,J,ue,_e,ye,Ae,Le,Ee,Pe):Ze&6?Y(G,J,ue,_e,ye,Ae,Le,Ee,Pe):(Ze&64||Ze&128)&&me.process(G,J,ue,_e,ye,Ae,Le,Ee,Pe,le)}je!=null&&ye&&dg(je,G&&G.ref,Ae,J||G,!J)},y=(G,J,ue,_e)=>{if(G==null)o(J.el=l(J.children),ue,_e);else{const ye=J.el=G.el;J.children!==G.children&&u(ye,J.children)}},v=(G,J,ue,_e)=>{G==null?o(J.el=a(J.children||""),ue,_e):J.el=G.el},w=(G,J,ue,_e)=>{[G.el,G.anchor]=h(G.children,J,ue,_e,G.el,G.anchor)},_=({el:G,anchor:J},ue,_e)=>{let ye;for(;G&&G!==J;)ye=f(G),o(G,ue,_e),G=ye;o(J,ue,_e)},S=({el:G,anchor:J})=>{let ue;for(;G&&G!==J;)ue=f(G),r(G),G=ue;r(J)},x=(G,J,ue,_e,ye,Ae,Le,Ee,Pe)=>{J.type==="svg"?Le="svg":J.type==="math"&&(Le="mathml"),G==null?E(J,ue,_e,ye,Ae,Le,Ee,Pe):P(G,J,ye,Ae,Le,Ee,Pe)},E=(G,J,ue,_e,ye,Ae,Le,Ee)=>{let Pe,me;const{props:je,shapeFlag:Ze,transition:ce,dirs:te}=G;if(Pe=G.el=i(G.type,Ae,je&&je.is,je),Ze&8?c(Pe,G.children):Ze&16&&O(G.children,Pe,null,_e,ye,Fv(G,Ae),Le,Ee),te&&Ds(G,null,_e,"created"),T(Pe,G,G.scopeId,Le,_e),je){for(const Ve in je)Ve!=="value"&&!Al(Ve)&&s(Pe,Ve,null,je[Ve],Ae,G.children,_e,ye,xe);"value"in je&&s(Pe,"value",null,je.value,Ae),(me=je.onVnodeBeforeMount)&&Vo(me,_e,G)}te&&Ds(G,null,_e,"beforeMount");const pe=IE(ye,ce);pe&&ce.beforeEnter(Pe),o(Pe,J,ue),((me=je&&je.onVnodeMounted)||pe||te)&&Qn(()=>{me&&Vo(me,_e,G),pe&&ce.enter(Pe),te&&Ds(G,null,_e,"mounted")},ye)},T=(G,J,ue,_e,ye)=>{if(ue&&p(G,ue),_e)for(let Ae=0;Ae<_e.length;Ae++)p(G,_e[Ae]);if(ye){let Ae=ye.subTree;if(J===Ae){const Le=ye.vnode;T(G,Le,Le.scopeId,Le.slotScopeIds,ye.parent)}}},O=(G,J,ue,_e,ye,Ae,Le,Ee,Pe=0)=>{for(let me=Pe;me<G.length;me++){const je=G[me]=Ee?ml(G[me]):ur(G[me]);m(null,je,J,ue,_e,ye,Ae,Le,Ee)}},P=(G,J,ue,_e,ye,Ae,Le)=>{const Ee=J.el=G.el;let{patchFlag:Pe,dynamicChildren:me,dirs:je}=J;Pe|=G.patchFlag&16;const Ze=G.props||Wt,ce=J.props||Wt;let te;if(ue&&aa(ue,!1),(te=ce.onVnodeBeforeUpdate)&&Vo(te,ue,J,G),je&&Ds(J,G,ue,"beforeUpdate"),ue&&aa(ue,!0),me?N(G.dynamicChildren,me,Ee,ue,_e,Fv(J,ye),Ae):Le||H(G,J,Ee,null,ue,_e,Fv(J,ye),Ae,!1),Pe>0){if(Pe&16)F(Ee,J,Ze,ce,ue,_e,ye);else if(Pe&2&&Ze.class!==ce.class&&s(Ee,"class",null,ce.class,ye),Pe&4&&s(Ee,"style",Ze.style,ce.style,ye),Pe&8){const pe=J.dynamicProps;for(let Ve=0;Ve<pe.length;Ve++){const Je=pe[Ve],$e=Ze[Je],ie=ce[Je];(ie!==$e||Je==="value")&&s(Ee,Je,$e,ie,ye,G.children,ue,_e,xe)}}Pe&1&&G.children!==J.children&&c(Ee,J.children)}else!Le&&me==null&&F(Ee,J,Ze,ce,ue,_e,ye);((te=ce.onVnodeUpdated)||je)&&Qn(()=>{te&&Vo(te,ue,J,G),je&&Ds(J,G,ue,"updated")},_e)},N=(G,J,ue,_e,ye,Ae,Le)=>{for(let Ee=0;Ee<J.length;Ee++){const Pe=G[Ee],me=J[Ee],je=Pe.el&&(Pe.type===fe||!ss(Pe,me)||Pe.shapeFlag&70)?d(Pe.el):ue;m(Pe,me,je,null,_e,ye,Ae,Le,!0)}},F=(G,J,ue,_e,ye,Ae,Le)=>{if(ue!==_e){if(ue!==Wt)for(const Ee in ue)!Al(Ee)&&!(Ee in _e)&&s(G,Ee,ue[Ee],null,Le,J.children,ye,Ae,xe);for(const Ee in _e){if(Al(Ee))continue;const Pe=_e[Ee],me=ue[Ee];Pe!==me&&Ee!=="value"&&s(G,Ee,me,Pe,Le,J.children,ye,Ae,xe)}"value"in _e&&s(G,"value",ue.value,_e.value,Le)}},B=(G,J,ue,_e,ye,Ae,Le,Ee,Pe)=>{const me=J.el=G?G.el:l(""),je=J.anchor=G?G.anchor:l("");let{patchFlag:Ze,dynamicChildren:ce,slotScopeIds:te}=J;te&&(Ee=Ee?Ee.concat(te):te),G==null?(o(me,ue,_e),o(je,ue,_e),O(J.children||[],ue,je,ye,Ae,Le,Ee,Pe)):Ze>0&&Ze&64&&ce&&G.dynamicChildren?(N(G.dynamicChildren,ce,ue,ye,Ae,Le,Ee),(J.key!=null||ye&&J===ye.subTree)&&yw(G,J,!0)):H(G,J,ue,je,ye,Ae,Le,Ee,Pe)},Y=(G,J,ue,_e,ye,Ae,Le,Ee,Pe)=>{J.slotScopeIds=Ee,G==null?J.shapeFlag&512?ye.ctx.activate(J,ue,_e,Le,Pe):Z(J,ue,_e,ye,Ae,Le,Pe):U(G,J,Pe)},Z=(G,J,ue,_e,ye,Ae,Le)=>{const Ee=G.component=FE(G,_e,ye);if(Zp(G)&&(Ee.ctx.renderer=le),BE(Ee),Ee.asyncDep){if(ye&&ye.registerDep(Ee,j),!G.el){const Pe=Ee.subTree=k(Kn);v(null,Pe,J,ue)}}else j(Ee,G,J,ue,ye,Ae,Le)},U=(G,J,ue)=>{const _e=J.component=G.component;if(RD(G,J,ue))if(_e.asyncDep&&!_e.asyncResolved){V(_e,J,ue);return}else _e.next=J,TD(_e.update),_e.effect.dirty=!0,_e.update();else J.el=G.el,_e.vnode=J},j=(G,J,ue,_e,ye,Ae,Le)=>{const Ee=()=>{if(G.isMounted){let{next:je,bu:Ze,u:ce,parent:te,vnode:pe}=G;{const we=AE(G);if(we){je&&(je.el=pe.el,V(G,je,Le)),we.asyncDep.then(()=>{G.isUnmounted||Ee()});return}}let Ve=je,Je;aa(G,!1),je?(je.el=pe.el,V(G,je,Le)):je=pe,Ze&&yc(Ze),(Je=je.props&&je.props.onVnodeBeforeUpdate)&&Vo(Je,te,je,pe),aa(G,!0);const $e=Vm(G),ie=G.subTree;G.subTree=$e,m(ie,$e,d(ie.el),ee(ie),G,ye,Ae),je.el=$e.el,Ve===null&&uw(G,$e.el),ce&&Qn(ce,ye),(Je=je.props&&je.props.onVnodeUpdated)&&Qn(()=>Vo(Je,te,je,pe),ye)}else{let je;const{el:Ze,props:ce}=J,{bm:te,m:pe,parent:Ve}=G,Je=za(J);if(aa(G,!1),te&&yc(te),!Je&&(je=ce&&ce.onVnodeBeforeMount)&&Vo(je,Ve,J),aa(G,!0),Ze&&Ge){const $e=()=>{G.subTree=Vm(G),Ge(Ze,G.subTree,G,ye,null)};Je?J.type.__asyncLoader().then(()=>!G.isUnmounted&&$e()):$e()}else{const $e=G.subTree=Vm(G);m(null,$e,ue,_e,G,ye,Ae),J.el=$e.el}if(pe&&Qn(pe,ye),!Je&&(je=ce&&ce.onVnodeMounted)){const $e=J;Qn(()=>Vo(je,Ve,$e),ye)}(J.shapeFlag&256||Ve&&za(Ve.vnode)&&Ve.vnode.shapeFlag&256)&&G.a&&Qn(G.a,ye),G.isMounted=!0,J=ue=_e=null}},Pe=G.effect=new Rc(Ee,yt,()=>h0(me),G.scope),me=G.update=()=>{Pe.dirty&&Pe.run()};me.id=G.uid,aa(G,!0),me()},V=(G,J,ue)=>{J.component=G;const _e=G.vnode.props;G.vnode=J,G.next=null,yF(G,J.props,_e,ue),wF(G,J.children,ue),Gl(),s4(G),Yl()},H=(G,J,ue,_e,ye,Ae,Le,Ee,Pe=!1)=>{const me=G&&G.children,je=G?G.shapeFlag:0,Ze=J.children,{patchFlag:ce,shapeFlag:te}=J;if(ce>0){if(ce&128){I(me,Ze,ue,_e,ye,Ae,Le,Ee,Pe);return}else if(ce&256){L(me,Ze,ue,_e,ye,Ae,Le,Ee,Pe);return}}te&8?(je&16&&xe(me,ye,Ae),Ze!==me&&c(ue,Ze)):je&16?te&16?I(me,Ze,ue,_e,ye,Ae,Le,Ee,Pe):xe(me,ye,Ae,!0):(je&8&&c(ue,""),te&16&&O(Ze,ue,_e,ye,Ae,Le,Ee,Pe))},L=(G,J,ue,_e,ye,Ae,Le,Ee,Pe)=>{G=G||mc,J=J||mc;const me=G.length,je=J.length,Ze=Math.min(me,je);let ce;for(ce=0;ce<Ze;ce++){const te=J[ce]=Pe?ml(J[ce]):ur(J[ce]);m(G[ce],te,ue,null,ye,Ae,Le,Ee,Pe)}me>je?xe(G,ye,Ae,!0,!1,Ze):O(J,ue,_e,ye,Ae,Le,Ee,Pe,Ze)},I=(G,J,ue,_e,ye,Ae,Le,Ee,Pe)=>{let me=0;const je=J.length;let Ze=G.length-1,ce=je-1;for(;me<=Ze&&me<=ce;){const te=G[me],pe=J[me]=Pe?ml(J[me]):ur(J[me]);if(ss(te,pe))m(te,pe,ue,null,ye,Ae,Le,Ee,Pe);else break;me++}for(;me<=Ze&&me<=ce;){const te=G[Ze],pe=J[ce]=Pe?ml(J[ce]):ur(J[ce]);if(ss(te,pe))m(te,pe,ue,null,ye,Ae,Le,Ee,Pe);else break;Ze--,ce--}if(me>Ze){if(me<=ce){const te=ce+1,pe=te<je?J[te].el:_e;for(;me<=ce;)m(null,J[me]=Pe?ml(J[me]):ur(J[me]),ue,pe,ye,Ae,Le,Ee,Pe),me++}}else if(me>ce)for(;me<=Ze;)oe(G[me],ye,Ae,!0),me++;else{const te=me,pe=me,Ve=new Map;for(me=pe;me<=ce;me++){const st=J[me]=Pe?ml(J[me]):ur(J[me]);st.key!=null&&Ve.set(st.key,me)}let Je,$e=0;const ie=ce-pe+1;let we=!1,ae=0;const Se=new Array(ie);for(me=0;me<ie;me++)Se[me]=0;for(me=te;me<=Ze;me++){const st=G[me];if($e>=ie){oe(st,ye,Ae,!0);continue}let se;if(st.key!=null)se=Ve.get(st.key);else for(Je=pe;Je<=ce;Je++)if(Se[Je-pe]===0&&ss(st,J[Je])){se=Je;break}se===void 0?oe(st,ye,Ae,!0):(Se[se-pe]=me+1,se>=ae?ae=se:we=!0,m(st,J[se],ue,null,ye,Ae,Le,Ee,Pe),$e++)}const Fe=we?$F(Se):mc;for(Je=Fe.length-1,me=ie-1;me>=0;me--){const st=pe+me,se=J[st],De=st+1<je?J[st+1].el:_e;Se[me]===0?m(null,se,ue,De,ye,Ae,Le,Ee,Pe):we&&(Je<0||me!==Fe[Je]?X(se,ue,De,2):Je--)}}},X=(G,J,ue,_e,ye=null)=>{const{el:Ae,type:Le,transition:Ee,children:Pe,shapeFlag:me}=G;if(me&6){X(G.component.subTree,J,ue,_e);return}if(me&128){G.suspense.move(J,ue,_e);return}if(me&64){Le.move(G,J,ue,le);return}if(Le===fe){o(Ae,J,ue);for(let Ze=0;Ze<Pe.length;Ze++)X(Pe[Ze],J,ue,_e);o(G.anchor,J,ue);return}if(Le===ja){_(G,J,ue);return}if(_e!==2&&me&1&&Ee)if(_e===0)Ee.beforeEnter(Ae),o(Ae,J,ue),Qn(()=>Ee.enter(Ae),ye);else{const{leave:Ze,delayLeave:ce,afterLeave:te}=Ee,pe=()=>o(Ae,J,ue),Ve=()=>{Ze(Ae,()=>{pe(),te&&te()})};ce?ce(Ae,pe,Ve):Ve()}else o(Ae,J,ue)},oe=(G,J,ue,_e=!1,ye=!1)=>{const{type:Ae,props:Le,ref:Ee,children:Pe,dynamicChildren:me,shapeFlag:je,patchFlag:Ze,dirs:ce}=G;if(Ee!=null&&dg(Ee,null,ue,G,!0),je&256){J.ctx.deactivate(G);return}const te=je&1&&ce,pe=!za(G);let Ve;if(pe&&(Ve=Le&&Le.onVnodeBeforeUnmount)&&Vo(Ve,J,G),je&6)Oe(G.component,ue,_e);else{if(je&128){G.suspense.unmount(ue,_e);return}te&&Ds(G,null,J,"beforeUnmount"),je&64?G.type.remove(G,J,ue,ye,le,_e):me&&(Ae!==fe||Ze>0&&Ze&64)?xe(me,J,ue,!1,!0):(Ae===fe&&Ze&384||!ye&&je&16)&&xe(Pe,J,ue),_e&&z(G)}(pe&&(Ve=Le&&Le.onVnodeUnmounted)||te)&&Qn(()=>{Ve&&Vo(Ve,J,G),te&&Ds(G,null,J,"unmounted")},ue)},z=G=>{const{type:J,el:ue,anchor:_e,transition:ye}=G;if(J===fe){ge(ue,_e);return}if(J===ja){S(G);return}const Ae=()=>{r(ue),ye&&!ye.persisted&&ye.afterLeave&&ye.afterLeave()};if(G.shapeFlag&1&&ye&&!ye.persisted){const{leave:Le,delayLeave:Ee}=ye,Pe=()=>Le(ue,Ae);Ee?Ee(G.el,Ae,Pe):Pe()}else Ae()},ge=(G,J)=>{let ue;for(;G!==J;)ue=f(G),r(G),G=ue;r(J)},Oe=(G,J,ue)=>{const{bum:_e,scope:ye,update:Ae,subTree:Le,um:Ee}=G;_e&&yc(_e),ye.stop(),Ae&&(Ae.active=!1,oe(Le,G,J,ue)),Ee&&Qn(Ee,J),Qn(()=>{G.isUnmounted=!0},J),J&&J.pendingBranch&&!J.isUnmounted&&G.asyncDep&&!G.asyncResolved&&G.suspenseId===J.pendingId&&(J.deps--,J.deps===0&&J.resolve())},xe=(G,J,ue,_e=!1,ye=!1,Ae=0)=>{for(let Le=Ae;Le<G.length;Le++)oe(G[Le],J,ue,_e,ye)},ee=G=>G.shapeFlag&6?ee(G.component.subTree):G.shapeFlag&128?G.suspense.next():f(G.anchor||G.el);let de=!1;const ve=(G,J,ue)=>{G==null?J._vnode&&oe(J._vnode,null,null,!0):m(J._vnode||null,G,J,null,null,null,ue),de||(de=!0,s4(),ug(),de=!1),J._vnode=G},le={p:m,um:oe,m:X,r:z,mt:Z,mc:O,pc:H,pbc:N,n:ee,o:e};let Ie,Ge;return t&&([Ie,Ge]=t(le)),{render:ve,hydrate:Ie,createApp:mF(ve,Ie)}}function Fv({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 aa({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function IE(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function yw(e,t,n=!1){const o=e.children,r=t.children;if(Me(o)&&Me(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]=ml(r[s]),l.el=i.el),n||yw(i,l)),l.type===Ai&&(l.el=i.el)}}function $F(e){const t=e.slice(),n=[0];let o,r,s,i,l;const a=e.length;for(o=0;o<a;o++){const u=e[o];if(u!==0){if(r=n[n.length-1],e[r]<u){t[o]=r,n.push(o);continue}for(s=0,i=n.length-1;s<i;)l=s+i>>1,e[n[l]]<u?s=l+1:i=l;u<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}function AE(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:AE(t)}const EF=e=>e.__isTeleport,Lf=e=>e&&(e.disabled||e.disabled===""),v4=e=>typeof SVGElement<"u"&&e instanceof SVGElement,y4=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,__=(e,t)=>{const n=e&&e.to;return tt(n)?t?t(n):null:n},xF={name:"Teleport",__isTeleport:!0,process(e,t,n,o,r,s,i,l,a,u){const{mc:c,pc:d,pbc:f,o:{insert:p,querySelector:h,createText:m,createComment:y}}=u,v=Lf(t.props);let{shapeFlag:w,children:_,dynamicChildren:S}=t;if(e==null){const x=t.el=m(""),E=t.anchor=m("");p(x,n,o),p(E,n,o);const T=t.target=__(t.props,h),O=t.targetAnchor=m("");T&&(p(O,T),i==="svg"||v4(T)?i="svg":(i==="mathml"||y4(T))&&(i="mathml"));const P=(N,F)=>{w&16&&c(_,N,F,r,s,i,l,a)};v?P(n,E):T&&P(T,O)}else{t.el=e.el;const x=t.anchor=e.anchor,E=t.target=e.target,T=t.targetAnchor=e.targetAnchor,O=Lf(e.props),P=O?n:E,N=O?x:T;if(i==="svg"||v4(E)?i="svg":(i==="mathml"||y4(E))&&(i="mathml"),S?(f(e.dynamicChildren,S,P,r,s,i,l),yw(e,t,!0)):a||d(e,t,P,N,r,s,i,l,!1),v)O?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):tm(t,n,x,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const F=t.target=__(t.props,h);F&&tm(t,F,null,u,0)}else O&&tm(t,E,T,u,1)}NE(t)},remove(e,t,n,o,{um:r,o:{remove:s}},i){const{shapeFlag:l,children:a,anchor:u,targetAnchor:c,target:d,props:f}=e;if(d&&s(c),i&&s(u),l&16){const p=i||!Lf(f);for(let h=0;h<a.length;h++){const m=a[h];r(m,t,n,p,!!m.dynamicChildren)}}},move:tm,hydrate:MF};function tm(e,t,n,{o:{insert:o},m:r},s=2){s===0&&o(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:a,children:u,props:c}=e,d=s===2;if(d&&o(i,t,n),(!d||Lf(c))&&a&16)for(let f=0;f<u.length;f++)r(u[f],t,n,2);d&&o(l,t,n)}function MF(e,t,n,o,r,s,{o:{nextSibling:i,parentNode:l,querySelector:a}},u){const c=t.target=__(t.props,a);if(c){const d=c._lpa||c.firstChild;if(t.shapeFlag&16)if(Lf(t.props))t.anchor=u(i(e),t,l(e),n,o,r,s),t.targetAnchor=d;else{t.anchor=i(e);let f=d;for(;f;)if(f=i(f),f&&f.nodeType===8&&f.data==="teleport anchor"){t.targetAnchor=f,c._lpa=t.targetAnchor&&i(t.targetAnchor);break}u(d,t,c,n,o,r,s)}NE(t)}return t.anchor&&i(t.anchor)}const _s=xF;function NE(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 fe=Symbol.for("v-fgt"),Ai=Symbol.for("v-txt"),Kn=Symbol.for("v-cmt"),ja=Symbol.for("v-stc"),Rf=[];let jo=null;function C(e=!1){Rf.push(jo=e?null:[])}function PE(){Rf.pop(),jo=Rf[Rf.length-1]||null}let nu=1;function b_(e){nu+=e}function LE(e){return e.dynamicChildren=nu>0?jo||mc:null,PE(),nu>0&&jo&&jo.push(e),e}function M(e,t,n,o,r,s){return LE(b(e,t,n,o,r,s,!0))}function q(e,t,n,o,r){return LE(k(e,t,n,o,r,!0))}function yo(e){return e?e.__v_isVNode===!0:!1}function ss(e,t){return e.type===t.type&&e.key===t.key}function TF(e){}const RE=({key:e})=>e??null,Bm=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?tt(e)||on(e)||Xe(e)?{i:Pn,r:e,k:t,f:!!n}:e:null);function b(e,t=null,n=null,o=0,r=null,s=e===fe?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&RE(t),ref:t&&Bm(t),scopeId:g0,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:Pn};return l?(bw(a,n),s&128&&e.normalize(a)):n&&(a.shapeFlag|=tt(n)?8:16),nu>0&&!i&&jo&&(a.patchFlag>0||s&6)&&a.patchFlag!==32&&jo.push(a),a}const k=OF;function OF(e,t=null,n=null,o=0,r=null,s=!1){if((!e||e===Q$)&&(e=Kn),yo(e)){const l=hs(e,t,!0);return n&&bw(l,n),nu>0&&!s&&jo&&(l.shapeFlag&6?jo[jo.indexOf(e)]=l:jo.push(l)),l.patchFlag|=-2,l}if(RF(e)&&(e=e.__vccOpts),t){t=_w(t);let{class:l,style:a}=t;l&&!tt(l)&&(t.class=D(l)),ft(a)&&(rw(a)&&!Me(a)&&(a=Bt({},a)),t.style=Qe(a))}const i=tt(e)?1:eE(e)?128:EF(e)?64:ft(e)?4:Xe(e)?2:0;return b(e,t,n,o,r,i,s,!0)}function _w(e){return e?rw(e)||CE(e)?Bt({},e):e:null}function hs(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:i}=e,l=t?un(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&RE(l),ref:t&&t.ref?n&&r?Me(r)?r.concat(Bm(t)):[r,Bm(t)]:Bm(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!==fe?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&&hs(e.ssContent),ssFallback:e.ssFallback&&hs(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function ne(e=" ",t=0){return k(Ai,null,e,t)}function DE(e,t){const n=k(ja,null,e);return n.staticCount=t,n}function W(e="",t=!1){return t?(C(),q(Kn,null,e)):k(Kn,null,e)}function ur(e){return e==null||typeof e=="boolean"?k(Kn):Me(e)?k(fe,null,e.slice()):typeof e=="object"?ml(e):k(Ai,null,String(e))}function ml(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:hs(e)}function bw(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(Me(t))n=16;else if(typeof t=="object")if(o&65){const r=t.default;r&&(r._c&&(r._d=!1),bw(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!CE(t)?t._ctx=Pn:r===3&&Pn&&(Pn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Xe(t)?(t={default:t,_ctx:Pn},n=32):(t=String(t),o&64?(n=16,t=[ne(t)]):n=8);e.children=t,e.shapeFlag|=n}function un(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const r in o)if(r==="class")t.class!==o.class&&(t.class=D([t.class,o.class]));else if(r==="style")t.style=Qe([t.style,o.style]);else if(vu(r)){const s=t[r],i=o[r];i&&s!==i&&!(Me(s)&&s.includes(i))&&(t[r]=s?[].concat(s,i):i)}else r!==""&&(t[r]=o[r])}return t}function Vo(e,t,n,o=null){hr(e,t,7,[n,o])}const IF=bE();let AF=0;function FE(e,t,n){const o=e.type,r=(t?t.appContext:e.appContext)||IF,s={uid:AF++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new J2(!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:SE(o,r),emitsOptions:Z$(o,r),emit:null,emitted:null,propsDefaults:Wt,inheritAttrs:o.inheritAttrs,ctx:Wt,data:Wt,props:Wt,attrs:Wt,slots:Wt,refs:Wt,setupState:Wt,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx={_:s},s.root=t?t.root:s,s.emit=ID.bind(null,s),e.ce&&e.ce(s),s}let Bn=null;const at=()=>Bn||Pn;let fg,w_;{const e=C$(),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)}};fg=t("__VUE_INSTANCE_SETTERS__",n=>Bn=n),w_=t("__VUE_SSR_SETTERS__",n=>Jp=n)}const ou=e=>{const t=Bn;return fg(e),e.scope.on(),()=>{e.scope.off(),fg(t)}},C_=()=>{Bn&&Bn.scope.off(),fg(null)};function VE(e){return e.vnode.shapeFlag&4}let Jp=!1;function BE(e,t=!1){t&&w_(t);const{props:n,children:o}=e.vnode,r=VE(e);vF(e,n,r,t),bF(e,o);const s=r?NF(e,t):void 0;return t&&w_(!1),s}function NF(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,h_);const{setup:o}=n;if(o){const r=e.setupContext=o.length>1?HE(e):null,s=ou(e);Gl();const i=xi(o,e,0,[e.props,r]);if(Yl(),s(),G2(i)){if(i.then(C_,C_),t)return i.then(l=>{k_(e,l,t)}).catch(l=>{bu(l,e,0)});e.asyncDep=i}else k_(e,i,t)}else jE(e,t)}function k_(e,t,n){Xe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ft(t)&&(e.setupState=lw(t)),jE(e,n)}let pg,S_;function zE(e){pg=e,S_=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,JD))}}const PF=()=>!pg;function jE(e,t,n){const o=e.type;if(!e.render){if(!t&&pg&&!o.render){const r=o.template||gw(e).template;if(r){const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:l,compilerOptions:a}=o,u=Bt(Bt({isCustomElement:s,delimiters:l},i),a);o.render=pg(r,u)}}e.render=o.render||yt,S_&&S_(e)}{const r=ou(e);Gl();try{uF(e)}finally{Yl(),r()}}}const LF={get(e,t){return Yo(e,"get",""),e[t]}};function HE(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,LF),slots:e.slots,emit:e.emit,expose:t}}function _0(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(lw(Ii(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Pf)return Pf[n](e)},has(t,n){return n in t||n in Pf}}))}function $_(e,t=!0){return Xe(e)?e.displayName||e.name:e.name||t&&e.__name}function RF(e){return Xe(e)&&"__vccOpts"in e}const R=(e,t)=>j$(e,t,Jp);function DF(e,t,n=Wt){const o=at(),r=yn(t),s=zo(t),i=U$((a,u)=>{let c;return sE(()=>{const d=e[t];ps(c,d)&&(c=d,u())}),{get(){return a(),n.get?n.get(c):c},set(d){const f=o.vnode.props;!(f&&(t in f||r in f||s in f)&&(`onUpdate:${t}`in f||`onUpdate:${r}`in f||`onUpdate:${s}`in f))&&ps(d,c)&&(c=d,u()),o.emit(`update:${t}`,n.set?n.set(d):d)}}}),l=t==="modelValue"?"modelModifiers":`${t}Modifiers`;return i[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?e[l]||{}:i,done:!1}:{done:!0}}}},i}function lt(e,t,n){const o=arguments.length;return o===2?ft(t)&&!Me(t)?yo(t)?k(e,null,[t]):k(e,t):k(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&yo(n)&&(n=[n]),k(e,t,n))}function FF(){}function VF(e,t,n,o){const r=n[o];if(r&&UE(r,e))return r;const s=t();return s.memo=e.slice(),n[o]=s}function UE(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(ps(n[o],t[o]))return!1;return nu>0&&jo&&jo.push(e),!0}const WE="3.4.23",KE=yt,BF=ED,zF=Uu,jF=Y$,HF={createComponentInstance:FE,setupComponent:BE,renderComponentRoot:Vm,setCurrentRenderingInstance:gp,isVNode:yo,normalizeVNode:ur},UF=HF,WF=null,KF=null,qF=null;/**
14 -* @vue/runtime-dom v3.4.23
13 +**/const aI=[];function XY(t){aI.push(t)}function KY(){aI.pop()}function ZY(t,e){}const JY={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",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",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},QY={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",15:"component update",16:"app unmount cleanup function"};function ap(t,e,n,i){try{return i?t(...i):t()}catch(s){Od(s,e,n)}}function vr(t,e,n,i){if(et(t)){const s=ap(t,e,n,i);return s&&hd(s)&&s.catch(o=>{Od(o,e,n)}),s}if(Ee(t)){const s=[];for(let o=0;o<t.length;o++)s.push(vr(t[o],e,n,i));return s}}function Od(t,e,n,i=!0){const s=e?e.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:r}=e&&e.appContext.config||pn;if(e){let a=e.parent;const l=e.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const u=a.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](t,l,c)===!1)return}a=a.parent}if(o){gl(),ap(o,null,10,[t,l,c]),vl();return}}eq(t,n,s,i,r)}function eq(t,e,n,i=!0,s=!1){if(s)throw t;console.error(t)}const Bi=[];let ya=-1;const tf=[];let lc=null,xh=0;const lI=Promise.resolve();let Ky=null;function ot(t){const e=Ky||lI;return t?e.then(this?t.bind(this):t):e}function tq(t){let e=ya+1,n=Bi.length;for(;e<n;){const i=e+n>>>1,s=Bi[i],o=Tg(s);o<t||o===t&&s.flags&2?e=i+1:n=i}return e}function E6(t){if(!(t.flags&1)){const e=Tg(t),n=Bi[Bi.length-1];!n||!(t.flags&2)&&e>=Tg(n)?Bi.push(t):Bi.splice(tq(e),0,t),t.flags|=1,cI()}}function cI(){Ky||(Ky=lI.then(uI))}function Mg(t){Ee(t)?tf.push(...t):lc&&t.id===-1?lc.splice(xh+1,0,t):t.flags&1||(tf.push(t),t.flags|=1),cI()}function w9(t,e,n=ya+1){for(;n<Bi.length;n++){const i=Bi[n];if(i&&i.flags&2){if(t&&i.id!==t.uid)continue;Bi.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function Zy(t){if(tf.length){const e=[...new Set(tf)].sort((n,i)=>Tg(n)-Tg(i));if(tf.length=0,lc){lc.push(...e);return}for(lc=e,xh=0;xh<lc.length;xh++){const n=lc[xh];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}lc=null,xh=0}}const Tg=t=>t.id==null?t.flags&2?-1:1/0:t.id;function uI(t){const e=Dt;try{for(ya=0;ya<Bi.length;ya++){const n=Bi[ya];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),ap(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;ya<Bi.length;ya++){const n=Bi[ya];n&&(n.flags&=-2)}ya=-1,Bi.length=0,Zy(),Ky=null,(Bi.length||tf.length)&&uI()}}let Sh,Vv=[];function dI(t,e){var n,i;Sh=t,Sh?(Sh.enabled=!0,Vv.forEach(({event:s,args:o})=>Sh.emit(s,...o)),Vv=[]):typeof window<"u"&&window.HTMLElement&&!((i=(n=window.navigator)==null?void 0:n.userAgent)!=null&&i.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{dI(o,e)}),setTimeout(()=>{Sh||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Vv=[])},3e3)):Vv=[]}let ui=null,Sb=null;function Pg(t){const e=ui;return ui=t,Sb=t&&t.type.__scopeId||null,e}function nq(t){Sb=t}function sq(){Sb=null}const iq=t=>y;function y(t,e=ui,n){if(!e||t._n)return t;const i=(...s)=>{i._d&&Og(-1);const o=Pg(e);let r;try{r=t(...s)}finally{Pg(o),i._d&&Og(1)}return r};return i._n=!0,i._c=!0,i._d=!0,i}function Re(t,e){if(ui===null)return t;const n=T1(ui),i=t.dirs||(t.dirs=[]);for(let s=0;s<e.length;s++){let[o,r,a,l=pn]=e[s];o&&(et(o)&&(o={mounted:o,updated:o}),o.deep&&nl(r),i.push({dir:o,instance:n,value:r,oldValue:void 0,arg:a,modifiers:l}))}return t}function ka(t,e,n,i){const s=t.dirs,o=e&&e.dirs;for(let r=0;r<s.length;r++){const a=s[r];o&&(a.oldValue=o[r].value);let l=a.dir[i];l&&(gl(),vr(l,n,8,[t.el,a,t,e]),vl())}}function Pt(t,e){if(ai){let n=ai.provides;const i=ai.parent&&ai.parent.provides;i===n&&(n=ai.provides=Object.create(i)),n[t]=e}}function qe(t,e,n=!1){const i=pt();if(i||Ku){let s=Ku?Ku._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(s&&t in s)return s[t];if(arguments.length>1)return n&&et(e)?e.call(i&&i.proxy):e}}function hI(){return!!(pt()||Ku)}const fI=Symbol.for("v-scx"),pI=()=>qe(fI);function _l(t,e){return E1(t,null,e)}function oq(t,e){return E1(t,null,{flush:"post"})}function mI(t,e){return E1(t,null,{flush:"sync"})}function Te(t,e,n){return E1(t,e,n)}function E1(t,e,n=pn){const{immediate:i,deep:s,flush:o,once:r}=n,a=cn({},n),l=e&&i||!e&&o!=="post";let c;if(Sf){if(o==="sync"){const f=pI();c=f.__watcherHandles||(f.__watcherHandles=[])}else if(!l){const f=()=>{};return f.stop=Dt,f.resume=Dt,f.pause=Dt,f}}const u=ai;a.call=(f,p,m)=>vr(f,u,p,m);let d=!1;o==="post"?a.scheduler=f=>{Es(f,u&&u.suspense)}:o!=="sync"&&(d=!0,a.scheduler=(f,p)=>{p?f():E6(f)}),a.augmentJob=f=>{e&&(f.flags|=4),d&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const h=GY(t,e,a);return Sf&&(c?c.push(h):l&&h()),h}function rq(t,e,n){const i=this.proxy,s=Ke(t)?t.includes(".")?gI(i,t):()=>i[t]:t.bind(i,i);let o;et(e)?o=e:(o=e.handler,n=e);const r=md(this),a=E1(s,o.bind(i),n);return r(),a}function gI(t,e){const n=e.split(".");return()=>{let i=t;for(let s=0;s<n.length&&i;s++)i=i[n[s]];return i}}const vI=Symbol("_vte"),_I=t=>t.__isTeleport,qm=t=>t&&(t.disabled||t.disabled===""),k9=t=>t&&(t.defer||t.defer===""),C9=t=>typeof SVGElement<"u"&&t instanceof SVGElement,x9=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,_k=(t,e)=>{const n=t&&t.to;return Ke(n)?e?e(n):null:n},yI={name:"Teleport",__isTeleport:!0,process(t,e,n,i,s,o,r,a,l,c){const{mc:u,pc:d,pbc:h,o:{insert:f,querySelector:p,createText:m,createComment:b}}=c,w=qm(e.props);let{shapeFlag:k,children:C,dynamicChildren:A}=e;if(t==null){const S=e.el=m(""),M=e.anchor=m("");f(S,n,i),f(M,n,i);const P=(I,L)=>{k&16&&u(C,I,L,s,o,r,a,l)},T=()=>{const I=e.target=_k(e.props,p),L=bI(I,e,m,f);I&&(r!=="svg"&&C9(I)?r="svg":r!=="mathml"&&x9(I)&&(r="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(I),w||(P(I,L),E_(e,!1)))};w&&(P(n,M),E_(e,!0)),k9(e.props)?(e.el.__isMounted=!1,Es(()=>{T(),delete e.el.__isMounted},o)):T()}else{if(k9(e.props)&&t.el.__isMounted===!1){Es(()=>{yI.process(t,e,n,i,s,o,r,a,l,c)},o);return}e.el=t.el,e.targetStart=t.targetStart;const S=e.anchor=t.anchor,M=e.target=t.target,P=e.targetAnchor=t.targetAnchor,T=qm(t.props),I=T?n:M,L=T?S:P;if(r==="svg"||C9(M)?r="svg":(r==="mathml"||x9(M))&&(r="mathml"),A?(h(t.dynamicChildren,A,I,s,o,r,a),B6(t,e,!0)):l||d(t,e,I,L,s,o,r,a,!1),w)T?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):Fv(e,n,S,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const R=e.target=_k(e.props,p);R&&Fv(e,R,null,c,0)}else T&&Fv(e,M,P,c,1);E_(e,w)}},remove(t,e,n,{um:i,o:{remove:s}},o){const{shapeFlag:r,children:a,anchor:l,targetStart:c,targetAnchor:u,target:d,props:h}=t;if(d&&(s(c),s(u)),o&&s(l),r&16){const f=o||!qm(h);for(let p=0;p<a.length;p++){const m=a[p];i(m,e,n,f,!!m.dynamicChildren)}}},move:Fv,hydrate:aq};function Fv(t,e,n,{o:{insert:i},m:s},o=2){o===0&&i(t.targetAnchor,e,n);const{el:r,anchor:a,shapeFlag:l,children:c,props:u}=t,d=o===2;if(d&&i(r,e,n),(!d||qm(u))&&l&16)for(let h=0;h<c.length;h++)s(c[h],e,n,2);d&&i(a,e,n)}function aq(t,e,n,i,s,o,{o:{nextSibling:r,parentNode:a,querySelector:l,insert:c,createText:u}},d){function h(m,b,w,k){b.anchor=d(r(m),b,a(m),n,i,s,o),b.targetStart=w,b.targetAnchor=k}const f=e.target=_k(e.props,l),p=qm(e.props);if(f){const m=f._lpa||f.firstChild;if(e.shapeFlag&16)if(p)h(t,e,m,m&&r(m));else{e.anchor=r(t);let b=m;for(;b;){if(b&&b.nodeType===8){if(b.data==="teleport start anchor")e.targetStart=b;else if(b.data==="teleport anchor"){e.targetAnchor=b,f._lpa=e.targetAnchor&&r(e.targetAnchor);break}}b=r(b)}e.targetAnchor||bI(f,e,u,c),d(m&&r(m),e,f,n,i,s,o)}E_(e,p)}else p&&e.shapeFlag&16&&h(t,e,t,r(t));return e.anchor&&r(e.anchor)}const na=yI;function E_(t,e){const n=t.ctx;if(n&&n.ut){let i,s;for(e?(i=t.el,s=t.anchor):(i=t.targetStart,s=t.targetAnchor);i&&i!==s;)i.nodeType===1&&i.setAttribute("data-v-owner",n.uid),i=i.nextSibling;n.ut()}}function bI(t,e,n,i){const s=e.targetStart=n(""),o=e.targetAnchor=n("");return s[vI]=o,t&&(i(s,t),i(o,t)),o}const Ja=Symbol("_leaveCb"),Nv=Symbol("_enterCb");function M6(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Nt(()=>{t.isMounted=!0}),wn(()=>{t.isUnmounting=!0}),t}const Zo=[Function,Array],T6={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Zo,onEnter:Zo,onAfterEnter:Zo,onEnterCancelled:Zo,onBeforeLeave:Zo,onLeave:Zo,onAfterLeave:Zo,onLeaveCancelled:Zo,onBeforeAppear:Zo,onAppear:Zo,onAfterAppear:Zo,onAppearCancelled:Zo},wI=t=>{const e=t.subTree;return e.component?wI(e.component):e},lq={name:"BaseTransition",props:T6,setup(t,{slots:e}){const n=pt(),i=M6();return()=>{const s=e.default&&$b(e.default(),!0);if(!s||!s.length)return;const o=kI(s),r=an(t),{mode:a}=r;if(i.isLeaving)return dw(o);const l=S9(o);if(!l)return dw(o);let c=xf(l,r,i,n,d=>c=d);l.type!==Zn&&yl(l,c);let u=n.subTree&&S9(n.subTree);if(u&&u.type!==Zn&&!Or(u,l)&&wI(n).type!==Zn){let d=xf(u,r,i,n);if(yl(u,d),a==="out-in"&&l.type!==Zn)return i.isLeaving=!0,d.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},dw(o);a==="in-out"&&l.type!==Zn?d.delayLeave=(h,f,p)=>{const m=xI(i,u);m[String(u.key)]=u,h[Ja]=()=>{f(),h[Ja]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{p(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function kI(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==Zn){e=n;break}}return e}const CI=lq;function xI(t,e){const{leavingVNodes:n}=t;let i=n.get(e.type);return i||(i=Object.create(null),n.set(e.type,i)),i}function xf(t,e,n,i,s){const{appear:o,mode:r,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:f,onAfterLeave:p,onLeaveCancelled:m,onBeforeAppear:b,onAppear:w,onAfterAppear:k,onAppearCancelled:C}=e,A=String(t.key),S=xI(n,t),M=(I,L)=>{I&&vr(I,i,9,L)},P=(I,L)=>{const R=L[1];M(I,L),Ee(I)?I.every(V=>V.length<=1)&&R():I.length<=1&&R()},T={mode:r,persisted:a,beforeEnter(I){let L=l;if(!n.isMounted)if(o)L=b||l;else return;I[Ja]&&I[Ja](!0);const R=S[A];R&&Or(t,R)&&R.el[Ja]&&R.el[Ja](),M(L,[I])},enter(I){let L=c,R=u,V=d;if(!n.isMounted)if(o)L=w||c,R=k||u,V=C||d;else return;let H=!1;const F=I[Nv]=U=>{H||(H=!0,U?M(V,[I]):M(R,[I]),T.delayedLeave&&T.delayedLeave(),I[Nv]=void 0)};L?P(L,[I,F]):F()},leave(I,L){const R=String(t.key);if(I[Nv]&&I[Nv](!0),n.isUnmounting)return L();M(h,[I]);let V=!1;const H=I[Ja]=F=>{V||(V=!0,L(),F?M(m,[I]):M(p,[I]),I[Ja]=void 0,S[R]===t&&delete S[R])};S[R]=t,f?P(f,[I,H]):H()},clone(I){const L=xf(I,e,n,i,s);return s&&s(L),L}};return T}function dw(t){if(M1(t))return t=_r(t),t.children=null,t}function S9(t){if(!M1(t))return _I(t.type)&&t.children?kI(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&et(n.default))return n.default()}}function yl(t,e){t.shapeFlag&6&&t.component?(t.transition=e,yl(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function $b(t,e=!1,n){let i=[],s=0;for(let o=0;o<t.length;o++){let r=t[o];const a=n==null?r.key:String(n)+String(r.key!=null?r.key:o);r.type===J?(r.patchFlag&128&&s++,i=i.concat($b(r.children,e,a))):(e||r.type!==Zn)&&i.push(a!=null?_r(r,{key:a}):r)}if(s>1)for(let o=0;o<i.length;o++)i[o].patchFlag=-2;return i}function fe(t,e){return et(t)?(()=>cn({name:t.name},e,{setup:t}))():t}function cq(){const t=pt();return t?(t.appContext.config.idPrefix||"v")+"-"+t.ids[0]+t.ids[1]++:""}function P6(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function uq(t){const e=pt(),n=Fn(null);if(e){const s=e.refs===pn?e.refs={}:e.refs;Object.defineProperty(s,t,{enumerable:!0,get:()=>n.value,set:o=>n.value=o})}return n}const Jy=new WeakMap;function nf(t,e,n,i,s=!1){if(Ee(t)){t.forEach((p,m)=>nf(p,e&&(Ee(e)?e[m]:e),n,i,s));return}if(dl(i)&&!s){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&nf(t,e,n,i.component.subTree);return}const o=i.shapeFlag&4?T1(i.component):i.el,r=s?null:o,{i:a,r:l}=t,c=e&&e.r,u=a.refs===pn?a.refs={}:a.refs,d=a.setupState,h=an(d),f=d===pn?qh:p=>zt(h,p);if(c!=null&&c!==l){if($9(e),Ke(c))u[c]=null,f(c)&&(d[c]=null);else if(hn(c)){c.value=null;const p=e;p.k&&(u[p.k]=null)}}if(et(l))ap(l,a,12,[r,u]);else{const p=Ke(l),m=hn(l);if(p||m){const b=()=>{if(t.f){const w=p?f(l)?d[l]:u[l]:l.value;if(s)Ee(w)&&w6(w,o);else if(Ee(w))w.includes(o)||w.push(o);else if(p)u[l]=[o],f(l)&&(d[l]=u[l]);else{const k=[o];l.value=k,t.k&&(u[t.k]=k)}}else p?(u[l]=r,f(l)&&(d[l]=r)):m&&(l.value=r,t.k&&(u[t.k]=r))};if(r){const w=()=>{b(),Jy.delete(t)};w.id=-1,Jy.set(t,w),Es(w,n)}else $9(t),b()}}}function $9(t){const e=Jy.get(t);e&&(e.flags|=8,Jy.delete(t))}let A9=!1;const ih=()=>{A9||(console.error("Hydration completed but contains mismatches."),A9=!0)},dq=t=>t.namespaceURI.includes("svg")&&t.tagName!=="foreignObject",hq=t=>t.namespaceURI.includes("MathML"),Bv=t=>{if(t.nodeType===1){if(dq(t))return"svg";if(hq(t))return"mathml"}},Gh=t=>t.nodeType===8;function fq(t){const{mt:e,p:n,o:{patchProp:i,createText:s,nextSibling:o,parentNode:r,remove:a,insert:l,createComment:c}}=t,u=(C,A)=>{if(!A.hasChildNodes()){n(null,C,A),Zy(),A._vnode=C;return}d(A.firstChild,C,null,null,null),Zy(),A._vnode=C},d=(C,A,S,M,P,T=!1)=>{T=T||!!A.dynamicChildren;const I=Gh(C)&&C.data==="[",L=()=>m(C,A,S,M,P,I),{type:R,ref:V,shapeFlag:H,patchFlag:F}=A;let U=C.nodeType;A.el=C,F===-2&&(T=!1,A.dynamicChildren=null);let Y=null;switch(R){case $a:U!==3?A.children===""?(l(A.el=s(""),r(C),C),Y=C):Y=L():(C.data!==A.children&&(ih(),C.data=A.children),Y=o(C));break;case Zn:k(C)?(Y=o(C),w(A.el=C.content.firstChild,C,S)):U!==8||I?Y=L():Y=o(C);break;case Zu:if(I&&(C=o(C),U=C.nodeType),U===1||U===3){Y=C;const z=!A.children.length;for(let X=0;X<A.staticCount;X++)z&&(A.children+=Y.nodeType===1?Y.outerHTML:Y.data),X===A.staticCount-1&&(A.anchor=Y),Y=o(Y);return I?o(Y):Y}else L();break;case J:I?Y=p(C,A,S,M,P,T):Y=L();break;default:if(H&1)(U!==1||A.type.toLowerCase()!==C.tagName.toLowerCase())&&!k(C)?Y=L():Y=h(C,A,S,M,P,T);else if(H&6){A.slotScopeIds=P;const z=r(C);if(I?Y=b(C):Gh(C)&&C.data==="teleport start"?Y=b(C,C.data,"teleport end"):Y=o(C),e(A,z,null,S,M,Bv(z),T),dl(A)&&!A.type.__asyncResolved){let X;I?(X=_(J),X.anchor=Y?Y.previousSibling:z.lastChild):X=C.nodeType===3?N(""):_("div"),X.el=C,A.component.subTree=X}}else H&64?U!==8?Y=L():Y=A.type.hydrate(C,A,S,M,P,T,t,f):H&128&&(Y=A.type.hydrate(C,A,S,M,Bv(r(C)),P,T,t,d))}return V!=null&&nf(V,null,M,A),Y},h=(C,A,S,M,P,T)=>{T=T||!!A.dynamicChildren;const{type:I,props:L,patchFlag:R,shapeFlag:V,dirs:H,transition:F}=A,U=I==="input"||I==="option";if(U||R!==-1){H&&ka(A,null,S,"created");let Y=!1;if(k(C)){Y=qI(null,F)&&S&&S.vnode.props&&S.vnode.props.appear;const X=C.content.firstChild;if(Y){const Z=X.getAttribute("class");Z&&(X.$cls=Z),F.beforeEnter(X)}w(X,C,S),A.el=C=X}if(V&16&&!(L&&(L.innerHTML||L.textContent))){let X=f(C.firstChild,A,C,S,M,P,T);for(;X;){zv(C,1)||ih();const Z=X;X=X.nextSibling,a(Z)}}else if(V&8){let X=A.children;X[0]===`
14 +`&&(C.tagName==="PRE"||C.tagName==="TEXTAREA")&&(X=X.slice(1));const{textContent:Z}=C;Z!==X&&Z!==X.replace(/\r\n|\r/g,`
15 +`)&&(zv(C,0)||ih(),C.textContent=A.children)}if(L){if(U||!T||R&48){const X=C.tagName.includes("-");for(const Z in L)(U&&(Z.endsWith("value")||Z==="indeterminate")||Id(Z)&&!ul(Z)||Z[0]==="."||X&&!ul(Z))&&i(C,Z,null,L[Z],void 0,S)}else if(L.onClick)i(C,"onClick",null,L.onClick,void 0,S);else if(R&4&&Br(L.style))for(const X in L.style)L.style[X]}let z;(z=L&&L.onVnodeBeforeMount)&&oo(z,S,A),H&&ka(A,null,S,"beforeMount"),((z=L&&L.onVnodeMounted)||H||Y)&&ZI(()=>{z&&oo(z,S,A),Y&&F.enter(C),H&&ka(A,null,S,"mounted")},M)}return C.nextSibling},f=(C,A,S,M,P,T,I)=>{I=I||!!A.dynamicChildren;const L=A.children,R=L.length;for(let V=0;V<R;V++){const H=I?L[V]:L[V]=ro(L[V]),F=H.type===$a;C?(F&&!I&&V+1<R&&ro(L[V+1]).type===$a&&(l(s(C.data.slice(H.children.length)),S,o(C)),C.data=H.children),C=d(C,H,M,P,T,I)):F&&!H.children?l(H.el=s(""),S):(zv(S,1)||ih(),n(null,H,S,null,M,P,Bv(S),T))}return C},p=(C,A,S,M,P,T)=>{const{slotScopeIds:I}=A;I&&(P=P?P.concat(I):I);const L=r(C),R=f(o(C),A,L,S,M,P,T);return R&&Gh(R)&&R.data==="]"?o(A.anchor=R):(ih(),l(A.anchor=c("]"),L,R),R)},m=(C,A,S,M,P,T)=>{if(zv(C.parentElement,1)||ih(),A.el=null,T){const R=b(C);for(;;){const V=o(C);if(V&&V!==R)a(V);else break}}const I=o(C),L=r(C);return a(C),n(null,A,L,I,S,M,Bv(L),P),S&&(S.vnode.el=A.el,Pb(S,A.el)),I},b=(C,A="[",S="]")=>{let M=0;for(;C;)if(C=o(C),C&&Gh(C)&&(C.data===A&&M++,C.data===S)){if(M===0)return o(C);M--}return C},w=(C,A,S)=>{const M=A.parentNode;M&&M.replaceChild(C,A);let P=S;for(;P;)P.vnode.el===A&&(P.vnode.el=P.subTree.el=C),P=P.parent},k=C=>C.nodeType===1&&C.tagName==="TEMPLATE";return[u,d]}const E9="data-allow-mismatch",pq={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function zv(t,e){if(e===0||e===1)for(;t&&!t.hasAttribute(E9);)t=t.parentElement;const n=t&&t.getAttribute(E9);if(n==null)return!1;if(n==="")return!0;{const i=n.split(",");return e===0&&i.includes("children")?!0:i.includes(pq[e])}}const mq=gb().requestIdleCallback||(t=>setTimeout(t,1)),gq=gb().cancelIdleCallback||(t=>clearTimeout(t)),vq=(t=1e4)=>e=>{const n=mq(e,{timeout:t});return()=>gq(n)};function _q(t){const{top:e,left:n,bottom:i,right:s}=t.getBoundingClientRect(),{innerHeight:o,innerWidth:r}=window;return(e>0&&e<o||i>0&&i<o)&&(n>0&&n<r||s>0&&s<r)}const yq=t=>(e,n)=>{const i=new IntersectionObserver(s=>{for(const o of s)if(o.isIntersecting){i.disconnect(),e();break}},t);return n(s=>{if(s instanceof Element){if(_q(s))return e(),i.disconnect(),!1;i.observe(s)}}),()=>i.disconnect()},bq=t=>e=>{if(t){const n=matchMedia(t);if(n.matches)e();else return n.addEventListener("change",e,{once:!0}),()=>n.removeEventListener("change",e)}},wq=(t=[])=>(e,n)=>{Ke(t)&&(t=[t]);let i=!1;const s=r=>{i||(i=!0,o(),e(),r.target.dispatchEvent(new r.constructor(r.type,r)))},o=()=>{n(r=>{for(const a of t)r.removeEventListener(a,s)})};return n(r=>{for(const a of t)r.addEventListener(a,s,{once:!0})}),o};function kq(t,e){if(Gh(t)&&t.data==="["){let n=1,i=t.nextSibling;for(;i;){if(i.nodeType===1){if(e(i)===!1)break}else if(Gh(i))if(i.data==="]"){if(--n===0)break}else i.data==="["&&n++;i=i.nextSibling}}else e(t)}const dl=t=>!!t.type.__asyncLoader;function Cq(t){et(t)&&(t={loader:t});const{loader:e,loadingComponent:n,errorComponent:i,delay:s=200,hydrate:o,timeout:r,suspensible:a=!0,onError:l}=t;let c=null,u,d=0;const h=()=>(d++,c=null,f()),f=()=>{let p;return c||(p=c=e().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),l)return new Promise((b,w)=>{l(m,()=>b(h()),()=>w(m),d+1)});throw m}).then(m=>p!==c&&c?c:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),u=m,m)))};return fe({name:"AsyncComponentWrapper",__asyncLoader:f,__asyncHydrate(p,m,b){let w=!1;(m.bu||(m.bu=[])).push(()=>w=!0);const k=()=>{w||b()},C=o?()=>{const A=o(k,S=>kq(p,S));A&&(m.bum||(m.bum=[])).push(A)}:k;u?C():f().then(()=>!m.isUnmounted&&C())},get __asyncResolved(){return u},setup(){const p=ai;if(P6(p),u)return()=>Hv(u,p);const m=C=>{c=null,Od(C,p,13,!i)};if(a&&p.suspense||Sf)return f().then(C=>()=>Hv(C,p)).catch(C=>(m(C),()=>i?_(i,{error:C}):null));const b=ee(!1),w=ee(),k=ee(!!s);return s&&setTimeout(()=>{k.value=!1},s),r!=null&&setTimeout(()=>{if(!b.value&&!w.value){const C=new Error(`Async component timed out after ${r}ms.`);m(C),w.value=C}},r),f().then(()=>{b.value=!0,p.parent&&M1(p.parent.vnode)&&p.parent.update()}).catch(C=>{m(C),w.value=C}),()=>{if(b.value&&u)return Hv(u,p);if(w.value&&i)return _(i,{error:w.value});if(n&&!k.value)return Hv(n,p)}}})}function Hv(t,e){const{ref:n,props:i,children:s,ce:o}=e.vnode,r=_(t,i,s);return r.ref=n,r.ce=o,delete e.vnode.ce,r}const M1=t=>t.type.__isKeepAlive,xq={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(t,{slots:e}){const n=pt(),i=n.ctx;if(!i.renderer)return()=>{const k=e.default&&e.default();return k&&k.length===1?k[0]:k};const s=new Map,o=new Set;let r=null;const a=n.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:d}}}=i,h=d("div");i.activate=(k,C,A,S,M)=>{const P=k.component;c(k,C,A,0,a),l(P.vnode,k,C,A,P,a,S,k.slotScopeIds,M),Es(()=>{P.isDeactivated=!1,P.a&&Qh(P.a);const T=k.props&&k.props.onVnodeMounted;T&&oo(T,P.parent,k)},a)},i.deactivate=k=>{const C=k.component;e0(C.m),e0(C.a),c(k,h,null,1,a),Es(()=>{C.da&&Qh(C.da);const A=k.props&&k.props.onVnodeUnmounted;A&&oo(A,C.parent,k),C.isDeactivated=!0},a)};function f(k){hw(k),u(k,n,a,!0)}function p(k){s.forEach((C,A)=>{const S=Mk(dl(C)?C.type.__asyncResolved||{}:C.type);S&&!k(S)&&m(A)})}function m(k){const C=s.get(k);C&&(!r||!Or(C,r))?f(C):r&&hw(r),s.delete(k),o.delete(k)}Te(()=>[t.include,t.exclude],([k,C])=>{k&&p(A=>im(k,A)),C&&p(A=>!im(C,A))},{flush:"post",deep:!0});let b=null;const w=()=>{b!=null&&(t0(n.subTree.type)?Es(()=>{s.set(b,Uv(n.subTree))},n.subTree.suspense):s.set(b,Uv(n.subTree)))};return Nt(w),xl(w),wn(()=>{s.forEach(k=>{const{subTree:C,suspense:A}=n,S=Uv(C);if(k.type===S.type&&k.key===S.key){hw(S);const M=S.component.da;M&&Es(M,A);return}f(k)})}),()=>{if(b=null,!e.default)return r=null;const k=e.default(),C=k[0];if(k.length>1)return r=null,k;if(!is(C)||!(C.shapeFlag&4)&&!(C.shapeFlag&128))return r=null,C;let A=Uv(C);if(A.type===Zn)return r=null,A;const S=A.type,M=Mk(dl(A)?A.type.__asyncResolved||{}:S),{include:P,exclude:T,max:I}=t;if(P&&(!M||!im(P,M))||T&&M&&im(T,M))return A.shapeFlag&=-257,r=A,C;const L=A.key==null?S:A.key,R=s.get(L);return A.el&&(A=_r(A),C.shapeFlag&128&&(C.ssContent=A)),b=L,R?(A.el=R.el,A.component=R.component,A.transition&&yl(A,A.transition),A.shapeFlag|=512,o.delete(L),o.add(L)):(o.add(L),I&&o.size>parseInt(I,10)&&m(o.values().next().value)),A.shapeFlag|=256,r=A,t0(C.type)?C:A}}},Sq=xq;function im(t,e){return Ee(t)?t.some(n=>im(n,e)):Ke(t)?t.split(",").includes(e):qW(t)?(t.lastIndex=0,t.test(e)):!1}function I6(t,e){SI(t,"a",e)}function L6(t,e){SI(t,"da",e)}function SI(t,e,n=ai){const i=t.__wdc||(t.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(Ab(e,i,n),n){let s=n.parent;for(;s&&s.parent;)M1(s.parent.vnode)&&$q(i,e,n,s),s=s.parent}}function $q(t,e,n,i){const s=Ab(e,t,i,!0);Sl(()=>{w6(i[e],s)},n)}function hw(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function Uv(t){return t.shapeFlag&128?t.ssContent:t}function Ab(t,e,n=ai,i=!1){if(n){const s=n[t]||(n[t]=[]),o=e.__weh||(e.__weh=(...r)=>{gl();const a=md(n),l=vr(e,n,t,r);return a(),vl(),l});return i?s.unshift(o):s.push(o),o}}const Cl=t=>(e,n=ai)=>{(!Sf||t==="sp")&&Ab(t,(...i)=>e(...i),n)},Dd=Cl("bm"),Nt=Cl("m"),Eb=Cl("bu"),xl=Cl("u"),wn=Cl("bum"),Sl=Cl("um"),$I=Cl("sp"),AI=Cl("rtg"),EI=Cl("rtc");function MI(t,e=ai){Ab("ec",t,e)}const O6="components",Aq="directives";function B(t,e){return D6(O6,t,!0,e)||t}const TI=Symbol.for("v-ndc");function Ct(t){return Ke(t)?D6(O6,t,!1)||t:t||TI}function xt(t){return D6(Aq,t)}function D6(t,e,n=!0,i=!1){const s=ui||ai;if(s){const o=s.type;if(t===O6){const a=Mk(o,!1);if(a&&(a===e||a===Un(e)||a===Gc(Un(e))))return o}const r=M9(s[t]||o[t],e)||M9(s.appContext[t],e);return!r&&i?o:r}}function M9(t,e){return t&&(t[e]||t[Un(e)]||t[Gc(Un(e))])}function ye(t,e,n,i){let s;const o=n&&n[i],r=Ee(t);if(r||Ke(t)){const a=r&&Br(t);let l=!1,c=!1;a&&(l=!uo(t),c=Ma(t),t=kb(t)),s=new Array(t.length);for(let u=0,d=t.length;u<d;u++)s[u]=e(l?c?Cf(Kr(t[u])):Kr(t[u]):t[u],u,void 0,o&&o[u])}else if(typeof t=="number"){s=new Array(t);for(let a=0;a<t;a++)s[a]=e(a+1,a,void 0,o&&o[a])}else if(yt(t))if(t[Symbol.iterator])s=Array.from(t,(a,l)=>e(a,l,void 0,o&&o[l]));else{const a=Object.keys(t);s=new Array(a.length);for(let l=0,c=a.length;l<c;l++){const u=a[l];s[l]=e(t[u],u,l,o&&o[l])}}else s=[];return n&&(n[i]=s),s}function hs(t,e){for(let n=0;n<e.length;n++){const i=e[n];if(Ee(i))for(let s=0;s<i.length;s++)t[i[s].name]=i[s].fn;else i&&(t[i.name]=i.key?(...s)=>{const o=i.fn(...s);return o&&(o.key=i.key),o}:i.fn)}return t}function le(t,e,n={},i,s){if(ui.ce||ui.parent&&dl(ui.parent)&&ui.parent.ce){const c=Object.keys(n).length>0;return e!=="default"&&(n.name=e),v(),D(J,null,[_("slot",n,i&&i())],c?-2:64)}let o=t[e];o&&o._c&&(o._d=!1),v();const r=o&&R6(o(n)),a=n.key||r&&r.key,l=D(J,{key:(a&&!mo(a)?a:`_${e}`)+(!r&&i?"_fb":"")},r||(i?i():[]),r&&t._===1?64:-2);return!s&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),o&&o._c&&(o._d=!0),l}function R6(t){return t.some(e=>is(e)?!(e.type===Zn||e.type===J&&!R6(e.children)):!0)?t:null}function Mb(t,e){const n={};for(const i in t)n[e&&/[A-Z]/.test(i)?`on:${i}`:Gu(i)]=t[i];return n}const yk=t=>t?nL(t)?T1(t):yk(t.parent):null,Gm=cn(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>yk(t.parent),$root:t=>yk(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>V6(t),$forceUpdate:t=>t.f||(t.f=()=>{E6(t.update)}),$nextTick:t=>t.n||(t.n=ot.bind(t.proxy)),$watch:t=>rq.bind(t)}),fw=(t,e)=>t!==pn&&!t.__isScriptSetup&&zt(t,e),bk={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:i,data:s,props:o,accessCache:r,type:a,appContext:l}=t;if(e[0]!=="$"){const h=r[e];if(h!==void 0)switch(h){case 1:return i[e];case 2:return s[e];case 4:return n[e];case 3:return o[e]}else{if(fw(i,e))return r[e]=1,i[e];if(s!==pn&&zt(s,e))return r[e]=2,s[e];if(zt(o,e))return r[e]=3,o[e];if(n!==pn&&zt(n,e))return r[e]=4,n[e];wk&&(r[e]=0)}}const c=Gm[e];let u,d;if(c)return e==="$attrs"&&Ai(t.attrs,"get",""),c(t);if((u=a.__cssModules)&&(u=u[e]))return u;if(n!==pn&&zt(n,e))return r[e]=4,n[e];if(d=l.config.globalProperties,zt(d,e))return d[e]},set({_:t},e,n){const{data:i,setupState:s,ctx:o}=t;return fw(s,e)?(s[e]=n,!0):i!==pn&&zt(i,e)?(i[e]=n,!0):zt(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(o[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:i,appContext:s,props:o,type:r}},a){let l;return!!(n[a]||t!==pn&&a[0]!=="$"&&zt(t,a)||fw(e,a)||zt(o,a)||zt(i,a)||zt(Gm,a)||zt(s.config.globalProperties,a)||(l=r.__cssModules)&&l[a])},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:zt(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}},Eq=cn({},bk,{get(t,e){if(e!==Symbol.unscopables)return bk.get(t,e,t)},has(t,e){return e[0]!=="_"&&!eY(e)}});function Mq(){return null}function Tq(){return null}function Pq(t){}function Iq(t){}function Lq(){return null}function Oq(){}function Dq(t,e){return null}function gi(){return PI().slots}function Rd(){return PI().attrs}function PI(t){const e=pt();return e.setupContext||(e.setupContext=rL(e))}function Ig(t){return Ee(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function Rq(t,e){const n=Ig(t);for(const i in e){if(i.startsWith("__skip"))continue;let s=n[i];s?Ee(s)||et(s)?s=n[i]={type:s,default:e[i]}:s.default=e[i]:s===null&&(s=n[i]={default:e[i]}),s&&e[`__skip_${i}`]&&(s.skipFactory=!0)}return n}function Vq(t,e){return!t||!e?t||e:Ee(t)&&Ee(e)?t.concat(e):cn({},Ig(t),Ig(e))}function Fq(t,e){const n={};for(const i in t)e.includes(i)||Object.defineProperty(n,i,{enumerable:!0,get:()=>t[i]});return n}function Nq(t){const e=pt();let n=t();return $k(),hd(n)&&(n=n.catch(i=>{throw md(e),i})),[n,()=>md(e)]}let wk=!0;function Bq(t){const e=V6(t),n=t.proxy,i=t.ctx;wk=!1,e.beforeCreate&&T9(e.beforeCreate,t,"bc");const{data:s,computed:o,methods:r,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:h,beforeUpdate:f,updated:p,activated:m,deactivated:b,beforeDestroy:w,beforeUnmount:k,destroyed:C,unmounted:A,render:S,renderTracked:M,renderTriggered:P,errorCaptured:T,serverPrefetch:I,expose:L,inheritAttrs:R,components:V,directives:H,filters:F}=e;if(c&&zq(c,i,null),r)for(const z in r){const X=r[z];et(X)&&(i[z]=X.bind(n))}if(s){const z=s.call(n,n);yt(z)&&(t.data=In(z))}if(wk=!0,o)for(const z in o){const X=o[z],Z=et(X)?X.bind(n,n):et(X.get)?X.get.bind(n,n):Dt,G=!et(X)&&et(X.set)?X.set.bind(n):Dt,Q=W({get:Z,set:G});Object.defineProperty(i,z,{enumerable:!0,configurable:!0,get:()=>Q.value,set:ne=>Q.value=ne})}if(a)for(const z in a)II(a[z],i,n,z);if(l){const z=et(l)?l.call(n):l;Reflect.ownKeys(z).forEach(X=>{Pt(X,z[X])})}u&&T9(u,t,"c");function Y(z,X){Ee(X)?X.forEach(Z=>z(Z.bind(n))):X&&z(X.bind(n))}if(Y(Dd,d),Y(Nt,h),Y(Eb,f),Y(xl,p),Y(I6,m),Y(L6,b),Y(MI,T),Y(EI,M),Y(AI,P),Y(wn,k),Y(Sl,A),Y($I,I),Ee(L))if(L.length){const z=t.exposed||(t.exposed={});L.forEach(X=>{Object.defineProperty(z,X,{get:()=>n[X],set:Z=>n[X]=Z,enumerable:!0})})}else t.exposed||(t.exposed={});S&&t.render===Dt&&(t.render=S),R!=null&&(t.inheritAttrs=R),V&&(t.components=V),H&&(t.directives=H),I&&P6(t)}function zq(t,e,n=Dt){Ee(t)&&(t=kk(t));for(const i in t){const s=t[i];let o;yt(s)?"default"in s?o=qe(s.from||i,s.default,!0):o=qe(s.from||i):o=qe(s),hn(o)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):e[i]=o}}function T9(t,e,n){vr(Ee(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,n)}function II(t,e,n,i){let s=i.includes(".")?gI(n,i):()=>n[i];if(Ke(t)){const o=e[t];et(o)&&Te(s,o)}else if(et(t))Te(s,t.bind(n));else if(yt(t))if(Ee(t))t.forEach(o=>II(o,e,n,i));else{const o=et(t.handler)?t.handler.bind(n):e[t.handler];et(o)&&Te(s,o,t)}}function V6(t){const e=t.type,{mixins:n,extends:i}=e,{mixins:s,optionsCache:o,config:{optionMergeStrategies:r}}=t.appContext,a=o.get(e);let l;return a?l=a:!s.length&&!n&&!i?l=e:(l={},s.length&&s.forEach(c=>Qy(l,c,r,!0)),Qy(l,e,r)),yt(e)&&o.set(e,l),l}function Qy(t,e,n,i=!1){const{mixins:s,extends:o}=e;o&&Qy(t,o,n,!0),s&&s.forEach(r=>Qy(t,r,n,!0));for(const r in e)if(!(i&&r==="expose")){const a=Hq[r]||n&&n[r];t[r]=a?a(t[r],e[r]):e[r]}return t}const Hq={data:P9,props:I9,emits:I9,methods:om,computed:om,beforeCreate:Vi,created:Vi,beforeMount:Vi,mounted:Vi,beforeUpdate:Vi,updated:Vi,beforeDestroy:Vi,beforeUnmount:Vi,destroyed:Vi,unmounted:Vi,activated:Vi,deactivated:Vi,errorCaptured:Vi,serverPrefetch:Vi,components:om,directives:om,watch:jq,provide:P9,inject:Uq};function P9(t,e){return e?t?function(){return cn(et(t)?t.call(this,this):t,et(e)?e.call(this,this):e)}:e:t}function Uq(t,e){return om(kk(t),kk(e))}function kk(t){if(Ee(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function Vi(t,e){return t?[...new Set([].concat(t,e))]:e}function om(t,e){return t?cn(Object.create(null),t,e):e}function I9(t,e){return t?Ee(t)&&Ee(e)?[...new Set([...t,...e])]:cn(Object.create(null),Ig(t),Ig(e??{})):e}function jq(t,e){if(!t)return e;if(!e)return t;const n=cn(Object.create(null),t);for(const i in e)n[i]=Vi(t[i],e[i]);return n}function LI(){return{app:null,config:{isNativeTag:qh,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 Wq=0;function Yq(t,e){return function(i,s=null){et(i)||(i=cn({},i)),s!=null&&!yt(s)&&(s=null);const o=LI(),r=new WeakSet,a=[];let l=!1;const c=o.app={_uid:Wq++,_component:i,_props:s,_container:null,_context:o,_instance:null,version:lL,get config(){return o.config},set config(u){},use(u,...d){return r.has(u)||(u&&et(u.install)?(r.add(u),u.install(c,...d)):et(u)&&(r.add(u),u(c,...d))),c},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),c},component(u,d){return d?(o.components[u]=d,c):o.components[u]},directive(u,d){return d?(o.directives[u]=d,c):o.directives[u]},mount(u,d,h){if(!l){const f=c._ceVNode||_(i,s);return f.appContext=o,h===!0?h="svg":h===!1&&(h=void 0),d&&e?e(f,u):t(f,u,h),l=!0,c._container=u,u.__vue_app__=c,T1(f.component)}},onUnmount(u){a.push(u)},unmount(){l&&(vr(a,c._instance,16),t(null,c._container),delete c._container.__vue_app__)},provide(u,d){return o.provides[u]=d,c},runWithContext(u){const d=Ku;Ku=c;try{return u()}finally{Ku=d}}};return c}}let Ku=null;function qq(t,e,n=pn){const i=pt(),s=Un(e),o=zi(e),r=OI(t,s),a=iI((l,c)=>{let u,d=pn,h;return mI(()=>{const f=t[s];Ni(u,f)&&(u=f,c())}),{get(){return l(),n.get?n.get(u):u},set(f){const p=n.set?n.set(f):f;if(!Ni(p,u)&&!(d!==pn&&Ni(f,d)))return;const m=i.vnode.props;m&&(e in m||s in m||o in m)&&(`onUpdate:${e}`in m||`onUpdate:${s}`in m||`onUpdate:${o}`in m)||(u=f,c()),i.emit(`update:${e}`,p),Ni(f,p)&&Ni(f,d)&&!Ni(p,h)&&c(),d=f,h=p}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?r||pn:a,done:!1}:{done:!0}}}},a}const OI=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Un(e)}Modifiers`]||t[`${zi(e)}Modifiers`];function Gq(t,e,...n){if(t.isUnmounted)return;const i=t.vnode.props||pn;let s=n;const o=e.startsWith("update:"),r=o&&OI(i,e.slice(7));r&&(r.trim&&(s=n.map(u=>Ke(u)?u.trim():u)),r.number&&(s=n.map(mb)));let a,l=i[a=Gu(e)]||i[a=Gu(Un(e))];!l&&o&&(l=i[a=Gu(zi(e))]),l&&vr(l,t,6,s);const c=i[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,vr(c,t,6,s)}}const Xq=new WeakMap;function DI(t,e,n=!1){const i=n?Xq:e.emitsCache,s=i.get(t);if(s!==void 0)return s;const o=t.emits;let r={},a=!1;if(!et(t)){const l=c=>{const u=DI(c,e,!0);u&&(a=!0,cn(r,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!o&&!a?(yt(t)&&i.set(t,null),null):(Ee(o)?o.forEach(l=>r[l]=null):cn(r,o),yt(t)&&i.set(t,r),r)}function Tb(t,e){return!t||!Id(e)?!1:(e=e.slice(2).replace(/Once$/,""),zt(t,e[0].toLowerCase()+e.slice(1))||zt(t,zi(e))||zt(t,e))}function M_(t){const{type:e,vnode:n,proxy:i,withProxy:s,propsOptions:[o],slots:r,attrs:a,emit:l,render:c,renderCache:u,props:d,data:h,setupState:f,ctx:p,inheritAttrs:m}=t,b=Pg(t);let w,k;try{if(n.shapeFlag&4){const A=s||i,S=A;w=ro(c.call(S,A,u,d,f,h,p)),k=a}else{const A=e;w=ro(A.length>1?A(d,{attrs:a,slots:r,emit:l}):A(d,null)),k=e.props?a:Zq(a)}}catch(A){Xm.length=0,Od(A,t,1),w=_(Zn)}let C=w;if(k&&m!==!1){const A=Object.keys(k),{shapeFlag:S}=C;A.length&&S&7&&(o&&A.some(b6)&&(k=Jq(k,o)),C=_r(C,k,!1,!0))}return n.dirs&&(C=_r(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(n.dirs):n.dirs),n.transition&&yl(C,n.transition),w=C,Pg(b),w}function Kq(t,e=!0){let n;for(let i=0;i<t.length;i++){const s=t[i];if(is(s)){if(s.type!==Zn||s.children==="v-if"){if(n)return;n=s}}else return}return n}const Zq=t=>{let e;for(const n in t)(n==="class"||n==="style"||Id(n))&&((e||(e={}))[n]=t[n]);return e},Jq=(t,e)=>{const n={};for(const i in t)(!b6(i)||!(i.slice(9)in e))&&(n[i]=t[i]);return n};function Qq(t,e,n){const{props:i,children:s,component:o}=t,{props:r,children:a,patchFlag:l}=e,c=o.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return i?L9(i,r,c):!!r;if(l&8){const u=e.dynamicProps;for(let d=0;d<u.length;d++){const h=u[d];if(r[h]!==i[h]&&!Tb(c,h))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:i===r?!1:i?r?L9(i,r,c):!0:!!r;return!1}function L9(t,e,n){const i=Object.keys(e);if(i.length!==Object.keys(t).length)return!0;for(let s=0;s<i.length;s++){const o=i[s];if(e[o]!==t[o]&&!Tb(n,o))return!0}return!1}function Pb({vnode:t,parent:e},n){for(;e;){const i=e.subTree;if(i.suspense&&i.suspense.activeBranch===t&&(i.el=t.el),i===t)(t=e.vnode).el=n,e=e.parent;else break}}const RI={},VI=()=>Object.create(RI),FI=t=>Object.getPrototypeOf(t)===RI;function eG(t,e,n,i=!1){const s={},o=VI();t.propsDefaults=Object.create(null),NI(t,e,s,o);for(const r in t.propsOptions[0])r in s||(s[r]=void 0);n?t.props=i?s:$6(s):t.type.props?t.props=s:t.props=o,t.attrs=o}function tG(t,e,n,i){const{props:s,attrs:o,vnode:{patchFlag:r}}=t,a=an(s),[l]=t.propsOptions;let c=!1;if((i||r>0)&&!(r&16)){if(r&8){const u=t.vnode.dynamicProps;for(let d=0;d<u.length;d++){let h=u[d];if(Tb(t.emitsOptions,h))continue;const f=e[h];if(l)if(zt(o,h))f!==o[h]&&(o[h]=f,c=!0);else{const p=Un(h);s[p]=Ck(l,a,p,f,t,!1)}else f!==o[h]&&(o[h]=f,c=!0)}}}else{NI(t,e,s,o)&&(c=!0);let u;for(const d in a)(!e||!zt(e,d)&&((u=zi(d))===d||!zt(e,u)))&&(l?n&&(n[d]!==void 0||n[u]!==void 0)&&(s[d]=Ck(l,a,d,void 0,t,!0)):delete s[d]);if(o!==a)for(const d in o)(!e||!zt(e,d))&&(delete o[d],c=!0)}c&&tl(t.attrs,"set","")}function NI(t,e,n,i){const[s,o]=t.propsOptions;let r=!1,a;if(e)for(let l in e){if(ul(l))continue;const c=e[l];let u;s&&zt(s,u=Un(l))?!o||!o.includes(u)?n[u]=c:(a||(a={}))[u]=c:Tb(t.emitsOptions,l)||(!(l in i)||c!==i[l])&&(i[l]=c,r=!0)}if(o){const l=an(n),c=a||pn;for(let u=0;u<o.length;u++){const d=o[u];n[d]=Ck(s,l,d,c[d],t,!zt(c,d))}}return r}function Ck(t,e,n,i,s,o){const r=t[n];if(r!=null){const a=zt(r,"default");if(a&&i===void 0){const l=r.default;if(r.type!==Function&&!r.skipFactory&&et(l)){const{propsDefaults:c}=s;if(n in c)i=c[n];else{const u=md(s);i=c[n]=l.call(null,e),u()}}else i=l;s.ce&&s.ce._setProp(n,i)}r[0]&&(o&&!a?i=!1:r[1]&&(i===""||i===zi(n))&&(i=!0))}return i}const nG=new WeakMap;function BI(t,e,n=!1){const i=n?nG:e.propsCache,s=i.get(t);if(s)return s;const o=t.props,r={},a=[];let l=!1;if(!et(t)){const u=d=>{l=!0;const[h,f]=BI(d,e,!0);cn(r,h),f&&a.push(...f)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!o&&!l)return yt(t)&&i.set(t,Zh),Zh;if(Ee(o))for(let u=0;u<o.length;u++){const d=Un(o[u]);O9(d)&&(r[d]=pn)}else if(o)for(const u in o){const d=Un(u);if(O9(d)){const h=o[u],f=r[d]=Ee(h)||et(h)?{type:h}:cn({},h),p=f.type;let m=!1,b=!0;if(Ee(p))for(let w=0;w<p.length;++w){const k=p[w],C=et(k)&&k.name;if(C==="Boolean"){m=!0;break}else C==="String"&&(b=!1)}else m=et(p)&&p.name==="Boolean";f[0]=m,f[1]=b,(m||zt(f,"default"))&&a.push(d)}}const c=[r,a];return yt(t)&&i.set(t,c),c}function O9(t){return t[0]!=="$"&&!ul(t)}const F6=t=>t==="_"||t==="_ctx"||t==="$stable",N6=t=>Ee(t)?t.map(ro):[ro(t)],sG=(t,e,n)=>{if(e._n)return e;const i=y((...s)=>N6(e(...s)),n);return i._c=!1,i},zI=(t,e,n)=>{const i=t._ctx;for(const s in t){if(F6(s))continue;const o=t[s];if(et(o))e[s]=sG(s,o,i);else if(o!=null){const r=N6(o);e[s]=()=>r}}},HI=(t,e)=>{const n=N6(e);t.slots.default=()=>n},UI=(t,e,n)=>{for(const i in e)(n||!F6(i))&&(t[i]=e[i])},iG=(t,e,n)=>{const i=t.slots=VI();if(t.vnode.shapeFlag&32){const s=e._;s?(UI(i,e,n),n&&VP(i,"_",s,!0)):zI(e,i)}else e&&HI(t,e)},oG=(t,e,n)=>{const{vnode:i,slots:s}=t;let o=!0,r=pn;if(i.shapeFlag&32){const a=e._;a?n&&a===1?o=!1:UI(s,e,n):(o=!e.$stable,zI(e,s)),r=e}else e&&(HI(t,e),r={default:1});if(o)for(const a in s)!F6(a)&&r[a]==null&&delete s[a]},Es=ZI;function jI(t){return YI(t)}function WI(t){return YI(t,fq)}function YI(t,e){const n=gb();n.__VUE__=!0;const{insert:i,remove:s,patchProp:o,createElement:r,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:h,setScopeId:f=Dt,insertStaticContent:p}=t,m=(te,se,me,$e=null,Se=null,Le=null,We=void 0,Fe=null,He=!!se.dynamicChildren)=>{if(te===se)return;te&&!Or(te,se)&&($e=oe(te),ne(te,Se,Le,!0),te=null),se.patchFlag===-2&&(He=!1,se.dynamicChildren=null);const{type:Ae,ref:Ze,shapeFlag:Ye}=se;switch(Ae){case $a:b(te,se,me,$e);break;case Zn:w(te,se,me,$e);break;case Zu:te==null&&k(se,me,$e,We);break;case J:V(te,se,me,$e,Se,Le,We,Fe,He);break;default:Ye&1?S(te,se,me,$e,Se,Le,We,Fe,He):Ye&6?H(te,se,me,$e,Se,Le,We,Fe,He):(Ye&64||Ye&128)&&Ae.process(te,se,me,$e,Se,Le,We,Fe,He,re)}Ze!=null&&Se?nf(Ze,te&&te.ref,Le,se||te,!se):Ze==null&&te&&te.ref!=null&&nf(te.ref,null,Le,te,!0)},b=(te,se,me,$e)=>{if(te==null)i(se.el=a(se.children),me,$e);else{const Se=se.el=te.el;se.children!==te.children&&c(Se,se.children)}},w=(te,se,me,$e)=>{te==null?i(se.el=l(se.children||""),me,$e):se.el=te.el},k=(te,se,me,$e)=>{[te.el,te.anchor]=p(te.children,se,me,$e,te.el,te.anchor)},C=({el:te,anchor:se},me,$e)=>{let Se;for(;te&&te!==se;)Se=h(te),i(te,me,$e),te=Se;i(se,me,$e)},A=({el:te,anchor:se})=>{let me;for(;te&&te!==se;)me=h(te),s(te),te=me;s(se)},S=(te,se,me,$e,Se,Le,We,Fe,He)=>{if(se.type==="svg"?We="svg":se.type==="math"&&(We="mathml"),te==null)M(se,me,$e,Se,Le,We,Fe,He);else{const Ae=te.el&&te.el._isVueCE?te.el:null;try{Ae&&Ae._beginPatch(),I(te,se,Se,Le,We,Fe,He)}finally{Ae&&Ae._endPatch()}}},M=(te,se,me,$e,Se,Le,We,Fe)=>{let He,Ae;const{props:Ze,shapeFlag:Ye,transition:it,dirs:be}=te;if(He=te.el=r(te.type,Le,Ze&&Ze.is,Ze),Ye&8?u(He,te.children):Ye&16&&T(te.children,He,null,$e,Se,pw(te,Le),We,Fe),be&&ka(te,null,$e,"created"),P(He,te,te.scopeId,We,$e),Ze){for(const Pe in Ze)Pe!=="value"&&!ul(Pe)&&o(He,Pe,null,Ze[Pe],Le,$e);"value"in Ze&&o(He,"value",null,Ze.value,Le),(Ae=Ze.onVnodeBeforeMount)&&oo(Ae,$e,te)}be&&ka(te,null,$e,"beforeMount");const ve=qI(Se,it);ve&&it.beforeEnter(He),i(He,se,me),((Ae=Ze&&Ze.onVnodeMounted)||ve||be)&&Es(()=>{Ae&&oo(Ae,$e,te),ve&&it.enter(He),be&&ka(te,null,$e,"mounted")},Se)},P=(te,se,me,$e,Se)=>{if(me&&f(te,me),$e)for(let Le=0;Le<$e.length;Le++)f(te,$e[Le]);if(Se){let Le=Se.subTree;if(se===Le||t0(Le.type)&&(Le.ssContent===se||Le.ssFallback===se)){const We=Se.vnode;P(te,We,We.scopeId,We.slotScopeIds,Se.parent)}}},T=(te,se,me,$e,Se,Le,We,Fe,He=0)=>{for(let Ae=He;Ae<te.length;Ae++){const Ze=te[Ae]=Fe?cc(te[Ae]):ro(te[Ae]);m(null,Ze,se,me,$e,Se,Le,We,Fe)}},I=(te,se,me,$e,Se,Le,We)=>{const Fe=se.el=te.el;let{patchFlag:He,dynamicChildren:Ae,dirs:Ze}=se;He|=te.patchFlag&16;const Ye=te.props||pn,it=se.props||pn;let be;if(me&&pu(me,!1),(be=it.onVnodeBeforeUpdate)&&oo(be,me,se,te),Ze&&ka(se,te,me,"beforeUpdate"),me&&pu(me,!0),(Ye.innerHTML&&it.innerHTML==null||Ye.textContent&&it.textContent==null)&&u(Fe,""),Ae?L(te.dynamicChildren,Ae,Fe,me,$e,pw(se,Se),Le):We||X(te,se,Fe,null,me,$e,pw(se,Se),Le,!1),He>0){if(He&16)R(Fe,Ye,it,me,Se);else if(He&2&&Ye.class!==it.class&&o(Fe,"class",null,it.class,Se),He&4&&o(Fe,"style",Ye.style,it.style,Se),He&8){const ve=se.dynamicProps;for(let Pe=0;Pe<ve.length;Pe++){const Ie=ve[Pe],_t=Ye[Ie],Lt=it[Ie];(Lt!==_t||Ie==="value")&&o(Fe,Ie,_t,Lt,Se,me)}}He&1&&te.children!==se.children&&u(Fe,se.children)}else!We&&Ae==null&&R(Fe,Ye,it,me,Se);((be=it.onVnodeUpdated)||Ze)&&Es(()=>{be&&oo(be,me,se,te),Ze&&ka(se,te,me,"updated")},$e)},L=(te,se,me,$e,Se,Le,We)=>{for(let Fe=0;Fe<se.length;Fe++){const He=te[Fe],Ae=se[Fe],Ze=He.el&&(He.type===J||!Or(He,Ae)||He.shapeFlag&198)?d(He.el):me;m(He,Ae,Ze,null,$e,Se,Le,We,!0)}},R=(te,se,me,$e,Se)=>{if(se!==me){if(se!==pn)for(const Le in se)!ul(Le)&&!(Le in me)&&o(te,Le,se[Le],null,Se,$e);for(const Le in me){if(ul(Le))continue;const We=me[Le],Fe=se[Le];We!==Fe&&Le!=="value"&&o(te,Le,Fe,We,Se,$e)}"value"in me&&o(te,"value",se.value,me.value,Se)}},V=(te,se,me,$e,Se,Le,We,Fe,He)=>{const Ae=se.el=te?te.el:a(""),Ze=se.anchor=te?te.anchor:a("");let{patchFlag:Ye,dynamicChildren:it,slotScopeIds:be}=se;be&&(Fe=Fe?Fe.concat(be):be),te==null?(i(Ae,me,$e),i(Ze,me,$e),T(se.children||[],me,Ze,Se,Le,We,Fe,He)):Ye>0&&Ye&64&&it&&te.dynamicChildren&&te.dynamicChildren.length===it.length?(L(te.dynamicChildren,it,me,Se,Le,We,Fe),(se.key!=null||Se&&se===Se.subTree)&&B6(te,se,!0)):X(te,se,me,Ze,Se,Le,We,Fe,He)},H=(te,se,me,$e,Se,Le,We,Fe,He)=>{se.slotScopeIds=Fe,te==null?se.shapeFlag&512?Se.ctx.activate(se,me,$e,We,He):F(se,me,$e,Se,Le,We,He):U(te,se,He)},F=(te,se,me,$e,Se,Le,We)=>{const Fe=te.component=tL(te,$e,Se);if(M1(te)&&(Fe.ctx.renderer=re),sL(Fe,!1,We),Fe.asyncDep){if(Se&&Se.registerDep(Fe,Y,We),!te.el){const He=Fe.subTree=_(Zn);w(null,He,se,me),te.placeholder=He.el}}else Y(Fe,te,se,me,Se,Le,We)},U=(te,se,me)=>{const $e=se.component=te.component;if(Qq(te,se,me))if($e.asyncDep&&!$e.asyncResolved){z($e,se,me);return}else $e.next=se,$e.update();else se.el=te.el,$e.vnode=se},Y=(te,se,me,$e,Se,Le,We)=>{const Fe=()=>{if(te.isMounted){let{next:Ye,bu:it,u:be,parent:ve,vnode:Pe}=te;{const dt=GI(te);if(dt){Ye&&(Ye.el=Pe.el,z(te,Ye,We)),dt.asyncDep.then(()=>{te.isUnmounted||Fe()});return}}let Ie=Ye,_t;pu(te,!1),Ye?(Ye.el=Pe.el,z(te,Ye,We)):Ye=Pe,it&&Qh(it),(_t=Ye.props&&Ye.props.onVnodeBeforeUpdate)&&oo(_t,ve,Ye,Pe),pu(te,!0);const Lt=M_(te),Je=te.subTree;te.subTree=Lt,m(Je,Lt,d(Je.el),oe(Je),te,Se,Le),Ye.el=Lt.el,Ie===null&&Pb(te,Lt.el),be&&Es(be,Se),(_t=Ye.props&&Ye.props.onVnodeUpdated)&&Es(()=>oo(_t,ve,Ye,Pe),Se)}else{let Ye;const{el:it,props:be}=se,{bm:ve,m:Pe,parent:Ie,root:_t,type:Lt}=te,Je=dl(se);if(pu(te,!1),ve&&Qh(ve),!Je&&(Ye=be&&be.onVnodeBeforeMount)&&oo(Ye,Ie,se),pu(te,!0),it&&je){const dt=()=>{te.subTree=M_(te),je(it,te.subTree,te,Se,null)};Je&&Lt.__asyncHydrate?Lt.__asyncHydrate(it,te,dt):dt()}else{_t.ce&&_t.ce._def.shadowRoot!==!1&&_t.ce._injectChildStyle(Lt);const dt=te.subTree=M_(te);m(null,dt,me,$e,te,Se,Le),se.el=dt.el}if(Pe&&Es(Pe,Se),!Je&&(Ye=be&&be.onVnodeMounted)){const dt=se;Es(()=>oo(Ye,Ie,dt),Se)}(se.shapeFlag&256||Ie&&dl(Ie.vnode)&&Ie.vnode.shapeFlag&256)&&te.a&&Es(te.a,Se),te.isMounted=!0,se=me=$e=null}};te.scope.on();const He=te.effect=new $g(Fe);te.scope.off();const Ae=te.update=He.run.bind(He),Ze=te.job=He.runIfDirty.bind(He);Ze.i=te,Ze.id=te.uid,He.scheduler=()=>E6(Ze),pu(te,!0),Ae()},z=(te,se,me)=>{se.component=te;const $e=te.vnode.props;te.vnode=se,te.next=null,tG(te,se.props,$e,me),oG(te,se.children,me),gl(),w9(te),vl()},X=(te,se,me,$e,Se,Le,We,Fe,He=!1)=>{const Ae=te&&te.children,Ze=te?te.shapeFlag:0,Ye=se.children,{patchFlag:it,shapeFlag:be}=se;if(it>0){if(it&128){G(Ae,Ye,me,$e,Se,Le,We,Fe,He);return}else if(it&256){Z(Ae,Ye,me,$e,Se,Le,We,Fe,He);return}}be&8?(Ze&16&&Ce(Ae,Se,Le),Ye!==Ae&&u(me,Ye)):Ze&16?be&16?G(Ae,Ye,me,$e,Se,Le,We,Fe,He):Ce(Ae,Se,Le,!0):(Ze&8&&u(me,""),be&16&&T(Ye,me,$e,Se,Le,We,Fe,He))},Z=(te,se,me,$e,Se,Le,We,Fe,He)=>{te=te||Zh,se=se||Zh;const Ae=te.length,Ze=se.length,Ye=Math.min(Ae,Ze);let it;for(it=0;it<Ye;it++){const be=se[it]=He?cc(se[it]):ro(se[it]);m(te[it],be,me,null,Se,Le,We,Fe,He)}Ae>Ze?Ce(te,Se,Le,!0,!1,Ye):T(se,me,$e,Se,Le,We,Fe,He,Ye)},G=(te,se,me,$e,Se,Le,We,Fe,He)=>{let Ae=0;const Ze=se.length;let Ye=te.length-1,it=Ze-1;for(;Ae<=Ye&&Ae<=it;){const be=te[Ae],ve=se[Ae]=He?cc(se[Ae]):ro(se[Ae]);if(Or(be,ve))m(be,ve,me,null,Se,Le,We,Fe,He);else break;Ae++}for(;Ae<=Ye&&Ae<=it;){const be=te[Ye],ve=se[it]=He?cc(se[it]):ro(se[it]);if(Or(be,ve))m(be,ve,me,null,Se,Le,We,Fe,He);else break;Ye--,it--}if(Ae>Ye){if(Ae<=it){const be=it+1,ve=be<Ze?se[be].el:$e;for(;Ae<=it;)m(null,se[Ae]=He?cc(se[Ae]):ro(se[Ae]),me,ve,Se,Le,We,Fe,He),Ae++}}else if(Ae>it)for(;Ae<=Ye;)ne(te[Ae],Se,Le,!0),Ae++;else{const be=Ae,ve=Ae,Pe=new Map;for(Ae=ve;Ae<=it;Ae++){const Oe=se[Ae]=He?cc(se[Ae]):ro(se[Ae]);Oe.key!=null&&Pe.set(Oe.key,Ae)}let Ie,_t=0;const Lt=it-ve+1;let Je=!1,dt=0;const mt=new Array(Lt);for(Ae=0;Ae<Lt;Ae++)mt[Ae]=0;for(Ae=be;Ae<=Ye;Ae++){const Oe=te[Ae];if(_t>=Lt){ne(Oe,Se,Le,!0);continue}let ue;if(Oe.key!=null)ue=Pe.get(Oe.key);else for(Ie=ve;Ie<=it;Ie++)if(mt[Ie-ve]===0&&Or(Oe,se[Ie])){ue=Ie;break}ue===void 0?ne(Oe,Se,Le,!0):(mt[ue-ve]=Ae+1,ue>=dt?dt=ue:Je=!0,m(Oe,se[ue],me,null,Se,Le,We,Fe,He),_t++)}const _e=Je?rG(mt):Zh;for(Ie=_e.length-1,Ae=Lt-1;Ae>=0;Ae--){const Oe=ve+Ae,ue=se[Oe],De=se[Oe+1],gt=Oe+1<Ze?De.el||XI(De):$e;mt[Ae]===0?m(null,ue,me,gt,Se,Le,We,Fe,He):Je&&(Ie<0||Ae!==_e[Ie]?Q(ue,me,gt,2):Ie--)}}},Q=(te,se,me,$e,Se=null)=>{const{el:Le,type:We,transition:Fe,children:He,shapeFlag:Ae}=te;if(Ae&6){Q(te.component.subTree,se,me,$e);return}if(Ae&128){te.suspense.move(se,me,$e);return}if(Ae&64){We.move(te,se,me,re);return}if(We===J){i(Le,se,me);for(let Ye=0;Ye<He.length;Ye++)Q(He[Ye],se,me,$e);i(te.anchor,se,me);return}if(We===Zu){C(te,se,me);return}if($e!==2&&Ae&1&&Fe)if($e===0)Fe.beforeEnter(Le),i(Le,se,me),Es(()=>Fe.enter(Le),Se);else{const{leave:Ye,delayLeave:it,afterLeave:be}=Fe,ve=()=>{te.ctx.isUnmounted?s(Le):i(Le,se,me)},Pe=()=>{Le._isLeaving&&Le[Ja](!0),Ye(Le,()=>{ve(),be&&be()})};it?it(Le,ve,Pe):Pe()}else i(Le,se,me)},ne=(te,se,me,$e=!1,Se=!1)=>{const{type:Le,props:We,ref:Fe,children:He,dynamicChildren:Ae,shapeFlag:Ze,patchFlag:Ye,dirs:it,cacheIndex:be}=te;if(Ye===-2&&(Se=!1),Fe!=null&&(gl(),nf(Fe,null,me,te,!0),vl()),be!=null&&(se.renderCache[be]=void 0),Ze&256){se.ctx.deactivate(te);return}const ve=Ze&1&&it,Pe=!dl(te);let Ie;if(Pe&&(Ie=We&&We.onVnodeBeforeUnmount)&&oo(Ie,se,te),Ze&6)ge(te.component,me,$e);else{if(Ze&128){te.suspense.unmount(me,$e);return}ve&&ka(te,null,se,"beforeUnmount"),Ze&64?te.type.remove(te,se,me,re,$e):Ae&&!Ae.hasOnce&&(Le!==J||Ye>0&&Ye&64)?Ce(Ae,se,me,!1,!0):(Le===J&&Ye&384||!Se&&Ze&16)&&Ce(He,se,me),$e&&K(te)}(Pe&&(Ie=We&&We.onVnodeUnmounted)||ve)&&Es(()=>{Ie&&oo(Ie,se,te),ve&&ka(te,null,se,"unmounted")},me)},K=te=>{const{type:se,el:me,anchor:$e,transition:Se}=te;if(se===J){ae(me,$e);return}if(se===Zu){A(te);return}const Le=()=>{s(me),Se&&!Se.persisted&&Se.afterLeave&&Se.afterLeave()};if(te.shapeFlag&1&&Se&&!Se.persisted){const{leave:We,delayLeave:Fe}=Se,He=()=>We(me,Le);Fe?Fe(te.el,Le,He):He()}else Le()},ae=(te,se)=>{let me;for(;te!==se;)me=h(te),s(te),te=me;s(se)},ge=(te,se,me)=>{const{bum:$e,scope:Se,job:Le,subTree:We,um:Fe,m:He,a:Ae}=te;e0(He),e0(Ae),$e&&Qh($e),Se.stop(),Le&&(Le.flags|=8,ne(We,te,se,me)),Fe&&Es(Fe,se),Es(()=>{te.isUnmounted=!0},se)},Ce=(te,se,me,$e=!1,Se=!1,Le=0)=>{for(let We=Le;We<te.length;We++)ne(te[We],se,me,$e,Se)},oe=te=>{if(te.shapeFlag&6)return oe(te.component.subTree);if(te.shapeFlag&128)return te.suspense.next();const se=h(te.anchor||te.el),me=se&&se[vI];return me?h(me):se};let pe=!1;const ie=(te,se,me)=>{let $e;te==null?se._vnode&&(ne(se._vnode,null,null,!0),$e=se._vnode.component):m(se._vnode||null,te,se,null,null,null,me),se._vnode=te,pe||(pe=!0,w9($e),Zy(),pe=!1)},re={p:m,um:ne,m:Q,r:K,mt:F,mc:T,pc:X,pbc:L,n:oe,o:t};let ke,je;return e&&([ke,je]=e(re)),{render:ie,hydrate:ke,createApp:Yq(ie,ke)}}function pw({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function pu({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function qI(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function B6(t,e,n=!1){const i=t.children,s=e.children;if(Ee(i)&&Ee(s))for(let o=0;o<i.length;o++){const r=i[o];let a=s[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[o]=cc(s[o]),a.el=r.el),!n&&a.patchFlag!==-2&&B6(r,a)),a.type===$a&&(a.patchFlag!==-1?a.el=r.el:a.__elIndex=o+(t.type===J?1:0)),a.type===Zn&&!a.el&&(a.el=r.el)}}function rG(t){const e=t.slice(),n=[0];let i,s,o,r,a;const l=t.length;for(i=0;i<l;i++){const c=t[i];if(c!==0){if(s=n[n.length-1],t[s]<c){e[i]=s,n.push(i);continue}for(o=0,r=n.length-1;o<r;)a=o+r>>1,t[n[a]]<c?o=a+1:r=a;c<t[n[o]]&&(o>0&&(e[i]=n[o-1]),n[o]=i)}}for(o=n.length,r=n[o-1];o-- >0;)n[o]=r,r=e[r];return n}function GI(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:GI(e)}function e0(t){if(t)for(let e=0;e<t.length;e++)t[e].flags|=8}function XI(t){if(t.placeholder)return t.placeholder;const e=t.component;return e?XI(e.subTree):null}const t0=t=>t.__isSuspense;let xk=0;const aG={name:"Suspense",__isSuspense:!0,process(t,e,n,i,s,o,r,a,l,c){if(t==null)cG(e,n,i,s,o,r,a,l,c);else{if(o&&o.deps>0&&!t.suspense.isInFallback){e.suspense=t.suspense,e.suspense.vnode=e,e.el=t.el;return}uG(t,e,n,i,s,r,a,l,c)}},hydrate:dG,normalize:hG},lG=aG;function Lg(t,e){const n=t.props&&t.props[e];et(n)&&n()}function cG(t,e,n,i,s,o,r,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),h=t.suspense=KI(t,s,i,e,d,n,o,r,a,l);c(null,h.pendingBranch=t.ssContent,d,null,i,h,o,r),h.deps>0?(Lg(t,"onPending"),Lg(t,"onFallback"),c(null,t.ssFallback,e,n,i,null,o,r),sf(h,t.ssFallback)):h.resolve(!1,!0)}function uG(t,e,n,i,s,o,r,a,{p:l,um:c,o:{createElement:u}}){const d=e.suspense=t.suspense;d.vnode=e,e.el=t.el;const h=e.ssContent,f=e.ssFallback,{activeBranch:p,pendingBranch:m,isInFallback:b,isHydrating:w}=d;if(m)d.pendingBranch=h,Or(m,h)?(l(m,h,d.hiddenContainer,null,s,d,o,r,a),d.deps<=0?d.resolve():b&&(w||(l(p,f,n,i,s,null,o,r,a),sf(d,f)))):(d.pendingId=xk++,w?(d.isHydrating=!1,d.activeBranch=m):c(m,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),b?(l(null,h,d.hiddenContainer,null,s,d,o,r,a),d.deps<=0?d.resolve():(l(p,f,n,i,s,null,o,r,a),sf(d,f))):p&&Or(p,h)?(l(p,h,n,i,s,d,o,r,a),d.resolve(!0)):(l(null,h,d.hiddenContainer,null,s,d,o,r,a),d.deps<=0&&d.resolve()));else if(p&&Or(p,h))l(p,h,n,i,s,d,o,r,a),sf(d,h);else if(Lg(e,"onPending"),d.pendingBranch=h,h.shapeFlag&512?d.pendingId=h.component.suspenseId:d.pendingId=xk++,l(null,h,d.hiddenContainer,null,s,d,o,r,a),d.deps<=0)d.resolve();else{const{timeout:k,pendingId:C}=d;k>0?setTimeout(()=>{d.pendingId===C&&d.fallback(f)},k):k===0&&d.fallback(f)}}function KI(t,e,n,i,s,o,r,a,l,c,u=!1){const{p:d,m:h,um:f,n:p,o:{parentNode:m,remove:b}}=c;let w;const k=fG(t);k&&e&&e.pendingBranch&&(w=e.pendingId,e.deps++);const C=t.props?qy(t.props.timeout):void 0,A=o,S={vnode:t,parent:e,parentComponent:n,namespace:r,container:i,hiddenContainer:s,deps:0,pendingId:xk++,timeout:typeof C=="number"?C:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(M=!1,P=!1){const{vnode:T,activeBranch:I,pendingBranch:L,pendingId:R,effects:V,parentComponent:H,container:F,isInFallback:U}=S;let Y=!1;S.isHydrating?S.isHydrating=!1:M||(Y=I&&L.transition&&L.transition.mode==="out-in",Y&&(I.transition.afterLeave=()=>{R===S.pendingId&&(h(L,F,o===A?p(I):o,0),Mg(V),U&&T.ssFallback&&(T.ssFallback.el=null))}),I&&(m(I.el)===F&&(o=p(I)),f(I,H,S,!0),!Y&&U&&T.ssFallback&&Es(()=>T.ssFallback.el=null,S)),Y||h(L,F,o,0)),sf(S,L),S.pendingBranch=null,S.isInFallback=!1;let z=S.parent,X=!1;for(;z;){if(z.pendingBranch){z.effects.push(...V),X=!0;break}z=z.parent}!X&&!Y&&Mg(V),S.effects=[],k&&e&&e.pendingBranch&&w===e.pendingId&&(e.deps--,e.deps===0&&!P&&e.resolve()),Lg(T,"onResolve")},fallback(M){if(!S.pendingBranch)return;const{vnode:P,activeBranch:T,parentComponent:I,container:L,namespace:R}=S;Lg(P,"onFallback");const V=p(T),H=()=>{S.isInFallback&&(d(null,M,L,V,I,null,R,a,l),sf(S,M))},F=M.transition&&M.transition.mode==="out-in";F&&(T.transition.afterLeave=H),S.isInFallback=!0,f(T,I,null,!0),F||H()},move(M,P,T){S.activeBranch&&h(S.activeBranch,M,P,T),S.container=M},next(){return S.activeBranch&&p(S.activeBranch)},registerDep(M,P,T){const I=!!S.pendingBranch;I&&S.deps++;const L=M.vnode.el;M.asyncDep.catch(R=>{Od(R,M,0)}).then(R=>{if(M.isUnmounted||S.isUnmounted||S.pendingId!==M.suspenseId)return;M.asyncResolved=!0;const{vnode:V}=M;Ak(M,R,!1),L&&(V.el=L);const H=!L&&M.subTree.el;P(M,V,m(L||M.subTree.el),L?null:p(M.subTree),S,r,T),H&&(V.placeholder=null,b(H)),Pb(M,V.el),I&&--S.deps===0&&S.resolve()})},unmount(M,P){S.isUnmounted=!0,S.activeBranch&&f(S.activeBranch,n,M,P),S.pendingBranch&&f(S.pendingBranch,n,M,P)}};return S}function dG(t,e,n,i,s,o,r,a,l){const c=e.suspense=KI(e,i,n,t.parentNode,document.createElement("div"),null,s,o,r,a,!0),u=l(t,c.pendingBranch=e.ssContent,n,c,o,r);return c.deps===0&&c.resolve(!1,!0),u}function hG(t){const{shapeFlag:e,children:n}=t,i=e&32;t.ssContent=D9(i?n.default:n),t.ssFallback=i?D9(n.fallback):_(Zn)}function D9(t){let e;if(et(t)){const n=pd&&t._c;n&&(t._d=!1,v()),t=t(),n&&(t._d=!0,e=Ei,JI())}return Ee(t)&&(t=Kq(t)),t=ro(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function ZI(t,e){e&&e.pendingBranch?Ee(t)?e.effects.push(...t):e.effects.push(t):Mg(t)}function sf(t,e){t.activeBranch=e;const{vnode:n,parentComponent:i}=t;let s=e.el;for(;!s&&e.component;)e=e.component.subTree,s=e.el;n.el=s,i&&i.subTree===n&&(i.vnode.el=s,Pb(i,s))}function fG(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}const J=Symbol.for("v-fgt"),$a=Symbol.for("v-txt"),Zn=Symbol.for("v-cmt"),Zu=Symbol.for("v-stc"),Xm=[];let Ei=null;function v(t=!1){Xm.push(Ei=t?null:[])}function JI(){Xm.pop(),Ei=Xm[Xm.length-1]||null}let pd=1;function Og(t,e=!1){pd+=t,t<0&&Ei&&e&&(Ei.hasOnce=!0)}function QI(t){return t.dynamicChildren=pd>0?Ei||Zh:null,JI(),pd>0&&Ei&&Ei.push(t),t}function $(t,e,n,i,s,o){return QI(g(t,e,n,i,s,o,!0))}function D(t,e,n,i,s){return QI(_(t,e,n,i,s,!0))}function is(t){return t?t.__v_isVNode===!0:!1}function Or(t,e){return t.type===e.type&&t.key===e.key}function pG(t){}const eL=({key:t})=>t??null,T_=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Ke(t)||hn(t)||et(t)?{i:ui,r:t,k:e,f:!!n}:t:null);function g(t,e=null,n=null,i=0,s=null,o=t===J?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&eL(e),ref:e&&T_(e),scopeId:Sb,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:ui};return a?(z6(l,n),o&128&&t.normalize(l)):n&&(l.shapeFlag|=Ke(n)?8:16),pd>0&&!r&&Ei&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Ei.push(l),l}const _=mG;function mG(t,e=null,n=null,i=0,s=null,o=!1){if((!t||t===TI)&&(t=Zn),is(t)){const a=_r(t,e,!0);return n&&z6(a,n),pd>0&&!o&&Ei&&(a.shapeFlag&6?Ei[Ei.indexOf(t)]=a:Ei.push(a)),a.patchFlag=-2,a}if(wG(t)&&(t=t.__vccOpts),e){e=of(e);let{class:a,style:l}=e;a&&!Ke(a)&&(e.class=q(a)),yt(l)&&(A1(l)&&!Ee(l)&&(l=cn({},l)),e.style=Xe(l))}const r=Ke(t)?1:t0(t)?128:_I(t)?64:yt(t)?4:et(t)?2:0;return g(t,e,n,i,s,r,o,!0)}function of(t){return t?A1(t)||FI(t)?cn({},t):t:null}function _r(t,e,n=!1,i=!1){const{props:s,ref:o,patchFlag:r,children:a,transition:l}=t,c=e?Yt(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&eL(c),ref:e&&e.ref?n&&o?Ee(o)?o.concat(T_(e)):[o,T_(e)]:T_(e):o,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==J?r===-1?16:r|16:r,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&_r(t.ssContent),ssFallback:t.ssFallback&&_r(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&i&&yl(u,l.clone(u)),u}function N(t=" ",e=0){return _($a,null,t,e)}function xr(t,e){const n=_(Zu,null,t);return n.staticCount=e,n}function O(t="",e=!1){return e?(v(),D(Zn,null,t)):_(Zn,null,t)}function ro(t){return t==null||typeof t=="boolean"?_(Zn):Ee(t)?_(J,null,t.slice()):is(t)?cc(t):_($a,null,String(t))}function cc(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:_r(t)}function z6(t,e){let n=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(Ee(e))n=16;else if(typeof e=="object")if(i&65){const s=e.default;s&&(s._c&&(s._d=!1),z6(t,s()),s._c&&(s._d=!0));return}else{n=32;const s=e._;!s&&!FI(e)?e._ctx=ui:s===3&&ui&&(ui.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else et(e)?(e={default:e,_ctx:ui},n=32):(e=String(e),i&64?(n=16,e=[N(e)]):n=8);t.children=e,t.shapeFlag|=n}function Yt(...t){const e={};for(let n=0;n<t.length;n++){const i=t[n];for(const s in i)if(s==="class")e.class!==i.class&&(e.class=q([e.class,i.class]));else if(s==="style")e.style=Xe([e.style,i.style]);else if(Id(s)){const o=e[s],r=i[s];r&&o!==r&&!(Ee(o)&&o.includes(r))&&(e[s]=o?[].concat(o,r):r)}else s!==""&&(e[s]=i[s])}return e}function oo(t,e,n,i=null){vr(t,e,7,[n,i])}const gG=LI();let vG=0;function tL(t,e,n){const i=t.type,s=(e?e.appContext:t.appContext)||gG,o={uid:vG++,vnode:t,type:i,parent:e,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new k6(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(s.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:BI(i,s),emitsOptions:DI(i,s),emit:null,emitted:null,propsDefaults:pn,inheritAttrs:i.inheritAttrs,ctx:pn,data:pn,props:pn,attrs:pn,slots:pn,refs:pn,setupState:pn,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=e?e.root:o,o.emit=Gq.bind(null,o),t.ce&&t.ce(o),o}let ai=null;const pt=()=>ai||ui;let n0,Sk;{const t=gb(),e=(n,i)=>{let s;return(s=t[n])||(s=t[n]=[]),s.push(i),o=>{s.length>1?s.forEach(r=>r(o)):s[0](o)}};n0=e("__VUE_INSTANCE_SETTERS__",n=>ai=n),Sk=e("__VUE_SSR_SETTERS__",n=>Sf=n)}const md=t=>{const e=ai;return n0(t),t.scope.on(),()=>{t.scope.off(),n0(e)}},$k=()=>{ai&&ai.scope.off(),n0(null)};function nL(t){return t.vnode.shapeFlag&4}let Sf=!1;function sL(t,e=!1,n=!1){e&&Sk(e);const{props:i,children:s}=t.vnode,o=nL(t);eG(t,i,o,e),iG(t,s,n||e);const r=o?_G(t,e):void 0;return e&&Sk(!1),r}function _G(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,bk);const{setup:i}=n;if(i){gl();const s=t.setupContext=i.length>1?rL(t):null,o=md(t),r=ap(i,t,0,[t.props,s]),a=hd(r);if(vl(),o(),(a||t.sp)&&!dl(t)&&P6(t),a){if(r.then($k,$k),e)return r.then(l=>{Ak(t,l,e)}).catch(l=>{Od(l,t,0)});t.asyncDep=r}else Ak(t,r,e)}else oL(t,e)}function Ak(t,e,n){et(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:yt(e)&&(t.setupState=A6(e)),oL(t,n)}let s0,Ek;function iL(t){s0=t,Ek=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Eq))}}const yG=()=>!s0;function oL(t,e,n){const i=t.type;if(!t.render){if(!e&&s0&&!i.render){const s=i.template||V6(t).template;if(s){const{isCustomElement:o,compilerOptions:r}=t.appContext.config,{delimiters:a,compilerOptions:l}=i,c=cn(cn({isCustomElement:o,delimiters:a},r),l);i.render=s0(s,c)}}t.render=i.render||Dt,Ek&&Ek(t)}{const s=md(t);gl();try{Bq(t)}finally{vl(),s()}}}const bG={get(t,e){return Ai(t,"get",""),t[e]}};function rL(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,bG),slots:t.slots,emit:t.emit,expose:e}}function T1(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(A6(Xs(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in Gm)return Gm[n](t)},has(e,n){return n in e||n in Gm}})):t.proxy}function Mk(t,e=!0){return et(t)?t.displayName||t.name:t.name||e&&t.__name}function wG(t){return et(t)&&"__vccOpts"in t}const W=(t,e)=>jY(t,e,Sf);function bt(t,e,n){try{Og(-1);const i=arguments.length;return i===2?yt(e)&&!Ee(e)?is(e)?_(t,null,[e]):_(t,e):_(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&is(n)&&(n=[n]),_(t,e,n))}finally{Og(1)}}function kG(){}function CG(t,e,n,i){const s=n[i];if(s&&aL(s,t))return s;const o=e();return o.memo=t.slice(),o.cacheIndex=i,n[i]=o}function aL(t,e){const n=t.memo;if(n.length!=e.length)return!1;for(let i=0;i<n.length;i++)if(Ni(n[i],e[i]))return!1;return pd>0&&Ei&&Ei.push(t),!0}const lL="3.5.27",cL=Dt,xG=QY,SG=Sh,$G=dI,AG={createComponentInstance:tL,setupComponent:sL,renderComponentRoot:M_,setCurrentRenderingInstance:Pg,isVNode:is,normalizeVNode:ro,getComponentPublicInstance:T1,ensureValidVNode:R6,pushWarningContext:XY,popWarningContext:KY},EG=AG,MG=null,TG=null,PG=null;/**
16 +* @vue/runtime-dom v3.5.27
15 17 * (c) 2018-present Yuxi (Evan) You and Vue contributors
16 18 * @license MIT
17 -**/const GF="http://www.w3.org/2000/svg",YF="http://www.w3.org/1998/Math/MathML",gl=typeof document<"u"?document:null,_4=gl&&gl.createElement("template"),ZF={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"?gl.createElementNS(GF,e):t==="mathml"?gl.createElementNS(YF,e):gl.createElement(e,n?{is:n}:void 0);return e==="select"&&o&&o.multiple!=null&&r.setAttribute("multiple",o.multiple),r},createText:e=>gl.createTextNode(e),createComment:e=>gl.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>gl.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{_4.innerHTML=o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e;const l=_4.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]}},qi="transition",Bd="animation",Vc=Symbol("_vtc"),_r=(e,{slots:t})=>lt(lE,GE(e),t);_r.displayName="Transition";const qE={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},JF=_r.props=Bt({},hw,qE),ua=(e,t=[])=>{Me(e)?e.forEach(n=>n(...t)):e&&e(...t)},b4=e=>e?Me(e)?e.some(t=>t.length>1):e.length>1:!1;function GE(e){const t={};for(const B in e)B in qE||(t[B]=e[B]);if(e.css===!1)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=s,appearActiveClass:u=i,appearToClass:c=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,h=XF(r),m=h&&h[0],y=h&&h[1],{onBeforeEnter:v,onEnter:w,onEnterCancelled:_,onLeave:S,onLeaveCancelled:x,onBeforeAppear:E=v,onAppear:T=w,onAppearCancelled:O=_}=t,P=(B,Y,Z)=>{Qi(B,Y?c:l),Qi(B,Y?u:i),Z&&Z()},N=(B,Y)=>{B._isLeaving=!1,Qi(B,d),Qi(B,p),Qi(B,f),Y&&Y()},F=B=>(Y,Z)=>{const U=B?T:w,j=()=>P(Y,B,Z);ua(U,[Y,j]),w4(()=>{Qi(Y,B?a:s),fi(Y,B?c:l),b4(U)||C4(Y,o,m,j)})};return Bt(t,{onBeforeEnter(B){ua(v,[B]),fi(B,s),fi(B,i)},onBeforeAppear(B){ua(E,[B]),fi(B,a),fi(B,u)},onEnter:F(!1),onAppear:F(!0),onLeave(B,Y){B._isLeaving=!0;const Z=()=>N(B,Y);fi(B,d),ZE(),fi(B,f),w4(()=>{B._isLeaving&&(Qi(B,d),fi(B,p),b4(S)||C4(B,o,y,Z))}),ua(S,[B,Z])},onEnterCancelled(B){P(B,!1),ua(_,[B])},onAppearCancelled(B){P(B,!0),ua(O,[B])},onLeaveCancelled(B){N(B),ua(x,[B])}})}function XF(e){if(e==null)return null;if(ft(e))return[Vv(e.enter),Vv(e.leave)];{const t=Vv(e);return[t,t]}}function Vv(e){return ig(e)}function fi(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Vc]||(e[Vc]=new Set)).add(t)}function Qi(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[Vc];n&&(n.delete(t),n.size||(e[Vc]=void 0))}function w4(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let QF=0;function C4(e,t,n,o){const r=e._endId=++QF,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:i,timeout:l,propCount:a}=YE(e,t);if(!i)return o();const u=i+"end";let c=0;const d=()=>{e.removeEventListener(u,f),s()},f=p=>{p.target===e&&++c>=a&&d()};setTimeout(()=>{c<a&&d()},l+1),e.addEventListener(u,f)}function YE(e,t){const n=window.getComputedStyle(e),o=h=>(n[h]||"").split(", "),r=o(`${qi}Delay`),s=o(`${qi}Duration`),i=k4(r,s),l=o(`${Bd}Delay`),a=o(`${Bd}Duration`),u=k4(l,a);let c=null,d=0,f=0;t===qi?i>0&&(c=qi,d=i,f=s.length):t===Bd?u>0&&(c=Bd,d=u,f=a.length):(d=Math.max(i,u),c=d>0?i>u?qi:Bd:null,f=c?c===qi?s.length:a.length:0);const p=c===qi&&/\b(transform|all)(,|$)/.test(o(`${qi}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function k4(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,o)=>S4(n)+S4(e[o])))}function S4(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ZE(){return document.body.offsetHeight}function eV(e,t,n){const o=e[Vc];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const hg=Symbol("_vod"),JE=Symbol("_vsh"),en={beforeMount(e,{value:t},{transition:n}){e[hg]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):zd(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),zd(e,!0),o.enter(e)):o.leave(e,()=>{zd(e,!1)}):zd(e,t))},beforeUnmount(e,{value:t}){zd(e,t)}};function zd(e,t){e.style.display=t?e[hg]:"none",e[JE]=!t}function tV(){en.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const XE=Symbol("");function nV(e){const t=at();if(!t)return;const n=t.ut=(r=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(s=>x_(s,r))},o=()=>{const r=e(t.proxy);E_(t.subTree,r),n(r)};Ct(()=>{rE(o);const r=new MutationObserver(o);r.observe(t.subTree.el.parentNode,{childList:!0}),ti(()=>r.disconnect())})}function E_(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{E_(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)x_(e.el,t);else if(e.type===fe)e.children.forEach(n=>E_(n,t));else if(e.type===ja){let{el:n,anchor:o}=e;for(;n&&(x_(n,t),n!==o);)n=n.nextSibling}}function x_(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[XE]=o}}const oV=/(^|;)\s*display\s*:/;function rV(e,t,n){const o=e.style,r=tt(n);let s=!1;if(n&&!r){if(t)if(tt(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&zm(o,l,"")}else for(const i in t)n[i]==null&&zm(o,i,"");for(const i in n)i==="display"&&(s=!0),zm(o,i,n[i])}else if(r){if(t!==n){const i=o[XE];i&&(n+=";"+i),o.cssText=n,s=oV.test(n)}}else t&&e.removeAttribute("style");hg in e&&(e[hg]=s?o.display:"",e[JE]&&(o.display="none"))}const $4=/\s*!important$/;function zm(e,t,n){if(Me(n))n.forEach(o=>zm(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=sV(e,t);$4.test(n)?e.setProperty(zo(o),n.replace($4,""),"important"):e[o]=n}}const E4=["Webkit","Moz","ms"],Bv={};function sV(e,t){const n=Bv[t];if(n)return n;let o=yn(t);if(o!=="filter"&&o in e)return Bv[t]=o;o=ql(o);for(let r=0;r<E4.length;r++){const s=E4[r]+o;if(s in e)return Bv[t]=s}return t}const x4="http://www.w3.org/1999/xlink";function iV(e,t,n,o,r){if(o&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(x4,t.slice(6,t.length)):e.setAttributeNS(x4,t,n);else{const s=UR(t);n==null||s&&!S$(n)?e.removeAttribute(t):e.setAttribute(t,s?"":n)}}function lV(e,t,n,o,r,s,i){if(t==="innerHTML"||t==="textContent"){o&&i(o,r,s),e[t]=n??"";return}const l=e.tagName;if(t==="value"&&l!=="PROGRESS"&&!l.includes("-")){const u=l==="OPTION"?e.getAttribute("value")||"":e.value,c=n??"";(u!==c||!("_value"in e))&&(e.value=c),n==null&&e.removeAttribute(t),e._value=n;return}let a=!1;if(n===""||n==null){const u=typeof e[t];u==="boolean"?n=S$(n):n==null&&u==="string"?(n="",a=!0):u==="number"&&(n=0,a=!0)}try{e[t]=n}catch{}a&&e.removeAttribute(t)}function bi(e,t,n,o){e.addEventListener(t,n,o)}function aV(e,t,n,o){e.removeEventListener(t,n,o)}const M4=Symbol("_vei");function uV(e,t,n,o,r=null){const s=e[M4]||(e[M4]={}),i=s[t];if(o&&i)i.value=o;else{const[l,a]=cV(t);if(o){const u=s[t]=pV(o,r);bi(e,l,u,a)}else i&&(aV(e,l,i,a),s[t]=void 0)}}const T4=/(?:Once|Passive|Capture)$/;function cV(e){let t;if(T4.test(e)){t={};let o;for(;o=e.match(T4);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):zo(e.slice(2)),t]}let zv=0;const dV=Promise.resolve(),fV=()=>zv||(dV.then(()=>zv=0),zv=Date.now());function pV(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;hr(hV(o,n.value),t,5,[o])};return n.value=e,n.attached=fV(),n}function hV(e,t){if(Me(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 O4=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,mV=(e,t,n,o,r,s,i,l,a)=>{const u=r==="svg";t==="class"?eV(e,o,u):t==="style"?rV(e,n,o):vu(t)?K2(t)||uV(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):gV(e,t,o,u))?lV(e,t,o,s,i,l,a):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),iV(e,t,o,u))};function gV(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&O4(t)&&Xe(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 O4(t)&&tt(n)?!1:t in e}/*! #__NO_SIDE_EFFECTS__ */function QE(e,t){const n=Q(e);class o extends b0{constructor(s){super(n,s,t)}}return o.def=n,o}/*! #__NO_SIDE_EFFECTS__ */const vV=e=>QE(e,c7),yV=typeof HTMLElement<"u"?HTMLElement:class{};class b0 extends yV{constructor(t,n={},o){super(),this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&o?o(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),ot(()=>{this._connected||(Ni(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&&!Me(s))for(const a in s){const u=s[a];(u===Number||u&&u.type===Number)&&(a in this._props&&(this._props[a]=ig(this._props[a])),(l||(l=Object.create(null)))[yn(a)]=!0)}this._numberProps=l,r&&this._resolveProps(o),this._applyStyles(i),this._update()},n=this._def.__asyncLoader;n?n().then(o=>t(o,!0)):t(this._def)}_resolveProps(t){const{props:n}=t,o=Me(n)?n:Object.keys(n||{});for(const r of Object.keys(this))r[0]!=="_"&&o.includes(r)&&this._setProp(r,this[r],!0,!1);for(const r of o.map(yn))Object.defineProperty(this,r,{get(){return this._getProp(r)},set(s){this._setProp(r,s)}})}_setAttr(t){let n=this.hasAttribute(t)?this.getAttribute(t):void 0;const o=yn(t);this._numberProps&&this._numberProps[o]&&(n=ig(n)),this._setProp(o,n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,o=!0,r=!0){n!==this._props[t]&&(this._props[t]=n,r&&this._instance&&this._update(),o&&(n===!0?this.setAttribute(zo(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(zo(t),n+""):n||this.removeAttribute(zo(t))))}_update(){Ni(this._createVNode(),this.shadowRoot)}_createVNode(){const t=k(this._def,Bt({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0;const o=(s,i)=>{this.dispatchEvent(new CustomEvent(s,{detail:i}))};n.emit=(s,...i)=>{o(s,i),zo(s)!==s&&o(zo(s),i)};let r=this;for(;r=r&&(r.parentNode||r.host);)if(r instanceof b0){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 _V(e="$style"){{const t=at();if(!t)return Wt;const n=t.type.__cssModules;if(!n)return Wt;const o=n[e];return o||Wt}}const e7=new WeakMap,t7=new WeakMap,mg=Symbol("_moveCb"),I4=Symbol("_enterCb"),n7={name:"TransitionGroup",props:Bt({},JF,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=at(),o=pw();let r,s;return Fi(()=>{if(!r.length)return;const i=e.moveClass||`${e.name||"v"}-move`;if(!SV(r[0].el,n.vnode.el,i))return;r.forEach(wV),r.forEach(CV);const l=r.filter(kV);ZE(),l.forEach(a=>{const u=a.el,c=u.style;fi(u,i),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[mg]=f=>{f&&f.target!==u||(!f||/transform$/.test(f.propertyName))&&(u.removeEventListener("transitionend",d),u[mg]=null,Qi(u,i))};u.addEventListener("transitionend",d)})}),()=>{const i=Mt(e),l=GE(i);let a=i.tag||fe;if(r=[],s)for(let u=0;u<s.length;u++){const c=s[u];c.el&&c.el instanceof Element&&(r.push(c),eu(c,Fc(c,l,o,n)),e7.set(c,c.el.getBoundingClientRect()))}s=t.default?v0(t.default()):[];for(let u=0;u<s.length;u++){const c=s[u];c.key!=null&&eu(c,Fc(c,l,o,n))}return k(a,null,s)}}},bV=e=>delete e.mode;n7.props;const w0=n7;function wV(e){const t=e.el;t[mg]&&t[mg](),t[I4]&&t[I4]()}function CV(e){t7.set(e,e.el.getBoundingClientRect())}function kV(e){const t=e7.get(e),n=t7.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 SV(e,t,n){const o=e.cloneNode(),r=e[Vc];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}=YE(o);return s.removeChild(o),i}const Bl=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Me(t)?n=>yc(t,n):t};function $V(e){e.target.composing=!0}function A4(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Pr=Symbol("_assign"),Bc={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e[Pr]=Bl(r);const s=o||r.props&&r.props.type==="number";bi(e,t?"change":"input",i=>{if(i.target.composing)return;let l=e.value;n&&(l=l.trim()),s&&(l=sg(l)),e[Pr](l)}),n&&bi(e,"change",()=>{e.value=e.value.trim()}),t||(bi(e,"compositionstart",$V),bi(e,"compositionend",A4),bi(e,"change",A4))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:r}},s){if(e[Pr]=Bl(s),e.composing)return;const i=(r||e.type==="number")&&!/^0\d/.test(e.value)?sg(e.value):e.value,l=t??"";i!==l&&(document.activeElement===e&&e.type!=="range"&&(n||o&&e.value.trim()===l)||(e.value=l))}},ru={deep:!0,created(e,t,n){e[Pr]=Bl(n),bi(e,"change",()=>{const o=e._modelValue,r=zc(e),s=e.checked,i=e[Pr];if(Me(o)){const l=c0(o,r),a=l!==-1;if(s&&!a)i(o.concat(r));else if(!s&&a){const u=[...o];u.splice(l,1),i(u)}}else if(yu(o)){const l=new Set(o);s?l.add(r):l.delete(r),i(l)}else i(r7(e,s))})},mounted:N4,beforeUpdate(e,t,n){e[Pr]=Bl(n),N4(e,t,n)}};function N4(e,{value:t,oldValue:n},o){e._modelValue=t,Me(t)?e.checked=c0(t,o.props.value)>-1:yu(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=Vl(t,r7(e,!0)))}const Xp={created(e,{value:t},n){e.checked=Vl(t,n.props.value),e[Pr]=Bl(n),bi(e,"change",()=>{e[Pr](zc(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[Pr]=Bl(o),t!==n&&(e.checked=Vl(t,o.props.value))}},o7={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=yu(t);bi(e,"change",()=>{const s=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>n?sg(zc(i)):zc(i));e[Pr](e.multiple?r?new Set(s):s:s[0]),e._assigning=!0,ot(()=>{e._assigning=!1})}),e[Pr]=Bl(o)},mounted(e,{value:t,modifiers:{number:n}}){P4(e,t)},beforeUpdate(e,t,n){e[Pr]=Bl(n)},updated(e,{value:t,modifiers:{number:n}}){e._assigning||P4(e,t)}};function P4(e,t,n){const o=e.multiple,r=Me(t);if(!(o&&!r&&!yu(t))){for(let s=0,i=e.options.length;s<i;s++){const l=e.options[s],a=zc(l);if(o)if(r){const u=typeof a;u==="string"||u==="number"?l.selected=t.some(c=>String(c)===String(a)):l.selected=c0(t,a)>-1}else l.selected=t.has(a);else if(Vl(zc(l),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!o&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function zc(e){return"_value"in e?e._value:e.value}function r7(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const s7={created(e,t,n){nm(e,t,n,null,"created")},mounted(e,t,n){nm(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){nm(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){nm(e,t,n,o,"updated")}};function i7(e,t){switch(e){case"SELECT":return o7;case"TEXTAREA":return Bc;default:switch(t){case"checkbox":return ru;case"radio":return Xp;default:return Bc}}}function nm(e,t,n,o,r){const i=i7(e.tagName,n.props&&n.props.type)[r];i&&i(e,t,n,o)}function EV(){Bc.getSSRProps=({value:e})=>({value:e}),Xp.getSSRProps=({value:e},t)=>{if(t.props&&Vl(t.props.value,e))return{checked:!0}},ru.getSSRProps=({value:e},t)=>{if(Me(e)){if(t.props&&c0(e,t.props.value)>-1)return{checked:!0}}else if(yu(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},s7.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=i7(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const xV=["ctrl","shift","alt","meta"],MV={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)=>xV.some(n=>e[`${n}Key`]&&!t.includes(n))},et=(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=MV[t[i]];if(l&&l(r,t))return}return e(r,...s)})},TV={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Pt=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=r=>{if(!("key"in r))return;const s=zo(r.key);if(t.some(i=>i===s||TV[i]===s))return e(r)})},l7=Bt({patchProp:mV},ZF);let Df,L4=!1;function a7(){return Df||(Df=ME(l7))}function u7(){return Df=L4?Df:TE(l7),L4=!0,Df}const Ni=(...e)=>{a7().render(...e)},c7=(...e)=>{u7().hydrate(...e)},ww=(...e)=>{const t=a7().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=f7(o);if(!r)return;const s=t._component;!Xe(s)&&!s.render&&!s.template&&(s.template=r.innerHTML),r.innerHTML="";const i=n(r,!1,d7(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t},OV=(...e)=>{const t=u7().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=f7(o);if(r)return n(r,!0,d7(r))},t};function d7(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function f7(e){return tt(e)?document.querySelector(e):e}let R4=!1;const IV=()=>{R4||(R4=!0,EV(),tV())},AV=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:lE,BaseTransitionPropsValidators:hw,Comment:Kn,DeprecationTypes:qF,EffectScope:J2,ErrorCodes:$D,ErrorTypeStrings:BF,Fragment:fe,KeepAlive:YD,ReactiveEffect:Rc,Static:ja,Suspense:VD,Teleport:_s,Text:Ai,TrackOpTypes:CD,Transition:_r,TransitionGroup:w0,TriggerOpTypes:kD,VueElement:b0,assertNumber:SD,callWithAsyncErrorHandling:hr,callWithErrorHandling:xi,camelize:yn,capitalize:ql,cloneVNode:hs,compatUtils:KF,computed:R,createApp:ww,createBlock:q,createCommentVNode:W,createElementBlock:M,createElementVNode:b,createHydrationRenderer:TE,createPropsRestProxy:lF,createRenderer:ME,createSSRApp:OV,createSlots:tu,createStaticVNode:DE,createTextVNode:ne,createVNode:k,customRef:U$,defineAsyncComponent:qD,defineComponent:Q,defineCustomElement:QE,defineEmits:QD,defineExpose:eF,defineModel:oF,defineOptions:tF,defineProps:XD,defineSSRCustomElement:vV,defineSlots:nF,devtools:zF,effect:qR,effectScope:E$,getCurrentInstance:at,getCurrentScope:X2,getTransitionRawChildren:v0,guardReactiveProps:_w,h:lt,handleError:bu,hasInjectionContext:gF,hydrate:c7,initCustomFormatter:FF,initDirectivesForSSR:IV,inject:Be,isMemoSame:UE,isProxy:rw,isReactive:_c,isReadonly:Dc,isRef:on,isRuntimeOnly:PF,isShallow:fp,isVNode:yo,markRaw:Ii,mergeDefaults:sF,mergeModels:iF,mergeProps:un,nextTick:ot,normalizeClass:D,normalizeProps:Z2,normalizeStyle:Qe,onActivated:uE,onBeforeMount:yd,onBeforeUnmount:En,onBeforeUpdate:dE,onDeactivated:mw,onErrorCaptured:mE,onMounted:Ct,onRenderTracked:hE,onRenderTriggered:pE,onScopeDispose:Q2,onServerPrefetch:fE,onUnmounted:ti,onUpdated:Fi,openBlock:C,popScopeId:X$,provide:wt,proxyRefs:lw,pushScopeId:J$,queuePostFlushCb:ag,reactive:Dn,readonly:_u,ref:K,registerRuntimeCompiler:zE,render:Ni,renderList:nt,renderSlot:he,resolveComponent:re,resolveDirective:zt,resolveDynamicComponent:Lt,resolveFilter:WF,resolveTransitionHooks:Fc,setBlockTracking:b_,setDevtoolsHook:jF,setTransitionHooks:eu,shallowReactive:ow,shallowReadonly:hD,shallowRef:Tn,ssrContextKey:nE,ssrUtils:UF,stop:GR,toDisplayString:A,toHandlerKey:vc,toHandlers:vE,toRaw:Mt,toRef:pn,toRefs:ei,toValue:vD,transformVNodeArgs:TF,triggerRef:gD,unref:g,useAttrs:_d,useCssModule:_V,useCssVars:nV,useModel:DF,useSSRContext:oE,useSlots:Kr,useTransitionState:pw,vModelCheckbox:ru,vModelDynamic:s7,vModelRadio:Xp,vModelSelect:o7,vModelText:Bc,vShow:en,version:WE,warn:KE,watch:Te,watchEffect:ls,watchPostEffect:rE,watchSyncEffect:sE,withAsyncContext:aF,withCtx:$,withDefaults:rF,withDirectives:He,withKeys:Pt,withMemo:VF,withModifiers:et,withScopeId:AD},Symbol.toStringTag,{value:"Module"}));/**
18 -* @vue/compiler-core v3.4.23
19 +**/let Tk;const R9=typeof window<"u"&&window.trustedTypes;if(R9)try{Tk=R9.createPolicy("vue",{createHTML:t=>t})}catch{}const uL=Tk?t=>Tk.createHTML(t):t=>t,IG="http://www.w3.org/2000/svg",LG="http://www.w3.org/1998/Math/MathML",Ka=typeof document<"u"?document:null,V9=Ka&&Ka.createElement("template"),dL={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,i)=>{const s=e==="svg"?Ka.createElementNS(IG,t):e==="mathml"?Ka.createElementNS(LG,t):n?Ka.createElement(t,{is:n}):Ka.createElement(t);return t==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:t=>Ka.createTextNode(t),createComment:t=>Ka.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Ka.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,i,s,o){const r=n?n.previousSibling:e.lastChild;if(s&&(s===o||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{V9.innerHTML=uL(i==="svg"?`<svg>${t}</svg>`:i==="mathml"?`<math>${t}</math>`:t);const a=V9.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[r?r.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},Nl="transition",Wp="animation",$f=Symbol("_vtc"),hL={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},fL=cn({},T6,hL),OG=t=>(t.displayName="Transition",t.props=fL,t),jo=OG((t,{slots:e})=>bt(CI,pL(t),e)),mu=(t,e=[])=>{Ee(t)?t.forEach(n=>n(...e)):t&&t(...e)},F9=t=>t?Ee(t)?t.some(e=>e.length>1):t.length>1:!1;function pL(t){const e={};for(const V in t)V in hL||(e[V]=t[V]);if(t.css===!1)return e;const{name:n="v",type:i,duration:s,enterFromClass:o=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:c=r,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=t,p=DG(s),m=p&&p[0],b=p&&p[1],{onBeforeEnter:w,onEnter:k,onEnterCancelled:C,onLeave:A,onLeaveCancelled:S,onBeforeAppear:M=w,onAppear:P=k,onAppearCancelled:T=C}=e,I=(V,H,F,U)=>{V._enterCancelled=U,Wl(V,H?u:a),Wl(V,H?c:r),F&&F()},L=(V,H)=>{V._isLeaving=!1,Wl(V,d),Wl(V,f),Wl(V,h),H&&H()},R=V=>(H,F)=>{const U=V?P:k,Y=()=>I(H,V,F);mu(U,[H,Y]),N9(()=>{Wl(H,V?l:o),fa(H,V?u:a),F9(U)||B9(H,i,m,Y)})};return cn(e,{onBeforeEnter(V){mu(w,[V]),fa(V,o),fa(V,r)},onBeforeAppear(V){mu(M,[V]),fa(V,l),fa(V,c)},onEnter:R(!1),onAppear:R(!0),onLeave(V,H){V._isLeaving=!0;const F=()=>L(V,H);fa(V,d),V._enterCancelled?(fa(V,h),Pk(V)):(Pk(V),fa(V,h)),N9(()=>{V._isLeaving&&(Wl(V,d),fa(V,f),F9(A)||B9(V,i,b,F))}),mu(A,[V,F])},onEnterCancelled(V){I(V,!1,void 0,!0),mu(C,[V])},onAppearCancelled(V){I(V,!0,void 0,!0),mu(T,[V])},onLeaveCancelled(V){L(V),mu(S,[V])}})}function DG(t){if(t==null)return null;if(yt(t))return[mw(t.enter),mw(t.leave)];{const e=mw(t);return[e,e]}}function mw(t){return qy(t)}function fa(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[$f]||(t[$f]=new Set)).add(e)}function Wl(t,e){e.split(/\s+/).forEach(i=>i&&t.classList.remove(i));const n=t[$f];n&&(n.delete(e),n.size||(t[$f]=void 0))}function N9(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let RG=0;function B9(t,e,n,i){const s=t._endId=++RG,o=()=>{s===t._endId&&i()};if(n!=null)return setTimeout(o,n);const{type:r,timeout:a,propCount:l}=mL(t,e);if(!r)return i();const c=r+"end";let u=0;const d=()=>{t.removeEventListener(c,h),o()},h=f=>{f.target===t&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},a+1),t.addEventListener(c,h)}function mL(t,e){const n=window.getComputedStyle(t),i=p=>(n[p]||"").split(", "),s=i(`${Nl}Delay`),o=i(`${Nl}Duration`),r=z9(s,o),a=i(`${Wp}Delay`),l=i(`${Wp}Duration`),c=z9(a,l);let u=null,d=0,h=0;e===Nl?r>0&&(u=Nl,d=r,h=o.length):e===Wp?c>0&&(u=Wp,d=c,h=l.length):(d=Math.max(r,c),u=d>0?r>c?Nl:Wp:null,h=u?u===Nl?o.length:l.length:0);const f=u===Nl&&/\b(?:transform|all)(?:,|$)/.test(i(`${Nl}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:f}}function z9(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((n,i)=>H9(n)+H9(t[i])))}function H9(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function Pk(t){return(t?t.ownerDocument:document).body.offsetHeight}function VG(t,e,n){const i=t[$f];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const i0=Symbol("_vod"),gL=Symbol("_vsh"),jt={name:"show",beforeMount(t,{value:e},{transition:n}){t[i0]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):Yp(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:i}){!e!=!n&&(i?e?(i.beforeEnter(t),Yp(t,!0),i.enter(t)):i.leave(t,()=>{Yp(t,!1)}):Yp(t,e))},beforeUnmount(t,{value:e}){Yp(t,e)}};function Yp(t,e){t.style.display=e?t[i0]:"none",t[gL]=!e}function FG(){jt.getSSRProps=({value:t})=>{if(!t)return{style:{display:"none"}}}}const vL=Symbol("");function NG(t){const e=pt();if(!e)return;const n=e.ut=(s=t(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(o=>o0(o,s))},i=()=>{const s=t(e.proxy);e.ce?o0(e.ce,s):Ik(e.subTree,s),n(s)};Eb(()=>{Mg(i)}),Nt(()=>{Te(i,Dt,{flush:"post"});const s=new MutationObserver(i);s.observe(e.subTree.el.parentNode,{childList:!0}),Sl(()=>s.disconnect())})}function Ik(t,e){if(t.shapeFlag&128){const n=t.suspense;t=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Ik(n.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)o0(t.el,e);else if(t.type===J)t.children.forEach(n=>Ik(n,e));else if(t.type===Zu){let{el:n,anchor:i}=t;for(;n&&(o0(n,e),n!==i);)n=n.nextSibling}}function o0(t,e){if(t.nodeType===1){const n=t.style;let i="";for(const s in e){const o=mY(e[s]);n.setProperty(`--${s}`,o),i+=`--${s}: ${o};`}n[vL]=i}}const BG=/(?:^|;)\s*display\s*:/;function zG(t,e,n){const i=t.style,s=Ke(n);let o=!1;if(n&&!s){if(e)if(Ke(e))for(const r of e.split(";")){const a=r.slice(0,r.indexOf(":")).trim();n[a]==null&&P_(i,a,"")}else for(const r in e)n[r]==null&&P_(i,r,"");for(const r in n)r==="display"&&(o=!0),P_(i,r,n[r])}else if(s){if(e!==n){const r=i[vL];r&&(n+=";"+r),i.cssText=n,o=BG.test(n)}}else e&&t.removeAttribute("style");i0 in t&&(t[i0]=o?i.display:"",t[gL]&&(i.display="none"))}const U9=/\s*!important$/;function P_(t,e,n){if(Ee(n))n.forEach(i=>P_(t,e,i));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const i=HG(t,e);U9.test(n)?t.setProperty(zi(i),n.replace(U9,""),"important"):t[i]=n}}const j9=["Webkit","Moz","ms"],gw={};function HG(t,e){const n=gw[e];if(n)return n;let i=Un(e);if(i!=="filter"&&i in t)return gw[e]=i;i=Gc(i);for(let s=0;s<j9.length;s++){const o=j9[s]+i;if(o in t)return gw[e]=o}return e}const W9="http://www.w3.org/1999/xlink";function Y9(t,e,n,i,s,o=fY(e)){i&&e.startsWith("xlink:")?n==null?t.removeAttributeNS(W9,e.slice(6,e.length)):t.setAttributeNS(W9,e,n):n==null||o&&!NP(n)?t.removeAttribute(e):t.setAttribute(e,o?"":mo(n)?String(n):n)}function q9(t,e,n,i,s){if(e==="innerHTML"||e==="textContent"){n!=null&&(t[e]=e==="innerHTML"?uL(n):n);return}const o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){const a=o==="OPTION"?t.getAttribute("value")||"":t.value,l=n==null?t.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in t))&&(t.value=l),n==null&&t.removeAttribute(e),t._value=n;return}let r=!1;if(n===""||n==null){const a=typeof t[e];a==="boolean"?n=NP(n):n==null&&a==="string"?(n="",r=!0):a==="number"&&(n=0,r=!0)}try{t[e]=n}catch{}r&&t.removeAttribute(s||e)}function sl(t,e,n,i){t.addEventListener(e,n,i)}function UG(t,e,n,i){t.removeEventListener(e,n,i)}const G9=Symbol("_vei");function jG(t,e,n,i,s=null){const o=t[G9]||(t[G9]={}),r=o[e];if(i&&r)r.value=i;else{const[a,l]=WG(e);if(i){const c=o[e]=GG(i,s);sl(t,a,c,l)}else r&&(UG(t,a,r,l),o[e]=void 0)}}const X9=/(?:Once|Passive|Capture)$/;function WG(t){let e;if(X9.test(t)){e={};let i;for(;i=t.match(X9);)t=t.slice(0,t.length-i[0].length),e[i[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):zi(t.slice(2)),e]}let vw=0;const YG=Promise.resolve(),qG=()=>vw||(YG.then(()=>vw=0),vw=Date.now());function GG(t,e){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;vr(XG(i,n.value),e,5,[i])};return n.value=t,n.attached=qG(),n}function XG(t,e){if(Ee(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(i=>s=>!s._stopped&&i&&i(s))}else return e}const K9=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,_L=(t,e,n,i,s,o)=>{const r=s==="svg";e==="class"?VG(t,i,r):e==="style"?zG(t,n,i):Id(e)?b6(e)||jG(t,e,n,i,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):KG(t,e,i,r))?(q9(t,e,i),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&Y9(t,e,i,r,o,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!Ke(i))?q9(t,Un(e),i,o,e):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),Y9(t,e,i,r))};function KG(t,e,n,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&K9(e)&&et(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="sandbox"&&t.tagName==="IFRAME"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const s=t.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return K9(e)&&Ke(n)?!1:e in t}const Z9={};function yL(t,e,n){let i=fe(t,e);fd(i)&&(i=cn({},i,e));class s extends Ib{constructor(r){super(i,r,n)}}return s.def=i,s}const ZG=(t,e)=>yL(t,e,TL),JG=typeof HTMLElement<"u"?HTMLElement:class{};class Ib extends JG{constructor(e,n={},i=Dg){super(),this._def=e,this._props=n,this._createApp=i,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&i!==Dg?this._root=this.shadowRoot:e.shadowRoot!==!1?(this.attachShadow(cn({},e.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof Ib){this._parent=e;break}this._instance||(this._resolved?this._mount(this._def):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,ot(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(e){for(const n of e)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let i=0;i<this.attributes.length;i++)this._setAttr(this.attributes[i].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const e=(i,s=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:o,styles:r}=i;let a;if(o&&!Ee(o))for(const l in o){const c=o[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=qy(this._props[l])),(a||(a=Object.create(null)))[Un(l)]=!0)}this._numberProps=a,this._resolveProps(i),this.shadowRoot&&this._applyStyles(r),this._mount(i)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(i=>{i.configureApp=this._def.configureApp,e(this._def=i,!0)}):e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const i in n)zt(this,i)||Object.defineProperty(this,i,{get:()=>E(n[i])})}_resolveProps(e){const{props:n}=e,i=Ee(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&i.includes(s)&&this._setProp(s,this[s]);for(const s of i.map(Un))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(o){this._setProp(s,o,!0,!this._patching)}})}_setAttr(e){if(e.startsWith("data-v-"))return;const n=this.hasAttribute(e);let i=n?this.getAttribute(e):Z9;const s=Un(e);n&&this._numberProps&&this._numberProps[s]&&(i=qy(i)),this._setProp(s,i,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,n,i=!0,s=!1){if(n!==this._props[e]&&(this._dirty=!0,n===Z9?delete this._props[e]:(this._props[e]=n,e==="key"&&this._app&&(this._app._ceVNode.key=n)),s&&this._instance&&this._update(),i)){const o=this._ob;o&&(this._processMutations(o.takeRecords()),o.disconnect()),n===!0?this.setAttribute(zi(e),""):typeof n=="string"||typeof n=="number"?this.setAttribute(zi(e),n+""):n||this.removeAttribute(zi(e)),o&&o.observe(this,{attributes:!0})}}_update(){const e=this._createVNode();this._app&&(e.appContext=this._app._context),Fc(e,this._root)}_createVNode(){const e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));const n=_(this._def,cn(e,this._props));return this._instance||(n.ce=i=>{this._instance=i,i.ce=this,i.isCE=!0;const s=(o,r)=>{this.dispatchEvent(new CustomEvent(o,fd(r[0])?cn({detail:r},r[0]):{detail:r}))};i.emit=(o,...r)=>{s(o,r),zi(o)!==o&&s(zi(o),r)},this._setParent()}),n}_applyStyles(e,n){if(!e)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const i=this._nonce;for(let s=e.length-1;s>=0;s--){const o=document.createElement("style");i&&o.setAttribute("nonce",i),o.textContent=e[s],this.shadowRoot.prepend(o)}}_parseSlots(){const e=this._slots={};let n;for(;n=this.firstChild;){const i=n.nodeType===1&&n.getAttribute("slot")||"default";(e[i]||(e[i]=[])).push(n),this.removeChild(n)}}_renderSlots(){const e=this._getSlots(),n=this._instance.type.__scopeId;for(let i=0;i<e.length;i++){const s=e[i],o=s.getAttribute("name")||"default",r=this._slots[o],a=s.parentNode;if(r)for(const l of r){if(n&&l.nodeType===1){const c=n+"-s",u=document.createTreeWalker(l,1);l.setAttribute(c,"");let d;for(;d=u.nextNode();)d.setAttribute(c,"")}a.insertBefore(l,s)}else for(;s.firstChild;)a.insertBefore(s.firstChild,s);a.removeChild(s)}}_getSlots(){const e=[this];this._teleportTargets&&e.push(...this._teleportTargets);const n=new Set;for(const i of e){const s=i.querySelectorAll("slot");for(let o=0;o<s.length;o++)n.add(s[o])}return Array.from(n)}_injectChildStyle(e){this._applyStyles(e.styles,e)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_removeChildStyle(e){}}function bL(t){const e=pt(),n=e&&e.ce;return n||null}function QG(){const t=bL();return t&&t.shadowRoot}function eX(t="$style"){{const e=pt();if(!e)return pn;const n=e.type.__cssModules;if(!n)return pn;const i=n[t];return i||pn}}const wL=new WeakMap,kL=new WeakMap,r0=Symbol("_moveCb"),J9=Symbol("_enterCb"),tX=t=>(delete t.props.mode,t),nX=tX({name:"TransitionGroup",props:cn({},fL,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=pt(),i=M6();let s,o;return xl(()=>{if(!s.length)return;const r=t.moveClass||`${t.name||"v"}-move`;if(!rX(s[0].el,n.vnode.el,r)){s=[];return}s.forEach(sX),s.forEach(iX);const a=s.filter(oX);Pk(n.vnode.el),a.forEach(l=>{const c=l.el,u=c.style;fa(c,r),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[r0]=h=>{h&&h.target!==c||(!h||h.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[r0]=null,Wl(c,r))};c.addEventListener("transitionend",d)}),s=[]}),()=>{const r=an(t),a=pL(r);let l=r.tag||J;if(s=[],o)for(let c=0;c<o.length;c++){const u=o[c];u.el&&u.el instanceof Element&&(s.push(u),yl(u,xf(u,a,i,n)),wL.set(u,{left:u.el.offsetLeft,top:u.el.offsetTop}))}o=e.default?$b(e.default()):[];for(let c=0;c<o.length;c++){const u=o[c];u.key!=null&&yl(u,xf(u,a,i,n))}return _(l,null,o)}}}),Lb=nX;function sX(t){const e=t.el;e[r0]&&e[r0](),e[J9]&&e[J9]()}function iX(t){kL.set(t,{left:t.el.offsetLeft,top:t.el.offsetTop})}function oX(t){const e=wL.get(t),n=kL.get(t),i=e.left-n.left,s=e.top-n.top;if(i||s){const o=t.el.style;return o.transform=o.webkitTransform=`translate(${i}px,${s}px)`,o.transitionDuration="0s",t}}function rX(t,e,n){const i=t.cloneNode(),s=t[$f];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&i.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&i.classList.add(a)),i.style.display="none";const o=e.nodeType===1?e:e.parentNode;o.appendChild(i);const{hasTransform:r}=mL(i);return o.removeChild(i),r}const Vc=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Ee(e)?n=>Qh(e,n):e};function aX(t){t.target.composing=!0}function Q9(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const hr=Symbol("_assign");function e7(t,e,n){return e&&(t=t.trim()),n&&(t=mb(t)),t}const gd={created(t,{modifiers:{lazy:e,trim:n,number:i}},s){t[hr]=Vc(s);const o=i||s.props&&s.props.type==="number";sl(t,e?"change":"input",r=>{r.target.composing||t[hr](e7(t.value,n,o))}),(n||o)&&sl(t,"change",()=>{t.value=e7(t.value,n,o)}),e||(sl(t,"compositionstart",aX),sl(t,"compositionend",Q9),sl(t,"change",Q9))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:i,trim:s,number:o}},r){if(t[hr]=Vc(r),t.composing)return;const a=(o||t.type==="number")&&!/^0\d/.test(t.value)?mb(t.value):t.value,l=e??"";a!==l&&(document.activeElement===t&&t.type!=="range"&&(i&&e===n||s&&t.value.trim()===l)||(t.value=l))}},P1={deep:!0,created(t,e,n){t[hr]=Vc(n),sl(t,"change",()=>{const i=t._modelValue,s=Af(t),o=t.checked,r=t[hr];if(Ee(i)){const a=vb(i,s),l=a!==-1;if(o&&!l)r(i.concat(s));else if(!o&&l){const c=[...i];c.splice(a,1),r(c)}}else if(Ld(i)){const a=new Set(i);o?a.add(s):a.delete(s),r(a)}else r(xL(t,o))})},mounted:t7,beforeUpdate(t,e,n){t[hr]=Vc(n),t7(t,e,n)}};function t7(t,{value:e,oldValue:n},i){t._modelValue=e;let s;if(Ee(e))s=vb(e,i.props.value)>-1;else if(Ld(e))s=e.has(i.props.value);else{if(e===n)return;s=Dc(e,xL(t,!0))}t.checked!==s&&(t.checked=s)}const I1={created(t,{value:e},n){t.checked=Dc(e,n.props.value),t[hr]=Vc(n),sl(t,"change",()=>{t[hr](Af(t))})},beforeUpdate(t,{value:e,oldValue:n},i){t[hr]=Vc(i),e!==n&&(t.checked=Dc(e,i.props.value))}},CL={deep:!0,created(t,{value:e,modifiers:{number:n}},i){const s=Ld(e);sl(t,"change",()=>{const o=Array.prototype.filter.call(t.options,r=>r.selected).map(r=>n?mb(Af(r)):Af(r));t[hr](t.multiple?s?new Set(o):o:o[0]),t._assigning=!0,ot(()=>{t._assigning=!1})}),t[hr]=Vc(i)},mounted(t,{value:e}){n7(t,e)},beforeUpdate(t,e,n){t[hr]=Vc(n)},updated(t,{value:e}){t._assigning||n7(t,e)}};function n7(t,e){const n=t.multiple,i=Ee(e);if(!(n&&!i&&!Ld(e))){for(let s=0,o=t.options.length;s<o;s++){const r=t.options[s],a=Af(r);if(n)if(i){const l=typeof a;l==="string"||l==="number"?r.selected=e.some(c=>String(c)===String(a)):r.selected=vb(e,a)>-1}else r.selected=e.has(a);else if(Dc(Af(r),e)){t.selectedIndex!==s&&(t.selectedIndex=s);return}}!n&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function Af(t){return"_value"in t?t._value:t.value}function xL(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const SL={created(t,e,n){jv(t,e,n,null,"created")},mounted(t,e,n){jv(t,e,n,null,"mounted")},beforeUpdate(t,e,n,i){jv(t,e,n,i,"beforeUpdate")},updated(t,e,n,i){jv(t,e,n,i,"updated")}};function $L(t,e){switch(t){case"SELECT":return CL;case"TEXTAREA":return gd;default:switch(e){case"checkbox":return P1;case"radio":return I1;default:return gd}}}function jv(t,e,n,i,s){const r=$L(t.tagName,n.props&&n.props.type)[s];r&&r(t,e,n,i)}function lX(){gd.getSSRProps=({value:t})=>({value:t}),I1.getSSRProps=({value:t},e)=>{if(e.props&&Dc(e.props.value,t))return{checked:!0}},P1.getSSRProps=({value:t},e)=>{if(Ee(t)){if(e.props&&vb(t,e.props.value)>-1)return{checked:!0}}else if(Ld(t)){if(e.props&&t.has(e.props.value))return{checked:!0}}else if(t)return{checked:!0}},SL.getSSRProps=(t,e)=>{if(typeof e.type!="string")return;const n=$L(e.type.toUpperCase(),e.props&&e.props.type);if(n.getSSRProps)return n.getSSRProps(t,e)}}const cX=["ctrl","shift","alt","meta"],uX={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>cX.some(n=>t[`${n}Key`]&&!e.includes(n))},Me=(t,e)=>{const n=t._withMods||(t._withMods={}),i=e.join(".");return n[i]||(n[i]=(s,...o)=>{for(let r=0;r<e.length;r++){const a=uX[e[r]];if(a&&a(s,e))return}return t(s,...o)})},dX={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ut=(t,e)=>{const n=t._withKeys||(t._withKeys={}),i=e.join(".");return n[i]||(n[i]=s=>{if(!("key"in s))return;const o=zi(s.key);if(e.some(r=>r===o||dX[r]===o))return t(s)})},AL=cn({patchProp:_L},dL);let Km,s7=!1;function EL(){return Km||(Km=jI(AL))}function ML(){return Km=s7?Km:WI(AL),s7=!0,Km}const Fc=(...t)=>{EL().render(...t)},hX=(...t)=>{ML().hydrate(...t)},Dg=(...t)=>{const e=EL().createApp(...t),{mount:n}=e;return e.mount=i=>{const s=IL(i);if(!s)return;const o=e._component;!et(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const r=n(s,!1,PL(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},e},TL=(...t)=>{const e=ML().createApp(...t),{mount:n}=e;return e.mount=i=>{const s=IL(i);if(s)return n(s,!0,PL(s))},e};function PL(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function IL(t){return Ke(t)?document.querySelector(t):t}let i7=!1;const fX=()=>{i7||(i7=!0,lX(),FG())},pX=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:CI,BaseTransitionPropsValidators:T6,Comment:Zn,DeprecationTypes:PG,EffectScope:k6,ErrorCodes:JY,ErrorTypeStrings:xG,Fragment:J,KeepAlive:Sq,ReactiveEffect:$g,Static:Zu,Suspense:lG,Teleport:na,Text:$a,TrackOpTypes:WY,Transition:jo,TransitionGroup:Lb,TriggerOpTypes:YY,VueElement:Ib,assertNumber:ZY,callWithAsyncErrorHandling:vr,callWithErrorHandling:ap,camelize:Un,capitalize:Gc,cloneVNode:_r,compatUtils:TG,computed:W,createApp:Dg,createBlock:D,createCommentVNode:O,createElementBlock:$,createElementVNode:g,createHydrationRenderer:WI,createPropsRestProxy:Fq,createRenderer:jI,createSSRApp:TL,createSlots:hs,createStaticVNode:xr,createTextVNode:N,createVNode:_,customRef:iI,defineAsyncComponent:Cq,defineComponent:fe,defineCustomElement:yL,defineEmits:Tq,defineExpose:Pq,defineModel:Oq,defineOptions:Iq,defineProps:Mq,defineSSRCustomElement:ZG,defineSlots:Lq,devtools:SG,effect:vY,effectScope:_b,getCurrentInstance:pt,getCurrentScope:yb,getCurrentWatcher:qY,getTransitionRawChildren:$b,guardReactiveProps:of,h:bt,handleError:Od,hasInjectionContext:hI,hydrate:hX,hydrateOnIdle:vq,hydrateOnInteraction:wq,hydrateOnMediaQuery:bq,hydrateOnVisible:yq,initCustomFormatter:kG,initDirectivesForSSR:fX,inject:qe,isMemoSame:aL,isProxy:A1,isReactive:Br,isReadonly:Ma,isRef:hn,isRuntimeOnly:yG,isShallow:uo,isVNode:is,markRaw:Xs,mergeDefaults:Rq,mergeModels:Vq,mergeProps:Yt,nextTick:ot,nodeOps:dL,normalizeClass:q,normalizeProps:ef,normalizeStyle:Xe,onActivated:I6,onBeforeMount:Dd,onBeforeUnmount:wn,onBeforeUpdate:Eb,onDeactivated:L6,onErrorCaptured:MI,onMounted:Nt,onRenderTracked:EI,onRenderTriggered:AI,onScopeDispose:bb,onServerPrefetch:$I,onUnmounted:Sl,onUpdated:xl,onWatcherCleanup:rI,openBlock:v,patchProp:_L,popScopeId:sq,provide:Pt,proxyRefs:A6,pushScopeId:nq,queuePostFlushCb:Mg,reactive:In,readonly:Rc,ref:ee,registerRuntimeCompiler:iL,render:Fc,renderList:ye,renderSlot:le,resolveComponent:B,resolveDirective:xt,resolveDynamicComponent:Ct,resolveFilter:MG,resolveTransitionHooks:xf,setBlockTracking:Og,setDevtoolsHook:$G,setTransitionHooks:yl,shallowReactive:$6,shallowReadonly:VY,shallowRef:Fn,ssrContextKey:fI,ssrUtils:EG,stop:_Y,toDisplayString:x,toHandlerKey:Gu,toHandlers:Mb,toRaw:an,toRef:Sn,toRefs:go,toValue:vk,transformVNodeArgs:pG,triggerRef:Ym,unref:E,useAttrs:Rd,useCssModule:eX,useCssVars:NG,useHost:bL,useId:cq,useModel:qq,useSSRContext:pI,useShadowRoot:QG,useSlots:gi,useTemplateRef:uq,useTransitionState:M6,vModelCheckbox:P1,vModelDynamic:SL,vModelRadio:I1,vModelSelect:CL,vModelText:gd,vShow:jt,version:lL,warn:cL,watch:Te,watchEffect:_l,watchPostEffect:oq,watchSyncEffect:mI,withAsyncContext:Nq,withCtx:y,withDefaults:Dq,withDirectives:Re,withKeys:ut,withMemo:CG,withModifiers:Me,withScopeId:iq},Symbol.toStringTag,{value:"Module"}));/**
20 +* @vue/compiler-core v3.5.27
19 21 * (c) 2018-present Yuxi (Evan) You and Vue contributors
20 22 * @license MIT
21 -**/const _p=Symbol(""),Ff=Symbol(""),Cw=Symbol(""),gg=Symbol(""),p7=Symbol(""),su=Symbol(""),h7=Symbol(""),m7=Symbol(""),kw=Symbol(""),Sw=Symbol(""),Qp=Symbol(""),$w=Symbol(""),g7=Symbol(""),Ew=Symbol(""),xw=Symbol(""),Mw=Symbol(""),Tw=Symbol(""),Ow=Symbol(""),Iw=Symbol(""),v7=Symbol(""),y7=Symbol(""),C0=Symbol(""),vg=Symbol(""),Aw=Symbol(""),Nw=Symbol(""),bp=Symbol(""),eh=Symbol(""),Pw=Symbol(""),M_=Symbol(""),NV=Symbol(""),T_=Symbol(""),yg=Symbol(""),PV=Symbol(""),LV=Symbol(""),Lw=Symbol(""),RV=Symbol(""),DV=Symbol(""),Rw=Symbol(""),_7=Symbol(""),jc={[_p]:"Fragment",[Ff]:"Teleport",[Cw]:"Suspense",[gg]:"KeepAlive",[p7]:"BaseTransition",[su]:"openBlock",[h7]:"createBlock",[m7]:"createElementBlock",[kw]:"createVNode",[Sw]:"createElementVNode",[Qp]:"createCommentVNode",[$w]:"createTextVNode",[g7]:"createStaticVNode",[Ew]:"resolveComponent",[xw]:"resolveDynamicComponent",[Mw]:"resolveDirective",[Tw]:"resolveFilter",[Ow]:"withDirectives",[Iw]:"renderList",[v7]:"renderSlot",[y7]:"createSlots",[C0]:"toDisplayString",[vg]:"mergeProps",[Aw]:"normalizeClass",[Nw]:"normalizeStyle",[bp]:"normalizeProps",[eh]:"guardReactiveProps",[Pw]:"toHandlers",[M_]:"camelize",[NV]:"capitalize",[T_]:"toHandlerKey",[yg]:"setBlockTracking",[PV]:"pushScopeId",[LV]:"popScopeId",[Lw]:"withCtx",[RV]:"unref",[DV]:"isRef",[Rw]:"withMemo",[_7]:"isMemoSame"};function FV(e){Object.getOwnPropertySymbols(e).forEach(t=>{jc[t]=e[t]})}const br={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function VV(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:br}}function wp(e,t,n,o,r,s,i,l=!1,a=!1,u=!1,c=br){return e&&(l?(e.helper(su),e.helper(Wc(e.inSSR,u))):e.helper(Uc(e.inSSR,u)),i&&e.helper(Ow)),{type:13,tag:t,props:n,children:o,patchFlag:r,dynamicProps:s,directives:i,isBlock:l,disableTracking:a,isComponent:u,loc:c}}function th(e,t=br){return{type:17,loc:t,elements:e}}function Ir(e,t=br){return{type:15,loc:t,properties:e}}function $n(e,t){return{type:16,loc:br,key:tt(e)?St(e,!0):e,value:t}}function St(e,t=!1,n=br,o=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:o}}function as(e,t=br){return{type:8,loc:t,children:e}}function Vn(e,t=[],n=br){return{type:14,loc:n,callee:e,arguments:t}}function Hc(e,t=void 0,n=!1,o=!1,r=br){return{type:18,params:e,returns:t,newline:n,isSlot:o,loc:r}}function O_(e,t,n,o=!0){return{type:19,test:e,consequent:t,alternate:n,newline:o,loc:br}}function BV(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:br}}function zV(e){return{type:21,body:e,loc:br}}function Uc(e,t){return e||t?kw:Sw}function Wc(e,t){return e||t?h7:m7}function Dw(e,{helper:t,removeHelper:n,inSSR:o}){e.isBlock||(e.isBlock=!0,n(Uc(o,e.isComponent)),t(su),t(Wc(o,e.isComponent)))}const D4=new Uint8Array([123,123]),F4=new Uint8Array([125,125]);function V4(e){return e>=97&&e<=122||e>=65&&e<=90}function lr(e){return e===32||e===10||e===9||e===12||e===13}function Gi(e){return e===47||e===62||lr(e)}function _g(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}const uo={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class jV{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=D4,this.delimiterClose=F4,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=D4,this.delimiterClose=F4}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?Gi(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!n){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(t)}stateInRCDATA(t){if(this.sequenceIndex===this.currentSequence.length){if(t===62||lr(t)){const n=this.index-this.currentSequence.length;if(this.sectionStart<n){const o=this.index;this.index=n,this.cbs.ontext(this.sectionStart,n),this.index=o}this.sectionStart=n+2,this.stateInClosingTagName(t),this.inRCDATA=!1;return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===uo.TitleEnd||this.currentSequence===uo.TextareaEnd&&!this.inSFCRoot?t===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(t)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===60)}stateCDATASequence(t){t===uo.Cdata[this.sequenceIndex]?++this.sequenceIndex===uo.Cdata.length&&(this.state=28,this.currentSequence=uo.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);if(n===10&&this.newlines.push(this.index),n===t)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===uo.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(t,n){this.enterRCDATA(t,n),this.state=31}enterRCDATA(t,n){this.inRCDATA=!0,this.currentSequence=t,this.sequenceIndex=n}stateBeforeTagName(t){t===33?(this.state=22,this.sectionStart=this.index+1):t===63?(this.state=24,this.sectionStart=this.index+1):V4(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){Gi(t)&&this.handleTagName(t)}stateInSFCRootTagName(t){if(Gi(t)){const n=this.buffer.slice(this.sectionStart,this.index);n!=="template"&&this.enterRCDATA(_g("</"+n),0),this.handleTagName(t)}}handleTagName(t){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(t)}stateBeforeClosingTagName(t){lr(t)||(t===62?(this.state=1,this.sectionStart=this.index+1):(this.state=V4(t)?9:27,this.sectionStart=this.index))}stateInClosingTagName(t){(t===62||lr(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){t===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(t){t===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):t===47?this.state=7:t===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):lr(t)||this.handleAttrStart(t)}handleAttrStart(t){t===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):t===46||t===58||t===64||t===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):lr(t)||(this.state=11,this.stateBeforeAttrName(t))}stateInAttrName(t){(t===61||Gi(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(t))}stateInDirName(t){t===61||Gi(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||Gi(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||Gi(t))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(t))}stateInDirModifier(t){t===61||Gi(t)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(t)):t===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(t){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(t)}stateAfterAttrName(t){t===61?this.state=18:t===47||t===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(t)):lr(t)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(t))}stateBeforeAttrValue(t){t===34?(this.state=19,this.sectionStart=this.index+1):t===39?(this.state=20,this.sectionStart=this.index+1):lr(t)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(t))}handleInAttrValue(t,n){(t===n||this.fastForwardTo(n))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(n===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(t){this.handleInAttrValue(t,34)}stateInAttrValueSingleQuotes(t){this.handleInAttrValue(t,39)}stateInAttrValueNoQuotes(t){lr(t)||t===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(t)):(t===39||t===60||t===61||t===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(t){t===91?(this.state=26,this.sequenceIndex=0):this.state=t===45?25:23}stateInDeclaration(t){(t===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(t){t===45?(this.state=28,this.currentSequence=uo.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(t){(t===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){t===uo.ScriptEnd[3]?this.startSpecial(uo.ScriptEnd,4):t===uo.StyleEnd[3]?this.startSpecial(uo.StyleEnd,4):(this.state=6,this.stateInTagName(t))}stateBeforeSpecialT(t){t===uo.TitleEnd[3]?this.startSpecial(uo.TitleEnd,4):t===uo.TextareaEnd[3]?this.startSpecial(uo.TextareaEnd,4):(this.state=6,this.stateInTagName(t))}startEntity(){}stateInEntity(){}parse(t){for(this.buffer=t;this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);switch(n===10&&this.newlines.push(this.index),this.state){case 1:{this.stateText(n);break}case 2:{this.stateInterpolationOpen(n);break}case 3:{this.stateInterpolation(n);break}case 4:{this.stateInterpolationClose(n);break}case 31:{this.stateSpecialStartSequence(n);break}case 32:{this.stateInRCDATA(n);break}case 26:{this.stateCDATASequence(n);break}case 19:{this.stateInAttrValueDoubleQuotes(n);break}case 12:{this.stateInAttrName(n);break}case 13:{this.stateInDirName(n);break}case 14:{this.stateInDirArg(n);break}case 15:{this.stateInDynamicDirArg(n);break}case 16:{this.stateInDirModifier(n);break}case 28:{this.stateInCommentLike(n);break}case 27:{this.stateInSpecialComment(n);break}case 11:{this.stateBeforeAttrName(n);break}case 6:{this.stateInTagName(n);break}case 34:{this.stateInSFCRootTagName(n);break}case 9:{this.stateInClosingTagName(n);break}case 5:{this.stateBeforeTagName(n);break}case 17:{this.stateAfterAttrName(n);break}case 20:{this.stateInAttrValueSingleQuotes(n);break}case 18:{this.stateBeforeAttrValue(n);break}case 8:{this.stateBeforeClosingTagName(n);break}case 10:{this.stateAfterClosingTagName(n);break}case 29:{this.stateBeforeSpecialS(n);break}case 30:{this.stateBeforeSpecialT(n);break}case 21:{this.stateInAttrValueNoQuotes(n);break}case 7:{this.stateInSelfClosingTag(n);break}case 23:{this.stateInDeclaration(n);break}case 22:{this.stateBeforeDeclaration(n);break}case 25:{this.stateBeforeComment(n);break}case 24:{this.stateInProcessingInstruction(n);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const t=this.buffer.length;this.sectionStart>=t||(this.state===28?this.currentSequence===uo.CdataEnd?this.cbs.oncdata(this.sectionStart,t):this.cbs.oncomment(this.sectionStart,t):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,n){}}function B4(e,{compatConfig:t}){const n=t&&t[e];return e==="MODE"?n||3:n}function Ha(e,t){const n=B4("MODE",t),o=B4(e,t);return n===3?o===!0:o!==!1}function Cp(e,t,n,...o){return Ha(e,t)}function Fw(e){throw e}function b7(e){}function vn(e,t,n,o){const r=`https://vuejs.org/error-reference/#compiler-${e}`,s=new SyntaxError(String(r));return s.code=e,s.loc=t,s}const Ho=e=>e.type===4&&e.isStatic;function w7(e){switch(e){case"Teleport":case"teleport":return Ff;case"Suspense":case"suspense":return Cw;case"KeepAlive":case"keep-alive":return gg;case"BaseTransition":case"base-transition":return p7}}const HV=/^\d|[^\$\w]/,Vw=e=>!HV.test(e),UV=/[A-Za-z_$\xA0-\uFFFF]/,WV=/[\.\?\w$\xA0-\uFFFF]/,KV=/\s+[.[]\s*|\s*[.[]\s+/g,qV=e=>{e=e.trim().replace(KV,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?UV:WV).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},C7=qV;function ts(e,t,n=!1){for(let o=0;o<e.props.length;o++){const r=e.props[o];if(r.type===7&&(n||r.exp)&&(tt(t)?r.name===t:t.test(r.name)))return r}}function k0(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)&&Ta(s.arg,t))return s}}function Ta(e,t){return!!(e&&Ho(e)&&e.content===t)}function GV(e){return e.props.some(t=>t.type===7&&t.name==="bind"&&(!t.arg||t.arg.type!==4||!t.arg.isStatic))}function jv(e){return e.type===5||e.type===2}function YV(e){return e.type===7&&e.name==="slot"}function bg(e){return e.type===1&&e.tagType===3}function wg(e){return e.type===1&&e.tagType===2}const ZV=new Set([bp,eh]);function k7(e,t=[]){if(e&&!tt(e)&&e.type===14){const n=e.callee;if(!tt(n)&&ZV.has(n))return k7(e.arguments[0],t.concat(e))}return[e,t]}function Cg(e,t,n){let o,r=e.type===13?e.props:e.arguments[2],s=[],i;if(r&&!tt(r)&&r.type===14){const l=k7(r);r=l[0],s=l[1],i=s[s.length-1]}if(r==null||tt(r))o=Ir([t]);else if(r.type===14){const l=r.arguments[0];!tt(l)&&l.type===15?z4(t,l)||l.properties.unshift(t):r.callee===Pw?o=Vn(n.helper(vg),[Ir([t]),r]):r.arguments.unshift(Ir([t])),!o&&(o=r)}else r.type===15?(z4(t,r)||r.properties.unshift(t),o=r):(o=Vn(n.helper(vg),[Ir([t]),r]),i&&i.callee===eh&&(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 z4(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 kp(e,t){return`_${t}_${e.replace(/[^\w]/g,(n,o)=>n==="-"?"_":e.charCodeAt(o).toString())}`}function JV(e){return e.type===14&&e.callee===Rw?e.arguments[1].returns:e}const XV=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,S7={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:Dm,isPreTag:Dm,isCustomElement:Dm,onError:Fw,onWarn:b7,comments:!1,prefixIdentifiers:!1};let Gt=S7,Sp=null,Mi="",po=null,Ft=null,Do="",pi=-1,ga=-1,kg=0,vl=!1,I_=null;const Cn=[],Sn=new jV(Cn,{onerr:ai,ontext(e,t){om(Jn(e,t),e,t)},ontextentity(e,t,n){om(e,t,n)},oninterpolation(e,t){if(vl)return om(Jn(e,t),e,t);let n=e+Sn.delimiterOpen.length,o=t-Sn.delimiterClose.length;for(;lr(Mi.charCodeAt(n));)n++;for(;lr(Mi.charCodeAt(o-1));)o--;let r=Jn(n,o);r.includes("&")&&(r=Gt.decodeEntities(r,!1)),A_({type:5,content:Hm(r,!1,Fn(n,o)),loc:Fn(e,t)})},onopentagname(e,t){const n=Jn(e,t);po={type:1,tag:n,ns:Gt.getNamespace(n,Cn[0],Gt.ns),tagType:0,props:[],children:[],loc:Fn(e-1,t),codegenNode:void 0}},onopentagend(e){H4(e)},onclosetag(e,t){const n=Jn(e,t);if(!Gt.isVoidTag(n)){let o=!1;for(let r=0;r<Cn.length;r++)if(Cn[r].tag.toLowerCase()===n.toLowerCase()){o=!0,r>0&&ai(24,Cn[0].loc.start.offset);for(let i=0;i<=r;i++){const l=Cn.shift();jm(l,t,i<r)}break}o||ai(23,$7(e,60))}},onselfclosingtag(e){var t;const n=po.tag;po.isSelfClosing=!0,H4(e),((t=Cn[0])==null?void 0:t.tag)===n&&jm(Cn.shift(),e)},onattribname(e,t){Ft={type:6,name:Jn(e,t),nameLoc:Fn(e,t),value:void 0,loc:Fn(e)}},ondirname(e,t){const n=Jn(e,t),o=n==="."||n===":"?"bind":n==="@"?"on":n==="#"?"slot":n.slice(2);if(!vl&&o===""&&ai(26,e),vl||o==="")Ft={type:6,name:n,nameLoc:Fn(e,t),value:void 0,loc:Fn(e)};else if(Ft={type:7,name:o,rawName:n,exp:void 0,arg:void 0,modifiers:n==="."?["prop"]:[],loc:Fn(e)},o==="pre"){vl=Sn.inVPre=!0,I_=po;const r=po.props;for(let s=0;s<r.length;s++)r[s].type===7&&(r[s]=aB(r[s]))}},ondirarg(e,t){if(e===t)return;const n=Jn(e,t);if(vl)Ft.name+=n,Oa(Ft.nameLoc,t);else{const o=n[0]!=="[";Ft.arg=Hm(o?n:n.slice(1,-1),o,Fn(e,t),o?3:0)}},ondirmodifier(e,t){const n=Jn(e,t);if(vl)Ft.name+="."+n,Oa(Ft.nameLoc,t);else if(Ft.name==="slot"){const o=Ft.arg;o&&(o.content+="."+n,Oa(o.loc,t))}else Ft.modifiers.push(n)},onattribdata(e,t){Do+=Jn(e,t),pi<0&&(pi=e),ga=t},onattribentity(e,t,n){Do+=e,pi<0&&(pi=t),ga=n},onattribnameend(e){const t=Ft.loc.start.offset,n=Jn(t,e);Ft.type===7&&(Ft.rawName=n),po.props.some(o=>(o.type===7?o.rawName:o.name)===n)&&ai(2,t)},onattribend(e,t){if(po&&Ft){if(Oa(Ft.loc,t),e!==0)if(Do.includes("&")&&(Do=Gt.decodeEntities(Do,!0)),Ft.type===6)Ft.name==="class"&&(Do=x7(Do).trim()),e===1&&!Do&&ai(13,t),Ft.value={type:2,content:Do,loc:e===1?Fn(pi,ga):Fn(pi-1,ga+1)},Sn.inSFCRoot&&po.tag==="template"&&Ft.name==="lang"&&Do&&Do!=="html"&&Sn.enterRCDATA(_g("</template"),0);else{let n=0;Ft.exp=Hm(Do,!1,Fn(pi,ga),0,n),Ft.name==="for"&&(Ft.forParseResult=eB(Ft.exp));let o=-1;Ft.name==="bind"&&(o=Ft.modifiers.indexOf("sync"))>-1&&Cp("COMPILER_V_BIND_SYNC",Gt,Ft.loc,Ft.rawName)&&(Ft.name="model",Ft.modifiers.splice(o,1))}(Ft.type!==7||Ft.name!=="pre")&&po.props.push(Ft)}Do="",pi=ga=-1},oncomment(e,t){Gt.comments&&A_({type:3,content:Jn(e,t),loc:Fn(e-4,t+3)})},onend(){const e=Mi.length;for(let t=0;t<Cn.length;t++)jm(Cn[t],e-1),ai(24,Cn[t].loc.start.offset)},oncdata(e,t){Cn[0].ns!==0?om(Jn(e,t),e,t):ai(1,e-9)},onprocessinginstruction(e){(Cn[0]?Cn[0].ns:Gt.ns)===0&&ai(21,e-1)}}),j4=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,QV=/^\(|\)$/g;function eB(e){const t=e.loc,n=e.content,o=n.match(XV);if(!o)return;const[,r,s]=o,i=(d,f,p=!1)=>{const h=t.start.offset+f,m=h+d.length;return Hm(d,!1,Fn(h,m),0,p?1:0)},l={source:i(s.trim(),n.indexOf(s,r.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let a=r.trim().replace(QV,"").trim();const u=r.indexOf(a),c=a.match(j4);if(c){a=a.replace(j4,"").trim();const d=c[1].trim();let f;if(d&&(f=n.indexOf(d,u+a.length),l.key=i(d,f,!0)),c[2]){const p=c[2].trim();p&&(l.index=i(p,n.indexOf(p,l.key?f+d.length:u+a.length),!0))}}return a&&(l.value=i(a,u,!0)),l}function Jn(e,t){return Mi.slice(e,t)}function H4(e){Sn.inSFCRoot&&(po.innerLoc=Fn(e+1,e+1)),A_(po);const{tag:t,ns:n}=po;n===0&&Gt.isPreTag(t)&&kg++,Gt.isVoidTag(t)?jm(po,e):(Cn.unshift(po),(n===1||n===2)&&(Sn.inXML=!0)),po=null}function om(e,t,n){var o;{const i=(o=Cn[0])==null?void 0:o.tag;i!=="script"&&i!=="style"&&e.includes("&")&&(e=Gt.decodeEntities(e,!1))}const r=Cn[0]||Sp,s=r.children[r.children.length-1];(s==null?void 0:s.type)===2?(s.content+=e,Oa(s.loc,n)):r.children.push({type:2,content:e,loc:Fn(t,n)})}function jm(e,t,n=!1){n?Oa(e.loc,$7(t,60)):Oa(e.loc,tB(t,62)+1),Sn.inSFCRoot&&(e.children.length?e.innerLoc.end=Bt({},e.children[e.children.length-1].loc.end):e.innerLoc.end=Bt({},e.innerLoc.start),e.innerLoc.source=Jn(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:o,ns:r}=e;vl||(o==="slot"?e.tagType=2:U4(e)?e.tagType=3:oB(e)&&(e.tagType=1)),Sn.inRCDATA||(e.children=E7(e.children,e.tag)),r===0&&Gt.isPreTag(o)&&kg--,I_===e&&(vl=Sn.inVPre=!1,I_=null),Sn.inXML&&(Cn[0]?Cn[0].ns:Gt.ns)===0&&(Sn.inXML=!1);{const s=e.props;if(!Sn.inSFCRoot&&Ha("COMPILER_NATIVE_TEMPLATE",Gt)&&e.tag==="template"&&!U4(e)){const l=Cn[0]||Sp,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&&Cp("COMPILER_INLINE_TEMPLATE",Gt,i.loc)&&e.children.length&&(i.value={type:2,content:Jn(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:i.loc})}}function tB(e,t){let n=e;for(;Mi.charCodeAt(n)!==t&&n<Mi.length-1;)n++;return n}function $7(e,t){let n=e;for(;Mi.charCodeAt(n)!==t&&n>=0;)n--;return n}const nB=new Set(["if","else","else-if","for","slot"]);function U4({tag:e,props:t}){if(e==="template"){for(let n=0;n<t.length;n++)if(t[n].type===7&&nB.has(t[n].name))return!0}return!1}function oB({tag:e,props:t}){var n;if(Gt.isCustomElement(e))return!1;if(e==="component"||rB(e.charCodeAt(0))||w7(e)||(n=Gt.isBuiltInComponent)!=null&&n.call(Gt,e)||Gt.isNativeTag&&!Gt.isNativeTag(e))return!0;for(let o=0;o<t.length;o++){const r=t[o];if(r.type===6){if(r.name==="is"&&r.value){if(r.value.content.startsWith("vue:"))return!0;if(Cp("COMPILER_IS_ON_ELEMENT",Gt,r.loc))return!0}}else if(r.name==="bind"&&Ta(r.arg,"is")&&Cp("COMPILER_IS_ON_ELEMENT",Gt,r.loc))return!0}return!1}function rB(e){return e>64&&e<91}const sB=/\r\n/g;function E7(e,t){var n,o;const r=Gt.whitespace!=="preserve";let s=!1;for(let i=0;i<e.length;i++){const l=e[i];if(l.type===2)if(kg)l.content=l.content.replace(sB,`
22 -`);else if(iB(l.content)){const a=(n=e[i-1])==null?void 0:n.type,u=(o=e[i+1])==null?void 0:o.type;!a||!u||r&&(a===3&&(u===3||u===1)||a===1&&(u===3||u===1&&lB(l.content)))?(s=!0,e[i]=null):l.content=" "}else r&&(l.content=x7(l.content))}if(kg&&t&&Gt.isPreTag(t)){const i=e[0];i&&i.type===2&&(i.content=i.content.replace(/^\r?\n/,""))}return s?e.filter(Boolean):e}function iB(e){for(let t=0;t<e.length;t++)if(!lr(e.charCodeAt(t)))return!1;return!0}function lB(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n===10||n===13)return!0}return!1}function x7(e){let t="",n=!1;for(let o=0;o<e.length;o++)lr(e.charCodeAt(o))?n||(t+=" ",n=!0):(t+=e[o],n=!1);return t}function A_(e){(Cn[0]||Sp).children.push(e)}function Fn(e,t){return{start:Sn.getPos(e),end:t==null?t:Sn.getPos(t),source:t==null?t:Jn(e,t)}}function Oa(e,t){e.end=Sn.getPos(t),e.source=Jn(e.start.offset,t)}function aB(e){const t={type:6,name:e.rawName,nameLoc:Fn(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 Hm(e,t=!1,n,o=0,r=0){return St(e,t,n,o)}function ai(e,t,n){Gt.onError(vn(e,Fn(t,t)))}function uB(){Sn.reset(),po=null,Ft=null,Do="",pi=-1,ga=-1,Cn.length=0}function cB(e,t){if(uB(),Mi=e,Gt=Bt({},S7),t){let r;for(r in t)t[r]!=null&&(Gt[r]=t[r])}Sn.mode=Gt.parseMode==="html"?1:Gt.parseMode==="sfc"?2:0,Sn.inXML=Gt.ns===1||Gt.ns===2;const n=t==null?void 0:t.delimiters;n&&(Sn.delimiterOpen=_g(n[0]),Sn.delimiterClose=_g(n[1]));const o=Sp=VV([],e);return Sn.parse(Mi),o.loc=Fn(0,e.length),o.children=E7(o.children),Sp=null,o}function dB(e,t){Um(e,t,M7(e,e.children[0]))}function M7(e,t){const{children:n}=e;return n.length===1&&t.type===1&&!wg(t)}function Um(e,t,n=!1){const{children:o}=e,r=o.length;let s=0;for(let i=0;i<o.length;i++){const l=o[i];if(l.type===1&&l.tagType===0){const a=n?0:Ar(l,t);if(a>0){if(a>=2){l.codegenNode.patchFlag="-1",l.codegenNode=t.hoist(l.codegenNode),s++;continue}}else{const u=l.codegenNode;if(u.type===13){const c=A7(u);if((!c||c===512||c===1)&&O7(l,t)>=2){const d=I7(l);d&&(u.props=t.hoist(d))}u.dynamicProps&&(u.dynamicProps=t.hoist(u.dynamicProps))}}}if(l.type===1){const a=l.tagType===1;a&&t.scopes.vSlot++,Um(l,t),a&&t.scopes.vSlot--}else if(l.type===11)Um(l,t,l.children.length===1);else if(l.type===9)for(let a=0;a<l.branches.length;a++)Um(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&&Me(e.codegenNode.children)){const i=t.hoist(th(e.codegenNode.children));t.hmr&&(i.content=`[...${i.content}]`),e.codegenNode.children=i}}function Ar(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(e.tagType!==0)return 0;const o=n.get(e);if(o!==void 0)return o;const r=e.codegenNode;if(r.type!==13||r.isBlock&&e.tag!=="svg"&&e.tag!=="foreignObject")return 0;if(A7(r))return n.set(e,0),0;{let l=3;const a=O7(e,t);if(a===0)return n.set(e,0),0;a<l&&(l=a);for(let u=0;u<e.children.length;u++){const c=Ar(e.children[u],t);if(c===0)return n.set(e,0),0;c<l&&(l=c)}if(l>1)for(let u=0;u<e.props.length;u++){const c=e.props[u];if(c.type===7&&c.name==="bind"&&c.exp){const d=Ar(c.exp,t);if(d===0)return n.set(e,0),0;d<l&&(l=d)}}if(r.isBlock){for(let u=0;u<e.props.length;u++)if(e.props[u].type===7)return n.set(e,0),0;t.removeHelper(su),t.removeHelper(Wc(t.inSSR,r.isComponent)),r.isBlock=!1,t.helper(Uc(t.inSSR,r.isComponent))}return n.set(e,l),l}case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return Ar(e.content,t);case 4:return e.constType;case 8:let i=3;for(let l=0;l<e.children.length;l++){const a=e.children[l];if(tt(a)||Fr(a))continue;const u=Ar(a,t);if(u===0)return 0;u<i&&(i=u)}return i;default:return 0}}const fB=new Set([Aw,Nw,bp,eh]);function T7(e,t){if(e.type===14&&!tt(e.callee)&&fB.has(e.callee)){const n=e.arguments[0];if(n.type===4)return Ar(n,t);if(n.type===14)return T7(n,t)}return 0}function O7(e,t){let n=3;const o=I7(e);if(o&&o.type===15){const{properties:r}=o;for(let s=0;s<r.length;s++){const{key:i,value:l}=r[s],a=Ar(i,t);if(a===0)return a;a<n&&(n=a);let u;if(l.type===4?u=Ar(l,t):l.type===14?u=T7(l,t):u=0,u===0)return u;u<n&&(n=u)}}return n}function I7(e){const t=e.codegenNode;if(t.type===13)return t.props}function A7(e){const t=e.patchFlag;return t?parseInt(t,10):void 0}function pB(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:o=!1,hmr:r=!1,cacheHandlers:s=!1,nodeTransforms:i=[],directiveTransforms:l={},transformHoist:a=null,isBuiltInComponent:u=yt,isCustomElement:c=yt,expressionPlugins:d=[],scopeId:f=null,slotted:p=!0,ssr:h=!1,inSSR:m=!1,ssrCssVars:y="",bindingMetadata:v=Wt,inline:w=!1,isTS:_=!1,onError:S=Fw,onWarn:x=b7,compatConfig:E}){const T=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),O={filename:t,selfName:T&&ql(yn(T[1])),prefixIdentifiers:n,hoistStatic:o,hmr:r,cacheHandlers:s,nodeTransforms:i,directiveTransforms:l,transformHoist:a,isBuiltInComponent:u,isCustomElement:c,expressionPlugins:d,scopeId:f,slotted:p,ssr:h,inSSR:m,ssrCssVars:y,bindingMetadata:v,inline:w,isTS:_,onError:S,onWarn:x,compatConfig:E,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],constantCache:new WeakMap,temps:0,cached:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(P){const N=O.helpers.get(P)||0;return O.helpers.set(P,N+1),P},removeHelper(P){const N=O.helpers.get(P);if(N){const F=N-1;F?O.helpers.set(P,F):O.helpers.delete(P)}},helperString(P){return`_${jc[O.helper(P)]}`},replaceNode(P){O.parent.children[O.childIndex]=O.currentNode=P},removeNode(P){const N=O.parent.children,F=P?N.indexOf(P):O.currentNode?O.childIndex:-1;!P||P===O.currentNode?(O.currentNode=null,O.onNodeRemoved()):O.childIndex>F&&(O.childIndex--,O.onNodeRemoved()),O.parent.children.splice(F,1)},onNodeRemoved:yt,addIdentifiers(P){},removeIdentifiers(P){},hoist(P){tt(P)&&(P=St(P)),O.hoists.push(P);const N=St(`_hoisted_${O.hoists.length}`,!1,P.loc,2);return N.hoisted=P,N},cache(P,N=!1){return BV(O.cached++,P,N)}};return O.filters=new Set,O}function hB(e,t){const n=pB(e,t);S0(e,n),t.hoistStatic&&dB(e,n),t.ssr||mB(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 mB(e,t){const{helper:n}=t,{children:o}=e;if(o.length===1){const r=o[0];if(M7(e,r)&&r.codegenNode){const s=r.codegenNode;s.type===13&&Dw(s,t),e.codegenNode=s}else e.codegenNode=r}else if(o.length>1){let r=64;e.codegenNode=wp(t,n(_p),void 0,e.children,r+"",void 0,void 0,!0,void 0,!1)}}function gB(e,t){let n=0;const o=()=>{n--};for(;n<e.children.length;n++){const r=e.children[n];tt(r)||(t.parent=e,t.childIndex=n,t.onNodeRemoved=o,S0(r,t))}}function S0(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&&(Me(i)?o.push(...i):o.push(i)),t.currentNode)e=t.currentNode;else return}switch(e.type){case 3:t.ssr||t.helper(Qp);break;case 5:t.ssr||t.helper(C0);break;case 9:for(let s=0;s<e.branches.length;s++)S0(e.branches[s],t);break;case 10:case 11:case 1:case 0:gB(e,t);break}t.currentNode=e;let r=o.length;for(;r--;)o[r]()}function N7(e,t){const n=tt(e)?o=>o===e:o=>e.test(o);return(o,r)=>{if(o.type===1){const{props:s}=o;if(o.tagType===3&&s.some(YV))return;const i=[];for(let l=0;l<s.length;l++){const a=s[l];if(a.type===7&&n(a.name)){s.splice(l,1),l--;const u=t(o,a,r);u&&i.push(u)}}return i}}}const $0="/*#__PURE__*/",P7=e=>`${jc[e]}: _${jc[e]}`;function vB(e,{mode:t="function",prefixIdentifiers:n=t==="module",sourceMap:o=!1,filename:r="template.vue.html",scopeId:s=null,optimizeImports:i=!1,runtimeGlobalName:l="Vue",runtimeModuleName:a="vue",ssrRuntimeModuleName:u="vue/server-renderer",ssr:c=!1,isTS:d=!1,inSSR:f=!1}){const p={mode:t,prefixIdentifiers:n,sourceMap:o,filename:r,scopeId:s,optimizeImports:i,runtimeGlobalName:l,runtimeModuleName:a,ssrRuntimeModuleName:u,ssr:c,isTS:d,inSSR:f,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(m){return`_${jc[m]}`},push(m,y=-2,v){p.code+=m},indent(){h(++p.indentLevel)},deindent(m=!1){m?--p.indentLevel:h(--p.indentLevel)},newline(){h(p.indentLevel)}};function h(m){p.push(`
23 -`+" ".repeat(m),0)}return p}function yB(e,t={}){const n=vB(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:o,push:r,prefixIdentifiers:s,indent:i,deindent:l,newline:a,scopeId:u,ssr:c}=n,d=Array.from(e.helpers),f=d.length>0,p=!s&&o!=="module";_B(e,n);const m=c?"ssrRender":"render",v=(c?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(r(`function ${m}(${v}) {`),i(),p&&(r("with (_ctx) {"),i(),f&&(r(`const { ${d.map(P7).join(", ")} } = _Vue
24 -`,-1),a())),e.components.length&&(Hv(e.components,"component",n),(e.directives.length||e.temps>0)&&a()),e.directives.length&&(Hv(e.directives,"directive",n),e.temps>0&&a()),e.filters&&e.filters.length&&(a(),Hv(e.filters,"filter",n),a()),e.temps>0){r("let ");for(let w=0;w<e.temps;w++)r(`${w>0?", ":""}_temp${w}`)}return(e.components.length||e.directives.length||e.temps)&&(r(`
25 -`,0),a()),c||r("return "),e.codegenNode?go(e.codegenNode,n):r("null"),p&&(l(),r("}")),l(),r("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function _B(e,t){const{ssr:n,prefixIdentifiers:o,push:r,newline:s,runtimeModuleName:i,runtimeGlobalName:l,ssrRuntimeModuleName:a}=t,u=l,c=Array.from(e.helpers);if(c.length>0&&(r(`const _Vue = ${u}
26 -`,-1),e.hoists.length)){const d=[kw,Sw,Qp,$w,g7].filter(f=>c.includes(f)).map(P7).join(", ");r(`const { ${d} } = _Vue
27 -`,-1)}bB(e.hoists,t),s(),r("return ")}function Hv(e,t,{helper:n,push:o,newline:r,isTS:s}){const i=n(t==="filter"?Tw:t==="component"?Ew:Mw);for(let l=0;l<e.length;l++){let a=e[l];const u=a.endsWith("__self");u&&(a=a.slice(0,-6)),o(`const ${kp(a,t)} = ${i}(${JSON.stringify(a)}${u?", true":""})${s?"!":""}`),l<e.length-1&&r()}}function bB(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:o,helper:r,scopeId:s,mode:i}=t;o();for(let l=0;l<e.length;l++){const a=e[l];a&&(n(`const _hoisted_${l+1} = `),go(a,t),o())}t.pure=!1}function Bw(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),nh(e,t,n),n&&t.deindent(),t.push("]")}function nh(e,t,n=!1,o=!0){const{push:r,newline:s}=t;for(let i=0;i<e.length;i++){const l=e[i];tt(l)?r(l,-3):Me(l)?Bw(l,t):go(l,t),i<e.length-1&&(n?(o&&r(","),s()):o&&r(", "))}}function go(e,t){if(tt(e)){t.push(e,-3);return}if(Fr(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:go(e.codegenNode,t);break;case 2:wB(e,t);break;case 4:L7(e,t);break;case 5:CB(e,t);break;case 12:go(e.codegenNode,t);break;case 8:R7(e,t);break;case 3:SB(e,t);break;case 13:$B(e,t);break;case 14:xB(e,t);break;case 15:MB(e,t);break;case 17:TB(e,t);break;case 18:OB(e,t);break;case 19:IB(e,t);break;case 20:AB(e,t);break;case 21:nh(e.body,t,!0,!1);break}}function wB(e,t){t.push(JSON.stringify(e.content),-3,e)}function L7(e,t){const{content:n,isStatic:o}=e;t.push(o?JSON.stringify(n):n,-3,e)}function CB(e,t){const{push:n,helper:o,pure:r}=t;r&&n($0),n(`${o(C0)}(`),go(e.content,t),n(")")}function R7(e,t){for(let n=0;n<e.children.length;n++){const o=e.children[n];tt(o)?t.push(o,-3):go(o,t)}}function kB(e,t){const{push:n}=t;if(e.type===8)n("["),R7(e,t),n("]");else if(e.isStatic){const o=Vw(e.content)?e.content:JSON.stringify(e.content);n(o,-2,e)}else n(`[${e.content}]`,-3,e)}function SB(e,t){const{push:n,helper:o,pure:r}=t;r&&n($0),n(`${o(Qp)}(${JSON.stringify(e.content)})`,-3,e)}function $B(e,t){const{push:n,helper:o,pure:r}=t,{tag:s,props:i,children:l,patchFlag:a,dynamicProps:u,directives:c,isBlock:d,disableTracking:f,isComponent:p}=e;c&&n(o(Ow)+"("),d&&n(`(${o(su)}(${f?"true":""}), `),r&&n($0);const h=d?Wc(t.inSSR,p):Uc(t.inSSR,p);n(o(h)+"(",-2,e),nh(EB([s,i,l,a,u]),t),n(")"),d&&n(")"),c&&(n(", "),go(c,t),n(")"))}function EB(e){let t=e.length;for(;t--&&e[t]==null;);return e.slice(0,t+1).map(n=>n||"null")}function xB(e,t){const{push:n,helper:o,pure:r}=t,s=tt(e.callee)?e.callee:o(e.callee);r&&n($0),n(s+"(",-2,e),nh(e.arguments,t),n(")")}function MB(e,t){const{push:n,indent:o,deindent:r,newline:s}=t,{properties:i}=e;if(!i.length){n("{}",-2,e);return}const l=i.length>1||!1;n(l?"{":"{ "),l&&o();for(let a=0;a<i.length;a++){const{key:u,value:c}=i[a];kB(u,t),n(": "),go(c,t),a<i.length-1&&(n(","),s())}l&&r(),n(l?"}":" }")}function TB(e,t){Bw(e.elements,t)}function OB(e,t){const{push:n,indent:o,deindent:r}=t,{params:s,returns:i,body:l,newline:a,isSlot:u}=e;u&&n(`_${jc[Lw]}(`),n("(",-2,e),Me(s)?nh(s,t):s&&go(s,t),n(") => "),(a||l)&&(n("{"),o()),i?(a&&n("return "),Me(i)?Bw(i,t):go(i,t)):l&&go(l,t),(a||l)&&(r(),n("}")),u&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}function IB(e,t){const{test:n,consequent:o,alternate:r,newline:s}=e,{push:i,indent:l,deindent:a,newline:u}=t;if(n.type===4){const d=!Vw(n.content);d&&i("("),L7(n,t),d&&i(")")}else i("("),go(n,t),i(")");s&&l(),t.indentLevel++,s||i(" "),i("? "),go(o,t),t.indentLevel--,s&&u(),s||i(" "),i(": ");const c=r.type===19;c||t.indentLevel++,go(r,t),c||t.indentLevel--,s&&a(!0)}function AB(e,t){const{push:n,helper:o,indent:r,deindent:s,newline:i}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(r(),n(`${o(yg)}(-1),`),i()),n(`_cache[${e.index}] = `),go(e.value,t),e.isVNode&&(n(","),i(),n(`${o(yg)}(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 NB=N7(/^(if|else|else-if)$/,(e,t,n)=>PB(e,t,n,(o,r,s)=>{const i=n.parent.children;let l=i.indexOf(o),a=0;for(;l-->=0;){const u=i[l];u&&u.type===9&&(a+=u.branches.length)}return()=>{if(s)o.codegenNode=K4(r,a,n);else{const u=LB(o.codegenNode);u.alternate=K4(r,a+o.branches.length-1,n)}}}));function PB(e,t,n,o){if(t.name!=="else"&&(!t.exp||!t.exp.content.trim())){const r=t.exp?t.exp.loc:e.loc;n.onError(vn(28,t.loc)),t.exp=St("true",!1,r)}if(t.name==="if"){const r=W4(e,t),s={type:9,loc:e.loc,branches:[r]};if(n.replaceNode(s),o)return o(s,r,!0)}else{const r=n.parent.children;let s=r.indexOf(e);for(;s-->=-1;){const i=r[s];if(i&&i.type===3){n.removeNode(i);continue}if(i&&i.type===2&&!i.content.trim().length){n.removeNode(i);continue}if(i&&i.type===9){t.name==="else-if"&&i.branches[i.branches.length-1].condition===void 0&&n.onError(vn(30,e.loc)),n.removeNode();const l=W4(e,t);i.branches.push(l);const a=o&&o(i,l,!1);S0(l,n),a&&a(),n.currentNode=null}else n.onError(vn(30,e.loc));break}}}function W4(e,t){const n=e.tagType===3;return{type:10,loc:e.loc,condition:t.name==="else"?void 0:t.exp,children:n&&!ts(e,"for")?e.children:[e],userKey:k0(e,"key"),isTemplateIf:n}}function K4(e,t,n){return e.condition?O_(e.condition,q4(e,t,n),Vn(n.helper(Qp),['""',"true"])):q4(e,t,n)}function q4(e,t,n){const{helper:o}=n,r=$n("key",St(`${t}`,!1,br,2)),{children:s}=e,i=s[0];if(s.length!==1||i.type!==1)if(s.length===1&&i.type===11){const a=i.codegenNode;return Cg(a,r,n),a}else{let a=64;return wp(n,o(_p),Ir([r]),s,a+"",void 0,void 0,!0,!1,!1,e.loc)}else{const a=i.codegenNode,u=JV(a);return u.type===13&&Dw(u,n),Cg(u,r,n),a}}function LB(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 RB=N7("for",(e,t,n)=>{const{helper:o,removeHelper:r}=n;return DB(e,t,n,s=>{const i=Vn(o(Iw),[s.source]),l=bg(e),a=ts(e,"memo"),u=k0(e,"key"),c=u&&(u.type===6?St(u.value.content,!0):u.exp),d=u?$n("key",c):null,f=s.source.type===4&&s.source.constType>0,p=f?64:u?128:256;return s.codegenNode=wp(n,o(_p),void 0,i,p+"",void 0,void 0,!0,!f,!1,e.loc),()=>{let h;const{children:m}=s,y=m.length!==1||m[0].type!==1,v=wg(e)?e:l&&e.children.length===1&&wg(e.children[0])?e.children[0]:null;if(v?(h=v.codegenNode,l&&d&&Cg(h,d,n)):y?h=wp(n,o(_p),d?Ir([d]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(h=m[0].codegenNode,l&&d&&Cg(h,d,n),h.isBlock!==!f&&(h.isBlock?(r(su),r(Wc(n.inSSR,h.isComponent))):r(Uc(n.inSSR,h.isComponent))),h.isBlock=!f,h.isBlock?(o(su),o(Wc(n.inSSR,h.isComponent))):o(Uc(n.inSSR,h.isComponent))),a){const w=Hc(N_(s.parseResult,[St("_cached")]));w.body=zV([as(["const _memo = (",a.exp,")"]),as(["if (_cached",...c?[" && _cached.key === ",c]:[],` && ${n.helperString(_7)}(_cached, _memo)) return _cached`]),as(["const _item = ",h]),St("_item.memo = _memo"),St("return _item")]),i.arguments.push(w,St("_cache"),St(String(n.cached++)))}else i.arguments.push(Hc(N_(s.parseResult),h,!0))}})});function DB(e,t,n,o){if(!t.exp){n.onError(vn(31,t.loc));return}const r=t.forParseResult;if(!r){n.onError(vn(32,t.loc));return}D7(r);const{addIdentifiers:s,removeIdentifiers:i,scopes:l}=n,{source:a,value:u,key:c,index:d}=r,f={type:11,loc:t.loc,source:a,valueAlias:u,keyAlias:c,objectIndexAlias:d,parseResult:r,children:bg(e)?e.children:[e]};n.replaceNode(f),l.vFor++;const p=o&&o(f);return()=>{l.vFor--,p&&p()}}function D7(e,t){e.finalized||(e.finalized=!0)}function N_({value:e,key:t,index:n},o=[]){return FB([e,t,n,...o])}function FB(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((n,o)=>n||St("_".repeat(o+1),!1))}const G4=St("undefined",!1),VB=(e,t)=>{if(e.type===1&&(e.tagType===1||e.tagType===3)){const n=ts(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},BB=(e,t,n,o)=>Hc(e,n,!1,!0,n.length?n[0].loc:o);function zB(e,t,n=BB){t.helper(Lw);const{children:o,loc:r}=e,s=[],i=[];let l=t.scopes.vSlot>0||t.scopes.vFor>0;const a=ts(e,"slot",!0);if(a){const{arg:y,exp:v}=a;y&&!Ho(y)&&(l=!0),s.push($n(y||St("default",!0),n(v,void 0,o,r)))}let u=!1,c=!1;const d=[],f=new Set;let p=0;for(let y=0;y<o.length;y++){const v=o[y];let w;if(!bg(v)||!(w=ts(v,"slot",!0))){v.type!==3&&d.push(v);continue}if(a){t.onError(vn(37,w.loc));break}u=!0;const{children:_,loc:S}=v,{arg:x=St("default",!0),exp:E,loc:T}=w;let O;Ho(x)?O=x?x.content:"default":l=!0;const P=ts(v,"for"),N=n(E,P,_,S);let F,B;if(F=ts(v,"if"))l=!0,i.push(O_(F.exp,rm(x,N,p++),G4));else if(B=ts(v,/^else(-if)?$/,!0)){let Y=y,Z;for(;Y--&&(Z=o[Y],Z.type===3););if(Z&&bg(Z)&&ts(Z,"if")){o.splice(y,1),y--;let U=i[i.length-1];for(;U.alternate.type===19;)U=U.alternate;U.alternate=B.exp?O_(B.exp,rm(x,N,p++),G4):rm(x,N,p++)}else t.onError(vn(30,B.loc))}else if(P){l=!0;const Y=P.forParseResult;Y?(D7(Y),i.push(Vn(t.helper(Iw),[Y.source,Hc(N_(Y),rm(x,N),!0)]))):t.onError(vn(32,P.loc))}else{if(O){if(f.has(O)){t.onError(vn(38,T));continue}f.add(O),O==="default"&&(c=!0)}s.push($n(x,N))}}if(!a){const y=(v,w)=>{const _=n(v,void 0,w,r);return t.compatConfig&&(_.isNonScopedSlot=!0),$n("default",_)};u?d.length&&d.some(v=>F7(v))&&(c?t.onError(vn(39,d[0].loc)):s.push(y(void 0,d))):s.push(y(void 0,o))}const h=l?2:Wm(e.children)?3:1;let m=Ir(s.concat($n("_",St(h+"",!1))),r);return i.length&&(m=Vn(t.helper(y7),[m,th(i)])),{slots:m,hasDynamicSlots:l}}function rm(e,t,n){const o=[$n("name",e),$n("fn",t)];return n!=null&&o.push($n("key",St(String(n),!0))),Ir(o)}function Wm(e){for(let t=0;t<e.length;t++){const n=e[t];switch(n.type){case 1:if(n.tagType===2||Wm(n.children))return!0;break;case 9:if(Wm(n.branches))return!0;break;case 10:case 11:if(Wm(n.children))return!0;break}}return!1}function F7(e){return e.type!==2&&e.type!==12?!0:e.type===2?!!e.content.trim():F7(e.content)}const V7=new WeakMap,jB=(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?HB(e,t):`"${o}"`;const l=ft(i)&&i.callee===xw;let a,u,c,d=0,f,p,h,m=l||i===Ff||i===Cw||!s&&(o==="svg"||o==="foreignObject");if(r.length>0){const y=B7(e,t,void 0,s,l);a=y.props,d=y.patchFlag,p=y.dynamicPropNames;const v=y.directives;h=v&&v.length?th(v.map(w=>WB(w,t))):void 0,y.shouldUseBlock&&(m=!0)}if(e.children.length>0)if(i===gg&&(m=!0,d|=1024),s&&i!==Ff&&i!==gg){const{slots:v,hasDynamicSlots:w}=zB(e,t);u=v,w&&(d|=1024)}else if(e.children.length===1&&i!==Ff){const v=e.children[0],w=v.type,_=w===5||w===8;_&&Ar(v,t)===0&&(d|=1),_||w===2?u=v:u=e.children}else u=e.children;d!==0&&(c=String(d),p&&p.length&&(f=KB(p))),e.codegenNode=wp(t,i,a,u,c,f,h,!!m,!1,s,e.loc)};function HB(e,t,n=!1){let{tag:o}=e;const r=P_(o),s=k0(e,"is",!1,!0);if(s)if(r||Ha("COMPILER_IS_ON_ELEMENT",t)){let l;if(s.type===6?l=s.value&&St(s.value.content,!0):(l=s.exp,l||(l=St("is",!1,s.loc))),l)return Vn(t.helper(xw),[l])}else s.type===6&&s.value.content.startsWith("vue:")&&(o=s.value.content.slice(4));const i=w7(o)||t.isBuiltInComponent(o);return i?(n||t.helper(i),i):(t.helper(Ew),t.components.add(o),kp(o,"component"))}function B7(e,t,n=e.props,o,r,s=!1){const{tag:i,loc:l,children:a}=e;let u=[];const c=[],d=[],f=a.length>0;let p=!1,h=0,m=!1,y=!1,v=!1,w=!1,_=!1,S=!1;const x=[],E=P=>{u.length&&(c.push(Ir(Y4(u),l)),u=[]),P&&c.push(P)},T=({key:P,value:N})=>{if(Ho(P)){const F=P.content,B=vu(F);if(B&&(!o||r)&&F.toLowerCase()!=="onclick"&&F!=="onUpdate:modelValue"&&!Al(F)&&(w=!0),B&&Al(F)&&(S=!0),B&&N.type===14&&(N=N.arguments[0]),N.type===20||(N.type===4||N.type===8)&&Ar(N,t)>0)return;F==="ref"?m=!0:F==="class"?y=!0:F==="style"?v=!0:F!=="key"&&!x.includes(F)&&x.push(F),o&&(F==="class"||F==="style")&&!x.includes(F)&&x.push(F)}else _=!0};for(let P=0;P<n.length;P++){const N=n[P];if(N.type===6){const{loc:F,name:B,nameLoc:Y,value:Z}=N;let U=!0;if(B==="ref"&&(m=!0,t.scopes.vFor>0&&u.push($n(St("ref_for",!0),St("true")))),B==="is"&&(P_(i)||Z&&Z.content.startsWith("vue:")||Ha("COMPILER_IS_ON_ELEMENT",t)))continue;u.push($n(St(B,!0,Y),St(Z?Z.content:"",U,Z?Z.loc:F)))}else{const{name:F,arg:B,exp:Y,loc:Z,modifiers:U}=N,j=F==="bind",V=F==="on";if(F==="slot"){o||t.onError(vn(40,Z));continue}if(F==="once"||F==="memo"||F==="is"||j&&Ta(B,"is")&&(P_(i)||Ha("COMPILER_IS_ON_ELEMENT",t))||V&&s)continue;if((j&&Ta(B,"key")||V&&f&&Ta(B,"vue:before-update"))&&(p=!0),j&&Ta(B,"ref")&&t.scopes.vFor>0&&u.push($n(St("ref_for",!0),St("true"))),!B&&(j||V)){if(_=!0,Y)if(j){if(E(),Ha("COMPILER_V_BIND_OBJECT_ORDER",t)){c.unshift(Y);continue}c.push(Y)}else E({type:14,loc:Z,callee:t.helper(Pw),arguments:o?[Y]:[Y,"true"]});else t.onError(vn(j?34:35,Z));continue}j&&U.includes("prop")&&(h|=32);const H=t.directiveTransforms[F];if(H){const{props:L,needRuntime:I}=H(N,e,t);!s&&L.forEach(T),V&&B&&!Ho(B)?E(Ir(L,l)):u.push(...L),I&&(d.push(N),Fr(I)&&V7.set(N,I))}else xR(F)||(d.push(N),f&&(p=!0))}}let O;if(c.length?(E(),c.length>1?O=Vn(t.helper(vg),c,l):O=c[0]):u.length&&(O=Ir(Y4(u),l)),_?h|=16:(y&&!o&&(h|=2),v&&!o&&(h|=4),x.length&&(h|=8),w&&(h|=32)),!p&&(h===0||h===32)&&(m||S||d.length>0)&&(h|=512),!t.inSSR&&O)switch(O.type){case 15:let P=-1,N=-1,F=!1;for(let Z=0;Z<O.properties.length;Z++){const U=O.properties[Z].key;Ho(U)?U.content==="class"?P=Z:U.content==="style"&&(N=Z):U.isHandlerKey||(F=!0)}const B=O.properties[P],Y=O.properties[N];F?O=Vn(t.helper(bp),[O]):(B&&!Ho(B.value)&&(B.value=Vn(t.helper(Aw),[B.value])),Y&&(v||Y.value.type===4&&Y.value.content.trim()[0]==="["||Y.value.type===17)&&(Y.value=Vn(t.helper(Nw),[Y.value])));break;case 14:break;default:O=Vn(t.helper(bp),[Vn(t.helper(eh),[O])]);break}return{props:O,directives:d,patchFlag:h,dynamicPropNames:x,shouldUseBlock:p}}function Y4(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"||vu(s))&&UB(i,r):(t.set(s,r),n.push(r))}return n}function UB(e,t){e.value.type===17?e.value.elements.push(t.value):e.value=th([e.value,t.value],e.loc)}function WB(e,t){const n=[],o=V7.get(e);o?n.push(t.helperString(o)):(t.helper(Mw),t.directives.add(e.name),n.push(kp(e.name,"directive")));const{loc:r}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const s=St("true",!1,r);n.push(Ir(e.modifiers.map(i=>$n(i,s)),r))}return th(n,e.loc)}function KB(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 P_(e){return e==="component"||e==="Component"}const qB=(e,t)=>{if(wg(e)){const{children:n,loc:o}=e,{slotName:r,slotProps:s}=GB(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let l=2;s&&(i[2]=s,l=3),n.length&&(i[3]=Hc([],n,!1,!1,o),l=4),t.scopeId&&!t.slotted&&(l=5),i.splice(l),e.codegenNode=Vn(t.helper(v7),i,o)}};function GB(e,t){let n='"default"',o;const r=[];for(let s=0;s<e.props.length;s++){const i=e.props[s];if(i.type===6)i.value&&(i.name==="name"?n=JSON.stringify(i.value.content):(i.name=yn(i.name),r.push(i)));else if(i.name==="bind"&&Ta(i.arg,"name")){if(i.exp)n=i.exp;else if(i.arg&&i.arg.type===4){const l=yn(i.arg.content);n=i.exp=St(l,!1,i.arg.loc)}}else i.name==="bind"&&i.arg&&Ho(i.arg)&&(i.arg.content=yn(i.arg.content)),r.push(i)}if(r.length>0){const{props:s,directives:i}=B7(e,t,r,!1,!1);o=s,i.length&&t.onError(vn(36,i[0].loc))}return{slotName:n,slotProps:o}}const YB=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,z7=(e,t,n,o)=>{const{loc:r,modifiers:s,arg:i}=e;!e.exp&&!s.length&&n.onError(vn(35,r));let l;if(i.type===4)if(i.isStatic){let d=i.content;d.startsWith("vue:")&&(d=`vnode-${d.slice(4)}`);const f=t.tagType!==0||d.startsWith("vnode")||!/[A-Z]/.test(d)?vc(yn(d)):`on:${d}`;l=St(f,!0,i.loc)}else l=as([`${n.helperString(T_)}(`,i,")"]);else l=i,l.children.unshift(`${n.helperString(T_)}(`),l.children.push(")");let a=e.exp;a&&!a.content.trim()&&(a=void 0);let u=n.cacheHandlers&&!a&&!n.inVOnce;if(a){const d=C7(a.content),f=!(d||YB.test(a.content)),p=a.content.includes(";");(f||u&&d)&&(a=as([`${f?"$event":"(...args)"} => ${p?"{":"("}`,a,p?"}":")"]))}let c={props:[$n(l,a||St("() => {}",!1,r))]};return o&&(c=o(c)),u&&(c.props[0].value=n.cache(c.props[0].value)),c.props.forEach(d=>d.key.isHandlerKey=!0),c},ZB=(e,t,n)=>{const{modifiers:o,loc:r}=e,s=e.arg;let{exp:i}=e;if(i&&i.type===4&&!i.content.trim()&&(i=void 0),!i){if(s.type!==4||!s.isStatic)return n.onError(vn(52,s.loc)),{props:[$n(s,St("",!0,r))]};const l=yn(s.content);i=e.exp=St(l,!1,s.loc)}return s.type!==4?(s.children.unshift("("),s.children.push(') || ""')):s.isStatic||(s.content=`${s.content} || ""`),o.includes("camel")&&(s.type===4?s.isStatic?s.content=yn(s.content):s.content=`${n.helperString(M_)}(${s.content})`:(s.children.unshift(`${n.helperString(M_)}(`),s.children.push(")"))),n.inSSR||(o.includes("prop")&&Z4(s,"."),o.includes("attr")&&Z4(s,"^")),{props:[$n(s,i)]}},Z4=(e,t)=>{e.type===4?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},JB=(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(jv(i)){r=!0;for(let l=s+1;l<n.length;l++){const a=n[l];if(jv(a))o||(o=n[s]=as([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(jv(i)||i.type===8){const l=[];(i.type!==2||i.content!==" ")&&l.push(i),!t.ssr&&Ar(i,t)===0&&l.push("1"),n[s]={type:12,content:i,loc:i.loc,codegenNode:Vn(t.helper($w),l)}}}}},J4=new WeakSet,XB=(e,t)=>{if(e.type===1&&ts(e,"once",!0))return J4.has(e)||t.inVOnce||t.inSSR?void 0:(J4.add(e),t.inVOnce=!0,t.helper(yg),()=>{t.inVOnce=!1;const n=t.currentNode;n.codegenNode&&(n.codegenNode=t.cache(n.codegenNode,!0))})},j7=(e,t,n)=>{const{exp:o,arg:r}=e;if(!o)return n.onError(vn(41,e.loc)),sm();const s=o.loc.source,i=o.type===4?o.content:s,l=n.bindingMetadata[s];if(l==="props"||l==="props-aliased")return n.onError(vn(44,o.loc)),sm();const a=!1;if(!i.trim()||!C7(i)&&!a)return n.onError(vn(42,o.loc)),sm();const u=r||St("modelValue",!0),c=r?Ho(r)?`onUpdate:${yn(r.content)}`:as(['"onUpdate:" + ',r]):"onUpdate:modelValue";let d;const f=n.isTS?"($event: any)":"$event";d=as([`${f} => ((`,o,") = $event)"]);const p=[$n(u,e.exp),$n(c,d)];if(e.modifiers.length&&t.tagType===1){const h=e.modifiers.map(y=>(Vw(y)?y:JSON.stringify(y))+": true").join(", "),m=r?Ho(r)?`${r.content}Modifiers`:as([r,' + "Modifiers"']):"modelModifiers";p.push($n(m,St(`{ ${h} }`,!1,e.loc,2)))}return sm(p)};function sm(e=[]){return{props:e}}const QB=/[\w).+\-_$\]]/,ez=(e,t)=>{Ha("COMPILER_FILTERS",t)&&(e.type===5&&Sg(e.content,t),e.type===1&&e.props.forEach(n=>{n.type===7&&n.name!=="for"&&n.exp&&Sg(n.exp,t)}))};function Sg(e,t){if(e.type===4)X4(e,t);else for(let n=0;n<e.children.length;n++){const o=e.children[n];typeof o=="object"&&(o.type===4?X4(o,t):o.type===8?Sg(e,t):o.type===5&&Sg(o.content,t))}}function X4(e,t){const n=e.content;let o=!1,r=!1,s=!1,i=!1,l=0,a=0,u=0,c=0,d,f,p,h,m=[];for(p=0;p<n.length;p++)if(f=d,d=n.charCodeAt(p),o)d===39&&f!==92&&(o=!1);else if(r)d===34&&f!==92&&(r=!1);else if(s)d===96&&f!==92&&(s=!1);else if(i)d===47&&f!==92&&(i=!1);else if(d===124&&n.charCodeAt(p+1)!==124&&n.charCodeAt(p-1)!==124&&!l&&!a&&!u)h===void 0?(c=p+1,h=n.slice(0,p).trim()):y();else{switch(d){case 34:r=!0;break;case 39:o=!0;break;case 96:s=!0;break;case 40:u++;break;case 41:u--;break;case 91:a++;break;case 93:a--;break;case 123:l++;break;case 125:l--;break}if(d===47){let v=p-1,w;for(;v>=0&&(w=n.charAt(v),w===" ");v--);(!w||!QB.test(w))&&(i=!0)}}h===void 0?h=n.slice(0,p).trim():c!==0&&y();function y(){m.push(n.slice(c,p).trim()),c=p+1}if(m.length){for(p=0;p<m.length;p++)h=tz(h,m[p],t);e.content=h}}function tz(e,t,n){n.helper(Tw);const o=t.indexOf("(");if(o<0)return n.filters.add(t),`${kp(t,"filter")}(${e})`;{const r=t.slice(0,o),s=t.slice(o+1);return n.filters.add(r),`${kp(r,"filter")}(${e}${s!==")"?","+s:s}`}}const Q4=new WeakSet,nz=(e,t)=>{if(e.type===1){const n=ts(e,"memo");return!n||Q4.has(e)?void 0:(Q4.add(e),()=>{const o=e.codegenNode||t.currentNode.codegenNode;o&&o.type===13&&(e.tagType!==1&&Dw(o,t),e.codegenNode=Vn(t.helper(Rw),[n.exp,Hc(void 0,o),"_cache",String(t.cached++)]))})}};function oz(e){return[[XB,NB,nz,RB,ez,qB,jB,VB,JB],{on:z7,bind:ZB,model:j7}]}function rz(e,t={}){const n=t.onError||Fw,o=t.mode==="module";t.prefixIdentifiers===!0?n(vn(47)):o&&n(vn(48));const r=!1;t.cacheHandlers&&n(vn(49)),t.scopeId&&!o&&n(vn(50));const s=Bt({},t,{prefixIdentifiers:r}),i=tt(e)?cB(e,s):e,[l,a]=oz();return hB(i,Bt({},s,{nodeTransforms:[...l,...t.nodeTransforms||[]],directiveTransforms:Bt({},a,t.directiveTransforms||{})})),yB(i,s)}const sz=()=>({props:[]});/**
28 -* @vue/compiler-dom v3.4.23
23 +**/const Rg=Symbol(""),Zm=Symbol(""),H6=Symbol(""),a0=Symbol(""),LL=Symbol(""),vd=Symbol(""),OL=Symbol(""),DL=Symbol(""),U6=Symbol(""),j6=Symbol(""),L1=Symbol(""),W6=Symbol(""),RL=Symbol(""),Y6=Symbol(""),q6=Symbol(""),G6=Symbol(""),X6=Symbol(""),K6=Symbol(""),Z6=Symbol(""),VL=Symbol(""),FL=Symbol(""),Ob=Symbol(""),l0=Symbol(""),J6=Symbol(""),Q6=Symbol(""),Vg=Symbol(""),O1=Symbol(""),e4=Symbol(""),Lk=Symbol(""),mX=Symbol(""),Ok=Symbol(""),c0=Symbol(""),gX=Symbol(""),vX=Symbol(""),t4=Symbol(""),_X=Symbol(""),yX=Symbol(""),n4=Symbol(""),NL=Symbol(""),Ef={[Rg]:"Fragment",[Zm]:"Teleport",[H6]:"Suspense",[a0]:"KeepAlive",[LL]:"BaseTransition",[vd]:"openBlock",[OL]:"createBlock",[DL]:"createElementBlock",[U6]:"createVNode",[j6]:"createElementVNode",[L1]:"createCommentVNode",[W6]:"createTextVNode",[RL]:"createStaticVNode",[Y6]:"resolveComponent",[q6]:"resolveDynamicComponent",[G6]:"resolveDirective",[X6]:"resolveFilter",[K6]:"withDirectives",[Z6]:"renderList",[VL]:"renderSlot",[FL]:"createSlots",[Ob]:"toDisplayString",[l0]:"mergeProps",[J6]:"normalizeClass",[Q6]:"normalizeStyle",[Vg]:"normalizeProps",[O1]:"guardReactiveProps",[e4]:"toHandlers",[Lk]:"camelize",[mX]:"capitalize",[Ok]:"toHandlerKey",[c0]:"setBlockTracking",[gX]:"pushScopeId",[vX]:"popScopeId",[t4]:"withCtx",[_X]:"unref",[yX]:"isRef",[n4]:"withMemo",[NL]:"isMemoSame"};function bX(t){Object.getOwnPropertySymbols(t).forEach(e=>{Ef[e]=t[e]})}const Wo={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function wX(t,e=""){return{type:0,source:e,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:Wo}}function Fg(t,e,n,i,s,o,r,a=!1,l=!1,c=!1,u=Wo){return t&&(a?(t.helper(vd),t.helper(Pf(t.inSSR,c))):t.helper(Tf(t.inSSR,c)),r&&t.helper(K6)),{type:13,tag:e,props:n,children:i,patchFlag:s,dynamicProps:o,directives:r,isBlock:a,disableTracking:l,isComponent:c,loc:u}}function Ju(t,e=Wo){return{type:17,loc:e,elements:t}}function cr(t,e=Wo){return{type:15,loc:e,properties:t}}function Ps(t,e){return{type:16,loc:Wo,key:Ke(t)?Kt(t,!0):t,value:e}}function Kt(t,e=!1,n=Wo,i=0){return{type:4,loc:n,content:t,isStatic:e,constType:e?3:i}}function zr(t,e=Wo){return{type:8,loc:e,children:t}}function Vs(t,e=[],n=Wo){return{type:14,loc:n,callee:t,arguments:e}}function Mf(t,e=void 0,n=!1,i=!1,s=Wo){return{type:18,params:t,returns:e,newline:n,isSlot:i,loc:s}}function Dk(t,e,n,i=!0){return{type:19,test:t,consequent:e,alternate:n,newline:i,loc:Wo}}function kX(t,e,n=!1,i=!1){return{type:20,index:t,value:e,needPauseTracking:n,inVOnce:i,needArraySpread:!1,loc:Wo}}function CX(t){return{type:21,body:t,loc:Wo}}function Tf(t,e){return t||e?U6:j6}function Pf(t,e){return t||e?OL:DL}function s4(t,{helper:e,removeHelper:n,inSSR:i}){t.isBlock||(t.isBlock=!0,n(Tf(i,t.isComponent)),e(vd),e(Pf(i,t.isComponent)))}const o7=new Uint8Array([123,123]),r7=new Uint8Array([125,125]);function a7(t){return t>=97&&t<=122||t>=65&&t<=90}function To(t){return t===32||t===10||t===9||t===12||t===13}function Bl(t){return t===47||t===62||To(t)}function u0(t){const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}const wi={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 xX{constructor(e,n){this.stack=e,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=o7,this.delimiterClose=r7,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=o7,this.delimiterClose=r7}getPos(e){let n=1,i=e+1;const s=this.newlines.length;let o=-1;if(s>100){let r=-1,a=s;for(;r+1<a;){const l=r+a>>>1;this.newlines[l]<e?r=l:a=l}o=r}else for(let r=s-1;r>=0;r--)if(e>this.newlines[r]){o=r;break}return o>=0&&(n=o+2,i=e-this.newlines[o]),{column:i,line:n,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){e===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===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(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===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(e))}stateSpecialStartSequence(e){const n=this.sequenceIndex===this.currentSequence.length;if(!(n?Bl(e):(e|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!n){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(e===62||To(e)){const n=this.index-this.currentSequence.length;if(this.sectionStart<n){const i=this.index;this.index=n,this.cbs.ontext(this.sectionStart,n),this.index=i}this.sectionStart=n+2,this.stateInClosingTagName(e),this.inRCDATA=!1;return}this.sequenceIndex=0}(e|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===wi.TitleEnd||this.currentSequence===wi.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(e===60)}stateCDATASequence(e){e===wi.Cdata[this.sequenceIndex]?++this.sequenceIndex===wi.Cdata.length&&(this.state=28,this.currentSequence=wi.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);if(n===10&&this.newlines.push(this.index),n===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===wi.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):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,n){this.enterRCDATA(e,n),this.state=31}enterRCDATA(e,n){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=n}stateBeforeTagName(e){e===33?(this.state=22,this.sectionStart=this.index+1):e===63?(this.state=24,this.sectionStart=this.index+1):a7(e)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:e===116?this.state=30:this.state=e===115?29:6):e===47?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){Bl(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(Bl(e)){const n=this.buffer.slice(this.sectionStart,this.index);n!=="template"&&this.enterRCDATA(u0("</"+n),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){To(e)||(e===62?(this.state=1,this.sectionStart=this.index+1):(this.state=a7(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(e===62||To(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){e===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){e===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):e===47?this.state=7:e===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):To(e)||this.handleAttrStart(e)}handleAttrStart(e){e===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):e===46||e===58||e===64||e===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(e){e===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):To(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(e===61||Bl(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){e===61||Bl(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):e===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){e===61||Bl(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===91?this.state=15:e===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){e===93?this.state=14:(e===61||Bl(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){e===61||Bl(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){e===61?this.state=18:e===47||e===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):To(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){e===34?(this.state=19,this.sectionStart=this.index+1):e===39?(this.state=20,this.sectionStart=this.index+1):To(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,n){(e===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(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){To(e)||e===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):(e===39||e===60||e===61||e===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){e===91?(this.state=26,this.sequenceIndex=0):this.state=e===45?25:23}stateInDeclaration(e){(e===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(e===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){e===45?(this.state=28,this.currentSequence=wi.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(e===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){e===wi.ScriptEnd[3]?this.startSpecial(wi.ScriptEnd,4):e===wi.StyleEnd[3]?this.startSpecial(wi.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===wi.TitleEnd[3]?this.startSpecial(wi.TitleEnd,4):e===wi.TextareaEnd[3]?this.startSpecial(wi.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);switch(n===10&&this.state!==33&&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 e=this.buffer.length;this.sectionStart>=e||(this.state===28?this.currentSequence===wi.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):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,e))}emitCodePoint(e,n){}}function l7(t,{compatConfig:e}){const n=e&&e[t];return t==="MODE"?n||3:n}function Qu(t,e){const n=l7("MODE",e),i=l7(t,e);return n===3?i===!0:i!==!1}function Ng(t,e,n,...i){return Qu(t,e)}function i4(t){throw t}function BL(t){}function ss(t,e,n,i){const s=`https://vuejs.org/error-reference/#compiler-${t}`,o=new SyntaxError(String(s));return o.code=t,o.loc=e,o}const lo=t=>t.type===4&&t.isStatic;function zL(t){switch(t){case"Teleport":case"teleport":return Zm;case"Suspense":case"suspense":return H6;case"KeepAlive":case"keep-alive":return a0;case"BaseTransition":case"base-transition":return LL}}const SX=/^$|^\d|[^\$\w\xA0-\uFFFF]/,o4=t=>!SX.test(t),HL=/[A-Za-z_$\xA0-\uFFFF]/,$X=/[\.\?\w$\xA0-\uFFFF]/,AX=/\s+[.[]\s*|\s*[.[]\s+/g,UL=t=>t.type===4?t.content:t.loc.source,EX=t=>{const e=UL(t).trim().replace(AX,a=>a.trim());let n=0,i=[],s=0,o=0,r=null;for(let a=0;a<e.length;a++){const l=e.charAt(a);switch(n){case 0:if(l==="[")i.push(n),n=1,s++;else if(l==="(")i.push(n),n=2,o++;else if(!(a===0?HL:$X).test(l))return!1;break;case 1:l==="'"||l==='"'||l==="`"?(i.push(n),n=3,r=l):l==="["?s++:l==="]"&&(--s||(n=i.pop()));break;case 2:if(l==="'"||l==='"'||l==="`")i.push(n),n=3,r=l;else if(l==="(")o++;else if(l===")"){if(a===e.length-1)return!1;--o||(n=i.pop())}break;case 3:l===r&&(n=i.pop(),r=null);break}}return!s&&!o},jL=EX,MX=/^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,TX=t=>MX.test(UL(t)),PX=TX;function ir(t,e,n=!1){for(let i=0;i<t.props.length;i++){const s=t.props[i];if(s.type===7&&(n||s.exp)&&(Ke(e)?s.name===e:e.test(s.name)))return s}}function Db(t,e,n=!1,i=!1){for(let s=0;s<t.props.length;s++){const o=t.props[s];if(o.type===6){if(n)continue;if(o.name===e&&(o.value||i))return o}else if(o.name==="bind"&&(o.exp||i)&&Ru(o.arg,e))return o}}function Ru(t,e){return!!(t&&lo(t)&&t.content===e)}function IX(t){return t.props.some(e=>e.type===7&&e.name==="bind"&&(!e.arg||e.arg.type!==4||!e.arg.isStatic))}function _w(t){return t.type===5||t.type===2}function c7(t){return t.type===7&&t.name==="pre"}function LX(t){return t.type===7&&t.name==="slot"}function d0(t){return t.type===1&&t.tagType===3}function h0(t){return t.type===1&&t.tagType===2}const OX=new Set([Vg,O1]);function WL(t,e=[]){if(t&&!Ke(t)&&t.type===14){const n=t.callee;if(!Ke(n)&&OX.has(n))return WL(t.arguments[0],e.concat(t))}return[t,e]}function f0(t,e,n){let i,s=t.type===13?t.props:t.arguments[2],o=[],r;if(s&&!Ke(s)&&s.type===14){const a=WL(s);s=a[0],o=a[1],r=o[o.length-1]}if(s==null||Ke(s))i=cr([e]);else if(s.type===14){const a=s.arguments[0];!Ke(a)&&a.type===15?u7(e,a)||a.properties.unshift(e):s.callee===e4?i=Vs(n.helper(l0),[cr([e]),s]):s.arguments.unshift(cr([e])),!i&&(i=s)}else s.type===15?(u7(e,s)||s.properties.unshift(e),i=s):(i=Vs(n.helper(l0),[cr([e]),s]),r&&r.callee===O1&&(r=o[o.length-2]));t.type===13?r?r.arguments[0]=i:t.props=i:r?r.arguments[0]=i:t.arguments[2]=i}function u7(t,e){let n=!1;if(t.key.type===4){const i=t.key.content;n=e.properties.some(s=>s.key.type===4&&s.key.content===i)}return n}function Bg(t,e){return`_${e}_${t.replace(/[^\w]/g,(n,i)=>n==="-"?"_":t.charCodeAt(i).toString())}`}function DX(t){return t.type===14&&t.callee===n4?t.arguments[1].returns:t}const RX=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;function YL(t){for(let e=0;e<t.length;e++)if(!To(t.charCodeAt(e)))return!1;return!0}function r4(t){return t.type===2&&YL(t.content)||t.type===12&&r4(t.content)}function qL(t){return t.type===3||r4(t)}const GL={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:qh,isPreTag:qh,isIgnoreNewlineTag:qh,isCustomElement:qh,onError:i4,onWarn:BL,comments:!1,prefixIdentifiers:!1};let An=GL,zg=null,hl="",$i=null,fn=null,no="",qa=-1,wu=-1,a4=0,uc=!1,Rk=null;const us=[],_s=new xX(us,{onerr:ja,ontext(t,e){Wv(Qs(t,e),t,e)},ontextentity(t,e,n){Wv(t,e,n)},oninterpolation(t,e){if(uc)return Wv(Qs(t,e),t,e);let n=t+_s.delimiterOpen.length,i=e-_s.delimiterClose.length;for(;To(hl.charCodeAt(n));)n++;for(;To(hl.charCodeAt(i-1));)i--;let s=Qs(n,i);s.includes("&")&&(s=An.decodeEntities(s,!1)),Vk({type:5,content:L_(s,!1,Cs(n,i)),loc:Cs(t,e)})},onopentagname(t,e){const n=Qs(t,e);$i={type:1,tag:n,ns:An.getNamespace(n,us[0],An.ns),tagType:0,props:[],children:[],loc:Cs(t-1,e),codegenNode:void 0}},onopentagend(t){h7(t)},onclosetag(t,e){const n=Qs(t,e);if(!An.isVoidTag(n)){let i=!1;for(let s=0;s<us.length;s++)if(us[s].tag.toLowerCase()===n.toLowerCase()){i=!0,s>0&&ja(24,us[0].loc.start.offset);for(let r=0;r<=s;r++){const a=us.shift();I_(a,e,r<s)}break}i||ja(23,XL(t,60))}},onselfclosingtag(t){const e=$i.tag;$i.isSelfClosing=!0,h7(t),us[0]&&us[0].tag===e&&I_(us.shift(),t)},onattribname(t,e){fn={type:6,name:Qs(t,e),nameLoc:Cs(t,e),value:void 0,loc:Cs(t)}},ondirname(t,e){const n=Qs(t,e),i=n==="."||n===":"?"bind":n==="@"?"on":n==="#"?"slot":n.slice(2);if(!uc&&i===""&&ja(26,t),uc||i==="")fn={type:6,name:n,nameLoc:Cs(t,e),value:void 0,loc:Cs(t)};else if(fn={type:7,name:i,rawName:n,exp:void 0,arg:void 0,modifiers:n==="."?[Kt("prop")]:[],loc:Cs(t)},i==="pre"){uc=_s.inVPre=!0,Rk=$i;const s=$i.props;for(let o=0;o<s.length;o++)s[o].type===7&&(s[o]=YX(s[o]))}},ondirarg(t,e){if(t===e)return;const n=Qs(t,e);if(uc&&!c7(fn))fn.name+=n,Vu(fn.nameLoc,e);else{const i=n[0]!=="[";fn.arg=L_(i?n:n.slice(1,-1),i,Cs(t,e),i?3:0)}},ondirmodifier(t,e){const n=Qs(t,e);if(uc&&!c7(fn))fn.name+="."+n,Vu(fn.nameLoc,e);else if(fn.name==="slot"){const i=fn.arg;i&&(i.content+="."+n,Vu(i.loc,e))}else{const i=Kt(n,!0,Cs(t,e));fn.modifiers.push(i)}},onattribdata(t,e){no+=Qs(t,e),qa<0&&(qa=t),wu=e},onattribentity(t,e,n){no+=t,qa<0&&(qa=e),wu=n},onattribnameend(t){const e=fn.loc.start.offset,n=Qs(e,t);fn.type===7&&(fn.rawName=n),$i.props.some(i=>(i.type===7?i.rawName:i.name)===n)&&ja(2,e)},onattribend(t,e){if($i&&fn){if(Vu(fn.loc,e),t!==0)if(no.includes("&")&&(no=An.decodeEntities(no,!0)),fn.type===6)fn.name==="class"&&(no=ZL(no).trim()),t===1&&!no&&ja(13,e),fn.value={type:2,content:no,loc:t===1?Cs(qa,wu):Cs(qa-1,wu+1)},_s.inSFCRoot&&$i.tag==="template"&&fn.name==="lang"&&no&&no!=="html"&&_s.enterRCDATA(u0("</template"),0);else{let n=0;fn.exp=L_(no,!1,Cs(qa,wu),0,n),fn.name==="for"&&(fn.forParseResult=FX(fn.exp));let i=-1;fn.name==="bind"&&(i=fn.modifiers.findIndex(s=>s.content==="sync"))>-1&&Ng("COMPILER_V_BIND_SYNC",An,fn.loc,fn.arg.loc.source)&&(fn.name="model",fn.modifiers.splice(i,1))}(fn.type!==7||fn.name!=="pre")&&$i.props.push(fn)}no="",qa=wu=-1},oncomment(t,e){An.comments&&Vk({type:3,content:Qs(t,e),loc:Cs(t-4,e+3)})},onend(){const t=hl.length;for(let e=0;e<us.length;e++)I_(us[e],t-1),ja(24,us[e].loc.start.offset)},oncdata(t,e){us[0].ns!==0?Wv(Qs(t,e),t,e):ja(1,t-9)},onprocessinginstruction(t){(us[0]?us[0].ns:An.ns)===0&&ja(21,t-1)}}),d7=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,VX=/^\(|\)$/g;function FX(t){const e=t.loc,n=t.content,i=n.match(RX);if(!i)return;const[,s,o]=i,r=(d,h,f=!1)=>{const p=e.start.offset+h,m=p+d.length;return L_(d,!1,Cs(p,m),0,f?1:0)},a={source:r(o.trim(),n.indexOf(o,s.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let l=s.trim().replace(VX,"").trim();const c=s.indexOf(l),u=l.match(d7);if(u){l=l.replace(d7,"").trim();const d=u[1].trim();let h;if(d&&(h=n.indexOf(d,c+l.length),a.key=r(d,h,!0)),u[2]){const f=u[2].trim();f&&(a.index=r(f,n.indexOf(f,a.key?h+d.length:c+l.length),!0))}}return l&&(a.value=r(l,c,!0)),a}function Qs(t,e){return hl.slice(t,e)}function h7(t){_s.inSFCRoot&&($i.innerLoc=Cs(t+1,t+1)),Vk($i);const{tag:e,ns:n}=$i;n===0&&An.isPreTag(e)&&a4++,An.isVoidTag(e)?I_($i,t):(us.unshift($i),(n===1||n===2)&&(_s.inXML=!0)),$i=null}function Wv(t,e,n){{const o=us[0]&&us[0].tag;o!=="script"&&o!=="style"&&t.includes("&")&&(t=An.decodeEntities(t,!1))}const i=us[0]||zg,s=i.children[i.children.length-1];s&&s.type===2?(s.content+=t,Vu(s.loc,n)):i.children.push({type:2,content:t,loc:Cs(e,n)})}function I_(t,e,n=!1){n?Vu(t.loc,XL(e,60)):Vu(t.loc,NX(e,62)+1),_s.inSFCRoot&&(t.children.length?t.innerLoc.end=cn({},t.children[t.children.length-1].loc.end):t.innerLoc.end=cn({},t.innerLoc.start),t.innerLoc.source=Qs(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:i,ns:s,children:o}=t;if(uc||(i==="slot"?t.tagType=2:f7(t)?t.tagType=3:zX(t)&&(t.tagType=1)),_s.inRCDATA||(t.children=KL(o)),s===0&&An.isIgnoreNewlineTag(i)){const r=o[0];r&&r.type===2&&(r.content=r.content.replace(/^\r?\n/,""))}s===0&&An.isPreTag(i)&&a4--,Rk===t&&(uc=_s.inVPre=!1,Rk=null),_s.inXML&&(us[0]?us[0].ns:An.ns)===0&&(_s.inXML=!1);{const r=t.props;if(!_s.inSFCRoot&&Qu("COMPILER_NATIVE_TEMPLATE",An)&&t.tag==="template"&&!f7(t)){const l=us[0]||zg,c=l.children.indexOf(t);l.children.splice(c,1,...t.children)}const a=r.find(l=>l.type===6&&l.name==="inline-template");a&&Ng("COMPILER_INLINE_TEMPLATE",An,a.loc)&&t.children.length&&(a.value={type:2,content:Qs(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:a.loc})}}function NX(t,e){let n=t;for(;hl.charCodeAt(n)!==e&&n<hl.length-1;)n++;return n}function XL(t,e){let n=t;for(;hl.charCodeAt(n)!==e&&n>=0;)n--;return n}const BX=new Set(["if","else","else-if","for","slot"]);function f7({tag:t,props:e}){if(t==="template"){for(let n=0;n<e.length;n++)if(e[n].type===7&&BX.has(e[n].name))return!0}return!1}function zX({tag:t,props:e}){if(An.isCustomElement(t))return!1;if(t==="component"||HX(t.charCodeAt(0))||zL(t)||An.isBuiltInComponent&&An.isBuiltInComponent(t)||An.isNativeTag&&!An.isNativeTag(t))return!0;for(let n=0;n<e.length;n++){const i=e[n];if(i.type===6){if(i.name==="is"&&i.value){if(i.value.content.startsWith("vue:"))return!0;if(Ng("COMPILER_IS_ON_ELEMENT",An,i.loc))return!0}}else if(i.name==="bind"&&Ru(i.arg,"is")&&Ng("COMPILER_IS_ON_ELEMENT",An,i.loc))return!0}return!1}function HX(t){return t>64&&t<91}const UX=/\r\n/g;function KL(t){const e=An.whitespace!=="preserve";let n=!1;for(let i=0;i<t.length;i++){const s=t[i];if(s.type===2)if(a4)s.content=s.content.replace(UX,`
24 +`);else if(YL(s.content)){const o=t[i-1]&&t[i-1].type,r=t[i+1]&&t[i+1].type;!o||!r||e&&(o===3&&(r===3||r===1)||o===1&&(r===3||r===1&&jX(s.content)))?(n=!0,t[i]=null):s.content=" "}else e&&(s.content=ZL(s.content))}return n?t.filter(Boolean):t}function jX(t){for(let e=0;e<t.length;e++){const n=t.charCodeAt(e);if(n===10||n===13)return!0}return!1}function ZL(t){let e="",n=!1;for(let i=0;i<t.length;i++)To(t.charCodeAt(i))?n||(e+=" ",n=!0):(e+=t[i],n=!1);return e}function Vk(t){(us[0]||zg).children.push(t)}function Cs(t,e){return{start:_s.getPos(t),end:e==null?e:_s.getPos(e),source:e==null?e:Qs(t,e)}}function WX(t){return Cs(t.start.offset,t.end.offset)}function Vu(t,e){t.end=_s.getPos(e),t.source=Qs(t.start.offset,e)}function YX(t){const e={type:6,name:t.rawName,nameLoc:Cs(t.loc.start.offset,t.loc.start.offset+t.rawName.length),value:void 0,loc:t.loc};if(t.exp){const n=t.exp.loc;n.end.offset<t.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),e.value={type:2,content:t.exp.content,loc:n}}return e}function L_(t,e=!1,n,i=0,s=0){return Kt(t,e,n,i)}function ja(t,e,n){An.onError(ss(t,Cs(e,e)))}function qX(){_s.reset(),$i=null,fn=null,no="",qa=-1,wu=-1,us.length=0}function GX(t,e){if(qX(),hl=t,An=cn({},GL),e){let s;for(s in e)e[s]!=null&&(An[s]=e[s])}_s.mode=An.parseMode==="html"?1:An.parseMode==="sfc"?2:0,_s.inXML=An.ns===1||An.ns===2;const n=e&&e.delimiters;n&&(_s.delimiterOpen=u0(n[0]),_s.delimiterClose=u0(n[1]));const i=zg=wX([],t);return _s.parse(hl),i.loc=Cs(0,t.length),i.children=KL(i.children),zg=null,i}function XX(t,e){O_(t,void 0,e,!!JL(t))}function JL(t){const e=t.children.filter(n=>n.type!==3);return e.length===1&&e[0].type===1&&!h0(e[0])?e[0]:null}function O_(t,e,n,i=!1,s=!1){const{children:o}=t,r=[];for(let u=0;u<o.length;u++){const d=o[u];if(d.type===1&&d.tagType===0){const h=i?0:Io(d,n);if(h>0){if(h>=2){d.codegenNode.patchFlag=-1,r.push(d);continue}}else{const f=d.codegenNode;if(f.type===13){const p=f.patchFlag;if((p===void 0||p===512||p===1)&&eO(d,n)>=2){const m=tO(d);m&&(f.props=n.hoist(m))}f.dynamicProps&&(f.dynamicProps=n.hoist(f.dynamicProps))}}}else if(d.type===12&&(i?0:Io(d,n))>=2){d.codegenNode.type===14&&d.codegenNode.arguments.length>0&&d.codegenNode.arguments.push("-1"),r.push(d);continue}if(d.type===1){const h=d.tagType===1;h&&n.scopes.vSlot++,O_(d,t,n,!1,s),h&&n.scopes.vSlot--}else if(d.type===11)O_(d,t,n,d.children.length===1,!0);else if(d.type===9)for(let h=0;h<d.branches.length;h++)O_(d.branches[h],t,n,d.branches[h].children.length===1,s)}let a=!1;if(r.length===o.length&&t.type===1){if(t.tagType===0&&t.codegenNode&&t.codegenNode.type===13&&Ee(t.codegenNode.children))t.codegenNode.children=l(Ju(t.codegenNode.children)),a=!0;else if(t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!Ee(t.codegenNode.children)&&t.codegenNode.children.type===15){const u=c(t.codegenNode,"default");u&&(u.returns=l(Ju(u.returns)),a=!0)}else if(t.tagType===3&&e&&e.type===1&&e.tagType===1&&e.codegenNode&&e.codegenNode.type===13&&e.codegenNode.children&&!Ee(e.codegenNode.children)&&e.codegenNode.children.type===15){const u=ir(t,"slot",!0),d=u&&u.arg&&c(e.codegenNode,u.arg);d&&(d.returns=l(Ju(d.returns)),a=!0)}}if(!a)for(const u of r)u.codegenNode=n.cache(u.codegenNode);function l(u){const d=n.cache(u);return d.needArraySpread=!0,d}function c(u,d){if(u.children&&!Ee(u.children)&&u.children.type===15){const h=u.children.properties.find(f=>f.key===d||f.key.content===d);return h&&h.value}}r.length&&n.transformHoist&&n.transformHoist(o,n,t)}function Io(t,e){const{constantCache:n}=e;switch(t.type){case 1:if(t.tagType!==0)return 0;const i=n.get(t);if(i!==void 0)return i;const s=t.codegenNode;if(s.type!==13||s.isBlock&&t.tag!=="svg"&&t.tag!=="foreignObject"&&t.tag!=="math")return 0;if(s.patchFlag===void 0){let r=3;const a=eO(t,e);if(a===0)return n.set(t,0),0;a<r&&(r=a);for(let l=0;l<t.children.length;l++){const c=Io(t.children[l],e);if(c===0)return n.set(t,0),0;c<r&&(r=c)}if(r>1)for(let l=0;l<t.props.length;l++){const c=t.props[l];if(c.type===7&&c.name==="bind"&&c.exp){const u=Io(c.exp,e);if(u===0)return n.set(t,0),0;u<r&&(r=u)}}if(s.isBlock){for(let l=0;l<t.props.length;l++)if(t.props[l].type===7)return n.set(t,0),0;e.removeHelper(vd),e.removeHelper(Pf(e.inSSR,s.isComponent)),s.isBlock=!1,e.helper(Tf(e.inSSR,s.isComponent))}return n.set(t,r),r}else return n.set(t,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return Io(t.content,e);case 4:return t.constType;case 8:let o=3;for(let r=0;r<t.children.length;r++){const a=t.children[r];if(Ke(a)||mo(a))continue;const l=Io(a,e);if(l===0)return 0;l<o&&(o=l)}return o;case 20:return 2;default:return 0}}const KX=new Set([J6,Q6,Vg,O1]);function QL(t,e){if(t.type===14&&!Ke(t.callee)&&KX.has(t.callee)){const n=t.arguments[0];if(n.type===4)return Io(n,e);if(n.type===14)return QL(n,e)}return 0}function eO(t,e){let n=3;const i=tO(t);if(i&&i.type===15){const{properties:s}=i;for(let o=0;o<s.length;o++){const{key:r,value:a}=s[o],l=Io(r,e);if(l===0)return l;l<n&&(n=l);let c;if(a.type===4?c=Io(a,e):a.type===14?c=QL(a,e):c=0,c===0)return c;c<n&&(n=c)}}return n}function tO(t){const e=t.codegenNode;if(e.type===13)return e.props}function ZX(t,{filename:e="",prefixIdentifiers:n=!1,hoistStatic:i=!1,hmr:s=!1,cacheHandlers:o=!1,nodeTransforms:r=[],directiveTransforms:a={},transformHoist:l=null,isBuiltInComponent:c=Dt,isCustomElement:u=Dt,expressionPlugins:d=[],scopeId:h=null,slotted:f=!0,ssr:p=!1,inSSR:m=!1,ssrCssVars:b="",bindingMetadata:w=pn,inline:k=!1,isTS:C=!1,onError:A=i4,onWarn:S=BL,compatConfig:M}){const P=e.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),T={filename:e,selfName:P&&Gc(Un(P[1])),prefixIdentifiers:n,hoistStatic:i,hmr:s,cacheHandlers:o,nodeTransforms:r,directiveTransforms:a,transformHoist:l,isBuiltInComponent:c,isCustomElement:u,expressionPlugins:d,scopeId:h,slotted:f,ssr:p,inSSR:m,ssrCssVars:b,bindingMetadata:w,inline:k,isTS:C,onError:A,onWarn:S,compatConfig:M,root:t,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:t,childIndex:0,inVOnce:!1,helper(I){const L=T.helpers.get(I)||0;return T.helpers.set(I,L+1),I},removeHelper(I){const L=T.helpers.get(I);if(L){const R=L-1;R?T.helpers.set(I,R):T.helpers.delete(I)}},helperString(I){return`_${Ef[T.helper(I)]}`},replaceNode(I){T.parent.children[T.childIndex]=T.currentNode=I},removeNode(I){const L=T.parent.children,R=I?L.indexOf(I):T.currentNode?T.childIndex:-1;!I||I===T.currentNode?(T.currentNode=null,T.onNodeRemoved()):T.childIndex>R&&(T.childIndex--,T.onNodeRemoved()),T.parent.children.splice(R,1)},onNodeRemoved:Dt,addIdentifiers(I){},removeIdentifiers(I){},hoist(I){Ke(I)&&(I=Kt(I)),T.hoists.push(I);const L=Kt(`_hoisted_${T.hoists.length}`,!1,I.loc,2);return L.hoisted=I,L},cache(I,L=!1,R=!1){const V=kX(T.cached.length,I,L,R);return T.cached.push(V),V}};return T.filters=new Set,T}function JX(t,e){const n=ZX(t,e);Rb(t,n),e.hoistStatic&&XX(t,n),e.ssr||QX(t,n),t.helpers=new Set([...n.helpers.keys()]),t.components=[...n.components],t.directives=[...n.directives],t.imports=n.imports,t.hoists=n.hoists,t.temps=n.temps,t.cached=n.cached,t.transformed=!0,t.filters=[...n.filters]}function QX(t,e){const{helper:n}=e,{children:i}=t;if(i.length===1){const s=JL(t);if(s&&s.codegenNode){const o=s.codegenNode;o.type===13&&s4(o,e),t.codegenNode=o}else t.codegenNode=i[0]}else if(i.length>1){let s=64;t.codegenNode=Fg(e,n(Rg),void 0,t.children,s,void 0,void 0,!0,void 0,!1)}}function eK(t,e){let n=0;const i=()=>{n--};for(;n<t.children.length;n++){const s=t.children[n];Ke(s)||(e.grandParent=e.parent,e.parent=t,e.childIndex=n,e.onNodeRemoved=i,Rb(s,e))}}function Rb(t,e){e.currentNode=t;const{nodeTransforms:n}=e,i=[];for(let o=0;o<n.length;o++){const r=n[o](t,e);if(r&&(Ee(r)?i.push(...r):i.push(r)),e.currentNode)t=e.currentNode;else return}switch(t.type){case 3:e.ssr||e.helper(L1);break;case 5:e.ssr||e.helper(Ob);break;case 9:for(let o=0;o<t.branches.length;o++)Rb(t.branches[o],e);break;case 10:case 11:case 1:case 0:eK(t,e);break}e.currentNode=t;let s=i.length;for(;s--;)i[s]()}function nO(t,e){const n=Ke(t)?i=>i===t:i=>t.test(i);return(i,s)=>{if(i.type===1){const{props:o}=i;if(i.tagType===3&&o.some(LX))return;const r=[];for(let a=0;a<o.length;a++){const l=o[a];if(l.type===7&&n(l.name)){o.splice(a,1),a--;const c=e(i,l,s);c&&r.push(c)}}return r}}}const Vb="/*@__PURE__*/",sO=t=>`${Ef[t]}: _${Ef[t]}`;function tK(t,{mode:e="function",prefixIdentifiers:n=e==="module",sourceMap:i=!1,filename:s="template.vue.html",scopeId:o=null,optimizeImports:r=!1,runtimeGlobalName:a="Vue",runtimeModuleName:l="vue",ssrRuntimeModuleName:c="vue/server-renderer",ssr:u=!1,isTS:d=!1,inSSR:h=!1}){const f={mode:e,prefixIdentifiers:n,sourceMap:i,filename:s,scopeId:o,optimizeImports:r,runtimeGlobalName:a,runtimeModuleName:l,ssrRuntimeModuleName:c,ssr:u,isTS:d,inSSR:h,source:t.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(m){return`_${Ef[m]}`},push(m,b=-2,w){f.code+=m},indent(){p(++f.indentLevel)},deindent(m=!1){m?--f.indentLevel:p(--f.indentLevel)},newline(){p(f.indentLevel)}};function p(m){f.push(`
25 +`+" ".repeat(m),0)}return f}function nK(t,e={}){const n=tK(t,e);e.onContextCreated&&e.onContextCreated(n);const{mode:i,push:s,prefixIdentifiers:o,indent:r,deindent:a,newline:l,scopeId:c,ssr:u}=n,d=Array.from(t.helpers),h=d.length>0,f=!o&&i!=="module";sK(t,n);const m=u?"ssrRender":"render",w=(u?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(s(`function ${m}(${w}) {`),r(),f&&(s("with (_ctx) {"),r(),h&&(s(`const { ${d.map(sO).join(", ")} } = _Vue
26 +`,-1),l())),t.components.length&&(yw(t.components,"component",n),(t.directives.length||t.temps>0)&&l()),t.directives.length&&(yw(t.directives,"directive",n),t.temps>0&&l()),t.filters&&t.filters.length&&(l(),yw(t.filters,"filter",n),l()),t.temps>0){s("let ");for(let k=0;k<t.temps;k++)s(`${k>0?", ":""}_temp${k}`)}return(t.components.length||t.directives.length||t.temps)&&(s(`
27 +`,0),l()),u||s("return "),t.codegenNode?Ti(t.codegenNode,n):s("null"),f&&(a(),s("}")),a(),s("}"),{ast:t,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function sK(t,e){const{ssr:n,prefixIdentifiers:i,push:s,newline:o,runtimeModuleName:r,runtimeGlobalName:a,ssrRuntimeModuleName:l}=e,c=a,u=Array.from(t.helpers);if(u.length>0&&(s(`const _Vue = ${c}
28 +`,-1),t.hoists.length)){const d=[U6,j6,L1,W6,RL].filter(h=>u.includes(h)).map(sO).join(", ");s(`const { ${d} } = _Vue
29 +`,-1)}iK(t.hoists,e),o(),s("return ")}function yw(t,e,{helper:n,push:i,newline:s,isTS:o}){const r=n(e==="filter"?X6:e==="component"?Y6:G6);for(let a=0;a<t.length;a++){let l=t[a];const c=l.endsWith("__self");c&&(l=l.slice(0,-6)),i(`const ${Bg(l,e)} = ${r}(${JSON.stringify(l)}${c?", true":""})${o?"!":""}`),a<t.length-1&&s()}}function iK(t,e){if(!t.length)return;e.pure=!0;const{push:n,newline:i}=e;i();for(let s=0;s<t.length;s++){const o=t[s];o&&(n(`const _hoisted_${s+1} = `),Ti(o,e),i())}e.pure=!1}function l4(t,e){const n=t.length>3||!1;e.push("["),n&&e.indent(),D1(t,e,n),n&&e.deindent(),e.push("]")}function D1(t,e,n=!1,i=!0){const{push:s,newline:o}=e;for(let r=0;r<t.length;r++){const a=t[r];Ke(a)?s(a,-3):Ee(a)?l4(a,e):Ti(a,e),r<t.length-1&&(n?(i&&s(","),o()):i&&s(", "))}}function Ti(t,e){if(Ke(t)){e.push(t,-3);return}if(mo(t)){e.push(e.helper(t));return}switch(t.type){case 1:case 9:case 11:Ti(t.codegenNode,e);break;case 2:oK(t,e);break;case 4:iO(t,e);break;case 5:rK(t,e);break;case 12:Ti(t.codegenNode,e);break;case 8:oO(t,e);break;case 3:lK(t,e);break;case 13:cK(t,e);break;case 14:dK(t,e);break;case 15:hK(t,e);break;case 17:fK(t,e);break;case 18:pK(t,e);break;case 19:mK(t,e);break;case 20:gK(t,e);break;case 21:D1(t.body,e,!0,!1);break}}function oK(t,e){e.push(JSON.stringify(t.content),-3,t)}function iO(t,e){const{content:n,isStatic:i}=t;e.push(i?JSON.stringify(n):n,-3,t)}function rK(t,e){const{push:n,helper:i,pure:s}=e;s&&n(Vb),n(`${i(Ob)}(`),Ti(t.content,e),n(")")}function oO(t,e){for(let n=0;n<t.children.length;n++){const i=t.children[n];Ke(i)?e.push(i,-3):Ti(i,e)}}function aK(t,e){const{push:n}=e;if(t.type===8)n("["),oO(t,e),n("]");else if(t.isStatic){const i=o4(t.content)?t.content:JSON.stringify(t.content);n(i,-2,t)}else n(`[${t.content}]`,-3,t)}function lK(t,e){const{push:n,helper:i,pure:s}=e;s&&n(Vb),n(`${i(L1)}(${JSON.stringify(t.content)})`,-3,t)}function cK(t,e){const{push:n,helper:i,pure:s}=e,{tag:o,props:r,children:a,patchFlag:l,dynamicProps:c,directives:u,isBlock:d,disableTracking:h,isComponent:f}=t;let p;l&&(p=String(l)),u&&n(i(K6)+"("),d&&n(`(${i(vd)}(${h?"true":""}), `),s&&n(Vb);const m=d?Pf(e.inSSR,f):Tf(e.inSSR,f);n(i(m)+"(",-2,t),D1(uK([o,r,a,p,c]),e),n(")"),d&&n(")"),u&&(n(", "),Ti(u,e),n(")"))}function uK(t){let e=t.length;for(;e--&&t[e]==null;);return t.slice(0,e+1).map(n=>n||"null")}function dK(t,e){const{push:n,helper:i,pure:s}=e,o=Ke(t.callee)?t.callee:i(t.callee);s&&n(Vb),n(o+"(",-2,t),D1(t.arguments,e),n(")")}function hK(t,e){const{push:n,indent:i,deindent:s,newline:o}=e,{properties:r}=t;if(!r.length){n("{}",-2,t);return}const a=r.length>1||!1;n(a?"{":"{ "),a&&i();for(let l=0;l<r.length;l++){const{key:c,value:u}=r[l];aK(c,e),n(": "),Ti(u,e),l<r.length-1&&(n(","),o())}a&&s(),n(a?"}":" }")}function fK(t,e){l4(t.elements,e)}function pK(t,e){const{push:n,indent:i,deindent:s}=e,{params:o,returns:r,body:a,newline:l,isSlot:c}=t;c&&n(`_${Ef[t4]}(`),n("(",-2,t),Ee(o)?D1(o,e):o&&Ti(o,e),n(") => "),(l||a)&&(n("{"),i()),r?(l&&n("return "),Ee(r)?l4(r,e):Ti(r,e)):a&&Ti(a,e),(l||a)&&(s(),n("}")),c&&(t.isNonScopedSlot&&n(", undefined, true"),n(")"))}function mK(t,e){const{test:n,consequent:i,alternate:s,newline:o}=t,{push:r,indent:a,deindent:l,newline:c}=e;if(n.type===4){const d=!o4(n.content);d&&r("("),iO(n,e),d&&r(")")}else r("("),Ti(n,e),r(")");o&&a(),e.indentLevel++,o||r(" "),r("? "),Ti(i,e),e.indentLevel--,o&&c(),o||r(" "),r(": ");const u=s.type===19;u||e.indentLevel++,Ti(s,e),u||e.indentLevel--,o&&l(!0)}function gK(t,e){const{push:n,helper:i,indent:s,deindent:o,newline:r}=e,{needPauseTracking:a,needArraySpread:l}=t;l&&n("[...("),n(`_cache[${t.index}] || (`),a&&(s(),n(`${i(c0)}(-1`),t.inVOnce&&n(", true"),n("),"),r(),n("(")),n(`_cache[${t.index}] = `),Ti(t.value,e),a&&(n(`).cacheIndex = ${t.index},`),r(),n(`${i(c0)}(1),`),r(),n(`_cache[${t.index}]`),o()),n(")"),l&&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 vK=nO(/^(?:if|else|else-if)$/,(t,e,n)=>_K(t,e,n,(i,s,o)=>{const r=n.parent.children;let a=r.indexOf(i),l=0;for(;a-->=0;){const c=r[a];c&&c.type===9&&(l+=c.branches.length)}return()=>{if(o)i.codegenNode=m7(s,l,n);else{const c=yK(i.codegenNode);c.alternate=m7(s,l+i.branches.length-1,n)}}}));function _K(t,e,n,i){if(e.name!=="else"&&(!e.exp||!e.exp.content.trim())){const s=e.exp?e.exp.loc:t.loc;n.onError(ss(28,e.loc)),e.exp=Kt("true",!1,s)}if(e.name==="if"){const s=p7(t,e),o={type:9,loc:WX(t.loc),branches:[s]};if(n.replaceNode(o),i)return i(o,s,!0)}else{const s=n.parent.children;let o=s.indexOf(t);for(;o-->=-1;){const r=s[o];if(r&&qL(r)){n.removeNode(r);continue}if(r&&r.type===9){(e.name==="else-if"||e.name==="else")&&r.branches[r.branches.length-1].condition===void 0&&n.onError(ss(30,t.loc)),n.removeNode();const a=p7(t,e);r.branches.push(a);const l=i&&i(r,a,!1);Rb(a,n),l&&l(),n.currentNode=null}else n.onError(ss(30,t.loc));break}}}function p7(t,e){const n=t.tagType===3;return{type:10,loc:t.loc,condition:e.name==="else"?void 0:e.exp,children:n&&!ir(t,"for")?t.children:[t],userKey:Db(t,"key"),isTemplateIf:n}}function m7(t,e,n){return t.condition?Dk(t.condition,g7(t,e,n),Vs(n.helper(L1),['""',"true"])):g7(t,e,n)}function g7(t,e,n){const{helper:i}=n,s=Ps("key",Kt(`${e}`,!1,Wo,2)),{children:o}=t,r=o[0];if(o.length!==1||r.type!==1)if(o.length===1&&r.type===11){const l=r.codegenNode;return f0(l,s,n),l}else{let l=64;return Fg(n,i(Rg),cr([s]),o,l,void 0,void 0,!0,!1,!1,t.loc)}else{const l=r.codegenNode,c=DX(l);return c.type===13&&s4(c,n),f0(c,s,n),l}}function yK(t){for(;;)if(t.type===19)if(t.alternate.type===19)t=t.alternate;else return t;else t.type===20&&(t=t.value)}const bK=nO("for",(t,e,n)=>{const{helper:i,removeHelper:s}=n;return wK(t,e,n,o=>{const r=Vs(i(Z6),[o.source]),a=d0(t),l=ir(t,"memo"),c=Db(t,"key",!1,!0);c&&c.type;let u=c&&(c.type===6?c.value?Kt(c.value.content,!0):void 0:c.exp);const d=c&&u?Ps("key",u):null,h=o.source.type===4&&o.source.constType>0,f=h?64:c?128:256;return o.codegenNode=Fg(n,i(Rg),void 0,r,f,void 0,void 0,!0,!h,!1,t.loc),()=>{let p;const{children:m}=o,b=m.length!==1||m[0].type!==1,w=h0(t)?t:a&&t.children.length===1&&h0(t.children[0])?t.children[0]:null;if(w?(p=w.codegenNode,a&&d&&f0(p,d,n)):b?p=Fg(n,i(Rg),d?cr([d]):void 0,t.children,64,void 0,void 0,!0,void 0,!1):(p=m[0].codegenNode,a&&d&&f0(p,d,n),p.isBlock!==!h&&(p.isBlock?(s(vd),s(Pf(n.inSSR,p.isComponent))):s(Tf(n.inSSR,p.isComponent))),p.isBlock=!h,p.isBlock?(i(vd),i(Pf(n.inSSR,p.isComponent))):i(Tf(n.inSSR,p.isComponent))),l){const k=Mf(Fk(o.parseResult,[Kt("_cached")]));k.body=CX([zr(["const _memo = (",l.exp,")"]),zr(["if (_cached",...u?[" && _cached.key === ",u]:[],` && ${n.helperString(NL)}(_cached, _memo)) return _cached`]),zr(["const _item = ",p]),Kt("_item.memo = _memo"),Kt("return _item")]),r.arguments.push(k,Kt("_cache"),Kt(String(n.cached.length))),n.cached.push(null)}else r.arguments.push(Mf(Fk(o.parseResult),p,!0))}})});function wK(t,e,n,i){if(!e.exp){n.onError(ss(31,e.loc));return}const s=e.forParseResult;if(!s){n.onError(ss(32,e.loc));return}rO(s);const{addIdentifiers:o,removeIdentifiers:r,scopes:a}=n,{source:l,value:c,key:u,index:d}=s,h={type:11,loc:e.loc,source:l,valueAlias:c,keyAlias:u,objectIndexAlias:d,parseResult:s,children:d0(t)?t.children:[t]};n.replaceNode(h),a.vFor++;const f=i&&i(h);return()=>{a.vFor--,f&&f()}}function rO(t,e){t.finalized||(t.finalized=!0)}function Fk({value:t,key:e,index:n},i=[]){return kK([t,e,n,...i])}function kK(t){let e=t.length;for(;e--&&!t[e];);return t.slice(0,e+1).map((n,i)=>n||Kt("_".repeat(i+1),!1))}const v7=Kt("undefined",!1),CK=(t,e)=>{if(t.type===1&&(t.tagType===1||t.tagType===3)){const n=ir(t,"slot");if(n)return n.exp,e.scopes.vSlot++,()=>{e.scopes.vSlot--}}},xK=(t,e,n,i)=>Mf(t,n,!1,!0,n.length?n[0].loc:i);function SK(t,e,n=xK){e.helper(t4);const{children:i,loc:s}=t,o=[],r=[];let a=e.scopes.vSlot>0||e.scopes.vFor>0;const l=ir(t,"slot",!0);if(l){const{arg:b,exp:w}=l;b&&!lo(b)&&(a=!0),o.push(Ps(b||Kt("default",!0),n(w,void 0,i,s)))}let c=!1,u=!1;const d=[],h=new Set;let f=0;for(let b=0;b<i.length;b++){const w=i[b];let k;if(!d0(w)||!(k=ir(w,"slot",!0))){w.type!==3&&d.push(w);continue}if(l){e.onError(ss(37,k.loc));break}c=!0;const{children:C,loc:A}=w,{arg:S=Kt("default",!0),exp:M,loc:P}=k;let T;lo(S)?T=S?S.content:"default":a=!0;const I=ir(w,"for"),L=n(M,I,C,A);let R,V;if(R=ir(w,"if"))a=!0,r.push(Dk(R.exp,Yv(S,L,f++),v7));else if(V=ir(w,/^else(?:-if)?$/,!0)){let H=b,F;for(;H--&&(F=i[H],!!qL(F)););if(F&&d0(F)&&ir(F,/^(?:else-)?if$/)){let U=r[r.length-1];for(;U.alternate.type===19;)U=U.alternate;U.alternate=V.exp?Dk(V.exp,Yv(S,L,f++),v7):Yv(S,L,f++)}else e.onError(ss(30,V.loc))}else if(I){a=!0;const H=I.forParseResult;H?(rO(H),r.push(Vs(e.helper(Z6),[H.source,Mf(Fk(H),Yv(S,L),!0)]))):e.onError(ss(32,I.loc))}else{if(T){if(h.has(T)){e.onError(ss(38,P));continue}h.add(T),T==="default"&&(u=!0)}o.push(Ps(S,L))}}if(!l){const b=(w,k)=>{const C=n(w,void 0,k,s);return e.compatConfig&&(C.isNonScopedSlot=!0),Ps("default",C)};c?d.length&&!d.every(r4)&&(u?e.onError(ss(39,d[0].loc)):o.push(b(void 0,d))):o.push(b(void 0,i))}const p=a?2:D_(t.children)?3:1;let m=cr(o.concat(Ps("_",Kt(p+"",!1))),s);return r.length&&(m=Vs(e.helper(FL),[m,Ju(r)])),{slots:m,hasDynamicSlots:a}}function Yv(t,e,n){const i=[Ps("name",t),Ps("fn",e)];return n!=null&&i.push(Ps("key",Kt(String(n),!0))),cr(i)}function D_(t){for(let e=0;e<t.length;e++){const n=t[e];switch(n.type){case 1:if(n.tagType===2||D_(n.children))return!0;break;case 9:if(D_(n.branches))return!0;break;case 10:case 11:if(D_(n.children))return!0;break}}return!1}const aO=new WeakMap,$K=(t,e)=>function(){if(t=e.currentNode,!(t.type===1&&(t.tagType===0||t.tagType===1)))return;const{tag:i,props:s}=t,o=t.tagType===1;let r=o?AK(t,e):`"${i}"`;const a=yt(r)&&r.callee===q6;let l,c,u=0,d,h,f,p=a||r===Zm||r===H6||!o&&(i==="svg"||i==="foreignObject"||i==="math");if(s.length>0){const m=lO(t,e,void 0,o,a);l=m.props,u=m.patchFlag,h=m.dynamicPropNames;const b=m.directives;f=b&&b.length?Ju(b.map(w=>MK(w,e))):void 0,m.shouldUseBlock&&(p=!0)}if(t.children.length>0)if(r===a0&&(p=!0,u|=1024),o&&r!==Zm&&r!==a0){const{slots:b,hasDynamicSlots:w}=SK(t,e);c=b,w&&(u|=1024)}else if(t.children.length===1&&r!==Zm){const b=t.children[0],w=b.type,k=w===5||w===8;k&&Io(b,e)===0&&(u|=1),k||w===2?c=b:c=t.children}else c=t.children;h&&h.length&&(d=TK(h)),t.codegenNode=Fg(e,r,l,c,u===0?void 0:u,d,f,!!p,!1,o,t.loc)};function AK(t,e,n=!1){let{tag:i}=t;const s=Nk(i),o=Db(t,"is",!1,!0);if(o)if(s||Qu("COMPILER_IS_ON_ELEMENT",e)){let a;if(o.type===6?a=o.value&&Kt(o.value.content,!0):(a=o.exp,a||(a=Kt("is",!1,o.arg.loc))),a)return Vs(e.helper(q6),[a])}else o.type===6&&o.value.content.startsWith("vue:")&&(i=o.value.content.slice(4));const r=zL(i)||e.isBuiltInComponent(i);return r?(n||e.helper(r),r):(e.helper(Y6),e.components.add(i),Bg(i,"component"))}function lO(t,e,n=t.props,i,s,o=!1){const{tag:r,loc:a,children:l}=t;let c=[];const u=[],d=[],h=l.length>0;let f=!1,p=0,m=!1,b=!1,w=!1,k=!1,C=!1,A=!1;const S=[],M=L=>{c.length&&(u.push(cr(_7(c),a)),c=[]),L&&u.push(L)},P=()=>{e.scopes.vFor>0&&c.push(Ps(Kt("ref_for",!0),Kt("true")))},T=({key:L,value:R})=>{if(lo(L)){const V=L.content,H=Id(V);if(H&&(!i||s)&&V.toLowerCase()!=="onclick"&&V!=="onUpdate:modelValue"&&!ul(V)&&(k=!0),H&&ul(V)&&(A=!0),H&&R.type===14&&(R=R.arguments[0]),R.type===20||(R.type===4||R.type===8)&&Io(R,e)>0)return;V==="ref"?m=!0:V==="class"?b=!0:V==="style"?w=!0:V!=="key"&&!S.includes(V)&&S.push(V),i&&(V==="class"||V==="style")&&!S.includes(V)&&S.push(V)}else C=!0};for(let L=0;L<n.length;L++){const R=n[L];if(R.type===6){const{loc:V,name:H,nameLoc:F,value:U}=R;let Y=!0;if(H==="ref"&&(m=!0,P()),H==="is"&&(Nk(r)||U&&U.content.startsWith("vue:")||Qu("COMPILER_IS_ON_ELEMENT",e)))continue;c.push(Ps(Kt(H,!0,F),Kt(U?U.content:"",Y,U?U.loc:V)))}else{const{name:V,arg:H,exp:F,loc:U,modifiers:Y}=R,z=V==="bind",X=V==="on";if(V==="slot"){i||e.onError(ss(40,U));continue}if(V==="once"||V==="memo"||V==="is"||z&&Ru(H,"is")&&(Nk(r)||Qu("COMPILER_IS_ON_ELEMENT",e))||X&&o)continue;if((z&&Ru(H,"key")||X&&h&&Ru(H,"vue:before-update"))&&(f=!0),z&&Ru(H,"ref")&&P(),!H&&(z||X)){if(C=!0,F)if(z){if(M(),Qu("COMPILER_V_BIND_OBJECT_ORDER",e)){u.unshift(F);continue}P(),M(),u.push(F)}else M({type:14,loc:U,callee:e.helper(e4),arguments:i?[F]:[F,"true"]});else e.onError(ss(z?34:35,U));continue}z&&Y.some(G=>G.content==="prop")&&(p|=32);const Z=e.directiveTransforms[V];if(Z){const{props:G,needRuntime:Q}=Z(R,t,e);!o&&G.forEach(T),X&&H&&!lo(H)?M(cr(G,a)):c.push(...G),Q&&(d.push(R),mo(Q)&&aO.set(R,Q))}else XW(V)||(d.push(R),h&&(f=!0))}}let I;if(u.length?(M(),u.length>1?I=Vs(e.helper(l0),u,a):I=u[0]):c.length&&(I=cr(_7(c),a)),C?p|=16:(b&&!i&&(p|=2),w&&!i&&(p|=4),S.length&&(p|=8),k&&(p|=32)),!f&&(p===0||p===32)&&(m||A||d.length>0)&&(p|=512),!e.inSSR&&I)switch(I.type){case 15:let L=-1,R=-1,V=!1;for(let U=0;U<I.properties.length;U++){const Y=I.properties[U].key;lo(Y)?Y.content==="class"?L=U:Y.content==="style"&&(R=U):Y.isHandlerKey||(V=!0)}const H=I.properties[L],F=I.properties[R];V?I=Vs(e.helper(Vg),[I]):(H&&!lo(H.value)&&(H.value=Vs(e.helper(J6),[H.value])),F&&(w||F.value.type===4&&F.value.content.trim()[0]==="["||F.value.type===17)&&(F.value=Vs(e.helper(Q6),[F.value])));break;case 14:break;default:I=Vs(e.helper(Vg),[Vs(e.helper(O1),[I])]);break}return{props:I,directives:d,patchFlag:p,dynamicPropNames:S,shouldUseBlock:f}}function _7(t){const e=new Map,n=[];for(let i=0;i<t.length;i++){const s=t[i];if(s.key.type===8||!s.key.isStatic){n.push(s);continue}const o=s.key.content,r=e.get(o);r?(o==="style"||o==="class"||Id(o))&&EK(r,s):(e.set(o,s),n.push(s))}return n}function EK(t,e){t.value.type===17?t.value.elements.push(e.value):t.value=Ju([t.value,e.value],t.loc)}function MK(t,e){const n=[],i=aO.get(t);i?n.push(e.helperString(i)):(e.helper(G6),e.directives.add(t.name),n.push(Bg(t.name,"directive")));const{loc:s}=t;if(t.exp&&n.push(t.exp),t.arg&&(t.exp||n.push("void 0"),n.push(t.arg)),Object.keys(t.modifiers).length){t.arg||(t.exp||n.push("void 0"),n.push("void 0"));const o=Kt("true",!1,s);n.push(cr(t.modifiers.map(r=>Ps(r,o)),s))}return Ju(n,t.loc)}function TK(t){let e="[";for(let n=0,i=t.length;n<i;n++)e+=JSON.stringify(t[n]),n<i-1&&(e+=", ");return e+"]"}function Nk(t){return t==="component"||t==="Component"}const PK=(t,e)=>{if(h0(t)){const{children:n,loc:i}=t,{slotName:s,slotProps:o}=IK(t,e),r=[e.prefixIdentifiers?"_ctx.$slots":"$slots",s,"{}","undefined","true"];let a=2;o&&(r[2]=o,a=3),n.length&&(r[3]=Mf([],n,!1,!1,i),a=4),e.scopeId&&!e.slotted&&(a=5),r.splice(a),t.codegenNode=Vs(e.helper(VL),r,i)}};function IK(t,e){let n='"default"',i;const s=[];for(let o=0;o<t.props.length;o++){const r=t.props[o];if(r.type===6)r.value&&(r.name==="name"?n=JSON.stringify(r.value.content):(r.name=Un(r.name),s.push(r)));else if(r.name==="bind"&&Ru(r.arg,"name")){if(r.exp)n=r.exp;else if(r.arg&&r.arg.type===4){const a=Un(r.arg.content);n=r.exp=Kt(a,!1,r.arg.loc)}}else r.name==="bind"&&r.arg&&lo(r.arg)&&(r.arg.content=Un(r.arg.content)),s.push(r)}if(s.length>0){const{props:o,directives:r}=lO(t,e,s,!1,!1);i=o,r.length&&e.onError(ss(36,r[0].loc))}return{slotName:n,slotProps:i}}const cO=(t,e,n,i)=>{const{loc:s,modifiers:o,arg:r}=t;!t.exp&&!o.length&&n.onError(ss(35,s));let a;if(r.type===4)if(r.isStatic){let d=r.content;d.startsWith("vue:")&&(d=`vnode-${d.slice(4)}`);const h=e.tagType!==0||d.startsWith("vnode")||!/[A-Z]/.test(d)?Gu(Un(d)):`on:${d}`;a=Kt(h,!0,r.loc)}else a=zr([`${n.helperString(Ok)}(`,r,")"]);else a=r,a.children.unshift(`${n.helperString(Ok)}(`),a.children.push(")");let l=t.exp;l&&!l.content.trim()&&(l=void 0);let c=n.cacheHandlers&&!l&&!n.inVOnce;if(l){const d=jL(l),h=!(d||PX(l)),f=l.content.includes(";");(h||c&&d)&&(l=zr([`${h?"$event":"(...args)"} => ${f?"{":"("}`,l,f?"}":")"]))}let u={props:[Ps(a,l||Kt("() => {}",!1,s))]};return i&&(u=i(u)),c&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach(d=>d.key.isHandlerKey=!0),u},LK=(t,e,n)=>{const{modifiers:i,loc:s}=t,o=t.arg;let{exp:r}=t;return r&&r.type===4&&!r.content.trim()&&(r=void 0),o.type!==4?(o.children.unshift("("),o.children.push(') || ""')):o.isStatic||(o.content=o.content?`${o.content} || ""`:'""'),i.some(a=>a.content==="camel")&&(o.type===4?o.isStatic?o.content=Un(o.content):o.content=`${n.helperString(Lk)}(${o.content})`:(o.children.unshift(`${n.helperString(Lk)}(`),o.children.push(")"))),n.inSSR||(i.some(a=>a.content==="prop")&&y7(o,"."),i.some(a=>a.content==="attr")&&y7(o,"^")),{props:[Ps(o,r)]}},y7=(t,e)=>{t.type===4?t.isStatic?t.content=e+t.content:t.content=`\`${e}\${${t.content}}\``:(t.children.unshift(`'${e}' + (`),t.children.push(")"))},OK=(t,e)=>{if(t.type===0||t.type===1||t.type===11||t.type===10)return()=>{const n=t.children;let i,s=!1;for(let o=0;o<n.length;o++){const r=n[o];if(_w(r)){s=!0;for(let a=o+1;a<n.length;a++){const l=n[a];if(_w(l))i||(i=n[o]=zr([r],r.loc)),i.children.push(" + ",l),n.splice(a,1),a--;else{i=void 0;break}}}}if(!(!s||n.length===1&&(t.type===0||t.type===1&&t.tagType===0&&!t.props.find(o=>o.type===7&&!e.directiveTransforms[o.name])&&t.tag!=="template")))for(let o=0;o<n.length;o++){const r=n[o];if(_w(r)||r.type===8){const a=[];(r.type!==2||r.content!==" ")&&a.push(r),!e.ssr&&Io(r,e)===0&&a.push("1"),n[o]={type:12,content:r,loc:r.loc,codegenNode:Vs(e.helper(W6),a)}}}}},b7=new WeakSet,DK=(t,e)=>{if(t.type===1&&ir(t,"once",!0))return b7.has(t)||e.inVOnce||e.inSSR?void 0:(b7.add(t),e.inVOnce=!0,e.helper(c0),()=>{e.inVOnce=!1;const n=e.currentNode;n.codegenNode&&(n.codegenNode=e.cache(n.codegenNode,!0,!0))})},uO=(t,e,n)=>{const{exp:i,arg:s}=t;if(!i)return n.onError(ss(41,t.loc)),qp();const o=i.loc.source.trim(),r=i.type===4?i.content:o,a=n.bindingMetadata[o];if(a==="props"||a==="props-aliased")return n.onError(ss(44,i.loc)),qp();if(a==="literal-const"||a==="setup-const")return n.onError(ss(45,i.loc)),qp();if(!r.trim()||!jL(i))return n.onError(ss(42,i.loc)),qp();const l=s||Kt("modelValue",!0),c=s?lo(s)?`onUpdate:${Un(s.content)}`:zr(['"onUpdate:" + ',s]):"onUpdate:modelValue";let u;const d=n.isTS?"($event: any)":"$event";u=zr([`${d} => ((`,i,") = $event)"]);const h=[Ps(l,t.exp),Ps(c,u)];if(t.modifiers.length&&e.tagType===1){const f=t.modifiers.map(m=>m.content).map(m=>(o4(m)?m:JSON.stringify(m))+": true").join(", "),p=s?lo(s)?`${s.content}Modifiers`:zr([s,' + "Modifiers"']):"modelModifiers";h.push(Ps(p,Kt(`{ ${f} }`,!1,t.loc,2)))}return qp(h)};function qp(t=[]){return{props:t}}const RK=/[\w).+\-_$\]]/,VK=(t,e)=>{Qu("COMPILER_FILTERS",e)&&(t.type===5?p0(t.content,e):t.type===1&&t.props.forEach(n=>{n.type===7&&n.name!=="for"&&n.exp&&p0(n.exp,e)}))};function p0(t,e){if(t.type===4)w7(t,e);else for(let n=0;n<t.children.length;n++){const i=t.children[n];typeof i=="object"&&(i.type===4?w7(i,e):i.type===8?p0(t,e):i.type===5&&p0(i.content,e))}}function w7(t,e){const n=t.content;let i=!1,s=!1,o=!1,r=!1,a=0,l=0,c=0,u=0,d,h,f,p,m=[];for(f=0;f<n.length;f++)if(h=d,d=n.charCodeAt(f),i)d===39&&h!==92&&(i=!1);else if(s)d===34&&h!==92&&(s=!1);else if(o)d===96&&h!==92&&(o=!1);else if(r)d===47&&h!==92&&(r=!1);else if(d===124&&n.charCodeAt(f+1)!==124&&n.charCodeAt(f-1)!==124&&!a&&!l&&!c)p===void 0?(u=f+1,p=n.slice(0,f).trim()):b();else{switch(d){case 34:s=!0;break;case 39:i=!0;break;case 96:o=!0;break;case 40:c++;break;case 41:c--;break;case 91:l++;break;case 93:l--;break;case 123:a++;break;case 125:a--;break}if(d===47){let w=f-1,k;for(;w>=0&&(k=n.charAt(w),k===" ");w--);(!k||!RK.test(k))&&(r=!0)}}p===void 0?p=n.slice(0,f).trim():u!==0&&b();function b(){m.push(n.slice(u,f).trim()),u=f+1}if(m.length){for(f=0;f<m.length;f++)p=FK(p,m[f],e);t.content=p,t.ast=void 0}}function FK(t,e,n){n.helper(X6);const i=e.indexOf("(");if(i<0)return n.filters.add(e),`${Bg(e,"filter")}(${t})`;{const s=e.slice(0,i),o=e.slice(i+1);return n.filters.add(s),`${Bg(s,"filter")}(${t}${o!==")"?","+o:o}`}}const k7=new WeakSet,NK=(t,e)=>{if(t.type===1){const n=ir(t,"memo");return!n||k7.has(t)||e.inSSR?void 0:(k7.add(t),()=>{const i=t.codegenNode||e.currentNode.codegenNode;i&&i.type===13&&(t.tagType!==1&&s4(i,e),t.codegenNode=Vs(e.helper(n4),[n.exp,Mf(void 0,i),"_cache",String(e.cached.length)]),e.cached.push(null))})}},BK=(t,e)=>{if(t.type===1){for(const n of t.props)if(n.type===7&&n.name==="bind"&&(!n.exp||n.exp.type===4&&!n.exp.content.trim())&&n.arg){const i=n.arg;if(i.type!==4||!i.isStatic)e.onError(ss(53,i.loc)),n.exp=Kt("",!0,i.loc);else{const s=Un(i.content);(HL.test(s[0])||s[0]==="-")&&(n.exp=Kt(s,!1,i.loc))}}}};function zK(t){return[[BK,DK,vK,NK,bK,VK,PK,$K,CK,OK],{on:cO,bind:LK,model:uO}]}function HK(t,e={}){const n=e.onError||i4,i=e.mode==="module";e.prefixIdentifiers===!0?n(ss(48)):i&&n(ss(49));const s=!1;e.cacheHandlers&&n(ss(50)),e.scopeId&&!i&&n(ss(51));const o=cn({},e,{prefixIdentifiers:s}),r=Ke(t)?GX(t,o):t,[a,l]=zK();return JX(r,cn({},o,{nodeTransforms:[...a,...e.nodeTransforms||[]],directiveTransforms:cn({},l,e.directiveTransforms||{})})),nK(r,o)}const UK=()=>({props:[]});/**
30 +* @vue/compiler-dom v3.5.27
29 31 * (c) 2018-present Yuxi (Evan) You and Vue contributors
30 32 * @license MIT
31 -**/const H7=Symbol(""),U7=Symbol(""),W7=Symbol(""),K7=Symbol(""),L_=Symbol(""),q7=Symbol(""),G7=Symbol(""),Y7=Symbol(""),Z7=Symbol(""),J7=Symbol("");FV({[H7]:"vModelRadio",[U7]:"vModelCheckbox",[W7]:"vModelText",[K7]:"vModelSelect",[L_]:"vModelDynamic",[q7]:"withModifiers",[G7]:"withKeys",[Y7]:"vShow",[Z7]:"Transition",[J7]:"TransitionGroup"});let Au;function iz(e,t=!1){return Au||(Au=document.createElement("div")),t?(Au.innerHTML=`<div foo="${e.replace(/"/g,"&quot;")}">`,Au.children[0].getAttribute("foo")):(Au.innerHTML=e,Au.textContent)}const lz={parseMode:"html",isVoidTag:jR,isNativeTag:e=>VR(e)||BR(e)||zR(e),isPreTag:e=>e==="pre",decodeEntities:iz,isBuiltInComponent:e=>{if(e==="Transition"||e==="transition")return Z7;if(e==="TransitionGroup"||e==="transition-group")return J7},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}},az=e=>{e.type===1&&e.props.forEach((t,n)=>{t.type===6&&t.name==="style"&&t.value&&(e.props[n]={type:7,name:"bind",arg:St("style",!0,t.loc),exp:uz(t.value.content,t.loc),modifiers:[],loc:t.loc})})},uz=(e,t)=>{const n=k$(e);return St(JSON.stringify(n),!1,t,3)};function Pl(e,t){return vn(e,t)}const cz=(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(Pl(53,r)),t.children.length&&(n.onError(Pl(54,r)),t.children.length=0),{props:[$n(St("innerHTML",!0,r),o||St("",!0))]}},dz=(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(Pl(55,r)),t.children.length&&(n.onError(Pl(56,r)),t.children.length=0),{props:[$n(St("textContent",!0),o?Ar(o,n)>0?o:Vn(n.helperString(C0),[o],r):St("",!0))]}},fz=(e,t,n)=>{const o=j7(e,t,n);if(!o.props.length||t.tagType===1)return o;e.arg&&n.onError(Pl(58,e.arg.loc));const{tag:r}=t,s=n.isCustomElement(r);if(r==="input"||r==="textarea"||r==="select"||s){let i=W7,l=!1;if(r==="input"||s){const a=k0(t,"type");if(a){if(a.type===7)i=L_;else if(a.value)switch(a.value.content){case"radio":i=H7;break;case"checkbox":i=U7;break;case"file":l=!0,n.onError(Pl(59,e.loc));break}}else GV(t)&&(i=L_)}else r==="select"&&(i=K7);l||(o.needRuntime=n.helper(i))}else n.onError(Pl(57,e.loc));return o.props=o.props.filter(i=>!(i.key.type===4&&i.key.content==="modelValue")),o},pz=yr("passive,once,capture"),hz=yr("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),mz=yr("left,right"),X7=yr("onkeyup,onkeydown,onkeypress",!0),gz=(e,t,n,o)=>{const r=[],s=[],i=[];for(let l=0;l<t.length;l++){const a=t[l];a==="native"&&Cp("COMPILER_V_ON_NATIVE",n)||pz(a)?i.push(a):mz(a)?Ho(e)?X7(e.content)?r.push(a):s.push(a):(r.push(a),s.push(a)):hz(a)?s.push(a):r.push(a)}return{keyModifiers:r,nonKeyModifiers:s,eventOptionModifiers:i}},e6=(e,t)=>Ho(e)&&e.content.toLowerCase()==="onclick"?St(t,!0):e.type!==4?as(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,vz=(e,t,n)=>z7(e,t,n,o=>{const{modifiers:r}=e;if(!r.length)return o;let{key:s,value:i}=o.props[0];const{keyModifiers:l,nonKeyModifiers:a,eventOptionModifiers:u}=gz(s,r,n,e.loc);if(a.includes("right")&&(s=e6(s,"onContextmenu")),a.includes("middle")&&(s=e6(s,"onMouseup")),a.length&&(i=Vn(n.helper(q7),[i,JSON.stringify(a)])),l.length&&(!Ho(s)||X7(s.content))&&(i=Vn(n.helper(G7),[i,JSON.stringify(l)])),u.length){const c=u.map(ql).join("");s=Ho(s)?St(`${s.content}${c}`,!0):as(["(",s,`) + "${c}"`])}return{props:[$n(s,i)]}}),yz=(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(Pl(61,r)),{props:[],needRuntime:n.helper(Y7)}},_z=(e,t)=>{e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")&&t.removeNode()},bz=[az],wz={cloak:sz,html:cz,text:dz,model:fz,on:vz,show:yz};function Cz(e,t={}){return rz(e,Bt({},lz,t,{nodeTransforms:[_z,...bz,...t.nodeTransforms||[]],directiveTransforms:Bt({},wz,t.directiveTransforms||{}),transformHoist:null}))}/**
32 -* vue v3.4.23
33 +**/const dO=Symbol(""),hO=Symbol(""),fO=Symbol(""),pO=Symbol(""),Bk=Symbol(""),mO=Symbol(""),gO=Symbol(""),vO=Symbol(""),_O=Symbol(""),yO=Symbol("");bX({[dO]:"vModelRadio",[hO]:"vModelCheckbox",[fO]:"vModelText",[pO]:"vModelSelect",[Bk]:"vModelDynamic",[mO]:"withModifiers",[gO]:"withKeys",[vO]:"vShow",[_O]:"Transition",[yO]:"TransitionGroup"});let oh;function jK(t,e=!1){return oh||(oh=document.createElement("div")),e?(oh.innerHTML=`<div foo="${t.replace(/"/g,"&quot;")}">`,oh.children[0].getAttribute("foo")):(oh.innerHTML=t,oh.textContent)}const WK={parseMode:"html",isVoidTag:dY,isNativeTag:t=>lY(t)||cY(t)||uY(t),isPreTag:t=>t==="pre",isIgnoreNewlineTag:t=>t==="pre"||t==="textarea",decodeEntities:jK,isBuiltInComponent:t=>{if(t==="Transition"||t==="transition")return _O;if(t==="TransitionGroup"||t==="transition-group")return yO},getNamespace(t,e,n){let i=e?e.ns:n;if(e&&i===2)if(e.tag==="annotation-xml"){if(t==="svg")return 1;e.props.some(s=>s.type===6&&s.name==="encoding"&&s.value!=null&&(s.value.content==="text/html"||s.value.content==="application/xhtml+xml"))&&(i=0)}else/^m(?:[ions]|text)$/.test(e.tag)&&t!=="mglyph"&&t!=="malignmark"&&(i=0);else e&&i===1&&(e.tag==="foreignObject"||e.tag==="desc"||e.tag==="title")&&(i=0);if(i===0){if(t==="svg")return 1;if(t==="math")return 2}return i}},YK=t=>{t.type===1&&t.props.forEach((e,n)=>{e.type===6&&e.name==="style"&&e.value&&(t.props[n]={type:7,name:"bind",arg:Kt("style",!0,e.loc),exp:qK(e.value.content,e.loc),modifiers:[],loc:e.loc})})},qK=(t,e)=>{const n=FP(t);return Kt(JSON.stringify(n),!1,e,3)};function $c(t,e){return ss(t,e)}const GK=(t,e,n)=>{const{exp:i,loc:s}=t;return i||n.onError($c(54,s)),e.children.length&&(n.onError($c(55,s)),e.children.length=0),{props:[Ps(Kt("innerHTML",!0,s),i||Kt("",!0))]}},XK=(t,e,n)=>{const{exp:i,loc:s}=t;return i||n.onError($c(56,s)),e.children.length&&(n.onError($c(57,s)),e.children.length=0),{props:[Ps(Kt("textContent",!0),i?Io(i,n)>0?i:Vs(n.helperString(Ob),[i],s):Kt("",!0))]}},KK=(t,e,n)=>{const i=uO(t,e,n);if(!i.props.length||e.tagType===1)return i;t.arg&&n.onError($c(59,t.arg.loc));const{tag:s}=e,o=n.isCustomElement(s);if(s==="input"||s==="textarea"||s==="select"||o){let r=fO,a=!1;if(s==="input"||o){const l=Db(e,"type");if(l){if(l.type===7)r=Bk;else if(l.value)switch(l.value.content){case"radio":r=dO;break;case"checkbox":r=hO;break;case"file":a=!0,n.onError($c(60,t.loc));break}}else IX(e)&&(r=Bk)}else s==="select"&&(r=pO);a||(i.needRuntime=n.helper(r))}else n.onError($c(58,t.loc));return i.props=i.props.filter(r=>!(r.key.type===4&&r.key.content==="modelValue")),i},ZK=Uo("passive,once,capture"),JK=Uo("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),QK=Uo("left,right"),bO=Uo("onkeyup,onkeydown,onkeypress"),eZ=(t,e,n,i)=>{const s=[],o=[],r=[];for(let a=0;a<e.length;a++){const l=e[a].content;l==="native"&&Ng("COMPILER_V_ON_NATIVE",n)||ZK(l)?r.push(l):QK(l)?lo(t)?bO(t.content.toLowerCase())?s.push(l):o.push(l):(s.push(l),o.push(l)):JK(l)?o.push(l):s.push(l)}return{keyModifiers:s,nonKeyModifiers:o,eventOptionModifiers:r}},C7=(t,e)=>lo(t)&&t.content.toLowerCase()==="onclick"?Kt(e,!0):t.type!==4?zr(["(",t,`) === "onClick" ? "${e}" : (`,t,")"]):t,tZ=(t,e,n)=>cO(t,e,n,i=>{const{modifiers:s}=t;if(!s.length)return i;let{key:o,value:r}=i.props[0];const{keyModifiers:a,nonKeyModifiers:l,eventOptionModifiers:c}=eZ(o,s,n,t.loc);if(l.includes("right")&&(o=C7(o,"onContextmenu")),l.includes("middle")&&(o=C7(o,"onMouseup")),l.length&&(r=Vs(n.helper(mO),[r,JSON.stringify(l)])),a.length&&(!lo(o)||bO(o.content.toLowerCase()))&&(r=Vs(n.helper(gO),[r,JSON.stringify(a)])),c.length){const u=c.map(Gc).join("");o=lo(o)?Kt(`${o.content}${u}`,!0):zr(["(",o,`) + "${u}"`])}return{props:[Ps(o,r)]}}),nZ=(t,e,n)=>{const{exp:i,loc:s}=t;return i||n.onError($c(62,s)),{props:[],needRuntime:n.helper(vO)}},sZ=(t,e)=>{t.type===1&&t.tagType===0&&(t.tag==="script"||t.tag==="style")&&e.removeNode()},iZ=[YK],oZ={cloak:UK,html:GK,text:XK,model:KK,on:tZ,show:nZ};function rZ(t,e={}){return HK(t,cn({},WK,e,{nodeTransforms:[sZ,...iZ,...e.nodeTransforms||[]],directiveTransforms:cn({},oZ,e.directiveTransforms||{}),transformHoist:null}))}/**
34 +* vue v3.5.27
33 35 * (c) 2018-present Yuxi (Evan) You and Vue contributors
34 36 * @license MIT
35 -**/const t6=new WeakMap;function kz(e){let t=t6.get(e??Wt);return t||(t=Object.create(null),t6.set(e??Wt,t)),t}function Sz(e,t){if(!tt(e))if(e.nodeType)e=e.innerHTML;else return yt;const n=e,o=kz(t),r=o[n];if(r)return r;if(e[0]==="#"){const a=document.querySelector(e);e=a?a.innerHTML:""}const s=Bt({hoistStatic:!0,onError:void 0,onWarn:yt},t);!s.isCustomElement&&typeof customElements<"u"&&(s.isCustomElement=a=>!!customElements.get(a));const{code:i}=Cz(e,s),l=new Function("Vue",i)(AV);return l._rc=!0,o[n]=l}zE(Sz);/*!
36 - * vue-router v4.3.2
37 +**/const x7=Object.create(null);function aZ(t,e){if(!Ke(t))if(t.nodeType)t=t.innerHTML;else return Dt;const n=JW(t,e),i=x7[n];if(i)return i;if(t[0]==="#"){const a=document.querySelector(t);t=a?a.innerHTML:""}const s=cn({hoistStatic:!0,onError:void 0,onWarn:Dt},e);!s.isCustomElement&&typeof customElements<"u"&&(s.isCustomElement=a=>!!customElements.get(a));const{code:o}=rZ(t,s),r=new Function("Vue",o)(pX);return r._rc=!0,x7[n]=r}iL(aZ);/*!
38 + * vue-router v4.4.4
37 39 * (c) 2024 Eduardo San Martin Morote
38 40 * @license MIT
39 - */const Wu=typeof document<"u";function $z(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const Qt=Object.assign;function Uv(e,t){const n={};for(const o in t){const r=t[o];n[o]=ms(r)?r.map(e):e(r)}return n}const Vf=()=>{},ms=Array.isArray,Q7=/#/g,Ez=/&/g,xz=/\//g,Mz=/=/g,Tz=/\?/g,ex=/\+/g,Oz=/%5B/g,Iz=/%5D/g,tx=/%5E/g,Az=/%60/g,nx=/%7B/g,Nz=/%7C/g,ox=/%7D/g,Pz=/%20/g;function zw(e){return encodeURI(""+e).replace(Nz,"|").replace(Oz,"[").replace(Iz,"]")}function Lz(e){return zw(e).replace(nx,"{").replace(ox,"}").replace(tx,"^")}function R_(e){return zw(e).replace(ex,"%2B").replace(Pz,"+").replace(Q7,"%23").replace(Ez,"%26").replace(Az,"`").replace(nx,"{").replace(ox,"}").replace(tx,"^")}function Rz(e){return R_(e).replace(Mz,"%3D")}function Dz(e){return zw(e).replace(Q7,"%23").replace(Tz,"%3F")}function Fz(e){return e==null?"":Dz(e).replace(xz,"%2F")}function $p(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const Vz=/\/$/,Bz=e=>e.replace(Vz,"");function Wv(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=Uz(o??t,n),{fullPath:o+(s&&"?")+s+i,path:o,query:r,hash:$p(i)}}function zz(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function n6(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function jz(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&Kc(t.matched[o],n.matched[r])&&rx(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Kc(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function rx(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Hz(e[n],t[n]))return!1;return!0}function Hz(e,t){return ms(e)?o6(e,t):ms(t)?o6(t,e):e===t}function o6(e,t){return ms(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function Uz(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 Ep;(function(e){e.pop="pop",e.push="push"})(Ep||(Ep={}));var Bf;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Bf||(Bf={}));function Wz(e){if(!e)if(Wu){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Bz(e)}const Kz=/^[^#]+#/;function qz(e,t){return e.replace(Kz,"#")+t}function Gz(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 E0=()=>({left:window.scrollX,top:window.scrollY});function Yz(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=Gz(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 r6(e,t){return(history.state?history.state.position-t:-1)+e}const D_=new Map;function Zz(e,t){D_.set(e,t)}function Jz(e){const t=D_.get(e);return D_.delete(e),t}let Xz=()=>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),n6(a,"")}return n6(n,e)+o+r}function Qz(e,t,n,o){let r=[],s=[],i=null;const l=({state:f})=>{const p=sx(e,location),h=n.value,m=t.value;let y=0;if(f){if(n.value=p,t.value=f,i&&i===h){i=null;return}y=m?f.position-m.position:0}else o(p);r.forEach(v=>{v(n.value,h,{delta:y,type:Ep.pop,direction:y?y>0?Bf.forward:Bf.back:Bf.unknown})})};function a(){i=n.value}function u(f){r.push(f);const p=()=>{const h=r.indexOf(f);h>-1&&r.splice(h,1)};return s.push(p),p}function c(){const{history:f}=window;f.state&&f.replaceState(Qt({},f.state,{scroll:E0()}),"")}function d(){for(const f of s)f();s=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:a,listen:u,destroy:d}}function s6(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?E0():null}}function ej(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,u,c){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+a:Xz()+e+a;try{t[c?"replaceState":"pushState"](u,"",f),r.value=u}catch(p){console.error(p),n[c?"replace":"assign"](f)}}function i(a,u){const c=Qt({},t.state,s6(r.value.back,a,r.value.forward,!0),u,{position:r.value.position});s(a,c,!0),o.value=a}function l(a,u){const c=Qt({},r.value,t.state,{forward:a,scroll:E0()});s(c.current,c,!0);const d=Qt({},s6(o.value,a,null),{position:c.position+1},u);s(a,d,!1),o.value=a}return{location:o,state:r,push:l,replace:i}}function ix(e){e=Wz(e);const t=ej(e),n=Qz(e,t.state,t.location,t.replace);function o(s,i=!0){i||n.pauseListeners(),history.go(s)}const r=Qt({location:"",base:e,go:o,createHref:qz.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 tj(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),ix(e)}function nj(e){return typeof e=="string"||e&&typeof e=="object"}function lx(e){return typeof e=="string"||typeof e=="symbol"}const Yi={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},ax=Symbol("");var i6;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(i6||(i6={}));function qc(e,t){return Qt(new Error,{type:e,[ax]:!0},t)}function ui(e,t){return e instanceof Error&&ax in e&&(t==null||!!(e.type&t))}const l6="[^/]+?",oj={sensitive:!1,strict:!1,start:!0,end:!0},rj=/[.+*?^${}()[\]/\\]/g;function sj(e,t){const n=Qt({},oj,t),o=[];let r=n.start?"^":"";const s=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(r+="/");for(let d=0;d<u.length;d++){const f=u[d];let p=40+(n.sensitive?.25:0);if(f.type===0)d||(r+="/"),r+=f.value.replace(rj,"\\$&"),p+=40;else if(f.type===1){const{value:h,repeatable:m,optional:y,regexp:v}=f;s.push({name:h,repeatable:m,optional:y});const w=v||l6;if(w!==l6){p+=10;try{new RegExp(`(${w})`)}catch(S){throw new Error(`Invalid custom RegExp for param "${h}" (${w}): `+S.message)}}let _=m?`((?:${w})(?:/(?:${w}))*)`:`(${w})`;d||(_=y&&u.length<2?`(?:/${_})`:"/"+_),y&&(_+="?"),r+=_,p+=20,y&&(p+=-8),m&&(p+=-20),w===".*"&&(p+=-50)}c.push(p)}o.push(c)}if(n.strict&&n.end){const u=o.length-1;o[u][o[u].length-1]+=.7000000000000001}n.strict||(r+="/?"),n.end?r+="$":n.strict&&(r+="(?:/|$)");const i=new RegExp(r,n.sensitive?"":"i");function l(u){const c=u.match(i),d={};if(!c)return null;for(let f=1;f<c.length;f++){const p=c[f]||"",h=s[f-1];d[h.name]=p&&h.repeatable?p.split("/"):p}return d}function a(u){let c="",d=!1;for(const f of e){(!d||!c.endsWith("/"))&&(c+="/"),d=!1;for(const p of f)if(p.type===0)c+=p.value;else if(p.type===1){const{value:h,repeatable:m,optional:y}=p,v=h in u?u[h]:"";if(ms(v)&&!m)throw new Error(`Provided param "${h}" is an array but it is not repeatable (* or + modifiers)`);const w=ms(v)?v.join("/"):v;if(!w)if(y)f.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${h}"`);c+=w}}return c||"/"}return{re:i,score:o,keys:s,parse:l,stringify:a}}function ij(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 lj(e,t){let n=0;const o=e.score,r=t.score;for(;n<o.length&&n<r.length;){const s=ij(o[n],r[n]);if(s)return s;n++}if(Math.abs(r.length-o.length)===1){if(a6(o))return 1;if(a6(r))return-1}return r.length-o.length}function a6(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const aj={type:0,value:""},uj=/[a-zA-Z0-9_]/;function cj(e){if(!e)return[[]];if(e==="/")return[[aj]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${u}": ${p}`)}let n=0,o=n;const r=[];let s;function i(){s&&r.push(s),s=[]}let l=0,a,u="",c="";function d(){u&&(n===0?s.push({type:0,value:u}):n===1||n===2||n===3?(s.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:u,regexp:c,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),u="")}function f(){u+=a}for(;l<e.length;){if(a=e[l++],a==="\\"&&n!==2){o=n,n=4;continue}switch(n){case 0:a==="/"?(u&&d(),i()):a===":"?(d(),n=1):f();break;case 4:f(),n=o;break;case 1:a==="("?n=2:uj.test(a)?f():(d(),n=0,a!=="*"&&a!=="?"&&a!=="+"&&l--);break;case 2:a===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+a:n=3:c+=a;break;case 3:d(),n=0,a!=="*"&&a!=="?"&&a!=="+"&&l--,c="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${u}"`),d(),i(),r}function dj(e,t,n){const o=sj(cj(e.path),n),r=Qt(o,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function fj(e,t){const n=[],o=new Map;t=d6({strict:!1,end:!0,sensitive:!1},t);function r(c){return o.get(c)}function s(c,d,f){const p=!f,h=pj(c);h.aliasOf=f&&f.record;const m=d6(t,c),y=[h];if("alias"in c){const _=typeof c.alias=="string"?[c.alias]:c.alias;for(const S of _)y.push(Qt({},h,{components:f?f.record.components:h.components,path:S,aliasOf:f?f.record:h}))}let v,w;for(const _ of y){const{path:S}=_;if(d&&S[0]!=="/"){const x=d.record.path,E=x[x.length-1]==="/"?"":"/";_.path=d.record.path+(S&&E+S)}if(v=dj(_,d,m),f?f.alias.push(v):(w=w||v,w!==v&&w.alias.push(v),p&&c.name&&!c6(v)&&i(c.name)),h.children){const x=h.children;for(let E=0;E<x.length;E++)s(x[E],v,f&&f.children[E])}f=f||v,(v.record.components&&Object.keys(v.record.components).length||v.record.name||v.record.redirect)&&a(v)}return w?()=>{i(w)}:Vf}function i(c){if(lx(c)){const d=o.get(c);d&&(o.delete(c),n.splice(n.indexOf(d),1),d.children.forEach(i),d.alias.forEach(i))}else{const d=n.indexOf(c);d>-1&&(n.splice(d,1),c.record.name&&o.delete(c.record.name),c.children.forEach(i),c.alias.forEach(i))}}function l(){return n}function a(c){let d=0;for(;d<n.length&&lj(c,n[d])>=0&&(c.record.path!==n[d].record.path||!ux(c,n[d]));)d++;n.splice(d,0,c),c.record.name&&!c6(c)&&o.set(c.record.name,c)}function u(c,d){let f,p={},h,m;if("name"in c&&c.name){if(f=o.get(c.name),!f)throw qc(1,{location:c});m=f.record.name,p=Qt(u6(d.params,f.keys.filter(w=>!w.optional).concat(f.parent?f.parent.keys.filter(w=>w.optional):[]).map(w=>w.name)),c.params&&u6(c.params,f.keys.map(w=>w.name))),h=f.stringify(p)}else if(c.path!=null)h=c.path,f=n.find(w=>w.re.test(h)),f&&(p=f.parse(h),m=f.record.name);else{if(f=d.name?o.get(d.name):n.find(w=>w.re.test(d.path)),!f)throw qc(1,{location:c,currentLocation:d});m=f.record.name,p=Qt({},d.params,c.params),h=f.stringify(p)}const y=[];let v=f;for(;v;)y.unshift(v.record),v=v.parent;return{name:m,path:h,params:p,matched:y,meta:mj(y)}}return e.forEach(c=>s(c)),{addRoute:s,resolve:u,removeRoute:i,getRoutes:l,getRecordMatcher:r}}function u6(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:hj(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 hj(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 c6(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function mj(e){return e.reduce((t,n)=>Qt(t,n.meta),{})}function d6(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function ux(e,t){return t.children.some(n=>n===e||ux(e,n))}function gj(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(ex," "),i=s.indexOf("="),l=$p(i<0?s:s.slice(0,i)),a=i<0?null:$p(s.slice(i+1));if(l in t){let u=t[l];ms(u)||(u=t[l]=[u]),u.push(a)}else t[l]=a}return t}function f6(e){let t="";for(let n in e){const o=e[n];if(n=Rz(n),o==null){o!==void 0&&(t+=(t.length?"&":"")+n);continue}(ms(o)?o.map(s=>s&&R_(s)):[o&&R_(o)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function vj(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=ms(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const yj=Symbol(""),p6=Symbol(""),jw=Symbol(""),cx=Symbol(""),F_=Symbol("");function jd(){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 yl(e,t,n,o,r,s=i=>i()){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((l,a)=>{const u=f=>{f===!1?a(qc(4,{from:n,to:t})):f instanceof Error?a(f):nj(f)?a(qc(2,{from:t,to:f})):(i&&o.enterCallbacks[r]===i&&typeof f=="function"&&i.push(f),l())},c=s(()=>e.call(o&&o.instances[r],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(f=>a(f))})}function Kv(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(_j(a)){const c=(a.__vccOpts||a)[t];c&&s.push(yl(c,n,o,i,l,r))}else{let u=a();s.push(()=>u.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${l}" at "${i.path}"`));const d=$z(c)?c.default:c;i.components[l]=d;const p=(d.__vccOpts||d)[t];return p&&yl(p,n,o,i,l,r)()}))}}return s}function _j(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function h6(e){const t=Be(jw),n=Be(cx),o=R(()=>{const a=g(e.to);return t.resolve(a)}),r=R(()=>{const{matched:a}=o.value,{length:u}=a,c=a[u-1],d=n.matched;if(!c||!d.length)return-1;const f=d.findIndex(Kc.bind(null,c));if(f>-1)return f;const p=m6(a[u-2]);return u>1&&m6(c)===p&&d[d.length-1].path!==p?d.findIndex(Kc.bind(null,a[u-2])):f}),s=R(()=>r.value>-1&&kj(n.params,o.value.params)),i=R(()=>r.value>-1&&r.value===n.matched.length-1&&rx(n.params,o.value.params));function l(a={}){return Cj(a)?t[g(e.replace)?"replace":"push"](g(e.to)).catch(Vf):Promise.resolve()}return{route:o,href:R(()=>o.value.href),isActive:s,isExactActive:i,navigate:l}}const bj=Q({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:h6,setup(e,{slots:t}){const n=Dn(h6(e)),{options:o}=Be(jw),r=R(()=>({[g6(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[g6(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&t.default(n);return e.custom?s:lt("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},s)}}}),wj=bj;function Cj(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 kj(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(!ms(r)||r.length!==o.length||o.some((s,i)=>s!==r[i]))return!1}return!0}function m6(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const g6=(e,t,n)=>e??t??n,Sj=Q({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=Be(F_),r=R(()=>e.route||o.value),s=Be(p6,0),i=R(()=>{let u=g(s);const{matched:c}=r.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),l=R(()=>r.value.matched[i.value]);wt(p6,R(()=>i.value+1)),wt(yj,l),wt(F_,r);const a=K();return Te(()=>[a.value,l.value,e.name],([u,c,d],[f,p,h])=>{c&&(c.instances[d]=u,p&&p!==c&&u&&u===f&&(c.leaveGuards.size||(c.leaveGuards=p.leaveGuards),c.updateGuards.size||(c.updateGuards=p.updateGuards))),u&&c&&(!p||!Kc(c,p)||!f)&&(c.enterCallbacks[d]||[]).forEach(m=>m(u))},{flush:"post"}),()=>{const u=r.value,c=e.name,d=l.value,f=d&&d.components[c];if(!f)return v6(n.default,{Component:f,route:u});const p=d.props[c],h=p?p===!0?u.params:typeof p=="function"?p(u):p:null,y=lt(f,Qt({},h,t,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(d.instances[c]=null)},ref:a}));return v6(n.default,{Component:y,route:u})||y}}});function v6(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const $j=Sj;function y6(e){const t=fj(e.routes,e),n=e.parseQuery||gj,o=e.stringifyQuery||f6,r=e.history,s=jd(),i=jd(),l=jd(),a=Tn(Yi);let u=Yi;Wu&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Uv.bind(null,ee=>""+ee),d=Uv.bind(null,Fz),f=Uv.bind(null,$p);function p(ee,de){let ve,le;return lx(ee)?(ve=t.getRecordMatcher(ee),le=de):le=ee,t.addRoute(le,ve)}function h(ee){const de=t.getRecordMatcher(ee);de&&t.removeRoute(de)}function m(){return t.getRoutes().map(ee=>ee.record)}function y(ee){return!!t.getRecordMatcher(ee)}function v(ee,de){if(de=Qt({},de||a.value),typeof ee=="string"){const J=Wv(n,ee,de.path),ue=t.resolve({path:J.path},de),_e=r.createHref(J.fullPath);return Qt(J,ue,{params:f(ue.params),hash:$p(J.hash),redirectedFrom:void 0,href:_e})}let ve;if(ee.path!=null)ve=Qt({},ee,{path:Wv(n,ee.path,de.path).path});else{const J=Qt({},ee.params);for(const ue in J)J[ue]==null&&delete J[ue];ve=Qt({},ee,{params:d(J)}),de.params=d(de.params)}const le=t.resolve(ve,de),Ie=ee.hash||"";le.params=c(f(le.params));const Ge=zz(o,Qt({},ee,{hash:Lz(Ie),path:le.path})),G=r.createHref(Ge);return Qt({fullPath:Ge,hash:Ie,query:o===f6?vj(ee.query):ee.query||{}},le,{redirectedFrom:void 0,href:G})}function w(ee){return typeof ee=="string"?Wv(n,ee,a.value.path):Qt({},ee)}function _(ee,de){if(u!==ee)return qc(8,{from:de,to:ee})}function S(ee){return T(ee)}function x(ee){return S(Qt(w(ee),{replace:!0}))}function E(ee){const de=ee.matched[ee.matched.length-1];if(de&&de.redirect){const{redirect:ve}=de;let le=typeof ve=="function"?ve(ee):ve;return typeof le=="string"&&(le=le.includes("?")||le.includes("#")?le=w(le):{path:le},le.params={}),Qt({query:ee.query,hash:ee.hash,params:le.path!=null?{}:ee.params},le)}}function T(ee,de){const ve=u=v(ee),le=a.value,Ie=ee.state,Ge=ee.force,G=ee.replace===!0,J=E(ve);if(J)return T(Qt(w(J),{state:typeof J=="object"?Qt({},Ie,J.state):Ie,force:Ge,replace:G}),de||ve);const ue=ve;ue.redirectedFrom=de;let _e;return!Ge&&jz(o,le,ve)&&(_e=qc(16,{to:ue,from:le}),X(le,le,!0,!1)),(_e?Promise.resolve(_e):N(ue,le)).catch(ye=>ui(ye)?ui(ye,2)?ye:I(ye):H(ye,ue,le)).then(ye=>{if(ye){if(ui(ye,2))return T(Qt({replace:G},w(ye.to),{state:typeof ye.to=="object"?Qt({},Ie,ye.to.state):Ie,force:Ge}),de||ue)}else ye=B(ue,le,!0,G,Ie);return F(ue,le,ye),ye})}function O(ee,de){const ve=_(ee,de);return ve?Promise.reject(ve):Promise.resolve()}function P(ee){const de=ge.values().next().value;return de&&typeof de.runWithContext=="function"?de.runWithContext(ee):ee()}function N(ee,de){let ve;const[le,Ie,Ge]=Ej(ee,de);ve=Kv(le.reverse(),"beforeRouteLeave",ee,de);for(const J of le)J.leaveGuards.forEach(ue=>{ve.push(yl(ue,ee,de))});const G=O.bind(null,ee,de);return ve.push(G),xe(ve).then(()=>{ve=[];for(const J of s.list())ve.push(yl(J,ee,de));return ve.push(G),xe(ve)}).then(()=>{ve=Kv(Ie,"beforeRouteUpdate",ee,de);for(const J of Ie)J.updateGuards.forEach(ue=>{ve.push(yl(ue,ee,de))});return ve.push(G),xe(ve)}).then(()=>{ve=[];for(const J of Ge)if(J.beforeEnter)if(ms(J.beforeEnter))for(const ue of J.beforeEnter)ve.push(yl(ue,ee,de));else ve.push(yl(J.beforeEnter,ee,de));return ve.push(G),xe(ve)}).then(()=>(ee.matched.forEach(J=>J.enterCallbacks={}),ve=Kv(Ge,"beforeRouteEnter",ee,de,P),ve.push(G),xe(ve))).then(()=>{ve=[];for(const J of i.list())ve.push(yl(J,ee,de));return ve.push(G),xe(ve)}).catch(J=>ui(J,8)?J:Promise.reject(J))}function F(ee,de,ve){l.list().forEach(le=>P(()=>le(ee,de,ve)))}function B(ee,de,ve,le,Ie){const Ge=_(ee,de);if(Ge)return Ge;const G=de===Yi,J=Wu?history.state:{};ve&&(le||G?r.replace(ee.fullPath,Qt({scroll:G&&J&&J.scroll},Ie)):r.push(ee.fullPath,Ie)),a.value=ee,X(ee,de,ve,G),I()}let Y;function Z(){Y||(Y=r.listen((ee,de,ve)=>{if(!Oe.listening)return;const le=v(ee),Ie=E(le);if(Ie){T(Qt(Ie,{replace:!0}),le).catch(Vf);return}u=le;const Ge=a.value;Wu&&Zz(r6(Ge.fullPath,ve.delta),E0()),N(le,Ge).catch(G=>ui(G,12)?G:ui(G,2)?(T(G.to,le).then(J=>{ui(J,20)&&!ve.delta&&ve.type===Ep.pop&&r.go(-1,!1)}).catch(Vf),Promise.reject()):(ve.delta&&r.go(-ve.delta,!1),H(G,le,Ge))).then(G=>{G=G||B(le,Ge,!1),G&&(ve.delta&&!ui(G,8)?r.go(-ve.delta,!1):ve.type===Ep.pop&&ui(G,20)&&r.go(-1,!1)),F(le,Ge,G)}).catch(Vf)}))}let U=jd(),j=jd(),V;function H(ee,de,ve){I(ee);const le=j.list();return le.length?le.forEach(Ie=>Ie(ee,de,ve)):console.error(ee),Promise.reject(ee)}function L(){return V&&a.value!==Yi?Promise.resolve():new Promise((ee,de)=>{U.add([ee,de])})}function I(ee){return V||(V=!ee,Z(),U.list().forEach(([de,ve])=>ee?ve(ee):de()),U.reset()),ee}function X(ee,de,ve,le){const{scrollBehavior:Ie}=e;if(!Wu||!Ie)return Promise.resolve();const Ge=!ve&&Jz(r6(ee.fullPath,0))||(le||!ve)&&history.state&&history.state.scroll||null;return ot().then(()=>Ie(ee,de,Ge)).then(G=>G&&Yz(G)).catch(G=>H(G,ee,de))}const oe=ee=>r.go(ee);let z;const ge=new Set,Oe={currentRoute:a,listening:!0,addRoute:p,removeRoute:h,hasRoute:y,getRoutes:m,resolve:v,options:e,push:S,replace:x,go:oe,back:()=>oe(-1),forward:()=>oe(1),beforeEach:s.add,beforeResolve:i.add,afterEach:l.add,onError:j.add,isReady:L,install(ee){const de=this;ee.component("RouterLink",wj),ee.component("RouterView",$j),ee.config.globalProperties.$router=de,Object.defineProperty(ee.config.globalProperties,"$route",{enumerable:!0,get:()=>g(a)}),Wu&&!z&&a.value===Yi&&(z=!0,S(r.location).catch(Ie=>{}));const ve={};for(const Ie in Yi)Object.defineProperty(ve,Ie,{get:()=>a.value[Ie],enumerable:!0});ee.provide(jw,de),ee.provide(cx,ow(ve)),ee.provide(F_,a);const le=ee.unmount;ge.add(ee),ee.unmount=function(){ge.delete(ee),ge.size<1&&(u=Yi,Y&&Y(),Y=null,a.value=Yi,z=!1,V=!1),le()}}};function xe(ee){return ee.reduce((de,ve)=>de.then(()=>P(ve)),Promise.resolve())}return Oe}function Ej(e,t){const n=[],o=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const l=t.matched[i];l&&(e.matched.find(u=>Kc(u,l))?o.push(l):n.push(l));const a=e.matched[i];a&&(t.matched.find(u=>Kc(u,a))||r.push(a))}return[n,o,r]}const xj='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',Mj=e=>getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,_6=e=>Array.from(e.querySelectorAll(xj)).filter(t=>Tj(t)&&Mj(t)),Tj=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}},Nn=(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)},b6=e=>t=>t.pointerType==="mouse"?e(t):void 0;var Oj=Object.defineProperty,Ij=Object.defineProperties,Aj=Object.getOwnPropertyDescriptors,w6=Object.getOwnPropertySymbols,Nj=Object.prototype.hasOwnProperty,Pj=Object.prototype.propertyIsEnumerable,C6=(e,t,n)=>t in e?Oj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lj=(e,t)=>{for(var n in t||(t={}))Nj.call(t,n)&&C6(e,n,t[n]);if(w6)for(var n of w6(t))Pj.call(t,n)&&C6(e,n,t[n]);return e},Rj=(e,t)=>Ij(e,Aj(t));function k6(e,t){var n;const o=Tn();return ls(()=>{o.value=e()},Rj(Lj({},t),{flush:(n=t==null?void 0:t.flush)!=null?n:"sync"})),_u(o)}var S6;const xt=typeof window<"u",Dj=e=>typeof e<"u",Fj=e=>typeof e=="function",Vj=e=>typeof e=="string",Gc=()=>{},Bj=xt&&((S6=window==null?void 0:window.navigator)==null?void 0:S6.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Yc(e){return typeof e=="function"?e():g(e)}function dx(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 zj(e,t={}){let n,o,r=Gc;const s=l=>{clearTimeout(l),r(),r=Gc};return l=>{const a=Yc(e),u=Yc(t.maxWait);return n&&s(n),a<=0||u!==void 0&&u<=0?(o&&(s(o),o=null),Promise.resolve(l())):new Promise((c,d)=>{r=t.rejectOnCancel?d:c,u&&!o&&(o=setTimeout(()=>{n&&s(n),o=null,c(l())},u)),n=setTimeout(()=>{o&&s(o),o=null,c(l())},a)})}}function jj(e,t=!0,n=!0,o=!1){let r=0,s,i=!0,l=Gc,a;const u=()=>{s&&(clearTimeout(s),s=void 0,l(),l=Gc)};return d=>{const f=Yc(e),p=Date.now()-r,h=()=>a=d();return u(),f<=0?(r=Date.now(),h()):(p>f&&(n||!i)?(r=Date.now(),h()):t&&(a=new Promise((m,y)=>{l=o?y:m,s=setTimeout(()=>{r=Date.now(),i=!0,m(h()),u()},Math.max(0,f-p))})),!n&&!s&&(s=setTimeout(()=>i=!0,f)),i=!1,a)}}function Hj(e){return e}function oh(e){return X2()?(Q2(e),!0):!1}function Uj(e,t=200,n={}){return dx(zj(t,n),e)}function Wj(e,t=200,n={}){const o=K(e.value),r=Uj(()=>{o.value=e.value},t,n);return Te(e,()=>r()),o}function Kj(e,t=200,n=!1,o=!0,r=!1){return dx(jj(t,n,o,r),e)}function qj(e,t=!0){at()?Ct(e):t?e():ot(e)}function V_(e,t,n={}){const{immediate:o=!0}=n,r=K(!1);let s=null;function i(){s&&(clearTimeout(s),s=null)}function l(){r.value=!1,i()}function a(...u){i(),r.value=!0,s=setTimeout(()=>{r.value=!1,s=null,e(...u)},Yc(t))}return o&&(r.value=!0,xt&&a()),oh(l),{isPending:_u(r),start:a,stop:l}}function ki(e){var t;const n=Yc(e);return(t=n==null?void 0:n.$el)!=null?t:n}const rh=xt?window:void 0,Gj=xt?window.document:void 0;function Ln(...e){let t,n,o,r;if(Vj(e[0])||Array.isArray(e[0])?([n,o,r]=e,t=rh):[t,n,o,r]=e,!t)return Gc;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],i=()=>{s.forEach(c=>c()),s.length=0},l=(c,d,f,p)=>(c.addEventListener(d,f,p),()=>c.removeEventListener(d,f,p)),a=Te(()=>[ki(t),Yc(r)],([c,d])=>{i(),c&&s.push(...n.flatMap(f=>o.map(p=>l(c,f,p,d))))},{immediate:!0,flush:"post"}),u=()=>{a(),i()};return oh(u),u}let $6=!1;function fx(e,t,n={}){const{window:o=rh,ignore:r=[],capture:s=!0,detectIframe:i=!1}=n;if(!o)return;Bj&&!$6&&($6=!0,Array.from(o.document.body.children).forEach(f=>f.addEventListener("click",Gc)));let l=!0;const a=f=>r.some(p=>{if(typeof p=="string")return Array.from(o.document.querySelectorAll(p)).some(h=>h===f.target||f.composedPath().includes(h));{const h=ki(p);return h&&(f.target===h||f.composedPath().includes(h))}}),c=[Ln(o,"click",f=>{const p=ki(e);if(!(!p||p===f.target||f.composedPath().includes(p))){if(f.detail===0&&(l=!a(f)),!l){l=!0;return}t(f)}},{passive:!0,capture:s}),Ln(o,"pointerdown",f=>{const p=ki(e);p&&(l=!f.composedPath().includes(p)&&!a(f))},{passive:!0}),i&&Ln(o,"blur",f=>{var p;const h=ki(e);((p=o.document.activeElement)==null?void 0:p.tagName)==="IFRAME"&&!(h!=null&&h.contains(o.document.activeElement))&&t(f)})].filter(Boolean);return()=>c.forEach(f=>f())}function px(e,t=!1){const n=K(),o=()=>n.value=!!e();return o(),qj(o,t),n}function Yj(e){return JSON.parse(JSON.stringify(e))}const E6=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},x6="__vueuse_ssr_handlers__";E6[x6]=E6[x6]||{};function Zj({document:e=Gj}={}){if(!e)return K("visible");const t=K(e.visibilityState);return Ln(e,"visibilitychange",()=>{t.value=e.visibilityState}),t}var M6=Object.getOwnPropertySymbols,Jj=Object.prototype.hasOwnProperty,Xj=Object.prototype.propertyIsEnumerable,Qj=(e,t)=>{var n={};for(var o in e)Jj.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&M6)for(var o of M6(e))t.indexOf(o)<0&&Xj.call(e,o)&&(n[o]=e[o]);return n};function Bo(e,t,n={}){const o=n,{window:r=rh}=o,s=Qj(o,["window"]);let i;const l=px(()=>r&&"ResizeObserver"in r),a=()=>{i&&(i.disconnect(),i=void 0)},u=Te(()=>ki(e),d=>{a(),l.value&&r&&d&&(i=new ResizeObserver(t),i.observe(d,s))},{immediate:!0,flush:"post"}),c=()=>{a(),u()};return oh(c),{isSupported:l,stop:c}}var T6=Object.getOwnPropertySymbols,eH=Object.prototype.hasOwnProperty,tH=Object.prototype.propertyIsEnumerable,nH=(e,t)=>{var n={};for(var o in e)eH.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&T6)for(var o of T6(e))t.indexOf(o)<0&&tH.call(e,o)&&(n[o]=e[o]);return n};function oH(e,t,n={}){const o=n,{window:r=rh}=o,s=nH(o,["window"]);let i;const l=px(()=>r&&"MutationObserver"in r),a=()=>{i&&(i.disconnect(),i=void 0)},u=Te(()=>ki(e),d=>{a(),l.value&&r&&d&&(i=new MutationObserver(t),i.observe(d,s))},{immediate:!0}),c=()=>{a(),u()};return oh(c),{isSupported:l,stop:c}}var O6;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(O6||(O6={}));var rH=Object.defineProperty,I6=Object.getOwnPropertySymbols,sH=Object.prototype.hasOwnProperty,iH=Object.prototype.propertyIsEnumerable,A6=(e,t,n)=>t in e?rH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lH=(e,t)=>{for(var n in t||(t={}))sH.call(t,n)&&A6(e,n,t[n]);if(I6)for(var n of I6(t))iH.call(t,n)&&A6(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]};lH({linear:Hj},aH);function uH(e,t,n,o={}){var r,s,i;const{clone:l=!1,passive:a=!1,eventName:u,deep:c=!1,defaultValue:d}=o,f=at(),p=n||(f==null?void 0:f.emit)||((r=f==null?void 0:f.$emit)==null?void 0:r.bind(f))||((i=(s=f==null?void 0:f.proxy)==null?void 0:s.$emit)==null?void 0:i.bind(f==null?void 0:f.proxy));let h=u;t||(t="modelValue"),h=u||h||`update:${t.toString()}`;const m=v=>l?Fj(l)?l(v):Yj(v):v,y=()=>Dj(e[t])?m(e[t]):d;if(a){const v=y(),w=K(v);return Te(()=>e[t],_=>w.value=m(_)),Te(w,_=>{(_!==e[t]||c)&&p(h,_)},{deep:c}),w}else return R({get(){return y()},set(v){p(h,v)}})}function cH({window:e=rh}={}){if(!e)return K(!1);const t=K(e.document.hasFocus());return Ln(e,"blur",()=>{t.value=!1}),Ln(e,"focus",()=>{t.value=!0}),t}const dH=()=>xt&&/firefox/i.test(window.navigator.userAgent),fH=(e,t)=>{if(!xt||!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},Hw=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 pH=typeof global=="object"&&global&&global.Object===Object&&global;const hx=pH;var hH=typeof self=="object"&&self&&self.Object===Object&&self,mH=hx||hH||Function("return this")();const bs=mH;var gH=bs.Symbol;const Vr=gH;var mx=Object.prototype,vH=mx.hasOwnProperty,yH=mx.toString,Hd=Vr?Vr.toStringTag:void 0;function _H(e){var t=vH.call(e,Hd),n=e[Hd];try{e[Hd]=void 0;var o=!0}catch{}var r=yH.call(e);return o&&(t?e[Hd]=n:delete e[Hd]),r}var bH=Object.prototype,wH=bH.toString;function CH(e){return wH.call(e)}var kH="[object Null]",SH="[object Undefined]",N6=Vr?Vr.toStringTag:void 0;function wu(e){return e==null?e===void 0?SH:kH:N6&&N6 in Object(e)?_H(e):CH(e)}function Ks(e){return e!=null&&typeof e=="object"}var $H="[object Symbol]";function x0(e){return typeof e=="symbol"||Ks(e)&&wu(e)==$H}function gx(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 EH=Array.isArray;const Mo=EH;var xH=1/0,P6=Vr?Vr.prototype:void 0,L6=P6?P6.toString:void 0;function vx(e){if(typeof e=="string")return e;if(Mo(e))return gx(e,vx)+"";if(x0(e))return L6?L6.call(e):"";var t=e+"";return t=="0"&&1/e==-xH?"-0":t}var MH=/\s/;function TH(e){for(var t=e.length;t--&&MH.test(e.charAt(t)););return t}var OH=/^\s+/;function IH(e){return e&&e.slice(0,TH(e)+1).replace(OH,"")}function To(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var R6=0/0,AH=/^[-+]0x[0-9a-f]+$/i,NH=/^0b[01]+$/i,PH=/^0o[0-7]+$/i,LH=parseInt;function B_(e){if(typeof e=="number")return e;if(x0(e))return R6;if(To(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=To(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=IH(e);var n=NH.test(e);return n||PH.test(e)?LH(e.slice(2),n?2:8):AH.test(e)?R6:+e}var D6=1/0,RH=17976931348623157e292;function DH(e){if(!e)return e===0?e:0;if(e=B_(e),e===D6||e===-D6){var t=e<0?-1:1;return t*RH}return e===e?e:0}function FH(e){var t=DH(e),n=t%1;return t===t?n?t-n:t:0}function Uw(e){return e}var VH="[object AsyncFunction]",BH="[object Function]",zH="[object GeneratorFunction]",jH="[object Proxy]";function Ww(e){if(!To(e))return!1;var t=wu(e);return t==BH||t==zH||t==VH||t==jH}var HH=bs["__core-js_shared__"];const qv=HH;var F6=function(){var e=/[^.]+$/.exec(qv&&qv.keys&&qv.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function UH(e){return!!F6&&F6 in e}var WH=Function.prototype,KH=WH.toString;function Cu(e){if(e!=null){try{return KH.call(e)}catch{}try{return e+""}catch{}}return""}var qH=/[\\^$.*+?()[\]{}|]/g,GH=/^\[object .+?Constructor\]$/,YH=Function.prototype,ZH=Object.prototype,JH=YH.toString,XH=ZH.hasOwnProperty,QH=RegExp("^"+JH.call(XH).replace(qH,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function eU(e){if(!To(e)||UH(e))return!1;var t=Ww(e)?QH:GH;return t.test(Cu(e))}function tU(e,t){return e==null?void 0:e[t]}function ku(e,t){var n=tU(e,t);return eU(n)?n:void 0}var nU=ku(bs,"WeakMap");const z_=nU;var V6=Object.create,oU=function(){function e(){}return function(t){if(!To(t))return{};if(V6)return V6(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const rU=oU;function sU(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 yx(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var iU=800,lU=16,aU=Date.now;function uU(e){var t=0,n=0;return function(){var o=aU(),r=lU-(o-n);if(n=o,r>0){if(++t>=iU)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function cU(e){return function(){return e}}var dU=function(){try{var e=ku(Object,"defineProperty");return e({},"",{}),e}catch{}}();const $g=dU;var fU=$g?function(e,t){return $g(e,"toString",{configurable:!0,enumerable:!1,value:cU(t),writable:!0})}:Uw;const pU=fU;var hU=uU(pU);const _x=hU;function mU(e,t){for(var n=-1,o=e==null?0:e.length;++n<o&&t(e[n],n,e)!==!1;);return e}function gU(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 vU=9007199254740991,yU=/^(?:0|[1-9]\d*)$/;function M0(e,t){var n=typeof e;return t=t??vU,!!t&&(n=="number"||n!="symbol"&&yU.test(e))&&e>-1&&e%1==0&&e<t}function Kw(e,t,n){t=="__proto__"&&$g?$g(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function sh(e,t){return e===t||e!==e&&t!==t}var _U=Object.prototype,bU=_U.hasOwnProperty;function qw(e,t,n){var o=e[t];(!(bU.call(e,t)&&sh(o,n))||n===void 0&&!(t in e))&&Kw(e,t,n)}function ih(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?Kw(n,l,a):qw(n,l,a)}return n}var B6=Math.max;function bx(e,t,n){return t=B6(t===void 0?e.length-1:t,0),function(){for(var o=arguments,r=-1,s=B6(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),sU(e,this,l)}}function wU(e,t){return _x(bx(e,t,Uw),e+"")}var CU=9007199254740991;function Gw(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=CU}function bd(e){return e!=null&&Gw(e.length)&&!Ww(e)}function kU(e,t,n){if(!To(n))return!1;var o=typeof t;return(o=="number"?bd(n)&&M0(t,n.length):o=="string"&&t in n)?sh(n[t],e):!1}function SU(e){return wU(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&&kU(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 $U=Object.prototype;function Yw(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||$U;return e===n}function EU(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var xU="[object Arguments]";function z6(e){return Ks(e)&&wu(e)==xU}var wx=Object.prototype,MU=wx.hasOwnProperty,TU=wx.propertyIsEnumerable,OU=z6(function(){return arguments}())?z6:function(e){return Ks(e)&&MU.call(e,"callee")&&!TU.call(e,"callee")};const xp=OU;function IU(){return!1}var Cx=typeof fr=="object"&&fr&&!fr.nodeType&&fr,j6=Cx&&typeof pr=="object"&&pr&&!pr.nodeType&&pr,AU=j6&&j6.exports===Cx,H6=AU?bs.Buffer:void 0,NU=H6?H6.isBuffer:void 0,PU=NU||IU;const Mp=PU;var LU="[object Arguments]",RU="[object Array]",DU="[object Boolean]",FU="[object Date]",VU="[object Error]",BU="[object Function]",zU="[object Map]",jU="[object Number]",HU="[object Object]",UU="[object RegExp]",WU="[object Set]",KU="[object String]",qU="[object WeakMap]",GU="[object ArrayBuffer]",YU="[object DataView]",ZU="[object Float32Array]",JU="[object Float64Array]",XU="[object Int8Array]",QU="[object Int16Array]",eW="[object Int32Array]",tW="[object Uint8Array]",nW="[object Uint8ClampedArray]",oW="[object Uint16Array]",rW="[object Uint32Array]",cn={};cn[ZU]=cn[JU]=cn[XU]=cn[QU]=cn[eW]=cn[tW]=cn[nW]=cn[oW]=cn[rW]=!0;cn[LU]=cn[RU]=cn[GU]=cn[DU]=cn[YU]=cn[FU]=cn[VU]=cn[BU]=cn[zU]=cn[jU]=cn[HU]=cn[UU]=cn[WU]=cn[KU]=cn[qU]=!1;function sW(e){return Ks(e)&&Gw(e.length)&&!!cn[wu(e)]}function Zw(e){return function(t){return e(t)}}var kx=typeof fr=="object"&&fr&&!fr.nodeType&&fr,zf=kx&&typeof pr=="object"&&pr&&!pr.nodeType&&pr,iW=zf&&zf.exports===kx,Gv=iW&&hx.process,lW=function(){try{var e=zf&&zf.require&&zf.require("util").types;return e||Gv&&Gv.binding&&Gv.binding("util")}catch{}}();const Zc=lW;var U6=Zc&&Zc.isTypedArray,aW=U6?Zw(U6):sW;const Jw=aW;var uW=Object.prototype,cW=uW.hasOwnProperty;function Sx(e,t){var n=Mo(e),o=!n&&xp(e),r=!n&&!o&&Mp(e),s=!n&&!o&&!r&&Jw(e),i=n||o||r||s,l=i?EU(e.length,String):[],a=l.length;for(var u in e)(t||cW.call(e,u))&&!(i&&(u=="length"||r&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||M0(u,a)))&&l.push(u);return l}function $x(e,t){return function(n){return e(t(n))}}var dW=$x(Object.keys,Object);const fW=dW;var pW=Object.prototype,hW=pW.hasOwnProperty;function mW(e){if(!Yw(e))return fW(e);var t=[];for(var n in Object(e))hW.call(e,n)&&n!="constructor"&&t.push(n);return t}function lh(e){return bd(e)?Sx(e):mW(e)}function gW(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var vW=Object.prototype,yW=vW.hasOwnProperty;function _W(e){if(!To(e))return gW(e);var t=Yw(e),n=[];for(var o in e)o=="constructor"&&(t||!yW.call(e,o))||n.push(o);return n}function ah(e){return bd(e)?Sx(e,!0):_W(e)}var bW=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wW=/^\w*$/;function Xw(e,t){if(Mo(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||x0(e)?!0:wW.test(e)||!bW.test(e)||t!=null&&e in Object(t)}var CW=ku(Object,"create");const Tp=CW;function kW(){this.__data__=Tp?Tp(null):{},this.size=0}function SW(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var $W="__lodash_hash_undefined__",EW=Object.prototype,xW=EW.hasOwnProperty;function MW(e){var t=this.__data__;if(Tp){var n=t[e];return n===$W?void 0:n}return xW.call(t,e)?t[e]:void 0}var TW=Object.prototype,OW=TW.hasOwnProperty;function IW(e){var t=this.__data__;return Tp?t[e]!==void 0:OW.call(t,e)}var AW="__lodash_hash_undefined__";function NW(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Tp&&t===void 0?AW:t,this}function iu(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])}}iu.prototype.clear=kW;iu.prototype.delete=SW;iu.prototype.get=MW;iu.prototype.has=IW;iu.prototype.set=NW;function PW(){this.__data__=[],this.size=0}function T0(e,t){for(var n=e.length;n--;)if(sh(e[n][0],t))return n;return-1}var LW=Array.prototype,RW=LW.splice;function DW(e){var t=this.__data__,n=T0(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():RW.call(t,n,1),--this.size,!0}function FW(e){var t=this.__data__,n=T0(t,e);return n<0?void 0:t[n][1]}function VW(e){return T0(this.__data__,e)>-1}function BW(e,t){var n=this.__data__,o=T0(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}function Vi(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])}}Vi.prototype.clear=PW;Vi.prototype.delete=DW;Vi.prototype.get=FW;Vi.prototype.has=VW;Vi.prototype.set=BW;var zW=ku(bs,"Map");const Op=zW;function jW(){this.size=0,this.__data__={hash:new iu,map:new(Op||Vi),string:new iu}}function HW(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function O0(e,t){var n=e.__data__;return HW(t)?n[typeof t=="string"?"string":"hash"]:n.map}function UW(e){var t=O0(this,e).delete(e);return this.size-=t?1:0,t}function WW(e){return O0(this,e).get(e)}function KW(e){return O0(this,e).has(e)}function qW(e,t){var n=O0(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}function Bi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Bi.prototype.clear=jW;Bi.prototype.delete=UW;Bi.prototype.get=WW;Bi.prototype.has=KW;Bi.prototype.set=qW;var GW="Expected a function";function Qw(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(GW);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(Qw.Cache||Bi),n}Qw.Cache=Bi;var YW=500;function ZW(e){var t=Qw(e,function(o){return n.size===YW&&n.clear(),o}),n=t.cache;return t}var JW=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,XW=/\\(\\)?/g,QW=ZW(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(JW,function(n,o,r,s){t.push(r?s.replace(XW,"$1"):o||n)}),t});const eK=QW;function tK(e){return e==null?"":vx(e)}function I0(e,t){return Mo(e)?e:Xw(e,t)?[e]:eK(tK(e))}var nK=1/0;function uh(e){if(typeof e=="string"||x0(e))return e;var t=e+"";return t=="0"&&1/e==-nK?"-0":t}function e3(e,t){t=I0(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[uh(t[n++])];return n&&n==o?e:void 0}function Tr(e,t,n){var o=e==null?void 0:e3(e,t);return o===void 0?n:o}function t3(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e}var W6=Vr?Vr.isConcatSpreadable:void 0;function oK(e){return Mo(e)||xp(e)||!!(W6&&e&&e[W6])}function n3(e,t,n,o,r){var s=-1,i=e.length;for(n||(n=oK),r||(r=[]);++s<i;){var l=e[s];t>0&&n(l)?t>1?n3(l,t-1,n,o,r):t3(r,l):o||(r[r.length]=l)}return r}function Ex(e){var t=e==null?0:e.length;return t?n3(e,1):[]}function rK(e){return _x(bx(e,void 0,Ex),e+"")}var sK=$x(Object.getPrototypeOf,Object);const o3=sK;var iK="[object Object]",lK=Function.prototype,aK=Object.prototype,xx=lK.toString,uK=aK.hasOwnProperty,cK=xx.call(Object);function dK(e){if(!Ks(e)||wu(e)!=iK)return!1;var t=o3(e);if(t===null)return!0;var n=uK.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&xx.call(n)==cK}function Eg(){if(!arguments.length)return[];var e=arguments[0];return Mo(e)?e:[e]}function fK(){this.__data__=new Vi,this.size=0}function pK(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function hK(e){return this.__data__.get(e)}function mK(e){return this.__data__.has(e)}var gK=200;function vK(e,t){var n=this.__data__;if(n instanceof Vi){var o=n.__data__;if(!Op||o.length<gK-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new Bi(o)}return n.set(e,t),this.size=n.size,this}function us(e){var t=this.__data__=new Vi(e);this.size=t.size}us.prototype.clear=fK;us.prototype.delete=pK;us.prototype.get=hK;us.prototype.has=mK;us.prototype.set=vK;function yK(e,t){return e&&ih(t,lh(t),e)}function _K(e,t){return e&&ih(t,ah(t),e)}var Mx=typeof fr=="object"&&fr&&!fr.nodeType&&fr,K6=Mx&&typeof pr=="object"&&pr&&!pr.nodeType&&pr,bK=K6&&K6.exports===Mx,q6=bK?bs.Buffer:void 0,G6=q6?q6.allocUnsafe:void 0;function Tx(e,t){if(t)return e.slice();var n=e.length,o=G6?G6(n):new e.constructor(n);return e.copy(o),o}function wK(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 Ox(){return[]}var CK=Object.prototype,kK=CK.propertyIsEnumerable,Y6=Object.getOwnPropertySymbols,SK=Y6?function(e){return e==null?[]:(e=Object(e),wK(Y6(e),function(t){return kK.call(e,t)}))}:Ox;const r3=SK;function $K(e,t){return ih(e,r3(e),t)}var EK=Object.getOwnPropertySymbols,xK=EK?function(e){for(var t=[];e;)t3(t,r3(e)),e=o3(e);return t}:Ox;const Ix=xK;function MK(e,t){return ih(e,Ix(e),t)}function Ax(e,t,n){var o=t(e);return Mo(e)?o:t3(o,n(e))}function j_(e){return Ax(e,lh,r3)}function TK(e){return Ax(e,ah,Ix)}var OK=ku(bs,"DataView");const H_=OK;var IK=ku(bs,"Promise");const U_=IK;var AK=ku(bs,"Set");const W_=AK;var Z6="[object Map]",NK="[object Object]",J6="[object Promise]",X6="[object Set]",Q6="[object WeakMap]",e5="[object DataView]",PK=Cu(H_),LK=Cu(Op),RK=Cu(U_),DK=Cu(W_),FK=Cu(z_),va=wu;(H_&&va(new H_(new ArrayBuffer(1)))!=e5||Op&&va(new Op)!=Z6||U_&&va(U_.resolve())!=J6||W_&&va(new W_)!=X6||z_&&va(new z_)!=Q6)&&(va=function(e){var t=wu(e),n=t==NK?e.constructor:void 0,o=n?Cu(n):"";if(o)switch(o){case PK:return e5;case LK:return Z6;case RK:return J6;case DK:return X6;case FK:return Q6}return t});const Ip=va;var VK=Object.prototype,BK=VK.hasOwnProperty;function zK(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&BK.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var jK=bs.Uint8Array;const xg=jK;function s3(e){var t=new e.constructor(e.byteLength);return new xg(t).set(new xg(e)),t}function HK(e,t){var n=t?s3(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var UK=/\w*$/;function WK(e){var t=new e.constructor(e.source,UK.exec(e));return t.lastIndex=e.lastIndex,t}var t5=Vr?Vr.prototype:void 0,n5=t5?t5.valueOf:void 0;function KK(e){return n5?Object(n5.call(e)):{}}function Nx(e,t){var n=t?s3(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var qK="[object Boolean]",GK="[object Date]",YK="[object Map]",ZK="[object Number]",JK="[object RegExp]",XK="[object Set]",QK="[object String]",eq="[object Symbol]",tq="[object ArrayBuffer]",nq="[object DataView]",oq="[object Float32Array]",rq="[object Float64Array]",sq="[object Int8Array]",iq="[object Int16Array]",lq="[object Int32Array]",aq="[object Uint8Array]",uq="[object Uint8ClampedArray]",cq="[object Uint16Array]",dq="[object Uint32Array]";function fq(e,t,n){var o=e.constructor;switch(t){case tq:return s3(e);case qK:case GK:return new o(+e);case nq:return HK(e,n);case oq:case rq:case sq:case iq:case lq:case aq:case uq:case cq:case dq:return Nx(e,n);case YK:return new o;case ZK:case QK:return new o(e);case JK:return WK(e);case XK:return new o;case eq:return KK(e)}}function Px(e){return typeof e.constructor=="function"&&!Yw(e)?rU(o3(e)):{}}var pq="[object Map]";function hq(e){return Ks(e)&&Ip(e)==pq}var o5=Zc&&Zc.isMap,mq=o5?Zw(o5):hq;const gq=mq;var vq="[object Set]";function yq(e){return Ks(e)&&Ip(e)==vq}var r5=Zc&&Zc.isSet,_q=r5?Zw(r5):yq;const bq=_q;var wq=1,Cq=2,kq=4,Lx="[object Arguments]",Sq="[object Array]",$q="[object Boolean]",Eq="[object Date]",xq="[object Error]",Rx="[object Function]",Mq="[object GeneratorFunction]",Tq="[object Map]",Oq="[object Number]",Dx="[object Object]",Iq="[object RegExp]",Aq="[object Set]",Nq="[object String]",Pq="[object Symbol]",Lq="[object WeakMap]",Rq="[object ArrayBuffer]",Dq="[object DataView]",Fq="[object Float32Array]",Vq="[object Float64Array]",Bq="[object Int8Array]",zq="[object Int16Array]",jq="[object Int32Array]",Hq="[object Uint8Array]",Uq="[object Uint8ClampedArray]",Wq="[object Uint16Array]",Kq="[object Uint32Array]",ln={};ln[Lx]=ln[Sq]=ln[Rq]=ln[Dq]=ln[$q]=ln[Eq]=ln[Fq]=ln[Vq]=ln[Bq]=ln[zq]=ln[jq]=ln[Tq]=ln[Oq]=ln[Dx]=ln[Iq]=ln[Aq]=ln[Nq]=ln[Pq]=ln[Hq]=ln[Uq]=ln[Wq]=ln[Kq]=!0;ln[xq]=ln[Rx]=ln[Lq]=!1;function jf(e,t,n,o,r,s){var i,l=t&wq,a=t&Cq,u=t&kq;if(n&&(i=r?n(e,o,r,s):n(e)),i!==void 0)return i;if(!To(e))return e;var c=Mo(e);if(c){if(i=zK(e),!l)return yx(e,i)}else{var d=Ip(e),f=d==Rx||d==Mq;if(Mp(e))return Tx(e,l);if(d==Dx||d==Lx||f&&!r){if(i=a||f?{}:Px(e),!l)return a?MK(e,_K(i,e)):$K(e,yK(i,e))}else{if(!ln[d])return r?e:{};i=fq(e,d,l)}}s||(s=new us);var p=s.get(e);if(p)return p;s.set(e,i),bq(e)?e.forEach(function(y){i.add(jf(y,t,n,y,e,s))}):gq(e)&&e.forEach(function(y,v){i.set(v,jf(y,t,n,v,e,s))});var h=u?a?TK:j_:a?ah:lh,m=c?void 0:h(e);return mU(m||e,function(y,v){m&&(v=y,y=e[v]),qw(i,v,jf(y,t,n,v,e,s))}),i}var qq=4;function s5(e){return jf(e,qq)}var Gq=1,Yq=4;function i5(e){return jf(e,Gq|Yq)}var Zq="__lodash_hash_undefined__";function Jq(e){return this.__data__.set(e,Zq),this}function Xq(e){return this.__data__.has(e)}function Mg(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Bi;++t<n;)this.add(e[t])}Mg.prototype.add=Mg.prototype.push=Jq;Mg.prototype.has=Xq;function Qq(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 eG(e,t){return e.has(t)}var tG=1,nG=2;function Fx(e,t,n,o,r,s){var i=n&tG,l=e.length,a=t.length;if(l!=a&&!(i&&a>l))return!1;var u=s.get(e),c=s.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,p=n&nG?new Mg:void 0;for(s.set(e,t),s.set(t,e);++d<l;){var h=e[d],m=t[d];if(o)var y=i?o(m,h,d,t,e,s):o(h,m,d,e,t,s);if(y!==void 0){if(y)continue;f=!1;break}if(p){if(!Qq(t,function(v,w){if(!eG(p,w)&&(h===v||r(h,v,n,o,s)))return p.push(w)})){f=!1;break}}else if(!(h===m||r(h,m,n,o,s))){f=!1;break}}return s.delete(e),s.delete(t),f}function oG(e){var t=-1,n=Array(e.size);return e.forEach(function(o,r){n[++t]=[r,o]}),n}function rG(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var sG=1,iG=2,lG="[object Boolean]",aG="[object Date]",uG="[object Error]",cG="[object Map]",dG="[object Number]",fG="[object RegExp]",pG="[object Set]",hG="[object String]",mG="[object Symbol]",gG="[object ArrayBuffer]",vG="[object DataView]",l5=Vr?Vr.prototype:void 0,Yv=l5?l5.valueOf:void 0;function yG(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 gG:return!(e.byteLength!=t.byteLength||!s(new xg(e),new xg(t)));case lG:case aG:case dG:return sh(+e,+t);case uG:return e.name==t.name&&e.message==t.message;case fG:case hG:return e==t+"";case cG:var l=oG;case pG:var a=o&sG;if(l||(l=rG),e.size!=t.size&&!a)return!1;var u=i.get(e);if(u)return u==t;o|=iG,i.set(e,t);var c=Fx(l(e),l(t),o,r,s,i);return i.delete(e),c;case mG:if(Yv)return Yv.call(e)==Yv.call(t)}return!1}var _G=1,bG=Object.prototype,wG=bG.hasOwnProperty;function CG(e,t,n,o,r,s){var i=n&_G,l=j_(e),a=l.length,u=j_(t),c=u.length;if(a!=c&&!i)return!1;for(var d=a;d--;){var f=l[d];if(!(i?f in t:wG.call(t,f)))return!1}var p=s.get(e),h=s.get(t);if(p&&h)return p==t&&h==e;var m=!0;s.set(e,t),s.set(t,e);for(var y=i;++d<a;){f=l[d];var v=e[f],w=t[f];if(o)var _=i?o(w,v,f,t,e,s):o(v,w,f,e,t,s);if(!(_===void 0?v===w||r(v,w,n,o,s):_)){m=!1;break}y||(y=f=="constructor")}if(m&&!y){var S=e.constructor,x=t.constructor;S!=x&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof x=="function"&&x instanceof x)&&(m=!1)}return s.delete(e),s.delete(t),m}var kG=1,a5="[object Arguments]",u5="[object Array]",im="[object Object]",SG=Object.prototype,c5=SG.hasOwnProperty;function $G(e,t,n,o,r,s){var i=Mo(e),l=Mo(t),a=i?u5:Ip(e),u=l?u5:Ip(t);a=a==a5?im:a,u=u==a5?im:u;var c=a==im,d=u==im,f=a==u;if(f&&Mp(e)){if(!Mp(t))return!1;i=!0,c=!1}if(f&&!c)return s||(s=new us),i||Jw(e)?Fx(e,t,n,o,r,s):yG(e,t,a,n,o,r,s);if(!(n&kG)){var p=c&&c5.call(e,"__wrapped__"),h=d&&c5.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,y=h?t.value():t;return s||(s=new us),r(m,y,n,o,s)}}return f?(s||(s=new us),CG(e,t,n,o,r,s)):!1}function A0(e,t,n,o,r){return e===t?!0:e==null||t==null||!Ks(e)&&!Ks(t)?e!==e&&t!==t:$G(e,t,n,o,A0,r)}var EG=1,xG=2;function MG(e,t,n,o){var r=n.length,s=r,i=!o;if(e==null)return!s;for(e=Object(e);r--;){var l=n[r];if(i&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++r<s;){l=n[r];var a=l[0],u=e[a],c=l[1];if(i&&l[2]){if(u===void 0&&!(a in e))return!1}else{var d=new us;if(o)var f=o(u,c,a,e,t,d);if(!(f===void 0?A0(c,u,EG|xG,o,d):f))return!1}}return!0}function Vx(e){return e===e&&!To(e)}function TG(e){for(var t=lh(e),n=t.length;n--;){var o=t[n],r=e[o];t[n]=[o,r,Vx(r)]}return t}function Bx(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function OG(e){var t=TG(e);return t.length==1&&t[0][2]?Bx(t[0][0],t[0][1]):function(n){return n===e||MG(n,e,t)}}function IG(e,t){return e!=null&&t in Object(e)}function AG(e,t,n){t=I0(t,e);for(var o=-1,r=t.length,s=!1;++o<r;){var i=uh(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&&Gw(r)&&M0(i,r)&&(Mo(e)||xp(e)))}function zx(e,t){return e!=null&&AG(e,t,IG)}var NG=1,PG=2;function LG(e,t){return Xw(e)&&Vx(t)?Bx(uh(e),t):function(n){var o=Tr(n,e);return o===void 0&&o===t?zx(n,e):A0(t,o,NG|PG)}}function RG(e){return function(t){return t==null?void 0:t[e]}}function DG(e){return function(t){return e3(t,e)}}function FG(e){return Xw(e)?RG(uh(e)):DG(e)}function jx(e){return typeof e=="function"?e:e==null?Uw:typeof e=="object"?Mo(e)?LG(e[0],e[1]):OG(e):FG(e)}function VG(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 BG=VG();const Hx=BG;function zG(e,t){return e&&Hx(e,t,lh)}function jG(e,t){return function(n,o){if(n==null)return n;if(!bd(n))return e(n,o);for(var r=n.length,s=t?r:-1,i=Object(n);(t?s--:++s<r)&&o(i[s],s,i)!==!1;);return n}}var HG=jG(zG);const UG=HG;var WG=function(){return bs.Date.now()};const Zv=WG;var KG="Expected a function",qG=Math.max,GG=Math.min;function zl(e,t,n){var o,r,s,i,l,a,u=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(KG);t=B_(t)||0,To(n)&&(c=!!n.leading,d="maxWait"in n,s=d?qG(B_(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function p(E){var T=o,O=r;return o=r=void 0,u=E,i=e.apply(O,T),i}function h(E){return u=E,l=setTimeout(v,t),c?p(E):i}function m(E){var T=E-a,O=E-u,P=t-T;return d?GG(P,s-O):P}function y(E){var T=E-a,O=E-u;return a===void 0||T>=t||T<0||d&&O>=s}function v(){var E=Zv();if(y(E))return w(E);l=setTimeout(v,m(E))}function w(E){return l=void 0,f&&o?p(E):(o=r=void 0,i)}function _(){l!==void 0&&clearTimeout(l),u=0,o=a=r=l=void 0}function S(){return l===void 0?i:w(Zv())}function x(){var E=Zv(),T=y(E);if(o=arguments,r=this,a=E,T){if(l===void 0)return h(a);if(d)return clearTimeout(l),l=setTimeout(v,t),p(a)}return l===void 0&&(l=setTimeout(v,t)),i}return x.cancel=_,x.flush=S,x}function K_(e,t,n){(n!==void 0&&!sh(e[t],n)||n===void 0&&!(t in e))&&Kw(e,t,n)}function YG(e){return Ks(e)&&bd(e)}function q_(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function ZG(e){return ih(e,ah(e))}function JG(e,t,n,o,r,s,i){var l=q_(e,n),a=q_(t,n),u=i.get(a);if(u){K_(e,n,u);return}var c=s?s(l,a,n+"",e,t,i):void 0,d=c===void 0;if(d){var f=Mo(a),p=!f&&Mp(a),h=!f&&!p&&Jw(a);c=a,f||p||h?Mo(l)?c=l:YG(l)?c=yx(l):p?(d=!1,c=Tx(a,!0)):h?(d=!1,c=Nx(a,!0)):c=[]:dK(a)||xp(a)?(c=l,xp(l)?c=ZG(l):(!To(l)||Ww(l))&&(c=Px(a))):d=!1}d&&(i.set(a,c),r(c,a,o,s,i),i.delete(a)),K_(e,n,c)}function Ux(e,t,n,o,r){e!==t&&Hx(t,function(s,i){if(r||(r=new us),To(s))JG(e,t,i,n,Ux,o,r);else{var l=o?o(q_(e,i),s,i+"",e,t,r):void 0;l===void 0&&(l=s),K_(e,i,l)}},ah)}var XG=Math.max,QG=Math.min;function eY(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var r=o-1;return n!==void 0&&(r=FH(n),r=n<0?XG(o+r,0):QG(r,o-1)),gU(e,jx(t),r,!0)}function tY(e,t){var n=-1,o=bd(e)?Array(e.length):[];return UG(e,function(r,s,i){o[++n]=t(r,s,i)}),o}function nY(e,t){var n=Mo(e)?gx:tY;return n(e,jx(t))}function oY(e,t){return n3(nY(e,t),1)}function Tg(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 jl(e,t){return A0(e,t)}function xo(e){return e==null}function Wx(e){return e===void 0}var rY=SU(function(e,t,n){Ux(e,t,n)});const sY=rY;function Kx(e,t,n,o){if(!To(e))return e;t=I0(t,e);for(var r=-1,s=t.length,i=s-1,l=e;l!=null&&++r<s;){var a=uh(t[r]),u=n;if(a==="__proto__"||a==="constructor"||a==="prototype")return e;if(r!=i){var c=l[a];u=o?o(c,a,l):void 0,u===void 0&&(u=To(c)?c:M0(t[r+1])?[]:{})}qw(l,a,u),l=l[a]}return e}function iY(e,t,n){for(var o=-1,r=t.length,s={};++o<r;){var i=t[o],l=e3(e,i);n(l,i)&&Kx(s,I0(i,e),l)}return s}function lY(e,t){return iY(e,t,function(n,o){return zx(e,o)})}var aY=rK(function(e,t){return e==null?{}:lY(e,t)});const uY=aY;function cY(e,t,n){return e==null?e:Kx(e,t,n)}var dY="Expected a function";function Jv(e,t,n){var o=!0,r=!0;if(typeof e!="function")throw new TypeError(dY);return To(n)&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),zl(e,t,{leading:o,maxWait:t,trailing:r})}const Uo=e=>e===void 0,Br=e=>typeof e=="boolean",_t=e=>typeof e=="number",qx=e=>!e&&e!==0||Me(e)&&e.length===0||ft(e)&&!Object.keys(e).length,gs=e=>typeof Element>"u"?!1:e instanceof Element,Ap=e=>xo(e),fY=e=>tt(e)?!Number.isNaN(Number(e)):!1,pY=e=>xt?window.requestAnimationFrame(e):setTimeout(e,16),hY=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),Cl=e=>ql(e),G_=e=>Object.keys(e),mY=e=>Object.entries(e),Km=(e,t,n)=>({get value(){return Tr(e,t,n)},set value(o){cY(e,t,o)}});class gY extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function ws(e,t){throw new gY(`[${e}] ${t}`)}const Gx=(e="")=>e.split(" ").filter(t=>!!t.trim()),Ti=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},lu=(e,t)=>{!e||!t.trim()||e.classList.add(...Gx(t))},qs=(e,t)=>{!e||!t.trim()||e.classList.remove(...Gx(t))},kl=(e,t)=>{var n;if(!xt||!e||!t)return"";let o=yn(t);o==="float"&&(o="cssFloat");try{const r=e.style[o];if(r)return r;const s=(n=document.defaultView)==null?void 0:n.getComputedStyle(e,"");return s?s[o]:""}catch{return e.style[o]}};function Zo(e,t="px"){if(!e)return"";if(_t(e)||fY(e))return`${e}${t}`;if(tt(e))return e}const vY=(e,t)=>{if(!xt)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(t)],o=kl(e,n);return["scroll","auto","overlay"].some(r=>o.includes(r))},yY=(e,t)=>{if(!xt)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 lm;const _Y=e=>{var t;if(!xt)return 0;if(lm!==void 0)return lm;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),lm=o-s,lm};function bY(e,t){if(!xt)return;if(!t){e.scrollTop=0;return}const n=[];let o=t.offsetParent;for(;o!==null&&e!==o&&e.contains(o);)n.push(o),o=o.offsetParent;const r=t.offsetTop+n.reduce((a,u)=>a+u.offsetTop,0),s=r+t.offsetHeight,i=e.scrollTop,l=i+e.clientHeight;r<i?e.scrollTop=r:s>l&&(e.scrollTop=s-e.clientHeight)}/*! Element Plus Icons Vue v2.3.1 */var wY=Q({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),Su=wY,CY=Q({name:"ArrowLeft",__name:"arrow-left",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),au=CY,kY=Q({name:"ArrowRight",__name:"arrow-right",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),js=kY,SY=Q({name:"ArrowUp",__name:"arrow-up",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),N0=SY,$Y=Q({name:"Avatar",__name:"avatar",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),EY=$Y,xY=Q({name:"Back",__name:"back",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),b("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"})]))}}),MY=xY,TY=Q({name:"Bell",__name:"bell",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M512 64a64 64 0 0 1 64 64v64H448v-64a64 64 0 0 1 64-64"}),b("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"}),b("path",{fill:"currentColor",d:"M96 768h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32m352 128h128a64 64 0 0 1-128 0"})]))}}),OY=TY,IY=Q({name:"Bottom",__name:"bottom",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),AY=IY,NY=Q({name:"Calendar",__name:"calendar",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),PY=NY,LY=Q({name:"CameraFilled",__name:"camera-filled",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),RY=LY,DY=Q({name:"CaretBottom",__name:"caret-bottom",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"m192 384 320 384 320-384z"})]))}}),FY=DY,VY=Q({name:"ChatDotRound",__name:"chat-dot-round",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"}),b("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"})]))}}),BY=VY,zY=Q({name:"ChatDotSquare",__name:"chat-dot-square",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"}),b("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"})]))}}),jY=zY,HY=Q({name:"Check",__name:"check",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),Yx=HY,UY=Q({name:"CircleCheck",__name:"circle-check",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"}),b("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"})]))}}),i3=UY,WY=Q({name:"CircleCloseFilled",__name:"circle-close-filled",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),Zx=WY,KY=Q({name:"CircleClose",__name:"circle-close",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"}),b("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),wd=KY,qY=Q({name:"Clock",__name:"clock",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"}),b("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),b("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),Jx=qY,GY=Q({name:"CloseBold",__name:"close-bold",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),YY=GY,ZY=Q({name:"Close",__name:"close",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),Gs=ZY,JY=Q({name:"Comment",__name:"comment",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),XY=JY,QY=Q({name:"CopyDocument",__name:"copy-document",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z"}),b("path",{fill:"currentColor",d:"M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64"})]))}}),eZ=QY,tZ=Q({name:"DArrowLeft",__name:"d-arrow-left",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),Jc=tZ,nZ=Q({name:"DArrowRight",__name:"d-arrow-right",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),Xc=nZ,oZ=Q({name:"DeleteFilled",__name:"delete-filled",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),rZ=oZ,sZ=Q({name:"Delete",__name:"delete",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),Xx=sZ,iZ=Q({name:"Document",__name:"document",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),lZ=iZ,aZ=Q({name:"EditPen",__name:"edit-pen",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),uZ=aZ,cZ=Q({name:"Expand",__name:"expand",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M128 192h768v128H128zm0 256h512v128H128zm0 256h768v128H128zm576-352 192 160-192 128z"})]))}}),dZ=cZ,fZ=Q({name:"FullScreen",__name:"full-screen",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),Qx=fZ,pZ=Q({name:"Guide",__name:"guide",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"}),b("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"})]))}}),hZ=pZ,mZ=Q({name:"Hide",__name:"hide",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"}),b("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"})]))}}),eM=mZ,gZ=Q({name:"HomeFilled",__name:"home-filled",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M512 128 128 447.936V896h255.936V640H640v256h255.936V447.936z"})]))}}),vZ=gZ,yZ=Q({name:"InfoFilled",__name:"info-filled",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),l3=yZ,_Z=Q({name:"Iphone",__name:"iphone",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),bZ=_Z,wZ=Q({name:"Loading",__name:"loading",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),a3=wZ,CZ=Q({name:"Lock",__name:"lock",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"}),b("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"})]))}}),kZ=CZ,SZ=Q({name:"Memo",__name:"memo",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[b("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"}),b("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"}),b("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"})]))}}),$Z=SZ,EZ=Q({name:"Message",__name:"message",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"}),b("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"})]))}}),xZ=EZ,MZ=Q({name:"Minus",__name:"minus",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),TZ=MZ,OZ=Q({name:"MoreFilled",__name:"more-filled",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),Y_=OZ,IZ=Q({name:"More",__name:"more",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),AZ=IZ,NZ=Q({name:"Notebook",__name:"notebook",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"}),b("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"})]))}}),PZ=NZ,LZ=Q({name:"Operation",__name:"operation",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),RZ=LZ,DZ=Q({name:"PictureFilled",__name:"picture-filled",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),FZ=DZ,VZ=Q({name:"Picture",__name:"picture",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"}),b("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"})]))}}),BZ=VZ,zZ=Q({name:"Plus",__name:"plus",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),u3=zZ,jZ=Q({name:"Postcard",__name:"postcard",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"}),b("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=jZ,UZ=Q({name:"Reading",__name:"reading",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"}),b("path",{fill:"currentColor",d:"M480 192h64v704h-64z"})]))}}),WZ=UZ,KZ=Q({name:"RefreshLeft",__name:"refresh-left",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),tM=KZ,qZ=Q({name:"RefreshRight",__name:"refresh-right",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),GZ=qZ,YZ=Q({name:"ScaleToOriginal",__name:"scale-to-original",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),ZZ=YZ,JZ=Q({name:"Search",__name:"search",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),XZ=JZ,QZ=Q({name:"SuccessFilled",__name:"success-filled",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),c3=QZ,eJ=Q({name:"Tickets",__name:"tickets",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),tJ=eJ,nJ=Q({name:"Timer",__name:"timer",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"}),b("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"}),b("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"})]))}}),oJ=nJ,rJ=Q({name:"Top",__name:"top",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),sJ=rJ,iJ=Q({name:"UploadFilled",__name:"upload-filled",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),lJ=iJ,aJ=Q({name:"View",__name:"view",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),nM=aJ,uJ=Q({name:"WarningFilled",__name:"warning-filled",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),d3=uJ,cJ=Q({name:"ZoomIn",__name:"zoom-in",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),oM=cJ,dJ=Q({name:"ZoomOut",__name:"zoom-out",setup(e){return(t,n)=>(C(),M("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("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"})]))}}),fJ=dJ;const rM="__epPropKey",Ce=e=>e,pJ=e=>ft(e)&&!!e[rM],P0=(e,t)=>{if(!ft(e)||pJ(e))return e;const{values:n,required:o,default:r,type:s,validator:i}=e,a={type:s,required:!!o,validator:n||i?u=>{let c=!1,d=[];if(n&&(d=Array.from(n),vt(e,"default")&&d.push(r),c||(c=d.includes(u))),i&&(c||(c=i(u))),!c&&d.length>0){const f=[...new Set(d)].map(p=>JSON.stringify(p)).join(", ");KE(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${f}], got value ${JSON.stringify(u)}.`)}return c}:void 0,[rM]:!0};return vt(e,"default")&&(a.default=r),a},We=e=>Tg(Object.entries(e).map(([t,n])=>[t,P0(n,t)])),Oo=Ce([String,Object,Function]),sM={Close:Gs},hJ={Close:Gs,SuccessFilled:c3,InfoFilled:l3,WarningFilled:d3,CircleCloseFilled:Zx},Og={success:c3,warning:d3,error:Zx,info:l3},iM={validating:a3,success:i3,error:wd},Zt=(e,t)=>{if(e.install=n=>{for(const o of[e,...Object.values(t??{})])n.component(o.name,o)},t)for(const[n,o]of Object.entries(t))e[n]=o;return e},mJ=(e,t)=>(e.install=n=>{e._context=n._context,n.config.globalProperties[t]=e},e),gJ=(e,t)=>(e.install=n=>{n.directive(t,e)},e),Gn=e=>(e.install=yt,e),f3=(...e)=>t=>{e.forEach(n=>{Xe(n)?n(t):n.value=t})},rt={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},vJ=["year","years","month","date","dates","week","datetime","datetimerange","daterange","monthrange"],Jt="update:modelValue",Cd="change",qm="input",Zl=["","default","small","large"],yJ=e=>["",...Zl].includes(e);var Gm=(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))(Gm||{});const Ym=e=>{const t=Me(e)?e:[e],n=[];return t.forEach(o=>{var r;Me(o)?n.push(...Ym(o)):yo(o)&&Me(o.children)?n.push(...Ym(o.children)):(n.push(o),yo(o)&&((r=o.component)!=null&&r.subTree)&&n.push(...Ym(o.component.subTree)))}),n},ns=e=>!e&&e!==0?[]:Array.isArray(e)?e:[e],lM=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e),$o=e=>e,_J=["class","style"],bJ=/^on[A-Z]/,aM=(e={})=>{const{excludeListeners:t=!1,excludeKeys:n}=e,o=R(()=>((n==null?void 0:n.value)||[]).concat(_J)),r=at();return R(r?()=>{var s;return Tg(Object.entries((s=r.proxy)==null?void 0:s.$attrs).filter(([i])=>!o.value.includes(i)&&!(t&&bJ.test(i))))}:()=>({}))},Ua=({from:e,replacement:t,scope:n,version:o,ref:r,type:s="API"},i)=>{Te(()=>g(i),l=>{},{immediate:!0})},uM=(e,t,n,o)=>{let r={offsetX:0,offsetY:0};const s=a=>{const u=a.clientX,c=a.clientY,{offsetX:d,offsetY:f}=r,p=e.value.getBoundingClientRect(),h=p.left,m=p.top,y=p.width,v=p.height,w=document.documentElement.clientWidth,_=document.documentElement.clientHeight,S=-h+d,x=-m+f,E=w-h-y+d,T=_-m-v+f,O=N=>{let F=d+N.clientX-u,B=f+N.clientY-c;o!=null&&o.value||(F=Math.min(Math.max(F,S),E),B=Math.min(Math.max(B,x),T)),r={offsetX:F,offsetY:B},e.value&&(e.value.style.transform=`translate(${Zo(F)}, ${Zo(B)})`)},P=()=>{document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",P)};document.addEventListener("mousemove",O),document.addEventListener("mouseup",P)},i=()=>{t.value&&e.value&&t.value.addEventListener("mousedown",s)},l=()=>{t.value&&e.value&&t.value.removeEventListener("mousedown",s)};Ct(()=>{ls(()=>{n.value?i():l()})}),En(()=>{l()})};var wJ={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 CJ=e=>(t,n)=>kJ(t,n,g(e)),kJ=(e,t,n)=>Tr(n,e,e).replace(/\{(\w+)\}/g,(o,r)=>{var s;return`${(s=t==null?void 0:t[r])!=null?s:`{${r}}`}`}),SJ=e=>{const t=R(()=>g(e).name),n=on(e)?e:K(e);return{lang:t,locale:n,t:CJ(e)}},cM=Symbol("localeContextKey"),Kt=e=>{const t=e||Be(cM,K());return SJ(R(()=>t.value||wJ))},Hf="el",$J="is-",ca=(e,t,n,o,r)=>{let s=`${e}-${t}`;return n&&(s+=`-${n}`),o&&(s+=`__${o}`),r&&(s+=`--${r}`),s},dM=Symbol("namespaceContextKey"),p3=e=>{const t=e||(at()?Be(dM,K(Hf)):K(Hf));return R(()=>g(t)||Hf)},Re=(e,t)=>{const n=p3(t);return{namespace:n,b:(m="")=>ca(n.value,e,m,"",""),e:m=>m?ca(n.value,e,"",m,""):"",m:m=>m?ca(n.value,e,"","",m):"",be:(m,y)=>m&&y?ca(n.value,e,m,y,""):"",em:(m,y)=>m&&y?ca(n.value,e,"",m,y):"",bm:(m,y)=>m&&y?ca(n.value,e,m,"",y):"",bem:(m,y,v)=>m&&y&&v?ca(n.value,e,m,y,v):"",is:(m,...y)=>{const v=y.length>=1?y[0]:!0;return m&&v?`${$J}${m}`:""},cssVar:m=>{const y={};for(const v in m)m[v]&&(y[`--${n.value}-${v}`]=m[v]);return y},cssVarName:m=>`--${n.value}-${m}`,cssVarBlock:m=>{const y={};for(const v in m)m[v]&&(y[`--${n.value}-${e}-${v}`]=m[v]);return y},cssVarBlockName:m=>`--${n.value}-${e}-${m}`}},fM=(e,t={})=>{on(e)||ws("[useLockscreen]","You need to pass a ref param to this function");const n=t.ns||Re("popup"),o=j$(()=>n.bm("parent","hidden"));if(!xt||Ti(document.body,o.value))return;let r=0,s=!1,i="0";const l=()=>{setTimeout(()=>{qs(document==null?void 0:document.body,o.value),s&&document&&(document.body.style.width=i)},200)};Te(e,a=>{if(!a){l();return}s=!Ti(document.body,o.value),s&&(i=document.body.style.width),r=_Y(n.namespace.value);const u=document.documentElement.clientHeight<document.body.scrollHeight,c=kl(document.body,"overflowY");r>0&&(u||c==="scroll")&&s&&(document.body.style.width=`calc(100% - ${r}px)`),lu(document.body,o.value)}),Q2(()=>l())},EJ=P0({type:Ce(Boolean),default:null}),xJ=P0({type:Ce(Function)}),pM=e=>{const t=`update:${e}`,n=`onUpdate:${e}`,o=[t],r={[e]:EJ,[n]:xJ};return{useModelToggle:({indicator:i,toggleReason:l,shouldHideWhenRouteChanges:a,shouldProceed:u,onShow:c,onHide:d})=>{const f=at(),{emit:p}=f,h=f.props,m=R(()=>Xe(h[n])),y=R(()=>h[e]===null),v=T=>{i.value!==!0&&(i.value=!0,l&&(l.value=T),Xe(c)&&c(T))},w=T=>{i.value!==!1&&(i.value=!1,l&&(l.value=T),Xe(d)&&d(T))},_=T=>{if(h.disabled===!0||Xe(u)&&!u())return;const O=m.value&&xt;O&&p(t,!0),(y.value||!O)&&v(T)},S=T=>{if(h.disabled===!0||!xt)return;const O=m.value&&xt;O&&p(t,!1),(y.value||!O)&&w(T)},x=T=>{Br(T)&&(h.disabled&&T?m.value&&p(t,!1):i.value!==T&&(T?v():w()))},E=()=>{i.value?S():_()};return Te(()=>h[e],x),a&&f.appContext.config.globalProperties.$route!==void 0&&Te(()=>({...f.proxy.$route}),()=>{a.value&&i.value&&S()}),Ct(()=>{x(h[e])}),{hide:S,show:_,toggle:E,hasUpdateHandler:m}},useModelToggleProps:r,useModelToggleEmits:o}};pM("modelValue");const hM=e=>{const t=at();return R(()=>{var n,o;return(o=(n=t==null?void 0:t.proxy)==null?void 0:n.$props)==null?void 0:o[e]})};var Ko="top",zr="bottom",jr="right",qo="left",h3="auto",ch=[Ko,zr,jr,qo],Qc="start",Np="end",MJ="clippingParents",mM="viewport",Ud="popper",TJ="reference",d5=ch.reduce(function(e,t){return e.concat([t+"-"+Qc,t+"-"+Np])},[]),L0=[].concat(ch,[h3]).reduce(function(e,t){return e.concat([t,t+"-"+Qc,t+"-"+Np])},[]),OJ="beforeRead",IJ="read",AJ="afterRead",NJ="beforeMain",PJ="main",LJ="afterMain",RJ="beforeWrite",DJ="write",FJ="afterWrite",VJ=[OJ,IJ,AJ,NJ,PJ,LJ,RJ,DJ,FJ];function Ys(e){return e?(e.nodeName||"").toLowerCase():null}function Cs(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ed(e){var t=Cs(e).Element;return e instanceof t||e instanceof Element}function Lr(e){var t=Cs(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function m3(e){if(typeof ShadowRoot>"u")return!1;var t=Cs(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function BJ(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var o=t.styles[n]||{},r=t.attributes[n]||{},s=t.elements[n];!Lr(s)||!Ys(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 zJ(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(o){var r=t.elements[o],s=t.attributes[o]||{},i=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:n[o]),l=i.reduce(function(a,u){return a[u]="",a},{});!Lr(r)||!Ys(r)||(Object.assign(r.style,l),Object.keys(s).forEach(function(a){r.removeAttribute(a)}))})}}var gM={name:"applyStyles",enabled:!0,phase:"write",fn:BJ,effect:zJ,requires:["computeStyles"]};function Hs(e){return e.split("-")[0]}var Wa=Math.max,Ig=Math.min,td=Math.round;function nd(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),o=1,r=1;if(Lr(e)&&t){var s=e.offsetHeight,i=e.offsetWidth;i>0&&(o=td(n.width)/i||1),s>0&&(r=td(n.height)/s||1)}return{width:n.width/o,height:n.height/r,top:n.top/r,right:n.right/o,bottom:n.bottom/r,left:n.left/o,x:n.left/o,y:n.top/r}}function g3(e){var t=nd(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function vM(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&m3(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function Pi(e){return Cs(e).getComputedStyle(e)}function jJ(e){return["table","td","th"].indexOf(Ys(e))>=0}function Jl(e){return((ed(e)?e.ownerDocument:e.document)||window.document).documentElement}function R0(e){return Ys(e)==="html"?e:e.assignedSlot||e.parentNode||(m3(e)?e.host:null)||Jl(e)}function f5(e){return!Lr(e)||Pi(e).position==="fixed"?null:e.offsetParent}function HJ(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&Lr(e)){var o=Pi(e);if(o.position==="fixed")return null}var r=R0(e);for(m3(r)&&(r=r.host);Lr(r)&&["html","body"].indexOf(Ys(r))<0;){var s=Pi(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 dh(e){for(var t=Cs(e),n=f5(e);n&&jJ(n)&&Pi(n).position==="static";)n=f5(n);return n&&(Ys(n)==="html"||Ys(n)==="body"&&Pi(n).position==="static")?t:n||HJ(e)||t}function v3(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Uf(e,t,n){return Wa(e,Ig(t,n))}function UJ(e,t,n){var o=Uf(e,t,n);return o>n?n:o}function yM(){return{top:0,right:0,bottom:0,left:0}}function _M(e){return Object.assign({},yM(),e)}function bM(e,t){return t.reduce(function(n,o){return n[o]=e,n},{})}var WJ=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,_M(typeof e!="number"?e:bM(e,ch))};function KJ(e){var t,n=e.state,o=e.name,r=e.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,l=Hs(n.placement),a=v3(l),u=[qo,jr].indexOf(l)>=0,c=u?"height":"width";if(!(!s||!i)){var d=WJ(r.padding,n),f=g3(s),p=a==="y"?Ko:qo,h=a==="y"?zr:jr,m=n.rects.reference[c]+n.rects.reference[a]-i[a]-n.rects.popper[c],y=i[a]-n.rects.reference[a],v=dh(s),w=v?a==="y"?v.clientHeight||0:v.clientWidth||0:0,_=m/2-y/2,S=d[p],x=w-f[c]-d[h],E=w/2-f[c]/2+_,T=Uf(S,E,x),O=a;n.modifiersData[o]=(t={},t[O]=T,t.centerOffset=T-E,t)}}function qJ(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)||!vM(t.elements.popper,r)||(t.elements.arrow=r))}var GJ={name:"arrow",enabled:!0,phase:"main",fn:KJ,effect:qJ,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function od(e){return e.split("-")[1]}var YJ={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ZJ(e){var t=e.x,n=e.y,o=window,r=o.devicePixelRatio||1;return{x:td(t*r)/r||0,y:td(n*r)/r||0}}function p5(e){var t,n=e.popper,o=e.popperRect,r=e.placement,s=e.variation,i=e.offsets,l=e.position,a=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=i.x,p=f===void 0?0:f,h=i.y,m=h===void 0?0:h,y=typeof c=="function"?c({x:p,y:m}):{x:p,y:m};p=y.x,m=y.y;var v=i.hasOwnProperty("x"),w=i.hasOwnProperty("y"),_=qo,S=Ko,x=window;if(u){var E=dh(n),T="clientHeight",O="clientWidth";if(E===Cs(n)&&(E=Jl(n),Pi(E).position!=="static"&&l==="absolute"&&(T="scrollHeight",O="scrollWidth")),E=E,r===Ko||(r===qo||r===jr)&&s===Np){S=zr;var P=d&&E===x&&x.visualViewport?x.visualViewport.height:E[T];m-=P-o.height,m*=a?1:-1}if(r===qo||(r===Ko||r===zr)&&s===Np){_=jr;var N=d&&E===x&&x.visualViewport?x.visualViewport.width:E[O];p-=N-o.width,p*=a?1:-1}}var F=Object.assign({position:l},u&&YJ),B=c===!0?ZJ({x:p,y:m}):{x:p,y:m};if(p=B.x,m=B.y,a){var Y;return Object.assign({},F,(Y={},Y[S]=w?"0":"",Y[_]=v?"0":"",Y.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",Y))}return Object.assign({},F,(t={},t[S]=w?m+"px":"",t[_]=v?p+"px":"",t.transform="",t))}function JJ(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=o===void 0?!0:o,s=n.adaptive,i=s===void 0?!0:s,l=n.roundOffsets,a=l===void 0?!0:l,u={placement:Hs(t.placement),variation:od(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,p5(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:a})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,p5(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var wM={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:JJ,data:{}},am={passive:!0};function XJ(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=Cs(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&u.forEach(function(c){c.addEventListener("scroll",n.update,am)}),l&&a.addEventListener("resize",n.update,am),function(){s&&u.forEach(function(c){c.removeEventListener("scroll",n.update,am)}),l&&a.removeEventListener("resize",n.update,am)}}var CM={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:XJ,data:{}},QJ={left:"right",right:"left",bottom:"top",top:"bottom"};function Zm(e){return e.replace(/left|right|bottom|top/g,function(t){return QJ[t]})}var eX={start:"end",end:"start"};function h5(e){return e.replace(/start|end/g,function(t){return eX[t]})}function y3(e){var t=Cs(e),n=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:n,scrollTop:o}}function _3(e){return nd(Jl(e)).left+y3(e).scrollLeft}function tX(e){var t=Cs(e),n=Jl(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+_3(e),y:l}}function nX(e){var t,n=Jl(e),o=y3(e),r=(t=e.ownerDocument)==null?void 0:t.body,s=Wa(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=Wa(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-o.scrollLeft+_3(e),a=-o.scrollTop;return Pi(r||n).direction==="rtl"&&(l+=Wa(n.clientWidth,r?r.clientWidth:0)-s),{width:s,height:i,x:l,y:a}}function b3(e){var t=Pi(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function kM(e){return["html","body","#document"].indexOf(Ys(e))>=0?e.ownerDocument.body:Lr(e)&&b3(e)?e:kM(R0(e))}function Wf(e,t){var n;t===void 0&&(t=[]);var o=kM(e),r=o===((n=e.ownerDocument)==null?void 0:n.body),s=Cs(o),i=r?[s].concat(s.visualViewport||[],b3(o)?o:[]):o,l=t.concat(i);return r?l:l.concat(Wf(R0(i)))}function Z_(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function oX(e){var t=nd(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function m5(e,t){return t===mM?Z_(tX(e)):ed(t)?oX(t):Z_(nX(Jl(e)))}function rX(e){var t=Wf(R0(e)),n=["absolute","fixed"].indexOf(Pi(e).position)>=0,o=n&&Lr(e)?dh(e):e;return ed(o)?t.filter(function(r){return ed(r)&&vM(r,o)&&Ys(r)!=="body"}):[]}function sX(e,t,n){var o=t==="clippingParents"?rX(e):[].concat(t),r=[].concat(o,[n]),s=r[0],i=r.reduce(function(l,a){var u=m5(e,a);return l.top=Wa(u.top,l.top),l.right=Ig(u.right,l.right),l.bottom=Ig(u.bottom,l.bottom),l.left=Wa(u.left,l.left),l},m5(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 SM(e){var t=e.reference,n=e.element,o=e.placement,r=o?Hs(o):null,s=o?od(o):null,i=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,a;switch(r){case Ko:a={x:i,y:t.y-n.height};break;case zr:a={x:i,y:t.y+t.height};break;case jr:a={x:t.x+t.width,y:l};break;case qo:a={x:t.x-n.width,y:l};break;default:a={x:t.x,y:t.y}}var u=r?v3(r):null;if(u!=null){var c=u==="y"?"height":"width";switch(s){case Qc:a[u]=a[u]-(t[c]/2-n[c]/2);break;case Np:a[u]=a[u]+(t[c]/2-n[c]/2);break}}return a}function Pp(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?MJ:s,l=n.rootBoundary,a=l===void 0?mM:l,u=n.elementContext,c=u===void 0?Ud:u,d=n.altBoundary,f=d===void 0?!1:d,p=n.padding,h=p===void 0?0:p,m=_M(typeof h!="number"?h:bM(h,ch)),y=c===Ud?TJ:Ud,v=e.rects.popper,w=e.elements[f?y:c],_=sX(ed(w)?w:w.contextElement||Jl(e.elements.popper),i,a),S=nd(e.elements.reference),x=SM({reference:S,element:v,strategy:"absolute",placement:r}),E=Z_(Object.assign({},v,x)),T=c===Ud?E:S,O={top:_.top-T.top+m.top,bottom:T.bottom-_.bottom+m.bottom,left:_.left-T.left+m.left,right:T.right-_.right+m.right},P=e.modifiersData.offset;if(c===Ud&&P){var N=P[r];Object.keys(O).forEach(function(F){var B=[jr,zr].indexOf(F)>=0?1:-1,Y=[Ko,zr].indexOf(F)>=0?"y":"x";O[F]+=N[Y]*B})}return O}function iX(e,t){t===void 0&&(t={});var n=t,o=n.placement,r=n.boundary,s=n.rootBoundary,i=n.padding,l=n.flipVariations,a=n.allowedAutoPlacements,u=a===void 0?L0:a,c=od(o),d=c?l?d5:d5.filter(function(h){return od(h)===c}):ch,f=d.filter(function(h){return u.indexOf(h)>=0});f.length===0&&(f=d);var p=f.reduce(function(h,m){return h[m]=Pp(e,{placement:m,boundary:r,rootBoundary:s,padding:i})[Hs(m)],h},{});return Object.keys(p).sort(function(h,m){return p[h]-p[m]})}function lX(e){if(Hs(e)===h3)return[];var t=Zm(e);return[h5(e),t,h5(t)]}function aX(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var r=n.mainAxis,s=r===void 0?!0:r,i=n.altAxis,l=i===void 0?!0:i,a=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=p===void 0?!0:p,m=n.allowedAutoPlacements,y=t.options.placement,v=Hs(y),w=v===y,_=a||(w||!h?[Zm(y)]:lX(y)),S=[y].concat(_).reduce(function(ge,Oe){return ge.concat(Hs(Oe)===h3?iX(t,{placement:Oe,boundary:c,rootBoundary:d,padding:u,flipVariations:h,allowedAutoPlacements:m}):Oe)},[]),x=t.rects.reference,E=t.rects.popper,T=new Map,O=!0,P=S[0],N=0;N<S.length;N++){var F=S[N],B=Hs(F),Y=od(F)===Qc,Z=[Ko,zr].indexOf(B)>=0,U=Z?"width":"height",j=Pp(t,{placement:F,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),V=Z?Y?jr:qo:Y?zr:Ko;x[U]>E[U]&&(V=Zm(V));var H=Zm(V),L=[];if(s&&L.push(j[B]<=0),l&&L.push(j[V]<=0,j[H]<=0),L.every(function(ge){return ge})){P=F,O=!1;break}T.set(F,L)}if(O)for(var I=h?3:1,X=function(ge){var Oe=S.find(function(xe){var ee=T.get(xe);if(ee)return ee.slice(0,ge).every(function(de){return de})});if(Oe)return P=Oe,"break"},oe=I;oe>0;oe--){var z=X(oe);if(z==="break")break}t.placement!==P&&(t.modifiersData[o]._skip=!0,t.placement=P,t.reset=!0)}}var uX={name:"flip",enabled:!0,phase:"main",fn:aX,requiresIfExists:["offset"],data:{_skip:!1}};function g5(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 v5(e){return[Ko,jr,zr,qo].some(function(t){return e[t]>=0})}function cX(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,s=t.modifiersData.preventOverflow,i=Pp(t,{elementContext:"reference"}),l=Pp(t,{altBoundary:!0}),a=g5(i,o),u=g5(l,r,s),c=v5(a),d=v5(u);t.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}var dX={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:cX};function fX(e,t,n){var o=Hs(e),r=[qo,Ko].indexOf(o)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=s[0],l=s[1];return i=i||0,l=(l||0)*r,[qo,jr].indexOf(o)>=0?{x:l,y:i}:{x:i,y:l}}function pX(e){var t=e.state,n=e.options,o=e.name,r=n.offset,s=r===void 0?[0,0]:r,i=L0.reduce(function(c,d){return c[d]=fX(d,t.rects,s),c},{}),l=i[t.placement],a=l.x,u=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=u),t.modifiersData[o]=i}var hX={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:pX};function mX(e){var t=e.state,n=e.name;t.modifiersData[n]=SM({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var $M={name:"popperOffsets",enabled:!0,phase:"read",fn:mX,data:{}};function gX(e){return e==="x"?"y":"x"}function vX(e){var t=e.state,n=e.options,o=e.name,r=n.mainAxis,s=r===void 0?!0:r,i=n.altAxis,l=i===void 0?!1:i,a=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,h=n.tetherOffset,m=h===void 0?0:h,y=Pp(t,{boundary:a,rootBoundary:u,padding:d,altBoundary:c}),v=Hs(t.placement),w=od(t.placement),_=!w,S=v3(v),x=gX(S),E=t.modifiersData.popperOffsets,T=t.rects.reference,O=t.rects.popper,P=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,N=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),F=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(E){if(s){var Y,Z=S==="y"?Ko:qo,U=S==="y"?zr:jr,j=S==="y"?"height":"width",V=E[S],H=V+y[Z],L=V-y[U],I=p?-O[j]/2:0,X=w===Qc?T[j]:O[j],oe=w===Qc?-O[j]:-T[j],z=t.elements.arrow,ge=p&&z?g3(z):{width:0,height:0},Oe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:yM(),xe=Oe[Z],ee=Oe[U],de=Uf(0,T[j],ge[j]),ve=_?T[j]/2-I-de-xe-N.mainAxis:X-de-xe-N.mainAxis,le=_?-T[j]/2+I+de+ee+N.mainAxis:oe+de+ee+N.mainAxis,Ie=t.elements.arrow&&dh(t.elements.arrow),Ge=Ie?S==="y"?Ie.clientTop||0:Ie.clientLeft||0:0,G=(Y=F==null?void 0:F[S])!=null?Y:0,J=V+ve-G-Ge,ue=V+le-G,_e=Uf(p?Ig(H,J):H,V,p?Wa(L,ue):L);E[S]=_e,B[S]=_e-V}if(l){var ye,Ae=S==="x"?Ko:qo,Le=S==="x"?zr:jr,Ee=E[x],Pe=x==="y"?"height":"width",me=Ee+y[Ae],je=Ee-y[Le],Ze=[Ko,qo].indexOf(v)!==-1,ce=(ye=F==null?void 0:F[x])!=null?ye:0,te=Ze?me:Ee-T[Pe]-O[Pe]-ce+N.altAxis,pe=Ze?Ee+T[Pe]+O[Pe]-ce-N.altAxis:je,Ve=p&&Ze?UJ(te,Ee,pe):Uf(p?te:me,Ee,p?pe:je);E[x]=Ve,B[x]=Ve-Ee}t.modifiersData[o]=B}}var yX={name:"preventOverflow",enabled:!0,phase:"main",fn:vX,requiresIfExists:["offset"]};function _X(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function bX(e){return e===Cs(e)||!Lr(e)?y3(e):_X(e)}function wX(e){var t=e.getBoundingClientRect(),n=td(t.width)/e.offsetWidth||1,o=td(t.height)/e.offsetHeight||1;return n!==1||o!==1}function CX(e,t,n){n===void 0&&(n=!1);var o=Lr(t),r=Lr(t)&&wX(t),s=Jl(t),i=nd(e,r),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!n)&&((Ys(t)!=="body"||b3(s))&&(l=bX(t)),Lr(t)?(a=nd(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):s&&(a.x=_3(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 SX(e){var t=kX(e);return VJ.reduce(function(n,o){return n.concat(t.filter(function(r){return r.phase===o}))},[])}function $X(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function EX(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 y5={placement:"bottom",modifiers:[],strategy:"absolute"};function _5(){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 w3(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,o=n===void 0?[]:n,r=t.defaultOptions,s=r===void 0?y5:r;return function(i,l,a){a===void 0&&(a=s);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},y5,s),modifiersData:{},elements:{reference:i,popper:l},attributes:{},styles:{}},c=[],d=!1,f={state:u,setOptions:function(m){var y=typeof m=="function"?m(u.options):m;h(),u.options=Object.assign({},s,u.options,y),u.scrollParents={reference:ed(i)?Wf(i):i.contextElement?Wf(i.contextElement):[],popper:Wf(l)};var v=SX(EX([].concat(o,u.options.modifiers)));return u.orderedModifiers=v.filter(function(w){return w.enabled}),p(),f.update()},forceUpdate:function(){if(!d){var m=u.elements,y=m.reference,v=m.popper;if(_5(y,v)){u.rects={reference:CX(y,dh(v),u.options.strategy==="fixed"),popper:g3(v)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(O){return u.modifiersData[O.name]=Object.assign({},O.data)});for(var w=0;w<u.orderedModifiers.length;w++){if(u.reset===!0){u.reset=!1,w=-1;continue}var _=u.orderedModifiers[w],S=_.fn,x=_.options,E=x===void 0?{}:x,T=_.name;typeof S=="function"&&(u=S({state:u,options:E,name:T,instance:f})||u)}}}},update:$X(function(){return new Promise(function(m){f.forceUpdate(),m(u)})}),destroy:function(){h(),d=!0}};if(!_5(i,l))return f;f.setOptions(a).then(function(m){!d&&a.onFirstUpdate&&a.onFirstUpdate(m)});function p(){u.orderedModifiers.forEach(function(m){var y=m.name,v=m.options,w=v===void 0?{}:v,_=m.effect;if(typeof _=="function"){var S=_({state:u,name:y,instance:f,options:w}),x=function(){};c.push(S||x)}})}function h(){c.forEach(function(m){return m()}),c=[]}return f}}w3();var xX=[CM,$M,wM,gM];w3({defaultModifiers:xX});var MX=[CM,$M,wM,gM,hX,uX,yX,GJ,dX],TX=w3({defaultModifiers:MX});const OX=(e,t,n={})=>{const o={name:"updateState",enabled:!0,phase:"write",fn:({state:a})=>{const u=IX(a);Object.assign(i.value,u)},requires:["computeStyles"]},r=R(()=>{const{onFirstUpdate:a,placement:u,strategy:c,modifiers:d}=g(n);return{onFirstUpdate:a,placement:u||"bottom",strategy:c||"absolute",modifiers:[...d||[],o,{name:"applyStyles",enabled:!1}]}}),s=Tn(),i=K({styles:{popper:{position:g(r).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=()=>{s.value&&(s.value.destroy(),s.value=void 0)};return Te(r,a=>{const u=g(s);u&&u.setOptions(a)},{deep:!0}),Te([e,t],([a,u])=>{l(),!(!a||!u)&&(s.value=TX(a,u,g(r)))}),En(()=>{l()}),{state:R(()=>{var a;return{...((a=g(s))==null?void 0:a.state)||{}}}),styles:R(()=>g(i).styles),attributes:R(()=>g(i).attributes),update:()=>{var a;return(a=g(s))==null?void 0:a.update()},forceUpdate:()=>{var a;return(a=g(s))==null?void 0:a.forceUpdate()},instanceRef:R(()=>g(s))}};function IX(e){const t=Object.keys(e.elements),n=Tg(t.map(r=>[r,e.styles[r]||{}])),o=Tg(t.map(r=>[r,e.attributes[r]]));return{styles:n,attributes:o}}const C3=e=>{if(!e)return{onClick:yt,onMousedown:yt,onMouseup:yt};let t=!1,n=!1;return{onClick:i=>{t&&n&&e(i),t=n=!1},onMousedown:i=>{t=i.target===i.currentTarget},onMouseup:i=>{n=i.target===i.currentTarget}}},AX=(e,t=0)=>{if(t===0)return e;const n=K(!1);let o=0;const r=()=>{o&&clearTimeout(o),o=window.setTimeout(()=>{n.value=e.value},t)};return Ct(r),Te(()=>e.value,s=>{s?r():n.value=s}),n};function b5(){let e;const t=(o,r)=>{n(),e=window.setTimeout(o,r)},n=()=>window.clearTimeout(e);return oh(()=>n()),{registerTimeout:t,cancelTimeout:n}}const w5={prefix:Math.floor(Math.random()*1e4),current:0},NX=Symbol("elIdInjection"),EM=()=>at()?Be(NX,w5):w5,Hr=e=>{const t=EM(),n=p3();return R(()=>g(e)||`${n.value}-id-${t.prefix}-${t.current++}`)};let Ku=[];const C5=e=>{const t=e;t.key===rt.esc&&Ku.forEach(n=>n(t))},PX=e=>{Ct(()=>{Ku.length===0&&document.addEventListener("keydown",C5),xt&&Ku.push(e)}),En(()=>{Ku=Ku.filter(t=>t!==e),Ku.length===0&&xt&&document.removeEventListener("keydown",C5)})};let k5;const xM=()=>{const e=p3(),t=EM(),n=R(()=>`${e.value}-popper-container-${t.prefix}`),o=R(()=>`#${n.value}`);return{id:n,selector:o}},LX=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},RX=()=>{const{id:e,selector:t}=xM();return yd(()=>{xt&&!k5&&!document.body.querySelector(t.value)&&(k5=LX(e.value))}),{id:e,selector:t}},DX=We({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),FX=({showAfter:e,hideAfter:t,autoClose:n,open:o,close:r})=>{const{registerTimeout:s}=b5(),{registerTimeout:i,cancelTimeout:l}=b5();return{onOpen:c=>{s(()=>{o(c);const d=g(n);_t(d)&&d>0&&i(()=>{r(c)},d)},g(e))},onClose:c=>{l(),s(()=>{r(c)},g(t))}}},MM=Symbol("elForwardRef"),VX=e=>{wt(MM,{setForwardRef:n=>{e.value=n}})},BX=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),S5={current:0},$5=K(0),TM=2e3,E5=Symbol("elZIndexContextKey"),OM=Symbol("zIndexContextKey"),D0=e=>{const t=at()?Be(E5,S5):S5,n=e||(at()?Be(OM,void 0):void 0),o=R(()=>{const i=g(n);return _t(i)?i:TM}),r=R(()=>o.value+$5.value),s=()=>(t.current++,$5.value=t.current,r.value);return!xt&&Be(E5),{initialZIndex:o,currentZIndex:r,nextZIndex:s}},x5=Math.min,Kf=Math.max,Ag=Math.round,Hl=e=>({x:e,y:e}),zX={left:"right",right:"left",bottom:"top",top:"bottom"},jX={start:"end",end:"start"};function k3(e,t){return typeof e=="function"?e(t):e}function rd(e){return e.split("-")[0]}function F0(e){return e.split("-")[1]}function HX(e){return e==="x"?"y":"x"}function IM(e){return e==="y"?"height":"width"}function S3(e){return["top","bottom"].includes(rd(e))?"y":"x"}function AM(e){return HX(S3(e))}function UX(e,t,n){n===void 0&&(n=!1);const o=F0(e),r=AM(e),s=IM(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Ng(i)),[i,Ng(i)]}function WX(e){const t=Ng(e);return[J_(e),t,J_(t)]}function J_(e){return e.replace(/start|end/g,t=>jX[t])}function KX(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 qX(e,t,n,o){const r=F0(e);let s=KX(rd(e),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map(J_)))),s}function Ng(e){return e.replace(/left|right|bottom|top/g,t=>zX[t])}function GX(e){return{top:0,right:0,bottom:0,left:0,...e}}function YX(e){return typeof e!="number"?GX(e):{top:e,right:e,bottom:e,left:e}}function Pg(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function M5(e,t,n){let{reference:o,floating:r}=e;const s=S3(t),i=AM(t),l=IM(i),a=rd(t),u=s==="y",c=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,f=o[l]/2-r[l]/2;let p;switch(a){case"top":p={x:c,y:o.y-r.height};break;case"bottom":p={x:c,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-r.width,y:d};break;default:p={x:o.x,y:o.y}}switch(F0(t)){case"start":p[i]-=f*(n&&u?-1:1);break;case"end":p[i]+=f*(n&&u?-1:1);break}return p}const ZX=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,l=s.filter(Boolean),a=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:c,y:d}=M5(u,o,a),f=o,p={},h=0;for(let m=0;m<l.length;m++){const{name:y,fn:v}=l[m],{x:w,y:_,data:S,reset:x}=await v({x:c,y:d,initialPlacement:o,placement:f,strategy:r,middlewareData:p,rects:u,platform:i,elements:{reference:e,floating:t}});c=w??c,d=_??d,p={...p,[y]:{...p[y],...S}},x&&h<=50&&(h++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(u=x.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):x.rects),{x:c,y:d}=M5(u,f,a)),m=-1)}return{x:c,y:d,placement:f,strategy:r,middlewareData:p}};async function JX(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:i,elements:l,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=k3(t,e),h=YX(p),y=l[f?d==="floating"?"reference":"floating":d],v=Pg(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:c,strategy:a})),w=d==="floating"?{...i.floating,x:o,y:r}:i.reference,_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),S=await(s.isElement==null?void 0:s.isElement(_))?await(s.getScale==null?void 0:s.getScale(_))||{x:1,y:1}:{x:1,y:1},x=Pg(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:_,strategy:a}):w);return{top:(v.top-x.top+h.top)/S.y,bottom:(x.bottom-v.bottom+h.bottom)/S.y,left:(v.left-x.left+h.left)/S.x,right:(x.right-v.right+h.right)/S.x}}const XX=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:l,platform:a,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=k3(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=rd(r),w=rd(l)===l,_=await(a.isRTL==null?void 0:a.isRTL(u.floating)),S=f||(w||!m?[Ng(l)]:WX(l));!f&&h!=="none"&&S.push(...qX(l,m,h,_));const x=[l,...S],E=await JX(t,y),T=[];let O=((o=s.flip)==null?void 0:o.overflows)||[];if(c&&T.push(E[v]),d){const B=UX(r,i,_);T.push(E[B[0]],E[B[1]])}if(O=[...O,{placement:r,overflows:T}],!T.every(B=>B<=0)){var P,N;const B=(((P=s.flip)==null?void 0:P.index)||0)+1,Y=x[B];if(Y)return{data:{index:B,overflows:O},reset:{placement:Y}};let Z=(N=O.filter(U=>U.overflows[0]<=0).sort((U,j)=>U.overflows[1]-j.overflows[1])[0])==null?void 0:N.placement;if(!Z)switch(p){case"bestFit":{var F;const U=(F=O.map(j=>[j.placement,j.overflows.filter(V=>V>0).reduce((V,H)=>V+H,0)]).sort((j,V)=>j[1]-V[1])[0])==null?void 0:F[0];U&&(Z=U);break}case"initialPlacement":Z=l;break}if(r!==Z)return{reset:{placement:Z}}}return{}}}};async function QX(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=rd(n),l=F0(n),a=S3(n)==="y",u=["left","top"].includes(i)?-1:1,c=s&&a?-1:1,d=k3(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&typeof h=="number"&&(p=l==="end"?h*-1:h),a?{x:p*c,y:f*u}:{x:f*u,y:p*c}}const X_=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 QX(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 Ul(e){return NM(e)?(e.nodeName||"").toLowerCase():"#document"}function mr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xl(e){var t;return(t=(NM(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function NM(e){return e instanceof Node||e instanceof mr(e).Node}function Li(e){return e instanceof Element||e instanceof mr(e).Element}function Zs(e){return e instanceof HTMLElement||e instanceof mr(e).HTMLElement}function T5(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof mr(e).ShadowRoot}function fh(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Ur(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function eQ(e){return["table","td","th"].includes(Ul(e))}function $3(e){const t=E3(),n=Ur(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function tQ(e){let t=sd(e);for(;Zs(t)&&!V0(t);){if($3(t))return t;t=sd(t)}return null}function E3(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function V0(e){return["html","body","#document"].includes(Ul(e))}function Ur(e){return mr(e).getComputedStyle(e)}function B0(e){return Li(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function sd(e){if(Ul(e)==="html")return e;const t=e.assignedSlot||e.parentNode||T5(e)&&e.host||Xl(e);return T5(t)?t.host:t}function PM(e){const t=sd(e);return V0(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zs(t)&&fh(t)?t:PM(t)}function Q_(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=PM(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),i=mr(r);return s?t.concat(i,i.visualViewport||[],fh(r)?r:[],i.frameElement&&n?Q_(i.frameElement):[]):t.concat(r,Q_(r,[],n))}function LM(e){const t=Ur(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Zs(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:o,l=Ag(n)!==s||Ag(o)!==i;return l&&(n=s,o=i),{width:n,height:o,$:l}}function RM(e){return Li(e)?e:e.contextElement}function Sc(e){const t=RM(e);if(!Zs(t))return Hl(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=LM(t);let i=(s?Ag(n.width):n.width)/o,l=(s?Ag(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const nQ=Hl(0);function DM(e){const t=mr(e);return!E3()||!t.visualViewport?nQ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function oQ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==mr(e)?!1:t}function Lp(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=RM(e);let i=Hl(1);t&&(o?Li(o)&&(i=Sc(o)):i=Sc(e));const l=oQ(s,n,o)?DM(s):Hl(0);let a=(r.left+l.x)/i.x,u=(r.top+l.y)/i.y,c=r.width/i.x,d=r.height/i.y;if(s){const f=mr(s),p=o&&Li(o)?mr(o):o;let h=f,m=h.frameElement;for(;m&&o&&p!==h;){const y=Sc(m),v=m.getBoundingClientRect(),w=Ur(m),_=v.left+(m.clientLeft+parseFloat(w.paddingLeft))*y.x,S=v.top+(m.clientTop+parseFloat(w.paddingTop))*y.y;a*=y.x,u*=y.y,c*=y.x,d*=y.y,a+=_,u+=S,h=mr(m),m=h.frameElement}}return Pg({width:c,height:d,x:a,y:u})}const rQ=[":popover-open",":modal"];function FM(e){return rQ.some(t=>{try{return e.matches(t)}catch{return!1}})}function sQ(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",i=Xl(o),l=t?FM(t.floating):!1;if(o===i||l&&s)return n;let a={scrollLeft:0,scrollTop:0},u=Hl(1);const c=Hl(0),d=Zs(o);if((d||!d&&!s)&&((Ul(o)!=="body"||fh(i))&&(a=B0(o)),Zs(o))){const f=Lp(o);u=Sc(o),c.x=f.x+o.clientLeft,c.y=f.y+o.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+c.x,y:n.y*u.y-a.scrollTop*u.y+c.y}}function iQ(e){return Array.from(e.getClientRects())}function VM(e){return Lp(Xl(e)).left+B0(e).scrollLeft}function lQ(e){const t=Xl(e),n=B0(e),o=e.ownerDocument.body,r=Kf(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=Kf(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+VM(e);const l=-n.scrollTop;return Ur(o).direction==="rtl"&&(i+=Kf(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:i,y:l}}function aQ(e,t){const n=mr(e),o=Xl(e),r=n.visualViewport;let s=o.clientWidth,i=o.clientHeight,l=0,a=0;if(r){s=r.width,i=r.height;const u=E3();(!u||u&&t==="fixed")&&(l=r.offsetLeft,a=r.offsetTop)}return{width:s,height:i,x:l,y:a}}function uQ(e,t){const n=Lp(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=Zs(e)?Sc(e):Hl(1),i=e.clientWidth*s.x,l=e.clientHeight*s.y,a=r*s.x,u=o*s.y;return{width:i,height:l,x:a,y:u}}function O5(e,t,n){let o;if(t==="viewport")o=aQ(e,n);else if(t==="document")o=lQ(Xl(e));else if(Li(t))o=uQ(t,n);else{const r=DM(e);o={...t,x:t.x-r.x,y:t.y-r.y}}return Pg(o)}function BM(e,t){const n=sd(e);return n===t||!Li(n)||V0(n)?!1:Ur(n).position==="fixed"||BM(n,t)}function cQ(e,t){const n=t.get(e);if(n)return n;let o=Q_(e,[],!1).filter(l=>Li(l)&&Ul(l)!=="body"),r=null;const s=Ur(e).position==="fixed";let i=s?sd(e):e;for(;Li(i)&&!V0(i);){const l=Ur(i),a=$3(i);!a&&l.position==="fixed"&&(r=null),(s?!a&&!r:!a&&l.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||fh(i)&&!a&&BM(e,i))?o=o.filter(c=>c!==i):r=l,i=sd(i)}return t.set(e,o),o}function dQ(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?cQ(t,this._c):[].concat(n),o],l=i[0],a=i.reduce((u,c)=>{const d=O5(t,c,r);return u.top=Kf(d.top,u.top),u.right=x5(d.right,u.right),u.bottom=x5(d.bottom,u.bottom),u.left=Kf(d.left,u.left),u},O5(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function fQ(e){const{width:t,height:n}=LM(e);return{width:t,height:n}}function pQ(e,t,n){const o=Zs(t),r=Xl(t),s=n==="fixed",i=Lp(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const a=Hl(0);if(o||!o&&!s)if((Ul(t)!=="body"||fh(r))&&(l=B0(t)),o){const d=Lp(t,!0,s,t);a.x=d.x+t.clientLeft,a.y=d.y+t.clientTop}else r&&(a.x=VM(r));const u=i.left+l.scrollLeft-a.x,c=i.top+l.scrollTop-a.y;return{x:u,y:c,width:i.width,height:i.height}}function I5(e,t){return!Zs(e)||Ur(e).position==="fixed"?null:t?t(e):e.offsetParent}function zM(e,t){const n=mr(e);if(!Zs(e)||FM(e))return n;let o=I5(e,t);for(;o&&eQ(o)&&Ur(o).position==="static";)o=I5(o,t);return o&&(Ul(o)==="html"||Ul(o)==="body"&&Ur(o).position==="static"&&!$3(o))?n:o||tQ(e)||n}const hQ=async function(e){const t=this.getOffsetParent||zM,n=this.getDimensions;return{reference:pQ(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function mQ(e){return Ur(e).direction==="rtl"}const gQ={convertOffsetParentRelativeRectToViewportRelativeRect:sQ,getDocumentElement:Xl,getClippingRect:dQ,getOffsetParent:zM,getElementRects:hQ,getClientRects:iQ,getDimensions:fQ,getScale:Sc,isElement:Li,isRTL:mQ},eb=XX,tb=(e,t,n)=>{const o=new Map,r={platform:gQ,...n},s={...r.platform,_c:o};return ZX(e,t,{...r,platform:s})};function vQ(e){const t=K();function n(){if(e.value==null)return;const{selectionStart:r,selectionEnd:s,value:i}=e.value;if(r==null||s==null)return;const l=i.slice(0,Math.max(0,r)),a=i.slice(Math.max(0,s));t.value={selectionStart:r,selectionEnd:s,value:i,beforeTxt:l,afterTxt:a}}function o(){if(e.value==null||t.value==null)return;const{value:r}=e.value,{beforeTxt:s,afterTxt:i,selectionStart:l}=t.value;if(s==null||i==null||l==null)return;let a=r.length;if(r.endsWith(i))a=r.length-i.length;else if(r.startsWith(s))a=s.length;else{const u=s[l-1],c=r.indexOf(u,l-1);c!==-1&&(a=c+1)}e.value.setSelectionRange(a,a)}return[n,o]}const yQ=(e,t,n)=>Ym(e.subTree).filter(s=>{var i;return yo(s)&&((i=s.type)==null?void 0:i.name)===t&&!!s.component}).map(s=>s.component.uid).map(s=>n[s]).filter(s=>!!s),_Q=(e,t)=>{const n={},o=Tn([]);return{children:o,addChild:i=>{n[i.uid]=i,o.value=yQ(e,t,n)},removeChild:i=>{delete n[i],o.value=o.value.filter(l=>l.uid!==i)}}},qr=P0({type:String,values:Zl,required:!1}),jM=Symbol("size"),bQ=()=>{const e=Be(jM,{});return R(()=>g(e.size)||"")};function x3(e,{afterFocus:t,beforeBlur:n,afterBlur:o}={}){const r=at(),{emit:s}=r,i=Tn(),l=K(!1),a=d=>{l.value||(l.value=!0,s("focus",d),t==null||t())},u=d=>{var f;Xe(n)&&n(d)||d.relatedTarget&&((f=i.value)!=null&&f.contains(d.relatedTarget))||(l.value=!1,s("blur",d),o==null||o())},c=()=>{var d;(d=e.value)==null||d.focus()};return Te(i,d=>{d&&d.setAttribute("tabindex","-1")}),Ln(i,"click",c),{wrapperRef:i,isFocused:l,handleFocus:a,handleBlur:u}}const wQ=["",void 0,null],CQ=void 0,M3=We({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:e=>Xe(e)?!e():!e}}),HM=(e,t)=>{const n=ph();n.value=n.value||{};const o=R(()=>e.emptyValues||n.value.emptyValues||wQ),r=R(()=>Xe(e.valueOnClear)?e.valueOnClear():e.valueOnClear!==void 0?e.valueOnClear:Xe(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:t!==void 0?t:CQ),s=i=>o.value.includes(i);return o.value.includes(r.value),{emptyValues:o,valueOnClear:r,isEmptyValue:s}},UM=Symbol(),Lg=K();function ph(e,t=void 0){const n=at()?Be(UM,Lg):Lg;return e?R(()=>{var o,r;return(r=(o=n.value)==null?void 0:o[e])!=null?r:t}):n}function T3(e,t){const n=ph(),o=Re(e,R(()=>{var l;return((l=n.value)==null?void 0:l.namespace)||Hf})),r=Kt(R(()=>{var l;return(l=n.value)==null?void 0:l.locale})),s=D0(R(()=>{var l;return((l=n.value)==null?void 0:l.zIndex)||TM})),i=R(()=>{var l;return g(t)||((l=n.value)==null?void 0:l.size)||""});return kQ(R(()=>g(n)||{})),{ns:o,locale:r,zIndex:s,size:i}}const kQ=(e,t,n=!1)=>{var o;const r=!!at(),s=r?ph():void 0,i=(o=t==null?void 0:t.provide)!=null?o:r?wt:void 0;if(!i)return;const l=R(()=>{const a=g(e);return s!=null&&s.value?SQ(s.value,a):a});return i(UM,l),i(cM,R(()=>l.value.locale)),i(dM,R(()=>l.value.namespace)),i(OM,R(()=>l.value.zIndex)),i(jM,{size:R(()=>l.value.size||"")}),(n||!Lg.value)&&(Lg.value=l.value),l},SQ=(e,t)=>{const n=[...new Set([...G_(e),...G_(t)])],o={};for(const r of n)o[r]=t[r]!==void 0?t[r]:e[r];return o};var ze=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const $Q=We({size:{type:Ce([Number,String])},color:{type:String}}),EQ=Q({name:"ElIcon",inheritAttrs:!1}),xQ=Q({...EQ,props:$Q,setup(e){const t=e,n=Re("icon"),o=R(()=>{const{size:r,color:s}=t;return!r&&!s?{}:{fontSize:Uo(r)?void 0:Zo(r),"--color":s}});return(r,s)=>(C(),M("i",un({class:g(n).b(),style:g(o)},r.$attrs),[he(r.$slots,"default")],16))}});var MQ=ze(xQ,[["__file","icon.vue"]]);const Ne=Zt(MQ),kd=Symbol("formContextKey"),uu=Symbol("formItemContextKey"),Jo=(e,t={})=>{const n=K(void 0),o=t.prop?n:hM("size"),r=t.global?n:bQ(),s=t.form?{size:void 0}:Be(kd,void 0),i=t.formItem?{size:void 0}:Be(uu,void 0);return R(()=>o.value||g(e)||(i==null?void 0:i.size)||(s==null?void 0:s.size)||r.value||"")},Gr=e=>{const t=hM("disabled"),n=Be(kd,void 0);return R(()=>t.value||g(e)||(n==null?void 0:n.disabled)||!1)},ni=()=>{const e=Be(kd,void 0),t=Be(uu,void 0);return{form:e,formItem:t}},Sd=(e,{formItemContext:t,disableIdGeneration:n,disableIdManagement:o})=>{n||(n=K(!1)),o||(o=K(!1));const r=K();let s;const i=R(()=>{var l;return!!(!e.label&&t&&t.inputIds&&((l=t.inputIds)==null?void 0:l.length)<=1)});return Ct(()=>{s=Te([pn(e,"id"),n],([l,a])=>{const u=l??(a?void 0:Hr().value);u!==r.value&&(t!=null&&t.removeInputId&&(r.value&&t.removeInputId(r.value),!(o!=null&&o.value)&&!a&&u&&t.addInputId(u)),r.value=u)},{immediate:!0})}),ti(()=>{s&&s(),t!=null&&t.removeInputId&&r.value&&t.removeInputId(r.value)}),{isLabeledByFormItem:i,inputId:r}},TQ=We({size:{type:String,values:Zl},disabled:Boolean}),OQ=We({...TQ,model:Object,rules:{type:Ce(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean]}}),IQ={validate:(e,t,n)=>(Me(e)||tt(e))&&Br(t)&&tt(n)};function AQ(){const e=K([]),t=R(()=>{if(!e.value.length)return"0";const s=Math.max(...e.value);return s?`${s}px`:""});function n(s){const i=e.value.indexOf(s);return i===-1&&t.value,i}function o(s,i){if(s&&i){const l=n(i);e.value.splice(l,1,s)}else s&&e.value.push(s)}function r(s){const i=n(s);i>-1&&e.value.splice(i,1)}return{autoLabelWidth:t,registerLabelWidth:o,deregisterLabelWidth:r}}const um=(e,t)=>{const n=Eg(t);return n.length>0?e.filter(o=>o.prop&&n.includes(o.prop)):e},NQ="ElForm",PQ=Q({name:NQ}),LQ=Q({...PQ,props:OQ,emits:IQ,setup(e,{expose:t,emit:n}){const o=e,r=[],s=Jo(),i=Re("form"),l=R(()=>{const{labelPosition:_,inline:S}=o;return[i.b(),i.m(s.value||"default"),{[i.m(`label-${_}`)]:_,[i.m("inline")]:S}]}),a=_=>r.find(S=>S.prop===_),u=_=>{r.push(_)},c=_=>{_.prop&&r.splice(r.indexOf(_),1)},d=(_=[])=>{o.model&&um(r,_).forEach(S=>S.resetField())},f=(_=[])=>{um(r,_).forEach(S=>S.clearValidate())},p=R(()=>!!o.model),h=_=>{if(r.length===0)return[];const S=um(r,_);return S.length?S:[]},m=async _=>v(void 0,_),y=async(_=[])=>{if(!p.value)return!1;const S=h(_);if(S.length===0)return!0;let x={};for(const E of S)try{await E.validate("")}catch(T){x={...x,...T}}return Object.keys(x).length===0?!0:Promise.reject(x)},v=async(_=[],S)=>{const x=!Xe(S);try{const E=await y(_);return E===!0&&(S==null||S(E)),E}catch(E){if(E instanceof Error)throw E;const T=E;return o.scrollToError&&w(Object.keys(T)[0]),S==null||S(!1,T),x&&Promise.reject(T)}},w=_=>{var S;const x=um(r,_)[0];x&&((S=x.$el)==null||S.scrollIntoView(o.scrollIntoViewOptions))};return Te(()=>o.rules,()=>{o.validateOnRuleChange&&m().catch(_=>void 0)},{deep:!0}),wt(kd,Dn({...ei(o),emit:n,resetFields:d,clearValidate:f,validateField:v,getField:a,addField:u,removeField:c,...AQ()})),t({validate:m,validateField:v,resetFields:d,clearValidate:f,scrollToField:w}),(_,S)=>(C(),M("form",{class:D(g(l))},[he(_.$slots,"default")],2))}});var RQ=ze(LQ,[["__file","form.vue"]]);function Ia(){return Ia=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},Ia.apply(this,arguments)}function DQ(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Rp(e,t)}function nb(e){return nb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nb(e)}function Rp(e,t){return Rp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},Rp(e,t)}function FQ(){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 Jm(e,t,n){return FQ()?Jm=Reflect.construct.bind():Jm=function(r,s,i){var l=[null];l.push.apply(l,s);var a=Function.bind.apply(r,l),u=new a;return i&&Rp(u,i.prototype),u},Jm.apply(null,arguments)}function VQ(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function ob(e){var t=typeof Map=="function"?new Map:void 0;return ob=function(o){if(o===null||!VQ(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 Jm(o,arguments,nb(this).constructor)}return r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Rp(r,o)},ob(e)}var BQ=/%[sdj%]/g,zQ=function(){};typeof process<"u"&&process.env;function rb(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var o=n.field;t[o]=t[o]||[],t[o].push(n)}),t}function dr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var r=0,s=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var i=e.replace(BQ,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 jQ(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function jn(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||jQ(t)&&typeof e=="string"&&!e)}function HQ(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 A5(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 UQ(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n]||[])}),t}var N5=function(e){DQ(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}(ob(Error));function WQ(e,t,n,o,r){if(t.first){var s=new Promise(function(f,p){var h=function(v){return o(v),v.length?p(new N5(v,rb(v))):f(r)},m=UQ(e);A5(m,n,h)});return s.catch(function(f){return f}),s}var i=t.firstFields===!0?Object.keys(e):t.firstFields||[],l=Object.keys(e),a=l.length,u=0,c=[],d=new Promise(function(f,p){var h=function(y){if(c.push.apply(c,y),u++,u===a)return o(c),c.length?p(new N5(c,rb(c))):f(r)};l.length||(o(c),f(r)),l.forEach(function(m){var y=e[m];i.indexOf(m)!==-1?A5(y,n,h):HQ(y,n,h)})});return d.catch(function(f){return f}),d}function KQ(e){return!!(e&&e.message!==void 0)}function qQ(e,t){for(var n=e,o=0;o<t.length;o++){if(n==null)return n;n=n[t[o]]}return n}function P5(e,t){return function(n){var o;return e.fullFields?o=qQ(t,e.fullFields):o=t[n.field||e.fullField],KQ(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 L5(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]=Ia({},e[n],o):e[n]=o}}return e}var WM=function(t,n,o,r,s,i){t.required&&(!o.hasOwnProperty(t.field)||jn(n,i||t.type))&&r.push(dr(s.messages.required,t.fullField))},GQ=function(t,n,o,r,s){(/^\s+$/.test(n)||n==="")&&r.push(dr(s.messages.whitespace,t.fullField))},cm,YQ=function(){if(cm)return cm;var e="[a-fA-F\\d:]",t=function(S){return S&&S.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=(`
41 + */const $h=typeof document<"u";function wO(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function lZ(t){return t.__esModule||t[Symbol.toStringTag]==="Module"||t.default&&wO(t.default)}const On=Object.assign;function bw(t,e){const n={};for(const i in e){const s=e[i];n[i]=Zr(s)?s.map(t):t(s)}return n}const Jm=()=>{},Zr=Array.isArray,kO=/#/g,cZ=/&/g,uZ=/\//g,dZ=/=/g,hZ=/\?/g,CO=/\+/g,fZ=/%5B/g,pZ=/%5D/g,xO=/%5E/g,mZ=/%60/g,SO=/%7B/g,gZ=/%7C/g,$O=/%7D/g,vZ=/%20/g;function c4(t){return encodeURI(""+t).replace(gZ,"|").replace(fZ,"[").replace(pZ,"]")}function _Z(t){return c4(t).replace(SO,"{").replace($O,"}").replace(xO,"^")}function zk(t){return c4(t).replace(CO,"%2B").replace(vZ,"+").replace(kO,"%23").replace(cZ,"%26").replace(mZ,"`").replace(SO,"{").replace($O,"}").replace(xO,"^")}function yZ(t){return zk(t).replace(dZ,"%3D")}function bZ(t){return c4(t).replace(kO,"%23").replace(hZ,"%3F")}function wZ(t){return t==null?"":bZ(t).replace(uZ,"%2F")}function Hg(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const kZ=/\/$/,CZ=t=>t.replace(kZ,"");function ww(t,e,n="/"){let i,s={},o="",r="";const a=e.indexOf("#");let l=e.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(i=e.slice(0,l),o=e.slice(l+1,a>-1?a:e.length),s=t(o)),a>-1&&(i=i||e.slice(0,a),r=e.slice(a,e.length)),i=AZ(i??e,n),{fullPath:i+(o&&"?")+o+r,path:i,query:s,hash:Hg(r)}}function xZ(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function S7(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function SZ(t,e,n){const i=e.matched.length-1,s=n.matched.length-1;return i>-1&&i===s&&If(e.matched[i],n.matched[s])&&AO(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function If(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function AO(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!$Z(t[n],e[n]))return!1;return!0}function $Z(t,e){return Zr(t)?$7(t,e):Zr(e)?$7(e,t):t===e}function $7(t,e){return Zr(e)?t.length===e.length&&t.every((n,i)=>n===e[i]):t.length===1&&t[0]===e}function AZ(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),i=t.split("/"),s=i[i.length-1];(s===".."||s===".")&&i.push("");let o=n.length-1,r,a;for(r=0;r<i.length;r++)if(a=i[r],a!==".")if(a==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+i.slice(r).join("/")}const zl={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ug;(function(t){t.pop="pop",t.push="push"})(Ug||(Ug={}));var Qm;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Qm||(Qm={}));function EZ(t){if(!t)if($h){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),CZ(t)}const MZ=/^[^#]+#/;function TZ(t,e){return t.replace(MZ,"#")+e}function PZ(t,e){const n=document.documentElement.getBoundingClientRect(),i=t.getBoundingClientRect();return{behavior:e.behavior,left:i.left-n.left-(e.left||0),top:i.top-n.top-(e.top||0)}}const Fb=()=>({left:window.scrollX,top:window.scrollY});function IZ(t){let e;if("el"in t){const n=t.el,i=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?i?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;e=PZ(s,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function A7(t,e){return(history.state?history.state.position-e:-1)+t}const Hk=new Map;function LZ(t,e){Hk.set(t,e)}function OZ(t){const e=Hk.get(t);return Hk.delete(t),e}let DZ=()=>location.protocol+"//"+location.host;function EO(t,e){const{pathname:n,search:i,hash:s}=e,o=t.indexOf("#");if(o>-1){let a=s.includes(t.slice(o))?t.slice(o).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),S7(l,"")}return S7(n,t)+i+s}function RZ(t,e,n,i){let s=[],o=[],r=null;const a=({state:h})=>{const f=EO(t,location),p=n.value,m=e.value;let b=0;if(h){if(n.value=f,e.value=h,r&&r===p){r=null;return}b=m?h.position-m.position:0}else i(f);s.forEach(w=>{w(n.value,p,{delta:b,type:Ug.pop,direction:b?b>0?Qm.forward:Qm.back:Qm.unknown})})};function l(){r=n.value}function c(h){s.push(h);const f=()=>{const p=s.indexOf(h);p>-1&&s.splice(p,1)};return o.push(f),f}function u(){const{history:h}=window;h.state&&h.replaceState(On({},h.state,{scroll:Fb()}),"")}function d(){for(const h of o)h();o=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function E7(t,e,n,i=!1,s=!1){return{back:t,current:e,forward:n,replaced:i,position:window.history.length,scroll:s?Fb():null}}function VZ(t){const{history:e,location:n}=window,i={value:EO(t,n)},s={value:e.state};s.value||o(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function o(l,c,u){const d=t.indexOf("#"),h=d>-1?(n.host&&document.querySelector("base")?t:t.slice(d))+l:DZ()+t+l;try{e[u?"replaceState":"pushState"](c,"",h),s.value=c}catch(f){console.error(f),n[u?"replace":"assign"](h)}}function r(l,c){const u=On({},e.state,E7(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});o(l,u,!0),i.value=l}function a(l,c){const u=On({},s.value,e.state,{forward:l,scroll:Fb()});o(u.current,u,!0);const d=On({},E7(i.value,l,null),{position:u.position+1},c);o(l,d,!1),i.value=l}return{location:i,state:s,push:a,replace:r}}function MO(t){t=EZ(t);const e=VZ(t),n=RZ(t,e.state,e.location,e.replace);function i(o,r=!0){r||n.pauseListeners(),history.go(o)}const s=On({location:"",base:t,go:i,createHref:TZ.bind(null,t)},e,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}function FZ(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),MO(t)}function NZ(t){return typeof t=="string"||t&&typeof t=="object"}function TO(t){return typeof t=="string"||typeof t=="symbol"}const PO=Symbol("");var M7;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(M7||(M7={}));function Lf(t,e){return On(new Error,{type:t,[PO]:!0},e)}function Wa(t,e){return t instanceof Error&&PO in t&&(e==null||!!(t.type&e))}const T7="[^/]+?",BZ={sensitive:!1,strict:!1,start:!0,end:!0},zZ=/[.+*?^${}()[\]/\\]/g;function HZ(t,e){const n=On({},BZ,e),i=[];let s=n.start?"^":"";const o=[];for(const c of t){const u=c.length?[]:[90];n.strict&&!c.length&&(s+="/");for(let d=0;d<c.length;d++){const h=c[d];let f=40+(n.sensitive?.25:0);if(h.type===0)d||(s+="/"),s+=h.value.replace(zZ,"\\$&"),f+=40;else if(h.type===1){const{value:p,repeatable:m,optional:b,regexp:w}=h;o.push({name:p,repeatable:m,optional:b});const k=w||T7;if(k!==T7){f+=10;try{new RegExp(`(${k})`)}catch(A){throw new Error(`Invalid custom RegExp for param "${p}" (${k}): `+A.message)}}let C=m?`((?:${k})(?:/(?:${k}))*)`:`(${k})`;d||(C=b&&c.length<2?`(?:/${C})`:"/"+C),b&&(C+="?"),s+=C,f+=20,b&&(f+=-8),m&&(f+=-20),k===".*"&&(f+=-50)}u.push(f)}i.push(u)}if(n.strict&&n.end){const c=i.length-1;i[c][i[c].length-1]+=.7000000000000001}n.strict||(s+="/?"),n.end?s+="$":n.strict&&(s+="(?:/|$)");const r=new RegExp(s,n.sensitive?"":"i");function a(c){const u=c.match(r),d={};if(!u)return null;for(let h=1;h<u.length;h++){const f=u[h]||"",p=o[h-1];d[p.name]=f&&p.repeatable?f.split("/"):f}return d}function l(c){let u="",d=!1;for(const h of t){(!d||!u.endsWith("/"))&&(u+="/"),d=!1;for(const f of h)if(f.type===0)u+=f.value;else if(f.type===1){const{value:p,repeatable:m,optional:b}=f,w=p in c?c[p]:"";if(Zr(w)&&!m)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const k=Zr(w)?w.join("/"):w;if(!k)if(b)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):d=!0);else throw new Error(`Missing required param "${p}"`);u+=k}}return u||"/"}return{re:r,score:i,keys:o,parse:a,stringify:l}}function UZ(t,e){let n=0;for(;n<t.length&&n<e.length;){const i=e[n]-t[n];if(i)return i;n++}return t.length<e.length?t.length===1&&t[0]===40+40?-1:1:t.length>e.length?e.length===1&&e[0]===40+40?1:-1:0}function IO(t,e){let n=0;const i=t.score,s=e.score;for(;n<i.length&&n<s.length;){const o=UZ(i[n],s[n]);if(o)return o;n++}if(Math.abs(s.length-i.length)===1){if(P7(i))return 1;if(P7(s))return-1}return s.length-i.length}function P7(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const jZ={type:0,value:""},WZ=/[a-zA-Z0-9_]/;function YZ(t){if(!t)return[[]];if(t==="/")return[[jZ]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(f){throw new Error(`ERR (${n})/"${c}": ${f}`)}let n=0,i=n;const s=[];let o;function r(){o&&s.push(o),o=[]}let a=0,l,c="",u="";function d(){c&&(n===0?o.push({type:0,value:c}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function h(){c+=l}for(;a<t.length;){if(l=t[a++],l==="\\"&&n!==2){i=n,n=4;continue}switch(n){case 0:l==="/"?(c&&d(),r()):l===":"?(d(),n=1):h();break;case 4:h(),n=i;break;case 1:l==="("?n=2:WZ.test(l)?h():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=3:u+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:e("Unknown state");break}}return n===2&&e(`Unfinished custom RegExp for param "${c}"`),d(),r(),s}function qZ(t,e,n){const i=HZ(YZ(t.path),n),s=On(i,{record:t,parent:e,children:[],alias:[]});return e&&!s.record.aliasOf==!e.record.aliasOf&&e.children.push(s),s}function GZ(t,e){const n=[],i=new Map;e=O7({strict:!1,end:!0,sensitive:!1},e);function s(d){return i.get(d)}function o(d,h,f){const p=!f,m=XZ(d);m.aliasOf=f&&f.record;const b=O7(e,d),w=[m];if("alias"in d){const A=typeof d.alias=="string"?[d.alias]:d.alias;for(const S of A)w.push(On({},m,{components:f?f.record.components:m.components,path:S,aliasOf:f?f.record:m}))}let k,C;for(const A of w){const{path:S}=A;if(h&&S[0]!=="/"){const M=h.record.path,P=M[M.length-1]==="/"?"":"/";A.path=h.record.path+(S&&P+S)}if(k=qZ(A,h,b),f?f.alias.push(k):(C=C||k,C!==k&&C.alias.push(k),p&&d.name&&!L7(k)&&r(d.name)),LO(k)&&l(k),m.children){const M=m.children;for(let P=0;P<M.length;P++)o(M[P],k,f&&f.children[P])}f=f||k}return C?()=>{r(C)}:Jm}function r(d){if(TO(d)){const h=i.get(d);h&&(i.delete(d),n.splice(n.indexOf(h),1),h.children.forEach(r),h.alias.forEach(r))}else{const h=n.indexOf(d);h>-1&&(n.splice(h,1),d.record.name&&i.delete(d.record.name),d.children.forEach(r),d.alias.forEach(r))}}function a(){return n}function l(d){const h=JZ(d,n);n.splice(h,0,d),d.record.name&&!L7(d)&&i.set(d.record.name,d)}function c(d,h){let f,p={},m,b;if("name"in d&&d.name){if(f=i.get(d.name),!f)throw Lf(1,{location:d});b=f.record.name,p=On(I7(h.params,f.keys.filter(C=>!C.optional).concat(f.parent?f.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),d.params&&I7(d.params,f.keys.map(C=>C.name))),m=f.stringify(p)}else if(d.path!=null)m=d.path,f=n.find(C=>C.re.test(m)),f&&(p=f.parse(m),b=f.record.name);else{if(f=h.name?i.get(h.name):n.find(C=>C.re.test(h.path)),!f)throw Lf(1,{location:d,currentLocation:h});b=f.record.name,p=On({},h.params,d.params),m=f.stringify(p)}const w=[];let k=f;for(;k;)w.unshift(k.record),k=k.parent;return{name:b,path:m,params:p,matched:w,meta:ZZ(w)}}t.forEach(d=>o(d));function u(){n.length=0,i.clear()}return{addRoute:o,resolve:c,removeRoute:r,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function I7(t,e){const n={};for(const i of e)i in t&&(n[i]=t[i]);return n}function XZ(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:KZ(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},mods:{},components:"components"in t?t.components||null:t.component&&{default:t.component}}}function KZ(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const i in t.components)e[i]=typeof n=="object"?n[i]:n;return e}function L7(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function ZZ(t){return t.reduce((e,n)=>On(e,n.meta),{})}function O7(t,e){const n={};for(const i in t)n[i]=i in e?e[i]:t[i];return n}function JZ(t,e){let n=0,i=e.length;for(;n!==i;){const o=n+i>>1;IO(t,e[o])<0?i=o:n=o+1}const s=QZ(t);return s&&(i=e.lastIndexOf(s,i-1)),i}function QZ(t){let e=t;for(;e=e.parent;)if(LO(e)&&IO(t,e)===0)return e}function LO({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function eJ(t){const e={};if(t===""||t==="?")return e;const i=(t[0]==="?"?t.slice(1):t).split("&");for(let s=0;s<i.length;++s){const o=i[s].replace(CO," "),r=o.indexOf("="),a=Hg(r<0?o:o.slice(0,r)),l=r<0?null:Hg(o.slice(r+1));if(a in e){let c=e[a];Zr(c)||(c=e[a]=[c]),c.push(l)}else e[a]=l}return e}function D7(t){let e="";for(let n in t){const i=t[n];if(n=yZ(n),i==null){i!==void 0&&(e+=(e.length?"&":"")+n);continue}(Zr(i)?i.map(o=>o&&zk(o)):[i&&zk(i)]).forEach(o=>{o!==void 0&&(e+=(e.length?"&":"")+n,o!=null&&(e+="="+o))})}return e}function tJ(t){const e={};for(const n in t){const i=t[n];i!==void 0&&(e[n]=Zr(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return e}const nJ=Symbol(""),R7=Symbol(""),u4=Symbol(""),OO=Symbol(""),Uk=Symbol("");function Gp(){let t=[];function e(i){return t.push(i),()=>{const s=t.indexOf(i);s>-1&&t.splice(s,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function dc(t,e,n,i,s,o=r=>r()){const r=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(Lf(4,{from:n,to:e})):h instanceof Error?l(h):NZ(h)?l(Lf(2,{from:e,to:h})):(r&&i.enterCallbacks[s]===r&&typeof h=="function"&&r.push(h),a())},u=o(()=>t.call(i&&i.instances[s],e,n,c));let d=Promise.resolve(u);t.length<3&&(d=d.then(c)),d.catch(h=>l(h))})}function kw(t,e,n,i,s=o=>o()){const o=[];for(const r of t)for(const a in r.components){let l=r.components[a];if(!(e!=="beforeRouteEnter"&&!r.instances[a]))if(wO(l)){const u=(l.__vccOpts||l)[e];u&&o.push(dc(u,n,i,r,a,s))}else{let c=l();o.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${r.path}"`);const d=lZ(u)?u.default:u;r.mods[a]=u,r.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&dc(f,n,i,r,a,s)()}))}}return o}function V7(t){const e=qe(u4),n=qe(OO),i=W(()=>{const l=E(t.to);return e.resolve(l)}),s=W(()=>{const{matched:l}=i.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const h=d.findIndex(If.bind(null,u));if(h>-1)return h;const f=F7(l[c-2]);return c>1&&F7(u)===f&&d[d.length-1].path!==f?d.findIndex(If.bind(null,l[c-2])):h}),o=W(()=>s.value>-1&&rJ(n.params,i.value.params)),r=W(()=>s.value>-1&&s.value===n.matched.length-1&&AO(n.params,i.value.params));function a(l={}){return oJ(l)?e[E(t.replace)?"replace":"push"](E(t.to)).catch(Jm):Promise.resolve()}return{route:i,href:W(()=>i.value.href),isActive:o,isExactActive:r,navigate:a}}const sJ=fe({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:V7,setup(t,{slots:e}){const n=In(V7(t)),{options:i}=qe(u4),s=W(()=>({[N7(t.activeClass,i.linkActiveClass,"router-link-active")]:n.isActive,[N7(t.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=e.default&&e.default(n);return t.custom?o:bt("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),iJ=sJ;function oJ(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function rJ(t,e){for(const n in e){const i=e[n],s=t[n];if(typeof i=="string"){if(i!==s)return!1}else if(!Zr(s)||s.length!==i.length||i.some((o,r)=>o!==s[r]))return!1}return!0}function F7(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const N7=(t,e,n)=>t??e??n,aJ=fe({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const i=qe(Uk),s=W(()=>t.route||i.value),o=qe(R7,0),r=W(()=>{let c=E(o);const{matched:u}=s.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=W(()=>s.value.matched[r.value]);Pt(R7,W(()=>r.value+1)),Pt(nJ,a),Pt(Uk,s);const l=ee();return Te(()=>[l.value,a.value,t.name],([c,u,d],[h,f,p])=>{u&&(u.instances[d]=c,f&&f!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=f.leaveGuards),u.updateGuards.size||(u.updateGuards=f.updateGuards))),c&&u&&(!f||!If(u,f)||!h)&&(u.enterCallbacks[d]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=s.value,u=t.name,d=a.value,h=d&&d.components[u];if(!h)return B7(n.default,{Component:h,route:c});const f=d.props[u],p=f?f===!0?c.params:typeof f=="function"?f(c):f:null,b=bt(h,On({},p,e,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return B7(n.default,{Component:b,route:c})||b}}});function B7(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const lJ=aJ;function z7(t){const e=GZ(t.routes,t),n=t.parseQuery||eJ,i=t.stringifyQuery||D7,s=t.history,o=Gp(),r=Gp(),a=Gp(),l=Fn(zl);let c=zl;$h&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=bw.bind(null,oe=>""+oe),d=bw.bind(null,wZ),h=bw.bind(null,Hg);function f(oe,pe){let ie,re;return TO(oe)?(ie=e.getRecordMatcher(oe),re=pe):re=oe,e.addRoute(re,ie)}function p(oe){const pe=e.getRecordMatcher(oe);pe&&e.removeRoute(pe)}function m(){return e.getRoutes().map(oe=>oe.record)}function b(oe){return!!e.getRecordMatcher(oe)}function w(oe,pe){if(pe=On({},pe||l.value),typeof oe=="string"){const se=ww(n,oe,pe.path),me=e.resolve({path:se.path},pe),$e=s.createHref(se.fullPath);return On(se,me,{params:h(me.params),hash:Hg(se.hash),redirectedFrom:void 0,href:$e})}let ie;if(oe.path!=null)ie=On({},oe,{path:ww(n,oe.path,pe.path).path});else{const se=On({},oe.params);for(const me in se)se[me]==null&&delete se[me];ie=On({},oe,{params:d(se)}),pe.params=d(pe.params)}const re=e.resolve(ie,pe),ke=oe.hash||"";re.params=u(h(re.params));const je=xZ(i,On({},oe,{hash:_Z(ke),path:re.path})),te=s.createHref(je);return On({fullPath:je,hash:ke,query:i===D7?tJ(oe.query):oe.query||{}},re,{redirectedFrom:void 0,href:te})}function k(oe){return typeof oe=="string"?ww(n,oe,l.value.path):On({},oe)}function C(oe,pe){if(c!==oe)return Lf(8,{from:pe,to:oe})}function A(oe){return P(oe)}function S(oe){return A(On(k(oe),{replace:!0}))}function M(oe){const pe=oe.matched[oe.matched.length-1];if(pe&&pe.redirect){const{redirect:ie}=pe;let re=typeof ie=="function"?ie(oe):ie;return typeof re=="string"&&(re=re.includes("?")||re.includes("#")?re=k(re):{path:re},re.params={}),On({query:oe.query,hash:oe.hash,params:re.path!=null?{}:oe.params},re)}}function P(oe,pe){const ie=c=w(oe),re=l.value,ke=oe.state,je=oe.force,te=oe.replace===!0,se=M(ie);if(se)return P(On(k(se),{state:typeof se=="object"?On({},ke,se.state):ke,force:je,replace:te}),pe||ie);const me=ie;me.redirectedFrom=pe;let $e;return!je&&SZ(i,re,ie)&&($e=Lf(16,{to:me,from:re}),Q(re,re,!0,!1)),($e?Promise.resolve($e):L(me,re)).catch(Se=>Wa(Se)?Wa(Se,2)?Se:G(Se):X(Se,me,re)).then(Se=>{if(Se){if(Wa(Se,2))return P(On({replace:te},k(Se.to),{state:typeof Se.to=="object"?On({},ke,Se.to.state):ke,force:je}),pe||me)}else Se=V(me,re,!0,te,ke);return R(me,re,Se),Se})}function T(oe,pe){const ie=C(oe,pe);return ie?Promise.reject(ie):Promise.resolve()}function I(oe){const pe=ae.values().next().value;return pe&&typeof pe.runWithContext=="function"?pe.runWithContext(oe):oe()}function L(oe,pe){let ie;const[re,ke,je]=cJ(oe,pe);ie=kw(re.reverse(),"beforeRouteLeave",oe,pe);for(const se of re)se.leaveGuards.forEach(me=>{ie.push(dc(me,oe,pe))});const te=T.bind(null,oe,pe);return ie.push(te),Ce(ie).then(()=>{ie=[];for(const se of o.list())ie.push(dc(se,oe,pe));return ie.push(te),Ce(ie)}).then(()=>{ie=kw(ke,"beforeRouteUpdate",oe,pe);for(const se of ke)se.updateGuards.forEach(me=>{ie.push(dc(me,oe,pe))});return ie.push(te),Ce(ie)}).then(()=>{ie=[];for(const se of je)if(se.beforeEnter)if(Zr(se.beforeEnter))for(const me of se.beforeEnter)ie.push(dc(me,oe,pe));else ie.push(dc(se.beforeEnter,oe,pe));return ie.push(te),Ce(ie)}).then(()=>(oe.matched.forEach(se=>se.enterCallbacks={}),ie=kw(je,"beforeRouteEnter",oe,pe,I),ie.push(te),Ce(ie))).then(()=>{ie=[];for(const se of r.list())ie.push(dc(se,oe,pe));return ie.push(te),Ce(ie)}).catch(se=>Wa(se,8)?se:Promise.reject(se))}function R(oe,pe,ie){a.list().forEach(re=>I(()=>re(oe,pe,ie)))}function V(oe,pe,ie,re,ke){const je=C(oe,pe);if(je)return je;const te=pe===zl,se=$h?history.state:{};ie&&(re||te?s.replace(oe.fullPath,On({scroll:te&&se&&se.scroll},ke)):s.push(oe.fullPath,ke)),l.value=oe,Q(oe,pe,ie,te),G()}let H;function F(){H||(H=s.listen((oe,pe,ie)=>{if(!ge.listening)return;const re=w(oe),ke=M(re);if(ke){P(On(ke,{replace:!0}),re).catch(Jm);return}c=re;const je=l.value;$h&&LZ(A7(je.fullPath,ie.delta),Fb()),L(re,je).catch(te=>Wa(te,12)?te:Wa(te,2)?(P(te.to,re).then(se=>{Wa(se,20)&&!ie.delta&&ie.type===Ug.pop&&s.go(-1,!1)}).catch(Jm),Promise.reject()):(ie.delta&&s.go(-ie.delta,!1),X(te,re,je))).then(te=>{te=te||V(re,je,!1),te&&(ie.delta&&!Wa(te,8)?s.go(-ie.delta,!1):ie.type===Ug.pop&&Wa(te,20)&&s.go(-1,!1)),R(re,je,te)}).catch(Jm)}))}let U=Gp(),Y=Gp(),z;function X(oe,pe,ie){G(oe);const re=Y.list();return re.length?re.forEach(ke=>ke(oe,pe,ie)):console.error(oe),Promise.reject(oe)}function Z(){return z&&l.value!==zl?Promise.resolve():new Promise((oe,pe)=>{U.add([oe,pe])})}function G(oe){return z||(z=!oe,F(),U.list().forEach(([pe,ie])=>oe?ie(oe):pe()),U.reset()),oe}function Q(oe,pe,ie,re){const{scrollBehavior:ke}=t;if(!$h||!ke)return Promise.resolve();const je=!ie&&OZ(A7(oe.fullPath,0))||(re||!ie)&&history.state&&history.state.scroll||null;return ot().then(()=>ke(oe,pe,je)).then(te=>te&&IZ(te)).catch(te=>X(te,oe,pe))}const ne=oe=>s.go(oe);let K;const ae=new Set,ge={currentRoute:l,listening:!0,addRoute:f,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:b,getRoutes:m,resolve:w,options:t,push:A,replace:S,go:ne,back:()=>ne(-1),forward:()=>ne(1),beforeEach:o.add,beforeResolve:r.add,afterEach:a.add,onError:Y.add,isReady:Z,install(oe){const pe=this;oe.component("RouterLink",iJ),oe.component("RouterView",lJ),oe.config.globalProperties.$router=pe,Object.defineProperty(oe.config.globalProperties,"$route",{enumerable:!0,get:()=>E(l)}),$h&&!K&&l.value===zl&&(K=!0,A(s.location).catch(ke=>{}));const ie={};for(const ke in zl)Object.defineProperty(ie,ke,{get:()=>l.value[ke],enumerable:!0});oe.provide(u4,pe),oe.provide(OO,$6(ie)),oe.provide(Uk,l);const re=oe.unmount;ae.add(oe),oe.unmount=function(){ae.delete(oe),ae.size<1&&(c=zl,H&&H(),H=null,l.value=zl,K=!1,z=!1),re()}}};function Ce(oe){return oe.reduce((pe,ie)=>pe.then(()=>I(ie)),Promise.resolve())}return ge}function cJ(t,e){const n=[],i=[],s=[],o=Math.max(e.matched.length,t.matched.length);for(let r=0;r<o;r++){const a=e.matched[r];a&&(t.matched.find(c=>If(c,a))?i.push(a):n.push(a));const l=t.matched[r];l&&(e.matched.find(c=>If(c,l))||s.push(l))}return[n,i,s]}const Ue={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"},uJ=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],Mt="update:modelValue",dn="change",Vo="input",$l=["","default","small","large"],d4=11,dJ=2;var hJ=typeof global=="object"&&global&&global.Object===Object&&global;const DO=hJ;var fJ=typeof self=="object"&&self&&self.Object===Object&&self,pJ=DO||fJ||Function("return this")();const sa=pJ;var mJ=sa.Symbol;const yr=mJ;var RO=Object.prototype,gJ=RO.hasOwnProperty,vJ=RO.toString,Xp=yr?yr.toStringTag:void 0;function _J(t){var e=gJ.call(t,Xp),n=t[Xp];try{t[Xp]=void 0;var i=!0}catch{}var s=vJ.call(t);return i&&(e?t[Xp]=n:delete t[Xp]),s}var yJ=Object.prototype,bJ=yJ.toString;function wJ(t){return bJ.call(t)}var kJ="[object Null]",CJ="[object Undefined]",H7=yr?yr.toStringTag:void 0;function Vd(t){return t==null?t===void 0?CJ:kJ:H7&&H7 in Object(t)?_J(t):wJ(t)}function Ta(t){return t!=null&&typeof t=="object"}var xJ="[object Symbol]";function Nb(t){return typeof t=="symbol"||Ta(t)&&Vd(t)==xJ}function h4(t,e){for(var n=-1,i=t==null?0:t.length,s=Array(i);++n<i;)s[n]=e(t[n],n,t);return s}var SJ=Array.isArray;const Yi=SJ;var $J=1/0,U7=yr?yr.prototype:void 0,j7=U7?U7.toString:void 0;function VO(t){if(typeof t=="string")return t;if(Yi(t))return h4(t,VO)+"";if(Nb(t))return j7?j7.call(t):"";var e=t+"";return e=="0"&&1/t==-$J?"-0":e}var AJ=/\s/;function EJ(t){for(var e=t.length;e--&&AJ.test(t.charAt(e)););return e}var MJ=/^\s+/;function TJ(t){return t&&t.slice(0,EJ(t)+1).replace(MJ,"")}function qi(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var W7=0/0,PJ=/^[-+]0x[0-9a-f]+$/i,IJ=/^0b[01]+$/i,LJ=/^0o[0-7]+$/i,OJ=parseInt;function rf(t){if(typeof t=="number")return t;if(Nb(t))return W7;if(qi(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=qi(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=TJ(t);var n=IJ.test(t);return n||LJ.test(t)?OJ(t.slice(2),n?2:8):PJ.test(t)?W7:+t}var Y7=1/0,DJ=17976931348623157e292;function RJ(t){if(!t)return t===0?t:0;if(t=rf(t),t===Y7||t===-Y7){var e=t<0?-1:1;return e*DJ}return t===t?t:0}function VJ(t){var e=RJ(t),n=e%1;return e===e?n?e-n:e:0}function f4(t){return t}var FJ="[object AsyncFunction]",NJ="[object Function]",BJ="[object GeneratorFunction]",zJ="[object Proxy]";function p4(t){if(!qi(t))return!1;var e=Vd(t);return e==NJ||e==BJ||e==FJ||e==zJ}var HJ=sa["__core-js_shared__"];const Cw=HJ;var q7=function(){var t=/[^.]+$/.exec(Cw&&Cw.keys&&Cw.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function UJ(t){return!!q7&&q7 in t}var jJ=Function.prototype,WJ=jJ.toString;function Fd(t){if(t!=null){try{return WJ.call(t)}catch{}try{return t+""}catch{}}return""}var YJ=/[\\^$.*+?()[\]{}|]/g,qJ=/^\[object .+?Constructor\]$/,GJ=Function.prototype,XJ=Object.prototype,KJ=GJ.toString,ZJ=XJ.hasOwnProperty,JJ=RegExp("^"+KJ.call(ZJ).replace(YJ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function QJ(t){if(!qi(t)||UJ(t))return!1;var e=p4(t)?JJ:qJ;return e.test(Fd(t))}function eQ(t,e){return t==null?void 0:t[e]}function Nd(t,e){var n=eQ(t,e);return QJ(n)?n:void 0}var tQ=Nd(sa,"WeakMap");const jk=tQ;var G7=Object.create,nQ=function(){function t(){}return function(e){if(!qi(e))return{};if(G7)return G7(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();const sQ=nQ;function iQ(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function FO(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}var oQ=800,rQ=16,aQ=Date.now;function lQ(t){var e=0,n=0;return function(){var i=aQ(),s=rQ-(i-n);if(n=i,s>0){if(++e>=oQ)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function cQ(t){return function(){return t}}var uQ=function(){try{var t=Nd(Object,"defineProperty");return t({},"",{}),t}catch{}}();const m0=uQ;var dQ=m0?function(t,e){return m0(t,"toString",{configurable:!0,enumerable:!1,value:cQ(e),writable:!0})}:f4;const hQ=dQ;var fQ=lQ(hQ);const NO=fQ;function pQ(t,e){for(var n=-1,i=t==null?0:t.length;++n<i&&e(t[n],n,t)!==!1;);return t}function mQ(t,e,n,i){for(var s=t.length,o=n+(i?1:-1);i?o--:++o<s;)if(e(t[o],o,t))return o;return-1}var gQ=9007199254740991,vQ=/^(?:0|[1-9]\d*)$/;function Bb(t,e){var n=typeof t;return e=e??gQ,!!e&&(n=="number"||n!="symbol"&&vQ.test(t))&&t>-1&&t%1==0&&t<e}function m4(t,e,n){e=="__proto__"&&m0?m0(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function R1(t,e){return t===e||t!==t&&e!==e}var _Q=Object.prototype,yQ=_Q.hasOwnProperty;function g4(t,e,n){var i=t[e];(!(yQ.call(t,e)&&R1(i,n))||n===void 0&&!(e in t))&&m4(t,e,n)}function lp(t,e,n,i){var s=!n;n||(n={});for(var o=-1,r=e.length;++o<r;){var a=e[o],l=i?i(n[a],t[a],a,n,t):void 0;l===void 0&&(l=t[a]),s?m4(n,a,l):g4(n,a,l)}return n}var X7=Math.max;function BO(t,e,n){return e=X7(e===void 0?t.length-1:e,0),function(){for(var i=arguments,s=-1,o=X7(i.length-e,0),r=Array(o);++s<o;)r[s]=i[e+s];s=-1;for(var a=Array(e+1);++s<e;)a[s]=i[s];return a[e]=n(r),iQ(t,this,a)}}function bQ(t,e){return NO(BO(t,e,f4),t+"")}var wQ=9007199254740991;function v4(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=wQ}function cp(t){return t!=null&&v4(t.length)&&!p4(t)}function kQ(t,e,n){if(!qi(n))return!1;var i=typeof e;return(i=="number"?cp(n)&&Bb(e,n.length):i=="string"&&e in n)?R1(n[e],t):!1}function CQ(t){return bQ(function(e,n){var i=-1,s=n.length,o=s>1?n[s-1]:void 0,r=s>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(s--,o):void 0,r&&kQ(n[0],n[1],r)&&(o=s<3?void 0:o,s=1),e=Object(e);++i<s;){var a=n[i];a&&t(e,a,i,o)}return e})}var xQ=Object.prototype;function _4(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||xQ;return t===n}function SQ(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}var $Q="[object Arguments]";function K7(t){return Ta(t)&&Vd(t)==$Q}var zO=Object.prototype,AQ=zO.hasOwnProperty,EQ=zO.propertyIsEnumerable,MQ=K7(function(){return arguments}())?K7:function(t){return Ta(t)&&AQ.call(t,"callee")&&!EQ.call(t,"callee")};const jg=MQ;function TQ(){return!1}var HO=typeof Do=="object"&&Do&&!Do.nodeType&&Do,Z7=HO&&typeof Ro=="object"&&Ro&&!Ro.nodeType&&Ro,PQ=Z7&&Z7.exports===HO,J7=PQ?sa.Buffer:void 0,IQ=J7?J7.isBuffer:void 0,LQ=IQ||TQ;const Wg=LQ;var OQ="[object Arguments]",DQ="[object Array]",RQ="[object Boolean]",VQ="[object Date]",FQ="[object Error]",NQ="[object Function]",BQ="[object Map]",zQ="[object Number]",HQ="[object Object]",UQ="[object RegExp]",jQ="[object Set]",WQ="[object String]",YQ="[object WeakMap]",qQ="[object ArrayBuffer]",GQ="[object DataView]",XQ="[object Float32Array]",KQ="[object Float64Array]",ZQ="[object Int8Array]",JQ="[object Int16Array]",QQ="[object Int32Array]",eee="[object Uint8Array]",tee="[object Uint8ClampedArray]",nee="[object Uint16Array]",see="[object Uint32Array]",es={};es[XQ]=es[KQ]=es[ZQ]=es[JQ]=es[QQ]=es[eee]=es[tee]=es[nee]=es[see]=!0;es[OQ]=es[DQ]=es[qQ]=es[RQ]=es[GQ]=es[VQ]=es[FQ]=es[NQ]=es[BQ]=es[zQ]=es[HQ]=es[UQ]=es[jQ]=es[WQ]=es[YQ]=!1;function iee(t){return Ta(t)&&v4(t.length)&&!!es[Vd(t)]}function y4(t){return function(e){return t(e)}}var UO=typeof Do=="object"&&Do&&!Do.nodeType&&Do,eg=UO&&typeof Ro=="object"&&Ro&&!Ro.nodeType&&Ro,oee=eg&&eg.exports===UO,xw=oee&&DO.process,ree=function(){try{var t=eg&&eg.require&&eg.require("util").types;return t||xw&&xw.binding&&xw.binding("util")}catch{}}();const Of=ree;var Q7=Of&&Of.isTypedArray,aee=Q7?y4(Q7):iee;const b4=aee;var lee=Object.prototype,cee=lee.hasOwnProperty;function jO(t,e){var n=Yi(t),i=!n&&jg(t),s=!n&&!i&&Wg(t),o=!n&&!i&&!s&&b4(t),r=n||i||s||o,a=r?SQ(t.length,String):[],l=a.length;for(var c in t)(e||cee.call(t,c))&&!(r&&(c=="length"||s&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Bb(c,l)))&&a.push(c);return a}function WO(t,e){return function(n){return t(e(n))}}var uee=WO(Object.keys,Object);const dee=uee;var hee=Object.prototype,fee=hee.hasOwnProperty;function pee(t){if(!_4(t))return dee(t);var e=[];for(var n in Object(t))fee.call(t,n)&&n!="constructor"&&e.push(n);return e}function V1(t){return cp(t)?jO(t):pee(t)}function mee(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var gee=Object.prototype,vee=gee.hasOwnProperty;function _ee(t){if(!qi(t))return mee(t);var e=_4(t),n=[];for(var i in t)i=="constructor"&&(e||!vee.call(t,i))||n.push(i);return n}function F1(t){return cp(t)?jO(t,!0):_ee(t)}var yee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bee=/^\w*$/;function w4(t,e){if(Yi(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Nb(t)?!0:bee.test(t)||!yee.test(t)||e!=null&&t in Object(e)}var wee=Nd(Object,"create");const Yg=wee;function kee(){this.__data__=Yg?Yg(null):{},this.size=0}function Cee(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var xee="__lodash_hash_undefined__",See=Object.prototype,$ee=See.hasOwnProperty;function Aee(t){var e=this.__data__;if(Yg){var n=e[t];return n===xee?void 0:n}return $ee.call(e,t)?e[t]:void 0}var Eee=Object.prototype,Mee=Eee.hasOwnProperty;function Tee(t){var e=this.__data__;return Yg?e[t]!==void 0:Mee.call(e,t)}var Pee="__lodash_hash_undefined__";function Iee(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Yg&&e===void 0?Pee:e,this}function _d(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}_d.prototype.clear=kee;_d.prototype.delete=Cee;_d.prototype.get=Aee;_d.prototype.has=Tee;_d.prototype.set=Iee;function Lee(){this.__data__=[],this.size=0}function zb(t,e){for(var n=t.length;n--;)if(R1(t[n][0],e))return n;return-1}var Oee=Array.prototype,Dee=Oee.splice;function Ree(t){var e=this.__data__,n=zb(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():Dee.call(e,n,1),--this.size,!0}function Vee(t){var e=this.__data__,n=zb(e,t);return n<0?void 0:e[n][1]}function Fee(t){return zb(this.__data__,t)>-1}function Nee(t,e){var n=this.__data__,i=zb(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}function Al(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}Al.prototype.clear=Lee;Al.prototype.delete=Ree;Al.prototype.get=Vee;Al.prototype.has=Fee;Al.prototype.set=Nee;var Bee=Nd(sa,"Map");const qg=Bee;function zee(){this.size=0,this.__data__={hash:new _d,map:new(qg||Al),string:new _d}}function Hee(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Hb(t,e){var n=t.__data__;return Hee(e)?n[typeof e=="string"?"string":"hash"]:n.map}function Uee(t){var e=Hb(this,t).delete(t);return this.size-=e?1:0,e}function jee(t){return Hb(this,t).get(t)}function Wee(t){return Hb(this,t).has(t)}function Yee(t,e){var n=Hb(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}function El(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}El.prototype.clear=zee;El.prototype.delete=Uee;El.prototype.get=jee;El.prototype.has=Wee;El.prototype.set=Yee;var qee="Expected a function";function k4(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(qee);var n=function(){var i=arguments,s=e?e.apply(this,i):i[0],o=n.cache;if(o.has(s))return o.get(s);var r=t.apply(this,i);return n.cache=o.set(s,r)||o,r};return n.cache=new(k4.Cache||El),n}k4.Cache=El;var Gee=500;function Xee(t){var e=k4(t,function(i){return n.size===Gee&&n.clear(),i}),n=e.cache;return e}var Kee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zee=/\\(\\)?/g,Jee=Xee(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Kee,function(n,i,s,o){e.push(s?o.replace(Zee,"$1"):i||n)}),e});const Qee=Jee;function ete(t){return t==null?"":VO(t)}function up(t,e){return Yi(t)?t:w4(t,e)?[t]:Qee(ete(t))}var tte=1/0;function dp(t){if(typeof t=="string"||Nb(t))return t;var e=t+"";return e=="0"&&1/t==-tte?"-0":e}function Ub(t,e){e=up(e,t);for(var n=0,i=e.length;t!=null&&n<i;)t=t[dp(e[n++])];return n&&n==i?t:void 0}function ji(t,e,n){var i=t==null?void 0:Ub(t,e);return i===void 0?n:i}function C4(t,e){for(var n=-1,i=e.length,s=t.length;++n<i;)t[s+n]=e[n];return t}var e$=yr?yr.isConcatSpreadable:void 0;function nte(t){return Yi(t)||jg(t)||!!(e$&&t&&t[e$])}function x4(t,e,n,i,s){var o=-1,r=t.length;for(n||(n=nte),s||(s=[]);++o<r;){var a=t[o];e>0&&n(a)?e>1?x4(a,e-1,n,i,s):C4(s,a):i||(s[s.length]=a)}return s}function g0(t){var e=t==null?0:t.length;return e?x4(t,1):[]}function YO(t){return NO(BO(t,void 0,g0),t+"")}var ste=WO(Object.getPrototypeOf,Object);const S4=ste;var ite="[object Object]",ote=Function.prototype,rte=Object.prototype,qO=ote.toString,ate=rte.hasOwnProperty,lte=qO.call(Object);function $4(t){if(!Ta(t)||Vd(t)!=ite)return!1;var e=S4(t);if(e===null)return!0;var n=ate.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&qO.call(n)==lte}function cte(t,e,n){var i=-1,s=t.length;e<0&&(e=-e>s?0:s+e),n=n>s?s:n,n<0&&(n+=s),s=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(s);++i<s;)o[i]=t[i+e];return o}function js(){if(!arguments.length)return[];var t=arguments[0];return Yi(t)?t:[t]}function ute(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function GO(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=rf(n),n=n===n?n:0),e!==void 0&&(e=rf(e),e=e===e?e:0),ute(rf(t),e,n)}function dte(){this.__data__=new Al,this.size=0}function hte(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function fte(t){return this.__data__.get(t)}function pte(t){return this.__data__.has(t)}var mte=200;function gte(t,e){var n=this.__data__;if(n instanceof Al){var i=n.__data__;if(!qg||i.length<mte-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new El(i)}return n.set(t,e),this.size=n.size,this}function Hr(t){var e=this.__data__=new Al(t);this.size=e.size}Hr.prototype.clear=dte;Hr.prototype.delete=hte;Hr.prototype.get=fte;Hr.prototype.has=pte;Hr.prototype.set=gte;function vte(t,e){return t&&lp(e,V1(e),t)}function _te(t,e){return t&&lp(e,F1(e),t)}var XO=typeof Do=="object"&&Do&&!Do.nodeType&&Do,t$=XO&&typeof Ro=="object"&&Ro&&!Ro.nodeType&&Ro,yte=t$&&t$.exports===XO,n$=yte?sa.Buffer:void 0,s$=n$?n$.allocUnsafe:void 0;function KO(t,e){if(e)return t.slice();var n=t.length,i=s$?s$(n):new t.constructor(n);return t.copy(i),i}function bte(t,e){for(var n=-1,i=t==null?0:t.length,s=0,o=[];++n<i;){var r=t[n];e(r,n,t)&&(o[s++]=r)}return o}function ZO(){return[]}var wte=Object.prototype,kte=wte.propertyIsEnumerable,i$=Object.getOwnPropertySymbols,Cte=i$?function(t){return t==null?[]:(t=Object(t),bte(i$(t),function(e){return kte.call(t,e)}))}:ZO;const A4=Cte;function xte(t,e){return lp(t,A4(t),e)}var Ste=Object.getOwnPropertySymbols,$te=Ste?function(t){for(var e=[];t;)C4(e,A4(t)),t=S4(t);return e}:ZO;const JO=$te;function Ate(t,e){return lp(t,JO(t),e)}function QO(t,e,n){var i=e(t);return Yi(t)?i:C4(i,n(t))}function Wk(t){return QO(t,V1,A4)}function eD(t){return QO(t,F1,JO)}var Ete=Nd(sa,"DataView");const Yk=Ete;var Mte=Nd(sa,"Promise");const qk=Mte;var Tte=Nd(sa,"Set");const Gk=Tte;var o$="[object Map]",Pte="[object Object]",r$="[object Promise]",a$="[object Set]",l$="[object WeakMap]",c$="[object DataView]",Ite=Fd(Yk),Lte=Fd(qg),Ote=Fd(qk),Dte=Fd(Gk),Rte=Fd(jk),ku=Vd;(Yk&&ku(new Yk(new ArrayBuffer(1)))!=c$||qg&&ku(new qg)!=o$||qk&&ku(qk.resolve())!=r$||Gk&&ku(new Gk)!=a$||jk&&ku(new jk)!=l$)&&(ku=function(t){var e=Vd(t),n=e==Pte?t.constructor:void 0,i=n?Fd(n):"";if(i)switch(i){case Ite:return c$;case Lte:return o$;case Ote:return r$;case Dte:return a$;case Rte:return l$}return e});const Gg=ku;var Vte=Object.prototype,Fte=Vte.hasOwnProperty;function Nte(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&Fte.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var Bte=sa.Uint8Array;const v0=Bte;function E4(t){var e=new t.constructor(t.byteLength);return new v0(e).set(new v0(t)),e}function zte(t,e){var n=e?E4(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var Hte=/\w*$/;function Ute(t){var e=new t.constructor(t.source,Hte.exec(t));return e.lastIndex=t.lastIndex,e}var u$=yr?yr.prototype:void 0,d$=u$?u$.valueOf:void 0;function jte(t){return d$?Object(d$.call(t)):{}}function tD(t,e){var n=e?E4(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var Wte="[object Boolean]",Yte="[object Date]",qte="[object Map]",Gte="[object Number]",Xte="[object RegExp]",Kte="[object Set]",Zte="[object String]",Jte="[object Symbol]",Qte="[object ArrayBuffer]",ene="[object DataView]",tne="[object Float32Array]",nne="[object Float64Array]",sne="[object Int8Array]",ine="[object Int16Array]",one="[object Int32Array]",rne="[object Uint8Array]",ane="[object Uint8ClampedArray]",lne="[object Uint16Array]",cne="[object Uint32Array]";function une(t,e,n){var i=t.constructor;switch(e){case Qte:return E4(t);case Wte:case Yte:return new i(+t);case ene:return zte(t,n);case tne:case nne:case sne:case ine:case one:case rne:case ane:case lne:case cne:return tD(t,n);case qte:return new i;case Gte:case Zte:return new i(t);case Xte:return Ute(t);case Kte:return new i;case Jte:return jte(t)}}function nD(t){return typeof t.constructor=="function"&&!_4(t)?sQ(S4(t)):{}}var dne="[object Map]";function hne(t){return Ta(t)&&Gg(t)==dne}var h$=Of&&Of.isMap,fne=h$?y4(h$):hne;const pne=fne;var mne="[object Set]";function gne(t){return Ta(t)&&Gg(t)==mne}var f$=Of&&Of.isSet,vne=f$?y4(f$):gne;const _ne=vne;var yne=1,bne=2,wne=4,sD="[object Arguments]",kne="[object Array]",Cne="[object Boolean]",xne="[object Date]",Sne="[object Error]",iD="[object Function]",$ne="[object GeneratorFunction]",Ane="[object Map]",Ene="[object Number]",oD="[object Object]",Mne="[object RegExp]",Tne="[object Set]",Pne="[object String]",Ine="[object Symbol]",Lne="[object WeakMap]",One="[object ArrayBuffer]",Dne="[object DataView]",Rne="[object Float32Array]",Vne="[object Float64Array]",Fne="[object Int8Array]",Nne="[object Int16Array]",Bne="[object Int32Array]",zne="[object Uint8Array]",Hne="[object Uint8ClampedArray]",Une="[object Uint16Array]",jne="[object Uint32Array]",qn={};qn[sD]=qn[kne]=qn[One]=qn[Dne]=qn[Cne]=qn[xne]=qn[Rne]=qn[Vne]=qn[Fne]=qn[Nne]=qn[Bne]=qn[Ane]=qn[Ene]=qn[oD]=qn[Mne]=qn[Tne]=qn[Pne]=qn[Ine]=qn[zne]=qn[Hne]=qn[Une]=qn[jne]=!0;qn[Sne]=qn[iD]=qn[Lne]=!1;function tg(t,e,n,i,s,o){var r,a=e&yne,l=e&bne,c=e&wne;if(n&&(r=s?n(t,i,s,o):n(t)),r!==void 0)return r;if(!qi(t))return t;var u=Yi(t);if(u){if(r=Nte(t),!a)return FO(t,r)}else{var d=Gg(t),h=d==iD||d==$ne;if(Wg(t))return KO(t,a);if(d==oD||d==sD||h&&!s){if(r=l||h?{}:nD(t),!a)return l?Ate(t,_te(r,t)):xte(t,vte(r,t))}else{if(!qn[d])return s?t:{};r=une(t,d,a)}}o||(o=new Hr);var f=o.get(t);if(f)return f;o.set(t,r),_ne(t)?t.forEach(function(b){r.add(tg(b,e,n,b,t,o))}):pne(t)&&t.forEach(function(b,w){r.set(w,tg(b,e,n,w,t,o))});var p=c?l?eD:Wk:l?F1:V1,m=u?void 0:p(t);return pQ(m||t,function(b,w){m&&(w=b,b=t[w]),g4(r,w,tg(b,e,n,w,t,o))}),r}var Wne=1,Yne=4;function ed(t){return tg(t,Wne|Yne)}var qne="__lodash_hash_undefined__";function Gne(t){return this.__data__.set(t,qne),this}function Xne(t){return this.__data__.has(t)}function _0(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new El;++e<n;)this.add(t[e])}_0.prototype.add=_0.prototype.push=Gne;_0.prototype.has=Xne;function Kne(t,e){for(var n=-1,i=t==null?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}function Zne(t,e){return t.has(e)}var Jne=1,Qne=2;function rD(t,e,n,i,s,o){var r=n&Jne,a=t.length,l=e.length;if(a!=l&&!(r&&l>a))return!1;var c=o.get(t),u=o.get(e);if(c&&u)return c==e&&u==t;var d=-1,h=!0,f=n&Qne?new _0:void 0;for(o.set(t,e),o.set(e,t);++d<a;){var p=t[d],m=e[d];if(i)var b=r?i(m,p,d,e,t,o):i(p,m,d,t,e,o);if(b!==void 0){if(b)continue;h=!1;break}if(f){if(!Kne(e,function(w,k){if(!Zne(f,k)&&(p===w||s(p,w,n,i,o)))return f.push(k)})){h=!1;break}}else if(!(p===m||s(p,m,n,i,o))){h=!1;break}}return o.delete(t),o.delete(e),h}function ese(t){var e=-1,n=Array(t.size);return t.forEach(function(i,s){n[++e]=[s,i]}),n}function tse(t){var e=-1,n=Array(t.size);return t.forEach(function(i){n[++e]=i}),n}var nse=1,sse=2,ise="[object Boolean]",ose="[object Date]",rse="[object Error]",ase="[object Map]",lse="[object Number]",cse="[object RegExp]",use="[object Set]",dse="[object String]",hse="[object Symbol]",fse="[object ArrayBuffer]",pse="[object DataView]",p$=yr?yr.prototype:void 0,Sw=p$?p$.valueOf:void 0;function mse(t,e,n,i,s,o,r){switch(n){case pse:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case fse:return!(t.byteLength!=e.byteLength||!o(new v0(t),new v0(e)));case ise:case ose:case lse:return R1(+t,+e);case rse:return t.name==e.name&&t.message==e.message;case cse:case dse:return t==e+"";case ase:var a=ese;case use:var l=i&nse;if(a||(a=tse),t.size!=e.size&&!l)return!1;var c=r.get(t);if(c)return c==e;i|=sse,r.set(t,e);var u=rD(a(t),a(e),i,s,o,r);return r.delete(t),u;case hse:if(Sw)return Sw.call(t)==Sw.call(e)}return!1}var gse=1,vse=Object.prototype,_se=vse.hasOwnProperty;function yse(t,e,n,i,s,o){var r=n&gse,a=Wk(t),l=a.length,c=Wk(e),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in e:_se.call(e,h)))return!1}var f=o.get(t),p=o.get(e);if(f&&p)return f==e&&p==t;var m=!0;o.set(t,e),o.set(e,t);for(var b=r;++d<l;){h=a[d];var w=t[h],k=e[h];if(i)var C=r?i(k,w,h,e,t,o):i(w,k,h,t,e,o);if(!(C===void 0?w===k||s(w,k,n,i,o):C)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var A=t.constructor,S=e.constructor;A!=S&&"constructor"in t&&"constructor"in e&&!(typeof A=="function"&&A instanceof A&&typeof S=="function"&&S instanceof S)&&(m=!1)}return o.delete(t),o.delete(e),m}var bse=1,m$="[object Arguments]",g$="[object Array]",qv="[object Object]",wse=Object.prototype,v$=wse.hasOwnProperty;function kse(t,e,n,i,s,o){var r=Yi(t),a=Yi(e),l=r?g$:Gg(t),c=a?g$:Gg(e);l=l==m$?qv:l,c=c==m$?qv:c;var u=l==qv,d=c==qv,h=l==c;if(h&&Wg(t)){if(!Wg(e))return!1;r=!0,u=!1}if(h&&!u)return o||(o=new Hr),r||b4(t)?rD(t,e,n,i,s,o):mse(t,e,l,n,i,s,o);if(!(n&bse)){var f=u&&v$.call(t,"__wrapped__"),p=d&&v$.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,b=p?e.value():e;return o||(o=new Hr),s(m,b,n,i,o)}}return h?(o||(o=new Hr),yse(t,e,n,i,s,o)):!1}function jb(t,e,n,i,s){return t===e?!0:t==null||e==null||!Ta(t)&&!Ta(e)?t!==t&&e!==e:kse(t,e,n,i,jb,s)}var Cse=1,xse=2;function Sse(t,e,n,i){var s=n.length,o=s,r=!i;if(t==null)return!o;for(t=Object(t);s--;){var a=n[s];if(r&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++s<o;){a=n[s];var l=a[0],c=t[l],u=a[1];if(r&&a[2]){if(c===void 0&&!(l in t))return!1}else{var d=new Hr;if(i)var h=i(c,u,l,t,e,d);if(!(h===void 0?jb(u,c,Cse|xse,i,d):h))return!1}}return!0}function aD(t){return t===t&&!qi(t)}function $se(t){for(var e=V1(t),n=e.length;n--;){var i=e[n],s=t[i];e[n]=[i,s,aD(s)]}return e}function lD(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function Ase(t){var e=$se(t);return e.length==1&&e[0][2]?lD(e[0][0],e[0][1]):function(n){return n===t||Sse(n,t,e)}}function Ese(t,e){return t!=null&&e in Object(t)}function Mse(t,e,n){e=up(e,t);for(var i=-1,s=e.length,o=!1;++i<s;){var r=dp(e[i]);if(!(o=t!=null&&n(t,r)))break;t=t[r]}return o||++i!=s?o:(s=t==null?0:t.length,!!s&&v4(s)&&Bb(r,s)&&(Yi(t)||jg(t)))}function cD(t,e){return t!=null&&Mse(t,e,Ese)}var Tse=1,Pse=2;function Ise(t,e){return w4(t)&&aD(e)?lD(dp(t),e):function(n){var i=ji(n,t);return i===void 0&&i===e?cD(n,t):jb(e,i,Tse|Pse)}}function Lse(t){return function(e){return e==null?void 0:e[t]}}function Ose(t){return function(e){return Ub(e,t)}}function Dse(t){return w4(t)?Lse(dp(t)):Ose(t)}function uD(t){return typeof t=="function"?t:t==null?f4:typeof t=="object"?Yi(t)?Ise(t[0],t[1]):Ase(t):Dse(t)}function Rse(t){return function(e,n,i){for(var s=-1,o=Object(e),r=i(e),a=r.length;a--;){var l=r[t?a:++s];if(n(o[l],l,o)===!1)break}return e}}var Vse=Rse();const dD=Vse;function Fse(t,e){return t&&dD(t,e,V1)}function Nse(t,e){return function(n,i){if(n==null)return n;if(!cp(n))return t(n,i);for(var s=n.length,o=e?s:-1,r=Object(n);(e?o--:++o<s)&&i(r[o],o,r)!==!1;);return n}}var Bse=Nse(Fse);const zse=Bse;var Hse=function(){return sa.Date.now()};const $w=Hse;var Use="Expected a function",jse=Math.max,Wse=Math.min;function yd(t,e,n){var i,s,o,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(Use);e=rf(e)||0,qi(n)&&(u=!!n.leading,d="maxWait"in n,o=d?jse(rf(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(M){var P=i,T=s;return i=s=void 0,c=M,r=t.apply(T,P),r}function p(M){return c=M,a=setTimeout(w,e),u?f(M):r}function m(M){var P=M-l,T=M-c,I=e-P;return d?Wse(I,o-T):I}function b(M){var P=M-l,T=M-c;return l===void 0||P>=e||P<0||d&&T>=o}function w(){var M=$w();if(b(M))return k(M);a=setTimeout(w,m(M))}function k(M){return a=void 0,h&&i?f(M):(i=s=void 0,r)}function C(){a!==void 0&&clearTimeout(a),c=0,i=l=s=a=void 0}function A(){return a===void 0?r:k($w())}function S(){var M=$w(),P=b(M);if(i=arguments,s=this,l=M,P){if(a===void 0)return p(l);if(d)return clearTimeout(a),a=setTimeout(w,e),f(l)}return a===void 0&&(a=setTimeout(w,e)),r}return S.cancel=C,S.flush=A,S}function Xk(t,e,n){(n!==void 0&&!R1(t[e],n)||n===void 0&&!(e in t))&&m4(t,e,n)}function Yse(t){return Ta(t)&&cp(t)}function Kk(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function qse(t){return lp(t,F1(t))}function Gse(t,e,n,i,s,o,r){var a=Kk(t,n),l=Kk(e,n),c=r.get(l);if(c){Xk(t,n,c);return}var u=o?o(a,l,n+"",t,e,r):void 0,d=u===void 0;if(d){var h=Yi(l),f=!h&&Wg(l),p=!h&&!f&&b4(l);u=l,h||f||p?Yi(a)?u=a:Yse(a)?u=FO(a):f?(d=!1,u=KO(l,!0)):p?(d=!1,u=tD(l,!0)):u=[]:$4(l)||jg(l)?(u=a,jg(a)?u=qse(a):(!qi(a)||p4(a))&&(u=nD(l))):d=!1}d&&(r.set(l,u),s(u,l,i,o,r),r.delete(l)),Xk(t,n,u)}function hD(t,e,n,i,s){t!==e&&dD(e,function(o,r){if(s||(s=new Hr),qi(o))Gse(t,e,r,n,hD,i,s);else{var a=i?i(Kk(t,r),o,r+"",t,e,s):void 0;a===void 0&&(a=o),Xk(t,r,a)}},F1)}function Xse(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var Kse=Math.max,Zse=Math.min;function Jse(t,e,n){var i=t==null?0:t.length;if(!i)return-1;var s=i-1;return n!==void 0&&(s=VJ(n),s=n<0?Kse(i+s,0):Zse(s,i-1)),mQ(t,uD(e),s,!0)}function Qse(t,e){var n=-1,i=cp(t)?Array(t.length):[];return zse(t,function(s,o,r){i[++n]=e(s,o,r)}),i}function eie(t,e){var n=Yi(t)?h4:Qse;return n(t,uD(e))}function fD(t,e){return x4(eie(t,e),1)}function Df(t){for(var e=-1,n=t==null?0:t.length,i={};++e<n;){var s=t[e];i[s[0]]=s[1]}return i}function tie(t,e){return e.length<2?t:Ub(t,cte(e,0,-1))}function Wi(t,e){return jb(t,e)}function hi(t){return t==null}function Wb(t){return t===null}function nie(t){return t===void 0}var sie=CQ(function(t,e,n){hD(t,e,n)});const pD=sie;var iie=Object.prototype,oie=iie.hasOwnProperty;function rie(t,e){e=up(e,t);var n=-1,i=e.length;if(!i)return!0;for(var s=t==null||typeof t!="object"&&typeof t!="function";++n<i;){var o=e[n];if(typeof o=="string"){if(o==="__proto__"&&!oie.call(t,"__proto__"))return!1;if(o==="constructor"&&n+1<i&&typeof e[n+1]=="string"&&e[n+1]==="prototype"){if(s&&n===0)continue;return!1}}}var r=tie(t,e);return r==null||delete r[dp(Xse(e))]}function aie(t){return $4(t)?void 0:t}var lie=1,cie=2,uie=4,die=YO(function(t,e){var n={};if(t==null)return n;var i=!1;e=h4(e,function(o){return o=up(o,t),i||(i=o.length>1),o}),lp(t,eD(t),n),i&&(n=tg(n,lie|cie|uie,aie));for(var s=e.length;s--;)rie(n,e[s]);return n});const Yb=die;function mD(t,e,n,i){if(!qi(t))return t;e=up(e,t);for(var s=-1,o=e.length,r=o-1,a=t;a!=null&&++s<o;){var l=dp(e[s]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(s!=r){var u=a[l];c=i?i(u,l,a):void 0,c===void 0&&(c=qi(u)?u:Bb(e[s+1])?[]:{})}g4(a,l,c),a=a[l]}return t}function hie(t,e,n){for(var i=-1,s=e.length,o={};++i<s;){var r=e[i],a=Ub(t,r);n(a,r)&&mD(o,up(r,t),a)}return o}function fie(t,e){return hie(t,e,function(n,i){return cD(t,i)})}var pie=YO(function(t,e){return t==null?{}:fie(t,e)});const M4=pie;function mie(t,e,n){return t==null?t:mD(t,e,n)}var gie="Expected a function";function Gv(t,e,n){var i=!0,s=!0;if(typeof t!="function")throw new TypeError(gie);return qi(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),yd(t,e,{leading:i,maxWait:e,trailing:s})}const sn=t=>t===void 0,Jn=t=>typeof t=="boolean",wt=t=>typeof t=="number",T4=t=>!t&&t!==0||Ee(t)&&t.length===0||yt(t)&&!Object.keys(t).length,Lo=t=>typeof Element>"u"?!1:t instanceof Element,xa=t=>hi(t),vie=t=>Ke(t)?!Number.isNaN(Number(t)):!1,_ie=t=>t===window,y0=t=>Object.keys(t),gD=t=>Object.entries(t),Ac=(t,e,n)=>({get value(){return ji(t,e,n)},set value(i){mie(t,e,i)}}),vD="__epPropKey",de=t=>t,yie=t=>yt(t)&&!!t[vD],qb=(t,e)=>{if(!yt(t)||yie(t))return t;const{values:n,required:i,default:s,type:o,validator:r}=t,a={type:o,required:!!i,validator:n||r?l=>{let c=!1,u=[];if(n&&(u=Array.from(n),zt(t,"default")&&u.push(s),c||(c=u.includes(l))),r&&(c||(c=r(l))),!c&&u.length>0){const d=[...new Set(u)].map(h=>JSON.stringify(h)).join(", ");cL(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`)}return c}:void 0,[vD]:!0};return zt(t,"default")&&(a.default=s),a},Ge=t=>Df(Object.entries(t).map(([e,n])=>[e,qb(n,e)])),P4=Ge({to:{type:de([String,Object]),required:!0},disabled:Boolean});var _D=class extends Error{constructor(t){super(t),this.name="ElementPlusError"}};function vo(t,e){throw new _D(`[${t}] ${e}`)}function Tt(t,e){{const n=Ke(t)?new _D(`[${t}] ${e}`):t;console.warn(n)}}const bie=["class","style"],wie=/^on[A-Z]/,Gb=(t={})=>{const{excludeListeners:e=!1,excludeKeys:n}=t,i=W(()=>((n==null?void 0:n.value)||[]).concat(bie)),s=pt();return s?W(()=>{var o;return Df(Object.entries((o=s.proxy)==null?void 0:o.$attrs).filter(([r])=>!i.value.includes(r)&&!(e&&wie.test(r))))}):(Tt("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),W(()=>({})))};function yD(t,e){var n;const i=Fn();return _l(()=>{i.value=t()},{...e,flush:(n=e==null?void 0:e.flush)!=null?n:"sync"}),Rc(i)}function Bd(t){return yb()?(bb(t),!0):!1}function Fo(t){return typeof t=="function"?t():E(t)}function kie(t){if(!hn(t))return In(t);const e=new Proxy({},{get(n,i,s){return E(Reflect.get(t.value,i,s))},set(n,i,s){return hn(t.value[i])&&!hn(s)?t.value[i].value=s:t.value[i]=s,!0},deleteProperty(n,i){return Reflect.deleteProperty(t.value,i)},has(n,i){return Reflect.has(t.value,i)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return In(e)}function Cie(t){return kie(W(t))}const Jt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const xie=t=>typeof t<"u",bD=t=>t!=null,Sie=Object.prototype.toString,$ie=t=>Sie.call(t)==="[object Object]",wD=(t,e,n)=>Math.min(n,Math.max(e,t)),Ur=()=>{},Zk=Aie();function Aie(){var t,e;return Jt&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function kD(t,e){function n(...i){return new Promise((s,o)=>{Promise.resolve(t(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(s).catch(o)})}return n}function Eie(t,e={}){let n,i,s=Ur;const o=a=>{clearTimeout(a),s(),s=Ur};return a=>{const l=Fo(t),c=Fo(e.maxWait);return n&&o(n),l<=0||c!==void 0&&c<=0?(i&&(o(i),i=null),Promise.resolve(a())):new Promise((u,d)=>{s=e.rejectOnCancel?d:u,c&&!i&&(i=setTimeout(()=>{n&&o(n),i=null,u(a())},c)),n=setTimeout(()=>{i&&o(i),i=null,u(a())},l)})}}function Mie(...t){let e=0,n,i=!0,s=Ur,o,r,a,l,c;!hn(t[0])&&typeof t[0]=="object"?{delay:r,trailing:a=!0,leading:l=!0,rejectOnCancel:c=!1}=t[0]:[r,a=!0,l=!0,c=!1]=t;const u=()=>{n&&(clearTimeout(n),n=void 0,s(),s=Ur)};return h=>{const f=Fo(r),p=Date.now()-e,m=()=>o=h();return u(),f<=0?(e=Date.now(),m()):(p>f&&(l||!i)?(e=Date.now(),m()):a&&(o=new Promise((b,w)=>{s=c?w:b,n=setTimeout(()=>{e=Date.now(),i=!0,b(m()),u()},Math.max(0,f-p))})),!l&&!n&&(n=setTimeout(()=>i=!0,f)),i=!1,o)}}function Tie(t){return t||pt()}function CD(t,e=200,n={}){return kD(Eie(e,n),t)}function Pie(t,e=200,n={}){const i=ee(t.value),s=CD(()=>{i.value=t.value},e,n);return Te(t,()=>s()),i}function Iie(t,e=200,n=!1,i=!0,s=!1){return kD(Mie(e,n,i,s),t)}function xD(t,e=!0,n){Tie()?Nt(t,n):e?t():ot(t)}function Jk(t,e,n={}){const{immediate:i=!0}=n,s=ee(!1);let o=null;function r(){o&&(clearTimeout(o),o=null)}function a(){s.value=!1,r()}function l(...c){r(),s.value=!0,o=setTimeout(()=>{s.value=!1,o=null,t(...c)},Fo(e))}return i&&(s.value=!0,Jt&&l()),Bd(a),{isPending:Rc(s),start:l,stop:a}}const Ml=Jt?window:void 0,Lie=Jt?window.document:void 0;function Ws(t){var e;const n=Fo(t);return(e=n==null?void 0:n.$el)!=null?e:n}function Hn(...t){let e,n,i,s;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,i,s]=t,e=Ml):[e,n,i,s]=t,!e)return Ur;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const o=[],r=()=>{o.forEach(u=>u()),o.length=0},a=(u,d,h,f)=>(u.addEventListener(d,h,f),()=>u.removeEventListener(d,h,f)),l=Te(()=>[Ws(e),Fo(s)],([u,d])=>{if(r(),!u)return;const h=$ie(d)?{...d}:d;o.push(...n.flatMap(f=>i.map(p=>a(u,f,p,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),r()};return Bd(c),c}let _$=!1;function SD(t,e,n={}){const{window:i=Ml,ignore:s=[],capture:o=!0,detectIframe:r=!1}=n;if(!i)return Ur;Zk&&!_$&&(_$=!0,Array.from(i.document.body.children).forEach(m=>m.addEventListener("click",Ur)),i.document.documentElement.addEventListener("click",Ur));let a=!0;const l=m=>Fo(s).some(b=>{if(typeof b=="string")return Array.from(i.document.querySelectorAll(b)).some(w=>w===m.target||m.composedPath().includes(w));{const w=Ws(b);return w&&(m.target===w||m.composedPath().includes(w))}});function c(m){const b=Fo(m);return b&&b.$.subTree.shapeFlag===16}function u(m,b){const w=Fo(m),k=w.$.subTree&&w.$.subTree.children;return k==null||!Array.isArray(k)?!1:k.some(C=>C.el===b.target||b.composedPath().includes(C.el))}const d=m=>{const b=Ws(t);if(m.target!=null&&!(!(b instanceof Element)&&c(t)&&u(t,m))&&!(!b||b===m.target||m.composedPath().includes(b))){if(m.detail===0&&(a=!l(m)),!a){a=!0;return}e(m)}};let h=!1;const f=[Hn(i,"click",m=>{h||(h=!0,setTimeout(()=>{h=!1},0),d(m))},{passive:!0,capture:o}),Hn(i,"pointerdown",m=>{const b=Ws(t);a=!l(m)&&!!(b&&!m.composedPath().includes(b))},{passive:!0}),r&&Hn(i,"blur",m=>{setTimeout(()=>{var b;const w=Ws(t);((b=i.document.activeElement)==null?void 0:b.tagName)==="IFRAME"&&!(w!=null&&w.contains(i.document.activeElement))&&e(m)},0)})].filter(Boolean);return()=>f.forEach(m=>m())}function Oie(){const t=ee(!1),e=pt();return e&&Nt(()=>{t.value=!0},e),t}function Xb(t){const e=Oie();return W(()=>(e.value,!!t()))}function Die(t,e,n={}){const{window:i=Ml,...s}=n;let o;const r=Xb(()=>i&&"MutationObserver"in i),a=()=>{o&&(o.disconnect(),o=void 0)},l=W(()=>{const h=Fo(t),f=(Array.isArray(h)?h:[h]).map(Ws).filter(bD);return new Set(f)}),c=Te(()=>l.value,h=>{a(),r.value&&h.size&&(o=new MutationObserver(e),h.forEach(f=>o.observe(f,s)))},{immediate:!0,flush:"post"}),u=()=>o==null?void 0:o.takeRecords(),d=()=>{c(),a()};return Bd(d),{isSupported:r,stop:d,takeRecords:u}}function Rie(t,e={}){const{window:n=Ml}=e,i=Xb(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let s;const o=ee(!1),r=c=>{o.value=c.matches},a=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",r):s.removeListener(r))},l=_l(()=>{i.value&&(a(),s=n.matchMedia(Fo(t)),"addEventListener"in s?s.addEventListener("change",r):s.addListener(r),o.value=s.matches)});return Bd(()=>{l(),a(),s=void 0}),o}function Vie(t){return JSON.parse(JSON.stringify(t))}function Fie(t={}){const{document:e=Lie}=t;if(!e)return ee("visible");const n=ee(e.visibilityState);return Hn(e,"visibilitychange",()=>{n.value=e.visibilityState}),n}function Ts(t,e,n={}){const{window:i=Ml,...s}=n;let o;const r=Xb(()=>i&&"ResizeObserver"in i),a=()=>{o&&(o.disconnect(),o=void 0)},l=W(()=>{const d=Fo(t);return Array.isArray(d)?d.map(h=>Ws(h)):[Ws(d)]}),c=Te(l,d=>{if(a(),r.value&&i){o=new ResizeObserver(e);for(const h of d)h&&o.observe(h,s)}},{immediate:!0,flush:"post"}),u=()=>{a(),c()};return Bd(u),{isSupported:r,stop:u}}function y$(t,e={width:0,height:0},n={}){const{window:i=Ml,box:s="content-box"}=n,o=W(()=>{var d,h;return(h=(d=Ws(t))==null?void 0:d.namespaceURI)==null?void 0:h.includes("svg")}),r=ee(e.width),a=ee(e.height),{stop:l}=Ts(t,([d])=>{const h=s==="border-box"?d.borderBoxSize:s==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(i&&o.value){const f=Ws(t);if(f){const p=f.getBoundingClientRect();r.value=p.width,a.value=p.height}}else if(h){const f=Array.isArray(h)?h:[h];r.value=f.reduce((p,{inlineSize:m})=>p+m,0),a.value=f.reduce((p,{blockSize:m})=>p+m,0)}else r.value=d.contentRect.width,a.value=d.contentRect.height},n);xD(()=>{const d=Ws(t);d&&(r.value="offsetWidth"in d?d.offsetWidth:e.width,a.value="offsetHeight"in d?d.offsetHeight:e.height)});const c=Te(()=>Ws(t),d=>{r.value=d?e.width:0,a.value=d?e.height:0});function u(){l(),c()}return{width:r,height:a,stop:u}}function Nie(t,e,n={}){const{root:i,rootMargin:s="0px",threshold:o=0,window:r=Ml,immediate:a=!0}=n,l=Xb(()=>r&&"IntersectionObserver"in r),c=W(()=>{const p=Fo(t);return(Array.isArray(p)?p:[p]).map(Ws).filter(bD)});let u=Ur;const d=ee(a),h=l.value?Te(()=>[c.value,Ws(i),d.value],([p,m])=>{if(u(),!d.value||!p.length)return;const b=new IntersectionObserver(e,{root:Ws(m),rootMargin:s,threshold:o});p.forEach(w=>w&&b.observe(w)),u=()=>{b.disconnect(),u=Ur}},{immediate:a,flush:"post"}):Ur,f=()=>{u(),h(),d.value=!1};return Bd(f),{isSupported:l,isActive:d,pause(){u(),d.value=!1},resume(){d.value=!0},stop:f}}function Bie(t,e,n,i={}){var s,o,r;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:d,shouldEmit:h}=i,f=pt(),p=n||(f==null?void 0:f.emit)||((s=f==null?void 0:f.$emit)==null?void 0:s.bind(f))||((r=(o=f==null?void 0:f.proxy)==null?void 0:o.$emit)==null?void 0:r.bind(f==null?void 0:f.proxy));let m=c;e||(e="modelValue"),m=m||`update:${e.toString()}`;const b=C=>a?typeof a=="function"?a(C):Vie(C):C,w=()=>xie(t[e])?b(t[e]):d,k=C=>{h?h(C)&&p(m,C):p(m,C)};if(l){const C=w(),A=ee(C);let S=!1;return Te(()=>t[e],M=>{S||(S=!0,A.value=b(M),ot(()=>S=!1))}),Te(A,M=>{!S&&(M!==t[e]||u)&&k(M)},{deep:u}),A}else return W({get(){return w()},set(C){k(C)}})}function zie(t={}){const{window:e=Ml}=t;if(!e)return ee(!1);const n=ee(e.document.hasFocus());return Hn(e,"blur",()=>{n.value=!1}),Hn(e,"focus",()=>{n.value=!0}),n}function Hie(t={}){const{window:e=Ml,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:o=!0,type:r="inner"}=t,a=ee(n),l=ee(i),c=()=>{e&&(r==="outer"?(a.value=e.outerWidth,l.value=e.outerHeight):o?(a.value=e.innerWidth,l.value=e.innerHeight):(a.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight))};if(c(),xD(c),Hn("resize",c,{passive:!0}),s){const u=Rie("(orientation: portrait)");Te(u,()=>c())}return{width:a,height:l}}function $D(){const t=Fn(),e=ee(0),n=W(()=>({minWidth:`${Math.max(e.value,d4)}px`}));return Ts(t,()=>{var s;e.value=((s=t.value)==null?void 0:s.getBoundingClientRect().width)??0}),{calculatorRef:t,calculatorWidth:e,inputStyle:n}}const fl=({from:t,replacement:e,scope:n,version:i,ref:s,type:o="API"},r)=>{Te(()=>E(r),a=>{a&&Tt(n,`[${o}] ${t} is about to be deprecated in version ${i}, please use ${e} instead.
42 +For more detail, please visit: ${s}
43 +`)},{immediate:!0})},Uie='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',AD=t=>typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot,b$=t=>typeof Element>"u"?!1:t instanceof Element,jie=t=>getComputedStyle(t).position==="fixed"?!1:t.offsetParent!==null,w$=t=>Array.from(t.querySelectorAll(Uie)).filter(e=>Xg(e)&&jie(e)),Xg=t=>{if(t.tabIndex>0||t.tabIndex===0&&t.getAttribute("tabIndex")!==null)return!0;if(t.tabIndex<0||t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true")return!1;switch(t.nodeName){case"A":return!!t.href&&t.rel!=="ignore";case"INPUT":return!(t.type==="hidden"||t.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},I4=(t,e)=>{if(!t||!t.focus)return;let n=!1;b$(t)&&!Xg(t)&&!t.getAttribute("tabindex")&&(t.setAttribute("tabindex","-1"),n=!0),t.focus(e),b$(t)&&n&&t.removeAttribute("tabindex")},L4=()=>Jt&&/firefox/i.test(window.navigator.userAgent),ED=()=>Jt&&/android/i.test(window.navigator.userAgent),Wie=(t="")=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),Aw=t=>Gc(t),Yie="utils/dom/style",MD=(t="")=>t.split(" ").filter(e=>!!e.trim()),pl=(t,e)=>{if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList.contains(e)},bd=(t,e)=>{!t||!e.trim()||t.classList.add(...MD(e))},Pa=(t,e)=>{!t||!e.trim()||t.classList.remove(...MD(e))},il=(t,e)=>{var i;if(!Jt||!t||!e||AD(t))return"";let n=Un(e);n==="float"&&(n="cssFloat");try{const s=t.style[n];if(s)return s;const o=(i=document.defaultView)==null?void 0:i.getComputedStyle(t,"");return o?o[n]:""}catch{return t.style[n]}},TD=(t,e,n)=>{if(!(!t||!e))if(yt(e))gD(e).forEach(([i,s])=>TD(t,i,s));else{const i=Un(e);t.style[i]=n}};function pi(t,e="px"){if(!t&&t!==0)return"";if(wt(t)||vie(t))return`${t}${e}`;if(Ke(t))return t;Tt(Yie,"binding value must be a string or number")}const PD=(t,e,n,i)=>{const s={offsetX:0,offsetY:0},o=ee(!1),r=(h,f)=>{if(t.value){const{offsetX:p,offsetY:m}=s,b=t.value.getBoundingClientRect(),w=b.left,k=b.top,C=b.width,A=b.height,S=document.documentElement.clientWidth,M=document.documentElement.clientHeight,P=-w+p,T=-k+m,I=S-w-C+p,L=M-k-(A<M?A:0)+m;i!=null&&i.value||(h=Math.min(Math.max(h,P),I),f=Math.min(Math.max(f,T),L)),s.offsetX=h,s.offsetY=f,t.value.style.transform=`translate(${pi(h)}, ${pi(f)})`}},a=h=>{const f=h.clientX,p=h.clientY,{offsetX:m,offsetY:b}=s,w=C=>{o.value||(o.value=!0),r(m+C.clientX-f,b+C.clientY-p)},k=()=>{o.value=!1,document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",k)};document.addEventListener("mousemove",w),document.addEventListener("mouseup",k)},l=()=>{e.value&&t.value&&(e.value.addEventListener("mousedown",a),window.addEventListener("resize",d))},c=()=>{e.value&&t.value&&(e.value.removeEventListener("mousedown",a),window.removeEventListener("resize",d))},u=()=>{s.offsetX=0,s.offsetY=0,t.value&&(t.value.style.transform="")},d=()=>{const{offsetX:h,offsetY:f}=s;r(h,f)};return Nt(()=>{_l(()=>{n.value?l():c()})}),wn(()=>{c()}),{isDragging:o,resetPosition:u,updatePosition:d}};var qie={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.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the 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",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"},mention:{loading:"Loading"},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",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},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 Gie=t=>(e,n)=>Xie(e,n,E(t)),Xie=(t,e,n)=>ji(n,t,t).replace(/\{(\w+)\}/g,(i,s)=>`${(e==null?void 0:e[s])??`{${s}}`}`),Kie=t=>({lang:W(()=>E(t).name),locale:hn(t)?t:ee(t),t:Gie(t)}),ID=Symbol("localeContextKey"),en=t=>{const e=t||qe(ID,ee());return Kie(W(()=>e.value||qie))},ng="el",Zie="is-",gu=(t,e,n,i,s)=>{let o=`${t}-${e}`;return n&&(o+=`-${n}`),i&&(o+=`__${i}`),s&&(o+=`--${s}`),o},LD=Symbol("namespaceContextKey"),O4=t=>{const e=t||(pt()?qe(LD,ee(ng)):ee(ng));return W(()=>E(e)||ng)},Be=(t,e)=>{const n=O4(e);return{namespace:n,b:(m="")=>gu(n.value,t,m,"",""),e:m=>m?gu(n.value,t,"",m,""):"",m:m=>m?gu(n.value,t,"","",m):"",be:(m,b)=>m&&b?gu(n.value,t,m,b,""):"",em:(m,b)=>m&&b?gu(n.value,t,"",m,b):"",bm:(m,b)=>m&&b?gu(n.value,t,m,"",b):"",bem:(m,b,w)=>m&&b&&w?gu(n.value,t,m,b,w):"",is:(m,...b)=>{const w=b.length>=1?b[0]:!0;return m&&w?`${Zie}${m}`:""},cssVar:m=>{const b={};for(const w in m)m[w]&&(b[`--${n.value}-${w}`]=m[w]);return b},cssVarName:m=>`--${n.value}-${m}`,cssVarBlock:m=>{const b={};for(const w in m)m[w]&&(b[`--${n.value}-${t}-${w}`]=m[w]);return b},cssVarBlockName:m=>`--${n.value}-${t}-${m}`}},Kg=t=>Jt?window.requestAnimationFrame(t):setTimeout(t,16),Jie=t=>Jt?window.cancelAnimationFrame(t):clearTimeout(t),Qie=(t,e)=>{if(!Jt)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(e)],i=il(t,n);return["scroll","auto","overlay"].some(s=>i.includes(s))},eoe=(t,e)=>{if(!Jt)return;let n=t;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(Qie(n,e))return n;AD(n)?n=n.host:n=n.parentNode}return n};let Xv;const toe=t=>{var o;if(!Jt)return 0;if(Xv!==void 0)return Xv;const e=document.createElement("div");e.className=`${t}-scrollbar__wrap`,e.style.visibility="hidden",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);const n=e.offsetWidth;e.style.overflow="scroll";const i=document.createElement("div");i.style.width="100%",e.appendChild(i);const s=i.offsetWidth;return(o=e.parentNode)==null||o.removeChild(e),Xv=n-s,Xv};function noe(t,e){if(!Jt)return;if(!e){t.scrollTop=0;return}const n=[];let i=e.offsetParent;for(;i!==null&&t!==i&&t.contains(i);)n.push(i),i=i.offsetParent;const s=e.offsetTop+n.reduce((l,c)=>l+c.offsetTop,0),o=s+e.offsetHeight,r=t.scrollTop,a=r+t.clientHeight;s<r?t.scrollTop=s:o>a&&(t.scrollTop=o-t.clientHeight)}const D4=(t,e={})=>{hn(t)||vo("[useLockscreen]","You need to pass a ref param to this function");const n=e.ns||Be("popup"),i=W(()=>n.bm("parent","hidden"));let s=0,o=!1,r="0",a=!1;const l=()=>{a||(a=!0,setTimeout(()=>{typeof document>"u"||o&&document&&(document.body.style.width=r,Pa(document.body,i.value))},200))};Te(t,c=>{if(!c){l();return}a=!1,o=!pl(document.body,i.value),o&&(r=document.body.style.width,bd(document.body,i.value)),s=toe(n.namespace.value);const u=document.documentElement.clientHeight<document.body.scrollHeight,d=il(document.body,"overflowY");s>0&&(u||d==="scroll")&&o&&(document.body.style.width=`calc(100% - ${s}px)`)}),bb(()=>l())},Ms=(t,e,{checkForDefaultPrevented:n=!0}={})=>s=>{const o=t==null?void 0:t(s);if(n===!1||!o)return e==null?void 0:e(s)},k$=t=>e=>e.pointerType==="mouse"?t(e):void 0,ls=t=>{if(t.code&&t.code!=="Unidentified")return t.code;const e=OD(t);if(e){if(Object.values(Ue).includes(e))return e;switch(e){case" ":return Ue.space;default:return""}}return""},OD=t=>{let e=t.key&&t.key!=="Unidentified"?t.key:"";if(!e&&t.type==="keyup"&&ED()){const n=t.target;e=n.value.charAt(n.selectionStart-1)}return e},soe=qb({type:de(Boolean),default:null}),ioe=qb({type:de(Function)}),DD=t=>{const e=`update:${t}`,n=`onUpdate:${t}`,i=[e],s={[t]:soe,[n]:ioe};return{useModelToggle:({indicator:r,toggleReason:a,shouldHideWhenRouteChanges:l,shouldProceed:c,onShow:u,onHide:d})=>{const h=pt(),{emit:f}=h,p=h.props,m=W(()=>et(p[n])),b=W(()=>p[t]===null),w=P=>{r.value!==!0&&(r.value=!0,a&&(a.value=P),et(u)&&u(P))},k=P=>{r.value!==!1&&(r.value=!1,a&&(a.value=P),et(d)&&d(P))},C=P=>{if(p.disabled===!0||et(c)&&!c())return;const T=m.value&&Jt;T&&f(e,!0),(b.value||!T)&&w(P)},A=P=>{if(p.disabled===!0||!Jt)return;const T=m.value&&Jt;T&&f(e,!1),(b.value||!T)&&k(P)},S=P=>{Jn(P)&&(p.disabled&&P?m.value&&f(e,!1):r.value!==P&&(P?w():k()))},M=()=>{r.value?A():C()};return Te(()=>p[t],S),l&&h.appContext.config.globalProperties.$route!==void 0&&Te(()=>({...h.proxy.$route}),()=>{l.value&&r.value&&A()}),Nt(()=>{S(p[t])}),{hide:A,show:C,toggle:M,hasUpdateHandler:m}},useModelToggleProps:s,useModelToggleEmits:i}};DD("modelValue");const RD=t=>{const e=pt();return W(()=>{var n,i;return(i=(n=e==null?void 0:e.proxy)==null?void 0:n.$props)==null?void 0:i[t]})};var ho="top",br="bottom",wr="right",fo="left",R4="auto",N1=[ho,br,wr,fo],Rf="start",Zg="end",ooe="clippingParents",VD="viewport",Kp="popper",roe="reference",C$=N1.reduce(function(t,e){return t.concat([e+"-"+Rf,e+"-"+Zg])},[]),hp=[].concat(N1,[R4]).reduce(function(t,e){return t.concat([e,e+"-"+Rf,e+"-"+Zg])},[]),aoe="beforeRead",loe="read",coe="afterRead",uoe="beforeMain",doe="main",hoe="afterMain",foe="beforeWrite",poe="write",moe="afterWrite",goe=[aoe,loe,coe,uoe,doe,hoe,foe,poe,moe];function Ia(t){return t?(t.nodeName||"").toLowerCase():null}function ia(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Vf(t){var e=ia(t).Element;return t instanceof e||t instanceof Element}function fr(t){var e=ia(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function V4(t){if(typeof ShadowRoot>"u")return!1;var e=ia(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function voe(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var i=e.styles[n]||{},s=e.attributes[n]||{},o=e.elements[n];!fr(o)||!Ia(o)||(Object.assign(o.style,i),Object.keys(s).forEach(function(r){var a=s[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function _oe(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(i){var s=e.elements[i],o=e.attributes[i]||{},r=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:n[i]),a=r.reduce(function(l,c){return l[c]="",l},{});!fr(s)||!Ia(s)||(Object.assign(s.style,a),Object.keys(o).forEach(function(l){s.removeAttribute(l)}))})}}var FD={name:"applyStyles",enabled:!0,phase:"write",fn:voe,effect:_oe,requires:["computeStyles"]};function Aa(t){return t.split("-")[0]}var td=Math.max,b0=Math.min,Ff=Math.round;function Nf(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),i=1,s=1;if(fr(t)&&e){var o=t.offsetHeight,r=t.offsetWidth;r>0&&(i=Ff(n.width)/r||1),o>0&&(s=Ff(n.height)/o||1)}return{width:n.width/i,height:n.height/s,top:n.top/s,right:n.right/i,bottom:n.bottom/s,left:n.left/i,x:n.left/i,y:n.top/s}}function F4(t){var e=Nf(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function ND(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&V4(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function bl(t){return ia(t).getComputedStyle(t)}function yoe(t){return["table","td","th"].indexOf(Ia(t))>=0}function Xc(t){return((Vf(t)?t.ownerDocument:t.document)||window.document).documentElement}function Kb(t){return Ia(t)==="html"?t:t.assignedSlot||t.parentNode||(V4(t)?t.host:null)||Xc(t)}function x$(t){return!fr(t)||bl(t).position==="fixed"?null:t.offsetParent}function boe(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&fr(t)){var i=bl(t);if(i.position==="fixed")return null}var s=Kb(t);for(V4(s)&&(s=s.host);fr(s)&&["html","body"].indexOf(Ia(s))<0;){var o=bl(s);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return s;s=s.parentNode}return null}function B1(t){for(var e=ia(t),n=x$(t);n&&yoe(n)&&bl(n).position==="static";)n=x$(n);return n&&(Ia(n)==="html"||Ia(n)==="body"&&bl(n).position==="static")?e:n||boe(t)||e}function N4(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function sg(t,e,n){return td(t,b0(e,n))}function woe(t,e,n){var i=sg(t,e,n);return i>n?n:i}function BD(){return{top:0,right:0,bottom:0,left:0}}function zD(t){return Object.assign({},BD(),t)}function HD(t,e){return e.reduce(function(n,i){return n[i]=t,n},{})}var koe=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,zD(typeof t!="number"?t:HD(t,N1))};function Coe(t){var e,n=t.state,i=t.name,s=t.options,o=n.elements.arrow,r=n.modifiersData.popperOffsets,a=Aa(n.placement),l=N4(a),c=[fo,wr].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!r)){var d=koe(s.padding,n),h=F4(o),f=l==="y"?ho:fo,p=l==="y"?br:wr,m=n.rects.reference[u]+n.rects.reference[l]-r[l]-n.rects.popper[u],b=r[l]-n.rects.reference[l],w=B1(o),k=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,C=m/2-b/2,A=d[f],S=k-h[u]-d[p],M=k/2-h[u]/2+C,P=sg(A,M,S),T=l;n.modifiersData[i]=(e={},e[T]=P,e.centerOffset=P-M,e)}}function xoe(t){var e=t.state,n=t.options,i=n.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||!ND(e.elements.popper,s)||(e.elements.arrow=s))}var Soe={name:"arrow",enabled:!0,phase:"main",fn:Coe,effect:xoe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Bf(t){return t.split("-")[1]}var $oe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Aoe(t){var e=t.x,n=t.y,i=window,s=i.devicePixelRatio||1;return{x:Ff(e*s)/s||0,y:Ff(n*s)/s||0}}function S$(t){var e,n=t.popper,i=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,d=t.isFixed,h=r.x,f=h===void 0?0:h,p=r.y,m=p===void 0?0:p,b=typeof u=="function"?u({x:f,y:m}):{x:f,y:m};f=b.x,m=b.y;var w=r.hasOwnProperty("x"),k=r.hasOwnProperty("y"),C=fo,A=ho,S=window;if(c){var M=B1(n),P="clientHeight",T="clientWidth";if(M===ia(n)&&(M=Xc(n),bl(M).position!=="static"&&a==="absolute"&&(P="scrollHeight",T="scrollWidth")),M=M,s===ho||(s===fo||s===wr)&&o===Zg){A=br;var I=d&&M===S&&S.visualViewport?S.visualViewport.height:M[P];m-=I-i.height,m*=l?1:-1}if(s===fo||(s===ho||s===br)&&o===Zg){C=wr;var L=d&&M===S&&S.visualViewport?S.visualViewport.width:M[T];f-=L-i.width,f*=l?1:-1}}var R=Object.assign({position:a},c&&$oe),V=u===!0?Aoe({x:f,y:m}):{x:f,y:m};if(f=V.x,m=V.y,l){var H;return Object.assign({},R,(H={},H[A]=k?"0":"",H[C]=w?"0":"",H.transform=(S.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",H))}return Object.assign({},R,(e={},e[A]=k?m+"px":"",e[C]=w?f+"px":"",e.transform="",e))}function Eoe(t){var e=t.state,n=t.options,i=n.gpuAcceleration,s=i===void 0?!0:i,o=n.adaptive,r=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Aa(e.placement),variation:Bf(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,S$(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,S$(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var UD={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Eoe,data:{}},Kv={passive:!0};function Moe(t){var e=t.state,n=t.instance,i=t.options,s=i.scroll,o=s===void 0?!0:s,r=i.resize,a=r===void 0?!0:r,l=ia(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,Kv)}),a&&l.addEventListener("resize",n.update,Kv),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Kv)}),a&&l.removeEventListener("resize",n.update,Kv)}}var jD={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Moe,data:{}},Toe={left:"right",right:"left",bottom:"top",top:"bottom"};function R_(t){return t.replace(/left|right|bottom|top/g,function(e){return Toe[e]})}var Poe={start:"end",end:"start"};function $$(t){return t.replace(/start|end/g,function(e){return Poe[e]})}function B4(t){var e=ia(t),n=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:n,scrollTop:i}}function z4(t){return Nf(Xc(t)).left+B4(t).scrollLeft}function Ioe(t){var e=ia(t),n=Xc(t),i=e.visualViewport,s=n.clientWidth,o=n.clientHeight,r=0,a=0;return i&&(s=i.width,o=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(r=i.offsetLeft,a=i.offsetTop)),{width:s,height:o,x:r+z4(t),y:a}}function Loe(t){var e,n=Xc(t),i=B4(t),s=(e=t.ownerDocument)==null?void 0:e.body,o=td(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=td(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+z4(t),l=-i.scrollTop;return bl(s||n).direction==="rtl"&&(a+=td(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function H4(t){var e=bl(t),n=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function WD(t){return["html","body","#document"].indexOf(Ia(t))>=0?t.ownerDocument.body:fr(t)&&H4(t)?t:WD(Kb(t))}function ig(t,e){var n;e===void 0&&(e=[]);var i=WD(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=ia(i),r=s?[o].concat(o.visualViewport||[],H4(i)?i:[]):i,a=e.concat(r);return s?a:a.concat(ig(Kb(r)))}function Qk(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Ooe(t){var e=Nf(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function A$(t,e){return e===VD?Qk(Ioe(t)):Vf(e)?Ooe(e):Qk(Loe(Xc(t)))}function Doe(t){var e=ig(Kb(t)),n=["absolute","fixed"].indexOf(bl(t).position)>=0,i=n&&fr(t)?B1(t):t;return Vf(i)?e.filter(function(s){return Vf(s)&&ND(s,i)&&Ia(s)!=="body"}):[]}function Roe(t,e,n){var i=e==="clippingParents"?Doe(t):[].concat(e),s=[].concat(i,[n]),o=s[0],r=s.reduce(function(a,l){var c=A$(t,l);return a.top=td(c.top,a.top),a.right=b0(c.right,a.right),a.bottom=b0(c.bottom,a.bottom),a.left=td(c.left,a.left),a},A$(t,o));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function YD(t){var e=t.reference,n=t.element,i=t.placement,s=i?Aa(i):null,o=i?Bf(i):null,r=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(s){case ho:l={x:r,y:e.y-n.height};break;case br:l={x:r,y:e.y+e.height};break;case wr:l={x:e.x+e.width,y:a};break;case fo:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var c=s?N4(s):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case Rf:l[c]=l[c]-(e[u]/2-n[u]/2);break;case Zg:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function Jg(t,e){e===void 0&&(e={});var n=e,i=n.placement,s=i===void 0?t.placement:i,o=n.boundary,r=o===void 0?ooe:o,a=n.rootBoundary,l=a===void 0?VD:a,c=n.elementContext,u=c===void 0?Kp:c,d=n.altBoundary,h=d===void 0?!1:d,f=n.padding,p=f===void 0?0:f,m=zD(typeof p!="number"?p:HD(p,N1)),b=u===Kp?roe:Kp,w=t.rects.popper,k=t.elements[h?b:u],C=Roe(Vf(k)?k:k.contextElement||Xc(t.elements.popper),r,l),A=Nf(t.elements.reference),S=YD({reference:A,element:w,strategy:"absolute",placement:s}),M=Qk(Object.assign({},w,S)),P=u===Kp?M:A,T={top:C.top-P.top+m.top,bottom:P.bottom-C.bottom+m.bottom,left:C.left-P.left+m.left,right:P.right-C.right+m.right},I=t.modifiersData.offset;if(u===Kp&&I){var L=I[s];Object.keys(T).forEach(function(R){var V=[wr,br].indexOf(R)>=0?1:-1,H=[ho,br].indexOf(R)>=0?"y":"x";T[R]+=L[H]*V})}return T}function Voe(t,e){e===void 0&&(e={});var n=e,i=n.placement,s=n.boundary,o=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?hp:l,u=Bf(i),d=u?a?C$:C$.filter(function(p){return Bf(p)===u}):N1,h=d.filter(function(p){return c.indexOf(p)>=0});h.length===0&&(h=d);var f=h.reduce(function(p,m){return p[m]=Jg(t,{placement:m,boundary:s,rootBoundary:o,padding:r})[Aa(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}function Foe(t){if(Aa(t)===R4)return[];var e=R_(t);return[$$(t),e,$$(e)]}function Noe(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var s=n.mainAxis,o=s===void 0?!0:s,r=n.altAxis,a=r===void 0?!0:r,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=f===void 0?!0:f,m=n.allowedAutoPlacements,b=e.options.placement,w=Aa(b),k=w===b,C=l||(k||!p?[R_(b)]:Foe(b)),A=[b].concat(C).reduce(function(ae,ge){return ae.concat(Aa(ge)===R4?Voe(e,{placement:ge,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):ge)},[]),S=e.rects.reference,M=e.rects.popper,P=new Map,T=!0,I=A[0],L=0;L<A.length;L++){var R=A[L],V=Aa(R),H=Bf(R)===Rf,F=[ho,br].indexOf(V)>=0,U=F?"width":"height",Y=Jg(e,{placement:R,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),z=F?H?wr:fo:H?br:ho;S[U]>M[U]&&(z=R_(z));var X=R_(z),Z=[];if(o&&Z.push(Y[V]<=0),a&&Z.push(Y[z]<=0,Y[X]<=0),Z.every(function(ae){return ae})){I=R,T=!1;break}P.set(R,Z)}if(T)for(var G=p?3:1,Q=function(ae){var ge=A.find(function(Ce){var oe=P.get(Ce);if(oe)return oe.slice(0,ae).every(function(pe){return pe})});if(ge)return I=ge,"break"},ne=G;ne>0;ne--){var K=Q(ne);if(K==="break")break}e.placement!==I&&(e.modifiersData[i]._skip=!0,e.placement=I,e.reset=!0)}}var Boe={name:"flip",enabled:!0,phase:"main",fn:Noe,requiresIfExists:["offset"],data:{_skip:!1}};function E$(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function M$(t){return[ho,wr,br,fo].some(function(e){return t[e]>=0})}function zoe(t){var e=t.state,n=t.name,i=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=Jg(e,{elementContext:"reference"}),a=Jg(e,{altBoundary:!0}),l=E$(r,i),c=E$(a,s,o),u=M$(l),d=M$(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var Hoe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:zoe};function Uoe(t,e,n){var i=Aa(t),s=[fo,ho].indexOf(i)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[fo,wr].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function joe(t){var e=t.state,n=t.options,i=t.name,s=n.offset,o=s===void 0?[0,0]:s,r=hp.reduce(function(u,d){return u[d]=Uoe(d,e.rects,o),u},{}),a=r[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=r}var Woe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:joe};function Yoe(t){var e=t.state,n=t.name;e.modifiersData[n]=YD({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var qD={name:"popperOffsets",enabled:!0,phase:"read",fn:Yoe,data:{}};function qoe(t){return t==="x"?"y":"x"}function Goe(t){var e=t.state,n=t.options,i=t.name,s=n.mainAxis,o=s===void 0?!0:s,r=n.altAxis,a=r===void 0?!1:r,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=h===void 0?!0:h,p=n.tetherOffset,m=p===void 0?0:p,b=Jg(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),w=Aa(e.placement),k=Bf(e.placement),C=!k,A=N4(w),S=qoe(A),M=e.modifiersData.popperOffsets,P=e.rects.reference,T=e.rects.popper,I=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,L=typeof I=="number"?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),R=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,V={x:0,y:0};if(M){if(o){var H,F=A==="y"?ho:fo,U=A==="y"?br:wr,Y=A==="y"?"height":"width",z=M[A],X=z+b[F],Z=z-b[U],G=f?-T[Y]/2:0,Q=k===Rf?P[Y]:T[Y],ne=k===Rf?-T[Y]:-P[Y],K=e.elements.arrow,ae=f&&K?F4(K):{width:0,height:0},ge=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:BD(),Ce=ge[F],oe=ge[U],pe=sg(0,P[Y],ae[Y]),ie=C?P[Y]/2-G-pe-Ce-L.mainAxis:Q-pe-Ce-L.mainAxis,re=C?-P[Y]/2+G+pe+oe+L.mainAxis:ne+pe+oe+L.mainAxis,ke=e.elements.arrow&&B1(e.elements.arrow),je=ke?A==="y"?ke.clientTop||0:ke.clientLeft||0:0,te=(H=R==null?void 0:R[A])!=null?H:0,se=z+ie-te-je,me=z+re-te,$e=sg(f?b0(X,se):X,z,f?td(Z,me):Z);M[A]=$e,V[A]=$e-z}if(a){var Se,Le=A==="x"?ho:fo,We=A==="x"?br:wr,Fe=M[S],He=S==="y"?"height":"width",Ae=Fe+b[Le],Ze=Fe-b[We],Ye=[ho,fo].indexOf(w)!==-1,it=(Se=R==null?void 0:R[S])!=null?Se:0,be=Ye?Ae:Fe-P[He]-T[He]-it+L.altAxis,ve=Ye?Fe+P[He]+T[He]-it-L.altAxis:Ze,Pe=f&&Ye?woe(be,Fe,ve):sg(f?be:Ae,Fe,f?ve:Ze);M[S]=Pe,V[S]=Pe-Fe}e.modifiersData[i]=V}}var Xoe={name:"preventOverflow",enabled:!0,phase:"main",fn:Goe,requiresIfExists:["offset"]};function Koe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Zoe(t){return t===ia(t)||!fr(t)?B4(t):Koe(t)}function Joe(t){var e=t.getBoundingClientRect(),n=Ff(e.width)/t.offsetWidth||1,i=Ff(e.height)/t.offsetHeight||1;return n!==1||i!==1}function Qoe(t,e,n){n===void 0&&(n=!1);var i=fr(e),s=fr(e)&&Joe(e),o=Xc(e),r=Nf(t,s),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((Ia(e)!=="body"||H4(o))&&(a=Zoe(e)),fr(e)?(l=Nf(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=z4(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function ere(t){var e=new Map,n=new Set,i=[];t.forEach(function(o){e.set(o.name,o)});function s(o){n.add(o.name);var r=[].concat(o.requires||[],o.requiresIfExists||[]);r.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&s(l)}}),i.push(o)}return t.forEach(function(o){n.has(o.name)||s(o)}),i}function tre(t){var e=ere(t);return goe.reduce(function(n,i){return n.concat(e.filter(function(s){return s.phase===i}))},[])}function nre(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function sre(t){var e=t.reduce(function(n,i){var s=n[i.name];return n[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,n},{});return Object.keys(e).map(function(n){return e[n]})}var T$={placement:"bottom",modifiers:[],strategy:"absolute"};function P$(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function U4(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,i=n===void 0?[]:n,s=e.defaultOptions,o=s===void 0?T$:s;return function(r,a,l){l===void 0&&(l=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},T$,o),modifiersData:{},elements:{reference:r,popper:a},attributes:{},styles:{}},u=[],d=!1,h={state:c,setOptions:function(m){var b=typeof m=="function"?m(c.options):m;p(),c.options=Object.assign({},o,c.options,b),c.scrollParents={reference:Vf(r)?ig(r):r.contextElement?ig(r.contextElement):[],popper:ig(a)};var w=tre(sre([].concat(i,c.options.modifiers)));return c.orderedModifiers=w.filter(function(k){return k.enabled}),f(),h.update()},forceUpdate:function(){if(!d){var m=c.elements,b=m.reference,w=m.popper;if(P$(b,w)){c.rects={reference:Qoe(b,B1(w),c.options.strategy==="fixed"),popper:F4(w)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(T){return c.modifiersData[T.name]=Object.assign({},T.data)});for(var k=0;k<c.orderedModifiers.length;k++){if(c.reset===!0){c.reset=!1,k=-1;continue}var C=c.orderedModifiers[k],A=C.fn,S=C.options,M=S===void 0?{}:S,P=C.name;typeof A=="function"&&(c=A({state:c,options:M,name:P,instance:h})||c)}}}},update:nre(function(){return new Promise(function(m){h.forceUpdate(),m(c)})}),destroy:function(){p(),d=!0}};if(!P$(r,a))return h;h.setOptions(l).then(function(m){!d&&l.onFirstUpdate&&l.onFirstUpdate(m)});function f(){c.orderedModifiers.forEach(function(m){var b=m.name,w=m.options,k=w===void 0?{}:w,C=m.effect;if(typeof C=="function"){var A=C({state:c,name:b,instance:h,options:k}),S=function(){};u.push(A||S)}})}function p(){u.forEach(function(m){return m()}),u=[]}return h}}U4();var ire=[jD,qD,UD,FD];U4({defaultModifiers:ire});var ore=[jD,qD,UD,FD,Woe,Boe,Xoe,Soe,Hoe],rre=U4({defaultModifiers:ore});const are=(t,e,n={})=>{const i={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const c=lre(l);Object.assign(r.value,c)},requires:["computeStyles"]},s=W(()=>{const{onFirstUpdate:l,placement:c,strategy:u,modifiers:d}=E(n);return{onFirstUpdate:l,placement:c||"bottom",strategy:u||"absolute",modifiers:[...d||[],i,{name:"applyStyles",enabled:!1}]}}),o=Fn(),r=ee({styles:{popper:{position:E(s).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=()=>{o.value&&(o.value.destroy(),o.value=void 0)};return Te(s,l=>{const c=E(o);c&&c.setOptions(l)},{deep:!0}),Te([t,e],([l,c])=>{a(),!(!l||!c)&&(o.value=rre(l,c,E(s)))}),wn(()=>{a()}),{state:W(()=>{var l;return{...((l=E(o))==null?void 0:l.state)||{}}}),styles:W(()=>E(r).styles),attributes:W(()=>E(r).attributes),update:()=>{var l;return(l=E(o))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=E(o))==null?void 0:l.forceUpdate()},instanceRef:W(()=>E(o))}};function lre(t){const e=Object.keys(t.elements);return{styles:Df(e.map(n=>[n,t.styles[n]||{}])),attributes:Df(e.map(n=>[n,t.attributes[n]]))}}const j4=t=>{if(!t)return{onClick:Dt,onMousedown:Dt,onMouseup:Dt};let e=!1,n=!1;return{onClick:r=>{e&&n&&t(r),e=n=!1},onMousedown:r=>{e=r.target===r.currentTarget},onMouseup:r=>{n=r.target===r.currentTarget}}},cre=(t,e=0)=>{if(e===0)return t;const n=ee(yt(e)&&!!e.initVal);let i=null;const s=r=>{if(sn(r)){n.value=t.value;return}i&&clearTimeout(i),i=setTimeout(()=>{n.value=t.value},r)},o=r=>{r==="leading"?wt(e)?s(e):s(e.leading):yt(e)?s(e.trailing):n.value=!1};return Nt(()=>o("leading")),Te(()=>t.value,r=>{o(r?"leading":"trailing")}),n};function I$(){let t;const e=(i,s)=>{n(),t=window.setTimeout(i,s)},n=()=>window.clearTimeout(t);return Bd(()=>n()),{registerTimeout:e,cancelTimeout:n}}const eC={prefix:Math.floor(Math.random()*1e4),current:0},ure=Symbol("elIdInjection"),W4=()=>pt()?qe(ure,eC):eC,kr=t=>{const e=W4();!Jt&&e===eC&&Tt("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
44 +usage: app.provide(ID_INJECTION_KEY, {
45 + prefix: number,
46 + current: number,
47 +})`);const n=O4();return yD(()=>E(t)||`${n.value}-id-${e.prefix}-${e.current++}`)};let Ah=[];const L$=t=>{ls(t)===Ue.esc&&Ah.forEach(e=>e(t))},dre=t=>{Nt(()=>{Ah.length===0&&document.addEventListener("keydown",L$),Jt&&Ah.push(t)}),wn(()=>{Ah=Ah.filter(e=>e!==t),Ah.length===0&&Jt&&document.removeEventListener("keydown",L$)})},GD=()=>{const t=O4(),e=W4(),n=W(()=>`${t.value}-popper-container-${e.prefix}`);return{id:n,selector:W(()=>`#${n.value}`)}},hre=t=>{const e=document.createElement("div");return e.id=t,document.body.appendChild(e),e},fre=()=>{const{id:t,selector:e}=GD();return Dd(()=>{Jt&&(document.body.querySelector(e.value)||hre(t.value))}),{id:t,selector:e}},pre=Ge({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),mre=({showAfter:t,hideAfter:e,autoClose:n,open:i,close:s})=>{const{registerTimeout:o}=I$(),{registerTimeout:r,cancelTimeout:a}=I$();return{onOpen:(u,d=E(t))=>{o(()=>{i(u);const h=E(n);wt(h)&&h>0&&r(()=>{s(u)},h)},d)},onClose:(u,d=E(e))=>{a(),o(()=>{s(u)},d)}}},XD=Symbol("elForwardRef"),gre=t=>{Pt(XD,{setForwardRef:n=>{t.value=n}})},vre=t=>({mounted(e){t(e)},updated(e){t(e)},unmounted(){t(null)}}),O$={current:0},D$=ee(0),KD=2e3,R$=Symbol("elZIndexContextKey"),ZD=Symbol("zIndexContextKey"),Zb=t=>{const e=pt()?qe(R$,O$):O$,n=t||(pt()?qe(ZD,void 0):void 0),i=W(()=>{const r=E(n);return wt(r)?r:KD}),s=W(()=>i.value+D$.value),o=()=>(e.current++,D$.value=e.current,s.value);return!Jt&&!qe(R$)&&Tt("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
48 +usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:i,currentZIndex:s,nextZIndex:o}},V$=Math.min,og=Math.max,w0=Math.round,Nc=t=>({x:t,y:t}),_re={left:"right",right:"left",bottom:"top",top:"bottom"},yre={start:"end",end:"start"};function Y4(t,e){return typeof t=="function"?t(e):t}function zf(t){return t.split("-")[0]}function Jb(t){return t.split("-")[1]}function bre(t){return t==="x"?"y":"x"}function JD(t){return t==="y"?"height":"width"}function Qg(t){return["top","bottom"].includes(zf(t))?"y":"x"}function QD(t){return bre(Qg(t))}function wre(t,e,n){n===void 0&&(n=!1);const i=Jb(t),s=QD(t),o=JD(s);let r=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(r=k0(r)),[r,k0(r)]}function kre(t){const e=k0(t);return[tC(t),e,tC(e)]}function tC(t){return t.replace(/start|end/g,e=>yre[e])}function Cre(t,e,n){const i=["left","right"],s=["right","left"],o=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:i:e?i:s;case"left":case"right":return e?o:r;default:return[]}}function xre(t,e,n,i){const s=Jb(t);let o=Cre(zf(t),n==="start",i);return s&&(o=o.map(r=>r+"-"+s),e&&(o=o.concat(o.map(tC)))),o}function k0(t){return t.replace(/left|right|bottom|top/g,e=>_re[e])}function Sre(t){return{top:0,right:0,bottom:0,left:0,...t}}function $re(t){return typeof t!="number"?Sre(t):{top:t,right:t,bottom:t,left:t}}function C0(t){const{x:e,y:n,width:i,height:s}=t;return{width:i,height:s,top:n,left:e,right:e+i,bottom:n+s,x:e,y:n}}function F$(t,e,n){let{reference:i,floating:s}=t;const o=Qg(e),r=QD(e),a=JD(r),l=zf(e),c=o==="y",u=i.x+i.width/2-s.width/2,d=i.y+i.height/2-s.height/2,h=i[a]/2-s[a]/2;let f;switch(l){case"top":f={x:u,y:i.y-s.height};break;case"bottom":f={x:u,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:d};break;case"left":f={x:i.x-s.width,y:d};break;default:f={x:i.x,y:i.y}}switch(Jb(e)){case"start":f[r]-=h*(n&&c?-1:1);break;case"end":f[r]+=h*(n&&c?-1:1);break}return f}const Are=async(t,e,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:r}=n,a=o.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(e));let c=await r.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:d}=F$(c,i,l),h=i,f={},p=0;for(let m=0;m<a.length;m++){const{name:b,fn:w}=a[m],{x:k,y:C,data:A,reset:S}=await w({x:u,y:d,initialPlacement:i,placement:h,strategy:s,middlewareData:f,rects:c,platform:r,elements:{reference:t,floating:e}});u=k??u,d=C??d,f={...f,[b]:{...f[b],...A}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(c=S.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:s}):S.rects),{x:u,y:d}=F$(c,h,l)),m=-1)}return{x:u,y:d,placement:h,strategy:s,middlewareData:f}};async function Ere(t,e){var n;e===void 0&&(e={});const{x:i,y:s,platform:o,rects:r,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=Y4(e,t),p=$re(f),b=a[h?d==="floating"?"reference":"floating":d],w=C0(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),k=d==="floating"?{x:i,y:s,width:r.floating.width,height:r.floating.height}:r.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),A=await(o.isElement==null?void 0:o.isElement(C))?await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1}:{x:1,y:1},S=C0(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:k,offsetParent:C,strategy:l}):k);return{top:(w.top-S.top+p.top)/A.y,bottom:(S.bottom-w.bottom+p.bottom)/A.y,left:(w.left-S.left+p.left)/A.x,right:(S.right-w.right+p.right)/A.x}}const Mre=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:s,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...b}=Y4(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const w=zf(s),k=Qg(a),C=zf(a)===a,A=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=h||(C||!m?[k0(a)]:kre(a)),M=p!=="none";!h&&M&&S.push(...xre(a,m,p,A));const P=[a,...S],T=await Ere(e,b),I=[];let L=((i=o.flip)==null?void 0:i.overflows)||[];if(u&&I.push(T[w]),d){const F=wre(s,r,A);I.push(T[F[0]],T[F[1]])}if(L=[...L,{placement:s,overflows:I}],!I.every(F=>F<=0)){var R,V;const F=(((R=o.flip)==null?void 0:R.index)||0)+1,U=P[F];if(U)return{data:{index:F,overflows:L},reset:{placement:U}};let Y=(V=L.filter(z=>z.overflows[0]<=0).sort((z,X)=>z.overflows[1]-X.overflows[1])[0])==null?void 0:V.placement;if(!Y)switch(f){case"bestFit":{var H;const z=(H=L.filter(X=>{if(M){const Z=Qg(X.placement);return Z===k||Z==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(Z=>Z>0).reduce((Z,G)=>Z+G,0)]).sort((X,Z)=>X[1]-Z[1])[0])==null?void 0:H[0];z&&(Y=z);break}case"initialPlacement":Y=a;break}if(s!==Y)return{reset:{placement:Y}}}return{}}}};async function Tre(t,e){const{placement:n,platform:i,elements:s}=t,o=await(i.isRTL==null?void 0:i.isRTL(s.floating)),r=zf(n),a=Jb(n),l=Qg(n)==="y",c=["left","top"].includes(r)?-1:1,u=o&&l?-1:1,d=Y4(e,t);let{mainAxis:h,crossAxis:f,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(f=a==="end"?p*-1:p),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const Pre=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:s,y:o,placement:r,middlewareData:a}=e,l=await Tre(e,t);return r===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:r}}}}};function fp(t){return eR(t)?(t.nodeName||"").toLowerCase():"#document"}function No(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Kc(t){var e;return(e=(eR(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function eR(t){return t instanceof Node||t instanceof No(t).Node}function Jr(t){return t instanceof Element||t instanceof No(t).Element}function La(t){return t instanceof HTMLElement||t instanceof No(t).HTMLElement}function N$(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof No(t).ShadowRoot}function z1(t){const{overflow:e,overflowX:n,overflowY:i,display:s}=Qr(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(s)}function Ire(t){return["table","td","th"].includes(fp(t))}function Qb(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function q4(t){const e=G4(),n=Jr(t)?Qr(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function Lre(t){let e=Bc(t);for(;La(e)&&!Hf(e);){if(q4(e))return e;if(Qb(e))return null;e=Bc(e)}return null}function G4(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Hf(t){return["html","body","#document"].includes(fp(t))}function Qr(t){return No(t).getComputedStyle(t)}function e2(t){return Jr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Bc(t){if(fp(t)==="html")return t;const e=t.assignedSlot||t.parentNode||N$(t)&&t.host||Kc(t);return N$(e)?e.host:e}function tR(t){const e=Bc(t);return Hf(e)?t.ownerDocument?t.ownerDocument.body:t.body:La(e)&&z1(e)?e:tR(e)}function nC(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=tR(t),o=s===((i=t.ownerDocument)==null?void 0:i.body),r=No(s);if(o){const a=sC(r);return e.concat(r,r.visualViewport||[],z1(s)?s:[],a&&n?nC(a):[])}return e.concat(s,nC(s,[],n))}function sC(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function nR(t){const e=Qr(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=La(t),o=s?t.offsetWidth:n,r=s?t.offsetHeight:i,a=w0(n)!==o||w0(i)!==r;return a&&(n=o,i=r),{width:n,height:i,$:a}}function sR(t){return Jr(t)?t:t.contextElement}function af(t){const e=sR(t);if(!La(e))return Nc(1);const n=e.getBoundingClientRect(),{width:i,height:s,$:o}=nR(e);let r=(o?w0(n.width):n.width)/i,a=(o?w0(n.height):n.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const Ore=Nc(0);function iR(t){const e=No(t);return!G4()||!e.visualViewport?Ore:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Dre(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==No(t)?!1:e}function e1(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),o=sR(t);let r=Nc(1);e&&(i?Jr(i)&&(r=af(i)):r=af(t));const a=Dre(o,n,i)?iR(o):Nc(0);let l=(s.left+a.x)/r.x,c=(s.top+a.y)/r.y,u=s.width/r.x,d=s.height/r.y;if(o){const h=No(o),f=i&&Jr(i)?No(i):i;let p=h,m=sC(p);for(;m&&i&&f!==p;){const b=af(m),w=m.getBoundingClientRect(),k=Qr(m),C=w.left+(m.clientLeft+parseFloat(k.paddingLeft))*b.x,A=w.top+(m.clientTop+parseFloat(k.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=C,c+=A,p=No(m),m=sC(p)}}return C0({width:u,height:d,x:l,y:c})}function Rre(t){let{elements:e,rect:n,offsetParent:i,strategy:s}=t;const o=s==="fixed",r=Kc(i),a=e?Qb(e.floating):!1;if(i===r||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Nc(1);const u=Nc(0),d=La(i);if((d||!d&&!o)&&((fp(i)!=="body"||z1(r))&&(l=e2(i)),La(i))){const h=e1(i);c=af(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function Vre(t){return Array.from(t.getClientRects())}function oR(t){return e1(Kc(t)).left+e2(t).scrollLeft}function Fre(t){const e=Kc(t),n=e2(t),i=t.ownerDocument.body,s=og(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),o=og(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let r=-n.scrollLeft+oR(t);const a=-n.scrollTop;return Qr(i).direction==="rtl"&&(r+=og(e.clientWidth,i.clientWidth)-s),{width:s,height:o,x:r,y:a}}function Nre(t,e){const n=No(t),i=Kc(t),s=n.visualViewport;let o=i.clientWidth,r=i.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;const c=G4();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a,y:l}}function Bre(t,e){const n=e1(t,!0,e==="fixed"),i=n.top+t.clientTop,s=n.left+t.clientLeft,o=La(t)?af(t):Nc(1),r=t.clientWidth*o.x,a=t.clientHeight*o.y,l=s*o.x,c=i*o.y;return{width:r,height:a,x:l,y:c}}function B$(t,e,n){let i;if(e==="viewport")i=Nre(t,n);else if(e==="document")i=Fre(Kc(t));else if(Jr(e))i=Bre(e,n);else{const s=iR(t);i={...e,x:e.x-s.x,y:e.y-s.y}}return C0(i)}function rR(t,e){const n=Bc(t);return n===e||!Jr(n)||Hf(n)?!1:Qr(n).position==="fixed"||rR(n,e)}function zre(t,e){const n=e.get(t);if(n)return n;let i=nC(t,[],!1).filter(a=>Jr(a)&&fp(a)!=="body"),s=null;const o=Qr(t).position==="fixed";let r=o?Bc(t):t;for(;Jr(r)&&!Hf(r);){const a=Qr(r),l=q4(r);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||z1(r)&&!l&&rR(t,r))?i=i.filter(u=>u!==r):s=a,r=Bc(r)}return e.set(t,i),i}function Hre(t){let{element:e,boundary:n,rootBoundary:i,strategy:s}=t;const r=[...n==="clippingAncestors"?Qb(e)?[]:zre(e,this._c):[].concat(n),i],a=r[0],l=r.reduce((c,u)=>{const d=B$(e,u,s);return c.top=og(d.top,c.top),c.right=V$(d.right,c.right),c.bottom=V$(d.bottom,c.bottom),c.left=og(d.left,c.left),c},B$(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ure(t){const{width:e,height:n}=nR(t);return{width:e,height:n}}function jre(t,e,n){const i=La(e),s=Kc(e),o=n==="fixed",r=e1(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Nc(0);if(i||!i&&!o)if((fp(e)!=="body"||z1(s))&&(a=e2(e)),i){const d=e1(e,!0,o,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else s&&(l.x=oR(s));const c=r.left+a.scrollLeft-l.x,u=r.top+a.scrollTop-l.y;return{x:c,y:u,width:r.width,height:r.height}}function Ew(t){return Qr(t).position==="static"}function z$(t,e){return!La(t)||Qr(t).position==="fixed"?null:e?e(t):t.offsetParent}function aR(t,e){const n=No(t);if(Qb(t))return n;if(!La(t)){let s=Bc(t);for(;s&&!Hf(s);){if(Jr(s)&&!Ew(s))return s;s=Bc(s)}return n}let i=z$(t,e);for(;i&&Ire(i)&&Ew(i);)i=z$(i,e);return i&&Hf(i)&&Ew(i)&&!q4(i)?n:i||Lre(t)||n}const Wre=async function(t){const e=this.getOffsetParent||aR,n=this.getDimensions,i=await n(t.floating);return{reference:jre(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Yre(t){return Qr(t).direction==="rtl"}const qre={convertOffsetParentRelativeRectToViewportRelativeRect:Rre,getDocumentElement:Kc,getClippingRect:Hre,getOffsetParent:aR,getElementRects:Wre,getClientRects:Vre,getDimensions:Ure,getScale:af,isElement:Jr,isRTL:Yre},iC=Pre,oC=Mre,rC=(t,e,n)=>{const i=new Map,s={platform:qre,...n},o={...s.platform,_c:i};return Are(t,e,{...s,platform:o})};function Gre(t){let e;function n(){if(t.value==null)return;const{selectionStart:s,selectionEnd:o,value:r}=t.value;s==null||o==null||(e={selectionStart:s,selectionEnd:o,value:r,beforeTxt:r.slice(0,Math.max(0,s)),afterTxt:r.slice(Math.max(0,o))})}function i(){if(t.value==null||e==null)return;const{value:s}=t.value,{beforeTxt:o,afterTxt:r,selectionStart:a}=e;if(o==null||r==null||a==null)return;let l=s.length;if(s.endsWith(r))l=s.length-r.length;else if(s.startsWith(o))l=o.length;else{const c=o[a-1],u=s.indexOf(c,a-1);u!==-1&&(l=u+1)}t.value.setSelectionRange(l,l)}return[n,i]}let Mw=function(t){return t[t.TEXT=1]="TEXT",t[t.CLASS=2]="CLASS",t[t.STYLE=4]="STYLE",t[t.PROPS=8]="PROPS",t[t.FULL_PROPS=16]="FULL_PROPS",t[t.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",t[t.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",t[t.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",t[t.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",t[t.NEED_PATCH=512]="NEED_PATCH",t[t.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",t[t.HOISTED=-1]="HOISTED",t[t.BAIL=-2]="BAIL",t}({});function Xre(t){return is(t)&&t.type===Zn}const kc=t=>{const e=Ee(t)?t:[t],n=[];return e.forEach(i=>{var s;Ee(i)?n.push(...kc(i)):is(i)&&((s=i.component)!=null&&s.subTree)?n.push(i,...kc(i.component.subTree)):is(i)&&Ee(i.children)?n.push(...kc(i.children)):is(i)&&i.shapeFlag===2?n.push(...kc(i.type())):n.push(i)}),n},Kre=(t,e,n)=>kc(t.subTree).filter(i=>{var s;return is(i)&&((s=i.type)==null?void 0:s.name)===e&&!!i.component}).map(i=>i.component.uid).map(i=>n[i]).filter(i=>!!i),Zre=(t,e)=>{const n=Fn({}),i=Fn([]),s=new WeakMap,o=c=>{n.value[c.uid]=c,Ym(n),Nt(()=>{const u=c.getVnode().el,d=u.parentNode;if(!s.has(d)){s.set(d,[]);const h=d.insertBefore.bind(d);d.insertBefore=(f,p)=>(s.get(d).some(m=>f===m||p===m)&&Ym(n),h(f,p))}s.get(d).push(u)})},r=c=>{delete n.value[c.uid],Ym(n);const u=c.getVnode().el,d=u.parentNode,h=s.get(d),f=h.indexOf(u);h.splice(f,1)},a=()=>{i.value=Kre(t,e,n.value)},l=c=>c.render();return{children:i,addChild:o,removeChild:r,ChildrenSorter:fe({setup(c,{slots:u}){return()=>(a(),u.default?bt(l,{render:u.default}):null)}})}},Zi=qb({type:String,values:$l,required:!1}),lR=Symbol("size"),cR=()=>{const t=qe(lR,{});return W(()=>E(t.size)||"")};function pp(t,{disabled:e,beforeFocus:n,afterFocus:i,beforeBlur:s,afterBlur:o}={}){const{emit:r}=pt(),a=Fn(),l=ee(!1),c=h=>{const f=et(n)?n(h):!1;E(e)||l.value||f||(l.value=!0,r("focus",h),i==null||i())},u=h=>{var p;const f=et(s)?s(h):!1;E(e)||h.relatedTarget&&((p=a.value)!=null&&p.contains(h.relatedTarget))||f||(l.value=!1,r("blur",h),o==null||o())},d=h=>{var f,p;E(e)||Xg(h.target)||(f=a.value)!=null&&f.contains(document.activeElement)&&a.value!==document.activeElement||(p=t.value)==null||p.focus()};return Te([a,()=>E(e)],([h,f])=>{h&&(f?h.removeAttribute("tabindex"):h.setAttribute("tabindex","-1"))}),Hn(a,"focus",c,!0),Hn(a,"blur",u,!0),Hn(a,"click",d,!0),{isFocused:l,wrapperRef:a,handleFocus:c,handleBlur:u}}function X4({afterComposition:t,emit:e}){const n=ee(!1),i=a=>{e==null||e("compositionstart",a),n.value=!0},s=a=>{e==null||e("compositionupdate",a),n.value=!0},o=a=>{e==null||e("compositionend",a),n.value&&(n.value=!1,ot(()=>t(a)))};return{isComposing:n,handleComposition:a=>{a.type==="compositionend"?o(a):s(a)},handleCompositionStart:i,handleCompositionUpdate:s,handleCompositionEnd:o}}const uR=Symbol("emptyValuesContextKey"),Jre="use-empty-values",Qre=["",void 0,null],eae=void 0,H1=Ge({emptyValues:Array,valueOnClear:{type:de([String,Number,Boolean,Function]),default:void 0,validator:t=>(t=et(t)?t():t,Ee(t)?t.every(e=>!e):!t)}}),K4=(t,e)=>{const n=pt()?qe(uR,ee({})):ee({}),i=W(()=>t.emptyValues||n.value.emptyValues||Qre),s=W(()=>et(t.valueOnClear)?t.valueOnClear():t.valueOnClear!==void 0?t.valueOnClear:et(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:e!==void 0?e:eae),o=r=>{let a=!0;return Ee(r)?a=i.value.some(l=>Wi(r,l)):a=i.value.includes(r),a};return o(s.value)||Tt(Jre,"value-on-clear should be a value of empty-values"),{emptyValues:i,valueOnClear:s,isEmptyValue:o}},tae=Ge({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Sr=t=>M4(tae,t),dR=t=>{const e=t.props,n=Ee(e)?Df(e.map(i=>[i,{}])):e;t.setPropsDefaults=i=>{if(n){for(const[s,o]of Object.entries(i)){const r=n[s];if(zt(n,s)){if($4(r)){n[s]={...r,default:o};continue}n[s]={type:r,default:o}}}t.props=n}}},Gt=(t,e)=>{if(t.install=n=>{for(const i of[t,...Object.values(e??{})])n.component(i.name,i)},e)for(const[n,i]of Object.entries(e))t[n]=i;return dR(t),t},nae=(t,e)=>(t.install=n=>{t._context=n._context,n.config.globalProperties[e]=t},t),sae=(t,e)=>(t.install=n=>{n.directive(e,t)},t),Os=t=>(t.install=Dt,dR(t),t);var iae=fe({__name:"teleport",props:P4,setup(t){return(e,n)=>e.disabled?le(e.$slots,"default",{key:0}):(v(),D(na,{key:1,to:e.to},[le(e.$slots,"default")],8,["to"]))}}),oae=iae;const t2=Gt(oae);/*! Element Plus Icons Vue v2.3.2 */var rae=fe({name:"ArrowDownBold",__name:"arrow-down-bold",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M104.704 338.752a64 64 0 0 1 90.496 0l316.8 316.8 316.8-316.8a64 64 0 0 1 90.496 90.496L557.248 791.296a64 64 0 0 1-90.496 0L104.704 429.248a64 64 0 0 1 0-90.496"})]))}}),aae=rae,lae=fe({name:"ArrowDown",__name:"arrow-down",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"})]))}}),zd=lae,cae=fe({name:"ArrowLeftBold",__name:"arrow-left-bold",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M685.248 104.704a64 64 0 0 1 0 90.496L368.448 512l316.8 316.8a64 64 0 0 1-90.496 90.496L232.704 557.248a64 64 0 0 1 0-90.496l362.048-362.048a64 64 0 0 1 90.496 0"})]))}}),uae=cae,dae=fe({name:"ArrowLeft",__name:"arrow-left",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.59 30.59 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.59 30.59 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0"})]))}}),wd=dae,hae=fe({name:"ArrowRight",__name:"arrow-right",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M340.864 149.312a30.59 30.59 0 0 0 0 42.752L652.736 512 340.864 831.872a30.59 30.59 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),jr=hae,fae=fe({name:"ArrowUp",__name:"arrow-up",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),n2=fae,pae=fe({name:"Avatar",__name:"avatar",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M628.736 528.896A416 416 0 0 1 928 928H96a415.87 415.87 0 0 1 299.264-399.104L512 704zM720 304a208 208 0 1 1-416 0 208 208 0 0 1 416 0"})]))}}),mae=pae,gae=fe({name:"Back",__name:"back",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),g("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"})]))}}),hR=gae,vae=fe({name:"Bell",__name:"bell",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a64 64 0 0 1 64 64v64H448v-64a64 64 0 0 1 64-64"}),g("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"}),g("path",{fill:"currentColor",d:"M96 768h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32m352 128h128a64 64 0 0 1-128 0"})]))}}),_ae=vae,yae=fe({name:"Bottom",__name:"bottom",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),bae=yae,wae=fe({name:"Calendar",__name:"calendar",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),kae=wae,Cae=fe({name:"CameraFilled",__name:"camera-filled",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),xae=Cae,Sae=fe({name:"CaretBottom",__name:"caret-bottom",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m192 384 320 384 320-384z"})]))}}),$ae=Sae,Aae=fe({name:"ChatDotRound",__name:"chat-dot-round",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.06 461.06 0 0 1-206.912-48.384l-175.616 58.56z"}),g("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"})]))}}),Eae=Aae,Mae=fe({name:"ChatDotSquare",__name:"chat-dot-square",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"}),g("path",{fill:"currentColor",d:"M512 499.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4"})]))}}),Tae=Mae,Pae=fe({name:"Check",__name:"check",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),Z4=Pae,Iae=fe({name:"CircleCheck",__name:"circle-check",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"}),g("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z"})]))}}),J4=Iae,Lae=fe({name:"CircleCloseFilled",__name:"circle-close-filled",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),fR=Lae,Oae=fe({name:"CircleClose",__name:"circle-close",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"}),g("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"})]))}}),Zc=Oae,Dae=fe({name:"Clock",__name:"clock",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"}),g("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),g("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),pR=Dae,Rae=fe({name:"CloseBold",__name:"close-bold",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496"})]))}}),mR=Rae,Vae=fe({name:"Close",__name:"close",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),Ho=Vae,Fae=fe({name:"Comment",__name:"comment",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),Nae=Fae,Bae=fe({name:"CopyDocument",__name:"copy-document",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z"}),g("path",{fill:"currentColor",d:"M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64"})]))}}),gR=Bae,zae=fe({name:"DArrowLeft",__name:"d-arrow-left",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672zm256 0a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672z"})]))}}),zc=zae,Hae=fe({name:"DArrowRight",__name:"d-arrow-right",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.59 30.59 0 0 1 0-42.752L764.736 512 452.864 192a30.59 30.59 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.59 30.59 0 0 1 0-42.752L508.736 512 196.864 192a30.59 30.59 0 0 1 0-42.688"})]))}}),Hc=Hae,Uae=fe({name:"DeleteFilled",__name:"delete-filled",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),jae=Uae,Wae=fe({name:"Delete",__name:"delete",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),mp=Wae,Yae=fe({name:"Document",__name:"document",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),U1=Yae,qae=fe({name:"Download",__name:"download",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),Gae=qae,Xae=fe({name:"EditPen",__name:"edit-pen",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64z"})]))}}),vR=Xae,Kae=fe({name:"Edit",__name:"edit",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),g("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),_R=Kae,Zae=fe({name:"Expand",__name:"expand",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M128 192h768v128H128zm0 256h512v128H128zm0 256h768v128H128zm576-352 192 160-192 128z"})]))}}),Jae=Zae,Qae=fe({name:"FullScreen",__name:"full-screen",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),yR=Qae,ele=fe({name:"Guide",__name:"guide",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"}),g("path",{fill:"currentColor",d:"m220.8 256-71.232 80 71.168 80H768V256zm-14.4-64H800a32 32 0 0 1 32 32v224a32 32 0 0 1-32 32H206.4a32 32 0 0 1-23.936-10.752l-99.584-112a32 32 0 0 1 0-42.496l99.584-112A32 32 0 0 1 206.4 192m678.784 496-71.104 80H266.816V608h547.2zm-56.768-144H234.88a32 32 0 0 0-32 32v224a32 32 0 0 0 32 32h593.6a32 32 0 0 0 23.936-10.752l99.584-112a32 32 0 0 0 0-42.496l-99.584-112A32 32 0 0 0 828.48 544z"})]))}}),tle=ele,nle=fe({name:"Hide",__name:"hide",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176"}),g("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112s-67.2 48-112 48"})]))}}),Q4=nle,sle=fe({name:"Histogram",__name:"histogram",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M416 896V128h192v768zm-288 0V448h192v448zm576 0V320h192v576z"})]))}}),ile=sle,ole=fe({name:"HomeFilled",__name:"home-filled",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 128 128 447.936V896h255.936V640H640v256h255.936V447.936z"})]))}}),rle=ole,ale=fe({name:"InfoFilled",__name:"info-filled",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),wl=ale,lle=fe({name:"Iphone",__name:"iphone",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),cle=lle,ule=fe({name:"Link",__name:"link",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M715.648 625.152 670.4 579.904l90.496-90.56c75.008-74.944 85.12-186.368 22.656-248.896-62.528-62.464-173.952-52.352-248.96 22.656L444.16 353.6l-45.248-45.248 90.496-90.496c100.032-99.968 251.968-110.08 339.456-22.656 87.488 87.488 77.312 239.424-22.656 339.456l-90.496 90.496zm-90.496 90.496-90.496 90.496C434.624 906.112 282.688 916.224 195.2 828.8c-87.488-87.488-77.312-239.424 22.656-339.456l90.496-90.496 45.248 45.248-90.496 90.56c-75.008 74.944-85.12 186.368-22.656 248.896 62.528 62.464 173.952 52.352 248.96-22.656l90.496-90.496zm0-362.048 45.248 45.248L398.848 670.4 353.6 625.152z"})]))}}),bR=ule,dle=fe({name:"Loading",__name:"loading",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),Uf=dle,hle=fe({name:"Lock",__name:"lock",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"}),g("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"})]))}}),wR=hle,fle=fe({name:"Memo",__name:"memo",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",viewBox:"0 0 1024 1024"},[g("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"}),g("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"}),g("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"})]))}}),ple=fle,mle=fe({name:"Message",__name:"message",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"}),g("path",{fill:"currentColor",d:"M904 224 656.512 506.88a192 192 0 0 1-289.024 0L120 224zm-698.944 0 210.56 240.704a128 128 0 0 0 192.704 0L818.944 224z"})]))}}),gle=mle,vle=fe({name:"Minus",__name:"minus",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),_le=vle,yle=fe({name:"Money",__name:"money",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M256 640v192h640V384H768v-64h150.976c14.272 0 19.456 1.472 24.64 4.288a29.06 29.06 0 0 1 12.16 12.096c2.752 5.184 4.224 10.368 4.224 24.64v493.952c0 14.272-1.472 19.456-4.288 24.64a29.06 29.06 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H233.024c-14.272 0-19.456-1.472-24.64-4.288a29.06 29.06 0 0 1-12.16-12.096c-2.688-5.184-4.224-10.368-4.224-24.576V640z"}),g("path",{fill:"currentColor",d:"M768 192H128v448h640zm64-22.976v493.952c0 14.272-1.472 19.456-4.288 24.64a29.06 29.06 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H105.024c-14.272 0-19.456-1.472-24.64-4.288a29.06 29.06 0 0 1-12.16-12.096C65.536 682.432 64 677.248 64 663.04V169.024c0-14.272 1.472-19.456 4.288-24.64a29.06 29.06 0 0 1 12.096-12.16C85.568 129.536 90.752 128 104.96 128h685.952c14.272 0 19.456 1.472 24.64 4.288a29.06 29.06 0 0 1 12.16 12.096c2.752 5.184 4.224 10.368 4.224 24.64z"}),g("path",{fill:"currentColor",d:"M448 576a160 160 0 1 1 0-320 160 160 0 0 1 0 320m0-64a96 96 0 1 0 0-192 96 96 0 0 0 0 192"})]))}}),ble=yle,wle=fe({name:"MoreFilled",__name:"more-filled",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),aC=wle,kle=fe({name:"More",__name:"more",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),Cle=kle,xle=fe({name:"Notebook",__name:"notebook",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"}),g("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"})]))}}),Sle=xle,$le=fe({name:"Operation",__name:"operation",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),Ale=$le,Ele=fe({name:"PictureFilled",__name:"picture-filled",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),Mle=Ele,Tle=fe({name:"Picture",__name:"picture",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"}),g("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64-64-64 64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"})]))}}),Ple=Tle,Ile=fe({name:"Plus",__name:"plus",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),e8=Ile,Lle=fe({name:"Postcard",__name:"postcard",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"}),g("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"})]))}}),Ole=Lle,Dle=fe({name:"Reading",__name:"reading",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m512 863.36 384-54.848v-638.72L525.568 222.72a96 96 0 0 1-27.136 0L128 169.792v638.72zM137.024 106.432l370.432 52.928a32 32 0 0 0 9.088 0l370.432-52.928A64 64 0 0 1 960 169.792v638.72a64 64 0 0 1-54.976 63.36l-388.48 55.488a32 32 0 0 1-9.088 0l-388.48-55.488A64 64 0 0 1 64 808.512v-638.72a64 64 0 0 1 73.024-63.36"}),g("path",{fill:"currentColor",d:"M480 192h64v704h-64z"})]))}}),Rle=Dle,Vle=fe({name:"RefreshLeft",__name:"refresh-left",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),kR=Vle,Fle=fe({name:"RefreshRight",__name:"refresh-right",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88"})]))}}),Nle=Fle,Ble=fe({name:"ScaleToOriginal",__name:"scale-to-original",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118m-361.412 0a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118M512 361.412a30.12 30.12 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.12 30.12 0 0 0 512 361.412M512 512a30.12 30.12 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.12 30.12 0 0 0 512 512"})]))}}),zle=Ble,Hle=fe({name:"Search",__name:"search",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),j1=Hle,Ule=fe({name:"SuccessFilled",__name:"success-filled",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),t8=Ule,jle=fe({name:"Tickets",__name:"tickets",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),Wle=jle,Yle=fe({name:"Timer",__name:"timer",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"}),g("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"}),g("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"})]))}}),qle=Yle,Gle=fe({name:"Top",__name:"top",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),Xle=Gle,Kle=fe({name:"UploadFilled",__name:"upload-filled",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M544 864V672h128L512 480 352 672h128v192H320v-1.6c-5.376.32-10.496 1.6-16 1.6A240 240 0 0 1 64 624c0-123.136 93.12-223.488 212.608-237.248A239.81 239.81 0 0 1 512 192a239.87 239.87 0 0 1 235.456 194.752c119.488 13.76 212.48 114.112 212.48 237.248a240 240 0 0 1-240 240c-5.376 0-10.56-1.28-16-1.6v1.6z"})]))}}),n8=Kle,Zle=fe({name:"VideoPlay",__name:"video-play",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),Jle=Zle,Qle=fe({name:"View",__name:"view",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),s8=Qle,ece=fe({name:"WarningFilled",__name:"warning-filled",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),i8=ece,tce=fe({name:"ZoomIn",__name:"zoom-in",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),CR=tce,nce=fe({name:"ZoomOut",__name:"zoom-out",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})]))}}),sce=nce;const ds=de([String,Object,Function]),ice={Close:Ho},xR={Close:Ho,SuccessFilled:t8,InfoFilled:wl,WarningFilled:i8,CircleCloseFilled:fR},jf={primary:wl,success:t8,warning:i8,error:fR,info:wl},o8={validating:Uf,success:J4,error:Zc},oce=["light","dark"],rce=Ge({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:y0(jf),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:oce,default:"light"}}),ace={close:t=>t instanceof MouseEvent},lce=Ge({size:{type:de([Number,String])},color:{type:String}});var cce=fe({name:"ElIcon",inheritAttrs:!1,__name:"icon",props:lce,setup(t){const e=t,n=Be("icon"),i=W(()=>{const{size:s,color:o}=e,r=pi(s);return!r&&!o?{}:{fontSize:r,"--color":o}});return(s,o)=>(v(),$("i",Yt({class:E(n).b(),style:i.value},s.$attrs),[le(s.$slots,"default")],16))}}),uce=cce;const we=Gt(uce);var dce=fe({name:"ElAlert",__name:"alert",props:rce,emits:ace,setup(t,{emit:e}){const{Close:n}=xR,i=t,s=e,o=gi(),r=Be("alert"),a=ee(!0),l=W(()=>jf[i.type]),c=W(()=>{var h;if(i.description)return!0;const d=(h=o.default)==null?void 0:h.call(o);return d?kc(d).some(f=>!Xre(f)):!1}),u=d=>{a.value=!1,s("close",d)};return(d,h)=>(v(),D(jo,{name:E(r).b("fade"),persisted:""},{default:y(()=>[Re(g("div",{class:q([E(r).b(),E(r).m(t.type),E(r).is("center",t.center),E(r).is(t.effect)]),role:"alert"},[t.showIcon&&(d.$slots.icon||l.value)?(v(),D(E(we),{key:0,class:q([E(r).e("icon"),E(r).is("big",c.value)])},{default:y(()=>[le(d.$slots,"icon",{},()=>[(v(),D(Ct(l.value)))])]),_:3},8,["class"])):O("v-if",!0),g("div",{class:q(E(r).e("content"))},[t.title||d.$slots.title?(v(),$("span",{key:0,class:q([E(r).e("title"),{"with-description":c.value}])},[le(d.$slots,"title",{},()=>[N(x(t.title),1)])],2)):O("v-if",!0),c.value?(v(),$("p",{key:1,class:q(E(r).e("description"))},[le(d.$slots,"default",{},()=>[N(x(t.description),1)])],2)):O("v-if",!0),t.closable?(v(),$(J,{key:2},[t.closeText?(v(),$("div",{key:0,class:q([E(r).e("close-btn"),E(r).is("customed")]),onClick:u},x(t.closeText),3)):(v(),D(E(we),{key:1,class:q(E(r).e("close-btn")),onClick:u},{default:y(()=>[_(E(n))]),_:1},8,["class"]))],64)):O("v-if",!0)],2)],2),[[jt,a.value]])]),_:3},8,["name"]))}}),hce=dce;const oa=Gt(hce),SR=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],$R=Ge({role:{type:String,values:SR,default:"tooltip"}}),r8=Symbol("popper"),AR=Symbol("popperContent");var fce=fe({name:"ElPopperArrow",inheritAttrs:!1,__name:"arrow",setup(t,{expose:e}){const n=Be("popper"),{arrowRef:i,arrowStyle:s}=qe(AR,void 0);return wn(()=>{i.value=void 0}),e({arrowRef:i}),(o,r)=>(v(),$("span",{ref_key:"arrowRef",ref:i,class:q(E(n).e("arrow")),style:Xe(E(s)),"data-popper-arrow":""},null,6))}}),pce=fce;const ER=Ge({virtualRef:{type:de(Object)},virtualTriggering:Boolean,onMouseenter:{type:de(Function)},onMouseleave:{type:de(Function)},onClick:{type:de(Function)},onKeydown:{type:de(Function)},onFocus:{type:de(Function)},onBlur:{type:de(Function)},onContextmenu:{type:de(Function)},id:String,open:Boolean}),Tw="ElOnlyChild",MR=fe({name:Tw,setup(t,{slots:e,attrs:n}){var s;const i=vre(((s=qe(XD))==null?void 0:s.setForwardRef)??Dt);return()=>{var l;const o=(l=e.default)==null?void 0:l.call(e,n);if(!o)return null;const[r,a]=TR(o);return r?(a>1&&Tt(Tw,"requires exact only one valid child."),Re(_r(r,n),[[i]])):(Tt(Tw,"no valid child node found"),null)}}});function TR(t){if(!t)return[null,0];const e=t,n=e.filter(i=>i.type!==Zn).length;for(const i of e){if(yt(i))switch(i.type){case Zn:continue;case $a:case"svg":return[H$(i),n];case J:return TR(i.children);default:return[i,n]}return[H$(i),n]}return[null,0]}function H$(t){const e=Be("only-child");return _("span",{class:e.e("content")},[t])}var mce=fe({name:"ElPopperTrigger",inheritAttrs:!1,__name:"trigger",props:ER,setup(t,{expose:e}){const n=t,{role:i,triggerRef:s}=qe(r8,void 0);gre(s);const o=W(()=>a.value?n.id:void 0),r=W(()=>{if(i&&i.value==="tooltip")return n.open&&n.id?n.id:void 0}),a=W(()=>{if(i&&i.value!=="tooltip")return i.value}),l=W(()=>a.value?`${n.open}`:void 0);let c;const u=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return Nt(()=>{Te(()=>n.virtualRef,d=>{d&&(s.value=Ws(d))},{immediate:!0}),Te(s,(d,h)=>{c==null||c(),c=void 0,Lo(h)&&u.forEach(f=>{const p=n[f];p&&h.removeEventListener(f.slice(2).toLowerCase(),p,["onFocus","onBlur"].includes(f))}),Lo(d)&&(u.forEach(f=>{const p=n[f];p&&d.addEventListener(f.slice(2).toLowerCase(),p,["onFocus","onBlur"].includes(f))}),Xg(d)&&(c=Te([o,r,a,l],f=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((p,m)=>{hi(f[m])?d.removeAttribute(p):d.setAttribute(p,f[m])})},{immediate:!0}))),Lo(h)&&Xg(h)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(f=>h.removeAttribute(f))},{immediate:!0})}),wn(()=>{if(c==null||c(),c=void 0,s.value&&Lo(s.value)){const d=s.value;u.forEach(h=>{const f=n[h];f&&d.removeEventListener(h.slice(2).toLowerCase(),f,["onFocus","onBlur"].includes(h))}),s.value=void 0}}),e({triggerRef:s}),(d,h)=>t.virtualTriggering?O("v-if",!0):(v(),D(E(MR),Yt({key:0},d.$attrs,{"aria-controls":o.value,"aria-describedby":r.value,"aria-expanded":l.value,"aria-haspopup":a.value}),{default:y(()=>[le(d.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}}),gce=mce;const PR=Ge({arrowOffset:{type:Number,default:5}}),vce=["fixed","absolute"],_ce=Ge({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:de(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:hp,default:"bottom"},popperOptions:{type:de(Object),default:()=>({})},strategy:{type:String,values:vce,default:"absolute"}}),IR=Ge({..._ce,...PR,id:String,style:{type:de([String,Array,Object])},className:{type:de([String,Array,Object])},effect:{type:de(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:Boolean,trapping:Boolean,popperClass:{type:de([String,Array,Object])},popperStyle:{type:de([String,Array,Object])},referenceEl:{type:de(Object)},triggerTargetEl:{type:de(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...Sr(["ariaLabel"]),loop:Boolean}),yce={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},bce=Ge({size:{type:String,values:$l},disabled:Boolean}),wce=Ge({...bce,model:Object,rules:{type:de(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:de([Object,Boolean]),default:!0}}),kce={validate:(t,e,n)=>(Ee(t)||Ke(t))&&Jn(e)&&Ke(n)},Hd=Symbol("formContextKey"),kd=Symbol("formItemContextKey"),Ii=(t,e={})=>{const n=ee(void 0),i=e.prop?n:RD("size"),s=e.global?n:cR(),o=e.form?{size:void 0}:qe(Hd,void 0),r=e.formItem?{size:void 0}:qe(kd,void 0);return W(()=>i.value||E(t)||(r==null?void 0:r.size)||(o==null?void 0:o.size)||s.value||"")},bs=t=>{const e=RD("disabled"),n=qe(Hd,void 0);return W(()=>e.value??E(t)??(n==null?void 0:n.disabled)??!1)},_o=()=>({form:qe(Hd,void 0),formItem:qe(kd,void 0)}),Tl=(t,{formItemContext:e,disableIdGeneration:n,disableIdManagement:i})=>{n||(n=ee(!1)),i||(i=ee(!1));const s=pt(),o=()=>{let c=s==null?void 0:s.parent;for(;c;){if(c.type.name==="ElFormItem")return!1;if(c.type.name==="ElLabelWrap")return!0;c=c.parent}return!1},r=ee();let a;const l=W(()=>{var c;return!!(!(t.label||t.ariaLabel)&&e&&e.inputIds&&((c=e.inputIds)==null?void 0:c.length)<=1)});return Nt(()=>{a=Te([Sn(t,"id"),n],([c,u])=>{const d=c??(u?void 0:kr().value);d!==r.value&&(e!=null&&e.removeInputId&&!o()&&(r.value&&e.removeInputId(r.value),!(i!=null&&i.value)&&!u&&d&&e.addInputId(d)),r.value=d)},{immediate:!0})}),Sl(()=>{a&&a(),e!=null&&e.removeInputId&&r.value&&e.removeInputId(r.value)}),{isLabeledByFormItem:l,inputId:r}},Cce=["","error","validating","success"],xce=Ge({label:String,labelWidth:{type:[String,Number]},labelPosition:{type:String,values:["left","right","top",""],default:""},prop:{type:de([String,Array])},required:{type:Boolean,default:void 0},rules:{type:de([Object,Array])},error:String,validateStatus:{type:String,values:Cce},for:String,inlineMessage:{type:Boolean,default:void 0},showMessage:{type:Boolean,default:!0},size:{type:String,values:$l}}),Zp=t=>Ee(t)?t[0]:t,ao=t=>!t&&t!==0?[]:Ee(t)?t:[t],Sce="ElForm";function $ce(){const t=ee([]),e=W(()=>{if(!t.value.length)return"0";const o=Math.max(...t.value);return o?`${o}px`:""});function n(o){const r=t.value.indexOf(o);return r===-1&&e.value==="0"&&Tt(Sce,`unexpected width ${o}`),r}function i(o,r){if(o&&r){const a=n(r);t.value.splice(a,1,o)}else o&&t.value.push(o)}function s(o){const r=n(o);r>-1&&t.value.splice(r,1)}return{autoLabelWidth:e,registerLabelWidth:i,deregisterLabelWidth:s}}const Zv=(t,e)=>{const n=js(e).map(i=>Ee(i)?i.join("."):i);return n.length>0?t.filter(i=>i.propString&&n.includes(i.propString)):t},rh="ElForm";var Ace=fe({name:rh,__name:"form",props:wce,emits:kce,setup(t,{expose:e,emit:n}){const i=t,s=n,o=ee(),r=In([]),a=new Map,l=Ii(),c=Be("form"),u=W(()=>{const{labelPosition:P,inline:T}=i;return[c.b(),c.m(l.value||"default"),{[c.m(`label-${P}`)]:P,[c.m("inline")]:T}]}),d=P=>Zv(r,[P])[0],h=P=>{r.push(P),P.propString&&(a.has(P.propString)?P.setInitialValue(a.get(P.propString)):a.set(P.propString,ed(P.fieldValue)))},f=P=>{P.prop&&r.splice(r.indexOf(P),1)},p=P=>{if(!i.model){Tt(rh,"model is required for setInitialValues to work.");return}if(!P){Tt(rh,"initModel is required for setInitialValues to work.");return}for(const T of a.keys())a.set(T,ed(Ac(P,T).value));r.forEach(T=>{T.prop&&T.setInitialValue(Ac(P,T.prop).value)})},m=(P=[])=>{if(!i.model){Tt(rh,"model is required for resetFields to work.");return}Zv(r,P).forEach(L=>L.resetField());const T=new Set(r.map(L=>L.propString).filter(Boolean)),I=P.length>0?js(P).map(L=>Ee(L)?L.join("."):L):[...a.keys()];for(const L of I)!T.has(L)&&a.has(L)&&(Ac(i.model,L).value=ed(a.get(L)))},b=(P=[])=>{Zv(r,P).forEach(T=>T.clearValidate())},w=W(()=>{const P=!!i.model;return P||Tt(rh,"model is required for validate to work."),P}),k=P=>{if(r.length===0)return[];const T=Zv(r,P);return T.length?T:(Tt(rh,"please pass correct props!"),[])},C=async P=>S(void 0,P),A=async(P=[])=>{if(!w.value)return!1;const T=k(P);if(T.length===0)return!0;let I={};for(const L of T)try{await L.validate(""),L.validateState==="error"&&!L.error&&L.resetField()}catch(R){I={...I,...R}}return Object.keys(I).length===0?!0:Promise.reject(I)},S=async(P=[],T)=>{var R;let I=!1;const L=!et(T);try{return I=await A(P),I===!0&&await(T==null?void 0:T(I)),I}catch(V){if(V instanceof Error)throw V;const H=V;return i.scrollToError&&o.value&&((R=o.value.querySelector(`.${c.b()}-item.is-error`))==null||R.scrollIntoView(i.scrollIntoViewOptions)),!I&&await(T==null?void 0:T(!1,H)),L&&Promise.reject(H)}},M=P=>{var I;const T=d(P);T&&((I=T.$el)==null||I.scrollIntoView(i.scrollIntoViewOptions))};return Te(()=>i.rules,()=>{i.validateOnRuleChange&&C().catch(P=>Tt(P))},{deep:!0,flush:"post"}),Pt(Hd,In({...go(i),emit:s,resetFields:m,clearValidate:b,validateField:S,getField:d,addField:h,removeField:f,setInitialValues:p,...$ce()})),e({validate:C,validateField:S,resetFields:m,clearValidate:b,scrollToField:M,getField:d,fields:r,setInitialValues:p}),(P,T)=>(v(),$("form",{ref_key:"formRef",ref:o,class:q(u.value)},[le(P.$slots,"default")],2))}}),Ece=Ace;const U$="ElLabelWrap";var Mce=fe({name:U$,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(t,{slots:e}){const n=qe(Hd,void 0),i=qe(kd);i||vo(U$,"usage: <el-form-item><label-wrap /></el-form-item>");const s=Be("form"),o=ee(),r=ee(0),a=()=>{var u;if((u=o.value)!=null&&u.firstElementChild){const d=window.getComputedStyle(o.value.firstElementChild).width;return Math.ceil(Number.parseFloat(d))}else return 0},l=(u="update")=>{ot(()=>{e.default&&t.isAutoWidth&&(u==="update"?r.value=a():u==="remove"&&(n==null||n.deregisterLabelWidth(r.value)))})},c=()=>l("update");return Nt(()=>{c()}),wn(()=>{l("remove")}),xl(()=>c()),Te(r,(u,d)=>{t.updateAll&&(n==null||n.registerLabelWidth(u,d))}),Ts(W(()=>{var u;return((u=o.value)==null?void 0:u.firstElementChild)??null}),c),()=>{var d,h;if(!e)return null;const{isAutoWidth:u}=t;if(u){const f=n==null?void 0:n.autoLabelWidth,p=i==null?void 0:i.hasLabel,m={};if(p&&f&&f!=="auto"){const b=Math.max(0,Number.parseInt(f,10)-r.value),w=(i.labelPosition||n.labelPosition)==="left"?"marginRight":"marginLeft";b&&(m[w]=`${b}px`)}return _("div",{ref:o,class:[s.be("item","label-wrap")],style:m},[(d=e.default)==null?void 0:d.call(e)])}else return _(J,{ref:o},[(h=e.default)==null?void 0:h.call(e)])}}});function Fu(){return Fu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Fu.apply(this,arguments)}function Tce(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t1(t,e)}function lC(t){return lC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},lC(t)}function t1(t,e){return t1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,s){return i.__proto__=s,i},t1(t,e)}function Pce(){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 V_(t,e,n){return Pce()?V_=Reflect.construct.bind():V_=function(s,o,r){var a=[null];a.push.apply(a,o);var l=Function.bind.apply(s,a),c=new l;return r&&t1(c,r.prototype),c},V_.apply(null,arguments)}function Ice(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function cC(t){var e=typeof Map=="function"?new Map:void 0;return cC=function(i){if(i===null||!Ice(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(i))return e.get(i);e.set(i,s)}function s(){return V_(i,arguments,lC(this).constructor)}return s.prototype=Object.create(i.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),t1(s,i)},cC(t)}var Lce=/%[sdj%]/g,Oce=function(){};typeof process<"u"&&process.env;function uC(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var i=n.field;e[i]=e[i]||[],e[i].push(n)}),e}function Oo(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];var s=0,o=n.length;if(typeof t=="function")return t.apply(null,n);if(typeof t=="string"){var r=t.replace(Lce,function(a){if(a==="%%")return"%";if(s>=o)return a;switch(a){case"%s":return String(n[s++]);case"%d":return Number(n[s++]);case"%j":try{return JSON.stringify(n[s++])}catch{return"[Circular]"}break;default:return a}});return r}return t}function Dce(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function Bs(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||Dce(e)&&typeof t=="string"&&!t)}function Rce(t,e,n){var i=[],s=0,o=t.length;function r(a){i.push.apply(i,a||[]),s++,s===o&&n(i)}t.forEach(function(a){e(a,r)})}function j$(t,e,n){var i=0,s=t.length;function o(r){if(r&&r.length){n(r);return}var a=i;i=i+1,a<s?e(t[a],o):n([])}o([])}function Vce(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,t[n]||[])}),e}var W$=function(t){Tce(e,t);function e(n,i){var s;return s=t.call(this,"Async Validation Error")||this,s.errors=n,s.fields=i,s}return e}(cC(Error));function Fce(t,e,n,i,s){if(e.first){var o=new Promise(function(h,f){var p=function(w){return i(w),w.length?f(new W$(w,uC(w))):h(s)},m=Vce(t);j$(m,n,p)});return o.catch(function(h){return h}),o}var r=e.firstFields===!0?Object.keys(t):e.firstFields||[],a=Object.keys(t),l=a.length,c=0,u=[],d=new Promise(function(h,f){var p=function(b){if(u.push.apply(u,b),c++,c===l)return i(u),u.length?f(new W$(u,uC(u))):h(s)};a.length||(i(u),h(s)),a.forEach(function(m){var b=t[m];r.indexOf(m)!==-1?j$(b,n,p):Rce(b,n,p)})});return d.catch(function(h){return h}),d}function Nce(t){return!!(t&&t.message!==void 0)}function Bce(t,e){for(var n=t,i=0;i<e.length;i++){if(n==null)return n;n=n[e[i]]}return n}function Y$(t,e){return function(n){var i;return t.fullFields?i=Bce(e,t.fullFields):i=e[n.field||t.fullField],Nce(n)?(n.field=n.field||t.fullField,n.fieldValue=i,n):{message:typeof n=="function"?n():n,fieldValue:i,field:n.field||t.fullField}}}function q$(t,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];typeof i=="object"&&typeof t[n]=="object"?t[n]=Fu({},t[n],i):t[n]=i}}return t}var LR=function(e,n,i,s,o,r){e.required&&(!i.hasOwnProperty(e.field)||Bs(n,r||e.type))&&s.push(Oo(o.messages.required,e.fullField))},zce=function(e,n,i,s,o){(/^\s+$/.test(n)||n==="")&&s.push(Oo(o.messages.whitespace,e.fullField))},Jv,Hce=function(){if(Jv)return Jv;var t="[a-fA-F\\d:]",e=function(A){return A&&A.includeBoundaries?"(?:(?<=\\s|^)(?="+t+")|(?<="+t+")(?=\\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}",i="[a-fA-F\\d]{1,4}",s=(`
40 49 (?:
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
50 +(?:`+i+":){7}(?:"+i+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
51 +(?:`+i+":){6}(?:"+n+"|:"+i+`|:)| // 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
52 +(?:`+i+":){5}(?::"+n+"|(?::"+i+`){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
53 +(?:`+i+":){4}(?:(?::"+i+"){0,1}:"+n+"|(?::"+i+`){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
54 +(?:`+i+":){3}(?:(?::"+i+"){0,2}:"+n+"|(?::"+i+`){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
55 +(?:`+i+":){2}(?:(?::"+i+"){0,3}:"+n+"|(?::"+i+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
56 +(?:`+i+":){1}(?:(?::"+i+"){0,4}:"+n+"|(?::"+i+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
57 +(?::(?:(?::`+i+"){0,5}:"+n+"|(?::"+i+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
49 58 )(?:%[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(S){return S&&S.exact?s:new RegExp("(?:"+t(S)+n+t(S)+")|(?:"+t(S)+r+t(S)+")","g")};a.v4=function(_){return _&&_.exact?i:new RegExp(""+t(_)+n+t(_),"g")},a.v6=function(_){return _&&_.exact?l:new RegExp(""+t(_)+r+t(_),"g")};var u="(?:(?:[a-z]+:)?//)",c="(?:\\S+(?::\\S*)?@)?",d=a.v4().source,f=a.v6().source,p="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",h="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",m="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",y="(?::\\d{2,5})?",v='(?:[/?#][^\\s"]*)?',w="(?:"+u+"|www\\.)"+c+"(?:localhost|"+d+"|"+f+"|"+p+h+m+")"+y+v;return cm=new RegExp("(?:^"+w+"$)","i"),cm},R5={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},Xd={integer:function(t){return Xd.number(t)&&parseInt(t,10)===t},float:function(t){return Xd.number(t)&&!Xd.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"&&!Xd.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(R5.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(YQ())},hex:function(t){return typeof t=="string"&&!!t.match(R5.hex)}},ZQ=function(t,n,o,r,s){if(t.required&&n===void 0){WM(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?Xd[l](n)||r.push(dr(s.messages.types[l],t.fullField,t.type)):l&&typeof n!==t.type&&r.push(dr(s.messages.types[l],t.fullField,t.type))},JQ=function(t,n,o,r,s){var i=typeof t.len=="number",l=typeof t.min=="number",a=typeof t.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=n,d=null,f=typeof n=="number",p=typeof n=="string",h=Array.isArray(n);if(f?d="number":p?d="string":h&&(d="array"),!d)return!1;h&&(c=n.length),p&&(c=n.replace(u,"_").length),i?c!==t.len&&r.push(dr(s.messages[d].len,t.fullField,t.len)):l&&!a&&c<t.min?r.push(dr(s.messages[d].min,t.fullField,t.min)):a&&!l&&c>t.max?r.push(dr(s.messages[d].max,t.fullField,t.max)):l&&a&&(c<t.min||c>t.max)&&r.push(dr(s.messages[d].range,t.fullField,t.min,t.max))},Nu="enum",XQ=function(t,n,o,r,s){t[Nu]=Array.isArray(t[Nu])?t[Nu]:[],t[Nu].indexOf(n)===-1&&r.push(dr(s.messages[Nu],t.fullField,t[Nu].join(", ")))},QQ=function(t,n,o,r,s){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||r.push(dr(s.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var i=new RegExp(t.pattern);i.test(n)||r.push(dr(s.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},Rt={required:WM,whitespace:GQ,type:ZQ,range:JQ,enum:XQ,pattern:QQ},eee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(jn(n,"string")&&!t.required)return o();Rt.required(t,n,r,i,s,"string"),jn(n,"string")||(Rt.type(t,n,r,i,s),Rt.range(t,n,r,i,s),Rt.pattern(t,n,r,i,s),t.whitespace===!0&&Rt.whitespace(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(jn(n)&&!t.required)return o();Rt.required(t,n,r,i,s),n!==void 0&&Rt.type(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===""&&(n=void 0),jn(n)&&!t.required)return o();Rt.required(t,n,r,i,s),n!==void 0&&(Rt.type(t,n,r,i,s),Rt.range(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(jn(n)&&!t.required)return o();Rt.required(t,n,r,i,s),n!==void 0&&Rt.type(t,n,r,i,s)}o(i)},ree=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(jn(n)&&!t.required)return o();Rt.required(t,n,r,i,s),jn(n)||Rt.type(t,n,r,i,s)}o(i)},see=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(jn(n)&&!t.required)return o();Rt.required(t,n,r,i,s),n!==void 0&&(Rt.type(t,n,r,i,s),Rt.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(jn(n)&&!t.required)return o();Rt.required(t,n,r,i,s),n!==void 0&&(Rt.type(t,n,r,i,s),Rt.range(t,n,r,i,s))}o(i)},lee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(n==null&&!t.required)return o();Rt.required(t,n,r,i,s,"array"),n!=null&&(Rt.type(t,n,r,i,s),Rt.range(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(jn(n)&&!t.required)return o();Rt.required(t,n,r,i,s),n!==void 0&&Rt.type(t,n,r,i,s)}o(i)},uee="enum",cee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(jn(n)&&!t.required)return o();Rt.required(t,n,r,i,s),n!==void 0&&Rt[uee](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(jn(n,"string")&&!t.required)return o();Rt.required(t,n,r,i,s),jn(n,"string")||Rt.pattern(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(jn(n,"date")&&!t.required)return o();if(Rt.required(t,n,r,i,s),!jn(n,"date")){var a;n instanceof Date?a=n:a=new Date(n),Rt.type(t,a,r,i,s),a&&Rt.range(t,a.getTime(),r,i,s)}}o(i)},pee=function(t,n,o,r,s){var i=[],l=Array.isArray(n)?"array":typeof n;Rt.required(t,n,r,i,s,l),o(i)},Xv=function(t,n,o,r,s){var i=t.type,l=[],a=t.required||!t.required&&r.hasOwnProperty(t.field);if(a){if(jn(n,i)&&!t.required)return o();Rt.required(t,n,r,l,s,i),jn(n,i)||Rt.type(t,n,r,l,s)}o(l)},hee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(jn(n)&&!t.required)return o();Rt.required(t,n,r,i,s)}o(i)},qf={string:eee,method:tee,number:nee,boolean:oee,regexp:ree,integer:see,float:iee,array:lee,object:aee,enum:cee,pattern:dee,date:fee,url:Xv,hex:Xv,email:Xv,required:pee,any:hee};function sb(){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 ib=sb(),hh=function(){function e(n){this.rules=null,this._messages=ib,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=L5(sb(),o)),this._messages},t.validate=function(o,r,s){var i=this;r===void 0&&(r={}),s===void 0&&(s=function(){});var l=o,a=r,u=s;if(typeof a=="function"&&(u=a,a={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,l),Promise.resolve(l);function c(m){var y=[],v={};function w(S){if(Array.isArray(S)){var x;y=(x=y).concat.apply(x,S)}else y.push(S)}for(var _=0;_<m.length;_++)w(m[_]);y.length?(v=rb(y),u(y,v)):u(null,l)}if(a.messages){var d=this.messages();d===ib&&(d=sb()),L5(d,a.messages),a.messages=d}else a.messages=this.messages();var f={},p=a.keys||Object.keys(this.rules);p.forEach(function(m){var y=i.rules[m],v=l[m];y.forEach(function(w){var _=w;typeof _.transform=="function"&&(l===o&&(l=Ia({},l)),v=l[m]=_.transform(v)),typeof _=="function"?_={validator:_}:_=Ia({},_),_.validator=i.getValidationMethod(_),_.validator&&(_.field=m,_.fullField=_.fullField||m,_.type=i.getType(_),f[m]=f[m]||[],f[m].push({rule:_,value:v,source:l,field:m}))})});var h={};return WQ(f,a,function(m,y){var v=m.rule,w=(v.type==="object"||v.type==="array")&&(typeof v.fields=="object"||typeof v.defaultField=="object");w=w&&(v.required||!v.required&&m.value),v.field=m.field;function _(E,T){return Ia({},T,{fullField:v.fullField+"."+E,fullFields:v.fullFields?[].concat(v.fullFields,[E]):[E]})}function S(E){E===void 0&&(E=[]);var T=Array.isArray(E)?E:[E];!a.suppressWarning&&T.length&&e.warning("async-validator:",T),T.length&&v.message!==void 0&&(T=[].concat(v.message));var O=T.map(P5(v,l));if(a.first&&O.length)return h[v.field]=1,y(O);if(!w)y(O);else{if(v.required&&!m.value)return v.message!==void 0?O=[].concat(v.message).map(P5(v,l)):a.error&&(O=[a.error(v,dr(a.messages.required,v.field))]),y(O);var P={};v.defaultField&&Object.keys(m.value).map(function(B){P[B]=v.defaultField}),P=Ia({},P,m.rule.fields);var N={};Object.keys(P).forEach(function(B){var Y=P[B],Z=Array.isArray(Y)?Y:[Y];N[B]=Z.map(_.bind(null,B))});var F=new e(N);F.messages(a.messages),m.rule.options&&(m.rule.options.messages=a.messages,m.rule.options.error=a.error),F.validate(m.value,m.rule.options||a,function(B){var Y=[];O&&O.length&&Y.push.apply(Y,O),B&&B.length&&Y.push.apply(Y,B),y(Y.length?Y:null)})}}var x;if(v.asyncValidator)x=v.asyncValidator(v,m.value,S,m.source,a);else if(v.validator){try{x=v.validator(v,m.value,S,m.source,a)}catch(E){console.error==null||console.error(E),a.suppressValidatorError||setTimeout(function(){throw E},0),S(E.message)}x===!0?S():x===!1?S(typeof v.message=="function"?v.message(v.fullField||v.field):v.message||(v.fullField||v.field)+" fails"):x instanceof Array?S(x):x instanceof Error&&S(x.message)}x&&x.then&&x.then(function(){return S()},function(E){return S(E)})},function(m){c(m)},l)},t.getType=function(o){if(o.type===void 0&&o.pattern instanceof RegExp&&(o.type="pattern"),typeof o.validator!="function"&&o.type&&!qf.hasOwnProperty(o.type))throw new Error(dr("Unknown rule type %s",o.type));return o.type||"string"},t.getValidationMethod=function(o){if(typeof o.validator=="function")return o.validator;var r=Object.keys(o),s=r.indexOf("message");return s!==-1&&r.splice(s,1),r.length===1&&r[0]==="required"?qf.required:qf[this.getType(o)]||void 0},e}();hh.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");qf[t]=n};hh.warning=zQ;hh.messages=ib;hh.validators=qf;const mee=["","error","validating","success"],gee=We({label:String,labelWidth:{type:[String,Number],default:""},prop:{type:Ce([String,Array])},required:{type:Boolean,default:void 0},rules:{type:Ce([Object,Array])},error:String,validateStatus:{type:String,values:mee},for:String,inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:{type:String,values:Zl}}),D5="ElLabelWrap";var vee=Q({name:D5,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(e,{slots:t}){const n=Be(kd,void 0),o=Be(uu);o||ws(D5,"usage: <el-form-item><label-wrap /></el-form-item>");const r=Re("form"),s=K(),i=K(0),l=()=>{var c;if((c=s.value)!=null&&c.firstElementChild){const d=window.getComputedStyle(s.value.firstElementChild).width;return Math.ceil(Number.parseFloat(d))}else return 0},a=(c="update")=>{ot(()=>{t.default&&e.isAutoWidth&&(c==="update"?i.value=l():c==="remove"&&(n==null||n.deregisterLabelWidth(i.value)))})},u=()=>a("update");return Ct(()=>{u()}),En(()=>{a("remove")}),Fi(()=>u()),Te(i,(c,d)=>{e.updateAll&&(n==null||n.registerLabelWidth(c,d))}),Bo(R(()=>{var c,d;return(d=(c=s.value)==null?void 0:c.firstElementChild)!=null?d:null}),u),()=>{var c,d;if(!t)return null;const{isAutoWidth:f}=e;if(f){const p=n==null?void 0:n.autoLabelWidth,h=o==null?void 0:o.hasLabel,m={};if(h&&p&&p!=="auto"){const y=Math.max(0,Number.parseInt(p,10)-i.value),v=n.labelPosition==="left"?"marginRight":"marginLeft";y&&(m[v]=`${y}px`)}return k("div",{ref:s,class:[r.be("item","label-wrap")],style:m},[(c=t.default)==null?void 0:c.call(t)])}else return k(fe,{ref:s},[(d=t.default)==null?void 0:d.call(t)])}}});const yee=["role","aria-labelledby"],_ee=Q({name:"ElFormItem"}),bee=Q({..._ee,props:gee,setup(e,{expose:t}){const n=e,o=Kr(),r=Be(kd,void 0),s=Be(uu,void 0),i=Jo(void 0,{formItem:!1}),l=Re("form-item"),a=Hr().value,u=K([]),c=K(""),d=Wj(c,100),f=K(""),p=K();let h,m=!1;const y=R(()=>{if((r==null?void 0:r.labelPosition)==="top")return{};const ee=Zo(n.labelWidth||(r==null?void 0:r.labelWidth)||"");return ee?{width:ee}:{}}),v=R(()=>{if((r==null?void 0:r.labelPosition)==="top"||r!=null&&r.inline)return{};if(!n.label&&!n.labelWidth&&P)return{};const ee=Zo(n.labelWidth||(r==null?void 0:r.labelWidth)||"");return!n.label&&!o.label?{marginLeft:ee}:{}}),w=R(()=>[l.b(),l.m(i.value),l.is("error",c.value==="error"),l.is("validating",c.value==="validating"),l.is("success",c.value==="success"),l.is("required",Z.value||n.required),l.is("no-asterisk",r==null?void 0:r.hideRequiredAsterisk),(r==null?void 0:r.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[l.m("feedback")]:r==null?void 0:r.statusIcon}]),_=R(()=>Br(n.inlineMessage)?n.inlineMessage:(r==null?void 0:r.inlineMessage)||!1),S=R(()=>[l.e("error"),{[l.em("error","inline")]:_.value}]),x=R(()=>n.prop?tt(n.prop)?n.prop:n.prop.join("."):""),E=R(()=>!!(n.label||o.label)),T=R(()=>n.for||(u.value.length===1?u.value[0]:void 0)),O=R(()=>!T.value&&E.value),P=!!s,N=R(()=>{const ee=r==null?void 0:r.model;if(!(!ee||!n.prop))return Km(ee,n.prop).value}),F=R(()=>{const{required:ee}=n,de=[];n.rules&&de.push(...Eg(n.rules));const ve=r==null?void 0:r.rules;if(ve&&n.prop){const le=Km(ve,n.prop).value;le&&de.push(...Eg(le))}if(ee!==void 0){const le=de.map((Ie,Ge)=>[Ie,Ge]).filter(([Ie])=>Object.keys(Ie).includes("required"));if(le.length>0)for(const[Ie,Ge]of le)Ie.required!==ee&&(de[Ge]={...Ie,required:ee});else de.push({required:ee})}return de}),B=R(()=>F.value.length>0),Y=ee=>F.value.filter(ve=>!ve.trigger||!ee?!0:Array.isArray(ve.trigger)?ve.trigger.includes(ee):ve.trigger===ee).map(({trigger:ve,...le})=>le),Z=R(()=>F.value.some(ee=>ee.required)),U=R(()=>{var ee;return d.value==="error"&&n.showMessage&&((ee=r==null?void 0:r.showMessage)!=null?ee:!0)}),j=R(()=>`${n.label||""}${(r==null?void 0:r.labelSuffix)||""}`),V=ee=>{c.value=ee},H=ee=>{var de,ve;const{errors:le,fields:Ie}=ee;(!le||!Ie)&&console.error(ee),V("error"),f.value=le?(ve=(de=le==null?void 0:le[0])==null?void 0:de.message)!=null?ve:`${n.prop} is required`:"",r==null||r.emit("validate",n.prop,!1,f.value)},L=()=>{V("success"),r==null||r.emit("validate",n.prop,!0,"")},I=async ee=>{const de=x.value;return new hh({[de]:ee}).validate({[de]:N.value},{firstFields:!0}).then(()=>(L(),!0)).catch(le=>(H(le),Promise.reject(le)))},X=async(ee,de)=>{if(m||!n.prop)return!1;const ve=Xe(de);if(!B.value)return de==null||de(!1),!1;const le=Y(ee);return le.length===0?(de==null||de(!0),!0):(V("validating"),I(le).then(()=>(de==null||de(!0),!0)).catch(Ie=>{const{fields:Ge}=Ie;return de==null||de(!1,Ge),ve?!1:Promise.reject(Ge)}))},oe=()=>{V(""),f.value="",m=!1},z=async()=>{const ee=r==null?void 0:r.model;if(!ee||!n.prop)return;const de=Km(ee,n.prop);m=!0,de.value=s5(h),await ot(),oe(),m=!1},ge=ee=>{u.value.includes(ee)||u.value.push(ee)},Oe=ee=>{u.value=u.value.filter(de=>de!==ee)};Te(()=>n.error,ee=>{f.value=ee||"",V(ee?"error":"")},{immediate:!0}),Te(()=>n.validateStatus,ee=>V(ee||""));const xe=Dn({...ei(n),$el:p,size:i,validateState:c,labelId:a,inputIds:u,isGroup:O,hasLabel:E,fieldValue:N,addInputId:ge,removeInputId:Oe,resetField:z,clearValidate:oe,validate:X});return wt(uu,xe),Ct(()=>{n.prop&&(r==null||r.addField(xe),h=s5(N.value))}),En(()=>{r==null||r.removeField(xe)}),t({size:i,validateMessage:f,validateState:c,validate:X,clearValidate:oe,resetField:z}),(ee,de)=>{var ve;return C(),M("div",{ref_key:"formItemRef",ref:p,class:D(g(w)),role:g(O)?"group":void 0,"aria-labelledby":g(O)?g(a):void 0},[k(g(vee),{"is-auto-width":g(y).width==="auto","update-all":((ve=g(r))==null?void 0:ve.labelWidth)==="auto"},{default:$(()=>[g(E)?(C(),q(Lt(g(T)?"label":"div"),{key:0,id:g(a),for:g(T),class:D(g(l).e("label")),style:Qe(g(y))},{default:$(()=>[he(ee.$slots,"label",{label:g(j)},()=>[ne(A(g(j)),1)])]),_:3},8,["id","for","class","style"])):W("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),b("div",{class:D(g(l).e("content")),style:Qe(g(v))},[he(ee.$slots,"default"),k(w0,{name:`${g(l).namespace.value}-zoom-in-top`},{default:$(()=>[g(U)?he(ee.$slots,"error",{key:0,error:f.value},()=>[b("div",{class:D(g(S))},A(f.value),3)]):W("v-if",!0)]),_:3},8,["name"])],6)],10,yee)}}});var KM=ze(bee,[["__file","form-item.vue"]]);const so=Zt(RQ,{FormItem:KM}),io=Gn(KM);let Jr;const wee=`
51 - height:0 !important;
52 - visibility:hidden !important;
53 - ${dH()?"":"overflow:hidden !important;"}
54 - position:absolute !important;
55 - z-index:-1000 !important;
56 - top:0 !important;
57 - right:0 !important;
58 -`,Cee=["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 kee(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:Cee.map(i=>`${i}:${t.getPropertyValue(i)}`).join(";"),paddingSize:o,borderSize:r,boxSizing:n}}function F5(e,t=1,n){var o;Jr||(Jr=document.createElement("textarea"),document.body.appendChild(Jr));const{paddingSize:r,borderSize:s,boxSizing:i,contextStyle:l}=kee(e);Jr.setAttribute("style",`${l};${wee}`),Jr.value=e.value||e.placeholder||"";let a=Jr.scrollHeight;const u={};i==="border-box"?a=a+s:i==="content-box"&&(a=a-r),Jr.value="";const c=Jr.scrollHeight-r;if(_t(t)){let d=c*t;i==="border-box"&&(d=d+r+s),a=Math.max(d,a),u.minHeight=`${d}px`}if(_t(n)){let d=c*n;i==="border-box"&&(d=d+r+s),a=Math.min(d,a)}return u.height=`${a}px`,(o=Jr.parentNode)==null||o.removeChild(Jr),Jr=void 0,u}const See=We({id:{type:String,default:void 0},size:qr,disabled:Boolean,modelValue:{type:Ce([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:Ce([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},suffixIcon:{type:Oo},prefixIcon:{type:Oo},containerRole:{type:String,default:void 0},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:Ce([Object,Array,String]),default:()=>$o({})},autofocus:{type:Boolean,default:!1}}),$ee={[Jt]:e=>tt(e),input:e=>tt(e),change:e=>tt(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},Eee=["role"],xee=["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],Mee=["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],Tee=Q({name:"ElInput",inheritAttrs:!1}),Oee=Q({...Tee,props:See,emits:$ee,setup(e,{expose:t,emit:n}){const o=e,r=_d(),s=Kr(),i=R(()=>{const ce={};return o.containerRole==="combobox"&&(ce["aria-haspopup"]=r["aria-haspopup"],ce["aria-owns"]=r["aria-owns"],ce["aria-expanded"]=r["aria-expanded"]),ce}),l=R(()=>[o.type==="textarea"?y.b():m.b(),m.m(p.value),m.is("disabled",h.value),m.is("exceed",ge.value),{[m.b("group")]:s.prepend||s.append,[m.bm("group","append")]:s.append,[m.bm("group","prepend")]:s.prepend,[m.m("prefix")]:s.prefix||o.prefixIcon,[m.m("suffix")]:s.suffix||o.suffixIcon||o.clearable||o.showPassword,[m.bm("suffix","password-clear")]:I.value&&X.value,[m.b("hidden")]:o.type==="hidden"},r.class]),a=R(()=>[m.e("wrapper"),m.is("focus",N.value)]),u=aM({excludeKeys:R(()=>Object.keys(i.value))}),{form:c,formItem:d}=ni(),{inputId:f}=Sd(o,{formItemContext:d}),p=Jo(),h=Gr(),m=Re("input"),y=Re("textarea"),v=Tn(),w=Tn(),_=K(!1),S=K(!1),x=K(!1),E=K(),T=Tn(o.inputStyle),O=R(()=>v.value||w.value),{wrapperRef:P,isFocused:N,handleFocus:F,handleBlur:B}=x3(O,{afterBlur(){var ce;o.validateEvent&&((ce=d==null?void 0:d.validate)==null||ce.call(d,"blur").catch(te=>void 0))}}),Y=R(()=>{var ce;return(ce=c==null?void 0:c.statusIcon)!=null?ce:!1}),Z=R(()=>(d==null?void 0:d.validateState)||""),U=R(()=>Z.value&&iM[Z.value]),j=R(()=>x.value?nM:eM),V=R(()=>[r.style]),H=R(()=>[o.inputStyle,T.value,{resize:o.resize}]),L=R(()=>xo(o.modelValue)?"":String(o.modelValue)),I=R(()=>o.clearable&&!h.value&&!o.readonly&&!!L.value&&(N.value||_.value)),X=R(()=>o.showPassword&&!h.value&&!o.readonly&&!!L.value&&(!!L.value||N.value)),oe=R(()=>o.showWordLimit&&!!o.maxlength&&(o.type==="text"||o.type==="textarea")&&!h.value&&!o.readonly&&!o.showPassword),z=R(()=>L.value.length),ge=R(()=>!!oe.value&&z.value>Number(o.maxlength)),Oe=R(()=>!!s.suffix||!!o.suffixIcon||I.value||o.showPassword||oe.value||!!Z.value&&Y.value),[xe,ee]=vQ(v);Bo(w,ce=>{if(le(),!oe.value||o.resize!=="both")return;const te=ce[0],{width:pe}=te.contentRect;E.value={right:`calc(100% - ${pe+15+6}px)`}});const de=()=>{const{type:ce,autosize:te}=o;if(!(!xt||ce!=="textarea"||!w.value))if(te){const pe=ft(te)?te.minRows:void 0,Ve=ft(te)?te.maxRows:void 0,Je=F5(w.value,pe,Ve);T.value={overflowY:"hidden",...Je},ot(()=>{w.value.offsetHeight,T.value=Je})}else T.value={minHeight:F5(w.value).minHeight}},le=(ce=>{let te=!1;return()=>{var pe;if(te||!o.autosize)return;((pe=w.value)==null?void 0:pe.offsetParent)===null||(ce(),te=!0)}})(de),Ie=()=>{const ce=O.value,te=o.formatter?o.formatter(L.value):L.value;!ce||ce.value===te||(ce.value=te)},Ge=async ce=>{xe();let{value:te}=ce.target;if(o.formatter&&(te=o.parser?o.parser(te):te),!S.value){if(te===L.value){Ie();return}n(Jt,te),n("input",te),await ot(),Ie(),ee()}},G=ce=>{n("change",ce.target.value)},J=ce=>{n("compositionstart",ce),S.value=!0},ue=ce=>{var te;n("compositionupdate",ce);const pe=(te=ce.target)==null?void 0:te.value,Ve=pe[pe.length-1]||"";S.value=!lM(Ve)},_e=ce=>{n("compositionend",ce),S.value&&(S.value=!1,Ge(ce))},ye=()=>{x.value=!x.value,Ae()},Ae=async()=>{var ce;await ot(),(ce=O.value)==null||ce.focus()},Le=()=>{var ce;return(ce=O.value)==null?void 0:ce.blur()},Ee=ce=>{_.value=!1,n("mouseleave",ce)},Pe=ce=>{_.value=!0,n("mouseenter",ce)},me=ce=>{n("keydown",ce)},je=()=>{var ce;(ce=O.value)==null||ce.select()},Ze=()=>{n(Jt,""),n("change",""),n("clear"),n("input","")};return Te(()=>o.modelValue,()=>{var ce;ot(()=>de()),o.validateEvent&&((ce=d==null?void 0:d.validate)==null||ce.call(d,"change").catch(te=>void 0))}),Te(L,()=>Ie()),Te(()=>o.type,async()=>{await ot(),Ie(),de()}),Ct(()=>{!o.formatter&&o.parser,Ie(),ot(de)}),t({input:v,textarea:w,ref:O,textareaStyle:H,autosize:pn(o,"autosize"),focus:Ae,blur:Le,select:je,clear:Ze,resizeTextarea:de}),(ce,te)=>(C(),M("div",un(g(i),{class:g(l),style:g(V),role:ce.containerRole,onMouseenter:Pe,onMouseleave:Ee}),[W(" input "),ce.type!=="textarea"?(C(),M(fe,{key:0},[W(" prepend slot "),ce.$slots.prepend?(C(),M("div",{key:0,class:D(g(m).be("group","prepend"))},[he(ce.$slots,"prepend")],2)):W("v-if",!0),b("div",{ref_key:"wrapperRef",ref:P,class:D(g(a))},[W(" prefix slot "),ce.$slots.prefix||ce.prefixIcon?(C(),M("span",{key:0,class:D(g(m).e("prefix"))},[b("span",{class:D(g(m).e("prefix-inner"))},[he(ce.$slots,"prefix"),ce.prefixIcon?(C(),q(g(Ne),{key:0,class:D(g(m).e("icon"))},{default:$(()=>[(C(),q(Lt(ce.prefixIcon)))]),_:1},8,["class"])):W("v-if",!0)],2)],2)):W("v-if",!0),b("input",un({id:g(f),ref_key:"input",ref:v,class:g(m).e("inner")},g(u),{minlength:ce.minlength,maxlength:ce.maxlength,type:ce.showPassword?x.value?"text":"password":ce.type,disabled:g(h),readonly:ce.readonly,autocomplete:ce.autocomplete,tabindex:ce.tabindex,"aria-label":ce.label,placeholder:ce.placeholder,style:ce.inputStyle,form:ce.form,autofocus:ce.autofocus,onCompositionstart:J,onCompositionupdate:ue,onCompositionend:_e,onInput:Ge,onFocus:te[0]||(te[0]=(...pe)=>g(F)&&g(F)(...pe)),onBlur:te[1]||(te[1]=(...pe)=>g(B)&&g(B)(...pe)),onChange:G,onKeydown:me}),null,16,xee),W(" suffix slot "),g(Oe)?(C(),M("span",{key:1,class:D(g(m).e("suffix"))},[b("span",{class:D(g(m).e("suffix-inner"))},[!g(I)||!g(X)||!g(oe)?(C(),M(fe,{key:0},[he(ce.$slots,"suffix"),ce.suffixIcon?(C(),q(g(Ne),{key:0,class:D(g(m).e("icon"))},{default:$(()=>[(C(),q(Lt(ce.suffixIcon)))]),_:1},8,["class"])):W("v-if",!0)],64)):W("v-if",!0),g(I)?(C(),q(g(Ne),{key:1,class:D([g(m).e("icon"),g(m).e("clear")]),onMousedown:et(g(yt),["prevent"]),onClick:Ze},{default:$(()=>[k(g(wd))]),_:1},8,["class","onMousedown"])):W("v-if",!0),g(X)?(C(),q(g(Ne),{key:2,class:D([g(m).e("icon"),g(m).e("password")]),onClick:ye},{default:$(()=>[(C(),q(Lt(g(j))))]),_:1},8,["class"])):W("v-if",!0),g(oe)?(C(),M("span",{key:3,class:D(g(m).e("count"))},[b("span",{class:D(g(m).e("count-inner"))},A(g(z))+" / "+A(ce.maxlength),3)],2)):W("v-if",!0),g(Z)&&g(U)&&g(Y)?(C(),q(g(Ne),{key:4,class:D([g(m).e("icon"),g(m).e("validateIcon"),g(m).is("loading",g(Z)==="validating")])},{default:$(()=>[(C(),q(Lt(g(U))))]),_:1},8,["class"])):W("v-if",!0)],2)],2)):W("v-if",!0)],2),W(" append slot "),ce.$slots.append?(C(),M("div",{key:1,class:D(g(m).be("group","append"))},[he(ce.$slots,"append")],2)):W("v-if",!0)],64)):(C(),M(fe,{key:1},[W(" textarea "),b("textarea",un({id:g(f),ref_key:"textarea",ref:w,class:g(y).e("inner")},g(u),{minlength:ce.minlength,maxlength:ce.maxlength,tabindex:ce.tabindex,disabled:g(h),readonly:ce.readonly,autocomplete:ce.autocomplete,style:g(H),"aria-label":ce.label,placeholder:ce.placeholder,form:ce.form,autofocus:ce.autofocus,onCompositionstart:J,onCompositionupdate:ue,onCompositionend:_e,onInput:Ge,onFocus:te[2]||(te[2]=(...pe)=>g(F)&&g(F)(...pe)),onBlur:te[3]||(te[3]=(...pe)=>g(B)&&g(B)(...pe)),onChange:G,onKeydown:me}),null,16,Mee),g(oe)?(C(),M("span",{key:0,style:Qe(E.value),class:D(g(m).e("count"))},A(g(z))+" / "+A(ce.maxlength),7)):W("v-if",!0)],64))],16,Eee))}});var Iee=ze(Oee,[["__file","input.vue"]]);const At=Zt(Iee),Pu=4,Aee={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"}},Nee=({move:e,size:t,bar:n})=>({[n.size]:t,transform:`translate${n.axis}(${e}%)`}),O3=Symbol("scrollbarContextKey"),Pee=We({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),Lee="Thumb",Ree=Q({__name:"thumb",props:Pee,setup(e){const t=e,n=Be(O3),o=Re("scrollbar");n||ws(Lee,"can not inject scrollbar context");const r=K(),s=K(),i=K({}),l=K(!1);let a=!1,u=!1,c=xt?document.onselectstart:null;const d=R(()=>Aee[t.vertical?"vertical":"horizontal"]),f=R(()=>Nee({size:t.size,move:t.move,bar:d.value})),p=R(()=>r.value[d.value.offset]**2/n.wrapElement[d.value.scrollSize]/t.ratio/s.value[d.value.offset]),h=E=>{var T;if(E.stopPropagation(),E.ctrlKey||[1,2].includes(E.button))return;(T=window.getSelection())==null||T.removeAllRanges(),y(E);const O=E.currentTarget;O&&(i.value[d.value.axis]=O[d.value.offset]-(E[d.value.client]-O.getBoundingClientRect()[d.value.direction]))},m=E=>{if(!s.value||!r.value||!n.wrapElement)return;const T=Math.abs(E.target.getBoundingClientRect()[d.value.direction]-E[d.value.client]),O=s.value[d.value.offset]/2,P=(T-O)*100*p.value/r.value[d.value.offset];n.wrapElement[d.value.scroll]=P*n.wrapElement[d.value.scrollSize]/100},y=E=>{E.stopImmediatePropagation(),a=!0,document.addEventListener("mousemove",v),document.addEventListener("mouseup",w),c=document.onselectstart,document.onselectstart=()=>!1},v=E=>{if(!r.value||!s.value||a===!1)return;const T=i.value[d.value.axis];if(!T)return;const O=(r.value.getBoundingClientRect()[d.value.direction]-E[d.value.client])*-1,P=s.value[d.value.offset]-T,N=(O-P)*100*p.value/r.value[d.value.offset];n.wrapElement[d.value.scroll]=N*n.wrapElement[d.value.scrollSize]/100},w=()=>{a=!1,i.value[d.value.axis]=0,document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",w),x(),u&&(l.value=!1)},_=()=>{u=!1,l.value=!!t.size},S=()=>{u=!0,l.value=a};En(()=>{x(),document.removeEventListener("mouseup",w)});const x=()=>{document.onselectstart!==c&&(document.onselectstart=c)};return Ln(pn(n,"scrollbarElement"),"mousemove",_),Ln(pn(n,"scrollbarElement"),"mouseleave",S),(E,T)=>(C(),q(_r,{name:g(o).b("fade"),persisted:""},{default:$(()=>[He(b("div",{ref_key:"instance",ref:r,class:D([g(o).e("bar"),g(o).is(g(d).key)]),onMousedown:m},[b("div",{ref_key:"thumb",ref:s,class:D(g(o).e("thumb")),style:Qe(g(f)),onMousedown:h},null,38)],34),[[en,E.always||l.value]])]),_:1},8,["name"]))}});var V5=ze(Ree,[["__file","thumb.vue"]]);const Dee=We({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),Fee=Q({__name:"bar",props:Dee,setup(e,{expose:t}){const n=e,o=Be(O3),r=K(0),s=K(0),i=K(""),l=K(""),a=K(1),u=K(1);return t({handleScroll:f=>{if(f){const p=f.offsetHeight-Pu,h=f.offsetWidth-Pu;s.value=f.scrollTop*100/p*a.value,r.value=f.scrollLeft*100/h*u.value}},update:()=>{const f=o==null?void 0:o.wrapElement;if(!f)return;const p=f.offsetHeight-Pu,h=f.offsetWidth-Pu,m=p**2/f.scrollHeight,y=h**2/f.scrollWidth,v=Math.max(m,n.minSize),w=Math.max(y,n.minSize);a.value=m/(p-m)/(v/(p-v)),u.value=y/(h-y)/(w/(h-w)),l.value=v+Pu<p?`${v}px`:"",i.value=w+Pu<h?`${w}px`:""}}),(f,p)=>(C(),M(fe,null,[k(V5,{move:r.value,ratio:u.value,size:i.value,always:f.always},null,8,["move","ratio","size","always"]),k(V5,{move:s.value,ratio:a.value,size:l.value,vertical:"",always:f.always},null,8,["move","ratio","size","always"])],64))}});var Vee=ze(Fee,[["__file","bar.vue"]]);const Bee=We({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:Ce([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},id:String,role:String,ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical"]}}),zee={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(_t)},jee="ElScrollbar",Hee=Q({name:jee}),Uee=Q({...Hee,props:Bee,emits:zee,setup(e,{expose:t,emit:n}){const o=e,r=Re("scrollbar");let s,i;const l=K(),a=K(),u=K(),c=K(),d=R(()=>{const _={};return o.height&&(_.height=Zo(o.height)),o.maxHeight&&(_.maxHeight=Zo(o.maxHeight)),[o.wrapStyle,_]}),f=R(()=>[o.wrapClass,r.e("wrap"),{[r.em("wrap","hidden-default")]:!o.native}]),p=R(()=>[r.e("view"),o.viewClass]),h=()=>{var _;a.value&&((_=c.value)==null||_.handleScroll(a.value),n("scroll",{scrollTop:a.value.scrollTop,scrollLeft:a.value.scrollLeft}))};function m(_,S){ft(_)?a.value.scrollTo(_):_t(_)&&_t(S)&&a.value.scrollTo(_,S)}const y=_=>{_t(_)&&(a.value.scrollTop=_)},v=_=>{_t(_)&&(a.value.scrollLeft=_)},w=()=>{var _;(_=c.value)==null||_.update()};return Te(()=>o.noresize,_=>{_?(s==null||s(),i==null||i()):({stop:s}=Bo(u,w),i=Ln("resize",w))},{immediate:!0}),Te(()=>[o.maxHeight,o.height],()=>{o.native||ot(()=>{var _;w(),a.value&&((_=c.value)==null||_.handleScroll(a.value))})}),wt(O3,Dn({scrollbarElement:l,wrapElement:a})),Ct(()=>{o.native||ot(()=>{w()})}),Fi(()=>w()),t({wrapRef:a,update:w,scrollTo:m,setScrollTop:y,setScrollLeft:v,handleScroll:h}),(_,S)=>(C(),M("div",{ref_key:"scrollbarRef",ref:l,class:D(g(r).b())},[b("div",{ref_key:"wrapRef",ref:a,class:D(g(f)),style:Qe(g(d)),onScroll:h},[(C(),q(Lt(_.tag),{id:_.id,ref_key:"resizeRef",ref:u,class:D(g(p)),style:Qe(_.viewStyle),role:_.role,"aria-label":_.ariaLabel,"aria-orientation":_.ariaOrientation},{default:$(()=>[he(_.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],38),_.native?W("v-if",!0):(C(),q(Vee,{key:0,ref_key:"barRef",ref:c,always:_.always,"min-size":_.minSize},null,8,["always","min-size"]))],2))}});var Wee=ze(Uee,[["__file","scrollbar.vue"]]);const ks=Zt(Wee),I3=Symbol("popper"),qM=Symbol("popperContent"),Kee=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],GM=We({role:{type:String,values:Kee,default:"tooltip"}}),qee=Q({name:"ElPopper",inheritAttrs:!1}),Gee=Q({...qee,props:GM,setup(e,{expose:t}){const n=e,o=K(),r=K(),s=K(),i=K(),l=R(()=>n.role),a={triggerRef:o,popperInstanceRef:r,contentRef:s,referenceRef:i,role:l};return t(a),wt(I3,a),(u,c)=>he(u.$slots,"default")}});var Yee=ze(Gee,[["__file","popper.vue"]]);const YM=We({arrowOffset:{type:Number,default:5}}),Zee=Q({name:"ElPopperArrow",inheritAttrs:!1}),Jee=Q({...Zee,props:YM,setup(e,{expose:t}){const n=e,o=Re("popper"),{arrowOffset:r,arrowRef:s,arrowStyle:i}=Be(qM,void 0);return Te(()=>n.arrowOffset,l=>{r.value=l}),En(()=>{s.value=void 0}),t({arrowRef:s}),(l,a)=>(C(),M("span",{ref_key:"arrowRef",ref:s,class:D(g(o).e("arrow")),style:Qe(g(i)),"data-popper-arrow":""},null,6))}});var Xee=ze(Jee,[["__file","arrow.vue"]]);const Qee="ElOnlyChild",ZM=Q({name:Qee,setup(e,{slots:t,attrs:n}){var o;const r=Be(MM),s=BX((o=r==null?void 0:r.setForwardRef)!=null?o:yt);return()=>{var i;const l=(i=t.default)==null?void 0:i.call(t,n);if(!l||l.length>1)return null;const a=JM(l);return a?He(hs(a,n),[[s]]):null}}});function JM(e){if(!e)return null;const t=e;for(const n of t){if(ft(n))switch(n.type){case Kn:continue;case Ai:case"svg":return B5(n);case fe:return JM(n.children);default:return n}return B5(n)}return null}function B5(e){const t=Re("only-child");return k("span",{class:t.e("content")},[e])}const XM=We({virtualRef:{type:Ce(Object)},virtualTriggering:Boolean,onMouseenter:{type:Ce(Function)},onMouseleave:{type:Ce(Function)},onClick:{type:Ce(Function)},onKeydown:{type:Ce(Function)},onFocus:{type:Ce(Function)},onBlur:{type:Ce(Function)},onContextmenu:{type:Ce(Function)},id:String,open:Boolean}),ete=Q({name:"ElPopperTrigger",inheritAttrs:!1}),tte=Q({...ete,props:XM,setup(e,{expose:t}){const n=e,{role:o,triggerRef:r}=Be(I3,void 0);VX(r);const s=R(()=>l.value?n.id:void 0),i=R(()=>{if(o&&o.value==="tooltip")return n.open&&n.id?n.id:void 0}),l=R(()=>{if(o&&o.value!=="tooltip")return o.value}),a=R(()=>l.value?`${n.open}`:void 0);let u;return Ct(()=>{Te(()=>n.virtualRef,c=>{c&&(r.value=ki(c))},{immediate:!0}),Te(r,(c,d)=>{u==null||u(),u=void 0,gs(c)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(f=>{var p;const h=n[f];h&&(c.addEventListener(f.slice(2).toLowerCase(),h),(p=d==null?void 0:d.removeEventListener)==null||p.call(d,f.slice(2).toLowerCase(),h))}),u=Te([s,i,l,a],f=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((p,h)=>{xo(f[h])?c.removeAttribute(p):c.setAttribute(p,f[h])})},{immediate:!0})),gs(d)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(f=>d.removeAttribute(f))},{immediate:!0})}),En(()=>{u==null||u(),u=void 0}),t({triggerRef:r}),(c,d)=>c.virtualTriggering?W("v-if",!0):(C(),q(g(ZM),un({key:0},c.$attrs,{"aria-controls":g(s),"aria-describedby":g(i),"aria-expanded":g(a),"aria-haspopup":g(l)}),{default:$(()=>[he(c.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var nte=ze(tte,[["__file","trigger.vue"]]);const Qv="focus-trap.focus-after-trapped",ey="focus-trap.focus-after-released",ote="focus-trap.focusout-prevented",z5={cancelable:!0,bubbles:!1},rte={cancelable:!0,bubbles:!1},j5="focusAfterTrapped",H5="focusAfterReleased",A3=Symbol("elFocusTrap"),N3=K(),z0=K(0),P3=K(0);let dm=0;const QM=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},U5=(e,t)=>{for(const n of e)if(!ste(n,t))return n},ste=(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=QM(e),n=U5(t,e),o=U5(t.reverse(),e);return[n,o]},lte=e=>e instanceof HTMLInputElement&&"select"in e,el=(e,t)=>{if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),P3.value=window.performance.now(),e!==n&&lte(e)&&t&&e.select()}};function W5(e,t){const n=[...e],o=e.indexOf(t);return o!==-1&&n.splice(o,1),n}const ate=()=>{let e=[];return{push:o=>{const r=e[0];r&&o!==r&&r.pause(),e=W5(e,o),e.unshift(o)},remove:o=>{var r,s;e=W5(e,o),(s=(r=e[0])==null?void 0:r.resume)==null||s.call(r)}}},ute=(e,t=!1)=>{const n=document.activeElement;for(const o of e)if(el(o,t),document.activeElement!==n)return},K5=ate(),cte=()=>z0.value>P3.value,fm=()=>{N3.value="pointer",z0.value=window.performance.now()},q5=()=>{N3.value="keyboard",z0.value=window.performance.now()},dte=()=>(Ct(()=>{dm===0&&(document.addEventListener("mousedown",fm),document.addEventListener("touchstart",fm),document.addEventListener("keydown",q5)),dm++}),En(()=>{dm--,dm<=0&&(document.removeEventListener("mousedown",fm),document.removeEventListener("touchstart",fm),document.removeEventListener("keydown",q5))}),{focusReason:N3,lastUserFocusTimestamp:z0,lastAutomatedFocusTimestamp:P3}),pm=e=>new CustomEvent(ote,{...rte,detail:e}),fte=Q({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[j5,H5,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=K();let o,r;const{focusReason:s}=dte();PX(h=>{e.trapped&&!i.paused&&t("release-requested",h)});const i={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},l=h=>{if(!e.loop&&!e.trapped||i.paused)return;const{key:m,altKey:y,ctrlKey:v,metaKey:w,currentTarget:_,shiftKey:S}=h,{loop:x}=e,E=m===rt.tab&&!y&&!v&&!w,T=document.activeElement;if(E&&T){const O=_,[P,N]=ite(O);if(P&&N){if(!S&&T===N){const B=pm({focusReason:s.value});t("focusout-prevented",B),B.defaultPrevented||(h.preventDefault(),x&&el(P,!0))}else if(S&&[P,O].includes(T)){const B=pm({focusReason:s.value});t("focusout-prevented",B),B.defaultPrevented||(h.preventDefault(),x&&el(N,!0))}}else if(T===O){const B=pm({focusReason:s.value});t("focusout-prevented",B),B.defaultPrevented||h.preventDefault()}}};wt(A3,{focusTrapRef:n,onKeydown:l}),Te(()=>e.focusTrapEl,h=>{h&&(n.value=h)},{immediate:!0}),Te([n],([h],[m])=>{h&&(h.addEventListener("keydown",l),h.addEventListener("focusin",c),h.addEventListener("focusout",d)),m&&(m.removeEventListener("keydown",l),m.removeEventListener("focusin",c),m.removeEventListener("focusout",d))});const a=h=>{t(j5,h)},u=h=>t(H5,h),c=h=>{const m=g(n);if(!m)return;const y=h.target,v=h.relatedTarget,w=y&&m.contains(y);e.trapped||v&&m.contains(v)||(o=v),w&&t("focusin",h),!i.paused&&e.trapped&&(w?r=y:el(r,!0))},d=h=>{const m=g(n);if(!(i.paused||!m))if(e.trapped){const y=h.relatedTarget;!xo(y)&&!m.contains(y)&&setTimeout(()=>{if(!i.paused&&e.trapped){const v=pm({focusReason:s.value});t("focusout-prevented",v),v.defaultPrevented||el(r,!0)}},0)}else{const y=h.target;y&&m.contains(y)||t("focusout",h)}};async function f(){await ot();const h=g(n);if(h){K5.push(i);const m=h.contains(document.activeElement)?o:document.activeElement;if(o=m,!h.contains(m)){const v=new Event(Qv,z5);h.addEventListener(Qv,a),h.dispatchEvent(v),v.defaultPrevented||ot(()=>{let w=e.focusStartEl;tt(w)||(el(w),document.activeElement!==w&&(w="first")),w==="first"&&ute(QM(h),!0),(document.activeElement===m||w==="container")&&el(h)})}}}function p(){const h=g(n);if(h){h.removeEventListener(Qv,a);const m=new CustomEvent(ey,{...z5,detail:{focusReason:s.value}});h.addEventListener(ey,u),h.dispatchEvent(m),!m.defaultPrevented&&(s.value=="keyboard"||!cte()||h.contains(document.activeElement))&&el(o??document.body),h.removeEventListener(ey,u),K5.remove(i)}}return Ct(()=>{e.trapped&&f(),Te(()=>e.trapped,h=>{h?f():p()})}),En(()=>{e.trapped&&p()}),{onKeydown:l}}});function pte(e,t,n,o,r,s){return he(e.$slots,"default",{handleKeydown:e.onKeydown})}var j0=ze(fte,[["render",pte],["__file","focus-trap.vue"]]);const hte=["fixed","absolute"],mte=We({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:Ce(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:L0,default:"bottom"},popperOptions:{type:Ce(Object),default:()=>({})},strategy:{type:String,values:hte,default:"absolute"}}),eT=We({...mte,id:String,style:{type:Ce([String,Array,Object])},className:{type:Ce([String,Array,Object])},effect:{type:String,default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:Ce([String,Array,Object])},popperStyle:{type:Ce([String,Array,Object])},referenceEl:{type:Ce(Object)},triggerTargetEl:{type:Ce(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},ariaLabel:{type:String,default:void 0},virtualTriggering:Boolean,zIndex:Number}),gte={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},vte=(e,t=[])=>{const{placement:n,strategy:o,popperOptions:r}=e,s={placement:n,strategy:o,...r,modifiers:[..._te(e),...t]};return bte(s,r==null?void 0:r.modifiers),s},yte=e=>{if(xt)return ki(e)};function _te(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 bte(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const wte=0,Cte=e=>{const{popperInstanceRef:t,contentRef:n,triggerRef:o,role:r}=Be(I3,void 0),s=K(),i=K(),l=R(()=>({name:"eventListeners",enabled:!!e.visible})),a=R(()=>{var v;const w=g(s),_=(v=g(i))!=null?v:wte;return{name:"arrow",enabled:!Wx(w),options:{element:w,padding:_}}}),u=R(()=>({onFirstUpdate:()=>{h()},...vte(e,[g(a),g(l)])})),c=R(()=>yte(e.referenceEl)||g(o)),{attributes:d,state:f,styles:p,update:h,forceUpdate:m,instanceRef:y}=OX(c,n,u);return Te(y,v=>t.value=v),Ct(()=>{Te(()=>{var v;return(v=g(c))==null?void 0:v.getBoundingClientRect()},()=>{h()})}),{attributes:d,arrowRef:s,contentRef:n,instanceRef:y,state:f,styles:p,role:r,forceUpdate:m,update:h}},kte=(e,{attributes:t,styles:n,role:o})=>{const{nextZIndex:r}=D0(),s=Re("popper"),i=R(()=>g(t).popper),l=K(_t(e.zIndex)?e.zIndex:r()),a=R(()=>[s.b(),s.is("pure",e.pure),s.is(e.effect),e.popperClass]),u=R(()=>[{zIndex:g(l)},g(n).popper,e.popperStyle||{}]),c=R(()=>o.value==="dialog"?"false":void 0),d=R(()=>g(n).arrow||{});return{ariaModal:c,arrowStyle:d,contentAttrs:i,contentClass:a,contentStyle:u,contentZIndex:l,updateZIndex:()=>{l.value=_t(e.zIndex)?e.zIndex:r()}}},Ste=(e,t)=>{const n=K(!1),o=K();return{focusStartRef:o,trapped:n,onFocusAfterReleased:u=>{var c;((c=u.detail)==null?void 0:c.focusReason)!=="pointer"&&(o.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:u=>{e.visible&&!n.value&&(u.target&&(o.value=u.target),n.value=!0)},onFocusoutPrevented:u=>{e.trapping||(u.detail.focusReason==="pointer"&&u.preventDefault(),n.value=!1)},onReleaseRequested:()=>{n.value=!1,t("close")}}},$te=Q({name:"ElPopperContent"}),Ete=Q({...$te,props:eT,emits:gte,setup(e,{expose:t,emit:n}){const o=e,{focusStartRef:r,trapped:s,onFocusAfterReleased:i,onFocusAfterTrapped:l,onFocusInTrap:a,onFocusoutPrevented:u,onReleaseRequested:c}=Ste(o,n),{attributes:d,arrowRef:f,contentRef:p,styles:h,instanceRef:m,role:y,update:v}=Cte(o),{ariaModal:w,arrowStyle:_,contentAttrs:S,contentClass:x,contentStyle:E,updateZIndex:T}=kte(o,{styles:h,attributes:d,role:y}),O=Be(uu,void 0),P=K();wt(qM,{arrowStyle:_,arrowRef:f,arrowOffset:P}),O&&(O.addInputId||O.removeInputId)&&wt(uu,{...O,addInputId:yt,removeInputId:yt});let N;const F=(Y=!0)=>{v(),Y&&T()},B=()=>{F(!1),o.visible&&o.focusOnShow?s.value=!0:o.visible===!1&&(s.value=!1)};return Ct(()=>{Te(()=>o.triggerTargetEl,(Y,Z)=>{N==null||N(),N=void 0;const U=g(Y||p.value),j=g(Z||p.value);gs(U)&&(N=Te([y,()=>o.ariaLabel,w,()=>o.id],V=>{["role","aria-label","aria-modal","id"].forEach((H,L)=>{xo(V[L])?U.removeAttribute(H):U.setAttribute(H,V[L])})},{immediate:!0})),j!==U&&gs(j)&&["role","aria-label","aria-modal","id"].forEach(V=>{j.removeAttribute(V)})},{immediate:!0}),Te(()=>o.visible,B,{immediate:!0})}),En(()=>{N==null||N(),N=void 0}),t({popperContentRef:p,popperInstanceRef:m,updatePopper:F,contentStyle:E}),(Y,Z)=>(C(),M("div",un({ref_key:"contentRef",ref:p},g(S),{style:g(E),class:g(x),tabindex:"-1",onMouseenter:Z[0]||(Z[0]=U=>Y.$emit("mouseenter",U)),onMouseleave:Z[1]||(Z[1]=U=>Y.$emit("mouseleave",U))}),[k(g(j0),{trapped:g(s),"trap-on-focus-in":!0,"focus-trap-el":g(p),"focus-start-el":g(r),onFocusAfterTrapped:g(l),onFocusAfterReleased:g(i),onFocusin:g(a),onFocusoutPrevented:g(u),onReleaseRequested:g(c)},{default:$(()=>[he(Y.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var xte=ze(Ete,[["__file","content.vue"]]);const Mte=Zt(Yee),H0=Symbol("elTooltip"),ar=We({...DX,...eT,appendTo:{type:Ce([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,ariaLabel:String,visible:{type:Ce(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),Dp=We({...XM,disabled:Boolean,trigger:{type:Ce([String,Array]),default:"hover"},triggerKeys:{type:Ce(Array),default:()=>[rt.enter,rt.space]}}),{useModelToggleProps:Tte,useModelToggleEmits:Ote,useModelToggle:Ite}=pM("visible"),Ate=We({...GM,...Tte,...ar,...Dp,...YM,showArrow:{type:Boolean,default:!0}}),Nte=[...Ote,"before-show","before-hide","show","hide","open","close"],Pte=(e,t)=>Me(e)?e.includes(t):e===t,Lu=(e,t,n)=>o=>{Pte(g(e),t)&&n(o)},Lte=Q({name:"ElTooltipTrigger"}),Rte=Q({...Lte,props:Dp,setup(e,{expose:t}){const n=e,o=Re("tooltip"),{controlled:r,id:s,open:i,onOpen:l,onClose:a,onToggle:u}=Be(H0,void 0),c=K(null),d=()=>{if(g(r)||n.disabled)return!0},f=pn(n,"trigger"),p=Nn(d,Lu(f,"hover",l)),h=Nn(d,Lu(f,"hover",a)),m=Nn(d,Lu(f,"click",S=>{S.button===0&&u(S)})),y=Nn(d,Lu(f,"focus",l)),v=Nn(d,Lu(f,"focus",a)),w=Nn(d,Lu(f,"contextmenu",S=>{S.preventDefault(),u(S)})),_=Nn(d,S=>{const{code:x}=S;n.triggerKeys.includes(x)&&(S.preventDefault(),u(S))});return t({triggerRef:c}),(S,x)=>(C(),q(g(nte),{id:g(s),"virtual-ref":S.virtualRef,open:g(i),"virtual-triggering":S.virtualTriggering,class:D(g(o).e("trigger")),onBlur:g(v),onClick:g(m),onContextmenu:g(w),onFocus:g(y),onMouseenter:g(p),onMouseleave:g(h),onKeydown:g(_)},{default:$(()=>[he(S.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var Dte=ze(Rte,[["__file","trigger.vue"]]);const Fte=Q({name:"ElTooltipContent",inheritAttrs:!1}),Vte=Q({...Fte,props:ar,setup(e,{expose:t}){const n=e,{selector:o}=xM(),r=Re("tooltip"),s=K(null),i=K(!1),{controlled:l,id:a,open:u,trigger:c,onClose:d,onOpen:f,onShow:p,onHide:h,onBeforeShow:m,onBeforeHide:y}=Be(H0,void 0),v=R(()=>n.transition||`${r.namespace.value}-fade-in-linear`),w=R(()=>n.persistent);En(()=>{i.value=!0});const _=R(()=>g(w)?!0:g(u)),S=R(()=>n.disabled?!1:g(u)),x=R(()=>n.appendTo||o.value),E=R(()=>{var V;return(V=n.style)!=null?V:{}}),T=R(()=>!g(u)),O=()=>{h()},P=()=>{if(g(l))return!0},N=Nn(P,()=>{n.enterable&&g(c)==="hover"&&f()}),F=Nn(P,()=>{g(c)==="hover"&&d()}),B=()=>{var V,H;(H=(V=s.value)==null?void 0:V.updatePopper)==null||H.call(V),m==null||m()},Y=()=>{y==null||y()},Z=()=>{p(),j=fx(R(()=>{var V;return(V=s.value)==null?void 0:V.popperContentRef}),()=>{if(g(l))return;g(c)!=="hover"&&d()})},U=()=>{n.virtualTriggering||d()};let j;return Te(()=>g(u),V=>{V||j==null||j()},{flush:"post"}),Te(()=>n.content,()=>{var V,H;(H=(V=s.value)==null?void 0:V.updatePopper)==null||H.call(V)}),t({contentRef:s}),(V,H)=>(C(),q(_s,{disabled:!V.teleported,to:g(x)},[k(_r,{name:g(v),onAfterLeave:O,onBeforeEnter:B,onAfterEnter:Z,onBeforeLeave:Y},{default:$(()=>[g(_)?He((C(),q(g(xte),un({key:0,id:g(a),ref_key:"contentRef",ref:s},V.$attrs,{"aria-label":V.ariaLabel,"aria-hidden":g(T),"boundaries-padding":V.boundariesPadding,"fallback-placements":V.fallbackPlacements,"gpu-acceleration":V.gpuAcceleration,offset:V.offset,placement:V.placement,"popper-options":V.popperOptions,strategy:V.strategy,effect:V.effect,enterable:V.enterable,pure:V.pure,"popper-class":V.popperClass,"popper-style":[V.popperStyle,g(E)],"reference-el":V.referenceEl,"trigger-target-el":V.triggerTargetEl,visible:g(S),"z-index":V.zIndex,onMouseenter:g(N),onMouseleave:g(F),onBlur:U,onClose:g(d)}),{default:$(()=>[i.value?W("v-if",!0):he(V.$slots,"default",{key:0})]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[en,g(S)]]):W("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var Bte=ze(Vte,[["__file","content.vue"]]);const zte=["innerHTML"],jte={key:1},Hte=Q({name:"ElTooltip"}),Ute=Q({...Hte,props:Ate,emits:Nte,setup(e,{expose:t,emit:n}){const o=e;RX();const r=Hr(),s=K(),i=K(),l=()=>{var v;const w=g(s);w&&((v=w.popperInstanceRef)==null||v.update())},a=K(!1),u=K(),{show:c,hide:d,hasUpdateHandler:f}=Ite({indicator:a,toggleReason:u}),{onOpen:p,onClose:h}=FX({showAfter:pn(o,"showAfter"),hideAfter:pn(o,"hideAfter"),autoClose:pn(o,"autoClose"),open:c,close:d}),m=R(()=>Br(o.visible)&&!f.value);wt(H0,{controlled:m,id:r,open:_u(a),trigger:pn(o,"trigger"),onOpen:v=>{p(v)},onClose:v=>{h(v)},onToggle:v=>{g(a)?h(v):p(v)},onShow:()=>{n("show",u.value)},onHide:()=>{n("hide",u.value)},onBeforeShow:()=>{n("before-show",u.value)},onBeforeHide:()=>{n("before-hide",u.value)},updatePopper:l}),Te(()=>o.disabled,v=>{v&&a.value&&(a.value=!1)});const y=v=>{var w,_;const S=(_=(w=i.value)==null?void 0:w.contentRef)==null?void 0:_.popperContentRef,x=(v==null?void 0:v.relatedTarget)||document.activeElement;return S&&S.contains(x)};return mw(()=>a.value&&d()),t({popperRef:s,contentRef:i,isFocusInsideContent:y,updatePopper:l,onOpen:p,onClose:h,hide:d}),(v,w)=>(C(),q(g(Mte),{ref_key:"popperRef",ref:s,role:v.role},{default:$(()=>[k(Dte,{disabled:v.disabled,trigger:v.trigger,"trigger-keys":v.triggerKeys,"virtual-ref":v.virtualRef,"virtual-triggering":v.virtualTriggering},{default:$(()=>[v.$slots.default?he(v.$slots,"default",{key:0}):W("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),k(Bte,{ref_key:"contentRef",ref:i,"aria-label":v.ariaLabel,"boundaries-padding":v.boundariesPadding,content:v.content,disabled:v.disabled,effect:v.effect,enterable:v.enterable,"fallback-placements":v.fallbackPlacements,"hide-after":v.hideAfter,"gpu-acceleration":v.gpuAcceleration,offset:v.offset,persistent:v.persistent,"popper-class":v.popperClass,"popper-style":v.popperStyle,placement:v.placement,"popper-options":v.popperOptions,pure:v.pure,"raw-content":v.rawContent,"reference-el":v.referenceEl,"trigger-target-el":v.triggerTargetEl,"show-after":v.showAfter,strategy:v.strategy,teleported:v.teleported,transition:v.transition,"virtual-triggering":v.virtualTriggering,"z-index":v.zIndex,"append-to":v.appendTo},{default:$(()=>[he(v.$slots,"content",{},()=>[v.rawContent?(C(),M("span",{key:0,innerHTML:v.content},null,8,zte)):(C(),M("span",jte,A(v.content),1))]),v.showArrow?(C(),q(g(Xee),{key:0,"arrow-offset":v.arrowOffset},null,8,["arrow-offset"])):W("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 Wte=ze(Ute,[["__file","tooltip.vue"]]);const $u=Zt(Wte),Kte=We({size:{type:[Number,String],values:Zl,default:"",validator:e=>_t(e)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:Oo},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:Ce(String),default:"cover"}}),qte={error:e=>e instanceof Event},Gte=["src","alt","srcset"],Yte=Q({name:"ElAvatar"}),Zte=Q({...Yte,props:Kte,emits:qte,setup(e,{emit:t}){const n=e,o=Re("avatar"),r=K(!1),s=R(()=>{const{size:u,icon:c,shape:d}=n,f=[o.b()];return tt(u)&&f.push(o.m(u)),c&&f.push(o.m("icon")),d&&f.push(o.m(d)),f}),i=R(()=>{const{size:u}=n;return _t(u)?o.cssVarBlock({size:Zo(u)||""}):void 0}),l=R(()=>({objectFit:n.fit}));Te(()=>n.src,()=>r.value=!1);function a(u){r.value=!0,t("error",u)}return(u,c)=>(C(),M("span",{class:D(g(s)),style:Qe(g(i))},[(u.src||u.srcSet)&&!r.value?(C(),M("img",{key:0,src:u.src,alt:u.alt,srcset:u.srcSet,style:Qe(g(l)),onError:a},null,44,Gte)):u.icon?(C(),q(g(Ne),{key:1},{default:$(()=>[(C(),q(Lt(u.icon)))]),_:1})):he(u.$slots,"default",{key:2})],6))}});var Jte=ze(Zte,[["__file","avatar.vue"]]);const Xte=Zt(Jte),tT=Symbol("breadcrumbKey"),Qte=We({separator:{type:String,default:"/"},separatorIcon:{type:Oo}}),ene=["aria-label"],tne=Q({name:"ElBreadcrumb"}),nne=Q({...tne,props:Qte,setup(e){const t=e,{t:n}=Kt(),o=Re("breadcrumb"),r=K();return wt(tT,t),Ct(()=>{const s=r.value.querySelectorAll(`.${o.e("item")}`);s.length&&s[s.length-1].setAttribute("aria-current","page")}),(s,i)=>(C(),M("div",{ref_key:"breadcrumb",ref:r,class:D(g(o).b()),"aria-label":g(n)("el.breadcrumb.label"),role:"navigation"},[he(s.$slots,"default")],10,ene))}});var one=ze(nne,[["__file","breadcrumb.vue"]]);const rne=We({to:{type:Ce([String,Object]),default:""},replace:{type:Boolean,default:!1}}),sne=Q({name:"ElBreadcrumbItem"}),ine=Q({...sne,props:rne,setup(e){const t=e,n=at(),o=Be(tT,void 0),r=Re("breadcrumb"),s=n.appContext.config.globalProperties.$router,i=K(),l=()=>{!t.to||!s||(t.replace?s.replace(t.to):s.push(t.to))};return(a,u)=>{var c,d;return C(),M("span",{class:D(g(r).e("item"))},[b("span",{ref_key:"link",ref:i,class:D([g(r).e("inner"),g(r).is("link",!!a.to)]),role:"link",onClick:l},[he(a.$slots,"default")],2),(c=g(o))!=null&&c.separatorIcon?(C(),q(g(Ne),{key:0,class:D(g(r).e("separator"))},{default:$(()=>[(C(),q(Lt(g(o).separatorIcon)))]),_:1},8,["class"])):(C(),M("span",{key:1,class:D(g(r).e("separator")),role:"presentation"},A((d=g(o))==null?void 0:d.separator),3))],2)}}});var nT=ze(ine,[["__file","breadcrumb-item.vue"]]);const lne=Zt(one,{BreadcrumbItem:nT}),ane=Gn(nT),oT=Symbol("buttonGroupContextKey"),une=(e,t)=>{Ua({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},R(()=>e.type==="text"));const n=Be(oT,void 0),o=ph("button"),{form:r}=ni(),s=Jo(R(()=>n==null?void 0:n.size)),i=Gr(),l=K(),a=Kr(),u=R(()=>e.type||(n==null?void 0:n.type)||""),c=R(()=>{var h,m,y;return(y=(m=e.autoInsertSpace)!=null?m:(h=o.value)==null?void 0:h.autoInsertSpace)!=null?y:!1}),d=R(()=>e.tag==="button"?{ariaDisabled:i.value||e.loading,disabled:i.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),f=R(()=>{var h;const m=(h=a.default)==null?void 0:h.call(a);if(c.value&&(m==null?void 0:m.length)===1){const y=m[0];if((y==null?void 0:y.type)===Ai){const v=y.children;return/^\p{Unified_Ideograph}{2}$/u.test(v.trim())}}return!1});return{_disabled:i,_size:s,_type:u,_ref:l,_props:d,shouldAddSpace:f,handleClick:h=>{e.nativeType==="reset"&&(r==null||r.resetFields()),t("click",h)}}},cne=["default","primary","success","warning","info","danger","text",""],dne=["button","submit","reset"],lb=We({size:qr,disabled:Boolean,type:{type:String,values:cne,default:""},icon:{type:Oo},nativeType:{type:String,values:dne,default:"button"},loading:Boolean,loadingIcon:{type:Oo,default:()=>a3},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:Ce([String,Object]),default:"button"}}),fne={click:e=>e instanceof MouseEvent};function ro(e,t){pne(e)&&(e="100%");var n=hne(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 hm(e){return Math.min(1,Math.max(0,e))}function pne(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function hne(e){return typeof e=="string"&&e.indexOf("%")!==-1}function rT(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function mm(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Aa(e){return e.length===1?"0"+e:String(e)}function mne(e,t,n){return{r:ro(e,255)*255,g:ro(t,255)*255,b:ro(n,255)*255}}function G5(e,t,n){e=ro(e,255),t=ro(t,255),n=ro(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 ty(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 gne(e,t,n){var o,r,s;if(e=ro(e,360),t=ro(t,100),n=ro(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=ty(l,i,e+1/3),r=ty(l,i,e),s=ty(l,i,e-1/3)}return{r:o*255,g:r*255,b:s*255}}function Y5(e,t,n){e=ro(e,255),t=ro(t,255),n=ro(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 vne(e,t,n){e=ro(e,360)*6,t=ro(t,100),n=ro(n,100);var o=Math.floor(e),r=e-o,s=n*(1-t),i=n*(1-r*t),l=n*(1-(1-r)*t),a=o%6,u=[n,i,s,s,l,n][a],c=[l,n,n,i,s,s][a],d=[s,s,l,n,n,i][a];return{r:u*255,g:c*255,b:d*255}}function Z5(e,t,n,o){var r=[Aa(Math.round(e).toString(16)),Aa(Math.round(t).toString(16)),Aa(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 yne(e,t,n,o,r){var s=[Aa(Math.round(e).toString(16)),Aa(Math.round(t).toString(16)),Aa(Math.round(n).toString(16)),Aa(_ne(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 _ne(e){return Math.round(parseFloat(e)*255).toString(16)}function J5(e){return or(e)/255}function or(e){return parseInt(e,16)}function bne(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var ab={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 wne(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=Sne(e)),typeof e=="object"&&(ci(e.r)&&ci(e.g)&&ci(e.b)?(t=mne(e.r,e.g,e.b),i=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ci(e.h)&&ci(e.s)&&ci(e.v)?(o=mm(e.s),r=mm(e.v),t=vne(e.h,o,r),i=!0,l="hsv"):ci(e.h)&&ci(e.s)&&ci(e.l)&&(o=mm(e.s),s=mm(e.l),t=gne(e.h,o,s),i=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=rT(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 Cne="[-\\+]?\\d+%?",kne="[-\\+]?\\d*\\.\\d+%?",Tl="(?:".concat(kne,")|(?:").concat(Cne,")"),ny="[\\s|\\(]+(".concat(Tl,")[,|\\s]+(").concat(Tl,")[,|\\s]+(").concat(Tl,")\\s*\\)?"),oy="[\\s|\\(]+(".concat(Tl,")[,|\\s]+(").concat(Tl,")[,|\\s]+(").concat(Tl,")[,|\\s]+(").concat(Tl,")\\s*\\)?"),Xr={CSS_UNIT:new RegExp(Tl),rgb:new RegExp("rgb"+ny),rgba:new RegExp("rgba"+oy),hsl:new RegExp("hsl"+ny),hsla:new RegExp("hsla"+oy),hsv:new RegExp("hsv"+ny),hsva:new RegExp("hsva"+oy),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 Sne(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(ab[e])e=ab[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Xr.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Xr.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Xr.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Xr.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Xr.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Xr.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Xr.hex8.exec(e),n?{r:or(n[1]),g:or(n[2]),b:or(n[3]),a:J5(n[4]),format:t?"name":"hex8"}:(n=Xr.hex6.exec(e),n?{r:or(n[1]),g:or(n[2]),b:or(n[3]),format:t?"name":"hex"}:(n=Xr.hex4.exec(e),n?{r:or(n[1]+n[1]),g:or(n[2]+n[2]),b:or(n[3]+n[3]),a:J5(n[4]+n[4]),format:t?"name":"hex8"}:(n=Xr.hex3.exec(e),n?{r:or(n[1]+n[1]),g:or(n[2]+n[2]),b:or(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function ci(e){return!!Xr.CSS_UNIT.exec(String(e))}var $ne=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=bne(t)),this.originalInput=t;var r=wne(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=rT(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=Y5(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=Y5(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=G5(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=G5(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),Z5(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),yne(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(ro(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(ro(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="#"+Z5(this.r,this.g,this.b,!1),n=0,o=Object.entries(ab);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=hm(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=hm(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=hm(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=hm(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 Ene(e){const t=Gr(),n=Re("button");return R(()=>{let o={};const r=e.color;if(r){const s=new $ne(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 u=e.dark?Zi(s,50):s.tint(50).toString();o[n.cssVarBlockName("disabled-bg-color")]=u,o[n.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,o[n.cssVarBlockName("disabled-border-color")]=u}}}return o})}const xne=Q({name:"ElButton"}),Mne=Q({...xne,props:lb,emits:fne,setup(e,{expose:t,emit:n}){const o=e,r=Ene(o),s=Re("button"),{_ref:i,_size:l,_type:a,_disabled:u,_props:c,shouldAddSpace:d,handleClick:f}=une(o,n),p=R(()=>[s.b(),s.m(a.value),s.m(l.value),s.is("disabled",u.value),s.is("loading",o.loading),s.is("plain",o.plain),s.is("round",o.round),s.is("circle",o.circle),s.is("text",o.text),s.is("link",o.link),s.is("has-bg",o.bg)]);return t({ref:i,size:l,type:a,disabled:u,shouldAddSpace:d}),(h,m)=>(C(),q(Lt(h.tag),un({ref_key:"_ref",ref:i},g(c),{class:g(p),style:g(r),onClick:g(f)}),{default:$(()=>[h.loading?(C(),M(fe,{key:0},[h.$slots.loading?he(h.$slots,"loading",{key:0}):(C(),q(g(Ne),{key:1,class:D(g(s).is("loading"))},{default:$(()=>[(C(),q(Lt(h.loadingIcon)))]),_:1},8,["class"]))],64)):h.icon||h.$slots.icon?(C(),q(g(Ne),{key:1},{default:$(()=>[h.icon?(C(),q(Lt(h.icon),{key:0})):he(h.$slots,"icon",{key:1})]),_:3})):W("v-if",!0),h.$slots.default?(C(),M("span",{key:2,class:D({[g(s).em("text","expand")]:g(d)})},[he(h.$slots,"default")],2)):W("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var Tne=ze(Mne,[["__file","button.vue"]]);const One={size:lb.size,type:lb.type},Ine=Q({name:"ElButtonGroup"}),Ane=Q({...Ine,props:One,setup(e){const t=e;wt(oT,Dn({size:pn(t,"size"),type:pn(t,"type")}));const n=Re("button");return(o,r)=>(C(),M("div",{class:D(`${g(n).b("group")}`)},[he(o.$slots,"default")],2))}});var sT=ze(Ane,[["__file","button-group.vue"]]);const pt=Zt(Tne,{ButtonGroup:sT});Gn(sT);var On=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var iT={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(On,function(){var n=1e3,o=6e4,r=36e5,s="millisecond",i="second",l="minute",a="hour",u="day",c="week",d="month",f="quarter",p="year",h="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Z){var U=["th","st","nd","rd"],j=Z%100;return"["+Z+(U[(j-20)%10]||U[j]||U[0])+"]"}},_=function(Z,U,j){var V=String(Z);return!V||V.length>=U?Z:""+Array(U+1-V.length).join(j)+Z},S={s:_,z:function(Z){var U=-Z.utcOffset(),j=Math.abs(U),V=Math.floor(j/60),H=j%60;return(U<=0?"+":"-")+_(V,2,"0")+":"+_(H,2,"0")},m:function Z(U,j){if(U.date()<j.date())return-Z(j,U);var V=12*(j.year()-U.year())+(j.month()-U.month()),H=U.clone().add(V,d),L=j-H<0,I=U.clone().add(V+(L?-1:1),d);return+(-(V+(j-H)/(L?H-I:I-H))||0)},a:function(Z){return Z<0?Math.ceil(Z)||0:Math.floor(Z)},p:function(Z){return{M:d,y:p,w:c,d:u,D:h,h:a,m:l,s:i,ms:s,Q:f}[Z]||String(Z||"").toLowerCase().replace(/s$/,"")},u:function(Z){return Z===void 0}},x="en",E={};E[x]=w;var T="$isDayjsObject",O=function(Z){return Z instanceof B||!(!Z||!Z[T])},P=function Z(U,j,V){var H;if(!U)return x;if(typeof U=="string"){var L=U.toLowerCase();E[L]&&(H=L),j&&(E[L]=j,H=L);var I=U.split("-");if(!H&&I.length>1)return Z(I[0])}else{var X=U.name;E[X]=U,H=X}return!V&&H&&(x=H),H||!V&&x},N=function(Z,U){if(O(Z))return Z.clone();var j=typeof U=="object"?U:{};return j.date=Z,j.args=arguments,new B(j)},F=S;F.l=P,F.i=O,F.w=function(Z,U){return N(Z,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var B=function(){function Z(j){this.$L=P(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[T]=!0}var U=Z.prototype;return U.parse=function(j){this.$d=function(V){var H=V.date,L=V.utc;if(H===null)return new Date(NaN);if(F.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var I=H.match(y);if(I){var X=I[2]-1||0,oe=(I[7]||"0").substring(0,3);return L?new Date(Date.UTC(I[1],X,I[3]||1,I[4]||0,I[5]||0,I[6]||0,oe)):new Date(I[1],X,I[3]||1,I[4]||0,I[5]||0,I[6]||0,oe)}}return new Date(H)}(j),this.init()},U.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},U.$utils=function(){return F},U.isValid=function(){return this.$d.toString()!==m},U.isSame=function(j,V){var H=N(j);return this.startOf(V)<=H&&H<=this.endOf(V)},U.isAfter=function(j,V){return N(j)<this.startOf(V)},U.isBefore=function(j,V){return this.endOf(V)<N(j)},U.$g=function(j,V,H){return F.u(j)?this[V]:this.set(H,j)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(j,V){var H=this,L=!!F.u(V)||V,I=F.p(j),X=function(ve,le){var Ie=F.w(H.$u?Date.UTC(H.$y,le,ve):new Date(H.$y,le,ve),H);return L?Ie:Ie.endOf(u)},oe=function(ve,le){return F.w(H.toDate()[ve].apply(H.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(le)),H)},z=this.$W,ge=this.$M,Oe=this.$D,xe="set"+(this.$u?"UTC":"");switch(I){case p:return L?X(1,0):X(31,11);case d:return L?X(1,ge):X(0,ge+1);case c:var ee=this.$locale().weekStart||0,de=(z<ee?z+7:z)-ee;return X(L?Oe-de:Oe+(6-de),ge);case u:case h:return oe(xe+"Hours",0);case a:return oe(xe+"Minutes",1);case l:return oe(xe+"Seconds",2);case i:return oe(xe+"Milliseconds",3);default:return this.clone()}},U.endOf=function(j){return this.startOf(j,!1)},U.$set=function(j,V){var H,L=F.p(j),I="set"+(this.$u?"UTC":""),X=(H={},H[u]=I+"Date",H[h]=I+"Date",H[d]=I+"Month",H[p]=I+"FullYear",H[a]=I+"Hours",H[l]=I+"Minutes",H[i]=I+"Seconds",H[s]=I+"Milliseconds",H)[L],oe=L===u?this.$D+(V-this.$W):V;if(L===d||L===p){var z=this.clone().set(h,1);z.$d[X](oe),z.init(),this.$d=z.set(h,Math.min(this.$D,z.daysInMonth())).$d}else X&&this.$d[X](oe);return this.init(),this},U.set=function(j,V){return this.clone().$set(j,V)},U.get=function(j){return this[F.p(j)]()},U.add=function(j,V){var H,L=this;j=Number(j);var I=F.p(V),X=function(ge){var Oe=N(L);return F.w(Oe.date(Oe.date()+Math.round(ge*j)),L)};if(I===d)return this.set(d,this.$M+j);if(I===p)return this.set(p,this.$y+j);if(I===u)return X(1);if(I===c)return X(7);var oe=(H={},H[l]=o,H[a]=r,H[i]=n,H)[I]||1,z=this.$d.getTime()+j*oe;return F.w(z,this)},U.subtract=function(j,V){return this.add(-1*j,V)},U.format=function(j){var V=this,H=this.$locale();if(!this.isValid())return H.invalidDate||m;var L=j||"YYYY-MM-DDTHH:mm:ssZ",I=F.z(this),X=this.$H,oe=this.$m,z=this.$M,ge=H.weekdays,Oe=H.months,xe=H.meridiem,ee=function(le,Ie,Ge,G){return le&&(le[Ie]||le(V,L))||Ge[Ie].slice(0,G)},de=function(le){return F.s(X%12||12,le,"0")},ve=xe||function(le,Ie,Ge){var G=le<12?"AM":"PM";return Ge?G.toLowerCase():G};return L.replace(v,function(le,Ie){return Ie||function(Ge){switch(Ge){case"YY":return String(V.$y).slice(-2);case"YYYY":return F.s(V.$y,4,"0");case"M":return z+1;case"MM":return F.s(z+1,2,"0");case"MMM":return ee(H.monthsShort,z,Oe,3);case"MMMM":return ee(Oe,z);case"D":return V.$D;case"DD":return F.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return ee(H.weekdaysMin,V.$W,ge,2);case"ddd":return ee(H.weekdaysShort,V.$W,ge,3);case"dddd":return ge[V.$W];case"H":return String(X);case"HH":return F.s(X,2,"0");case"h":return de(1);case"hh":return de(2);case"a":return ve(X,oe,!0);case"A":return ve(X,oe,!1);case"m":return String(oe);case"mm":return F.s(oe,2,"0");case"s":return String(V.$s);case"ss":return F.s(V.$s,2,"0");case"SSS":return F.s(V.$ms,3,"0");case"Z":return I}return null}(le)||I.replace(":","")})},U.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},U.diff=function(j,V,H){var L,I=this,X=F.p(V),oe=N(j),z=(oe.utcOffset()-this.utcOffset())*o,ge=this-oe,Oe=function(){return F.m(I,oe)};switch(X){case p:L=Oe()/12;break;case d:L=Oe();break;case f:L=Oe()/3;break;case c:L=(ge-z)/6048e5;break;case u:L=(ge-z)/864e5;break;case a:L=ge/r;break;case l:L=ge/o;break;case i:L=ge/n;break;default:L=ge}return H?L:F.a(L)},U.daysInMonth=function(){return this.endOf(d).$D},U.$locale=function(){return E[this.$L]},U.locale=function(j,V){if(!j)return this.$L;var H=this.clone(),L=P(j,V,!0);return L&&(H.$L=L),H},U.clone=function(){return F.w(this.$d,this)},U.toDate=function(){return new Date(this.valueOf())},U.toJSON=function(){return this.isValid()?this.toISOString():null},U.toISOString=function(){return this.$d.toISOString()},U.toString=function(){return this.$d.toUTCString()},Z}(),Y=B.prototype;return N.prototype=Y,[["$ms",s],["$s",i],["$m",l],["$H",a],["$W",u],["$M",d],["$y",p],["$D",h]].forEach(function(Z){Y[Z[1]]=function(U){return this.$g(U,Z[0],Z[1])}}),N.extend=function(Z,U){return Z.$i||(Z(U,B,N),Z.$i=!0),N},N.locale=P,N.isDayjs=O,N.unix=function(Z){return N(1e3*Z)},N.en=E[x],N.Ls=E,N.p={},N})})(iT);var Nne=iT.exports;const ut=_o(Nne);var lT={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(On,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d\d/,s=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,l={},a=function(m){return(m=+m)+(m>68?1900:2e3)},u=function(m){return function(y){this[m]=+y}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(y){if(!y||y==="Z")return 0;var v=y.match(/([+-]|\d\d)/g),w=60*v[1]+(+v[2]||0);return w===0?0:v[0]==="+"?-w:w}(m)}],d=function(m){var y=l[m];return y&&(y.indexOf?y:y.s.concat(y.f))},f=function(m,y){var v,w=l.meridiem;if(w){for(var _=1;_<=24;_+=1)if(m.indexOf(w(_,0,y))>-1){v=_>12;break}}else v=m===(y?"pm":"PM");return v},p={A:[i,function(m){this.afternoon=f(m,!1)}],a:[i,function(m){this.afternoon=f(m,!0)}],S:[/\d/,function(m){this.milliseconds=100*+m}],SS:[r,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[s,u("seconds")],ss:[s,u("seconds")],m:[s,u("minutes")],mm:[s,u("minutes")],H:[s,u("hours")],h:[s,u("hours")],HH:[s,u("hours")],hh:[s,u("hours")],D:[s,u("day")],DD:[r,u("day")],Do:[i,function(m){var y=l.ordinal,v=m.match(/\d+/);if(this.day=v[0],y)for(var w=1;w<=31;w+=1)y(w).replace(/\[|\]/g,"")===m&&(this.day=w)}],M:[s,u("month")],MM:[r,u("month")],MMM:[i,function(m){var y=d("months"),v=(d("monthsShort")||y.map(function(w){return w.slice(0,3)})).indexOf(m)+1;if(v<1)throw new Error;this.month=v%12||v}],MMMM:[i,function(m){var y=d("months").indexOf(m)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[r,function(m){this.year=a(m)}],YYYY:[/\d{4}/,u("year")],Z:c,ZZ:c};function h(m){var y,v;y=m,v=l&&l.formats;for(var w=(m=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(P,N,F){var B=F&&F.toUpperCase();return N||v[F]||n[F]||v[B].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Y,Z,U){return Z||U.slice(1)})})).match(o),_=w.length,S=0;S<_;S+=1){var x=w[S],E=p[x],T=E&&E[0],O=E&&E[1];w[S]=O?{regex:T,parser:O}:x.replace(/^\[|\]$/g,"")}return function(P){for(var N={},F=0,B=0;F<_;F+=1){var Y=w[F];if(typeof Y=="string")B+=Y.length;else{var Z=Y.regex,U=Y.parser,j=P.slice(B),V=Z.exec(j)[0];U.call(N,V),P=P.replace(V,"")}}return function(H){var L=H.afternoon;if(L!==void 0){var I=H.hours;L?I<12&&(H.hours+=12):I===12&&(H.hours=0),delete H.afternoon}}(N),N}}return function(m,y,v){v.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(a=m.parseTwoDigitYear);var w=y.prototype,_=w.parse;w.parse=function(S){var x=S.date,E=S.utc,T=S.args;this.$u=E;var O=T[1];if(typeof O=="string"){var P=T[2]===!0,N=T[3]===!0,F=P||N,B=T[2];N&&(B=T[2]),l=this.$locale(),!P&&B&&(l=v.Ls[B]),this.$d=function(j,V,H){try{if(["x","X"].indexOf(V)>-1)return new Date((V==="X"?1e3:1)*j);var L=h(V)(j),I=L.year,X=L.month,oe=L.day,z=L.hours,ge=L.minutes,Oe=L.seconds,xe=L.milliseconds,ee=L.zone,de=new Date,ve=oe||(I||X?1:de.getDate()),le=I||de.getFullYear(),Ie=0;I&&!X||(Ie=X>0?X-1:de.getMonth());var Ge=z||0,G=ge||0,J=Oe||0,ue=xe||0;return ee?new Date(Date.UTC(le,Ie,ve,Ge,G,J,ue+60*ee.offset*1e3)):H?new Date(Date.UTC(le,Ie,ve,Ge,G,J,ue)):new Date(le,Ie,ve,Ge,G,J,ue)}catch{return new Date("")}}(x,O,E),this.init(),B&&B!==!0&&(this.$L=this.locale(B).$L),F&&x!=this.format(O)&&(this.$d=new Date("")),l={}}else if(O instanceof Array)for(var Y=O.length,Z=1;Z<=Y;Z+=1){T[1]=O[Z-1];var U=v.apply(this,T);if(U.isValid()){this.$d=U.$d,this.$L=U.$L,this.init();break}Z===Y&&(this.$d=new Date(""))}else _.call(this,S)}}})})(lT);var Pne=lT.exports;const aT=_o(Pne),X5=["hours","minutes","seconds"],Q5="HH:mm:ss",qu="YYYY-MM-DD",Lne={date:qu,dates:qu,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",datetime:`${qu} ${Q5}`,monthrange:"YYYY-MM",daterange:qu,datetimerange:`${qu} ${Q5}`},ry=(e,t)=>[e>0?e-1:void 0,e,e<t?e+1:void 0],uT=e=>Array.from(Array.from({length:e}).keys()),cT=e=>e.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),dT=e=>e.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),e8=function(e,t){const n=og(e),o=og(t);return n&&o?e.getTime()===t.getTime():!n&&!o?e===t:!1},t8=function(e,t){const n=Me(e),o=Me(t);return n&&o?e.length!==t.length?!1:e.every((r,s)=>e8(r,t[s])):!n&&!o?e8(e,t):!1},n8=function(e,t,n){const o=qx(t)||t==="x"?ut(e).locale(n):ut(e,t).locale(n);return o.isValid()?o:void 0},o8=function(e,t,n){return qx(t)?e:t==="x"?+e:ut(e).locale(n).format(t)},sy=(e,t)=>{var n;const o=[],r=t==null?void 0:t();for(let s=0;s<e;s++)o.push((n=r==null?void 0:r.includes(s))!=null?n:!1);return o},fT=We({disabledHours:{type:Ce(Function)},disabledMinutes:{type:Ce(Function)},disabledSeconds:{type:Ce(Function)}}),Rne=We({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),pT=We({id:{type:Ce([Array,String])},name:{type:Ce([Array,String]),default:""},popperClass:{type:String,default:""},format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:Ce([String,Object]),default:wd},editable:{type:Boolean,default:!0},prefixIcon:{type:Ce([String,Object]),default:""},size:qr,readonly:Boolean,disabled:Boolean,placeholder:{type:String,default:""},popperOptions:{type:Ce(Object),default:()=>({})},modelValue:{type:Ce([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:Ce([Date,Array])},defaultTime:{type:Ce([Date,Array])},isRange:Boolean,...fT,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,label:{type:String,default:void 0},tabindex:{type:Ce([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,...M3}),Dne=["id","name","placeholder","value","disabled","readonly"],Fne=["id","name","placeholder","value","disabled","readonly"],Vne=Q({name:"Picker"}),Bne=Q({...Vne,props:pT,emits:["update:modelValue","change","focus","blur","calendar-change","panel-change","visible-change","keydown"],setup(e,{expose:t,emit:n}){const o=e,r=_d(),{lang:s}=Kt(),i=Re("date"),l=Re("input"),a=Re("range"),{form:u,formItem:c}=ni(),d=Be("ElPopperOptions",{}),{valueOnClear:f}=HM(o,null),p=K(),h=K(),m=K(!1),y=K(!1),v=K(null);let w=!1,_=!1;const S=R(()=>[i.b("editor"),i.bm("editor",o.type),l.e("wrapper"),i.is("disabled",z.value),i.is("active",m.value),a.b("editor"),Le?a.bm("editor",Le.value):"",r.class]),x=R(()=>[l.e("icon"),a.e("close-icon"),Ie.value?"":a.e("close-icon--hidden")]);Te(m,se=>{se?ot(()=>{se&&(v.value=o.modelValue)}):(me.value=null,ot(()=>{E(o.modelValue)}))});const E=(se,De)=>{(De||!t8(se,v.value))&&(n("change",se),o.validateEvent&&(c==null||c.validate("change").catch(Ot=>void 0)))},T=se=>{if(!t8(o.modelValue,se)){let De;Me(se)?De=se.map(Ot=>o8(Ot,o.valueFormat,s.value)):se&&(De=o8(se,o.valueFormat,s.value)),n("update:modelValue",se&&De,s.value)}},O=se=>{n("keydown",se)},P=R(()=>{if(h.value){const se=Ae.value?h.value:h.value.$el;return Array.from(se.querySelectorAll("input"))}return[]}),N=(se,De,Ot)=>{const mn=P.value;mn.length&&(!Ot||Ot==="min"?(mn[0].setSelectionRange(se,De),mn[0].focus()):Ot==="max"&&(mn[1].setSelectionRange(se,De),mn[1].focus()))},F=()=>{L(!0,!0),ot(()=>{_=!1})},B=(se="",De=!1)=>{De||(_=!0),m.value=De;let Ot;Me(se)?Ot=se.map(mn=>mn.toDate()):Ot=se&&se.toDate(),me.value=null,T(Ot)},Y=()=>{y.value=!0},Z=()=>{n("visible-change",!0)},U=se=>{(se==null?void 0:se.key)===rt.esc&&L(!0,!0)},j=()=>{y.value=!1,m.value=!1,_=!1,n("visible-change",!1)},V=()=>{m.value=!0},H=()=>{m.value=!1},L=(se=!0,De=!1)=>{_=De;const[Ot,mn]=g(P);let Un=Ot;!se&&Ae.value&&(Un=mn),Un&&Un.focus()},I=se=>{o.readonly||z.value||m.value||_||(m.value=!0,n("focus",se))};let X;const oe=se=>{const De=async()=>{setTimeout(()=>{var Ot;X===De&&(!((Ot=p.value)!=null&&Ot.isFocusInsideContent()&&!w)&&P.value.filter(mn=>mn.contains(document.activeElement)).length===0&&(je(),m.value=!1,n("blur",se),o.validateEvent&&(c==null||c.validate("blur").catch(mn=>void 0))),w=!1)},0)};X=De,De()},z=R(()=>o.disabled||(u==null?void 0:u.disabled)),ge=R(()=>{let se;if(G.value?ae.value.getDefaultValue&&(se=ae.value.getDefaultValue()):Me(o.modelValue)?se=o.modelValue.map(De=>n8(De,o.valueFormat,s.value)):se=n8(o.modelValue,o.valueFormat,s.value),ae.value.getRangeAvailableTime){const De=ae.value.getRangeAvailableTime(se);jl(De,se)||(se=De,T(Me(se)?se.map(Ot=>Ot.toDate()):se.toDate()))}return Me(se)&&se.some(De=>!De)&&(se=[]),se}),Oe=R(()=>{if(!ae.value.panelReady)return"";const se=ce(ge.value);return Me(me.value)?[me.value[0]||se&&se[0]||"",me.value[1]||se&&se[1]||""]:me.value!==null?me.value:!ee.value&&G.value||!m.value&&G.value?"":se?de.value||ve.value?se.join(", "):se:""}),xe=R(()=>o.type.includes("time")),ee=R(()=>o.type.startsWith("time")),de=R(()=>o.type==="dates"),ve=R(()=>o.type==="years"),le=R(()=>o.prefixIcon||(xe.value?Jx:PY)),Ie=K(!1),Ge=se=>{o.readonly||z.value||Ie.value&&(se.stopPropagation(),F(),T(f.value),E(f.value,!0),Ie.value=!1,m.value=!1,ae.value.handleClear&&ae.value.handleClear())},G=R(()=>{const{modelValue:se}=o;return!se||Me(se)&&!se.filter(Boolean).length}),J=async se=>{var De;o.readonly||z.value||(((De=se.target)==null?void 0:De.tagName)!=="INPUT"||P.value.includes(document.activeElement))&&(m.value=!0)},ue=()=>{o.readonly||z.value||!G.value&&o.clearable&&(Ie.value=!0)},_e=()=>{Ie.value=!1},ye=se=>{var De;o.readonly||z.value||(((De=se.touches[0].target)==null?void 0:De.tagName)!=="INPUT"||P.value.includes(document.activeElement))&&(m.value=!0)},Ae=R(()=>o.type.includes("range")),Le=Jo(),Ee=R(()=>{var se,De;return(De=(se=g(p))==null?void 0:se.popperRef)==null?void 0:De.contentRef}),Pe=R(()=>{var se;return g(Ae)?g(h):(se=g(h))==null?void 0:se.$el});fx(Pe,se=>{const De=g(Ee),Ot=g(Pe);De&&(se.target===De||se.composedPath().includes(De))||se.target===Ot||se.composedPath().includes(Ot)||(m.value=!1)});const me=K(null),je=()=>{if(me.value){const se=Ze(Oe.value);se&&te(se)&&(T(Me(se)?se.map(De=>De.toDate()):se.toDate()),me.value=null)}me.value===""&&(T(f.value),E(f.value),me.value=null)},Ze=se=>se?ae.value.parseUserInput(se):null,ce=se=>se?ae.value.formatToString(se):null,te=se=>ae.value.isValidValue(se),pe=async se=>{if(o.readonly||z.value)return;const{code:De}=se;if(O(se),De===rt.esc){m.value===!0&&(m.value=!1,se.preventDefault(),se.stopPropagation());return}if(De===rt.down&&(ae.value.handleFocusPicker&&(se.preventDefault(),se.stopPropagation()),m.value===!1&&(m.value=!0,await ot()),ae.value.handleFocusPicker)){ae.value.handleFocusPicker();return}if(De===rt.tab){w=!0;return}if(De===rt.enter||De===rt.numpadEnter){(me.value===null||me.value===""||te(Ze(Oe.value)))&&(je(),m.value=!1),se.stopPropagation();return}if(me.value){se.stopPropagation();return}ae.value.handleKeydownInput&&ae.value.handleKeydownInput(se)},Ve=se=>{me.value=se,m.value||(m.value=!0)},Je=se=>{const De=se.target;me.value?me.value=[De.value,me.value[1]]:me.value=[De.value,null]},$e=se=>{const De=se.target;me.value?me.value=[me.value[0],De.value]:me.value=[null,De.value]},ie=()=>{var se;const De=me.value,Ot=Ze(De&&De[0]),mn=g(ge);if(Ot&&Ot.isValid()){me.value=[ce(Ot),((se=Oe.value)==null?void 0:se[1])||null];const Un=[Ot,mn&&(mn[1]||null)];te(Un)&&(T(Un),me.value=null)}},we=()=>{var se;const De=g(me),Ot=Ze(De&&De[1]),mn=g(ge);if(Ot&&Ot.isValid()){me.value=[((se=g(Oe))==null?void 0:se[0])||null,ce(Ot)];const Un=[mn&&mn[0],Ot];te(Un)&&(T(Un),me.value=null)}},ae=K({}),Se=se=>{ae.value[se[0]]=se[1],ae.value.panelReady=!0},Fe=se=>{n("calendar-change",se)},st=(se,De,Ot)=>{n("panel-change",se,De,Ot)};return wt("EP_PICKER_BASE",{props:o}),t({focus:L,handleFocusInput:I,handleBlurInput:oe,handleOpen:V,handleClose:H,onPick:B}),(se,De)=>(C(),q(g($u),un({ref_key:"refPopper",ref:p,visible:m.value,effect:"light",pure:"",trigger:"click"},se.$attrs,{role:"dialog",teleported:"",transition:`${g(i).namespace.value}-zoom-in-top`,"popper-class":[`${g(i).namespace.value}-picker__popper`,se.popperClass],"popper-options":g(d),"fallback-placements":["bottom","top","right","left"],"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:Y,onShow:Z,onHide:j}),{default:$(()=>[g(Ae)?(C(),M("div",{key:1,ref_key:"inputRef",ref:h,class:D(g(S)),style:Qe(se.$attrs.style),onClick:I,onMouseenter:ue,onMouseleave:_e,onTouchstart:ye,onKeydown:pe},[g(le)?(C(),q(g(Ne),{key:0,class:D([g(l).e("icon"),g(a).e("icon")]),onMousedown:et(J,["prevent"]),onTouchstart:ye},{default:$(()=>[(C(),q(Lt(g(le))))]),_:1},8,["class","onMousedown"])):W("v-if",!0),b("input",{id:se.id&&se.id[0],autocomplete:"off",name:se.name&&se.name[0],placeholder:se.startPlaceholder,value:g(Oe)&&g(Oe)[0],disabled:g(z),readonly:!se.editable||se.readonly,class:D(g(a).b("input")),onMousedown:J,onInput:Je,onChange:ie,onFocus:I,onBlur:oe},null,42,Dne),he(se.$slots,"range-separator",{},()=>[b("span",{class:D(g(a).b("separator"))},A(se.rangeSeparator),3)]),b("input",{id:se.id&&se.id[1],autocomplete:"off",name:se.name&&se.name[1],placeholder:se.endPlaceholder,value:g(Oe)&&g(Oe)[1],disabled:g(z),readonly:!se.editable||se.readonly,class:D(g(a).b("input")),onMousedown:J,onFocus:I,onBlur:oe,onInput:$e,onChange:we},null,42,Fne),se.clearIcon?(C(),q(g(Ne),{key:1,class:D(g(x)),onClick:Ge},{default:$(()=>[(C(),q(Lt(se.clearIcon)))]),_:1},8,["class"])):W("v-if",!0)],38)):(C(),q(g(At),{key:0,id:se.id,ref_key:"inputRef",ref:h,"container-role":"combobox","model-value":g(Oe),name:se.name,size:g(Le),disabled:g(z),placeholder:se.placeholder,class:D([g(i).b("editor"),g(i).bm("editor",se.type),se.$attrs.class]),style:Qe(se.$attrs.style),readonly:!se.editable||se.readonly||g(de)||g(ve)||se.type==="week",label:se.label,tabindex:se.tabindex,"validate-event":!1,onInput:Ve,onFocus:I,onBlur:oe,onKeydown:pe,onChange:je,onMousedown:J,onMouseenter:ue,onMouseleave:_e,onTouchstart:ye,onClick:De[0]||(De[0]=et(()=>{},["stop"]))},{prefix:$(()=>[g(le)?(C(),q(g(Ne),{key:0,class:D(g(l).e("icon")),onMousedown:et(J,["prevent"]),onTouchstart:ye},{default:$(()=>[(C(),q(Lt(g(le))))]),_:1},8,["class","onMousedown"])):W("v-if",!0)]),suffix:$(()=>[Ie.value&&se.clearIcon?(C(),q(g(Ne),{key:0,class:D(`${g(l).e("icon")} clear-icon`),onClick:et(Ge,["stop"])},{default:$(()=>[(C(),q(Lt(se.clearIcon)))]),_:1},8,["class","onClick"])):W("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","label","tabindex","onKeydown"]))]),content:$(()=>[he(se.$slots,"default",{visible:m.value,actualVisible:y.value,parsedValue:g(ge),format:se.format,dateFormat:se.dateFormat,timeFormat:se.timeFormat,unlinkPanels:se.unlinkPanels,type:se.type,defaultValue:se.defaultValue,onPick:B,onSelectRange:N,onSetPickerOption:Se,onCalendarChange:Fe,onPanelChange:st,onKeydown:U,onMousedown:De[1]||(De[1]=et(()=>{},["stop"]))})]),_:3},16,["visible","transition","popper-class","popper-options"]))}});var zne=ze(Bne,[["__file","picker.vue"]]);const jne=We({...Rne,datetimeRole:String,parsedValue:{type:Ce(Object)}}),Hne=({getAvailableHours:e,getAvailableMinutes:t,getAvailableSeconds:n})=>{const o=(i,l,a,u)=>{const c={hour:e,minute:t,second:n};let d=i;return["hour","minute","second"].forEach(f=>{if(c[f]){let p;const h=c[f];switch(f){case"minute":{p=h(d.hour(),l,u);break}case"second":{p=h(d.hour(),d.minute(),l,u);break}default:{p=h(l,u);break}}if(p!=null&&p.length&&!p.includes(d[f]())){const m=a?0:p.length-1;d=d[f](p[m])}}}),d},r={};return{timePickerOptions:r,getAvailableTime:o,onSetOption:([i,l])=>{r[i]=l}}},iy=e=>{const t=(o,r)=>o||r,n=o=>o!==!0;return e.map(t).filter(n)},hT=(e,t,n)=>({getHoursList:(i,l)=>sy(24,e&&(()=>e==null?void 0:e(i,l))),getMinutesList:(i,l,a)=>sy(60,t&&(()=>t==null?void 0:t(i,l,a))),getSecondsList:(i,l,a,u)=>sy(60,n&&(()=>n==null?void 0:n(i,l,a,u)))}),Une=(e,t,n)=>{const{getHoursList:o,getMinutesList:r,getSecondsList:s}=hT(e,t,n);return{getAvailableHours:(u,c)=>iy(o(u,c)),getAvailableMinutes:(u,c,d)=>iy(r(u,c,d)),getAvailableSeconds:(u,c,d,f)=>iy(s(u,c,d,f))}},Wne=e=>{const t=K(e.parsedValue);return Te(()=>e.visible,n=>{n||(t.value=e.parsedValue)}),t},tl=new Map;let r8;xt&&(document.addEventListener("mousedown",e=>r8=e),document.addEventListener("mouseup",e=>{for(const t of tl.values())for(const{documentHandler:n}of t)n(e,r8)}));function s8(e,t){let n=[];return Array.isArray(t.arg)?n=t.arg:gs(t.arg)&&n.push(t.arg),function(o,r){const s=t.instance.popperRef,i=o.target,l=r==null?void 0:r.target,a=!t||!t.instance,u=!i||!l,c=e.contains(i)||e.contains(l),d=e===i,f=n.length&&n.some(h=>h==null?void 0:h.contains(i))||n.length&&n.includes(l),p=s&&(s.contains(i)||s.contains(l));a||u||c||d||f||p||t.value(o,r)}}const id={beforeMount(e,t){tl.has(e)||tl.set(e,[]),tl.get(e).push({documentHandler:s8(e,t),bindingFn:t.value})},updated(e,t){tl.has(e)||tl.set(e,[]);const n=tl.get(e),o=n.findIndex(s=>s.bindingFn===t.oldValue),r={documentHandler:s8(e,t),bindingFn:t.value};o>=0?n.splice(o,1,r):n.push(r)},unmounted(e){tl.delete(e)}},Kne=100,qne=600,Rg={beforeMount(e,t){const n=t.value,{interval:o=Kne,delay:r=qne}=Xe(n)?{}:n;let s,i;const l=()=>Xe(n)?n():n.handler(),a=()=>{i&&(clearTimeout(i),i=void 0),s&&(clearInterval(s),s=void 0)};e.addEventListener("mousedown",u=>{u.button===0&&(a(),l(),document.addEventListener("mouseup",()=>a(),{once:!0}),i=setTimeout(()=>{s=setInterval(()=>{l()},o)},r))})}},ub="_trap-focus-children",Na=[],i8=e=>{if(Na.length===0)return;const t=Na[Na.length-1][ub];if(t.length>0&&e.code===rt.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const n=e.shiftKey,o=e.target===t[0],r=e.target===t[t.length-1];o&&n&&(e.preventDefault(),t[t.length-1].focus()),r&&!n&&(e.preventDefault(),t[0].focus())}},Gne={beforeMount(e){e[ub]=_6(e),Na.push(e),Na.length<=1&&document.addEventListener("keydown",i8)},updated(e){ot(()=>{e[ub]=_6(e)})},unmounted(){Na.shift(),Na.length===0&&document.removeEventListener("keydown",i8)}};var l8=!1,Ea,cb,db,Xm,Qm,mT,e1,fb,pb,hb,gT,mb,gb,vT,yT;function Ro(){if(!l8){l8=!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(mb=/\b(iPhone|iP[ao]d)/.exec(e),gb=/\b(iP[ao]d)/.exec(e),hb=/Android/i.exec(e),vT=/FBAN\/\w+;/i.exec(e),yT=/Mobile/i.exec(e),gT=!!/Win64/.exec(e),t){Ea=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,Ea&&document&&document.documentMode&&(Ea=document.documentMode);var o=/(?:Trident\/(\d+.\d+))/.exec(e);mT=o?parseFloat(o[1])+4:Ea,cb=t[2]?parseFloat(t[2]):NaN,db=t[3]?parseFloat(t[3]):NaN,Xm=t[4]?parseFloat(t[4]):NaN,Xm?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),Qm=t&&t[1]?parseFloat(t[1]):NaN):Qm=NaN}else Ea=cb=db=Qm=Xm=NaN;if(n){if(n[1]){var r=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);e1=r?parseFloat(r[1].replace("_",".")):!0}else e1=!1;fb=!!n[2],pb=!!n[3]}else e1=fb=pb=!1}}var vb={ie:function(){return Ro()||Ea},ieCompatibilityMode:function(){return Ro()||mT>Ea},ie64:function(){return vb.ie()&&gT},firefox:function(){return Ro()||cb},opera:function(){return Ro()||db},webkit:function(){return Ro()||Xm},safari:function(){return vb.webkit()},chrome:function(){return Ro()||Qm},windows:function(){return Ro()||fb},osx:function(){return Ro()||e1},linux:function(){return Ro()||pb},iphone:function(){return Ro()||mb},mobile:function(){return Ro()||mb||gb||hb||yT},nativeApp:function(){return Ro()||vT},android:function(){return Ro()||hb},ipad:function(){return Ro()||gb}},Yne=vb,gm=!!(typeof window<"u"&&window.document&&window.document.createElement),Zne={canUseDOM:gm,canUseWorkers:typeof Worker<"u",canUseEventListeners:gm&&!!(window.addEventListener||window.attachEvent),canUseViewport:gm&&!!window.screen,isInWorker:!gm},_T=Zne,bT;_T.canUseDOM&&(bT=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function Jne(e,t){if(!_T.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&&bT&&e==="wheel"&&(o=document.implementation.hasFeature("Events.wheel","3.0")),o}var Xne=Jne,a8=10,u8=40,c8=800;function wT(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*a8,r=n*a8,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||r)&&e.deltaMode&&(e.deltaMode==1?(o*=u8,r*=u8):(o*=c8,r*=c8)),o&&!t&&(t=o<1?-1:1),r&&!n&&(n=r<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:r}}wT.getEventType=function(){return Yne.firefox()?"DOMMouseScroll":Xne("wheel")?"wheel":"mousewheel"};var Qne=wT;/**
59 +`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),o=new RegExp("(?:^"+n+"$)|(?:^"+s+"$)"),r=new RegExp("^"+n+"$"),a=new RegExp("^"+s+"$"),l=function(A){return A&&A.exact?o:new RegExp("(?:"+e(A)+n+e(A)+")|(?:"+e(A)+s+e(A)+")","g")};l.v4=function(C){return C&&C.exact?r:new RegExp(""+e(C)+n+e(C),"g")},l.v6=function(C){return C&&C.exact?a:new RegExp(""+e(C)+s+e(C),"g")};var c="(?:(?:[a-z]+:)?//)",u="(?:\\S+(?::\\S*)?@)?",d=l.v4().source,h=l.v6().source,f="(?:(?:[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,}))",b="(?::\\d{2,5})?",w='(?:[/?#][^\\s"]*)?',k="(?:"+c+"|www\\.)"+u+"(?:localhost|"+d+"|"+h+"|"+f+p+m+")"+b+w;return Jv=new RegExp("(?:^"+k+"$)","i"),Jv},G$={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},rm={integer:function(e){return rm.number(e)&&parseInt(e,10)===e},float:function(e){return rm.number(e)&&!rm.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!rm.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(G$.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(Hce())},hex:function(e){return typeof e=="string"&&!!e.match(G$.hex)}},Uce=function(e,n,i,s,o){if(e.required&&n===void 0){LR(e,n,i,s,o);return}var r=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=e.type;r.indexOf(a)>-1?rm[a](n)||s.push(Oo(o.messages.types[a],e.fullField,e.type)):a&&typeof n!==e.type&&s.push(Oo(o.messages.types[a],e.fullField,e.type))},jce=function(e,n,i,s,o){var r=typeof e.len=="number",a=typeof e.min=="number",l=typeof e.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,h=typeof n=="number",f=typeof n=="string",p=Array.isArray(n);if(h?d="number":f?d="string":p&&(d="array"),!d)return!1;p&&(u=n.length),f&&(u=n.replace(c,"_").length),r?u!==e.len&&s.push(Oo(o.messages[d].len,e.fullField,e.len)):a&&!l&&u<e.min?s.push(Oo(o.messages[d].min,e.fullField,e.min)):l&&!a&&u>e.max?s.push(Oo(o.messages[d].max,e.fullField,e.max)):a&&l&&(u<e.min||u>e.max)&&s.push(Oo(o.messages[d].range,e.fullField,e.min,e.max))},ah="enum",Wce=function(e,n,i,s,o){e[ah]=Array.isArray(e[ah])?e[ah]:[],e[ah].indexOf(n)===-1&&s.push(Oo(o.messages[ah],e.fullField,e[ah].join(", ")))},Yce=function(e,n,i,s,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||s.push(Oo(o.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var r=new RegExp(e.pattern);r.test(n)||s.push(Oo(o.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},mn={required:LR,whitespace:zce,type:Uce,range:jce,enum:Wce,pattern:Yce},qce=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n,"string")&&!e.required)return i();mn.required(e,n,s,r,o,"string"),Bs(n,"string")||(mn.type(e,n,s,r,o),mn.range(e,n,s,r,o),mn.pattern(e,n,s,r,o),e.whitespace===!0&&mn.whitespace(e,n,s,r,o))}i(r)},Gce=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return i();mn.required(e,n,s,r,o),n!==void 0&&mn.type(e,n,s,r,o)}i(r)},Xce=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(n===""&&(n=void 0),Bs(n)&&!e.required)return i();mn.required(e,n,s,r,o),n!==void 0&&(mn.type(e,n,s,r,o),mn.range(e,n,s,r,o))}i(r)},Kce=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return i();mn.required(e,n,s,r,o),n!==void 0&&mn.type(e,n,s,r,o)}i(r)},Zce=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return i();mn.required(e,n,s,r,o),Bs(n)||mn.type(e,n,s,r,o)}i(r)},Jce=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return i();mn.required(e,n,s,r,o),n!==void 0&&(mn.type(e,n,s,r,o),mn.range(e,n,s,r,o))}i(r)},Qce=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return i();mn.required(e,n,s,r,o),n!==void 0&&(mn.type(e,n,s,r,o),mn.range(e,n,s,r,o))}i(r)},eue=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(n==null&&!e.required)return i();mn.required(e,n,s,r,o,"array"),n!=null&&(mn.type(e,n,s,r,o),mn.range(e,n,s,r,o))}i(r)},tue=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return i();mn.required(e,n,s,r,o),n!==void 0&&mn.type(e,n,s,r,o)}i(r)},nue="enum",sue=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return i();mn.required(e,n,s,r,o),n!==void 0&&mn[nue](e,n,s,r,o)}i(r)},iue=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n,"string")&&!e.required)return i();mn.required(e,n,s,r,o),Bs(n,"string")||mn.pattern(e,n,s,r,o)}i(r)},oue=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n,"date")&&!e.required)return i();if(mn.required(e,n,s,r,o),!Bs(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),mn.type(e,l,s,r,o),l&&mn.range(e,l.getTime(),s,r,o)}}i(r)},rue=function(e,n,i,s,o){var r=[],a=Array.isArray(n)?"array":typeof n;mn.required(e,n,s,r,o,a),i(r)},Pw=function(e,n,i,s,o){var r=e.type,a=[],l=e.required||!e.required&&s.hasOwnProperty(e.field);if(l){if(Bs(n,r)&&!e.required)return i();mn.required(e,n,s,a,o,r),Bs(n,r)||mn.type(e,n,s,a,o)}i(a)},aue=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return i();mn.required(e,n,s,r,o)}i(r)},rg={string:qce,method:Gce,number:Xce,boolean:Kce,regexp:Zce,integer:Jce,float:Qce,array:eue,object:tue,enum:sue,pattern:iue,date:oue,url:Pw,hex:Pw,email:Pw,required:rue,any:aue};function dC(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var hC=dC(),W1=function(){function t(n){this.rules=null,this._messages=hC,this.define(n)}var e=t.prototype;return e.define=function(i){var s=this;if(!i)throw new Error("Cannot configure a schema with no rules");if(typeof i!="object"||Array.isArray(i))throw new Error("Rules must be an object");this.rules={},Object.keys(i).forEach(function(o){var r=i[o];s.rules[o]=Array.isArray(r)?r:[r]})},e.messages=function(i){return i&&(this._messages=q$(dC(),i)),this._messages},e.validate=function(i,s,o){var r=this;s===void 0&&(s={}),o===void 0&&(o=function(){});var a=i,l=s,c=o;if(typeof l=="function"&&(c=l,l={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,a),Promise.resolve(a);function u(m){var b=[],w={};function k(A){if(Array.isArray(A)){var S;b=(S=b).concat.apply(S,A)}else b.push(A)}for(var C=0;C<m.length;C++)k(m[C]);b.length?(w=uC(b),c(b,w)):c(null,a)}if(l.messages){var d=this.messages();d===hC&&(d=dC()),q$(d,l.messages),l.messages=d}else l.messages=this.messages();var h={},f=l.keys||Object.keys(this.rules);f.forEach(function(m){var b=r.rules[m],w=a[m];b.forEach(function(k){var C=k;typeof C.transform=="function"&&(a===i&&(a=Fu({},a)),w=a[m]=C.transform(w)),typeof C=="function"?C={validator:C}:C=Fu({},C),C.validator=r.getValidationMethod(C),C.validator&&(C.field=m,C.fullField=C.fullField||m,C.type=r.getType(C),h[m]=h[m]||[],h[m].push({rule:C,value:w,source:a,field:m}))})});var p={};return Fce(h,l,function(m,b){var w=m.rule,k=(w.type==="object"||w.type==="array")&&(typeof w.fields=="object"||typeof w.defaultField=="object");k=k&&(w.required||!w.required&&m.value),w.field=m.field;function C(M,P){return Fu({},P,{fullField:w.fullField+"."+M,fullFields:w.fullFields?[].concat(w.fullFields,[M]):[M]})}function A(M){M===void 0&&(M=[]);var P=Array.isArray(M)?M:[M];!l.suppressWarning&&P.length&&t.warning("async-validator:",P),P.length&&w.message!==void 0&&(P=[].concat(w.message));var T=P.map(Y$(w,a));if(l.first&&T.length)return p[w.field]=1,b(T);if(!k)b(T);else{if(w.required&&!m.value)return w.message!==void 0?T=[].concat(w.message).map(Y$(w,a)):l.error&&(T=[l.error(w,Oo(l.messages.required,w.field))]),b(T);var I={};w.defaultField&&Object.keys(m.value).map(function(V){I[V]=w.defaultField}),I=Fu({},I,m.rule.fields);var L={};Object.keys(I).forEach(function(V){var H=I[V],F=Array.isArray(H)?H:[H];L[V]=F.map(C.bind(null,V))});var R=new t(L);R.messages(l.messages),m.rule.options&&(m.rule.options.messages=l.messages,m.rule.options.error=l.error),R.validate(m.value,m.rule.options||l,function(V){var H=[];T&&T.length&&H.push.apply(H,T),V&&V.length&&H.push.apply(H,V),b(H.length?H:null)})}}var S;if(w.asyncValidator)S=w.asyncValidator(w,m.value,A,m.source,l);else if(w.validator){try{S=w.validator(w,m.value,A,m.source,l)}catch(M){console.error==null||console.error(M),l.suppressValidatorError||setTimeout(function(){throw M},0),A(M.message)}S===!0?A():S===!1?A(typeof w.message=="function"?w.message(w.fullField||w.field):w.message||(w.fullField||w.field)+" fails"):S instanceof Array?A(S):S instanceof Error&&A(S.message)}S&&S.then&&S.then(function(){return A()},function(M){return A(M)})},function(m){u(m)},a)},e.getType=function(i){if(i.type===void 0&&i.pattern instanceof RegExp&&(i.type="pattern"),typeof i.validator!="function"&&i.type&&!rg.hasOwnProperty(i.type))throw new Error(Oo("Unknown rule type %s",i.type));return i.type||"string"},e.getValidationMethod=function(i){if(typeof i.validator=="function")return i.validator;var s=Object.keys(i),o=s.indexOf("message");return o!==-1&&s.splice(o,1),s.length===1&&s[0]==="required"?rg.required:rg[this.getType(i)]||void 0},t}();W1.register=function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");rg[e]=n};W1.warning=Oce;W1.messages=hC;W1.validators=rg;const lue=["role","aria-labelledby"];var cue=fe({name:"ElFormItem",__name:"form-item",props:xce,setup(t,{expose:e}){const n=t,i=gi(),s=qe(Hd,void 0),o=qe(kd,void 0),r=Ii(void 0,{formItem:!1}),a=Be("form-item"),l=kr().value,c=ee([]),u=ee(""),d=Pie(u,100),h=ee(""),f=ee();let p,m=!1;const b=W(()=>n.labelPosition||(s==null?void 0:s.labelPosition)),w=W(()=>b.value==="top"?{}:{width:pi(n.labelWidth??(s==null?void 0:s.labelWidth))}),k=W(()=>{if(b.value==="top"||s!=null&&s.inline)return{};if(!n.label&&!n.labelWidth&&L)return{};const ie=pi(n.labelWidth??(s==null?void 0:s.labelWidth));return!n.label&&!i.label?{marginLeft:ie}:{}}),C=W(()=>[a.b(),a.m(r.value),a.is("error",u.value==="error"),a.is("validating",u.value==="validating"),a.is("success",u.value==="success"),a.is("required",U.value||n.required),a.is("no-asterisk",s==null?void 0:s.hideRequiredAsterisk),(s==null?void 0:s.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[a.m("feedback")]:s==null?void 0:s.statusIcon,[a.m(`label-${b.value}`)]:b.value}]),A=W(()=>Jn(n.inlineMessage)?n.inlineMessage:(s==null?void 0:s.inlineMessage)||!1),S=W(()=>[a.e("error"),{[a.em("error","inline")]:A.value}]),M=W(()=>n.prop?Ee(n.prop)?n.prop.join("."):n.prop:""),P=W(()=>!!(n.label||i.label)),T=W(()=>n.for??(c.value.length===1?c.value[0]:void 0)),I=W(()=>!T.value&&P.value),L=!!o,R=W(()=>{const ie=s==null?void 0:s.model;if(!(!ie||!n.prop))return Ac(ie,n.prop).value}),V=W(()=>{const{required:ie}=n,re=[];n.rules&&re.push(...js(n.rules));const ke=s==null?void 0:s.rules;if(ke&&n.prop){const je=Ac(ke,n.prop).value;je&&re.push(...js(je))}if(ie!==void 0){const je=re.map((te,se)=>[te,se]).filter(([te])=>"required"in te);if(je.length>0)for(const[te,se]of je)te.required!==ie&&(re[se]={...te,required:ie});else re.push({required:ie})}return re}),H=W(()=>V.value.length>0),F=ie=>V.value.filter(re=>!re.trigger||!ie?!0:Ee(re.trigger)?re.trigger.includes(ie):re.trigger===ie).map(({trigger:re,...ke})=>ke),U=W(()=>V.value.some(ie=>ie.required)),Y=W(()=>d.value==="error"&&n.showMessage&&((s==null?void 0:s.showMessage)??!0)),z=W(()=>`${n.label||""}${(s==null?void 0:s.labelSuffix)||""}`),X=ie=>{u.value=ie},Z=ie=>{var je;const{errors:re,fields:ke}=ie;(!re||!ke)&&console.error(ie),X("error"),h.value=re?((je=re==null?void 0:re[0])==null?void 0:je.message)??`${n.prop} is required`:"",s==null||s.emit("validate",n.prop,!1,h.value)},G=()=>{X("success"),s==null||s.emit("validate",n.prop,!0,"")},Q=async ie=>{const re=M.value;return new W1({[re]:ie}).validate({[re]:R.value},{firstFields:!0}).then(()=>(G(),!0)).catch(ke=>(Z(ke),Promise.reject(ke)))},ne=async(ie,re)=>{if(m||!n.prop)return!1;const ke=et(re);if(!H.value)return re==null||re(!1),!1;const je=F(ie);return je.length===0?(re==null||re(!0),!0):(X("validating"),Q(je).then(()=>(re==null||re(!0),!0)).catch(te=>{const{fields:se}=te;return re==null||re(!1,se),ke?!1:Promise.reject(se)}))},K=()=>{X(""),h.value="",m=!1},ae=async()=>{const ie=s==null?void 0:s.model;if(!ie||!n.prop)return;const re=Ac(ie,n.prop);m=!0,re.value=ed(p),await ot(),K(),m=!1},ge=ie=>{c.value.includes(ie)||c.value.push(ie)},Ce=ie=>{c.value=c.value.filter(re=>re!==ie)},oe=ie=>{p=ed(ie)};Te(()=>n.error,ie=>{h.value=ie||"",X(ie?"error":"")},{immediate:!0}),Te(()=>n.validateStatus,ie=>X(ie||""));const pe=In({...go(n),$el:f,size:r,validateMessage:h,validateState:u,labelId:l,inputIds:c,isGroup:I,hasLabel:P,fieldValue:R,addInputId:ge,removeInputId:Ce,resetField:ae,clearValidate:K,validate:ne,propString:M,setInitialValue:oe});return Pt(kd,pe),Nt(()=>{n.prop&&(oe(R.value),s==null||s.addField(pe))}),wn(()=>{s==null||s.removeField(pe)}),e({size:r,validateMessage:h,validateState:u,validate:ne,clearValidate:K,resetField:ae,setInitialValue:oe}),(ie,re)=>{var ke;return v(),$("div",{ref_key:"formItemRef",ref:f,class:q(C.value),role:I.value?"group":void 0,"aria-labelledby":I.value?E(l):void 0},[_(E(Mce),{"is-auto-width":w.value.width==="auto","update-all":((ke=E(s))==null?void 0:ke.labelWidth)==="auto"},{default:y(()=>[t.label||ie.$slots.label?(v(),D(Ct(T.value?"label":"div"),{key:0,id:E(l),for:T.value,class:q(E(a).e("label")),style:Xe(w.value)},{default:y(()=>[le(ie.$slots,"label",{label:z.value},()=>[N(x(z.value),1)])]),_:3},8,["id","for","class","style"])):O("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),g("div",{class:q(E(a).e("content")),style:Xe(k.value)},[le(ie.$slots,"default"),_(Lb,{name:`${E(a).namespace.value}-zoom-in-top`},{default:y(()=>[Y.value?le(ie.$slots,"error",{key:0,error:h.value},()=>[g("div",{class:q(S.value)},x(h.value),3)]):O("v-if",!0)]),_:3},8,["name"])],6)],10,lue)}}}),OR=cue;const nn=Gt(Ece,{FormItem:OR}),tn=Os(OR),Iw="focus-trap.focus-after-trapped",Lw="focus-trap.focus-after-released",uue="focus-trap.focusout-prevented",X$={cancelable:!0,bubbles:!1},due={cancelable:!0,bubbles:!1},K$="focusAfterTrapped",Z$="focusAfterReleased",DR=Symbol("elFocusTrap"),a8=ee(),s2=ee(0),l8=ee(0);let Qv=0;const RR=t=>{const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0||i===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e},J$=(t,e)=>{for(const n of t)if(!hue(n,e))return n},hue=(t,e)=>{if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1},fue=t=>{const e=RR(t);return[J$(e,t),J$(e.reverse(),t)]},pue=t=>t instanceof HTMLInputElement&&"select"in t,Yl=(t,e)=>{if(t){const n=document.activeElement;I4(t,{preventScroll:!0}),l8.value=window.performance.now(),t!==n&&pue(t)&&e&&t.select()}};function Q$(t,e){const n=[...t],i=t.indexOf(e);return i!==-1&&n.splice(i,1),n}const mue=()=>{let t=[];return{push:i=>{const s=t[0];s&&i!==s&&s.pause(),t=Q$(t,i),t.unshift(i)},remove:i=>{var s,o;t=Q$(t,i),(o=(s=t[0])==null?void 0:s.resume)==null||o.call(s)}}},gue=(t,e=!1)=>{const n=document.activeElement;for(const i of t)if(Yl(i,e),document.activeElement!==n)return},eA=mue(),vue=()=>s2.value>l8.value,e_=()=>{a8.value="pointer",s2.value=window.performance.now()},tA=()=>{a8.value="keyboard",s2.value=window.performance.now()},_ue=()=>(Nt(()=>{Qv===0&&(document.addEventListener("mousedown",e_),document.addEventListener("touchstart",e_),document.addEventListener("keydown",tA)),Qv++}),wn(()=>{Qv--,Qv<=0&&(document.removeEventListener("mousedown",e_),document.removeEventListener("touchstart",e_),document.removeEventListener("keydown",tA))}),{focusReason:a8,lastUserFocusTimestamp:s2,lastAutomatedFocusTimestamp:l8}),t_=t=>new CustomEvent(uue,{...due,detail:t});var yue=fe({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[K$,Z$,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const n=ee();let i,s;const{focusReason:o}=_ue();dre(p=>{t.trapped&&!r.paused&&e("release-requested",p)});const r={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},a=p=>{if(!t.loop&&!t.trapped||r.paused)return;const{altKey:m,ctrlKey:b,metaKey:w,currentTarget:k,shiftKey:C}=p,{loop:A}=t,S=ls(p)===Ue.tab&&!m&&!b&&!w,M=document.activeElement;if(S&&M){const P=k,[T,I]=fue(P);if(T&&I){if(!C&&M===I){const L=t_({focusReason:o.value});e("focusout-prevented",L),L.defaultPrevented||(p.preventDefault(),A&&Yl(T,!0))}else if(C&&[T,P].includes(M)){const L=t_({focusReason:o.value});e("focusout-prevented",L),L.defaultPrevented||(p.preventDefault(),A&&Yl(I,!0))}}else if(M===P){const L=t_({focusReason:o.value});e("focusout-prevented",L),L.defaultPrevented||p.preventDefault()}}};Pt(DR,{focusTrapRef:n,onKeydown:a}),Te(()=>t.focusTrapEl,p=>{p&&(n.value=p)},{immediate:!0}),Te([n],([p],[m])=>{p&&(p.addEventListener("keydown",a),p.addEventListener("focusin",u),p.addEventListener("focusout",d)),m&&(m.removeEventListener("keydown",a),m.removeEventListener("focusin",u),m.removeEventListener("focusout",d))});const l=p=>{e(K$,p)},c=p=>e(Z$,p),u=p=>{const m=E(n);if(!m)return;const b=p.target,w=p.relatedTarget,k=b&&m.contains(b);t.trapped||w&&m.contains(w)||(i=w),k&&e("focusin",p),!r.paused&&t.trapped&&(k?s=b:Yl(s,!0))},d=p=>{const m=E(n);if(!(r.paused||!m))if(t.trapped){const b=p.relatedTarget;!hi(b)&&!m.contains(b)&&setTimeout(()=>{if(!r.paused&&t.trapped){const w=t_({focusReason:o.value});e("focusout-prevented",w),w.defaultPrevented||Yl(s,!0)}},0)}else{const b=p.target;b&&m.contains(b)||e("focusout",p)}};async function h(){await ot();const p=E(n);if(p){eA.push(r);const m=p.contains(document.activeElement)?i:document.activeElement;if(i=m,!p.contains(m)){const b=new Event(Iw,X$);p.addEventListener(Iw,l),p.dispatchEvent(b),b.defaultPrevented||ot(()=>{let w=t.focusStartEl;Ke(w)||(Yl(w),document.activeElement!==w&&(w="first")),w==="first"&&gue(RR(p),!0),(document.activeElement===m||w==="container")&&Yl(p)})}}}function f(){const p=E(n);if(p){p.removeEventListener(Iw,l);const m=new CustomEvent(Lw,{...X$,detail:{focusReason:o.value}});p.addEventListener(Lw,c),p.dispatchEvent(m),!m.defaultPrevented&&(o.value=="keyboard"||!vue()||p.contains(document.activeElement))&&Yl(i??document.body),p.removeEventListener(Lw,c),eA.remove(r),i=null,s=null}}return Nt(()=>{t.trapped&&h(),Te(()=>t.trapped,p=>{p?h():f()})}),wn(()=>{t.trapped&&f(),n.value&&(n.value.removeEventListener("keydown",a),n.value.removeEventListener("focusin",u),n.value.removeEventListener("focusout",d),n.value=void 0),i=null,s=null}),{onKeydown:a}}}),vi=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n};function bue(t,e,n,i,s,o){return le(t.$slots,"default",{handleKeydown:t.onKeydown})}var wue=vi(yue,[["render",bue]]),Y1=wue;const kue=(t,e=[])=>{const{placement:n,strategy:i,popperOptions:s}=t,o={placement:n,strategy:i,...s,modifiers:[...xue(t),...e]};return Sue(o,s==null?void 0:s.modifiers),o},Cue=t=>{if(Jt)return Ws(t)};function xue(t){const{offset:e,gpuAcceleration:n,fallbackPlacements:i}=t;return[{name:"offset",options:{offset:[0,e??12]}},{name:"preventOverflow",options:{padding:{top:0,bottom:0,left:0,right:0}}},{name:"flip",options:{padding:5,fallbackPlacements:i}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function Sue(t,e){e&&(t.modifiers=[...t.modifiers,...e??[]])}const $ue=0,Aue=t=>{const{popperInstanceRef:e,contentRef:n,triggerRef:i,role:s}=qe(r8,void 0),o=ee(),r=W(()=>t.arrowOffset),a=W(()=>({name:"eventListeners",enabled:!!t.visible})),l=W(()=>{const k=E(o),C=E(r)??$ue;return{name:"arrow",enabled:!nie(k),options:{element:k,padding:C}}}),c=W(()=>({onFirstUpdate:()=>{p()},...kue(t,[E(l),E(a)])})),u=W(()=>Cue(t.referenceEl)||E(i)),{attributes:d,state:h,styles:f,update:p,forceUpdate:m,instanceRef:b}=are(u,n,c);Te(b,k=>e.value=k,{flush:"sync"}),Nt(()=>{Te(()=>{var k,C;return(C=(k=E(u))==null?void 0:k.getBoundingClientRect)==null?void 0:C.call(k)},()=>{p()})});let w;return Te(()=>t.visible,k=>{w==null||w(),w=void 0,k&&(w=Ts(n,p).stop)}),wn(()=>{e.value=void 0,w==null||w(),w=void 0}),{attributes:d,arrowRef:o,contentRef:n,instanceRef:b,state:h,styles:f,role:s,forceUpdate:m,update:p}},Eue=(t,{attributes:e,styles:n,role:i})=>{const{nextZIndex:s}=Zb(),o=Be("popper"),r=W(()=>E(e).popper),a=ee(wt(t.zIndex)?t.zIndex:s()),l=W(()=>[o.b(),o.is("pure",t.pure),o.is(t.effect),t.popperClass]),c=W(()=>[{zIndex:E(a)},E(n).popper,t.popperStyle||{}]),u=W(()=>i.value==="dialog"?"false":void 0),d=W(()=>E(n).arrow||{});return{ariaModal:u,arrowStyle:d,contentAttrs:r,contentClass:l,contentStyle:c,contentZIndex:a,updateZIndex:()=>{a.value=wt(t.zIndex)?t.zIndex:s()}}},Mue=(t,e)=>{const n=ee(!1),i=ee(),s=()=>{e("focus")},o=c=>{var u;((u=c.detail)==null?void 0:u.focusReason)!=="pointer"&&(i.value="first",e("blur"))},r=c=>{t.visible&&!n.value&&(c.target&&(i.value=c.target),n.value=!0)},a=c=>{t.trapping||(c.detail.focusReason==="pointer"&&c.preventDefault(),n.value=!1)},l=()=>{n.value=!1,e("close")};return wn(()=>{i.value=void 0}),{focusStartRef:i,trapped:n,onFocusAfterReleased:o,onFocusAfterTrapped:s,onFocusInTrap:r,onFocusoutPrevented:a,onReleaseRequested:l}};var Tue=fe({name:"ElPopperContent",__name:"content",props:IR,emits:yce,setup(t,{expose:e,emit:n}){const i=n,s=t,{focusStartRef:o,trapped:r,onFocusAfterReleased:a,onFocusAfterTrapped:l,onFocusInTrap:c,onFocusoutPrevented:u,onReleaseRequested:d}=Mue(s,i),{attributes:h,arrowRef:f,contentRef:p,styles:m,instanceRef:b,role:w,update:k}=Aue(s),{ariaModal:C,arrowStyle:A,contentAttrs:S,contentClass:M,contentStyle:P,updateZIndex:T}=Eue(s,{styles:m,attributes:h,role:w}),I=qe(kd,void 0);Pt(AR,{arrowStyle:A,arrowRef:f}),I&&Pt(kd,{...I,addInputId:Dt,removeInputId:Dt});let L;const R=(H=!0)=>{k(),H&&T()},V=()=>{R(!1),s.visible&&s.focusOnShow?r.value=!0:s.visible===!1&&(r.value=!1)};return Nt(()=>{Te(()=>s.triggerTargetEl,(H,F)=>{L==null||L(),L=void 0;const U=E(H||p.value),Y=E(F||p.value);Lo(U)&&(L=Te([w,()=>s.ariaLabel,C,()=>s.id],z=>{["role","aria-label","aria-modal","id"].forEach((X,Z)=>{hi(z[Z])?U.removeAttribute(X):U.setAttribute(X,z[Z])})},{immediate:!0})),Y!==U&&Lo(Y)&&["role","aria-label","aria-modal","id"].forEach(z=>{Y.removeAttribute(z)})},{immediate:!0}),Te(()=>s.visible,V,{immediate:!0})}),wn(()=>{L==null||L(),L=void 0,p.value=void 0}),e({popperContentRef:p,popperInstanceRef:b,updatePopper:R,contentStyle:P}),(H,F)=>(v(),$("div",Yt({ref_key:"contentRef",ref:p},E(S),{style:E(P),class:E(M),tabindex:"-1",onMouseenter:F[0]||(F[0]=U=>H.$emit("mouseenter",U)),onMouseleave:F[1]||(F[1]=U=>H.$emit("mouseleave",U))}),[_(E(Y1),{loop:t.loop,trapped:E(r),"trap-on-focus-in":!0,"focus-trap-el":E(p),"focus-start-el":E(o),onFocusAfterTrapped:E(l),onFocusAfterReleased:E(a),onFocusin:E(c),onFocusoutPrevented:E(u),onReleaseRequested:E(d)},{default:y(()=>[le(H.$slots,"default")]),_:3},8,["loop","trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}}),Pue=Tue,Iue=fe({name:"ElPopper",inheritAttrs:!1,__name:"popper",props:$R,setup(t,{expose:e}){const n=t,i={triggerRef:ee(),popperInstanceRef:ee(),contentRef:ee(),referenceRef:ee(),role:W(()=>n.role)};return e(i),Pt(r8,i),(s,o)=>le(s.$slots,"default")}}),Lue=Iue;const Oue=Gt(Lue),zn=Ge({...pre,...IR,appendTo:{type:P4.to.type},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:de(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...Sr(["ariaLabel"])}),Ec=Ge({...ER,disabled:Boolean,trigger:{type:de([String,Array]),default:"hover"},triggerKeys:{type:de(Array),default:()=>[Ue.enter,Ue.numpadEnter,Ue.space]},focusOnTarget:Boolean}),{useModelToggleProps:Due,useModelToggleEmits:Rue,useModelToggle:Vue}=DD("visible"),Fue=Ge({...$R,...Due,...zn,...Ec,...PR,showArrow:{type:Boolean,default:!0}}),Nue=[...Rue,"before-show","before-hide","show","hide","open","close"],c8=Symbol("elTooltip"),fC=(t,e)=>Ee(t)?t.includes(e):t===e,lh=(t,e,n)=>i=>{fC(E(t),e)&&n(i)};var Bue=fe({name:"ElTooltipTrigger",__name:"trigger",props:Ec,setup(t,{expose:e}){const n=t,i=Be("tooltip"),{controlled:s,id:o,open:r,onOpen:a,onClose:l,onToggle:c}=qe(c8,void 0),u=ee(null),d=()=>{if(E(s)||n.disabled)return!0},h=Sn(n,"trigger"),f=Ms(d,lh(h,"hover",A=>{a(A),n.focusOnTarget&&A.target&&ot(()=>{I4(A.target,{preventScroll:!0})})})),p=Ms(d,lh(h,"hover",l)),m=Ms(d,lh(h,"click",A=>{A.button===0&&c(A)})),b=Ms(d,lh(h,"focus",a)),w=Ms(d,lh(h,"focus",l)),k=Ms(d,lh(h,"contextmenu",A=>{A.preventDefault(),c(A)})),C=Ms(d,A=>{const S=ls(A);n.triggerKeys.includes(S)&&(A.preventDefault(),c(A))});return e({triggerRef:u}),(A,S)=>(v(),D(E(gce),{id:E(o),"virtual-ref":t.virtualRef,open:E(r),"virtual-triggering":t.virtualTriggering,class:q(E(i).e("trigger")),onBlur:E(w),onClick:E(m),onContextmenu:E(k),onFocus:E(b),onMouseenter:E(f),onMouseleave:E(p),onKeydown:E(C)},{default:y(()=>[le(A.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}}),zue=Bue,Hue=fe({name:"ElTooltipContent",inheritAttrs:!1,__name:"content",props:zn,setup(t,{expose:e}){const n=t,{selector:i}=GD(),s=Be("tooltip"),o=ee(),r=yD(()=>{var X;return(X=o.value)==null?void 0:X.popperContentRef});let a;const{controlled:l,id:c,open:u,trigger:d,onClose:h,onOpen:f,onShow:p,onHide:m,onBeforeShow:b,onBeforeHide:w}=qe(c8,void 0),k=W(()=>n.transition||`${s.namespace.value}-fade-in-linear`),C=W(()=>n.persistent);wn(()=>{a==null||a()});const A=W(()=>E(C)?!0:E(u)),S=W(()=>n.disabled?!1:E(u)),M=W(()=>n.appendTo||i.value),P=W(()=>n.style??{}),T=ee(!0),I=()=>{m(),z()&&I4(document.body,{preventScroll:!0}),T.value=!0},L=()=>{if(E(l))return!0},R=Ms(L,()=>{n.enterable&&fC(E(d),"hover")&&f()}),V=Ms(L,()=>{fC(E(d),"hover")&&h()}),H=()=>{var X,Z;(Z=(X=o.value)==null?void 0:X.updatePopper)==null||Z.call(X),b==null||b()},F=()=>{w==null||w()},U=()=>{p()},Y=()=>{n.virtualTriggering||h()},z=X=>{var Q;const Z=(Q=o.value)==null?void 0:Q.popperContentRef,G=(X==null?void 0:X.relatedTarget)||document.activeElement;return Z==null?void 0:Z.contains(G)};return Te(()=>E(u),X=>{X?(T.value=!1,a=SD(r,()=>{E(l)||ao(E(d)).every(Z=>Z!=="hover"&&Z!=="focus")&&h()},{detectIframe:!0})):a==null||a()},{flush:"post"}),e({contentRef:o,isFocusInsideContent:z}),(X,Z)=>(v(),D(E(t2),{disabled:!t.teleported,to:M.value},{default:y(()=>[A.value||!T.value?(v(),D(jo,{key:0,name:k.value,appear:!C.value,onAfterLeave:I,onBeforeEnter:H,onAfterEnter:U,onBeforeLeave:F,persisted:""},{default:y(()=>[Re(_(E(Pue),Yt({id:E(c),ref_key:"contentRef",ref:o},X.$attrs,{"aria-label":t.ariaLabel,"aria-hidden":T.value,"boundaries-padding":t.boundariesPadding,"fallback-placements":t.fallbackPlacements,"gpu-acceleration":t.gpuAcceleration,offset:t.offset,placement:t.placement,"popper-options":t.popperOptions,"arrow-offset":t.arrowOffset,strategy:t.strategy,effect:t.effect,enterable:t.enterable,pure:t.pure,"popper-class":t.popperClass,"popper-style":[t.popperStyle,P.value],"reference-el":t.referenceEl,"trigger-target-el":t.triggerTargetEl,visible:S.value,"z-index":t.zIndex,loop:t.loop,onMouseenter:E(R),onMouseleave:E(V),onBlur:Y,onClose:E(h)}),{default:y(()=>[le(X.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","arrow-offset","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","loop","onMouseenter","onMouseleave","onClose"]),[[jt,S.value]])]),_:3},8,["name","appear"])):O("v-if",!0)]),_:3},8,["disabled","to"]))}}),Uue=Hue;const jue=["innerHTML"],Wue={key:1};var Yue=fe({name:"ElTooltip",__name:"tooltip",props:Fue,emits:Nue,setup(t,{expose:e,emit:n}){const i=t,s=n;fre();const o=Be("tooltip"),r=kr(),a=ee(),l=ee(),c=()=>{var S;const A=E(a);A&&((S=A.popperInstanceRef)==null||S.update())},u=ee(!1),d=ee(),{show:h,hide:f,hasUpdateHandler:p}=Vue({indicator:u,toggleReason:d}),{onOpen:m,onClose:b}=mre({showAfter:Sn(i,"showAfter"),hideAfter:Sn(i,"hideAfter"),autoClose:Sn(i,"autoClose"),open:h,close:f}),w=W(()=>Jn(i.visible)&&!p.value),k=W(()=>[o.b(),i.popperClass]);Pt(c8,{controlled:w,id:r,open:Rc(u),trigger:Sn(i,"trigger"),onOpen:m,onClose:b,onToggle:A=>{E(u)?b(A):m(A)},onShow:()=>{s("show",d.value)},onHide:()=>{s("hide",d.value)},onBeforeShow:()=>{s("before-show",d.value)},onBeforeHide:()=>{s("before-hide",d.value)},updatePopper:c}),Te(()=>i.disabled,A=>{A&&u.value&&(u.value=!1),!A&&Jn(i.visible)&&(u.value=i.visible)});const C=A=>{var S;return(S=l.value)==null?void 0:S.isFocusInsideContent(A)};return L6(()=>u.value&&f()),wn(()=>{d.value=void 0}),e({popperRef:a,contentRef:l,isFocusInsideContent:C,updatePopper:c,onOpen:m,onClose:b,hide:f}),(A,S)=>(v(),D(E(Oue),{ref_key:"popperRef",ref:a,role:t.role},{default:y(()=>[_(zue,{disabled:t.disabled,trigger:t.trigger,"trigger-keys":t.triggerKeys,"virtual-ref":t.virtualRef,"virtual-triggering":t.virtualTriggering,"focus-on-target":t.focusOnTarget},{default:y(()=>[A.$slots.default?le(A.$slots,"default",{key:0}):O("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering","focus-on-target"]),_(Uue,{ref_key:"contentRef",ref:l,"aria-label":t.ariaLabel,"boundaries-padding":t.boundariesPadding,content:t.content,disabled:t.disabled,effect:t.effect,enterable:t.enterable,"fallback-placements":t.fallbackPlacements,"hide-after":t.hideAfter,"gpu-acceleration":t.gpuAcceleration,offset:t.offset,persistent:t.persistent,"popper-class":k.value,"popper-style":t.popperStyle,placement:t.placement,"popper-options":t.popperOptions,"arrow-offset":t.arrowOffset,pure:t.pure,"raw-content":t.rawContent,"reference-el":t.referenceEl,"trigger-target-el":t.triggerTargetEl,"show-after":t.showAfter,strategy:t.strategy,teleported:t.teleported,transition:t.transition,"virtual-triggering":t.virtualTriggering,"z-index":t.zIndex,"append-to":t.appendTo,loop:t.loop},{default:y(()=>[le(A.$slots,"content",{},()=>[t.rawContent?(v(),$("span",{key:0,innerHTML:t.content},null,8,jue)):(v(),$("span",Wue,x(t.content),1))]),t.showArrow?(v(),D(E(pce),{key:0})):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","arrow-offset","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to","loop"])]),_:3},8,["role"]))}}),que=Yue;const Ss=Gt(que),li=t=>t,Gue=Ge({id:{type:String,default:void 0},size:Zi,disabled:{type:Boolean,default:void 0},modelValue:{type:de([String,Number,Object]),default:""},modelModifiers:{type:de(Object),default:()=>({})},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:de(String),default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:de([Boolean,Object]),default:!1},autocomplete:{type:de(String),default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,clearIcon:{type:ds,default:Zc},showPassword:Boolean,showWordLimit:Boolean,wordLimitPosition:{type:String,values:["inside","outside"],default:"inside"},suffixIcon:{type:ds},prefixIcon:{type:ds},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:de([Object,Array,String]),default:()=>li({})},autofocus:Boolean,rows:{type:Number,default:2},...Sr(["ariaLabel"]),inputmode:{type:de(String),default:void 0},name:String}),Xue={[Mt]:t=>Ke(t),input:t=>Ke(t),change:(t,e)=>Ke(t)&&(e instanceof Event||e===void 0),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:t=>t===void 0||t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent};Xs(Zc);let ki;const Kue={height:"0",visibility:"hidden",overflow:L4()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Zue=["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","word-break"],nA=t=>{const e=Number.parseFloat(t);return Number.isNaN(e)?t:e};function Jue(t){const e=window.getComputedStyle(t),n=e.getPropertyValue("box-sizing"),i=Number.parseFloat(e.getPropertyValue("padding-bottom"))+Number.parseFloat(e.getPropertyValue("padding-top")),s=Number.parseFloat(e.getPropertyValue("border-bottom-width"))+Number.parseFloat(e.getPropertyValue("border-top-width"));return{contextStyle:Zue.map(o=>[o,e.getPropertyValue(o)]),paddingSize:i,borderSize:s,boxSizing:n}}function sA(t,e=1,n){var u;if(!ki){ki=document.createElement("textarea");let d=document.body;!L4()&&t.parentNode&&(d=t.parentNode),d.appendChild(ki)}const{paddingSize:i,borderSize:s,boxSizing:o,contextStyle:r}=Jue(t);r.forEach(([d,h])=>ki==null?void 0:ki.style.setProperty(d,h)),Object.entries(Kue).forEach(([d,h])=>ki==null?void 0:ki.style.setProperty(d,h,"important")),ki.value=t.value||t.placeholder||"";let a=ki.scrollHeight;const l={};o==="border-box"?a=a+s:o==="content-box"&&(a=a-i),ki.value="";const c=ki.scrollHeight-i;if(wt(e)){let d=c*e;o==="border-box"&&(d=d+i+s),a=Math.max(d,a),l.minHeight=`${d}px`}if(wt(n)){let d=c*n;o==="border-box"&&(d=d+i+s),a=Math.min(d,a)}return l.height=`${a}px`,(u=ki.parentNode)==null||u.removeChild(ki),ki=void 0,l}const Que=["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode"],ede=["id","name","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","inputmode"],iA="ElInput";var tde=fe({name:iA,inheritAttrs:!1,__name:"input",props:Gue,emits:Xue,setup(t,{expose:e,emit:n}){const i=t,s=n,o=Rd(),r=Gb(),a=gi(),l=W(()=>[i.type==="textarea"?b.b():m.b(),m.m(f.value),m.is("disabled",p.value),m.is("exceed",K.value),{[m.b("group")]:a.prepend||a.append,[m.m("prefix")]:a.prefix||i.prefixIcon,[m.m("suffix")]:a.suffix||i.suffixIcon||i.clearable||i.showPassword,[m.bm("suffix","password-clear")]:Z.value&&G.value,[m.b("hidden")]:i.type==="hidden"},o.class]),c=W(()=>[m.e("wrapper"),m.is("focus",I.value)]),{form:u,formItem:d}=_o(),{inputId:h}=Tl(i,{formItemContext:d}),f=Ii(),p=bs(),m=Be("input"),b=Be("textarea"),w=Fn(),k=Fn(),C=ee(!1),A=ee(!1),S=ee(),M=Fn(i.inputStyle),P=W(()=>w.value||k.value),{wrapperRef:T,isFocused:I,handleFocus:L,handleBlur:R}=pp(P,{disabled:p,afterBlur(){var ve;i.validateEvent&&((ve=d==null?void 0:d.validate)==null||ve.call(d,"blur").catch(Pe=>Tt(Pe)))}}),V=W(()=>(u==null?void 0:u.statusIcon)??!1),H=W(()=>(d==null?void 0:d.validateState)||""),F=W(()=>H.value&&o8[H.value]),U=W(()=>A.value?s8:Q4),Y=W(()=>[o.style]),z=W(()=>[i.inputStyle,M.value,{resize:i.resize}]),X=W(()=>hi(i.modelValue)?"":String(i.modelValue)),Z=W(()=>i.clearable&&!p.value&&!i.readonly&&!!X.value&&(I.value||C.value)),G=W(()=>i.showPassword&&!p.value&&!!X.value),Q=W(()=>i.showWordLimit&&!!i.maxlength&&(i.type==="text"||i.type==="textarea")&&!p.value&&!i.readonly&&!i.showPassword),ne=W(()=>X.value.length),K=W(()=>!!Q.value&&ne.value>Number(i.maxlength)),ae=W(()=>!!a.suffix||!!i.suffixIcon||Z.value||i.showPassword||Q.value||!!H.value&&V.value),ge=W(()=>!!Object.keys(i.modelModifiers).length),[Ce,oe]=Gre(w);Ts(k,ve=>{if(re(),!Q.value||i.resize!=="both"&&i.resize!=="horizontal")return;const{width:Pe}=ve[0].contentRect;S.value={right:`calc(100% - ${Pe+22-10}px)`}});const pe=()=>{const{type:ve,autosize:Pe}=i;if(!(!Jt||ve!=="textarea"||!k.value))if(Pe){const Ie=yt(Pe)?Pe.minRows:void 0,_t=yt(Pe)?Pe.maxRows:void 0,Lt=sA(k.value,Ie,_t);M.value={overflowY:"hidden",...Lt},ot(()=>{k.value.offsetHeight,M.value=Lt})}else M.value={minHeight:sA(k.value).minHeight}},re=(ve=>{let Pe=!1;return()=>{var Ie;Pe||!i.autosize||((Ie=k.value)==null?void 0:Ie.offsetParent)!==null&&(setTimeout(ve),Pe=!0)}})(pe),ke=()=>{const ve=P.value,Pe=i.formatter?i.formatter(X.value):X.value;!ve||ve.value===Pe||i.type==="file"||(ve.value=Pe)},je=ve=>{const{trim:Pe,number:Ie}=i.modelModifiers;return Pe&&(ve=ve.trim()),Ie&&(ve=`${nA(ve)}`),i.formatter&&i.parser&&(ve=i.parser(ve)),ve},te=async ve=>{if(me.value)return;const{lazy:Pe}=i.modelModifiers;let{value:Ie}=ve.target;if(Pe){s(Vo,Ie);return}if(Ie=je(Ie),String(Ie)===X.value){i.formatter&&ke();return}Ce(),s(Mt,Ie),s(Vo,Ie),await ot(),(i.formatter&&i.parser||!ge.value)&&ke(),oe()},se=async ve=>{let{value:Pe}=ve.target;Pe=je(Pe),i.modelModifiers.lazy&&s(Mt,Pe),s(dn,Pe,ve),await ot(),ke()},{isComposing:me,handleCompositionStart:$e,handleCompositionUpdate:Se,handleCompositionEnd:Le}=X4({emit:s,afterComposition:te}),We=()=>{A.value=!A.value},Fe=()=>{var ve;return(ve=P.value)==null?void 0:ve.focus()},He=()=>{var ve;return(ve=P.value)==null?void 0:ve.blur()},Ae=ve=>{C.value=!1,s("mouseleave",ve)},Ze=ve=>{C.value=!0,s("mouseenter",ve)},Ye=ve=>{s("keydown",ve)},it=()=>{var ve;(ve=P.value)==null||ve.select()},be=ve=>{s(Mt,""),s(dn,""),s("clear",ve),s(Vo,"")};return Te(()=>i.modelValue,()=>{var ve;ot(()=>pe()),i.validateEvent&&((ve=d==null?void 0:d.validate)==null||ve.call(d,"change").catch(Pe=>Tt(Pe)))}),Te(X,ve=>{if(!P.value)return;const{trim:Pe,number:Ie}=i.modelModifiers,_t=P.value.value,Lt=(Ie||i.type==="number")&&!/^0\d/.test(_t)?`${nA(_t)}`:_t;Lt!==ve&&(document.activeElement===P.value&&P.value.type!=="range"&&Pe&&Lt.trim()===ve||ke())}),Te(()=>i.type,async()=>{await ot(),ke(),pe()}),Nt(()=>{!i.formatter&&i.parser&&Tt(iA,"If you set the parser, you also need to set the formatter."),ke(),ot(pe)}),e({input:w,textarea:k,ref:P,textareaStyle:z,autosize:Sn(i,"autosize"),isComposing:me,focus:Fe,blur:He,select:it,clear:be,resizeTextarea:pe}),(ve,Pe)=>(v(),$("div",{class:q([l.value,{[E(m).bm("group","append")]:ve.$slots.append,[E(m).bm("group","prepend")]:ve.$slots.prepend}]),style:Xe(Y.value),onMouseenter:Ze,onMouseleave:Ae},[O(" input "),t.type!=="textarea"?(v(),$(J,{key:0},[O(" prepend slot "),ve.$slots.prepend?(v(),$("div",{key:0,class:q(E(m).be("group","prepend"))},[le(ve.$slots,"prepend")],2)):O("v-if",!0),g("div",{ref_key:"wrapperRef",ref:T,class:q(c.value)},[O(" prefix slot "),ve.$slots.prefix||t.prefixIcon?(v(),$("span",{key:0,class:q(E(m).e("prefix"))},[g("span",{class:q(E(m).e("prefix-inner"))},[le(ve.$slots,"prefix"),t.prefixIcon?(v(),D(E(we),{key:0,class:q(E(m).e("icon"))},{default:y(()=>[(v(),D(Ct(t.prefixIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],2)):O("v-if",!0),g("input",Yt({id:E(h),ref_key:"input",ref:w,class:E(m).e("inner")},E(r),{name:t.name,minlength:t.minlength,maxlength:t.maxlength,type:t.showPassword?A.value?"text":"password":t.type,disabled:E(p),readonly:t.readonly,autocomplete:t.autocomplete,tabindex:t.tabindex,"aria-label":t.ariaLabel,placeholder:t.placeholder,style:t.inputStyle,form:t.form,autofocus:t.autofocus,role:t.containerRole,inputmode:t.inputmode,onCompositionstart:Pe[0]||(Pe[0]=(...Ie)=>E($e)&&E($e)(...Ie)),onCompositionupdate:Pe[1]||(Pe[1]=(...Ie)=>E(Se)&&E(Se)(...Ie)),onCompositionend:Pe[2]||(Pe[2]=(...Ie)=>E(Le)&&E(Le)(...Ie)),onInput:te,onChange:se,onKeydown:Ye}),null,16,Que),O(" suffix slot "),ae.value?(v(),$("span",{key:1,class:q(E(m).e("suffix"))},[g("span",{class:q(E(m).e("suffix-inner"))},[!Z.value||!G.value||!Q.value?(v(),$(J,{key:0},[le(ve.$slots,"suffix"),t.suffixIcon?(v(),D(E(we),{key:0,class:q(E(m).e("icon"))},{default:y(()=>[(v(),D(Ct(t.suffixIcon)))]),_:1},8,["class"])):O("v-if",!0)],64)):O("v-if",!0),Z.value?(v(),D(E(we),{key:1,class:q([E(m).e("icon"),E(m).e("clear")]),onMousedown:Me(E(Dt),["prevent"]),onClick:be},{default:y(()=>[(v(),D(Ct(t.clearIcon)))]),_:1},8,["class","onMousedown"])):O("v-if",!0),G.value?(v(),D(E(we),{key:2,class:q([E(m).e("icon"),E(m).e("password")]),onClick:We,onMousedown:Me(E(Dt),["prevent"]),onMouseup:Me(E(Dt),["prevent"])},{default:y(()=>[le(ve.$slots,"password-icon",{visible:A.value},()=>[(v(),D(Ct(U.value)))])]),_:3},8,["class","onMousedown","onMouseup"])):O("v-if",!0),Q.value?(v(),$("span",{key:3,class:q([E(m).e("count"),E(m).is("outside",t.wordLimitPosition==="outside")])},[g("span",{class:q(E(m).e("count-inner"))},x(ne.value)+" / "+x(t.maxlength),3)],2)):O("v-if",!0),H.value&&F.value&&V.value?(v(),D(E(we),{key:4,class:q([E(m).e("icon"),E(m).e("validateIcon"),E(m).is("loading",H.value==="validating")])},{default:y(()=>[(v(),D(Ct(F.value)))]),_:1},8,["class"])):O("v-if",!0)],2)],2)):O("v-if",!0)],2),O(" append slot "),ve.$slots.append?(v(),$("div",{key:1,class:q(E(m).be("group","append"))},[le(ve.$slots,"append")],2)):O("v-if",!0)],64)):(v(),$(J,{key:1},[O(" textarea "),g("textarea",Yt({id:E(h),ref_key:"textarea",ref:k,class:[E(b).e("inner"),E(m).is("focus",E(I)),E(b).is("clearable",t.clearable)]},E(r),{name:t.name,minlength:t.minlength,maxlength:t.maxlength,tabindex:t.tabindex,disabled:E(p),readonly:t.readonly,autocomplete:t.autocomplete,style:z.value,"aria-label":t.ariaLabel,placeholder:t.placeholder,form:t.form,autofocus:t.autofocus,rows:t.rows,role:t.containerRole,inputmode:t.inputmode,onCompositionstart:Pe[3]||(Pe[3]=(...Ie)=>E($e)&&E($e)(...Ie)),onCompositionupdate:Pe[4]||(Pe[4]=(...Ie)=>E(Se)&&E(Se)(...Ie)),onCompositionend:Pe[5]||(Pe[5]=(...Ie)=>E(Le)&&E(Le)(...Ie)),onInput:te,onFocus:Pe[6]||(Pe[6]=(...Ie)=>E(L)&&E(L)(...Ie)),onBlur:Pe[7]||(Pe[7]=(...Ie)=>E(R)&&E(R)(...Ie)),onChange:se,onKeydown:Ye}),null,16,ede),Z.value?(v(),D(E(we),{key:0,class:q([E(b).e("icon"),E(b).e("clear")]),onMousedown:Me(E(Dt),["prevent"]),onClick:be},{default:y(()=>[(v(),D(Ct(t.clearIcon)))]),_:1},8,["class","onMousedown"])):O("v-if",!0),Q.value?(v(),$("span",{key:1,style:Xe(S.value),class:q([E(m).e("count"),E(m).is("outside",t.wordLimitPosition==="outside")])},x(ne.value)+" / "+x(t.maxlength),7)):O("v-if",!0)],64))],38))}}),nde=tde;const ht=Gt(nde),sde=Ge({distance:{type:Number,default:0},height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:Boolean,wrapStyle:{type:de([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},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...Sr(["ariaLabel","ariaOrientation"])}),VR={"end-reached":t=>["left","right","top","bottom"].includes(t),scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(wt)},ch=4,ide={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"}},ode=({move:t,size:e,bar:n})=>({[n.size]:e,transform:`translate${n.axis}(${t}%)`}),rde=Ge({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),u8=Symbol("scrollbarContextKey"),ade=Ge({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),lde="Thumb";var cde=fe({__name:"thumb",props:rde,setup(t){const e=t,n=qe(u8),i=Be("scrollbar");n||vo(lde,"can not inject scrollbar context");const s=ee(),o=ee(),r=ee({}),a=ee(!1);let l=!1,c=!1,u=0,d=0,h=Jt?document.onselectstart:null;const f=W(()=>ide[e.vertical?"vertical":"horizontal"]),p=W(()=>ode({size:e.size,move:e.move,bar:f.value})),m=W(()=>s.value[f.value.offset]**2/n.wrapElement[f.value.scrollSize]/e.ratio/o.value[f.value.offset]),b=T=>{var L;if(T.stopPropagation(),T.ctrlKey||[1,2].includes(T.button))return;(L=window.getSelection())==null||L.removeAllRanges(),k(T);const I=T.currentTarget;I&&(r.value[f.value.axis]=I[f.value.offset]-(T[f.value.client]-I.getBoundingClientRect()[f.value.direction]))},w=T=>{if(!o.value||!s.value||!n.wrapElement)return;const I=(Math.abs(T.target.getBoundingClientRect()[f.value.direction]-T[f.value.client])-o.value[f.value.offset]/2)*100*m.value/s.value[f.value.offset];n.wrapElement[f.value.scroll]=I*n.wrapElement[f.value.scrollSize]/100},k=T=>{T.stopImmediatePropagation(),l=!0,u=n.wrapElement.scrollHeight,d=n.wrapElement.scrollWidth,document.addEventListener("mousemove",C),document.addEventListener("mouseup",A),h=document.onselectstart,document.onselectstart=()=>!1},C=T=>{if(!s.value||!o.value||l===!1)return;const I=r.value[f.value.axis];if(!I)return;const L=((s.value.getBoundingClientRect()[f.value.direction]-T[f.value.client])*-1-(o.value[f.value.offset]-I))*100*m.value/s.value[f.value.offset];f.value.scroll==="scrollLeft"?n.wrapElement[f.value.scroll]=L*d/100:n.wrapElement[f.value.scroll]=L*u/100},A=()=>{l=!1,r.value[f.value.axis]=0,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",A),P(),c&&(a.value=!1)},S=()=>{c=!1,a.value=!!e.size},M=()=>{c=!0,a.value=l};wn(()=>{P(),document.removeEventListener("mouseup",A)});const P=()=>{document.onselectstart!==h&&(document.onselectstart=h)};return Hn(Sn(n,"scrollbarElement"),"mousemove",S),Hn(Sn(n,"scrollbarElement"),"mouseleave",M),(T,I)=>(v(),D(jo,{name:E(i).b("fade"),persisted:""},{default:y(()=>[Re(g("div",{ref_key:"instance",ref:s,class:q([E(i).e("bar"),E(i).is(f.value.key)]),onMousedown:w,onClick:I[0]||(I[0]=Me(()=>{},["stop"]))},[g("div",{ref_key:"thumb",ref:o,class:q(E(i).e("thumb")),style:Xe(p.value),onMousedown:b},null,38)],34),[[jt,t.always||a.value]])]),_:1},8,["name"]))}}),oA=cde,ude=fe({__name:"bar",props:ade,setup(t,{expose:e}){const n=t,i=qe(u8),s=ee(0),o=ee(0),r=ee(""),a=ee(""),l=ee(1),c=ee(1);return e({handleScroll:h=>{if(h){const f=h.offsetHeight-ch,p=h.offsetWidth-ch;o.value=h.scrollTop*100/f*l.value,s.value=h.scrollLeft*100/p*c.value}},update:()=>{const h=i==null?void 0:i.wrapElement;if(!h)return;const f=h.offsetHeight-ch,p=h.offsetWidth-ch,m=f**2/h.scrollHeight,b=p**2/h.scrollWidth,w=Math.max(m,n.minSize),k=Math.max(b,n.minSize);l.value=m/(f-m)/(w/(f-w)),c.value=b/(p-b)/(k/(p-k)),a.value=w+ch<f?`${w}px`:"",r.value=k+ch<p?`${k}px`:""}}),(h,f)=>(v(),$(J,null,[_(oA,{move:s.value,ratio:c.value,size:r.value,always:t.always},null,8,["move","ratio","size","always"]),_(oA,{move:o.value,ratio:l.value,size:a.value,vertical:"",always:t.always},null,8,["move","ratio","size","always"])],64))}}),dde=ude;const hde=["tabindex"],Ow="ElScrollbar";var fde=fe({name:Ow,__name:"scrollbar",props:sde,emits:VR,setup(t,{expose:e,emit:n}){const i=t,s=n,o=Be("scrollbar");let r,a,l,c=0,u=0,d="";const h={bottom:!1,top:!1,right:!1,left:!1},f=ee(),p=ee(),m=ee(),b=ee(),w=W(()=>{const V={},H=pi(i.height),F=pi(i.maxHeight);return H&&(V.height=H),F&&(V.maxHeight=F),[i.wrapStyle,V]}),k=W(()=>[i.wrapClass,o.e("wrap"),{[o.em("wrap","hidden-default")]:!i.native}]),C=W(()=>[o.e("view"),i.viewClass]),A=V=>h[V]??!1,S={top:"bottom",bottom:"top",left:"right",right:"left"},M=V=>{const H=S[d];if(!H)return;const F=V[d],U=V[H];F&&!h[d]&&(h[d]=!0),!U&&h[H]&&(h[H]=!1)},P=()=>{var V;if(p.value){(V=b.value)==null||V.handleScroll(p.value);const H=c,F=u;c=p.value.scrollTop,u=p.value.scrollLeft;const U={bottom:c+p.value.clientHeight>=p.value.scrollHeight-i.distance,top:c<=i.distance&&H!==0,right:u+p.value.clientWidth>=p.value.scrollWidth-i.distance&&F!==u,left:u<=i.distance&&F!==0};if(s("scroll",{scrollTop:c,scrollLeft:u}),H!==c&&(d=c>H?"bottom":"top"),F!==u&&(d=u>F?"right":"left"),i.distance>0){if(A(d))return;M(U)}U[d]&&s("end-reached",d)}};function T(V,H){yt(V)?p.value.scrollTo(V):wt(V)&&wt(H)&&p.value.scrollTo(V,H)}const I=V=>{if(!wt(V)){Tt(Ow,"value must be a number");return}p.value.scrollTop=V},L=V=>{if(!wt(V)){Tt(Ow,"value must be a number");return}p.value.scrollLeft=V},R=()=>{var V;(V=b.value)==null||V.update(),h[d]=!1};return Te(()=>i.noresize,V=>{V?(r==null||r(),a==null||a(),l==null||l()):({stop:r}=Ts(m,R),{stop:a}=Ts(p,R),l=Hn("resize",R))},{immediate:!0}),Te(()=>[i.maxHeight,i.height],()=>{i.native||ot(()=>{var V;R(),p.value&&((V=b.value)==null||V.handleScroll(p.value))})}),Pt(u8,In({scrollbarElement:f,wrapElement:p})),I6(()=>{p.value&&(p.value.scrollTop=c,p.value.scrollLeft=u)}),Nt(()=>{i.native||ot(()=>{R()})}),xl(()=>R()),e({wrapRef:p,update:R,scrollTo:T,setScrollTop:I,setScrollLeft:L,handleScroll:P}),(V,H)=>(v(),$("div",{ref_key:"scrollbarRef",ref:f,class:q(E(o).b())},[g("div",{ref_key:"wrapRef",ref:p,class:q(k.value),style:Xe(w.value),tabindex:t.tabindex,onScroll:P},[(v(),D(Ct(t.tag),{id:t.id,ref_key:"resizeRef",ref:m,class:q(C.value),style:Xe(t.viewStyle),role:t.role,"aria-label":t.ariaLabel,"aria-orientation":t.ariaOrientation},{default:y(()=>[le(V.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,hde),t.native?O("v-if",!0):(v(),D(dde,{key:0,ref_key:"barRef",ref:b,always:t.always,"min-size":t.minSize},null,8,["always","min-size"]))],2))}}),pde=fde;const zs=Gt(pde),mde=Ge({size:{type:[Number,String],values:$l,validator:t=>wt(t)},shape:{type:String,values:["circle","square"]},icon:{type:ds},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:de(String),default:"cover"}}),gde={error:t=>t instanceof Event},FR=Symbol("avatarGroupContextKey"),vde={size:{type:de([Number,String]),values:$l,validator:t=>wt(t)},shape:{type:de(String),values:["circle","square"]},collapseAvatars:Boolean,collapseAvatarsTooltip:Boolean,maxCollapseAvatars:{type:Number,default:1},effect:{type:de(String),default:"light"},placement:{type:de(String),values:hp,default:"top"},popperClass:zn.popperClass,popperStyle:zn.popperStyle,collapseClass:String,collapseStyle:{type:de([String,Array,Object])}},_de=["src","alt","srcset"];var yde=fe({name:"ElAvatar",__name:"avatar",props:mde,emits:gde,setup(t,{emit:e}){const n=t,i=e,s=qe(FR,void 0),o=Be("avatar"),r=ee(!1),a=W(()=>n.size??(s==null?void 0:s.size)),l=W(()=>n.shape??(s==null?void 0:s.shape)??"circle"),c=W(()=>{const{icon:f}=n,p=[o.b()];return Ke(a.value)&&p.push(o.m(a.value)),f&&p.push(o.m("icon")),l.value&&p.push(o.m(l.value)),p}),u=W(()=>wt(a.value)?o.cssVarBlock({size:pi(a.value)}):void 0),d=W(()=>({objectFit:n.fit}));Te(()=>[n.src,n.srcSet],()=>r.value=!1);function h(f){r.value=!0,i("error",f)}return(f,p)=>(v(),$("span",{class:q(c.value),style:Xe(u.value)},[(t.src||t.srcSet)&&!r.value?(v(),$("img",{key:0,src:t.src,alt:t.alt,srcset:t.srcSet,style:Xe(d.value),onError:h},null,44,_de)):t.icon?(v(),D(E(we),{key:1},{default:y(()=>[(v(),D(Ct(t.icon)))]),_:1})):le(f.$slots,"default",{key:2})],6))}}),NR=yde,BR=fe({name:"ElAvatarGroup",props:vde,setup(t,{slots:e}){const n=Be("avatar-group");return Pt(FR,In({size:Sn(t,"size"),shape:Sn(t,"shape")})),()=>{var o;const i=kc(((o=e.default)==null?void 0:o.call(e))??[]);let s=i;if(t.collapseAvatars&&i.length>t.maxCollapseAvatars){s=i.slice(0,t.maxCollapseAvatars);const r=i.slice(t.maxCollapseAvatars);s.push(_(Ss,{popperClass:t.popperClass,popperStyle:t.popperStyle,placement:t.placement,effect:t.effect,disabled:!t.collapseAvatarsTooltip},{default:()=>_(NR,{size:t.size,shape:t.shape,class:t.collapseClass,style:t.collapseStyle},{default:()=>[N("+ "),r.length]}),content:()=>_("div",{class:n.e("collapse-avatars")},[r.map((a,l)=>is(a)?_r(a,{key:a.key??l}):a)])}))}return _("div",{class:n.b()},[s])}}});const d8=Gt(NR,{AvatarGroup:BR});Os(BR);const bde=Ge({separator:{type:String,default:"/"},separatorIcon:{type:ds}}),zR=Symbol("breadcrumbKey"),wde=Ge({to:{type:de([String,Object]),default:""},replace:Boolean}),kde=["aria-label"];var Cde=fe({name:"ElBreadcrumb",__name:"breadcrumb",props:bde,setup(t){const{t:e}=en(),n=t,i=Be("breadcrumb"),s=ee();return Pt(zR,n),Nt(()=>{const o=s.value.querySelectorAll(`.${i.e("item")}`);o.length&&o[o.length-1].setAttribute("aria-current","page")}),(o,r)=>(v(),$("div",{ref_key:"breadcrumb",ref:s,class:q(E(i).b()),"aria-label":E(e)("el.breadcrumb.label"),role:"navigation"},[le(o.$slots,"default")],10,kde))}}),xde=Cde,Sde=fe({name:"ElBreadcrumbItem",__name:"breadcrumb-item",props:wde,setup(t){const e=t,n=pt(),i=qe(zR,void 0),s=Be("breadcrumb"),o=n.appContext.config.globalProperties.$router,r=()=>{!e.to||!o||(e.replace?o.replace(e.to):o.push(e.to))};return(a,l)=>{var c,u;return v(),$("span",{class:q(E(s).e("item"))},[g("span",{class:q([E(s).e("inner"),E(s).is("link",!!t.to)]),role:"link",onClick:r},[le(a.$slots,"default")],2),(c=E(i))!=null&&c.separatorIcon?(v(),D(E(we),{key:0,class:q(E(s).e("separator"))},{default:y(()=>[(v(),D(Ct(E(i).separatorIcon)))]),_:1},8,["class"])):(v(),$("span",{key:1,class:q(E(s).e("separator")),role:"presentation"},x((u=E(i))==null?void 0:u.separator),3))],2)}}}),HR=Sde;const $de=Gt(xde,{BreadcrumbItem:HR}),Ade=Os(HR),Ede=["default","primary","success","warning","info","danger","text",""],Mde=["button","submit","reset"],pC=Ge({size:Zi,disabled:{type:Boolean,default:void 0},type:{type:String,values:Ede,default:""},icon:{type:ds},nativeType:{type:String,values:Mde,default:"button"},loading:Boolean,loadingIcon:{type:ds,default:()=>Uf},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,dashed:{type:Boolean,default:void 0},color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:de([String,Object]),default:"button"}}),Tde={click:t=>t instanceof MouseEvent},UR=Symbol(),x0=ee();function Jc(t,e=void 0){const n=pt()?qe(UR,x0):x0;return t?W(()=>{var i;return((i=n.value)==null?void 0:i[t])??e}):n}function h8(t,e){const n=Jc(),i=Be(t,W(()=>{var a;return((a=n.value)==null?void 0:a.namespace)||ng})),s=en(W(()=>{var a;return(a=n.value)==null?void 0:a.locale})),o=Zb(W(()=>{var a;return((a=n.value)==null?void 0:a.zIndex)||KD})),r=W(()=>{var a;return E(e)||((a=n.value)==null?void 0:a.size)||""});return jR(W(()=>E(n)||{})),{ns:i,locale:s,zIndex:o,size:r}}const jR=(t,e,n=!1)=>{const i=!!pt(),s=i?Jc():void 0,o=(e==null?void 0:e.provide)??(i?Pt:void 0);if(!o){Tt("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const r=W(()=>{const a=E(t);return s!=null&&s.value?Pde(s.value,a):a});return o(UR,r),o(ID,W(()=>r.value.locale)),o(LD,W(()=>r.value.namespace)),o(ZD,W(()=>r.value.zIndex)),o(lR,{size:W(()=>r.value.size||"")}),o(uR,W(()=>({emptyValues:r.value.emptyValues,valueOnClear:r.value.valueOnClear}))),(n||!x0.value)&&(x0.value=r.value),r},Pde=(t,e)=>{const n=[...new Set([...y0(t),...y0(e)])],i={};for(const s of n)i[s]=e[s]!==void 0?e[s]:t[s];return i},Ide=Ge({a11y:{type:Boolean,default:!0},locale:{type:de(Object)},size:Zi,button:{type:de(Object)},card:{type:de(Object)},dialog:{type:de(Object)},link:{type:de(Object)},experimentalFeatures:{type:de(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:de(Object)},zIndex:Number,namespace:{type:String,default:"el"},table:{type:de(Object)},...H1}),Lde={placement:"top"},Ode=fe({name:"ElConfigProvider",props:Ide,setup(t,{slots:e}){const n=jR(t);return Te(()=>t.message,i=>{var s;Object.assign(Lde,((s=n==null?void 0:n.value)==null?void 0:s.message)??{},i??{})},{immediate:!0,deep:!0}),()=>le(e,"default",{config:n==null?void 0:n.value})}}),Dde=Gt(Ode),WR=Symbol("buttonGroupContextKey"),Rde=(t,e)=>{fl({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},W(()=>t.type==="text"));const n=qe(WR,void 0),i=Jc("button"),{form:s}=_o(),o=Ii(W(()=>n==null?void 0:n.size)),r=bs(),a=ee(),l=gi(),c=W(()=>{var k;return t.type||(n==null?void 0:n.type)||((k=i.value)==null?void 0:k.type)||""}),u=W(()=>{var k;return t.autoInsertSpace??((k=i.value)==null?void 0:k.autoInsertSpace)??!1}),d=W(()=>{var k;return t.plain??((k=i.value)==null?void 0:k.plain)??!1}),h=W(()=>{var k;return t.round??((k=i.value)==null?void 0:k.round)??!1}),f=W(()=>{var k;return t.text??((k=i.value)==null?void 0:k.text)??!1}),p=W(()=>{var k;return t.dashed??((k=i.value)==null?void 0:k.dashed)??!1}),m=W(()=>t.tag==="button"?{ariaDisabled:r.value||t.loading,disabled:r.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),b=W(()=>{var C;const k=(C=l.default)==null?void 0:C.call(l);if(u.value&&(k==null?void 0:k.length)===1){const A=k[0];if((A==null?void 0:A.type)===$a){const S=A.children;return/^\p{Unified_Ideograph}{2}$/u.test(S.trim())}}return!1});return{_disabled:r,_size:o,_type:c,_ref:a,_props:m,_plain:d,_round:h,_text:f,_dashed:p,shouldAddSpace:b,handleClick:k=>{if(r.value||t.loading){k.stopPropagation();return}t.nativeType==="reset"&&(s==null||s.resetFields()),e("click",k)}}};function fi(t,e){Vde(t)&&(t="100%");const n=Fde(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function n_(t){return Math.min(1,Math.max(0,t))}function Vde(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function Fde(t){return typeof t=="string"&&t.indexOf("%")!==-1}function YR(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function s_(t){return Number(t)<=1?`${Number(t)*100}%`:t}function Nu(t){return t.length===1?"0"+t:String(t)}function Nde(t,e,n){return{r:fi(t,255)*255,g:fi(e,255)*255,b:fi(n,255)*255}}function rA(t,e,n){t=fi(t,255),e=fi(e,255),n=fi(n,255);const i=Math.max(t,e,n),s=Math.min(t,e,n);let o=0,r=0;const a=(i+s)/2;if(i===s)r=0,o=0;else{const l=i-s;switch(r=a>.5?l/(2-i-s):l/(i+s),i){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s:r,l:a}}function Dw(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*(6*n):n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Bde(t,e,n){let i,s,o;if(t=fi(t,360),e=fi(e,100),n=fi(n,100),e===0)s=n,o=n,i=n;else{const r=n<.5?n*(1+e):n+e-n*e,a=2*n-r;i=Dw(a,r,t+1/3),s=Dw(a,r,t),o=Dw(a,r,t-1/3)}return{r:i*255,g:s*255,b:o*255}}function aA(t,e,n){t=fi(t,255),e=fi(e,255),n=fi(n,255);const i=Math.max(t,e,n),s=Math.min(t,e,n);let o=0;const r=i,a=i-s,l=i===0?0:a/i;if(i===s)o=0;else{switch(i){case t:o=(e-n)/a+(e<n?6:0);break;case e:o=(n-t)/a+2;break;case n:o=(t-e)/a+4;break}o/=6}return{h:o,s:l,v:r}}function zde(t,e,n){t=fi(t,360)*6,e=fi(e,100),n=fi(n,100);const i=Math.floor(t),s=t-i,o=n*(1-e),r=n*(1-s*e),a=n*(1-(1-s)*e),l=i%6,c=[n,r,o,o,a,n][l],u=[a,n,n,r,o,o][l],d=[o,o,a,n,n,r][l];return{r:c*255,g:u*255,b:d*255}}function lA(t,e,n,i){const s=[Nu(Math.round(t).toString(16)),Nu(Math.round(e).toString(16)),Nu(Math.round(n).toString(16))];return i&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function Hde(t,e,n,i,s){const o=[Nu(Math.round(t).toString(16)),Nu(Math.round(e).toString(16)),Nu(Math.round(n).toString(16)),Nu(jde(i))];return s&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Ude(t,e,n,i){const s=t/100,o=e/100,r=n/100,a=i/100,l=255*(1-s)*(1-a),c=255*(1-o)*(1-a),u=255*(1-r)*(1-a);return{r:l,g:c,b:u}}function cA(t,e,n){let i=1-t/255,s=1-e/255,o=1-n/255,r=Math.min(i,s,o);return r===1?(i=0,s=0,o=0):(i=(i-r)/(1-r)*100,s=(s-r)/(1-r)*100,o=(o-r)/(1-r)*100),r*=100,{c:Math.round(i),m:Math.round(s),y:Math.round(o),k:Math.round(r)}}function jde(t){return Math.round(parseFloat(t)*255).toString(16)}function uA(t){return Ao(t)/255}function Ao(t){return parseInt(t,16)}function Wde(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}const mC={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 Yde(t){let e={r:0,g:0,b:0},n=1,i=null,s=null,o=null,r=!1,a=!1;return typeof t=="string"&&(t=Xde(t)),typeof t=="object"&&(So(t.r)&&So(t.g)&&So(t.b)?(e=Nde(t.r,t.g,t.b),r=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):So(t.h)&&So(t.s)&&So(t.v)?(i=s_(t.s),s=s_(t.v),e=zde(t.h,i,s),r=!0,a="hsv"):So(t.h)&&So(t.s)&&So(t.l)?(i=s_(t.s),o=s_(t.l),e=Bde(t.h,i,o),r=!0,a="hsl"):So(t.c)&&So(t.m)&&So(t.y)&&So(t.k)&&(e=Ude(t.c,t.m,t.y,t.k),r=!0,a="cmyk"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=YR(n),{ok:r,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}const qde="[-\\+]?\\d+%?",Gde="[-\\+]?\\d*\\.\\d+%?",Cc="(?:"+Gde+")|(?:"+qde+")",Rw="[\\s|\\(]+("+Cc+")[,|\\s]+("+Cc+")[,|\\s]+("+Cc+")\\s*\\)?",i_="[\\s|\\(]+("+Cc+")[,|\\s]+("+Cc+")[,|\\s]+("+Cc+")[,|\\s]+("+Cc+")\\s*\\)?",Qo={CSS_UNIT:new RegExp(Cc),rgb:new RegExp("rgb"+Rw),rgba:new RegExp("rgba"+i_),hsl:new RegExp("hsl"+Rw),hsla:new RegExp("hsla"+i_),hsv:new RegExp("hsv"+Rw),hsva:new RegExp("hsva"+i_),cmyk:new RegExp("cmyk"+i_),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 Xde(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;let e=!1;if(mC[t])t=mC[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let n=Qo.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Qo.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Qo.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Qo.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Qo.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Qo.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Qo.cmyk.exec(t),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=Qo.hex8.exec(t),n?{r:Ao(n[1]),g:Ao(n[2]),b:Ao(n[3]),a:uA(n[4]),format:e?"name":"hex8"}:(n=Qo.hex6.exec(t),n?{r:Ao(n[1]),g:Ao(n[2]),b:Ao(n[3]),format:e?"name":"hex"}:(n=Qo.hex4.exec(t),n?{r:Ao(n[1]+n[1]),g:Ao(n[2]+n[2]),b:Ao(n[3]+n[3]),a:uA(n[4]+n[4]),format:e?"name":"hex8"}:(n=Qo.hex3.exec(t),n?{r:Ao(n[1]+n[1]),g:Ao(n[2]+n[2]),b:Ao(n[3]+n[3]),format:e?"name":"hex"}:!1))))))))))}function So(t){return typeof t=="number"?!Number.isNaN(t):Qo.CSS_UNIT.test(t)}class Qn{constructor(e="",n={}){if(e instanceof Qn)return e;typeof e=="number"&&(e=Wde(e)),this.originalInput=e;const i=Yde(e);this.originalInput=e,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=n.format??i.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=i.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3}getLuminance(){const e=this.toRgb();let n,i,s;const o=e.r/255,r=e.g/255,a=e.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),a<=.03928?s=a/12.92:s=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*i+.0722*s}getAlpha(){return this.a}setAlpha(e){return this.a=YR(e),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:e}=this.toHsl();return e===0}toHsv(){const e=aA(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}}toHsvString(){const e=aA(this.r,this.g,this.b),n=Math.round(e.h*360),i=Math.round(e.s*100),s=Math.round(e.v*100);return this.a===1?`hsv(${n}, ${i}%, ${s}%)`:`hsva(${n}, ${i}%, ${s}%, ${this.roundA})`}toHsl(){const e=rA(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}}toHslString(){const e=rA(this.r,this.g,this.b),n=Math.round(e.h*360),i=Math.round(e.s*100),s=Math.round(e.l*100);return this.a===1?`hsl(${n}, ${i}%, ${s}%)`:`hsla(${n}, ${i}%, ${s}%, ${this.roundA})`}toHex(e=!1){return lA(this.r,this.g,this.b,e)}toHexString(e=!1){return"#"+this.toHex(e)}toHex8(e=!1){return Hde(this.r,this.g,this.b,this.a,e)}toHex8String(e=!1){return"#"+this.toHex8(e)}toHexShortString(e=!1){return this.a===1?this.toHexString(e):this.toHex8String(e)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const e=Math.round(this.r),n=Math.round(this.g),i=Math.round(this.b);return this.a===1?`rgb(${e}, ${n}, ${i})`:`rgba(${e}, ${n}, ${i}, ${this.roundA})`}toPercentageRgb(){const e=n=>`${Math.round(fi(n,255)*100)}%`;return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}}toPercentageRgbString(){const e=n=>Math.round(fi(n,255)*100);return this.a===1?`rgb(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%)`:`rgba(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%, ${this.roundA})`}toCmyk(){return{...cA(this.r,this.g,this.b)}}toCmykString(){const{c:e,m:n,y:i,k:s}=cA(this.r,this.g,this.b);return`cmyk(${e}, ${n}, ${i}, ${s})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;const e="#"+lA(this.r,this.g,this.b,!1);for(const[n,i]of Object.entries(mC))if(e===i)return n;return!1}toString(e){const n=!!e;e=e??this.format;let i=!1;const s=this.a<1&&this.a>=0;return!n&&s&&(e.startsWith("hex")||e==="name")?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(i=this.toRgbString()),e==="prgb"&&(i=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(i=this.toHexString()),e==="hex3"&&(i=this.toHexString(!0)),e==="hex4"&&(i=this.toHex8String(!0)),e==="hex8"&&(i=this.toHex8String()),e==="name"&&(i=this.toName()),e==="hsl"&&(i=this.toHslString()),e==="hsv"&&(i=this.toHsvString()),e==="cmyk"&&(i=this.toCmykString()),i||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new Qn(this.toString())}lighten(e=10){const n=this.toHsl();return n.l+=e/100,n.l=n_(n.l),new Qn(n)}brighten(e=10){const n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),new Qn(n)}darken(e=10){const n=this.toHsl();return n.l-=e/100,n.l=n_(n.l),new Qn(n)}tint(e=10){return this.mix("white",e)}shade(e=10){return this.mix("black",e)}desaturate(e=10){const n=this.toHsl();return n.s-=e/100,n.s=n_(n.s),new Qn(n)}saturate(e=10){const n=this.toHsl();return n.s+=e/100,n.s=n_(n.s),new Qn(n)}greyscale(){return this.desaturate(100)}spin(e){const n=this.toHsl(),i=(n.h+e)%360;return n.h=i<0?360+i:i,new Qn(n)}mix(e,n=50){const i=this.toRgb(),s=new Qn(e).toRgb(),o=n/100,r={r:(s.r-i.r)*o+i.r,g:(s.g-i.g)*o+i.g,b:(s.b-i.b)*o+i.b,a:(s.a-i.a)*o+i.a};return new Qn(r)}analogous(e=6,n=30){const i=this.toHsl(),s=360/n,o=[this];for(i.h=(i.h-(s*e>>1)+720)%360;--e;)i.h=(i.h+s)%360,o.push(new Qn(i));return o}complement(){const e=this.toHsl();return e.h=(e.h+180)%360,new Qn(e)}monochromatic(e=6){const n=this.toHsv(),{h:i}=n,{s}=n;let{v:o}=n;const r=[],a=1/e;for(;e--;)r.push(new Qn({h:i,s,v:o})),o=(o+a)%1;return r}splitcomplement(){const e=this.toHsl(),{h:n}=e;return[this,new Qn({h:(n+72)%360,s:e.s,l:e.l}),new Qn({h:(n+216)%360,s:e.s,l:e.l})]}onBackground(e){const n=this.toRgb(),i=new Qn(e).toRgb(),s=n.a+i.a*(1-n.a);return new Qn({r:(n.r*n.a+i.r*i.a*(1-n.a))/s,g:(n.g*n.a+i.g*i.a*(1-n.a))/s,b:(n.b*n.a+i.b*i.a*(1-n.a))/s,a:s})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(e){const n=this.toHsl(),{h:i}=n,s=[this],o=360/e;for(let r=1;r<e;r++)s.push(new Qn({h:(i+r*o)%360,s:n.s,l:n.l}));return s}equals(e){const n=new Qn(e);return this.format==="cmyk"||n.format==="cmyk"?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}}function Hl(t,e=20){return t.mix("#141414",e).toString()}function Kde(t){const e=bs(),n=Be("button");return W(()=>{let i={},s=t.color;if(s){const o=s.match(/var\((.*?)\)/);o&&(s=window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1]));const r=new Qn(s),a=t.dark?r.tint(20).toString():Hl(r,20);if(t.plain)i=n.cssVarBlock({"bg-color":t.dark?Hl(r,90):r.tint(90).toString(),"text-color":s,"border-color":t.dark?Hl(r,50):r.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":s,"hover-border-color":s,"active-bg-color":a,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":a}),e.value&&(i[n.cssVarBlockName("disabled-bg-color")]=t.dark?Hl(r,90):r.tint(90).toString(),i[n.cssVarBlockName("disabled-text-color")]=t.dark?Hl(r,50):r.tint(50).toString(),i[n.cssVarBlockName("disabled-border-color")]=t.dark?Hl(r,80):r.tint(80).toString());else{const l=t.dark?Hl(r,30):r.tint(30).toString(),c=r.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(i=n.cssVarBlock({"bg-color":s,"text-color":c,"border-color":s,"hover-bg-color":l,"hover-text-color":c,"hover-border-color":l,"active-bg-color":a,"active-border-color":a}),e.value){const u=t.dark?Hl(r,50):r.tint(50).toString();i[n.cssVarBlockName("disabled-bg-color")]=u,i[n.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,i[n.cssVarBlockName("disabled-border-color")]=u}}}return i})}var Zde=fe({name:"ElButton",__name:"button",props:pC,emits:Tde,setup(t,{expose:e,emit:n}){const i=t,s=n,o=Kde(i),r=Be("button"),{_ref:a,_size:l,_type:c,_disabled:u,_props:d,_plain:h,_round:f,_text:p,_dashed:m,shouldAddSpace:b,handleClick:w}=Rde(i,s),k=W(()=>[r.b(),r.m(c.value),r.m(l.value),r.is("disabled",u.value),r.is("loading",i.loading),r.is("plain",h.value),r.is("round",f.value),r.is("circle",i.circle),r.is("text",p.value),r.is("dashed",m.value),r.is("link",i.link),r.is("has-bg",i.bg)]);return e({ref:a,size:l,type:c,disabled:u,shouldAddSpace:b}),(C,A)=>(v(),D(Ct(t.tag),Yt({ref_key:"_ref",ref:a},E(d),{class:k.value,style:E(o),onClick:E(w)}),{default:y(()=>[t.loading?(v(),$(J,{key:0},[C.$slots.loading?le(C.$slots,"loading",{key:0}):(v(),D(E(we),{key:1,class:q(E(r).is("loading"))},{default:y(()=>[(v(),D(Ct(t.loadingIcon)))]),_:1},8,["class"]))],64)):t.icon||C.$slots.icon?(v(),D(E(we),{key:1},{default:y(()=>[t.icon?(v(),D(Ct(t.icon),{key:0})):le(C.$slots,"icon",{key:1})]),_:3})):O("v-if",!0),C.$slots.default?(v(),$("span",{key:2,class:q({[E(r).em("text","expand")]:E(b)})},[le(C.$slots,"default")],2)):O("v-if",!0)]),_:3},16,["class","style","onClick"]))}}),Jde=Zde;const Qde={size:pC.size,type:pC.type,direction:{type:de(String),values:["horizontal","vertical"],default:"horizontal"}};var ehe=fe({name:"ElButtonGroup",__name:"button-group",props:Qde,setup(t){const e=t;Pt(WR,In({size:Sn(e,"size"),type:Sn(e,"type")}));const n=Be("button");return(i,s)=>(v(),$("div",{class:q([E(n).b("group"),E(n).bm("group",e.direction)])},[le(i.$slots,"default")],2))}}),qR=ehe;const ze=Gt(Jde,{ButtonGroup:qR});Os(qR);const dA=["hours","minutes","seconds"],Oa="EP_PICKER_BASE",GR="ElPopperOptions",XR=Symbol("commonPickerContextKey"),n1="HH:mm:ss",mc="YYYY-MM-DD",the={date:mc,dates:mc,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${mc} ${n1}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:mc,datetimerange:`${mc} ${n1}`};var xs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var KR={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(xs,function(){var n=1e3,i=6e4,s=36e5,o="millisecond",r="second",a="minute",l="hour",c="day",u="week",d="month",h="quarter",f="year",p="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var U=["th","st","nd","rd"],Y=F%100;return"["+F+(U[(Y-20)%10]||U[Y]||U[0])+"]"}},C=function(F,U,Y){var z=String(F);return!z||z.length>=U?F:""+Array(U+1-z.length).join(Y)+F},A={s:C,z:function(F){var U=-F.utcOffset(),Y=Math.abs(U),z=Math.floor(Y/60),X=Y%60;return(U<=0?"+":"-")+C(z,2,"0")+":"+C(X,2,"0")},m:function F(U,Y){if(U.date()<Y.date())return-F(Y,U);var z=12*(Y.year()-U.year())+(Y.month()-U.month()),X=U.clone().add(z,d),Z=Y-X<0,G=U.clone().add(z+(Z?-1:1),d);return+(-(z+(Y-X)/(Z?X-G:G-X))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:d,y:f,w:u,d:c,D:p,h:l,m:a,s:r,ms:o,Q:h}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},S="en",M={};M[S]=k;var P="$isDayjsObject",T=function(F){return F instanceof V||!(!F||!F[P])},I=function F(U,Y,z){var X;if(!U)return S;if(typeof U=="string"){var Z=U.toLowerCase();M[Z]&&(X=Z),Y&&(M[Z]=Y,X=Z);var G=U.split("-");if(!X&&G.length>1)return F(G[0])}else{var Q=U.name;M[Q]=U,X=Q}return!z&&X&&(S=X),X||!z&&S},L=function(F,U){if(T(F))return F.clone();var Y=typeof U=="object"?U:{};return Y.date=F,Y.args=arguments,new V(Y)},R=A;R.l=I,R.i=T,R.w=function(F,U){return L(F,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var V=function(){function F(Y){this.$L=I(Y.locale,null,!0),this.parse(Y),this.$x=this.$x||Y.x||{},this[P]=!0}var U=F.prototype;return U.parse=function(Y){this.$d=function(z){var X=z.date,Z=z.utc;if(X===null)return new Date(NaN);if(R.u(X))return new Date;if(X instanceof Date)return new Date(X);if(typeof X=="string"&&!/Z$/i.test(X)){var G=X.match(b);if(G){var Q=G[2]-1||0,ne=(G[7]||"0").substring(0,3);return Z?new Date(Date.UTC(G[1],Q,G[3]||1,G[4]||0,G[5]||0,G[6]||0,ne)):new Date(G[1],Q,G[3]||1,G[4]||0,G[5]||0,G[6]||0,ne)}}return new Date(X)}(Y),this.init()},U.init=function(){var Y=this.$d;this.$y=Y.getFullYear(),this.$M=Y.getMonth(),this.$D=Y.getDate(),this.$W=Y.getDay(),this.$H=Y.getHours(),this.$m=Y.getMinutes(),this.$s=Y.getSeconds(),this.$ms=Y.getMilliseconds()},U.$utils=function(){return R},U.isValid=function(){return this.$d.toString()!==m},U.isSame=function(Y,z){var X=L(Y);return this.startOf(z)<=X&&X<=this.endOf(z)},U.isAfter=function(Y,z){return L(Y)<this.startOf(z)},U.isBefore=function(Y,z){return this.endOf(z)<L(Y)},U.$g=function(Y,z,X){return R.u(Y)?this[z]:this.set(X,Y)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(Y,z){var X=this,Z=!!R.u(z)||z,G=R.p(Y),Q=function(ie,re){var ke=R.w(X.$u?Date.UTC(X.$y,re,ie):new Date(X.$y,re,ie),X);return Z?ke:ke.endOf(c)},ne=function(ie,re){return R.w(X.toDate()[ie].apply(X.toDate("s"),(Z?[0,0,0,0]:[23,59,59,999]).slice(re)),X)},K=this.$W,ae=this.$M,ge=this.$D,Ce="set"+(this.$u?"UTC":"");switch(G){case f:return Z?Q(1,0):Q(31,11);case d:return Z?Q(1,ae):Q(0,ae+1);case u:var oe=this.$locale().weekStart||0,pe=(K<oe?K+7:K)-oe;return Q(Z?ge-pe:ge+(6-pe),ae);case c:case p:return ne(Ce+"Hours",0);case l:return ne(Ce+"Minutes",1);case a:return ne(Ce+"Seconds",2);case r:return ne(Ce+"Milliseconds",3);default:return this.clone()}},U.endOf=function(Y){return this.startOf(Y,!1)},U.$set=function(Y,z){var X,Z=R.p(Y),G="set"+(this.$u?"UTC":""),Q=(X={},X[c]=G+"Date",X[p]=G+"Date",X[d]=G+"Month",X[f]=G+"FullYear",X[l]=G+"Hours",X[a]=G+"Minutes",X[r]=G+"Seconds",X[o]=G+"Milliseconds",X)[Z],ne=Z===c?this.$D+(z-this.$W):z;if(Z===d||Z===f){var K=this.clone().set(p,1);K.$d[Q](ne),K.init(),this.$d=K.set(p,Math.min(this.$D,K.daysInMonth())).$d}else Q&&this.$d[Q](ne);return this.init(),this},U.set=function(Y,z){return this.clone().$set(Y,z)},U.get=function(Y){return this[R.p(Y)]()},U.add=function(Y,z){var X,Z=this;Y=Number(Y);var G=R.p(z),Q=function(ae){var ge=L(Z);return R.w(ge.date(ge.date()+Math.round(ae*Y)),Z)};if(G===d)return this.set(d,this.$M+Y);if(G===f)return this.set(f,this.$y+Y);if(G===c)return Q(1);if(G===u)return Q(7);var ne=(X={},X[a]=i,X[l]=s,X[r]=n,X)[G]||1,K=this.$d.getTime()+Y*ne;return R.w(K,this)},U.subtract=function(Y,z){return this.add(-1*Y,z)},U.format=function(Y){var z=this,X=this.$locale();if(!this.isValid())return X.invalidDate||m;var Z=Y||"YYYY-MM-DDTHH:mm:ssZ",G=R.z(this),Q=this.$H,ne=this.$m,K=this.$M,ae=X.weekdays,ge=X.months,Ce=X.meridiem,oe=function(re,ke,je,te){return re&&(re[ke]||re(z,Z))||je[ke].slice(0,te)},pe=function(re){return R.s(Q%12||12,re,"0")},ie=Ce||function(re,ke,je){var te=re<12?"AM":"PM";return je?te.toLowerCase():te};return Z.replace(w,function(re,ke){return ke||function(je){switch(je){case"YY":return String(z.$y).slice(-2);case"YYYY":return R.s(z.$y,4,"0");case"M":return K+1;case"MM":return R.s(K+1,2,"0");case"MMM":return oe(X.monthsShort,K,ge,3);case"MMMM":return oe(ge,K);case"D":return z.$D;case"DD":return R.s(z.$D,2,"0");case"d":return String(z.$W);case"dd":return oe(X.weekdaysMin,z.$W,ae,2);case"ddd":return oe(X.weekdaysShort,z.$W,ae,3);case"dddd":return ae[z.$W];case"H":return String(Q);case"HH":return R.s(Q,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return ie(Q,ne,!0);case"A":return ie(Q,ne,!1);case"m":return String(ne);case"mm":return R.s(ne,2,"0");case"s":return String(z.$s);case"ss":return R.s(z.$s,2,"0");case"SSS":return R.s(z.$ms,3,"0");case"Z":return G}return null}(re)||G.replace(":","")})},U.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},U.diff=function(Y,z,X){var Z,G=this,Q=R.p(z),ne=L(Y),K=(ne.utcOffset()-this.utcOffset())*i,ae=this-ne,ge=function(){return R.m(G,ne)};switch(Q){case f:Z=ge()/12;break;case d:Z=ge();break;case h:Z=ge()/3;break;case u:Z=(ae-K)/6048e5;break;case c:Z=(ae-K)/864e5;break;case l:Z=ae/s;break;case a:Z=ae/i;break;case r:Z=ae/n;break;default:Z=ae}return X?Z:R.a(Z)},U.daysInMonth=function(){return this.endOf(d).$D},U.$locale=function(){return M[this.$L]},U.locale=function(Y,z){if(!Y)return this.$L;var X=this.clone(),Z=I(Y,z,!0);return Z&&(X.$L=Z),X},U.clone=function(){return R.w(this.$d,this)},U.toDate=function(){return new Date(this.valueOf())},U.toJSON=function(){return this.isValid()?this.toISOString():null},U.toISOString=function(){return this.$d.toISOString()},U.toString=function(){return this.$d.toUTCString()},F}(),H=V.prototype;return L.prototype=H,[["$ms",o],["$s",r],["$m",a],["$H",l],["$W",c],["$M",d],["$y",f],["$D",p]].forEach(function(F){H[F[1]]=function(U){return this.$g(U,F[0],F[1])}}),L.extend=function(F,U){return F.$i||(F(U,V,L),F.$i=!0),L},L.locale=I,L.isDayjs=T,L.unix=function(F){return L(1e3*F)},L.en=M[S],L.Ls=M,L.p={},L})})(KR);var nhe=KR.exports;const ft=_i(nhe),Vw=(t,e)=>[t>0?t-1:void 0,t,t<e?t+1:void 0],ZR=t=>Array.from(Array.from({length:t}).keys()),JR=t=>t.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),QR=t=>t.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),hA=function(t,e){const n=Yy(t),i=Yy(e);return n&&i?t.getTime()===e.getTime():!n&&!i?t===e:!1},eV=function(t,e){const n=Ee(t),i=Ee(e);return n&&i?t.length!==e.length?!1:t.every((s,o)=>hA(s,e[o])):!n&&!i?hA(t,e):!1},fA=function(t,e,n){const i=T4(e)||e==="x"?ft(t).locale(n):ft(t,e).locale(n);return i.isValid()?i:void 0},pA=function(t,e,n){return T4(e)?t:e==="x"?+t:ft(t).locale(n).format(e)},Fw=(t,e)=>{const n=[],i=e==null?void 0:e();for(let s=0;s<t;s++)n.push((i==null?void 0:i.includes(s))??!1);return n},F_=t=>Ee(t)?t.map(e=>e.toDate()):t.toDate(),f8=Ge({disabledHours:{type:de(Function)},disabledMinutes:{type:de(Function)},disabledSeconds:{type:de(Function)}}),she=Ge({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),tV=Ge({automaticDropdown:{type:Boolean,default:!0},id:{type:de([Array,String])},name:{type:de([Array,String])},popperClass:zn.popperClass,popperStyle:zn.popperStyle,format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:de([String,Object]),default:Zc},editable:{type:Boolean,default:!0},saveOnBlur:{type:Boolean,default:!0},prefixIcon:{type:de([String,Object]),default:""},size:Zi,readonly:Boolean,disabled:{type:Boolean,default:void 0},placeholder:{type:String,default:""},popperOptions:{type:de(Object),default:()=>({})},modelValue:{type:de([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:de([Date,Array])},defaultTime:{type:de([Date,Array])},isRange:Boolean,...f8,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:de([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:de(String),values:hp,default:"bottom"},fallbackPlacements:{type:de(Array),default:["bottom","top","right","left"]},...H1,...Sr(["ariaLabel"]),showNow:{type:Boolean,default:!0},showConfirm:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},showWeekNumber:Boolean}),ihe=Ge({id:{type:de(Array)},name:{type:de(Array)},modelValue:{type:de([Array,String])},startPlaceholder:String,endPlaceholder:String,disabled:Boolean}),nV=(t,e)=>{const{lang:n}=en(),i=ee(!1),s=ee(!1),o=ee(null),r=W(()=>{const{modelValue:p}=t;return!p||Ee(p)&&!p.filter(Boolean).length}),a=p=>{if(!eV(t.modelValue,p)){let m;Ee(p)?m=p.map(b=>pA(b,t.valueFormat,n.value)):p&&(m=pA(p,t.valueFormat,n.value)),e(Mt,p&&m,n.value)}},l=W(()=>{let p;if(r.value?c.value.getDefaultValue&&(p=c.value.getDefaultValue()):Ee(t.modelValue)?p=t.modelValue.map(m=>fA(m,t.valueFormat,n.value)):p=fA(t.modelValue??"",t.valueFormat,n.value),c.value.getRangeAvailableTime){const m=c.value.getRangeAvailableTime(p);Wi(m,p)||(p=m,r.value||a(F_(p)))}return Ee(p)&&p.some(m=>!m)&&(p=[]),p}),c=ee({});return{parsedValue:l,pickerActualVisible:s,pickerOptions:c,pickerVisible:i,userInput:o,valueIsEmpty:r,emitInput:a,onCalendarChange:p=>{e("calendar-change",p)},onPanelChange:(p,m,b)=>{e("panel-change",p,m,b)},onPick:(p="",m=!1)=>{i.value=m;let b;Ee(p)?b=p.map(w=>w.toDate()):b=p&&p.toDate(),o.value=null,a(b)},onSetPickerOption:p=>{c.value[p[0]]=p[1],c.value.panelReady=!0}}},ohe=["id","name","placeholder","value","disabled"],rhe=["id","name","placeholder","value","disabled"];var ahe=fe({name:"PickerRangeTrigger",inheritAttrs:!1,__name:"picker-range-trigger",props:ihe,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(t,{expose:e,emit:n}){const i=t,s=n,{formItem:o}=_o(),{inputId:r}=Tl(In({id:W(()=>{var T;return(T=i.id)==null?void 0:T[0]})}),{formItemContext:o}),a=Gb(),l=Be("date"),c=Be("range"),u=ee(),d=ee(),{wrapperRef:h,isFocused:f}=pp(u,{disabled:W(()=>i.disabled)}),p=T=>{s("click",T)},m=T=>{s("mouseenter",T)},b=T=>{s("mouseleave",T)},w=T=>{s("touchstart",T)},k=T=>{s("startInput",T)},C=T=>{s("endInput",T)},A=T=>{s("startChange",T)},S=T=>{s("endChange",T)};return e({focus:()=>{var T;(T=u.value)==null||T.focus()},blur:()=>{var T,I;(T=u.value)==null||T.blur(),(I=d.value)==null||I.blur()}}),(T,I)=>(v(),$("div",{ref_key:"wrapperRef",ref:h,class:q([E(l).is("active",E(f)),T.$attrs.class]),style:Xe(T.$attrs.style),onClick:p,onMouseenter:m,onMouseleave:b,onTouchstartPassive:w},[le(T.$slots,"prefix"),g("input",Yt(E(a),{id:E(r),ref_key:"inputRef",ref:u,name:T.name&&T.name[0],placeholder:T.startPlaceholder,value:T.modelValue&&T.modelValue[0],class:E(c).b("input"),disabled:T.disabled,onInput:k,onChange:A}),null,16,ohe),le(T.$slots,"range-separator"),g("input",Yt(E(a),{id:T.id&&T.id[1],ref_key:"endInputRef",ref:d,name:T.name&&T.name[1],placeholder:T.endPlaceholder,value:T.modelValue&&T.modelValue[1],class:E(c).b("input"),disabled:T.disabled,onInput:C,onChange:S}),null,16,rhe),le(T.$slots,"suffix")],38))}}),lhe=ahe,che=fe({name:"Picker",__name:"picker",props:tV,emits:[Mt,dn,"focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(t,{expose:e,emit:n}){const i=t,s=n,o=Rd(),r=Be("date"),a=Be("input"),l=Be("range"),{formItem:c}=_o(),u=qe(GR,{}),d=K4(i,null),h=ee(),f=ee(),p=ee(null);let m=!1;const b=bs(),w=nV(i,s),{parsedValue:k,pickerActualVisible:C,userInput:A,pickerVisible:S,pickerOptions:M,valueIsEmpty:P,emitInput:T,onPick:I,onSetPickerOption:L,onCalendarChange:R,onPanelChange:V}=w,{isFocused:H,handleFocus:F,handleBlur:U}=pp(f,{disabled:b,beforeFocus(){return i.readonly},afterFocus(){i.automaticDropdown&&(S.value=!0)},beforeBlur(ue){var De;return!m&&((De=h.value)==null?void 0:De.isFocusInsideContent(ue))},afterBlur(){var ue,De;re.value&&!i.saveOnBlur?P.value||(De=(ue=M.value).handleCancel)==null||De.call(ue):it(),S.value=!1,m=!1,i.validateEvent&&(c==null||c.validate("blur").catch(gt=>Tt(gt)))}}),Y=ee(!1),z=W(()=>[r.b("editor"),r.bm("editor",i.type),a.e("wrapper"),r.is("disabled",b.value),r.is("active",S.value),l.b("editor"),Ae?l.bm("editor",Ae.value):"",o.class]),X=W(()=>[a.e("icon"),l.e("close-icon"),me.value?"":l.em("close-icon","hidden")]);Te(S,ue=>{ue?ot(()=>{ue&&(p.value=i.modelValue)}):(A.value=null,ot(()=>{Z(i.modelValue)}))});const Z=(ue,De)=>{(De||!eV(ue,p.value))&&(s(dn,ue),De&&(p.value=ue),i.validateEvent&&(c==null||c.validate("change").catch(gt=>Tt(gt))))},G=ue=>{s("keydown",ue)},Q=W(()=>f.value?Array.from(f.value.$el.querySelectorAll("input")):[]),ne=(ue,De,gt)=>{const bn=Q.value;bn.length&&(!gt||gt==="min"?(bn[0].setSelectionRange(ue,De),bn[0].focus()):gt==="max"&&(bn[1].setSelectionRange(ue,De),bn[1].focus()))},K=()=>{C.value=!0},ae=()=>{s("visible-change",!0)},ge=()=>{C.value=!1,S.value=!1,s("visible-change",!1)},Ce=()=>{S.value=!0},oe=()=>{S.value=!1},pe=W(()=>{const ue=ve(k.value);return Ee(A.value)?[A.value[0]||ue&&ue[0]||"",A.value[1]||ue&&ue[1]||""]:A.value!==null?A.value:re.value&&P.value&&!i.saveOnBlur||!re.value&&P.value||!S.value&&P.value?"":ue?ke.value||je.value||te.value?ue.join(", "):ue:""}),ie=W(()=>i.type.includes("time")),re=W(()=>i.type.startsWith("time")),ke=W(()=>i.type==="dates"),je=W(()=>i.type==="months"),te=W(()=>i.type==="years"),se=W(()=>i.prefixIcon||(ie.value?pR:kae)),me=W(()=>i.clearable&&!b.value&&!i.readonly&&!P.value&&(Y.value||H.value)),$e=ue=>{i.readonly||b.value||(me.value&&(ue==null||ue.stopPropagation(),M.value.handleClear?M.value.handleClear():T(d.valueOnClear.value),Z(d.valueOnClear.value,!0),ge()),s("clear"))},Se=async ue=>{var De;i.readonly||b.value||(((De=ue.target)==null?void 0:De.tagName)!=="INPUT"||H.value||!i.automaticDropdown)&&(S.value=!0)},Le=()=>{i.readonly||b.value||!P.value&&i.clearable&&(Y.value=!0)},We=()=>{Y.value=!1},Fe=ue=>{var De;i.readonly||b.value||(((De=ue.touches[0].target)==null?void 0:De.tagName)!=="INPUT"||H.value||!i.automaticDropdown)&&(S.value=!0)},He=W(()=>i.type.includes("range")),Ae=Ii(),Ze=W(()=>{var ue,De;return(De=(ue=E(h))==null?void 0:ue.popperRef)==null?void 0:De.contentRef}),Ye=SD(f,ue=>{const De=E(Ze),gt=Ws(f);De&&(ue.target===De||ue.composedPath().includes(De))||ue.target===gt||gt&&ue.composedPath().includes(gt)||(S.value=!1)});wn(()=>{Ye==null||Ye()});const it=()=>{if(!(re.value&&!i.saveOnBlur)){if(A.value){const ue=be(pe.value);ue&&(Pe(ue)&&T(F_(ue)),A.value=null)}A.value===""&&(T(d.valueOnClear.value),Z(d.valueOnClear.value,!0),A.value=null)}},be=ue=>ue?M.value.parseUserInput(ue):null,ve=ue=>ue?Ee(ue)?ue.map(De=>De.format(i.format)):ue.format(i.format):null,Pe=ue=>M.value.isValidValue(ue),Ie=async ue=>{if(i.readonly||b.value)return;const De=ls(ue);if(G(ue),De===Ue.esc){S.value===!0&&(S.value=!1,ue.preventDefault(),ue.stopPropagation());return}if(De===Ue.down&&(M.value.handleFocusPicker&&(ue.preventDefault(),ue.stopPropagation()),S.value===!1&&(S.value=!0,await ot()),M.value.handleFocusPicker)){M.value.handleFocusPicker();return}if(De===Ue.tab){m=!0;return}if(De===Ue.enter||De===Ue.numpadEnter){S.value?(A.value===null||A.value===""||Pe(be(pe.value)))&&(it(),S.value=!1):S.value=!0,ue.preventDefault(),ue.stopPropagation();return}if(A.value){ue.stopPropagation();return}M.value.handleKeydownInput&&M.value.handleKeydownInput(ue)},_t=ue=>{A.value=ue,S.value||(S.value=!0)},Lt=ue=>{const De=ue.target;A.value?A.value=[De.value,A.value[1]]:A.value=[De.value,null]},Je=ue=>{const De=ue.target;A.value?A.value=[A.value[0],De.value]:A.value=[null,De.value]},dt=()=>{var bn;const ue=A.value,De=be(ue&&ue[0]),gt=E(k);if(De&&De.isValid()){A.value=[ve(De),((bn=pe.value)==null?void 0:bn[1])||null];const gs=[De,gt&&(gt[1]||null)];Pe(gs)&&(T(F_(gs)),A.value=null)}},mt=()=>{var bn;const ue=E(A),De=be(ue&&ue[1]),gt=E(k);if(De&&De.isValid()){A.value=[((bn=E(pe))==null?void 0:bn[0])||null,ve(De)];const gs=[gt&&gt[0],De];Pe(gs)&&(T(F_(gs)),A.value=null)}},_e=()=>{var ue;(ue=f.value)==null||ue.focus()},Oe=()=>{var ue;(ue=f.value)==null||ue.blur()};return Pt(Oa,{props:i,emptyValues:d}),Pt(XR,w),e({focus:_e,blur:Oe,handleOpen:Ce,handleClose:oe,onPick:I}),(ue,De)=>(v(),D(E(Ss),Yt({ref_key:"refPopper",ref:h,visible:E(S),effect:"light",pure:"",trigger:"click"},ue.$attrs,{role:"dialog",teleported:"",transition:`${E(r).namespace.value}-zoom-in-top`,"popper-class":[`${E(r).namespace.value}-picker__popper`,ue.popperClass],"popper-style":ue.popperStyle,"popper-options":E(u),"fallback-placements":ue.fallbackPlacements,"gpu-acceleration":!1,placement:ue.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:K,onShow:ae,onHide:ge}),{default:y(()=>[He.value?(v(),D(lhe,{key:1,id:ue.id,ref_key:"inputRef",ref:f,"model-value":pe.value,name:ue.name,disabled:E(b),readonly:!ue.editable||ue.readonly,"start-placeholder":ue.startPlaceholder,"end-placeholder":ue.endPlaceholder,class:q(z.value),style:Xe(ue.$attrs.style),"aria-label":ue.ariaLabel,tabindex:ue.tabindex,autocomplete:"off",role:"combobox",onClick:Se,onFocus:E(F),onBlur:E(U),onStartInput:Lt,onStartChange:dt,onEndInput:Je,onEndChange:mt,onMousedown:Se,onMouseenter:Le,onMouseleave:We,onTouchstartPassive:Fe,onKeydown:Ie},{prefix:y(()=>[se.value?(v(),D(E(we),{key:0,class:q([E(a).e("icon"),E(l).e("icon")])},{default:y(()=>[(v(),D(Ct(se.value)))]),_:1},8,["class"])):O("v-if",!0)]),"range-separator":y(()=>[le(ue.$slots,"range-separator",{},()=>[g("span",{class:q(E(l).b("separator"))},x(ue.rangeSeparator),3)])]),suffix:y(()=>[ue.clearIcon?(v(),D(E(we),{key:0,class:q(X.value),onMousedown:Me(E(Dt),["prevent"]),onClick:$e},{default:y(()=>[(v(),D(Ct(ue.clearIcon)))]),_:1},8,["class","onMousedown"])):O("v-if",!0)]),_:3},8,["id","model-value","name","disabled","readonly","start-placeholder","end-placeholder","class","style","aria-label","tabindex","onFocus","onBlur"])):(v(),D(E(ht),{key:0,id:ue.id,ref_key:"inputRef",ref:f,"container-role":"combobox","model-value":pe.value,name:ue.name,size:E(Ae),disabled:E(b),placeholder:ue.placeholder,class:q([E(r).b("editor"),E(r).bm("editor",ue.type),E(r).is("focus",E(S)),ue.$attrs.class]),style:Xe(ue.$attrs.style),readonly:!ue.editable||ue.readonly||ke.value||je.value||te.value||ue.type==="week","aria-label":ue.ariaLabel,tabindex:ue.tabindex,"validate-event":!1,onInput:_t,onFocus:E(F),onBlur:E(U),onKeydown:Ie,onChange:it,onMousedown:Se,onMouseenter:Le,onMouseleave:We,onTouchstartPassive:Fe,onClick:De[0]||(De[0]=Me(()=>{},["stop"]))},{prefix:y(()=>[se.value?(v(),D(E(we),{key:0,class:q(E(a).e("icon")),onMousedown:Me(Se,["prevent"]),onTouchstartPassive:Fe},{default:y(()=>[(v(),D(Ct(se.value)))]),_:1},8,["class"])):O("v-if",!0)]),suffix:y(()=>[me.value&&ue.clearIcon?(v(),D(E(we),{key:0,class:q(`${E(a).e("icon")} clear-icon`),onMousedown:Me(E(Dt),["prevent"]),onClick:$e},{default:y(()=>[(v(),D(Ct(ue.clearIcon)))]),_:1},8,["class","onMousedown"])):O("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onFocus","onBlur"]))]),content:y(()=>[le(ue.$slots,"default",{visible:E(S),actualVisible:E(C),parsedValue:E(k),format:ue.format,dateFormat:ue.dateFormat,timeFormat:ue.timeFormat,unlinkPanels:ue.unlinkPanels,type:ue.type,defaultValue:ue.defaultValue,showNow:ue.showNow,showConfirm:ue.showConfirm,showFooter:ue.showFooter,showWeekNumber:ue.showWeekNumber,onPick:De[1]||(De[1]=(...gt)=>E(I)&&E(I)(...gt)),onSelectRange:ne,onSetPickerOption:De[2]||(De[2]=(...gt)=>E(L)&&E(L)(...gt)),onCalendarChange:De[3]||(De[3]=(...gt)=>E(R)&&E(R)(...gt)),onClear:$e,onPanelChange:De[4]||(De[4]=(...gt)=>E(V)&&E(V)(...gt)),onMousedown:De[5]||(De[5]=Me(()=>{},["stop"]))})]),_:3},16,["visible","transition","popper-class","popper-style","popper-options","fallback-placements","placement"]))}}),uhe=che;const ql=new Map;if(Jt){let t;document.addEventListener("mousedown",e=>t=e),document.addEventListener("mouseup",e=>{if(t){for(const n of ql.values())for(const{documentHandler:i}of n)i(e,t);t=void 0}})}function mA(t,e){let n=[];return Ee(e.arg)?n=e.arg:Lo(e.arg)&&n.push(e.arg),function(i,s){const o=e.instance.popperRef,r=i.target,a=s==null?void 0:s.target,l=!e||!e.instance,c=!r||!a,u=t.contains(r)||t.contains(a),d=t===r,h=n.length&&n.some(p=>p==null?void 0:p.contains(r))||n.length&&n.includes(a),f=o&&(o.contains(r)||o.contains(a));l||c||u||d||h||f||e.value(i,s)}}const s1={beforeMount(t,e){ql.has(t)||ql.set(t,[]),ql.get(t).push({documentHandler:mA(t,e),bindingFn:e.value})},updated(t,e){ql.has(t)||ql.set(t,[]);const n=ql.get(t),i=n.findIndex(o=>o.bindingFn===e.oldValue),s={documentHandler:mA(t,e),bindingFn:e.value};i>=0?n.splice(i,1,s):n.push(s)},unmounted(t){ql.delete(t)}},dhe=100,hhe=600,o_="_RepeatClick",S0={beforeMount(t,e){const n=e.value,{interval:i=dhe,delay:s=hhe}=et(n)?{}:n;let o,r;const a=()=>et(n)?n():n.handler(),l=()=>{r&&(clearTimeout(r),r=void 0),o&&(clearInterval(o),o=void 0)},c=u=>{u.button===0&&(l(),a(),document.addEventListener("mouseup",l,{once:!0}),r=setTimeout(()=>{o=setInterval(()=>{a()},i)},s))};t[o_]={start:c,clear:l},t.addEventListener("mousedown",c)},unmounted(t){if(!t[o_])return;const{start:e,clear:n}=t[o_];e&&t.removeEventListener("mousedown",e),n&&(n(),document.removeEventListener("mouseup",n)),t[o_]=null}},gC="_trap-focus-children",Bu=[],gA=t=>{if(Bu.length===0)return;const e=ls(t),n=Bu[Bu.length-1][gC];if(n.length>0&&e===Ue.tab){if(n.length===1){t.preventDefault(),document.activeElement!==n[0]&&n[0].focus();return}const i=t.shiftKey,s=t.target===n[0],o=t.target===n[n.length-1];s&&i&&(t.preventDefault(),n[n.length-1].focus()),o&&!i&&(t.preventDefault(),n[0].focus())}},fhe={beforeMount(t){t[gC]=w$(t),Bu.push(t),Bu.length<=1&&document.addEventListener("keydown",gA)},updated(t){ot(()=>{t[gC]=w$(t)})},unmounted(){Bu.shift(),Bu.length===0&&document.removeEventListener("keydown",gA)}};var vA=!1,Lu,vC,_C,N_,B_,sV,z_,yC,bC,wC,iV,kC,CC,oV,rV;function eo(){if(!vA){vA=!0;var t=navigator.userAgent,e=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(t),n=/(Mac OS X)|(Windows)|(Linux)/.exec(t);if(kC=/\b(iPhone|iP[ao]d)/.exec(t),CC=/\b(iP[ao]d)/.exec(t),wC=/Android/i.exec(t),oV=/FBAN\/\w+;/i.exec(t),rV=/Mobile/i.exec(t),iV=!!/Win64/.exec(t),e){Lu=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,Lu&&document&&document.documentMode&&(Lu=document.documentMode);var i=/(?:Trident\/(\d+.\d+))/.exec(t);sV=i?parseFloat(i[1])+4:Lu,vC=e[2]?parseFloat(e[2]):NaN,_C=e[3]?parseFloat(e[3]):NaN,N_=e[4]?parseFloat(e[4]):NaN,N_?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),B_=e&&e[1]?parseFloat(e[1]):NaN):B_=NaN}else Lu=vC=_C=B_=N_=NaN;if(n){if(n[1]){var s=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);z_=s?parseFloat(s[1].replace("_",".")):!0}else z_=!1;yC=!!n[2],bC=!!n[3]}else z_=yC=bC=!1}}var xC={ie:function(){return eo()||Lu},ieCompatibilityMode:function(){return eo()||sV>Lu},ie64:function(){return xC.ie()&&iV},firefox:function(){return eo()||vC},opera:function(){return eo()||_C},webkit:function(){return eo()||N_},safari:function(){return xC.webkit()},chrome:function(){return eo()||B_},windows:function(){return eo()||yC},osx:function(){return eo()||z_},linux:function(){return eo()||bC},iphone:function(){return eo()||kC},mobile:function(){return eo()||kC||CC||wC||rV},nativeApp:function(){return eo()||oV},android:function(){return eo()||wC},ipad:function(){return eo()||CC}},phe=xC,r_=!!(typeof window<"u"&&window.document&&window.document.createElement),mhe={canUseDOM:r_,canUseWorkers:typeof Worker<"u",canUseEventListeners:r_&&!!(window.addEventListener||window.attachEvent),canUseViewport:r_&&!!window.screen,isInWorker:!r_},aV=mhe,lV;aV.canUseDOM&&(lV=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function ghe(t,e){if(!aV.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,i=n in document;if(!i){var s=document.createElement("div");s.setAttribute(n,"return;"),i=typeof s[n]=="function"}return!i&&lV&&t==="wheel"&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var vhe=ghe,_A=10,yA=40,bA=800;function cV(t){var e=0,n=0,i=0,s=0;return"detail"in t&&(n=t.detail),"wheelDelta"in t&&(n=-t.wheelDelta/120),"wheelDeltaY"in t&&(n=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=n,n=0),i=e*_A,s=n*_A,"deltaY"in t&&(s=t.deltaY),"deltaX"in t&&(i=t.deltaX),(i||s)&&t.deltaMode&&(t.deltaMode==1?(i*=yA,s*=yA):(i*=bA,s*=bA)),i&&!e&&(e=i<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:e,spinY:n,pixelX:i,pixelY:s}}cV.getEventType=function(){return phe.firefox()?"DOMMouseScroll":vhe("wheel")?"wheel":"mousewheel"};var _he=cV;/**
59 60 * Checks if an event is supported in the current execution environment.
60 61 *
61 62 * NOTE: This will not work correctly for non-generic events such as `change`,
62 63 * `reset`, `load`, `error`, and `select`.
@@ -67,112 +68,970 @@
67 68 * @param {?boolean} capture Check if the capture phase is supported.
68 69 * @return {boolean} True if the event is supported.
69 70 * @internal
70 71 * @license Modernizr 3.0.0pre (Custom Build) | MIT
71 -*/const eoe=function(e,t){if(e&&e.addEventListener){const n=function(o){const r=Qne(o);t&&Reflect.apply(t,this,[o,r])};e.addEventListener("wheel",n,{passive:!0})}},toe={beforeMount(e,t){eoe(e,t.value)}},noe=We({role:{type:String,required:!0},spinnerDate:{type:Ce(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:Ce(String),default:""},...fT}),ooe=["onClick"],roe=["onMouseenter"],soe=Q({__name:"basic-time-spinner",props:noe,emits:["change","select-range","set-option"],setup(e,{emit:t}){const n=e,o=Re("time"),{getHoursList:r,getMinutesList:s,getSecondsList:i}=hT(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let l=!1;const a=K(),u=K(),c=K(),d=K(),f={hours:u,minutes:c,seconds:d},p=R(()=>n.showSeconds?X5:X5.slice(0,2)),h=R(()=>{const{spinnerDate:L}=n,I=L.hour(),X=L.minute(),oe=L.second();return{hours:I,minutes:X,seconds:oe}}),m=R(()=>{const{hours:L,minutes:I}=g(h);return{hours:r(n.role),minutes:s(L,n.role),seconds:i(L,I,n.role)}}),y=R(()=>{const{hours:L,minutes:I,seconds:X}=g(h);return{hours:ry(L,23),minutes:ry(I,59),seconds:ry(X,59)}}),v=zl(L=>{l=!1,S(L)},200),w=L=>{if(!!!n.amPmMode)return"";const X=n.amPmMode==="A";let oe=L<12?" am":" pm";return X&&(oe=oe.toUpperCase()),oe},_=L=>{let I;switch(L){case"hours":I=[0,2];break;case"minutes":I=[3,5];break;case"seconds":I=[6,8];break}const[X,oe]=I;t("select-range",X,oe),a.value=L},S=L=>{T(L,g(h)[L])},x=()=>{S("hours"),S("minutes"),S("seconds")},E=L=>L.querySelector(`.${o.namespace.value}-scrollbar__wrap`),T=(L,I)=>{if(n.arrowControl)return;const X=g(f[L]);X&&X.$el&&(E(X.$el).scrollTop=Math.max(0,I*O(L)))},O=L=>{const I=g(f[L]),X=I==null?void 0:I.$el.querySelector("li");return X&&Number.parseFloat(kl(X,"height"))||0},P=()=>{F(1)},N=()=>{F(-1)},F=L=>{a.value||_("hours");const I=a.value,X=g(h)[I],oe=a.value==="hours"?24:60,z=B(I,X,L,oe);Y(I,z),T(I,z),ot(()=>_(I))},B=(L,I,X,oe)=>{let z=(I+X+oe)%oe;const ge=g(m)[L];for(;ge[z]&&z!==I;)z=(z+X+oe)%oe;return z},Y=(L,I)=>{if(g(m)[L][I])return;const{hours:z,minutes:ge,seconds:Oe}=g(h);let xe;switch(L){case"hours":xe=n.spinnerDate.hour(I).minute(ge).second(Oe);break;case"minutes":xe=n.spinnerDate.hour(z).minute(I).second(Oe);break;case"seconds":xe=n.spinnerDate.hour(z).minute(ge).second(I);break}t("change",xe)},Z=(L,{value:I,disabled:X})=>{X||(Y(L,I),_(L),T(L,I))},U=L=>{l=!0,v(L);const I=Math.min(Math.round((E(g(f[L]).$el).scrollTop-(j(L)*.5-10)/O(L)+3)/O(L)),L==="hours"?23:59);Y(L,I)},j=L=>g(f[L]).$el.offsetHeight,V=()=>{const L=I=>{const X=g(f[I]);X&&X.$el&&(E(X.$el).onscroll=()=>{U(I)})};L("hours"),L("minutes"),L("seconds")};Ct(()=>{ot(()=>{!n.arrowControl&&V(),x(),n.role==="start"&&_("hours")})});const H=(L,I)=>{f[I].value=L};return t("set-option",[`${n.role}_scrollDown`,F]),t("set-option",[`${n.role}_emitSelectRange`,_]),Te(()=>n.spinnerDate,()=>{l||x()}),(L,I)=>(C(),M("div",{class:D([g(o).b("spinner"),{"has-seconds":L.showSeconds}])},[L.arrowControl?W("v-if",!0):(C(!0),M(fe,{key:0},nt(g(p),X=>(C(),q(g(ks),{key:X,ref_for:!0,ref:oe=>H(oe,X),class:D(g(o).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":g(o).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:oe=>_(X),onMousemove:oe=>S(X)},{default:$(()=>[(C(!0),M(fe,null,nt(g(m)[X],(oe,z)=>(C(),M("li",{key:z,class:D([g(o).be("spinner","item"),g(o).is("active",z===g(h)[X]),g(o).is("disabled",oe)]),onClick:ge=>Z(X,{value:z,disabled:oe})},[X==="hours"?(C(),M(fe,{key:0},[ne(A(("0"+(L.amPmMode?z%12||12:z)).slice(-2))+A(w(z)),1)],64)):(C(),M(fe,{key:1},[ne(A(("0"+z).slice(-2)),1)],64))],10,ooe))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),L.arrowControl?(C(!0),M(fe,{key:1},nt(g(p),X=>(C(),M("div",{key:X,class:D([g(o).be("spinner","wrapper"),g(o).is("arrow")]),onMouseenter:oe=>_(X)},[He((C(),q(g(Ne),{class:D(["arrow-up",g(o).be("spinner","arrow")])},{default:$(()=>[k(g(N0))]),_:1},8,["class"])),[[g(Rg),N]]),He((C(),q(g(Ne),{class:D(["arrow-down",g(o).be("spinner","arrow")])},{default:$(()=>[k(g(Su))]),_:1},8,["class"])),[[g(Rg),P]]),b("ul",{class:D(g(o).be("spinner","list"))},[(C(!0),M(fe,null,nt(g(y)[X],(oe,z)=>(C(),M("li",{key:z,class:D([g(o).be("spinner","item"),g(o).is("active",oe===g(h)[X]),g(o).is("disabled",g(m)[X][oe])])},[typeof oe=="number"?(C(),M(fe,{key:0},[X==="hours"?(C(),M(fe,{key:0},[ne(A(("0"+(L.amPmMode?oe%12||12:oe)).slice(-2))+A(w(oe)),1)],64)):(C(),M(fe,{key:1},[ne(A(("0"+oe).slice(-2)),1)],64))],64)):W("v-if",!0)],2))),128))],2)],42,roe))),128)):W("v-if",!0)],2))}});var ioe=ze(soe,[["__file","basic-time-spinner.vue"]]);const loe=Q({__name:"panel-time-pick",props:jne,emits:["pick","select-range","set-picker-option"],setup(e,{emit:t}){const n=e,o=Be("EP_PICKER_BASE"),{arrowControl:r,disabledHours:s,disabledMinutes:i,disabledSeconds:l,defaultValue:a}=o.props,{getAvailableHours:u,getAvailableMinutes:c,getAvailableSeconds:d}=Une(s,i,l),f=Re("time"),{t:p,lang:h}=Kt(),m=K([0,2]),y=Wne(n),v=R(()=>Uo(n.actualVisible)?`${f.namespace.value}-zoom-in-top`:""),w=R(()=>n.format.includes("ss")),_=R(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),S=H=>{const L=ut(H).locale(h.value),I=Z(L);return L.isSame(I)},x=()=>{t("pick",y.value,!1)},E=(H=!1,L=!1)=>{L||t("pick",n.parsedValue,H)},T=H=>{if(!n.visible)return;const L=Z(H).millisecond(0);t("pick",L,!0)},O=(H,L)=>{t("select-range",H,L),m.value=[H,L]},P=H=>{const L=[0,3].concat(w.value?[6]:[]),I=["hours","minutes"].concat(w.value?["seconds"]:[]),oe=(L.indexOf(m.value[0])+H+L.length)%L.length;F.start_emitSelectRange(I[oe])},N=H=>{const L=H.code,{left:I,right:X,up:oe,down:z}=rt;if([I,X].includes(L)){P(L===I?-1:1),H.preventDefault();return}if([oe,z].includes(L)){const ge=L===oe?-1:1;F.start_scrollDown(ge),H.preventDefault();return}},{timePickerOptions:F,onSetOption:B,getAvailableTime:Y}=Hne({getAvailableHours:u,getAvailableMinutes:c,getAvailableSeconds:d}),Z=H=>Y(H,n.datetimeRole||"",!0),U=H=>H?ut(H,n.format).locale(h.value):null,j=H=>H?H.format(n.format):null,V=()=>ut(a).locale(h.value);return t("set-picker-option",["isValidValue",S]),t("set-picker-option",["formatToString",j]),t("set-picker-option",["parseUserInput",U]),t("set-picker-option",["handleKeydownInput",N]),t("set-picker-option",["getRangeAvailableTime",Z]),t("set-picker-option",["getDefaultValue",V]),(H,L)=>(C(),q(_r,{name:g(v)},{default:$(()=>[H.actualVisible||H.visible?(C(),M("div",{key:0,class:D(g(f).b("panel"))},[b("div",{class:D([g(f).be("panel","content"),{"has-seconds":g(w)}])},[k(ioe,{ref:"spinner",role:H.datetimeRole||"start","arrow-control":g(r),"show-seconds":g(w),"am-pm-mode":g(_),"spinner-date":H.parsedValue,"disabled-hours":g(s),"disabled-minutes":g(i),"disabled-seconds":g(l),onChange:T,onSetOption:g(B),onSelectRange:O},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),b("div",{class:D(g(f).be("panel","footer"))},[b("button",{type:"button",class:D([g(f).be("panel","btn"),"cancel"]),onClick:x},A(g(p)("el.datepicker.cancel")),3),b("button",{type:"button",class:D([g(f).be("panel","btn"),"confirm"]),onClick:L[0]||(L[0]=I=>E())},A(g(p)("el.datepicker.confirm")),3)],2)],2)):W("v-if",!0)]),_:1},8,["name"]))}});var yb=ze(loe,[["__file","panel-time-pick.vue"]]),CT={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(On,function(){return function(n,o,r){var s=o.prototype,i=function(d){return d&&(d.indexOf?d:d.s)},l=function(d,f,p,h,m){var y=d.name?d:d.$locale(),v=i(y[f]),w=i(y[p]),_=v||w.map(function(x){return x.slice(0,h)});if(!m)return _;var S=y.weekStart;return _.map(function(x,E){return _[(E+(S||0))%7]})},a=function(){return r.Ls[r.locale()]},u=function(d,f){return d.formats[f]||function(p){return p.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(h,m,y){return m||y.slice(1)})}(d.formats[f.toUpperCase()])},c=function(){var d=this;return{months:function(f){return f?f.format("MMMM"):l(d,"months")},monthsShort:function(f){return f?f.format("MMM"):l(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(f){return f?f.format("dddd"):l(d,"weekdays")},weekdaysMin:function(f){return f?f.format("dd"):l(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(f){return f?f.format("ddd"):l(d,"weekdaysShort","weekdays",3)},longDateFormat:function(f){return u(d.$locale(),f)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};s.localeData=function(){return c.bind(this)()},r.localeData=function(){var d=a();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return r.weekdays()},weekdaysShort:function(){return r.weekdaysShort()},weekdaysMin:function(){return r.weekdaysMin()},months:function(){return r.months()},monthsShort:function(){return r.monthsShort()},longDateFormat:function(f){return u(d,f)},meridiem:d.meridiem,ordinal:d.ordinal}},r.months=function(){return l(a(),"months")},r.monthsShort=function(){return l(a(),"monthsShort","months",3)},r.weekdays=function(d){return l(a(),"weekdays",null,null,d)},r.weekdaysShort=function(d){return l(a(),"weekdaysShort","weekdays",3,d)},r.weekdaysMin=function(d){return l(a(),"weekdaysMin","weekdays",2,d)}}})})(CT);var aoe=CT.exports;const uoe=_o(aoe),kT={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:qr,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},ST={[Jt]:e=>tt(e)||_t(e)||Br(e),change:e=>tt(e)||_t(e)||Br(e)},$d=Symbol("checkboxGroupContextKey"),coe=({model:e,isChecked:t})=>{const n=Be($d,void 0),o=R(()=>{var s,i;const l=(s=n==null?void 0:n.max)==null?void 0:s.value,a=(i=n==null?void 0:n.min)==null?void 0:i.value;return!Uo(l)&&e.value.length>=l&&!t.value||!Uo(a)&&e.value.length<=a&&t.value});return{isDisabled:Gr(R(()=>(n==null?void 0:n.disabled.value)||o.value)),isLimitDisabled:o}},doe=(e,{model:t,isLimitExceeded:n,hasOwnLabel:o,isDisabled:r,isLabeledByFormItem:s})=>{const i=Be($d,void 0),{formItem:l}=ni(),{emit:a}=at();function u(h){var m,y,v,w;return[!0,e.trueValue,e.trueLabel].includes(h)?(y=(m=e.trueValue)!=null?m:e.trueLabel)!=null?y:!0:(w=(v=e.falseValue)!=null?v:e.falseLabel)!=null?w:!1}function c(h,m){a("change",u(h),m)}function d(h){if(n.value)return;const m=h.target;a("change",u(m.checked),h)}async function f(h){n.value||!o.value&&!r.value&&s.value&&(h.composedPath().some(v=>v.tagName==="LABEL")||(t.value=u([!1,e.falseValue,e.falseLabel].includes(t.value)),await ot(),c(t.value,h)))}const p=R(()=>(i==null?void 0:i.validateEvent)||e.validateEvent);return Te(()=>e.modelValue,()=>{p.value&&(l==null||l.validate("change").catch(h=>void 0))}),{handleChange:d,onClickRoot:f}},foe=e=>{const t=K(!1),{emit:n}=at(),o=Be($d,void 0),r=R(()=>Uo(o)===!1),s=K(!1),i=R({get(){var l,a;return r.value?(l=o==null?void 0:o.modelValue)==null?void 0:l.value:(a=e.modelValue)!=null?a:t.value},set(l){var a,u;r.value&&Me(l)?(s.value=((a=o==null?void 0:o.max)==null?void 0:a.value)!==void 0&&l.length>(o==null?void 0:o.max.value)&&l.length>i.value.length,s.value===!1&&((u=o==null?void 0:o.changeEvent)==null||u.call(o,l))):(n(Jt,l),t.value=l)}});return{model:i,isGroup:r,isLimitExceeded:s}},poe=(e,t,{model:n})=>{const o=Be($d,void 0),r=K(!1),s=R(()=>Ap(e.value)?e.label:e.value),i=R(()=>{const c=n.value;return Br(c)?c:Me(c)?ft(s.value)?c.map(Mt).some(d=>jl(d,s.value)):c.map(Mt).includes(s.value):c!=null?c===e.trueValue||c===e.trueLabel:!!c}),l=Jo(R(()=>{var c;return(c=o==null?void 0:o.size)==null?void 0:c.value}),{prop:!0}),a=Jo(R(()=>{var c;return(c=o==null?void 0:o.size)==null?void 0:c.value})),u=R(()=>!!t.default||!Ap(s.value));return{checkboxButtonSize:l,isChecked:i,isFocused:r,checkboxSize:a,hasOwnLabel:u,actualValue:s}},$T=(e,t)=>{const{formItem:n}=ni(),{model:o,isGroup:r,isLimitExceeded:s}=foe(e),{isFocused:i,isChecked:l,checkboxButtonSize:a,checkboxSize:u,hasOwnLabel:c,actualValue:d}=poe(e,t,{model:o}),{isDisabled:f}=coe({model:o,isChecked:l}),{inputId:p,isLabeledByFormItem:h}=Sd(e,{formItemContext:n,disableIdGeneration:c,disableIdManagement:r}),{handleChange:m,onClickRoot:y}=doe(e,{model:o,isLimitExceeded:s,hasOwnLabel:c,isDisabled:f,isLabeledByFormItem:h});return(()=>{function w(){var _,S;Me(o.value)&&!o.value.includes(d.value)?o.value.push(d.value):o.value=(S=(_=e.trueValue)!=null?_:e.trueLabel)!=null?S:!0}e.checked&&w()})(),Ua({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},R(()=>r.value&&Ap(e.value))),Ua({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},R(()=>!!e.trueLabel)),Ua({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},R(()=>!!e.falseLabel)),{inputId:p,isLabeledByFormItem:h,isChecked:l,isDisabled:f,isFocused:i,checkboxButtonSize:a,checkboxSize:u,hasOwnLabel:c,model:o,actualValue:d,handleChange:m,onClickRoot:y}},hoe=["id","indeterminate","name","tabindex","disabled","true-value","false-value"],moe=["id","indeterminate","disabled","value","name","tabindex"],goe=Q({name:"ElCheckbox"}),voe=Q({...goe,props:kT,emits:ST,setup(e){const t=e,n=Kr(),{inputId:o,isLabeledByFormItem:r,isChecked:s,isDisabled:i,isFocused:l,checkboxSize:a,hasOwnLabel:u,model:c,actualValue:d,handleChange:f,onClickRoot:p}=$T(t,n),h=Re("checkbox"),m=R(()=>[h.b(),h.m(a.value),h.is("disabled",i.value),h.is("bordered",t.border),h.is("checked",s.value)]),y=R(()=>[h.e("input"),h.is("disabled",i.value),h.is("checked",s.value),h.is("indeterminate",t.indeterminate),h.is("focus",l.value)]);return(v,w)=>(C(),q(Lt(!g(u)&&g(r)?"span":"label"),{class:D(g(m)),"aria-controls":v.indeterminate?v.controls:null,onClick:g(p)},{default:$(()=>{var _,S;return[b("span",{class:D(g(y))},[v.trueValue||v.falseValue||v.trueLabel||v.falseLabel?He((C(),M("input",{key:0,id:g(o),"onUpdate:modelValue":w[0]||(w[0]=x=>on(c)?c.value=x:null),class:D(g(h).e("original")),type:"checkbox",indeterminate:v.indeterminate,name:v.name,tabindex:v.tabindex,disabled:g(i),"true-value":(_=v.trueValue)!=null?_:v.trueLabel,"false-value":(S=v.falseValue)!=null?S:v.falseLabel,onChange:w[1]||(w[1]=(...x)=>g(f)&&g(f)(...x)),onFocus:w[2]||(w[2]=x=>l.value=!0),onBlur:w[3]||(w[3]=x=>l.value=!1),onClick:w[4]||(w[4]=et(()=>{},["stop"]))},null,42,hoe)),[[ru,g(c)]]):He((C(),M("input",{key:1,id:g(o),"onUpdate:modelValue":w[5]||(w[5]=x=>on(c)?c.value=x:null),class:D(g(h).e("original")),type:"checkbox",indeterminate:v.indeterminate,disabled:g(i),value:g(d),name:v.name,tabindex:v.tabindex,onChange:w[6]||(w[6]=(...x)=>g(f)&&g(f)(...x)),onFocus:w[7]||(w[7]=x=>l.value=!0),onBlur:w[8]||(w[8]=x=>l.value=!1),onClick:w[9]||(w[9]=et(()=>{},["stop"]))},null,42,moe)),[[ru,g(c)]]),b("span",{class:D(g(h).e("inner"))},null,2)],2),g(u)?(C(),M("span",{key:0,class:D(g(h).e("label"))},[he(v.$slots,"default"),v.$slots.default?W("v-if",!0):(C(),M(fe,{key:0},[ne(A(v.label),1)],64))],2)):W("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var yoe=ze(voe,[["__file","checkbox.vue"]]);const _oe=["name","tabindex","disabled","true-value","false-value"],boe=["name","tabindex","disabled","value"],woe=Q({name:"ElCheckboxButton"}),Coe=Q({...woe,props:kT,emits:ST,setup(e){const t=e,n=Kr(),{isFocused:o,isChecked:r,isDisabled:s,checkboxButtonSize:i,model:l,actualValue:a,handleChange:u}=$T(t,n),c=Be($d,void 0),d=Re("checkbox"),f=R(()=>{var h,m,y,v;const w=(m=(h=c==null?void 0:c.fill)==null?void 0:h.value)!=null?m:"";return{backgroundColor:w,borderColor:w,color:(v=(y=c==null?void 0:c.textColor)==null?void 0:y.value)!=null?v:"",boxShadow:w?`-1px 0 0 0 ${w}`:void 0}}),p=R(()=>[d.b("button"),d.bm("button",i.value),d.is("disabled",s.value),d.is("checked",r.value),d.is("focus",o.value)]);return(h,m)=>{var y,v;return C(),M("label",{class:D(g(p))},[h.trueValue||h.falseValue||h.trueLabel||h.falseLabel?He((C(),M("input",{key:0,"onUpdate:modelValue":m[0]||(m[0]=w=>on(l)?l.value=w:null),class:D(g(d).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:g(s),"true-value":(y=h.trueValue)!=null?y:h.trueLabel,"false-value":(v=h.falseValue)!=null?v:h.falseLabel,onChange:m[1]||(m[1]=(...w)=>g(u)&&g(u)(...w)),onFocus:m[2]||(m[2]=w=>o.value=!0),onBlur:m[3]||(m[3]=w=>o.value=!1),onClick:m[4]||(m[4]=et(()=>{},["stop"]))},null,42,_oe)),[[ru,g(l)]]):He((C(),M("input",{key:1,"onUpdate:modelValue":m[5]||(m[5]=w=>on(l)?l.value=w:null),class:D(g(d).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:g(s),value:g(a),onChange:m[6]||(m[6]=(...w)=>g(u)&&g(u)(...w)),onFocus:m[7]||(m[7]=w=>o.value=!0),onBlur:m[8]||(m[8]=w=>o.value=!1),onClick:m[9]||(m[9]=et(()=>{},["stop"]))},null,42,boe)),[[ru,g(l)]]),h.$slots.default||h.label?(C(),M("span",{key:2,class:D(g(d).be("button","inner")),style:Qe(g(r)?g(f):void 0)},[he(h.$slots,"default",{},()=>[ne(A(h.label),1)])],6)):W("v-if",!0)],2)}}});var ET=ze(Coe,[["__file","checkbox-button.vue"]]);const koe=We({modelValue:{type:Ce(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:qr,label:String,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0}}),Soe={[Jt]:e=>Me(e),change:e=>Me(e)},$oe=Q({name:"ElCheckboxGroup"}),Eoe=Q({...$oe,props:koe,emits:Soe,setup(e,{emit:t}){const n=e,o=Re("checkbox"),{formItem:r}=ni(),{inputId:s,isLabeledByFormItem:i}=Sd(n,{formItemContext:r}),l=async u=>{t(Jt,u),await ot(),t("change",u)},a=R({get(){return n.modelValue},set(u){l(u)}});return wt($d,{...uY(ei(n),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:a,changeEvent:l}),Te(()=>n.modelValue,()=>{n.validateEvent&&(r==null||r.validate("change").catch(u=>void 0))}),(u,c)=>{var d;return C(),q(Lt(u.tag),{id:g(s),class:D(g(o).b("group")),role:"group","aria-label":g(i)?void 0:u.label||"checkbox-group","aria-labelledby":g(i)?(d=g(r))==null?void 0:d.labelId:void 0},{default:$(()=>[he(u.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var xT=ze(Eoe,[["__file","checkbox-group.vue"]]);const Hn=Zt(yoe,{CheckboxButton:ET,CheckboxGroup:xT});Gn(ET);const xoe=Gn(xT),MT=We({modelValue:{type:[String,Number,Boolean],default:void 0},size:qr,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),Moe=We({...MT,border:Boolean}),TT={[Jt]:e=>tt(e)||_t(e)||Br(e),[Cd]:e=>tt(e)||_t(e)||Br(e)},OT=Symbol("radioGroupKey"),IT=(e,t)=>{const n=K(),o=Be(OT,void 0),r=R(()=>!!o),s=R(()=>Ap(e.value)?e.label:e.value),i=R({get(){return r.value?o.modelValue:e.modelValue},set(d){r.value?o.changeEvent(d):t&&t(Jt,d),n.value.checked=e.modelValue===s.value}}),l=Jo(R(()=>o==null?void 0:o.size)),a=Gr(R(()=>o==null?void 0:o.disabled)),u=K(!1),c=R(()=>a.value||r.value&&i.value!==s.value?-1:0);return Ua({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},R(()=>r.value&&Ap(e.value))),{radioRef:n,isGroup:r,radioGroup:o,focus:u,size:l,disabled:a,tabIndex:c,modelValue:i,actualValue:s}},Toe=["value","name","disabled"],Ooe=Q({name:"ElRadio"}),Ioe=Q({...Ooe,props:Moe,emits:TT,setup(e,{emit:t}){const n=e,o=Re("radio"),{radioRef:r,radioGroup:s,focus:i,size:l,disabled:a,modelValue:u,actualValue:c}=IT(n,t);function d(){ot(()=>t("change",u.value))}return(f,p)=>{var h;return C(),M("label",{class:D([g(o).b(),g(o).is("disabled",g(a)),g(o).is("focus",g(i)),g(o).is("bordered",f.border),g(o).is("checked",g(u)===g(c)),g(o).m(g(l))])},[b("span",{class:D([g(o).e("input"),g(o).is("disabled",g(a)),g(o).is("checked",g(u)===g(c))])},[He(b("input",{ref_key:"radioRef",ref:r,"onUpdate:modelValue":p[0]||(p[0]=m=>on(u)?u.value=m:null),class:D(g(o).e("original")),value:g(c),name:f.name||((h=g(s))==null?void 0:h.name),disabled:g(a),type:"radio",onFocus:p[1]||(p[1]=m=>i.value=!0),onBlur:p[2]||(p[2]=m=>i.value=!1),onChange:d,onClick:p[3]||(p[3]=et(()=>{},["stop"]))},null,42,Toe),[[Xp,g(u)]]),b("span",{class:D(g(o).e("inner"))},null,2)],2),b("span",{class:D(g(o).e("label")),onKeydown:p[4]||(p[4]=et(()=>{},["stop"]))},[he(f.$slots,"default",{},()=>[ne(A(f.label),1)])],34)],2)}}});var Aoe=ze(Ioe,[["__file","radio.vue"]]);const Noe=We({...MT}),Poe=["value","name","disabled"],Loe=Q({name:"ElRadioButton"}),Roe=Q({...Loe,props:Noe,setup(e){const t=e,n=Re("radio"),{radioRef:o,focus:r,size:s,disabled:i,modelValue:l,radioGroup:a,actualValue:u}=IT(t),c=R(()=>({backgroundColor:(a==null?void 0:a.fill)||"",borderColor:(a==null?void 0:a.fill)||"",boxShadow:a!=null&&a.fill?`-1px 0 0 0 ${a.fill}`:"",color:(a==null?void 0:a.textColor)||""}));return(d,f)=>{var p;return C(),M("label",{class:D([g(n).b("button"),g(n).is("active",g(l)===g(u)),g(n).is("disabled",g(i)),g(n).is("focus",g(r)),g(n).bm("button",g(s))])},[He(b("input",{ref_key:"radioRef",ref:o,"onUpdate:modelValue":f[0]||(f[0]=h=>on(l)?l.value=h:null),class:D(g(n).be("button","original-radio")),value:g(u),type:"radio",name:d.name||((p=g(a))==null?void 0:p.name),disabled:g(i),onFocus:f[1]||(f[1]=h=>r.value=!0),onBlur:f[2]||(f[2]=h=>r.value=!1),onClick:f[3]||(f[3]=et(()=>{},["stop"]))},null,42,Poe),[[Xp,g(l)]]),b("span",{class:D(g(n).be("button","inner")),style:Qe(g(l)===g(u)?g(c):{}),onKeydown:f[4]||(f[4]=et(()=>{},["stop"]))},[he(d.$slots,"default",{},()=>[ne(A(d.label),1)])],38)],2)}}});var AT=ze(Roe,[["__file","radio-button.vue"]]);const Doe=We({id:{type:String,default:void 0},size:qr,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}}),Foe=TT,Voe=["id","aria-label","aria-labelledby"],Boe=Q({name:"ElRadioGroup"}),zoe=Q({...Boe,props:Doe,emits:Foe,setup(e,{emit:t}){const n=e,o=Re("radio"),r=Hr(),s=K(),{formItem:i}=ni(),{inputId:l,isLabeledByFormItem:a}=Sd(n,{formItemContext:i}),u=d=>{t(Jt,d),ot(()=>t("change",d))};Ct(()=>{const d=s.value.querySelectorAll("[type=radio]"),f=d[0];!Array.from(d).some(p=>p.checked)&&f&&(f.tabIndex=0)});const c=R(()=>n.name||r.value);return wt(OT,Dn({...ei(n),changeEvent:u,name:c})),Te(()=>n.modelValue,()=>{n.validateEvent&&(i==null||i.validate("change").catch(d=>void 0))}),(d,f)=>(C(),M("div",{id:g(l),ref_key:"radioGroupRef",ref:s,class:D(g(o).b("group")),role:"radiogroup","aria-label":g(a)?void 0:d.label||"radio-group","aria-labelledby":g(a)?g(i).labelId:void 0},[he(d.$slots,"default")],10,Voe))}});var NT=ze(zoe,[["__file","radio-group.vue"]]);const U0=Zt(Aoe,{RadioButton:AT,RadioGroup:NT}),Eu=Gn(NT),L3=Gn(AT),PT=We({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Zl},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),joe={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},Hoe=Q({name:"ElTag"}),Uoe=Q({...Hoe,props:PT,emits:joe,setup(e,{emit:t}){const n=e,o=Jo(),r=Re("tag"),s=R(()=>{const{type:a,hit:u,effect:c,closable:d,round:f}=n;return[r.b(),r.is("closable",d),r.m(a||"primary"),r.m(o.value),r.m(c),r.is("hit",u),r.is("round",f)]}),i=a=>{t("close",a)},l=a=>{t("click",a)};return(a,u)=>a.disableTransitions?(C(),M("span",{key:0,class:D(g(s)),style:Qe({backgroundColor:a.color}),onClick:l},[b("span",{class:D(g(r).e("content"))},[he(a.$slots,"default")],2),a.closable?(C(),q(g(Ne),{key:0,class:D(g(r).e("close")),onClick:et(i,["stop"])},{default:$(()=>[k(g(Gs))]),_:1},8,["class","onClick"])):W("v-if",!0)],6)):(C(),q(_r,{key:1,name:`${g(r).namespace.value}-zoom-in-center`,appear:""},{default:$(()=>[b("span",{class:D(g(s)),style:Qe({backgroundColor:a.color}),onClick:l},[b("span",{class:D(g(r).e("content"))},[he(a.$slots,"default")],2),a.closable?(C(),q(g(Ne),{key:0,class:D(g(r).e("close")),onClick:et(i,["stop"])},{default:$(()=>[k(g(Gs))]),_:1},8,["class","onClick"])):W("v-if",!0)],6)]),_:3},8,["name"]))}});var Woe=ze(Uoe,[["__file","tag.vue"]]);const mh=Zt(Woe),LT=Symbol("rowContextKey"),Koe=["start","center","end","space-around","space-between","space-evenly"],qoe=["top","middle","bottom"],Goe=We({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:Koe,default:"start"},align:{type:String,values:qoe}}),Yoe=Q({name:"ElRow"}),Zoe=Q({...Yoe,props:Goe,setup(e){const t=e,n=Re("row"),o=R(()=>t.gutter);wt(LT,{gutter:o});const r=R(()=>{const i={};return t.gutter&&(i.marginRight=i.marginLeft=`-${t.gutter/2}px`),i}),s=R(()=>[n.b(),n.is(`justify-${t.justify}`,t.justify!=="start"),n.is(`align-${t.align}`,!!t.align)]);return(i,l)=>(C(),q(Lt(i.tag),{class:D(g(s)),style:Qe(g(r))},{default:$(()=>[he(i.$slots,"default")]),_:3},8,["class","style"]))}});var Joe=ze(Zoe,[["__file","row.vue"]]);const gh=Zt(Joe),Xoe=We({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:Ce([Number,Object]),default:()=>$o({})},sm:{type:Ce([Number,Object]),default:()=>$o({})},md:{type:Ce([Number,Object]),default:()=>$o({})},lg:{type:Ce([Number,Object]),default:()=>$o({})},xl:{type:Ce([Number,Object]),default:()=>$o({})}}),Qoe=Q({name:"ElCol"}),ere=Q({...Qoe,props:Xoe,setup(e){const t=e,{gutter:n}=Be(LT,{gutter:R(()=>0)}),o=Re("col"),r=R(()=>{const i={};return n.value&&(i.paddingLeft=i.paddingRight=`${n.value/2}px`),i}),s=R(()=>{const i=[];return["span","offset","pull","push"].forEach(u=>{const c=t[u];_t(c)&&(u==="span"?i.push(o.b(`${t[u]}`)):c>0&&i.push(o.b(`${u}-${t[u]}`)))}),["xs","sm","md","lg","xl"].forEach(u=>{_t(t[u])?i.push(o.b(`${u}-${t[u]}`)):ft(t[u])&&Object.entries(t[u]).forEach(([c,d])=>{i.push(c!=="span"?o.b(`${u}-${c}-${d}`):o.b(`${u}-${d}`))})}),n.value&&i.push(o.is("guttered")),[o.b(),i]});return(i,l)=>(C(),q(Lt(i.tag),{class:D(g(s)),style:Qe(g(r))},{default:$(()=>[he(i.$slots,"default")]),_:3},8,["class","style"]))}});var tre=ze(ere,[["__file","col.vue"]]);const vh=Zt(tre),nre=We({color:{type:Ce(Object),required:!0},vertical:{type:Boolean,default:!1}});let ly=!1;function Fp(e,t){if(!xt)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,ly=!1,(i=t.end)==null||i.call(t,s)},r=function(s){var i;ly||(s.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",o),document.addEventListener("touchmove",n),document.addEventListener("touchend",o),ly=!0,(i=t.start)==null||i.call(t,s))};e.addEventListener("mousedown",r),e.addEventListener("touchstart",r)}const ore=e=>{const t=at(),n=Tn(),o=Tn();function r(i){i.target!==n.value&&s(i)}function s(i){if(!o.value||!n.value)return;const a=t.vnode.el.getBoundingClientRect(),{clientX:u,clientY:c}=Hw(i);if(e.vertical){let d=c-a.top;d=Math.max(n.value.offsetHeight/2,d),d=Math.min(d,a.height-n.value.offsetHeight/2),e.color.set("alpha",Math.round((d-n.value.offsetHeight/2)/(a.height-n.value.offsetHeight)*100))}else{let d=u-a.left;d=Math.max(n.value.offsetWidth/2,d),d=Math.min(d,a.width-n.value.offsetWidth/2),e.color.set("alpha",Math.round((d-n.value.offsetWidth/2)/(a.width-n.value.offsetWidth)*100))}}return{thumb:n,bar:o,handleDrag:s,handleClick:r}},rre=(e,{bar:t,thumb:n,handleDrag:o})=>{const r=at(),s=Re("color-alpha-slider"),i=K(0),l=K(0),a=K();function u(){if(!n.value||e.vertical)return 0;const w=r.vnode.el,_=e.color.get("alpha");return w?Math.round(_*(w.offsetWidth-n.value.offsetWidth/2)/100):0}function c(){if(!n.value)return 0;const w=r.vnode.el;if(!e.vertical)return 0;const _=e.color.get("alpha");return w?Math.round(_*(w.offsetHeight-n.value.offsetHeight/2)/100):0}function d(){if(e.color&&e.color.value){const{r:w,g:_,b:S}=e.color.toRgb();return`linear-gradient(to right, rgba(${w}, ${_}, ${S}, 0) 0%, rgba(${w}, ${_}, ${S}, 1) 100%)`}return""}function f(){i.value=u(),l.value=c(),a.value=d()}Ct(()=>{if(!t.value||!n.value)return;const w={drag:_=>{o(_)},end:_=>{o(_)}};Fp(t.value,w),Fp(n.value,w),f()}),Te(()=>e.color.get("alpha"),()=>f()),Te(()=>e.color.value,()=>f());const p=R(()=>[s.b(),s.is("vertical",e.vertical)]),h=R(()=>s.e("bar")),m=R(()=>s.e("thumb")),y=R(()=>({background:a.value})),v=R(()=>({left:Zo(i.value),top:Zo(l.value)}));return{rootKls:p,barKls:h,barStyle:y,thumbKls:m,thumbStyle:v,update:f}},sre="ElColorAlphaSlider",ire=Q({name:sre}),lre=Q({...ire,props:nre,setup(e,{expose:t}){const n=e,{bar:o,thumb:r,handleDrag:s,handleClick:i}=ore(n),{rootKls:l,barKls:a,barStyle:u,thumbKls:c,thumbStyle:d,update:f}=rre(n,{bar:o,thumb:r,handleDrag:s});return t({update:f,bar:o,thumb:r}),(p,h)=>(C(),M("div",{class:D(g(l))},[b("div",{ref_key:"bar",ref:o,class:D(g(a)),style:Qe(g(u)),onClick:h[0]||(h[0]=(...m)=>g(i)&&g(i)(...m))},null,6),b("div",{ref_key:"thumb",ref:r,class:D(g(c)),style:Qe(g(d))},null,6)],2))}});var are=ze(lre,[["__file","alpha-slider.vue"]]);const ure=Q({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(e){const t=Re("color-hue-slider"),n=at(),o=K(),r=K(),s=K(0),i=K(0),l=R(()=>e.color.get("hue"));Te(()=>l.value,()=>{f()});function a(p){p.target!==o.value&&u(p)}function u(p){if(!r.value||!o.value)return;const m=n.vnode.el.getBoundingClientRect(),{clientX:y,clientY:v}=Hw(p);let w;if(e.vertical){let _=v-m.top;_=Math.min(_,m.height-o.value.offsetHeight/2),_=Math.max(o.value.offsetHeight/2,_),w=Math.round((_-o.value.offsetHeight/2)/(m.height-o.value.offsetHeight)*360)}else{let _=y-m.left;_=Math.min(_,m.width-o.value.offsetWidth/2),_=Math.max(o.value.offsetWidth/2,_),w=Math.round((_-o.value.offsetWidth/2)/(m.width-o.value.offsetWidth)*360)}e.color.set("hue",w)}function c(){if(!o.value)return 0;const p=n.vnode.el;if(e.vertical)return 0;const h=e.color.get("hue");return p?Math.round(h*(p.offsetWidth-o.value.offsetWidth/2)/360):0}function d(){if(!o.value)return 0;const p=n.vnode.el;if(!e.vertical)return 0;const h=e.color.get("hue");return p?Math.round(h*(p.offsetHeight-o.value.offsetHeight/2)/360):0}function f(){s.value=c(),i.value=d()}return Ct(()=>{if(!r.value||!o.value)return;const p={drag:h=>{u(h)},end:h=>{u(h)}};Fp(r.value,p),Fp(o.value,p),f()}),{bar:r,thumb:o,thumbLeft:s,thumbTop:i,hueValue:l,handleClick:a,update:f,ns:t}}});function cre(e,t,n,o,r,s){return C(),M("div",{class:D([e.ns.b(),e.ns.is("vertical",e.vertical)])},[b("div",{ref:"bar",class:D(e.ns.e("bar")),onClick:t[0]||(t[0]=(...i)=>e.handleClick&&e.handleClick(...i))},null,2),b("div",{ref:"thumb",class:D(e.ns.e("thumb")),style:Qe({left:e.thumbLeft+"px",top:e.thumbTop+"px"})},null,6)],2)}var dre=ze(ure,[["render",cre],["__file","hue-slider.vue"]]);const fre=We({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:qr,popperClass:{type:String,default:""},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},predefine:{type:Ce(Array)},validateEvent:{type:Boolean,default:!0}}),pre={[Jt]:e=>tt(e)||xo(e),[Cd]:e=>tt(e)||xo(e),activeChange:e=>tt(e)||xo(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},RT=Symbol("colorPickerContextKey"),d8=function(e,t,n){return[e,t*n/((e=(2-t)*n)<1?e:2-e)||0,e/2]},hre=function(e){return typeof e=="string"&&e.includes(".")&&Number.parseFloat(e)===1},mre=function(e){return typeof e=="string"&&e.includes("%")},$c=function(e,t){hre(e)&&(e="100%");const n=mre(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)},f8={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},t1=e=>{e=Math.min(Math.round(e),255);const t=Math.floor(e/16),n=e%16;return`${f8[t]||t}${f8[n]||n}`},p8=function({r:e,g:t,b:n}){return Number.isNaN(+e)||Number.isNaN(+t)||Number.isNaN(+n)?"":`#${t1(e)}${t1(t)}${t1(n)}`},ay={A:10,B:11,C:12,D:13,E:14,F:15},da=function(e){return e.length===2?(ay[e[0].toUpperCase()]||+e[0])*16+(ay[e[1].toUpperCase()]||+e[1]):ay[e[1].toUpperCase()]||+e[1]},gre=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}},h8=(e,t,n)=>{e=$c(e,255),t=$c(t,255),n=$c(n,255);const o=Math.max(e,t,n),r=Math.min(e,t,n);let s;const i=o,l=o-r,a=o===0?0:l/o;if(o===r)s=0;else{switch(o){case e:{s=(t-n)/l+(t<n?6:0);break}case t:{s=(n-e)/l+2;break}case n:{s=(e-t)/l+4;break}}s/=6}return{h:s*360,s:a*100,v:i*100}},Wd=function(e,t,n){e=$c(e,360)*6,t=$c(t,100),n=$c(n,100);const o=Math.floor(e),r=e-o,s=n*(1-t),i=n*(1-r*t),l=n*(1-(1-r)*t),a=o%6,u=[n,i,s,s,l,n][a],c=[l,n,n,i,s,s][a],d=[s,s,l,n,n,i][a];return{r:Math.round(u*255),g:Math.round(c*255),b:Math.round(d*255)}};class Gf{constructor(t={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const n in t)vt(t,n)&&(this[n]=t[n]);t.value?this.fromString(t.value):this.doOnChange()}set(t,n){if(arguments.length===1&&typeof t=="object"){for(const o in t)vt(t,o)&&this.set(o,t[o]);return}this[`_${t}`]=n,this.doOnChange()}get(t){return t==="alpha"?Math.floor(this[`_${t}`]):this[`_${t}`]}toRgb(){return Wd(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}=gre(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}=h8(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=da(o[0]+o[0]),s=da(o[1]+o[1]),i=da(o[2]+o[2])):(o.length===6||o.length===8)&&(r=da(o.slice(0,2)),s=da(o.slice(2,4)),i=da(o.slice(4,6))),o.length===8?this._alpha=da(o.slice(6))/255*100:(o.length===3||o.length===6)&&(this._alpha=100);const{h:l,s:a,v:u}=h8(r,s,i);n(l,a,u)}}compare(t){return Math.abs(t._hue-this._hue)<2&&Math.abs(t._saturation-this._saturation)<1&&Math.abs(t._value-this._value)<1&&Math.abs(t._alpha-this._alpha)<1}doOnChange(){const{_hue:t,_saturation:n,_value:o,_alpha:r,format:s}=this;if(this.enableAlpha)switch(s){case"hsl":{const i=d8(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=`${p8(Wd(t,n,o))}${t1(r*255/100)}`;break}default:{const{r:i,g:l,b:a}=Wd(t,n,o);this.value=`rgba(${i}, ${l}, ${a}, ${this.get("alpha")/100})`}}else switch(s){case"hsl":{const i=d8(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}=Wd(t,n,o);this.value=`rgb(${i}, ${l}, ${a})`;break}default:this.value=p8(Wd(t,n,o))}}}const vre=Q({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0}},setup(e){const t=Re("color-predefine"),{currentColor:n}=Be(RT),o=K(s(e.colors,e.color));Te(()=>n.value,i=>{const l=new Gf;l.fromString(i),o.value.forEach(a=>{a.selected=l.compare(a)})}),ls(()=>{o.value=s(e.colors,e.color)});function r(i){e.color.fromString(e.colors[i])}function s(i,l){return i.map(a=>{const u=new Gf;return u.enableAlpha=!0,u.format="rgba",u.fromString(a),u.selected=u.value===l.value,u})}return{rgbaColors:o,handleSelect:r,ns:t}}}),yre=["onClick"];function _re(e,t,n,o,r,s){return C(),M("div",{class:D(e.ns.b())},[b("div",{class:D(e.ns.e("colors"))},[(C(!0),M(fe,null,nt(e.rgbaColors,(i,l)=>(C(),M("div",{key:e.colors[l],class:D([e.ns.e("color-selector"),e.ns.is("alpha",i._alpha<100),{selected:i.selected}]),onClick:a=>e.handleSelect(l)},[b("div",{style:Qe({backgroundColor:i.value})},null,4)],10,yre))),128))],2)],2)}var bre=ze(vre,[["render",_re],["__file","predefine.vue"]]);const wre=Q({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(e){const t=Re("color-svpanel"),n=at(),o=K(0),r=K(0),s=K("hsl(0, 100%, 50%)"),i=R(()=>{const u=e.color.get("hue"),c=e.color.get("value");return{hue:u,value:c}});function l(){const u=e.color.get("saturation"),c=e.color.get("value"),d=n.vnode.el,{clientWidth:f,clientHeight:p}=d;r.value=u*f/100,o.value=(100-c)*p/100,s.value=`hsl(${e.color.get("hue")}, 100%, 50%)`}function a(u){const d=n.vnode.el.getBoundingClientRect(),{clientX:f,clientY:p}=Hw(u);let h=f-d.left,m=p-d.top;h=Math.max(0,h),h=Math.min(h,d.width),m=Math.max(0,m),m=Math.min(m,d.height),r.value=h,o.value=m,e.color.set({saturation:h/d.width*100,value:100-m/d.height*100})}return Te(()=>i.value,()=>{l()}),Ct(()=>{Fp(n.vnode.el,{drag:u=>{a(u)},end:u=>{a(u)}}),l()}),{cursorTop:o,cursorLeft:r,background:s,colorValue:i,handleDrag:a,update:l,ns:t}}}),Cre=b("div",null,null,-1),kre=[Cre];function Sre(e,t,n,o,r,s){return C(),M("div",{class:D(e.ns.b()),style:Qe({backgroundColor:e.background})},[b("div",{class:D(e.ns.e("white"))},null,2),b("div",{class:D(e.ns.e("black"))},null,2),b("div",{class:D(e.ns.e("cursor")),style:Qe({top:e.cursorTop+"px",left:e.cursorLeft+"px"})},kre,6)],6)}var $re=ze(wre,[["render",Sre],["__file","sv-panel.vue"]]);const Ere=["onKeydown"],xre=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"],Mre=Q({name:"ElColorPicker"}),Tre=Q({...Mre,props:fre,emits:pre,setup(e,{expose:t,emit:n}){const o=e,{t:r}=Kt(),s=Re("color"),{formItem:i}=ni(),l=Jo(),a=Gr(),{inputId:u,isLabeledByFormItem:c}=Sd(o,{formItemContext:i}),d=K(),f=K(),p=K(),h=K(),m=K(),y=K(),{isFocused:v,handleFocus:w,handleBlur:_}=x3(m,{beforeBlur(le){var Ie;return(Ie=h.value)==null?void 0:Ie.isFocusInsideContent(le)},afterBlur(){j(!1),I()}}),S=le=>{if(a.value)return ve();w(le)};let x=!0;const E=Dn(new Gf({enableAlpha:o.showAlpha,format:o.colorFormat||"",value:o.modelValue})),T=K(!1),O=K(!1),P=K(""),N=R(()=>!o.modelValue&&!O.value?"transparent":U(E,o.showAlpha)),F=R(()=>!o.modelValue&&!O.value?"":E.value),B=R(()=>c.value?void 0:o.label||r("el.colorpicker.defaultLabel")),Y=R(()=>c.value?i==null?void 0:i.labelId:void 0),Z=R(()=>[s.b("picker"),s.is("disabled",a.value),s.bm("picker",l.value),s.is("focused",v.value)]);function U(le,Ie){if(!(le instanceof Gf))throw new TypeError("color should be instance of _color Class");const{r:Ge,g:G,b:J}=le.toRgb();return Ie?`rgba(${Ge}, ${G}, ${J}, ${le.get("alpha")/100})`:`rgb(${Ge}, ${G}, ${J})`}function j(le){T.value=le}const V=zl(j,100,{leading:!0});function H(){a.value||j(!0)}function L(){V(!1),I()}function I(){ot(()=>{o.modelValue?E.fromString(o.modelValue):(E.value="",ot(()=>{O.value=!1}))})}function X(){a.value||V(!T.value)}function oe(){E.fromString(P.value)}function z(){const le=E.value;n(Jt,le),n("change",le),o.validateEvent&&(i==null||i.validate("change").catch(Ie=>void 0)),V(!1),ot(()=>{const Ie=new Gf({enableAlpha:o.showAlpha,format:o.colorFormat||"",value:o.modelValue});E.compare(Ie)||I()})}function ge(){V(!1),n(Jt,null),n("change",null),o.modelValue!==null&&o.validateEvent&&(i==null||i.validate("change").catch(le=>void 0)),I()}function Oe(le){if(T.value&&(L(),v.value)){const Ie=new FocusEvent("focus",le);_(Ie)}}function xe(le){le.preventDefault(),le.stopPropagation(),j(!1),I()}function ee(le){switch(le.code){case rt.enter:case rt.space:le.preventDefault(),le.stopPropagation(),H(),y.value.focus();break;case rt.esc:xe(le);break}}function de(){m.value.focus()}function ve(){m.value.blur()}return Ct(()=>{o.modelValue&&(P.value=F.value)}),Te(()=>o.modelValue,le=>{le?le&&le!==E.value&&(x=!1,E.fromString(le)):O.value=!1}),Te(()=>F.value,le=>{P.value=le,x&&n("activeChange",le),x=!0}),Te(()=>E.value,()=>{!o.modelValue&&!O.value&&(O.value=!0)}),Te(()=>T.value,()=>{ot(()=>{var le,Ie,Ge;(le=d.value)==null||le.update(),(Ie=f.value)==null||Ie.update(),(Ge=p.value)==null||Ge.update()})}),wt(RT,{currentColor:F}),t({color:E,show:H,hide:L,focus:de,blur:ve}),(le,Ie)=>(C(),q(g($u),{ref_key:"popper",ref:h,visible:T.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[g(s).be("picker","panel"),g(s).b("dropdown"),le.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",transition:`${g(s).namespace.value}-zoom-in-top`,persistent:"",onHide:Ie[2]||(Ie[2]=Ge=>j(!1))},{content:$(()=>[He((C(),M("div",{onKeydown:Pt(xe,["esc"])},[b("div",{class:D(g(s).be("dropdown","main-wrapper"))},[k(dre,{ref_key:"hue",ref:d,class:"hue-slider",color:g(E),vertical:""},null,8,["color"]),k($re,{ref_key:"sv",ref:f,color:g(E)},null,8,["color"])],2),le.showAlpha?(C(),q(are,{key:0,ref_key:"alpha",ref:p,color:g(E)},null,8,["color"])):W("v-if",!0),le.predefine?(C(),q(bre,{key:1,ref:"predefine",color:g(E),colors:le.predefine},null,8,["color","colors"])):W("v-if",!0),b("div",{class:D(g(s).be("dropdown","btns"))},[b("span",{class:D(g(s).be("dropdown","value"))},[k(g(At),{ref_key:"inputRef",ref:y,modelValue:P.value,"onUpdate:modelValue":Ie[0]||(Ie[0]=Ge=>P.value=Ge),"validate-event":!1,size:"small",onKeyup:Pt(oe,["enter"]),onBlur:oe},null,8,["modelValue","onKeyup"])],2),k(g(pt),{class:D(g(s).be("dropdown","link-btn")),text:"",size:"small",onClick:ge},{default:$(()=>[ne(A(g(r)("el.colorpicker.clear")),1)]),_:1},8,["class"]),k(g(pt),{plain:"",size:"small",class:D(g(s).be("dropdown","btn")),onClick:z},{default:$(()=>[ne(A(g(r)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,Ere)),[[g(id),Oe]])]),default:$(()=>[b("div",{id:g(u),ref_key:"triggerRef",ref:m,class:D(g(Z)),role:"button","aria-label":g(B),"aria-labelledby":g(Y),"aria-description":g(r)("el.colorpicker.description",{color:le.modelValue||""}),"aria-disabled":g(a),tabindex:g(a)?-1:le.tabindex,onKeydown:ee,onFocus:S,onBlur:Ie[1]||(Ie[1]=(...Ge)=>g(_)&&g(_)(...Ge))},[g(a)?(C(),M("div",{key:0,class:D(g(s).be("picker","mask"))},null,2)):W("v-if",!0),b("div",{class:D(g(s).be("picker","trigger")),onClick:X},[b("span",{class:D([g(s).be("picker","color"),g(s).is("alpha",le.showAlpha)])},[b("span",{class:D(g(s).be("picker","color-inner")),style:Qe({backgroundColor:g(N)})},[He(k(g(Ne),{class:D([g(s).be("picker","icon"),g(s).is("icon-arrow-down")])},{default:$(()=>[k(g(Su))]),_:1},8,["class"]),[[en,le.modelValue||O.value]]),He(k(g(Ne),{class:D([g(s).be("picker","empty"),g(s).is("icon-close")])},{default:$(()=>[k(g(Gs))]),_:1},8,["class"]),[[en,!le.modelValue&&!O.value]])],6)],2)],2)],42,xre)]),_:1},8,["visible","popper-class","transition"]))}});var Ore=ze(Tre,[["__file","color-picker.vue"]]);const R3=Zt(Ore),Ire=Q({name:"ElContainer"}),Are=Q({...Ire,props:{direction:{type:String}},setup(e){const t=e,n=Kr(),o=Re("container"),r=R(()=>t.direction==="vertical"?!0:t.direction==="horizontal"?!1:n&&n.default?n.default().some(i=>{const l=i.type.name;return l==="ElHeader"||l==="ElFooter"}):!1);return(s,i)=>(C(),M("section",{class:D([g(o).b(),g(o).is("vertical",g(r))])},[he(s.$slots,"default")],2))}});var Nre=ze(Are,[["__file","container.vue"]]);const Pre=Q({name:"ElAside"}),Lre=Q({...Pre,props:{width:{type:String,default:null}},setup(e){const t=e,n=Re("aside"),o=R(()=>t.width?n.cssVarBlock({width:t.width}):{});return(r,s)=>(C(),M("aside",{class:D(g(n).b()),style:Qe(g(o))},[he(r.$slots,"default")],6))}});var DT=ze(Lre,[["__file","aside.vue"]]);const Rre=Q({name:"ElFooter"}),Dre=Q({...Rre,props:{height:{type:String,default:null}},setup(e){const t=e,n=Re("footer"),o=R(()=>t.height?n.cssVarBlock({height:t.height}):{});return(r,s)=>(C(),M("footer",{class:D(g(n).b()),style:Qe(g(o))},[he(r.$slots,"default")],6))}});var FT=ze(Dre,[["__file","footer.vue"]]);const Fre=Q({name:"ElHeader"}),Vre=Q({...Fre,props:{height:{type:String,default:null}},setup(e){const t=e,n=Re("header"),o=R(()=>t.height?n.cssVarBlock({height:t.height}):{});return(r,s)=>(C(),M("header",{class:D(g(n).b()),style:Qe(g(o))},[he(r.$slots,"default")],6))}});var VT=ze(Vre,[["__file","header.vue"]]);const Bre=Q({name:"ElMain"}),zre=Q({...Bre,setup(e){const t=Re("main");return(n,o)=>(C(),M("main",{class:D(g(t).b())},[he(n.$slots,"default")],2))}});var BT=ze(zre,[["__file","main.vue"]]);const zT=Zt(Nre,{Aside:DT,Footer:FT,Header:VT,Main:BT}),jT=Gn(DT);Gn(FT);const HT=Gn(VT),W0=Gn(BT);var UT={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(On,function(){return function(n,o){var r=o.prototype,s=r.format;r.format=function(i){var l=this,a=this.$locale();if(!this.isValid())return s.bind(this)(i);var u=this.$utils(),c=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(d){switch(d){case"Q":return Math.ceil((l.$M+1)/3);case"Do":return a.ordinal(l.$D);case"gggg":return l.weekYear();case"GGGG":return l.isoWeekYear();case"wo":return a.ordinal(l.week(),"W");case"w":case"ww":return u.s(l.week(),d==="w"?1:2,"0");case"W":case"WW":return u.s(l.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return u.s(String(l.$H===0?24:l.$H),d==="k"?1:2,"0");case"X":return Math.floor(l.$d.getTime()/1e3);case"x":return l.$d.getTime();case"z":return"["+l.offsetName()+"]";case"zzz":return"["+l.offsetName("long")+"]";default:return d}});return s.bind(this)(c)}}})})(UT);var jre=UT.exports;const Hre=_o(jre);var WT={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(On,function(){var n="week",o="year";return function(r,s,i){var l=s.prototype;l.week=function(a){if(a===void 0&&(a=null),a!==null)return this.add(7*(a-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var c=i(this).startOf(o).add(1,o).date(u),d=i(this).endOf(n);if(c.isBefore(d))return 1}var f=i(this).startOf(o).date(u).startOf(n).subtract(1,"millisecond"),p=this.diff(f,n,!0);return p<0?i(this).startOf("week").week():Math.ceil(p)},l.weeks=function(a){return a===void 0&&(a=null),this.week(a)}}})})(WT);var Ure=WT.exports;const Wre=_o(Ure);var KT={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(On,function(){return function(n,o){o.prototype.weekYear=function(){var r=this.month(),s=this.week(),i=this.year();return s===1&&r===11?i+1:r===0&&s>=52?i-1:i}}})})(KT);var Kre=KT.exports;const qre=_o(Kre);var qT={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(On,function(){return function(n,o,r){o.prototype.dayOfYear=function(s){var i=Math.round((r(this).startOf("day")-r(this).startOf("year"))/864e5)+1;return s==null?i:this.add(s-i,"day")}}})})(qT);var Gre=qT.exports;const Yre=_o(Gre);var GT={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(On,function(){return function(n,o){o.prototype.isSameOrAfter=function(r,s){return this.isSame(r,s)||this.isAfter(r,s)}}})})(GT);var Zre=GT.exports;const Jre=_o(Zre);var YT={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(On,function(){return function(n,o){o.prototype.isSameOrBefore=function(r,s){return this.isSame(r,s)||this.isBefore(r,s)}}})})(YT);var Xre=YT.exports;const Qre=_o(Xre),D3=Symbol(),ese=We({...pT,type:{type:Ce(String),default:"date"}}),tse=["date","dates","year","years","month","week","range"],F3=We({disabledDate:{type:Ce(Function)},date:{type:Ce(Object),required:!0},minDate:{type:Ce(Object)},maxDate:{type:Ce(Object)},parsedValue:{type:Ce([Object,Array])},rangeState:{type:Ce(Object),default:()=>({endDate:null,selecting:!1})}}),ZT=We({type:{type:Ce(String),required:!0,values:vJ},dateFormat:String,timeFormat:String}),JT=We({unlinkPanels:Boolean,parsedValue:{type:Ce(Array)}}),V3=e=>({type:String,values:tse,default:e}),nse=We({...ZT,parsedValue:{type:Ce([Object,Array])},visible:{type:Boolean},format:{type:String,default:""}}),ose=We({...F3,cellClassName:{type:Ce(Function)},showWeekNumber:Boolean,selectionMode:V3("date")}),rse=["changerange","pick","select"],_b=e=>{if(!Me(e))return!1;const[t,n]=e;return ut.isDayjs(t)&&ut.isDayjs(n)&&t.isSameOrBefore(n)},XT=(e,{lang:t,unit:n,unlinkPanels:o})=>{let r;if(Me(e)){let[s,i]=e.map(l=>ut(l).locale(t));return o||(i=s.add(1,n)),[s,i]}else e?r=ut(e):r=ut();return r=r.locale(t),[r,r.add(1,n)]},sse=(e,t,{columnIndexOffset:n,startDate:o,nextEndDate:r,now:s,unit:i,relativeDateGetter:l,setCellMetadata:a,setRowMetadata:u})=>{for(let c=0;c<e.row;c++){const d=t[c];for(let f=0;f<e.column;f++){let p=d[f+n];p||(p={row:c,column:f,type:"normal",inRange:!1,start:!1,end:!1});const h=c*e.column+f,m=l(h);p.dayjs=m,p.date=m.toDate(),p.timestamp=m.valueOf(),p.type="normal",p.inRange=!!(o&&m.isSameOrAfter(o,i)&&r&&m.isSameOrBefore(r,i))||!!(o&&m.isSameOrBefore(o,i)&&r&&m.isSameOrAfter(r,i)),o!=null&&o.isSameOrAfter(r)?(p.start=!!r&&m.isSame(r,i),p.end=o&&m.isSame(o,i)):(p.start=!!o&&m.isSame(o,i),p.end=!!r&&m.isSame(r,i)),m.isSame(s,i)&&(p.type="today"),a==null||a(p,{rowIndex:c,columnIndex:f}),d[f+n]=p}u==null||u(d)}},bb=(e="")=>["normal","today"].includes(e),ise=(e,t)=>{const{lang:n}=Kt(),o=K(),r=K(),s=K(),i=K(),l=K([[],[],[],[],[],[]]);let a=!1;const u=e.date.$locale().weekStart||7,c=e.date.locale("en").localeData().weekdaysShort().map(L=>L.toLowerCase()),d=R(()=>u>3?7-u:-u),f=R(()=>{const L=e.date.startOf("month");return L.subtract(L.day()||7,"day")}),p=R(()=>c.concat(c).slice(u,u+7)),h=R(()=>Ex(g(S)).some(L=>L.isCurrent)),m=R(()=>{const L=e.date.startOf("month"),I=L.day()||7,X=L.daysInMonth(),oe=L.subtract(1,"month").daysInMonth();return{startOfMonthDay:I,dateCountOfMonth:X,dateCountOfLastMonth:oe}}),y=R(()=>e.selectionMode==="dates"?ns(e.parsedValue):[]),v=(L,{count:I,rowIndex:X,columnIndex:oe})=>{const{startOfMonthDay:z,dateCountOfMonth:ge,dateCountOfLastMonth:Oe}=g(m),xe=g(d);if(X>=0&&X<=1){const ee=z+xe<0?7+z+xe:z+xe;if(oe+X*7>=ee)return L.text=I,!0;L.text=Oe-(ee-oe%7)+1+X*7,L.type="prev-month"}else return I<=ge?L.text=I:(L.text=I-ge,L.type="next-month"),!0;return!1},w=(L,{columnIndex:I,rowIndex:X},oe)=>{const{disabledDate:z,cellClassName:ge}=e,Oe=g(y),xe=v(L,{count:oe,rowIndex:X,columnIndex:I}),ee=L.dayjs.toDate();return L.selected=Oe.find(de=>de.isSame(L.dayjs,"day")),L.isSelected=!!L.selected,L.isCurrent=E(L),L.disabled=z==null?void 0:z(ee),L.customClass=ge==null?void 0:ge(ee),xe},_=L=>{if(e.selectionMode==="week"){const[I,X]=e.showWeekNumber?[1,7]:[0,6],oe=H(L[I+1]);L[I].inRange=oe,L[I].start=oe,L[X].inRange=oe,L[X].end=oe}},S=R(()=>{const{minDate:L,maxDate:I,rangeState:X,showWeekNumber:oe}=e,z=g(d),ge=g(l),Oe="day";let xe=1;if(oe)for(let ee=0;ee<6;ee++)ge[ee][0]||(ge[ee][0]={type:"week",text:g(f).add(ee*7+1,Oe).week()});return sse({row:6,column:7},ge,{startDate:L,columnIndexOffset:oe?1:0,nextEndDate:X.endDate||I||X.selecting&&L||null,now:ut().locale(g(n)).startOf(Oe),unit:Oe,relativeDateGetter:ee=>g(f).add(ee-z,Oe),setCellMetadata:(...ee)=>{w(...ee,xe)&&(xe+=1)},setRowMetadata:_}),ge});Te(()=>e.date,async()=>{var L;(L=g(o))!=null&&L.contains(document.activeElement)&&(await ot(),await x())});const x=async()=>{var L;return(L=g(r))==null?void 0:L.focus()},E=L=>e.selectionMode==="date"&&bb(L.type)&&T(L,e.parsedValue),T=(L,I)=>I?ut(I).locale(g(n)).isSame(e.date.date(Number(L.text)),"day"):!1,O=(L,I)=>{const X=L*7+(I-(e.showWeekNumber?1:0))-g(d);return g(f).add(X,"day")},P=L=>{var I;if(!e.rangeState.selecting)return;let X=L.target;if(X.tagName==="SPAN"&&(X=(I=X.parentNode)==null?void 0:I.parentNode),X.tagName==="DIV"&&(X=X.parentNode),X.tagName!=="TD")return;const oe=X.parentNode.rowIndex-1,z=X.cellIndex;g(S)[oe][z].disabled||(oe!==g(s)||z!==g(i))&&(s.value=oe,i.value=z,t("changerange",{selecting:!0,endDate:O(oe,z)}))},N=L=>!g(h)&&(L==null?void 0:L.text)===1&&L.type==="normal"||L.isCurrent,F=L=>{a||g(h)||e.selectionMode!=="date"||V(L,!0)},B=L=>{L.target.closest("td")&&(a=!0)},Y=L=>{L.target.closest("td")&&(a=!1)},Z=L=>{!e.rangeState.selecting||!e.minDate?(t("pick",{minDate:L,maxDate:null}),t("select",!0)):(L>=e.minDate?t("pick",{minDate:e.minDate,maxDate:L}):t("pick",{minDate:L,maxDate:e.minDate}),t("select",!1))},U=L=>{const I=L.week(),X=`${L.year()}w${I}`;t("pick",{year:L.year(),week:I,value:X,date:L.startOf("week")})},j=(L,I)=>{const X=I?ns(e.parsedValue).filter(oe=>(oe==null?void 0:oe.valueOf())!==L.valueOf()):ns(e.parsedValue).concat([L]);t("pick",X)},V=(L,I=!1)=>{const X=L.target.closest("td");if(!X)return;const oe=X.parentNode.rowIndex-1,z=X.cellIndex,ge=g(S)[oe][z];if(ge.disabled||ge.type==="week")return;const Oe=O(oe,z);switch(e.selectionMode){case"range":{Z(Oe);break}case"date":{t("pick",Oe,I);break}case"week":{U(Oe);break}case"dates":{j(Oe,!!ge.selected);break}}},H=L=>{if(e.selectionMode!=="week")return!1;let I=e.date.startOf("day");if(L.type==="prev-month"&&(I=I.subtract(1,"month")),L.type==="next-month"&&(I=I.add(1,"month")),I=I.date(Number.parseInt(L.text,10)),e.parsedValue&&!Array.isArray(e.parsedValue)){const X=(e.parsedValue.day()-u+7)%7-1;return e.parsedValue.subtract(X,"day").isSame(I,"day")}return!1};return{WEEKS:p,rows:S,tbodyRef:o,currentCellRef:r,focus:x,isCurrent:E,isWeekActive:H,isSelectedCell:N,handlePickDate:V,handleMouseUp:Y,handleMouseDown:B,handleMouseMove:P,handleFocus:F}},lse=(e,{isCurrent:t,isWeekActive:n})=>{const o=Re("date-table"),{t:r}=Kt(),s=R(()=>[o.b(),{"is-week-mode":e.selectionMode==="week"}]),i=R(()=>r("el.datepicker.dateTablePrompt")),l=R(()=>r("el.datepicker.week"));return{tableKls:s,tableLabel:i,weekLabel:l,getCellClasses:c=>{const d=[];return bb(c.type)&&!c.disabled?(d.push("available"),c.type==="today"&&d.push("today")):d.push(c.type),t(c)&&d.push("current"),c.inRange&&(bb(c.type)||e.selectionMode==="week")&&(d.push("in-range"),c.start&&d.push("start-date"),c.end&&d.push("end-date")),c.disabled&&d.push("disabled"),c.selected&&d.push("selected"),c.customClass&&d.push(c.customClass),d.join(" ")},getRowKls:c=>[o.e("row"),{current:n(c)}],t:r}},ase=We({cell:{type:Ce(Object)}});var use=Q({name:"ElDatePickerCell",props:ase,setup(e){const t=Re("date-table-cell"),{slots:n}=Be(D3);return()=>{const{cell:o}=e;return he(n,"default",{...o},()=>[k("div",{class:t.b()},[k("span",{class:t.e("text")},[o==null?void 0:o.text])])])}}});const cse=["aria-label"],dse={key:0,scope:"col"},fse=["aria-label"],pse=["aria-current","aria-selected","tabindex"],hse=Q({__name:"basic-date-table",props:ose,emits:rse,setup(e,{expose:t,emit:n}){const o=e,{WEEKS:r,rows:s,tbodyRef:i,currentCellRef:l,focus:a,isCurrent:u,isWeekActive:c,isSelectedCell:d,handlePickDate:f,handleMouseUp:p,handleMouseDown:h,handleMouseMove:m,handleFocus:y}=ise(o,n),{tableLabel:v,tableKls:w,weekLabel:_,getCellClasses:S,getRowKls:x,t:E}=lse(o,{isCurrent:u,isWeekActive:c});return t({focus:a}),(T,O)=>(C(),M("table",{"aria-label":g(v),class:D(g(w)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:O[1]||(O[1]=(...P)=>g(f)&&g(f)(...P)),onMousemove:O[2]||(O[2]=(...P)=>g(m)&&g(m)(...P)),onMousedown:O[3]||(O[3]=et((...P)=>g(h)&&g(h)(...P),["prevent"])),onMouseup:O[4]||(O[4]=(...P)=>g(p)&&g(p)(...P))},[b("tbody",{ref_key:"tbodyRef",ref:i},[b("tr",null,[T.showWeekNumber?(C(),M("th",dse,A(g(_)),1)):W("v-if",!0),(C(!0),M(fe,null,nt(g(r),(P,N)=>(C(),M("th",{key:N,"aria-label":g(E)("el.datepicker.weeksFull."+P),scope:"col"},A(g(E)("el.datepicker.weeks."+P)),9,fse))),128))]),(C(!0),M(fe,null,nt(g(s),(P,N)=>(C(),M("tr",{key:N,class:D(g(x)(P[1]))},[(C(!0),M(fe,null,nt(P,(F,B)=>(C(),M("td",{key:`${N}.${B}`,ref_for:!0,ref:Y=>g(d)(F)&&(l.value=Y),class:D(g(S)(F)),"aria-current":F.isCurrent?"date":void 0,"aria-selected":F.isCurrent,tabindex:g(d)(F)?0:-1,onFocus:O[0]||(O[0]=(...Y)=>g(y)&&g(y)(...Y))},[k(g(use),{cell:F},null,8,["cell"])],42,pse))),128))],2))),128))],512)],42,cse))}});var wb=ze(hse,[["__file","basic-date-table.vue"]]);const mse=We({...F3,selectionMode:V3("month")}),gse=["aria-label"],vse=["aria-selected","aria-label","tabindex","onKeydown"],yse={class:"cell"},_se=Q({__name:"basic-month-table",props:mse,emits:["changerange","pick","select"],setup(e,{expose:t,emit:n}){const o=e,r=(S,x,E)=>{const T=ut().locale(E).startOf("month").month(x).year(S),O=T.daysInMonth();return uT(O).map(P=>T.add(P,"day").toDate())},s=Re("month-table"),{t:i,lang:l}=Kt(),a=K(),u=K(),c=K(o.date.locale("en").localeData().monthsShort().map(S=>S.toLowerCase())),d=K([[],[],[]]),f=K(),p=K(),h=R(()=>{var S,x;const E=d.value,T=ut().locale(l.value).startOf("month");for(let O=0;O<3;O++){const P=E[O];for(let N=0;N<4;N++){const F=P[N]||(P[N]={row:O,column:N,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1});F.type="normal";const B=O*4+N,Y=o.date.startOf("year").month(B),Z=o.rangeState.endDate||o.maxDate||o.rangeState.selecting&&o.minDate||null;F.inRange=!!(o.minDate&&Y.isSameOrAfter(o.minDate,"month")&&Z&&Y.isSameOrBefore(Z,"month"))||!!(o.minDate&&Y.isSameOrBefore(o.minDate,"month")&&Z&&Y.isSameOrAfter(Z,"month")),(S=o.minDate)!=null&&S.isSameOrAfter(Z)?(F.start=!!(Z&&Y.isSame(Z,"month")),F.end=o.minDate&&Y.isSame(o.minDate,"month")):(F.start=!!(o.minDate&&Y.isSame(o.minDate,"month")),F.end=!!(Z&&Y.isSame(Z,"month"))),T.isSame(Y)&&(F.type="today"),F.text=B,F.disabled=((x=o.disabledDate)==null?void 0:x.call(o,Y.toDate()))||!1}}return E}),m=()=>{var S;(S=u.value)==null||S.focus()},y=S=>{const x={},E=o.date.year(),T=new Date,O=S.text;return x.disabled=o.disabledDate?r(E,O,l.value).every(o.disabledDate):!1,x.current=ns(o.parsedValue).findIndex(P=>ut.isDayjs(P)&&P.year()===E&&P.month()===O)>=0,x.today=T.getFullYear()===E&&T.getMonth()===O,S.inRange&&(x["in-range"]=!0,S.start&&(x["start-date"]=!0),S.end&&(x["end-date"]=!0)),x},v=S=>{const x=o.date.year(),E=S.text;return ns(o.date).findIndex(T=>T.year()===x&&T.month()===E)>=0},w=S=>{var x;if(!o.rangeState.selecting)return;let E=S.target;if(E.tagName==="SPAN"&&(E=(x=E.parentNode)==null?void 0:x.parentNode),E.tagName==="DIV"&&(E=E.parentNode),E.tagName!=="TD")return;const T=E.parentNode.rowIndex,O=E.cellIndex;h.value[T][O].disabled||(T!==f.value||O!==p.value)&&(f.value=T,p.value=O,n("changerange",{selecting:!0,endDate:o.date.startOf("year").month(T*4+O)}))},_=S=>{var x;const E=(x=S.target)==null?void 0:x.closest("td");if((E==null?void 0:E.tagName)!=="TD"||Ti(E,"disabled"))return;const T=E.cellIndex,P=E.parentNode.rowIndex*4+T,N=o.date.startOf("year").month(P);o.selectionMode==="range"?o.rangeState.selecting?(o.minDate&&N>=o.minDate?n("pick",{minDate:o.minDate,maxDate:N}):n("pick",{minDate:N,maxDate:o.minDate}),n("select",!1)):(n("pick",{minDate:N,maxDate:null}),n("select",!0)):n("pick",P)};return Te(()=>o.date,async()=>{var S,x;(S=a.value)!=null&&S.contains(document.activeElement)&&(await ot(),(x=u.value)==null||x.focus())}),t({focus:m}),(S,x)=>(C(),M("table",{role:"grid","aria-label":g(i)("el.datepicker.monthTablePrompt"),class:D(g(s).b()),onClick:_,onMousemove:w},[b("tbody",{ref_key:"tbodyRef",ref:a},[(C(!0),M(fe,null,nt(g(h),(E,T)=>(C(),M("tr",{key:T},[(C(!0),M(fe,null,nt(E,(O,P)=>(C(),M("td",{key:P,ref_for:!0,ref:N=>v(O)&&(u.value=N),class:D(y(O)),"aria-selected":`${v(O)}`,"aria-label":g(i)(`el.datepicker.month${+O.text+1}`),tabindex:v(O)?0:-1,onKeydown:[Pt(et(_,["prevent","stop"]),["space"]),Pt(et(_,["prevent","stop"]),["enter"])]},[b("div",null,[b("span",yse,A(g(i)("el.datepicker.months."+c.value[O.text])),1)])],42,vse))),128))]))),128))],512)],42,gse))}});var Cb=ze(_se,[["__file","basic-month-table.vue"]]);const{date:bse,disabledDate:wse,parsedValue:Cse}=F3,kse=We({date:bse,disabledDate:wse,parsedValue:Cse,selectionMode:V3("year")}),Sse=["aria-label"],$se=["aria-selected","tabindex","onKeydown"],Ese={class:"cell"},xse={key:1},Mse=Q({__name:"basic-year-table",props:kse,emits:["pick"],setup(e,{expose:t,emit:n}){const o=e,r=(m,y)=>{const v=ut(String(m)).locale(y).startOf("year"),_=v.endOf("year").dayOfYear();return uT(_).map(S=>v.add(S,"day").toDate())},s=Re("year-table"),{t:i,lang:l}=Kt(),a=K(),u=K(),c=R(()=>Math.floor(o.date.year()/10)*10),d=()=>{var m;(m=u.value)==null||m.focus()},f=m=>{const y={},v=ut().locale(l.value);return y.disabled=o.disabledDate?r(m,l.value).every(o.disabledDate):!1,y.current=ns(o.parsedValue).findIndex(w=>w.year()===m)>=0,y.today=v.year()===m,y},p=m=>m===c.value&&o.date.year()<c.value&&o.date.year()>c.value+9||ns(o.date).findIndex(y=>y.year()===m)>=0||ns(o.parsedValue).findIndex(y=>(y==null?void 0:y.year())===m)>=0,h=m=>{const v=m.target.closest("td");if(v&&v.textContent){if(Ti(v,"disabled"))return;const w=v.textContent||v.innerText;if(o.selectionMode==="years"){if(m.type==="keydown"){n("pick",ns(o.parsedValue),!1);return}const _=Ti(v,"current")?ns(o.parsedValue).filter(S=>(S==null?void 0:S.year())!==Number(w)):ns(o.parsedValue).concat([ut(w)]);n("pick",_)}else n("pick",Number(w))}};return Te(()=>o.date,async()=>{var m,y;(m=a.value)!=null&&m.contains(document.activeElement)&&(await ot(),(y=u.value)==null||y.focus())}),t({focus:d}),(m,y)=>(C(),M("table",{role:"grid","aria-label":g(i)("el.datepicker.yearTablePrompt"),class:D(g(s).b()),onClick:h},[b("tbody",{ref_key:"tbodyRef",ref:a},[(C(),M(fe,null,nt(3,(v,w)=>b("tr",{key:w},[(C(),M(fe,null,nt(4,(_,S)=>(C(),M(fe,{key:w+"_"+S},[w*4+S<10?(C(),M("td",{key:0,ref_for:!0,ref:x=>p(g(c)+w*4+S)&&(u.value=x),class:D(["available",f(g(c)+w*4+S)]),"aria-selected":`${p(g(c)+w*4+S)}`,tabindex:p(g(c)+w*4+S)?0:-1,onKeydown:[Pt(et(h,["prevent","stop"]),["space"]),Pt(et(h,["prevent","stop"]),["enter"])]},[b("div",null,[b("span",Ese,A(g(c)+w*4+S),1)])],42,$se)):(C(),M("td",xse))],64))),64))])),64))],512)],10,Sse))}});var Tse=ze(Mse,[["__file","basic-year-table.vue"]]);const Ose=["onClick"],Ise=["aria-label"],Ase=["aria-label"],Nse=["aria-label"],Pse=["aria-label"],Lse=Q({__name:"panel-date-pick",props:nse,emits:["pick","set-picker-option","panel-change"],setup(e,{emit:t}){const n=e,o=(ie,we,ae)=>!0,r=Re("picker-panel"),s=Re("date-picker"),i=_d(),l=Kr(),{t:a,lang:u}=Kt(),c=Be("EP_PICKER_BASE"),d=Be(H0),{shortcuts:f,disabledDate:p,cellClassName:h,defaultTime:m}=c.props,y=pn(c.props,"defaultValue"),v=K(),w=K(ut().locale(u.value)),_=K(!1);let S=!1;const x=R(()=>ut(m).locale(u.value)),E=R(()=>w.value.month()),T=R(()=>w.value.year()),O=K([]),P=K(null),N=K(null),F=ie=>O.value.length>0?o(ie,O.value,n.format||"HH:mm:ss"):!0,B=ie=>m&&!J.value&&!_.value&&!S?x.value.year(ie.year()).month(ie.month()).date(ie.date()):xe.value?ie.millisecond(0):ie.startOf("day"),Y=(ie,...we)=>{if(!ie)t("pick",ie,...we);else if(Me(ie)){const ae=ie.map(B);t("pick",ae,...we)}else t("pick",B(ie),...we);P.value=null,N.value=null,_.value=!1,S=!1},Z=async(ie,we)=>{if(I.value==="date"){ie=ie;let ae=n.parsedValue?n.parsedValue.year(ie.year()).month(ie.month()).date(ie.date()):ie;F(ae)||(ae=O.value[0][0].year(ie.year()).month(ie.month()).date(ie.date())),w.value=ae,Y(ae,xe.value||we),n.type==="datetime"&&(await ot(),pe())}else I.value==="week"?Y(ie.date):I.value==="dates"&&Y(ie,!0)},U=ie=>{const we=ie?"add":"subtract";w.value=w.value[we](1,"month"),$e("month")},j=ie=>{const we=w.value,ae=ie?"add":"subtract";w.value=V.value==="year"?we[ae](10,"year"):we[ae](1,"year"),$e("year")},V=K("date"),H=R(()=>{const ie=a("el.datepicker.year");if(V.value==="year"){const we=Math.floor(T.value/10)*10;return ie?`${we} ${ie} - ${we+9} ${ie}`:`${we} - ${we+9}`}return`${T.value} ${ie}`}),L=ie=>{const we=Xe(ie.value)?ie.value():ie.value;if(we){S=!0,Y(ut(we).locale(u.value));return}ie.onClick&&ie.onClick({attrs:i,slots:l,emit:t})},I=R(()=>{const{type:ie}=n;return["week","month","year","years","dates"].includes(ie)?ie:"date"}),X=R(()=>I.value==="date"?V.value:I.value),oe=R(()=>!!f.length),z=async ie=>{w.value=w.value.startOf("month").month(ie),I.value==="month"?Y(w.value,!1):(V.value="date",["month","year","date","week"].includes(I.value)&&(Y(w.value,!0),await ot(),pe())),$e("month")},ge=async(ie,we)=>{I.value==="year"?(w.value=w.value.startOf("year").year(ie),Y(w.value,!1)):I.value==="years"?Y(ie,we??!0):(w.value=w.value.year(ie),V.value="month",["month","year","date","week"].includes(I.value)&&(Y(w.value,!0),await ot(),pe())),$e("year")},Oe=async ie=>{V.value=ie,await ot(),pe()},xe=R(()=>n.type==="datetime"||n.type==="datetimerange"),ee=R(()=>{const ie=xe.value||I.value==="dates",we=I.value==="years",ae=V.value==="date",Se=V.value==="year";return ie&&ae||we&&Se}),de=R(()=>p?n.parsedValue?Me(n.parsedValue)?p(n.parsedValue[0].toDate()):p(n.parsedValue.toDate()):!0:!1),ve=()=>{if(I.value==="dates"||I.value==="years")Y(n.parsedValue);else{let ie=n.parsedValue;if(!ie){const we=ut(m).locale(u.value),ae=te();ie=we.year(ae.year()).month(ae.month()).date(ae.date())}w.value=ie,Y(ie)}},le=R(()=>p?p(ut().locale(u.value).toDate()):!1),Ie=()=>{const we=ut().locale(u.value).toDate();_.value=!0,(!p||!p(we))&&F(we)&&(w.value=ut().locale(u.value),Y(w.value))},Ge=R(()=>n.timeFormat||dT(n.format)),G=R(()=>n.dateFormat||cT(n.format)),J=R(()=>{if(N.value)return N.value;if(!(!n.parsedValue&&!y.value))return(n.parsedValue||w.value).format(Ge.value)}),ue=R(()=>{if(P.value)return P.value;if(!(!n.parsedValue&&!y.value))return(n.parsedValue||w.value).format(G.value)}),_e=K(!1),ye=()=>{_e.value=!0},Ae=()=>{_e.value=!1},Le=ie=>({hour:ie.hour(),minute:ie.minute(),second:ie.second(),year:ie.year(),month:ie.month(),date:ie.date()}),Ee=(ie,we,ae)=>{const{hour:Se,minute:Fe,second:st}=Le(ie),se=n.parsedValue?n.parsedValue.hour(Se).minute(Fe).second(st):ie;w.value=se,Y(w.value,!0),ae||(_e.value=we)},Pe=ie=>{const we=ut(ie,Ge.value).locale(u.value);if(we.isValid()&&F(we)){const{year:ae,month:Se,date:Fe}=Le(w.value);w.value=we.year(ae).month(Se).date(Fe),N.value=null,_e.value=!1,Y(w.value,!0)}},me=ie=>{const we=ut(ie,G.value).locale(u.value);if(we.isValid()){if(p&&p(we.toDate()))return;const{hour:ae,minute:Se,second:Fe}=Le(w.value);w.value=we.hour(ae).minute(Se).second(Fe),P.value=null,Y(w.value,!0)}},je=ie=>ut.isDayjs(ie)&&ie.isValid()&&(p?!p(ie.toDate()):!0),Ze=ie=>Me(ie)?ie.map(we=>we.format(n.format)):ie.format(n.format),ce=ie=>ut(ie,n.format).locale(u.value),te=()=>{const ie=ut(y.value).locale(u.value);if(!y.value){const we=x.value;return ut().hour(we.hour()).minute(we.minute()).second(we.second()).locale(u.value)}return ie},pe=async()=>{var ie;["week","month","year","date"].includes(I.value)&&((ie=v.value)==null||ie.focus(),I.value==="week"&&Je(rt.down))},Ve=ie=>{const{code:we}=ie;[rt.up,rt.down,rt.left,rt.right,rt.home,rt.end,rt.pageUp,rt.pageDown].includes(we)&&(Je(we),ie.stopPropagation(),ie.preventDefault()),[rt.enter,rt.space,rt.numpadEnter].includes(we)&&P.value===null&&N.value===null&&(ie.preventDefault(),Y(w.value,!1))},Je=ie=>{var we;const{up:ae,down:Se,left:Fe,right:st,home:se,end:De,pageUp:Ot,pageDown:mn}=rt,Un={year:{[ae]:-4,[Se]:4,[Fe]:-1,[st]:1,offset:(qt,nr)=>qt.setFullYear(qt.getFullYear()+nr)},month:{[ae]:-4,[Se]:4,[Fe]:-1,[st]:1,offset:(qt,nr)=>qt.setMonth(qt.getMonth()+nr)},week:{[ae]:-1,[Se]:1,[Fe]:-1,[st]:1,offset:(qt,nr)=>qt.setDate(qt.getDate()+nr*7)},date:{[ae]:-7,[Se]:7,[Fe]:-1,[st]:1,[se]:qt=>-qt.getDay(),[De]:qt=>-qt.getDay()+6,[Ot]:qt=>-new Date(qt.getFullYear(),qt.getMonth(),0).getDate(),[mn]:qt=>new Date(qt.getFullYear(),qt.getMonth()+1,0).getDate(),offset:(qt,nr)=>qt.setDate(qt.getDate()+nr)}},Zr=w.value.toDate();for(;Math.abs(w.value.diff(Zr,"year",!0))<1;){const qt=Un[X.value];if(!qt)return;if(qt.offset(Zr,Xe(qt[ie])?qt[ie](Zr):(we=qt[ie])!=null?we:0),p&&p(Zr))break;const nr=ut(Zr).locale(u.value);w.value=nr,t("pick",nr,!0);break}},$e=ie=>{t("panel-change",w.value.toDate(),ie,V.value)};return Te(()=>I.value,ie=>{if(["month","year"].includes(ie)){V.value=ie;return}else if(ie==="years"){V.value="year";return}V.value="date"},{immediate:!0}),Te(()=>V.value,()=>{d==null||d.updatePopper()}),Te(()=>y.value,ie=>{ie&&(w.value=te())},{immediate:!0}),Te(()=>n.parsedValue,ie=>{if(ie){if(I.value==="dates"||I.value==="years"||Array.isArray(ie))return;w.value=ie}else w.value=te()},{immediate:!0}),t("set-picker-option",["isValidValue",je]),t("set-picker-option",["formatToString",Ze]),t("set-picker-option",["parseUserInput",ce]),t("set-picker-option",["handleFocusPicker",pe]),(ie,we)=>(C(),M("div",{class:D([g(r).b(),g(s).b(),{"has-sidebar":ie.$slots.sidebar||g(oe),"has-time":g(xe)}])},[b("div",{class:D(g(r).e("body-wrapper"))},[he(ie.$slots,"sidebar",{class:D(g(r).e("sidebar"))}),g(oe)?(C(),M("div",{key:0,class:D(g(r).e("sidebar"))},[(C(!0),M(fe,null,nt(g(f),(ae,Se)=>(C(),M("button",{key:Se,type:"button",class:D(g(r).e("shortcut")),onClick:Fe=>L(ae)},A(ae.text),11,Ose))),128))],2)):W("v-if",!0),b("div",{class:D(g(r).e("body"))},[g(xe)?(C(),M("div",{key:0,class:D(g(s).e("time-header"))},[b("span",{class:D(g(s).e("editor-wrap"))},[k(g(At),{placeholder:g(a)("el.datepicker.selectDate"),"model-value":g(ue),size:"small","validate-event":!1,onInput:we[0]||(we[0]=ae=>P.value=ae),onChange:me},null,8,["placeholder","model-value"])],2),He((C(),M("span",{class:D(g(s).e("editor-wrap"))},[k(g(At),{placeholder:g(a)("el.datepicker.selectTime"),"model-value":g(J),size:"small","validate-event":!1,onFocus:ye,onInput:we[1]||(we[1]=ae=>N.value=ae),onChange:Pe},null,8,["placeholder","model-value"]),k(g(yb),{visible:_e.value,format:g(Ge),"parsed-value":w.value,onPick:Ee},null,8,["visible","format","parsed-value"])],2)),[[g(id),Ae]])],2)):W("v-if",!0),He(b("div",{class:D([g(s).e("header"),(V.value==="year"||V.value==="month")&&g(s).e("header--bordered")])},[b("span",{class:D(g(s).e("prev-btn"))},[b("button",{type:"button","aria-label":g(a)("el.datepicker.prevYear"),class:D(["d-arrow-left",g(r).e("icon-btn")]),onClick:we[2]||(we[2]=ae=>j(!1))},[k(g(Ne),null,{default:$(()=>[k(g(Jc))]),_:1})],10,Ise),He(b("button",{type:"button","aria-label":g(a)("el.datepicker.prevMonth"),class:D([g(r).e("icon-btn"),"arrow-left"]),onClick:we[3]||(we[3]=ae=>U(!1))},[k(g(Ne),null,{default:$(()=>[k(g(au))]),_:1})],10,Ase),[[en,V.value==="date"]])],2),b("span",{role:"button",class:D(g(s).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:we[4]||(we[4]=Pt(ae=>Oe("year"),["enter"])),onClick:we[5]||(we[5]=ae=>Oe("year"))},A(g(H)),35),He(b("span",{role:"button","aria-live":"polite",tabindex:"0",class:D([g(s).e("header-label"),{active:V.value==="month"}]),onKeydown:we[6]||(we[6]=Pt(ae=>Oe("month"),["enter"])),onClick:we[7]||(we[7]=ae=>Oe("month"))},A(g(a)(`el.datepicker.month${g(E)+1}`)),35),[[en,V.value==="date"]]),b("span",{class:D(g(s).e("next-btn"))},[He(b("button",{type:"button","aria-label":g(a)("el.datepicker.nextMonth"),class:D([g(r).e("icon-btn"),"arrow-right"]),onClick:we[8]||(we[8]=ae=>U(!0))},[k(g(Ne),null,{default:$(()=>[k(g(js))]),_:1})],10,Nse),[[en,V.value==="date"]]),b("button",{type:"button","aria-label":g(a)("el.datepicker.nextYear"),class:D([g(r).e("icon-btn"),"d-arrow-right"]),onClick:we[9]||(we[9]=ae=>j(!0))},[k(g(Ne),null,{default:$(()=>[k(g(Xc))]),_:1})],10,Pse)],2)],2),[[en,V.value!=="time"]]),b("div",{class:D(g(r).e("content")),onKeydown:Ve},[V.value==="date"?(C(),q(wb,{key:0,ref_key:"currentViewRef",ref:v,"selection-mode":g(I),date:w.value,"parsed-value":ie.parsedValue,"disabled-date":g(p),"cell-class-name":g(h),onPick:Z},null,8,["selection-mode","date","parsed-value","disabled-date","cell-class-name"])):W("v-if",!0),V.value==="year"?(C(),q(Tse,{key:1,ref_key:"currentViewRef",ref:v,"selection-mode":g(I),date:w.value,"disabled-date":g(p),"parsed-value":ie.parsedValue,onPick:ge},null,8,["selection-mode","date","disabled-date","parsed-value"])):W("v-if",!0),V.value==="month"?(C(),q(Cb,{key:2,ref_key:"currentViewRef",ref:v,date:w.value,"parsed-value":ie.parsedValue,"disabled-date":g(p),onPick:z},null,8,["date","parsed-value","disabled-date"])):W("v-if",!0)],34)],2)],2),He(b("div",{class:D(g(r).e("footer"))},[He(k(g(pt),{text:"",size:"small",class:D(g(r).e("link-btn")),disabled:g(le),onClick:Ie},{default:$(()=>[ne(A(g(a)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[en,g(I)!=="dates"&&g(I)!=="years"]]),k(g(pt),{plain:"",size:"small",class:D(g(r).e("link-btn")),disabled:g(de),onClick:ve},{default:$(()=>[ne(A(g(a)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2),[[en,g(ee)]])],2))}});var Rse=ze(Lse,[["__file","panel-date-pick.vue"]]);const Dse=We({...ZT,...JT}),Fse=e=>{const{emit:t}=at(),n=_d(),o=Kr();return s=>{const i=Xe(s.value)?s.value():s.value;if(i){t("pick",[ut(i[0]).locale(e.value),ut(i[1]).locale(e.value)]);return}s.onClick&&s.onClick({attrs:n,slots:o,emit:t})}},QT=(e,{defaultValue:t,leftDate:n,rightDate:o,unit:r,onParsedValueChanged:s})=>{const{emit:i}=at(),{pickerNs:l}=Be(D3),a=Re("date-range-picker"),{t:u,lang:c}=Kt(),d=Fse(c),f=K(),p=K(),h=K({endDate:null,selecting:!1}),m=_=>{h.value=_},y=(_=!1)=>{const S=g(f),x=g(p);_b([S,x])&&i("pick",[S,x],_)},v=_=>{h.value.selecting=_,_||(h.value.endDate=null)},w=()=>{const[_,S]=XT(g(t),{lang:g(c),unit:r,unlinkPanels:e.unlinkPanels});f.value=void 0,p.value=void 0,n.value=_,o.value=S};return Te(t,_=>{_&&w()},{immediate:!0}),Te(()=>e.parsedValue,_=>{if(Me(_)&&_.length===2){const[S,x]=_;f.value=S,n.value=S,p.value=x,s(g(f),g(p))}else w()},{immediate:!0}),{minDate:f,maxDate:p,rangeState:h,lang:c,ppNs:l,drpNs:a,handleChangeRange:m,handleRangeConfirm:y,handleShortcutClick:d,onSelect:v,t:u}},Vse=["onClick"],Bse=["aria-label"],zse=["aria-label"],jse=["disabled","aria-label"],Hse=["disabled","aria-label"],Use=["disabled","aria-label"],Wse=["disabled","aria-label"],Kse=["aria-label"],qse=["aria-label"],vm="month",Gse=Q({__name:"panel-date-range",props:Dse,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(e,{emit:t}){const n=e,o=Be("EP_PICKER_BASE"),{disabledDate:r,cellClassName:s,format:i,defaultTime:l,clearable:a}=o.props,u=pn(o.props,"shortcuts"),c=pn(o.props,"defaultValue"),{lang:d}=Kt(),f=K(ut().locale(d.value)),p=K(ut().locale(d.value).add(1,vm)),{minDate:h,maxDate:m,rangeState:y,ppNs:v,drpNs:w,handleChangeRange:_,handleRangeConfirm:S,handleShortcutClick:x,onSelect:E,t:T}=QT(n,{defaultValue:c,leftDate:f,rightDate:p,unit:vm,onParsedValueChanged:we}),O=K({min:null,max:null}),P=K({min:null,max:null}),N=R(()=>`${f.value.year()} ${T("el.datepicker.year")} ${T(`el.datepicker.month${f.value.month()+1}`)}`),F=R(()=>`${p.value.year()} ${T("el.datepicker.year")} ${T(`el.datepicker.month${p.value.month()+1}`)}`),B=R(()=>f.value.year()),Y=R(()=>f.value.month()),Z=R(()=>p.value.year()),U=R(()=>p.value.month()),j=R(()=>!!u.value.length),V=R(()=>O.value.min!==null?O.value.min:h.value?h.value.format(oe.value):""),H=R(()=>O.value.max!==null?O.value.max:m.value||h.value?(m.value||h.value).format(oe.value):""),L=R(()=>P.value.min!==null?P.value.min:h.value?h.value.format(X.value):""),I=R(()=>P.value.max!==null?P.value.max:m.value||h.value?(m.value||h.value).format(X.value):""),X=R(()=>n.timeFormat||dT(i)),oe=R(()=>n.dateFormat||cT(i)),z=ae=>_b(ae)&&(r?!r(ae[0].toDate())&&!r(ae[1].toDate()):!0),ge=()=>{f.value=f.value.subtract(1,"year"),n.unlinkPanels||(p.value=f.value.add(1,"month")),Ge("year")},Oe=()=>{f.value=f.value.subtract(1,"month"),n.unlinkPanels||(p.value=f.value.add(1,"month")),Ge("month")},xe=()=>{n.unlinkPanels?p.value=p.value.add(1,"year"):(f.value=f.value.add(1,"year"),p.value=f.value.add(1,"month")),Ge("year")},ee=()=>{n.unlinkPanels?p.value=p.value.add(1,"month"):(f.value=f.value.add(1,"month"),p.value=f.value.add(1,"month")),Ge("month")},de=()=>{f.value=f.value.add(1,"year"),Ge("year")},ve=()=>{f.value=f.value.add(1,"month"),Ge("month")},le=()=>{p.value=p.value.subtract(1,"year"),Ge("year")},Ie=()=>{p.value=p.value.subtract(1,"month"),Ge("month")},Ge=ae=>{t("panel-change",[f.value.toDate(),p.value.toDate()],ae)},G=R(()=>{const ae=(Y.value+1)%12,Se=Y.value+1>=12?1:0;return n.unlinkPanels&&new Date(B.value+Se,ae)<new Date(Z.value,U.value)}),J=R(()=>n.unlinkPanels&&Z.value*12+U.value-(B.value*12+Y.value+1)>=12),ue=R(()=>!(h.value&&m.value&&!y.value.selecting&&_b([h.value,m.value]))),_e=R(()=>n.type==="datetime"||n.type==="datetimerange"),ye=(ae,Se)=>{if(ae)return l?ut(l[Se]||l).locale(d.value).year(ae.year()).month(ae.month()).date(ae.date()):ae},Ae=(ae,Se=!0)=>{const Fe=ae.minDate,st=ae.maxDate,se=ye(Fe,0),De=ye(st,1);m.value===De&&h.value===se||(t("calendar-change",[Fe.toDate(),st&&st.toDate()]),m.value=De,h.value=se,!(!Se||_e.value)&&S())},Le=K(!1),Ee=K(!1),Pe=()=>{Le.value=!1},me=()=>{Ee.value=!1},je=(ae,Se)=>{O.value[Se]=ae;const Fe=ut(ae,oe.value).locale(d.value);if(Fe.isValid()){if(r&&r(Fe.toDate()))return;Se==="min"?(f.value=Fe,h.value=(h.value||f.value).year(Fe.year()).month(Fe.month()).date(Fe.date()),!n.unlinkPanels&&(!m.value||m.value.isBefore(h.value))&&(p.value=Fe.add(1,"month"),m.value=h.value.add(1,"month"))):(p.value=Fe,m.value=(m.value||p.value).year(Fe.year()).month(Fe.month()).date(Fe.date()),!n.unlinkPanels&&(!h.value||h.value.isAfter(m.value))&&(f.value=Fe.subtract(1,"month"),h.value=m.value.subtract(1,"month")))}},Ze=(ae,Se)=>{O.value[Se]=null},ce=(ae,Se)=>{P.value[Se]=ae;const Fe=ut(ae,X.value).locale(d.value);Fe.isValid()&&(Se==="min"?(Le.value=!0,h.value=(h.value||f.value).hour(Fe.hour()).minute(Fe.minute()).second(Fe.second()),(!m.value||m.value.isBefore(h.value))&&(m.value=h.value)):(Ee.value=!0,m.value=(m.value||p.value).hour(Fe.hour()).minute(Fe.minute()).second(Fe.second()),p.value=m.value,m.value&&m.value.isBefore(h.value)&&(h.value=m.value)))},te=(ae,Se)=>{P.value[Se]=null,Se==="min"?(f.value=h.value,Le.value=!1):(p.value=m.value,Ee.value=!1)},pe=(ae,Se,Fe)=>{P.value.min||(ae&&(f.value=ae,h.value=(h.value||f.value).hour(ae.hour()).minute(ae.minute()).second(ae.second())),Fe||(Le.value=Se),(!m.value||m.value.isBefore(h.value))&&(m.value=h.value,p.value=ae))},Ve=(ae,Se,Fe)=>{P.value.max||(ae&&(p.value=ae,m.value=(m.value||p.value).hour(ae.hour()).minute(ae.minute()).second(ae.second())),Fe||(Ee.value=Se),m.value&&m.value.isBefore(h.value)&&(h.value=m.value))},Je=()=>{f.value=XT(g(c),{lang:g(d),unit:"month",unlinkPanels:n.unlinkPanels})[0],p.value=f.value.add(1,"month"),m.value=void 0,h.value=void 0,t("pick",null)},$e=ae=>Me(ae)?ae.map(Se=>Se.format(i)):ae.format(i),ie=ae=>Me(ae)?ae.map(Se=>ut(Se,i).locale(d.value)):ut(ae,i).locale(d.value);function we(ae,Se){if(n.unlinkPanels&&Se){const Fe=(ae==null?void 0:ae.year())||0,st=(ae==null?void 0:ae.month())||0,se=Se.year(),De=Se.month();p.value=Fe===se&&st===De?Se.add(1,vm):Se}else p.value=f.value.add(1,vm),Se&&(p.value=p.value.hour(Se.hour()).minute(Se.minute()).second(Se.second()))}return t("set-picker-option",["isValidValue",z]),t("set-picker-option",["parseUserInput",ie]),t("set-picker-option",["formatToString",$e]),t("set-picker-option",["handleClear",Je]),(ae,Se)=>(C(),M("div",{class:D([g(v).b(),g(w).b(),{"has-sidebar":ae.$slots.sidebar||g(j),"has-time":g(_e)}])},[b("div",{class:D(g(v).e("body-wrapper"))},[he(ae.$slots,"sidebar",{class:D(g(v).e("sidebar"))}),g(j)?(C(),M("div",{key:0,class:D(g(v).e("sidebar"))},[(C(!0),M(fe,null,nt(g(u),(Fe,st)=>(C(),M("button",{key:st,type:"button",class:D(g(v).e("shortcut")),onClick:se=>g(x)(Fe)},A(Fe.text),11,Vse))),128))],2)):W("v-if",!0),b("div",{class:D(g(v).e("body"))},[g(_e)?(C(),M("div",{key:0,class:D(g(w).e("time-header"))},[b("span",{class:D(g(w).e("editors-wrap"))},[b("span",{class:D(g(w).e("time-picker-wrap"))},[k(g(At),{size:"small",disabled:g(y).selecting,placeholder:g(T)("el.datepicker.startDate"),class:D(g(w).e("editor")),"model-value":g(V),"validate-event":!1,onInput:Se[0]||(Se[0]=Fe=>je(Fe,"min")),onChange:Se[1]||(Se[1]=Fe=>Ze(Fe,"min"))},null,8,["disabled","placeholder","class","model-value"])],2),He((C(),M("span",{class:D(g(w).e("time-picker-wrap"))},[k(g(At),{size:"small",class:D(g(w).e("editor")),disabled:g(y).selecting,placeholder:g(T)("el.datepicker.startTime"),"model-value":g(L),"validate-event":!1,onFocus:Se[2]||(Se[2]=Fe=>Le.value=!0),onInput:Se[3]||(Se[3]=Fe=>ce(Fe,"min")),onChange:Se[4]||(Se[4]=Fe=>te(Fe,"min"))},null,8,["class","disabled","placeholder","model-value"]),k(g(yb),{visible:Le.value,format:g(X),"datetime-role":"start","parsed-value":f.value,onPick:pe},null,8,["visible","format","parsed-value"])],2)),[[g(id),Pe]])],2),b("span",null,[k(g(Ne),null,{default:$(()=>[k(g(js))]),_:1})]),b("span",{class:D([g(w).e("editors-wrap"),"is-right"])},[b("span",{class:D(g(w).e("time-picker-wrap"))},[k(g(At),{size:"small",class:D(g(w).e("editor")),disabled:g(y).selecting,placeholder:g(T)("el.datepicker.endDate"),"model-value":g(H),readonly:!g(h),"validate-event":!1,onInput:Se[5]||(Se[5]=Fe=>je(Fe,"max")),onChange:Se[6]||(Se[6]=Fe=>Ze(Fe,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"])],2),He((C(),M("span",{class:D(g(w).e("time-picker-wrap"))},[k(g(At),{size:"small",class:D(g(w).e("editor")),disabled:g(y).selecting,placeholder:g(T)("el.datepicker.endTime"),"model-value":g(I),readonly:!g(h),"validate-event":!1,onFocus:Se[7]||(Se[7]=Fe=>g(h)&&(Ee.value=!0)),onInput:Se[8]||(Se[8]=Fe=>ce(Fe,"max")),onChange:Se[9]||(Se[9]=Fe=>te(Fe,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"]),k(g(yb),{"datetime-role":"end",visible:Ee.value,format:g(X),"parsed-value":p.value,onPick:Ve},null,8,["visible","format","parsed-value"])],2)),[[g(id),me]])],2)],2)):W("v-if",!0),b("div",{class:D([[g(v).e("content"),g(w).e("content")],"is-left"])},[b("div",{class:D(g(w).e("header"))},[b("button",{type:"button",class:D([g(v).e("icon-btn"),"d-arrow-left"]),"aria-label":g(T)("el.datepicker.prevYear"),onClick:ge},[k(g(Ne),null,{default:$(()=>[k(g(Jc))]),_:1})],10,Bse),b("button",{type:"button",class:D([g(v).e("icon-btn"),"arrow-left"]),"aria-label":g(T)("el.datepicker.prevMonth"),onClick:Oe},[k(g(Ne),null,{default:$(()=>[k(g(au))]),_:1})],10,zse),ae.unlinkPanels?(C(),M("button",{key:0,type:"button",disabled:!g(J),class:D([[g(v).e("icon-btn"),{"is-disabled":!g(J)}],"d-arrow-right"]),"aria-label":g(T)("el.datepicker.nextYear"),onClick:de},[k(g(Ne),null,{default:$(()=>[k(g(Xc))]),_:1})],10,jse)):W("v-if",!0),ae.unlinkPanels?(C(),M("button",{key:1,type:"button",disabled:!g(G),class:D([[g(v).e("icon-btn"),{"is-disabled":!g(G)}],"arrow-right"]),"aria-label":g(T)("el.datepicker.nextMonth"),onClick:ve},[k(g(Ne),null,{default:$(()=>[k(g(js))]),_:1})],10,Hse)):W("v-if",!0),b("div",null,A(g(N)),1)],2),k(wb,{"selection-mode":"range",date:f.value,"min-date":g(h),"max-date":g(m),"range-state":g(y),"disabled-date":g(r),"cell-class-name":g(s),onChangerange:g(_),onPick:Ae,onSelect:g(E)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2),b("div",{class:D([[g(v).e("content"),g(w).e("content")],"is-right"])},[b("div",{class:D(g(w).e("header"))},[ae.unlinkPanels?(C(),M("button",{key:0,type:"button",disabled:!g(J),class:D([[g(v).e("icon-btn"),{"is-disabled":!g(J)}],"d-arrow-left"]),"aria-label":g(T)("el.datepicker.prevYear"),onClick:le},[k(g(Ne),null,{default:$(()=>[k(g(Jc))]),_:1})],10,Use)):W("v-if",!0),ae.unlinkPanels?(C(),M("button",{key:1,type:"button",disabled:!g(G),class:D([[g(v).e("icon-btn"),{"is-disabled":!g(G)}],"arrow-left"]),"aria-label":g(T)("el.datepicker.prevMonth"),onClick:Ie},[k(g(Ne),null,{default:$(()=>[k(g(au))]),_:1})],10,Wse)):W("v-if",!0),b("button",{type:"button","aria-label":g(T)("el.datepicker.nextYear"),class:D([g(v).e("icon-btn"),"d-arrow-right"]),onClick:xe},[k(g(Ne),null,{default:$(()=>[k(g(Xc))]),_:1})],10,Kse),b("button",{type:"button",class:D([g(v).e("icon-btn"),"arrow-right"]),"aria-label":g(T)("el.datepicker.nextMonth"),onClick:ee},[k(g(Ne),null,{default:$(()=>[k(g(js))]),_:1})],10,qse),b("div",null,A(g(F)),1)],2),k(wb,{"selection-mode":"range",date:p.value,"min-date":g(h),"max-date":g(m),"range-state":g(y),"disabled-date":g(r),"cell-class-name":g(s),onChangerange:g(_),onPick:Ae,onSelect:g(E)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2)],2)],2),g(_e)?(C(),M("div",{key:0,class:D(g(v).e("footer"))},[g(a)?(C(),q(g(pt),{key:0,text:"",size:"small",class:D(g(v).e("link-btn")),onClick:Je},{default:$(()=>[ne(A(g(T)("el.datepicker.clear")),1)]),_:1},8,["class"])):W("v-if",!0),k(g(pt),{plain:"",size:"small",class:D(g(v).e("link-btn")),disabled:g(ue),onClick:Se[10]||(Se[10]=Fe=>g(S)(!1))},{default:$(()=>[ne(A(g(T)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2)):W("v-if",!0)],2))}});var Yse=ze(Gse,[["__file","panel-date-range.vue"]]);const Zse=We({...JT}),Jse=["pick","set-picker-option","calendar-change"],Xse=({unlinkPanels:e,leftDate:t,rightDate:n})=>{const{t:o}=Kt(),r=()=>{t.value=t.value.subtract(1,"year"),e.value||(n.value=n.value.subtract(1,"year"))},s=()=>{e.value||(t.value=t.value.add(1,"year")),n.value=n.value.add(1,"year")},i=()=>{t.value=t.value.add(1,"year")},l=()=>{n.value=n.value.subtract(1,"year")},a=R(()=>`${t.value.year()} ${o("el.datepicker.year")}`),u=R(()=>`${n.value.year()} ${o("el.datepicker.year")}`),c=R(()=>t.value.year()),d=R(()=>n.value.year()===t.value.year()?t.value.year()+1:n.value.year());return{leftPrevYear:r,rightNextYear:s,leftNextYear:i,rightPrevYear:l,leftLabel:a,rightLabel:u,leftYear:c,rightYear:d}},Qse=["onClick"],eie=["disabled"],tie=["disabled"],ym="year",nie=Q({name:"DatePickerMonthRange"}),oie=Q({...nie,props:Zse,emits:Jse,setup(e,{emit:t}){const n=e,{lang:o}=Kt(),r=Be("EP_PICKER_BASE"),{shortcuts:s,disabledDate:i,format:l}=r.props,a=pn(r.props,"defaultValue"),u=K(ut().locale(o.value)),c=K(ut().locale(o.value).add(1,ym)),{minDate:d,maxDate:f,rangeState:p,ppNs:h,drpNs:m,handleChangeRange:y,handleRangeConfirm:v,handleShortcutClick:w,onSelect:_}=QT(n,{defaultValue:a,leftDate:u,rightDate:c,unit:ym,onParsedValueChanged:j}),S=R(()=>!!s.length),{leftPrevYear:x,rightNextYear:E,leftNextYear:T,rightPrevYear:O,leftLabel:P,rightLabel:N,leftYear:F,rightYear:B}=Xse({unlinkPanels:pn(n,"unlinkPanels"),leftDate:u,rightDate:c}),Y=R(()=>n.unlinkPanels&&B.value>F.value+1),Z=(V,H=!0)=>{const L=V.minDate,I=V.maxDate;f.value===I&&d.value===L||(t("calendar-change",[L.toDate(),I&&I.toDate()]),f.value=I,d.value=L,H&&v())},U=V=>V.map(H=>H.format(l));function j(V,H){if(n.unlinkPanels&&H){const L=(V==null?void 0:V.year())||0,I=H.year();c.value=L===I?H.add(1,ym):H}else c.value=u.value.add(1,ym)}return t("set-picker-option",["formatToString",U]),(V,H)=>(C(),M("div",{class:D([g(h).b(),g(m).b(),{"has-sidebar":!!V.$slots.sidebar||g(S)}])},[b("div",{class:D(g(h).e("body-wrapper"))},[he(V.$slots,"sidebar",{class:D(g(h).e("sidebar"))}),g(S)?(C(),M("div",{key:0,class:D(g(h).e("sidebar"))},[(C(!0),M(fe,null,nt(g(s),(L,I)=>(C(),M("button",{key:I,type:"button",class:D(g(h).e("shortcut")),onClick:X=>g(w)(L)},A(L.text),11,Qse))),128))],2)):W("v-if",!0),b("div",{class:D(g(h).e("body"))},[b("div",{class:D([[g(h).e("content"),g(m).e("content")],"is-left"])},[b("div",{class:D(g(m).e("header"))},[b("button",{type:"button",class:D([g(h).e("icon-btn"),"d-arrow-left"]),onClick:H[0]||(H[0]=(...L)=>g(x)&&g(x)(...L))},[k(g(Ne),null,{default:$(()=>[k(g(Jc))]),_:1})],2),V.unlinkPanels?(C(),M("button",{key:0,type:"button",disabled:!g(Y),class:D([[g(h).e("icon-btn"),{[g(h).is("disabled")]:!g(Y)}],"d-arrow-right"]),onClick:H[1]||(H[1]=(...L)=>g(T)&&g(T)(...L))},[k(g(Ne),null,{default:$(()=>[k(g(Xc))]),_:1})],10,eie)):W("v-if",!0),b("div",null,A(g(P)),1)],2),k(Cb,{"selection-mode":"range",date:u.value,"min-date":g(d),"max-date":g(f),"range-state":g(p),"disabled-date":g(i),onChangerange:g(y),onPick:Z,onSelect:g(_)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),b("div",{class:D([[g(h).e("content"),g(m).e("content")],"is-right"])},[b("div",{class:D(g(m).e("header"))},[V.unlinkPanels?(C(),M("button",{key:0,type:"button",disabled:!g(Y),class:D([[g(h).e("icon-btn"),{"is-disabled":!g(Y)}],"d-arrow-left"]),onClick:H[2]||(H[2]=(...L)=>g(O)&&g(O)(...L))},[k(g(Ne),null,{default:$(()=>[k(g(Jc))]),_:1})],10,tie)):W("v-if",!0),b("button",{type:"button",class:D([g(h).e("icon-btn"),"d-arrow-right"]),onClick:H[3]||(H[3]=(...L)=>g(E)&&g(E)(...L))},[k(g(Ne),null,{default:$(()=>[k(g(Xc))]),_:1})],2),b("div",null,A(g(N)),1)],2),k(Cb,{"selection-mode":"range",date:c.value,"min-date":g(d),"max-date":g(f),"range-state":g(p),"disabled-date":g(i),onChangerange:g(y),onPick:Z,onSelect:g(_)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var rie=ze(oie,[["__file","panel-month-range.vue"]]);const sie=function(e){switch(e){case"daterange":case"datetimerange":return Yse;case"monthrange":return rie;default:return Rse}};ut.extend(uoe);ut.extend(Hre);ut.extend(aT);ut.extend(Wre);ut.extend(qre);ut.extend(Yre);ut.extend(Jre);ut.extend(Qre);var iie=Q({name:"ElDatePicker",install:null,props:ese,emits:["update:modelValue"],setup(e,{expose:t,emit:n,slots:o}){const r=Re("picker-panel");wt("ElPopperOptions",Dn(pn(e,"popperOptions"))),wt(D3,{slots:o,pickerNs:r});const s=K();t({focus:(a=!0)=>{var u;(u=s.value)==null||u.focus(a)},handleOpen:()=>{var a;(a=s.value)==null||a.handleOpen()},handleClose:()=>{var a;(a=s.value)==null||a.handleClose()}});const l=a=>{n("update:modelValue",a)};return()=>{var a;const u=(a=e.format)!=null?a:Lne[e.type]||qu,c=sie(e.type);return k(zne,un(e,{format:u,type:e.type,ref:s,"onUpdate:modelValue":l}),{default:d=>k(c,d,null),"range-separator":o["range-separator"]})}}});const n1=iie;n1.install=e=>{e.component(n1.name,n1)};const lie=n1,aie=We({mask:{type:Boolean,default:!0},customMaskEvent:{type:Boolean,default:!1},overlayClass:{type:Ce([String,Array,Object])},zIndex:{type:Ce([String,Number])}}),uie={click:e=>e instanceof MouseEvent},cie="overlay";var die=Q({name:"ElOverlay",props:aie,emits:uie,setup(e,{slots:t,emit:n}){const o=Re(cie),r=a=>{n("click",a)},{onClick:s,onMousedown:i,onMouseup:l}=C3(e.customMaskEvent?void 0:r);return()=>e.mask?k("div",{class:[o.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:s,onMousedown:i,onMouseup:l},[he(t,"default")],Gm.STYLE|Gm.CLASS|Gm.PROPS,["onClick","onMouseup","onMousedown"]):lt("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[he(t,"default")])}});const B3=die,eO=Symbol("dialogInjectionKey"),tO=We({center:Boolean,alignCenter:Boolean,closeIcon:{type:Oo},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),fie={close:()=>!0},pie=["aria-level"],hie=["aria-label"],mie=["id"],gie=Q({name:"ElDialogContent"}),vie=Q({...gie,props:tO,emits:fie,setup(e){const t=e,{t:n}=Kt(),{Close:o}=sM,{dialogRef:r,headerRef:s,bodyId:i,ns:l,style:a}=Be(eO),{focusTrapRef:u}=Be(A3),c=R(()=>[l.b(),l.is("fullscreen",t.fullscreen),l.is("draggable",t.draggable),l.is("align-center",t.alignCenter),{[l.m("center")]:t.center}]),d=f3(u,r),f=R(()=>t.draggable),p=R(()=>t.overflow);return uM(r,s,f,p),(h,m)=>(C(),M("div",{ref:g(d),class:D(g(c)),style:Qe(g(a)),tabindex:"-1"},[b("header",{ref_key:"headerRef",ref:s,class:D([g(l).e("header"),{"show-close":h.showClose}])},[he(h.$slots,"header",{},()=>[b("span",{role:"heading","aria-level":h.ariaLevel,class:D(g(l).e("title"))},A(h.title),11,pie)]),h.showClose?(C(),M("button",{key:0,"aria-label":g(n)("el.dialog.close"),class:D(g(l).e("headerbtn")),type:"button",onClick:m[0]||(m[0]=y=>h.$emit("close"))},[k(g(Ne),{class:D(g(l).e("close"))},{default:$(()=>[(C(),q(Lt(h.closeIcon||g(o))))]),_:1},8,["class"])],10,hie)):W("v-if",!0)],2),b("div",{id:g(i),class:D(g(l).e("body"))},[he(h.$slots,"default")],10,mie),h.$slots.footer?(C(),M("footer",{key:0,class:D(g(l).e("footer"))},[he(h.$slots,"footer")],2)):W("v-if",!0)],6))}});var yie=ze(vie,[["__file","dialog-content.vue"]]);const nO=We({...tO,appendToBody:Boolean,appendTo:{type:Ce(String),default:"body"},beforeClose:{type:Ce(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:{type:Boolean,default:!1},headerAriaLevel:{type:String,default:"2"}}),oO={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[Jt]:e=>Br(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},rO=(e,t)=>{var n;const r=at().emit,{nextZIndex:s}=D0();let i="";const l=Hr(),a=Hr(),u=K(!1),c=K(!1),d=K(!1),f=K((n=e.zIndex)!=null?n:s());let p,h;const m=ph("namespace",Hf),y=R(()=>{const U={},j=`--${m.value}-dialog`;return e.fullscreen||(e.top&&(U[`${j}-margin-top`]=e.top),e.width&&(U[`${j}-width`]=Zo(e.width))),U}),v=R(()=>e.alignCenter?{display:"flex"}:{});function w(){r("opened")}function _(){r("closed"),r(Jt,!1),e.destroyOnClose&&(d.value=!1)}function S(){r("close")}function x(){h==null||h(),p==null||p(),e.openDelay&&e.openDelay>0?{stop:p}=V_(()=>P(),e.openDelay):P()}function E(){p==null||p(),h==null||h(),e.closeDelay&&e.closeDelay>0?{stop:h}=V_(()=>N(),e.closeDelay):N()}function T(){function U(j){j||(c.value=!0,u.value=!1)}e.beforeClose?e.beforeClose(U):E()}function O(){e.closeOnClickModal&&T()}function P(){xt&&(u.value=!0)}function N(){u.value=!1}function F(){r("openAutoFocus")}function B(){r("closeAutoFocus")}function Y(U){var j;((j=U.detail)==null?void 0:j.focusReason)==="pointer"&&U.preventDefault()}e.lockScroll&&fM(u);function Z(){e.closeOnPressEscape&&T()}return Te(()=>e.modelValue,U=>{U?(c.value=!1,x(),d.value=!0,f.value=Wx(e.zIndex)?s():f.value++,ot(()=>{r("open"),t.value&&(t.value.scrollTop=0)})):u.value&&E()}),Te(()=>e.fullscreen,U=>{t.value&&(U?(i=t.value.style.transform,t.value.style.transform=""):t.value.style.transform=i)}),Ct(()=>{e.modelValue&&(u.value=!0,d.value=!0,x())}),{afterEnter:w,afterLeave:_,beforeLeave:S,handleClose:T,onModalClick:O,close:E,doClose:N,onOpenAutoFocus:F,onCloseAutoFocus:B,onCloseRequested:Z,onFocusoutPrevented:Y,titleId:l,bodyId:a,closed:c,style:y,overlayDialogStyle:v,rendered:d,visible:u,zIndex:f}},_ie=["aria-label","aria-labelledby","aria-describedby"],bie=Q({name:"ElDialog",inheritAttrs:!1}),wie=Q({...bie,props:nO,emits:oO,setup(e,{expose:t}){const n=e,o=Kr();Ua({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},R(()=>!!o.title));const r=Re("dialog"),s=K(),i=K(),l=K(),{visible:a,titleId:u,bodyId:c,style:d,overlayDialogStyle:f,rendered:p,zIndex:h,afterEnter:m,afterLeave:y,beforeLeave:v,handleClose:w,onModalClick:_,onOpenAutoFocus:S,onCloseAutoFocus:x,onCloseRequested:E,onFocusoutPrevented:T}=rO(n,s);wt(eO,{dialogRef:s,headerRef:i,bodyId:c,ns:r,rendered:p,style:d});const O=C3(_),P=R(()=>n.draggable&&!n.fullscreen);return t({visible:a,dialogContentRef:l}),(N,F)=>(C(),q(_s,{to:N.appendTo,disabled:N.appendTo!=="body"?!1:!N.appendToBody},[k(_r,{name:"dialog-fade",onAfterEnter:g(m),onAfterLeave:g(y),onBeforeLeave:g(v),persisted:""},{default:$(()=>[He(k(g(B3),{"custom-mask-event":"",mask:N.modal,"overlay-class":N.modalClass,"z-index":g(h)},{default:$(()=>[b("div",{role:"dialog","aria-modal":"true","aria-label":N.title||void 0,"aria-labelledby":N.title?void 0:g(u),"aria-describedby":g(c),class:D(`${g(r).namespace.value}-overlay-dialog`),style:Qe(g(f)),onClick:F[0]||(F[0]=(...B)=>g(O).onClick&&g(O).onClick(...B)),onMousedown:F[1]||(F[1]=(...B)=>g(O).onMousedown&&g(O).onMousedown(...B)),onMouseup:F[2]||(F[2]=(...B)=>g(O).onMouseup&&g(O).onMouseup(...B))},[k(g(j0),{loop:"",trapped:g(a),"focus-start-el":"container",onFocusAfterTrapped:g(S),onFocusAfterReleased:g(x),onFocusoutPrevented:g(T),onReleaseRequested:g(E)},{default:$(()=>[g(p)?(C(),q(yie,un({key:0,ref_key:"dialogContentRef",ref:l},N.$attrs,{center:N.center,"align-center":N.alignCenter,"close-icon":N.closeIcon,draggable:g(P),overflow:N.overflow,fullscreen:N.fullscreen,"show-close":N.showClose,title:N.title,"aria-level":N.headerAriaLevel,onClose:g(w)}),tu({header:$(()=>[N.$slots.title?he(N.$slots,"title",{key:1}):he(N.$slots,"header",{key:0,close:g(w),titleId:g(u),titleClass:g(r).e("title")})]),default:$(()=>[he(N.$slots,"default")]),_:2},[N.$slots.footer?{name:"footer",fn:$(()=>[he(N.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):W("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,_ie)]),_:3},8,["mask","overlay-class","z-index"]),[[en,g(a)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])],8,["to","disabled"]))}});var Cie=ze(wie,[["__file","dialog.vue"]]);const yh=Zt(Cie),kie=We({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:Ce(String),default:"solid"}}),Sie=Q({name:"ElDivider"}),$ie=Q({...Sie,props:kie,setup(e){const t=e,n=Re("divider"),o=R(()=>n.cssVar({"border-style":t.borderStyle}));return(r,s)=>(C(),M("div",{class:D([g(n).b(),g(n).m(r.direction)]),style:Qe(g(o)),role:"separator"},[r.$slots.default&&r.direction!=="vertical"?(C(),M("div",{key:0,class:D([g(n).e("text"),g(n).is(r.contentPosition)])},[he(r.$slots,"default")],2)):W("v-if",!0)],6))}});var Eie=ze($ie,[["__file","divider.vue"]]);const xie=Zt(Eie),Mie=We({...nO,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"}}),Tie=oO,Oie=["aria-label","aria-labelledby","aria-describedby"],Iie=["id","aria-level"],Aie=["aria-label"],Nie=["id"],Pie=Q({name:"ElDrawer",inheritAttrs:!1}),Lie=Q({...Pie,props:Mie,emits:Tie,setup(e,{expose:t}){const n=e,o=Kr();Ua({scope:"el-drawer",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/drawer.html#slots"},R(()=>!!o.title));const r=K(),s=K(),i=Re("drawer"),{t:l}=Kt(),{afterEnter:a,afterLeave:u,beforeLeave:c,visible:d,rendered:f,titleId:p,bodyId:h,zIndex:m,onModalClick:y,onOpenAutoFocus:v,onCloseAutoFocus:w,onFocusoutPrevented:_,onCloseRequested:S,handleClose:x}=rO(n,r),E=R(()=>n.direction==="rtl"||n.direction==="ltr"),T=R(()=>Zo(n.size));return t({handleClose:x,afterEnter:a,afterLeave:u}),(O,P)=>(C(),q(_s,{to:"body",disabled:!O.appendToBody},[k(_r,{name:g(i).b("fade"),onAfterEnter:g(a),onAfterLeave:g(u),onBeforeLeave:g(c),persisted:""},{default:$(()=>[He(k(g(B3),{mask:O.modal,"overlay-class":O.modalClass,"z-index":g(m),onClick:g(y)},{default:$(()=>[k(g(j0),{loop:"",trapped:g(d),"focus-trap-el":r.value,"focus-start-el":s.value,onFocusAfterTrapped:g(v),onFocusAfterReleased:g(w),onFocusoutPrevented:g(_),onReleaseRequested:g(S)},{default:$(()=>[b("div",un({ref_key:"drawerRef",ref:r,"aria-modal":"true","aria-label":O.title||void 0,"aria-labelledby":O.title?void 0:g(p),"aria-describedby":g(h)},O.$attrs,{class:[g(i).b(),O.direction,g(d)&&"open"],style:g(E)?"width: "+g(T):"height: "+g(T),role:"dialog",onClick:P[1]||(P[1]=et(()=>{},["stop"]))}),[b("span",{ref_key:"focusStartRef",ref:s,class:D(g(i).e("sr-focus")),tabindex:"-1"},null,2),O.withHeader?(C(),M("header",{key:0,class:D(g(i).e("header"))},[O.$slots.title?he(O.$slots,"title",{key:1},()=>[W(" DEPRECATED SLOT ")]):he(O.$slots,"header",{key:0,close:g(x),titleId:g(p),titleClass:g(i).e("title")},()=>[O.$slots.title?W("v-if",!0):(C(),M("span",{key:0,id:g(p),role:"heading","aria-level":O.headerAriaLevel,class:D(g(i).e("title"))},A(O.title),11,Iie))]),O.showClose?(C(),M("button",{key:2,"aria-label":g(l)("el.drawer.close"),class:D(g(i).e("close-btn")),type:"button",onClick:P[0]||(P[0]=(...N)=>g(x)&&g(x)(...N))},[k(g(Ne),{class:D(g(i).e("close"))},{default:$(()=>[k(g(Gs))]),_:1},8,["class"])],10,Aie)):W("v-if",!0)],2)):W("v-if",!0),g(f)?(C(),M("div",{key:1,id:g(h),class:D(g(i).e("body"))},[he(O.$slots,"default")],10,Nie)):W("v-if",!0),O.$slots.footer?(C(),M("div",{key:2,class:D(g(i).e("footer"))},[he(O.$slots,"footer")],2)):W("v-if",!0)],16,Oie)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[en,g(d)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])],8,["disabled"]))}});var Rie=ze(Lie,[["__file","drawer.vue"]]);const Ql=Zt(Rie),Die=Q({inheritAttrs:!1});function Fie(e,t,n,o,r,s){return he(e.$slots,"default")}var Vie=ze(Die,[["render",Fie],["__file","collection.vue"]]);const Bie=Q({name:"ElCollectionItem",inheritAttrs:!1});function zie(e,t,n,o,r,s){return he(e.$slots,"default")}var jie=ze(Bie,[["render",zie],["__file","collection-item.vue"]]);const sO="data-el-collection-item",iO=e=>{const t=`El${e}Collection`,n=`${t}Item`,o=Symbol(t),r=Symbol(n),s={...Vie,name:t,setup(){const l=K(null),a=new Map;wt(o,{itemMap:a,getItems:()=>{const c=g(l);if(!c)return[];const d=Array.from(c.querySelectorAll(`[${sO}]`));return[...a.values()].sort((p,h)=>d.indexOf(p.ref)-d.indexOf(h.ref))},collectionRef:l})}},i={...jie,name:n,setup(l,{attrs:a}){const u=K(null),c=Be(o,void 0);wt(r,{collectionItemRef:u}),Ct(()=>{const d=g(u);d&&c.itemMap.set(d,{ref:d,...a})}),En(()=>{const d=g(u);c.itemMap.delete(d)})}};return{COLLECTION_INJECTION_KEY:o,COLLECTION_ITEM_INJECTION_KEY:r,ElCollection:s,ElCollectionItem:i}},Hie=We({style:{type:Ce([String,Array,Object])},currentTabId:{type:Ce(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:Ce(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:Uie,ElCollectionItem:Wie,COLLECTION_INJECTION_KEY:z3,COLLECTION_ITEM_INJECTION_KEY:Kie}=iO("RovingFocusGroup"),j3=Symbol("elRovingFocusGroup"),lO=Symbol("elRovingFocusGroupItem"),qie={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},Gie=(e,t)=>{if(t!=="rtl")return e;switch(e){case rt.right:return rt.left;case rt.left:return rt.right;default:return e}},Yie=(e,t,n)=>{const o=Gie(e.key,n);if(!(t==="vertical"&&[rt.left,rt.right].includes(o))&&!(t==="horizontal"&&[rt.up,rt.down].includes(o)))return qie[o]},Zie=(e,t)=>e.map((n,o)=>e[(o+t)%e.length]),H3=e=>{const{activeElement:t}=document;for(const n of e)if(n===t||(n.focus(),t!==document.activeElement))return},m8="currentTabIdChange",g8="rovingFocusGroup.entryFocus",Jie={bubbles:!1,cancelable:!0},Xie=Q({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:Hie,emits:[m8,"entryFocus"],setup(e,{emit:t}){var n;const o=K((n=e.currentTabId||e.defaultCurrentTabId)!=null?n:null),r=K(!1),s=K(!1),i=K(null),{getItems:l}=Be(z3,void 0),a=R(()=>[{outline:"none"},e.style]),u=m=>{t(m8,m)},c=()=>{r.value=!0},d=Nn(m=>{var y;(y=e.onMousedown)==null||y.call(e,m)},()=>{s.value=!0}),f=Nn(m=>{var y;(y=e.onFocus)==null||y.call(e,m)},m=>{const y=!g(s),{target:v,currentTarget:w}=m;if(v===w&&y&&!g(r)){const _=new Event(g8,Jie);if(w==null||w.dispatchEvent(_),!_.defaultPrevented){const S=l().filter(P=>P.focusable),x=S.find(P=>P.active),E=S.find(P=>P.id===g(o)),O=[x,E,...S].filter(Boolean).map(P=>P.ref);H3(O)}}s.value=!1}),p=Nn(m=>{var y;(y=e.onBlur)==null||y.call(e,m)},()=>{r.value=!1}),h=(...m)=>{t("entryFocus",...m)};wt(j3,{currentTabbedId:_u(o),loop:pn(e,"loop"),tabIndex:R(()=>g(r)?-1:0),rovingFocusGroupRef:i,rovingFocusGroupRootStyle:a,orientation:pn(e,"orientation"),dir:pn(e,"dir"),onItemFocus:u,onItemShiftTab:c,onBlur:p,onFocus:f,onMousedown:d}),Te(()=>e.currentTabId,m=>{o.value=m??null}),Ln(i,g8,h)}});function Qie(e,t,n,o,r,s){return he(e.$slots,"default")}var ele=ze(Xie,[["render",Qie],["__file","roving-focus-group-impl.vue"]]);const tle=Q({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:Uie,ElRovingFocusGroupImpl:ele}});function nle(e,t,n,o,r,s){const i=re("el-roving-focus-group-impl"),l=re("el-focus-group-collection");return C(),q(l,null,{default:$(()=>[k(i,Z2(_w(e.$attrs)),{default:$(()=>[he(e.$slots,"default")]),_:3},16)]),_:3})}var ole=ze(tle,[["render",nle],["__file","roving-focus-group.vue"]]);const rle=Q({components:{ElRovingFocusCollectionItem:Wie},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}=Be(j3,void 0),{getItems:i}=Be(z3,void 0),l=Hr(),a=K(null),u=Nn(p=>{t("mousedown",p)},p=>{e.focusable?r(g(l)):p.preventDefault()}),c=Nn(p=>{t("focus",p)},()=>{r(g(l))}),d=Nn(p=>{t("keydown",p)},p=>{const{key:h,shiftKey:m,target:y,currentTarget:v}=p;if(h===rt.tab&&m){s();return}if(y!==v)return;const w=Yie(p);if(w){p.preventDefault();let S=i().filter(x=>x.focusable).map(x=>x.ref);switch(w){case"last":{S.reverse();break}case"prev":case"next":{w==="prev"&&S.reverse();const x=S.indexOf(v);S=o.value?Zie(S,x+1):S.slice(x+1);break}}ot(()=>{H3(S)})}}),f=R(()=>n.value===g(l));return wt(lO,{rovingFocusGroupItemRef:a,tabIndex:R(()=>g(f)?0:-1),handleMousedown:u,handleFocus:c,handleKeydown:d}),{id:l,handleKeydown:d,handleFocus:c,handleMousedown:u}}});function sle(e,t,n,o,r,s){const i=re("el-roving-focus-collection-item");return C(),q(i,{id:e.id,focusable:e.focusable,active:e.active},{default:$(()=>[he(e.$slots,"default")]),_:3},8,["id","focusable","active"])}var ile=ze(rle,[["render",sle],["__file","roving-focus-item.vue"]]);const o1=We({trigger:Dp.trigger,effect:{...ar.effect,default:"light"},type:{type:Ce(String)},placement:{type:Ce(String),default:"bottom"},popperOptions:{type:Ce(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:Ce([Number,String]),default:0},maxHeight:{type:Ce([Number,String]),default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:Ce(Object)},teleported:ar.teleported}),aO=We({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:Oo}}),lle=We({onKeydown:{type:Ce(Function)}}),ale=[rt.down,rt.pageDown,rt.home],uO=[rt.up,rt.pageUp,rt.end],ule=[...ale,...uO],{ElCollection:cle,ElCollectionItem:dle,COLLECTION_INJECTION_KEY:fle,COLLECTION_ITEM_INJECTION_KEY:ple}=iO("Dropdown"),K0=Symbol("elDropdown"),{ButtonGroup:hle}=pt,mle=Q({name:"ElDropdown",components:{ElButton:pt,ElButtonGroup:hle,ElScrollbar:ks,ElDropdownCollection:cle,ElTooltip:$u,ElRovingFocusGroup:ole,ElOnlyChild:ZM,ElIcon:Ne,ArrowDown:Su},props:o1,emits:["visible-change","click","command"],setup(e,{emit:t}){const n=at(),o=Re("dropdown"),{t:r}=Kt(),s=K(),i=K(),l=K(null),a=K(null),u=K(null),c=K(null),d=K(!1),f=[rt.enter,rt.space,rt.down],p=R(()=>({maxHeight:Zo(e.maxHeight)})),h=R(()=>[o.m(x.value)]),m=R(()=>Eg(e.trigger)),y=Hr().value,v=R(()=>e.id||y);Te([s,m],([V,H],[L])=>{var I,X,oe;(I=L==null?void 0:L.$el)!=null&&I.removeEventListener&&L.$el.removeEventListener("pointerenter",T),(X=V==null?void 0:V.$el)!=null&&X.removeEventListener&&V.$el.removeEventListener("pointerenter",T),(oe=V==null?void 0:V.$el)!=null&&oe.addEventListener&&H.includes("hover")&&V.$el.addEventListener("pointerenter",T)},{immediate:!0}),En(()=>{var V,H;(H=(V=s.value)==null?void 0:V.$el)!=null&&H.removeEventListener&&s.value.$el.removeEventListener("pointerenter",T)});function w(){_()}function _(){var V;(V=l.value)==null||V.onClose()}function S(){var V;(V=l.value)==null||V.onOpen()}const x=Jo();function E(...V){t("command",...V)}function T(){var V,H;(H=(V=s.value)==null?void 0:V.$el)==null||H.focus()}function O(){}function P(){const V=g(a);m.value.includes("hover")&&(V==null||V.focus()),c.value=null}function N(V){c.value=V}function F(V){d.value||(V.preventDefault(),V.stopImmediatePropagation())}function B(){t("visible-change",!0)}function Y(V){(V==null?void 0:V.type)==="keydown"&&a.value.focus()}function Z(){t("visible-change",!1)}return wt(K0,{contentRef:a,role:R(()=>e.role),triggerId:v,isUsingKeyboard:d,onItemEnter:O,onItemLeave:P}),wt("elDropdown",{instance:n,dropdownSize:x,handleClick:w,commandHandler:E,trigger:pn(e,"trigger"),hideOnClick:pn(e,"hideOnClick")}),{t:r,ns:o,scrollbar:u,wrapStyle:p,dropdownTriggerKls:h,dropdownSize:x,triggerId:v,triggerKeys:f,currentTabId:c,handleCurrentTabIdChange:N,handlerMainButtonClick:V=>{t("click",V)},handleEntryFocus:F,handleClose:_,handleOpen:S,handleBeforeShowTooltip:B,handleShowTooltip:Y,handleBeforeHideTooltip:Z,onFocusAfterTrapped:V=>{var H,L;V.preventDefault(),(L=(H=a.value)==null?void 0:H.focus)==null||L.call(H,{preventScroll:!0})},popperRef:l,contentRef:a,triggeringElementRef:s,referenceElementRef:i}}});function gle(e,t,n,o,r,s){var i;const l=re("el-dropdown-collection"),a=re("el-roving-focus-group"),u=re("el-scrollbar"),c=re("el-only-child"),d=re("el-tooltip"),f=re("el-button"),p=re("arrow-down"),h=re("el-icon"),m=re("el-button-group");return C(),M("div",{class:D([e.ns.b(),e.ns.is("disabled",e.disabled)])},[k(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},tu({content:$(()=>[k(u,{ref:"scrollbar","wrap-style":e.wrapStyle,tag:"div","view-class":e.ns.e("list")},{default:$(()=>[k(a,{loop:e.loop,"current-tab-id":e.currentTabId,orientation:"horizontal",onCurrentTabIdChange:e.handleCurrentTabIdChange,onEntryFocus:e.handleEntryFocus},{default:$(()=>[k(l,null,{default:$(()=>[he(e.$slots,"dropdown")]),_:3})]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange","onEntryFocus"])]),_:3},8,["wrap-style","view-class"])]),_:2},[e.splitButton?void 0:{name:"default",fn:$(()=>[k(c,{id:e.triggerId,ref:"triggeringElementRef",role:"button",tabindex:e.tabindex},{default:$(()=>[he(e.$slots,"default")]),_:3},8,["id","tabindex"])])}]),1032,["role","effect","popper-options","hide-after","placement","popper-class","reference-element","trigger","trigger-keys","trigger-target-el","show-after","virtual-ref","virtual-triggering","disabled","transition","teleported","onBeforeShow","onShow","onBeforeHide"]),e.splitButton?(C(),q(m,{key:0},{default:$(()=>[k(f,un({ref:"referenceElementRef"},e.buttonProps,{size:e.dropdownSize,type:e.type,disabled:e.disabled,tabindex:e.tabindex,onClick:e.handlerMainButtonClick}),{default:$(()=>[he(e.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),k(f,un({id:e.triggerId,ref:"triggeringElementRef"},e.buttonProps,{role:"button",size:e.dropdownSize,type:e.type,class:e.ns.e("caret-button"),disabled:e.disabled,tabindex:e.tabindex,"aria-label":e.t("el.dropdown.toggleDropdown")}),{default:$(()=>[k(h,{class:D(e.ns.e("icon"))},{default:$(()=>[k(p)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):W("v-if",!0)],2)}var vle=ze(mle,[["render",gle],["__file","dropdown.vue"]]);const yle=Q({name:"DropdownItemImpl",components:{ElIcon:Ne},props:aO,emits:["pointermove","pointerleave","click","clickimpl"],setup(e,{emit:t}){const n=Re("dropdown"),{role:o}=Be(K0,void 0),{collectionItemRef:r}=Be(ple,void 0),{collectionItemRef:s}=Be(Kie,void 0),{rovingFocusGroupItemRef:i,tabIndex:l,handleFocus:a,handleKeydown:u,handleMousedown:c}=Be(lO,void 0),d=f3(r,s,i),f=R(()=>o.value==="menu"?"menuitem":o.value==="navigation"?"link":"button"),p=Nn(h=>{const{code:m}=h;if(m===rt.enter||m===rt.space)return h.preventDefault(),h.stopImmediatePropagation(),t("clickimpl",h),!0},u);return{ns:n,itemRef:d,dataset:{[sO]:""},role:f,tabIndex:l,handleFocus:a,handleKeydown:p,handleMousedown:c}}}),_le=["aria-disabled","tabindex","role"];function ble(e,t,n,o,r,s){const i=re("el-icon");return C(),M(fe,null,[e.divided?(C(),M("li",un({key:0,role:"separator",class:e.ns.bem("menu","item","divided")},e.$attrs),null,16)):W("v-if",!0),b("li",un({ref:e.itemRef},{...e.dataset,...e.$attrs},{"aria-disabled":e.disabled,class:[e.ns.be("menu","item"),e.ns.is("disabled",e.disabled)],tabindex:e.tabIndex,role:e.role,onClick:t[0]||(t[0]=l=>e.$emit("clickimpl",l)),onFocus:t[1]||(t[1]=(...l)=>e.handleFocus&&e.handleFocus(...l)),onKeydown:t[2]||(t[2]=et((...l)=>e.handleKeydown&&e.handleKeydown(...l),["self"])),onMousedown:t[3]||(t[3]=(...l)=>e.handleMousedown&&e.handleMousedown(...l)),onPointermove:t[4]||(t[4]=l=>e.$emit("pointermove",l)),onPointerleave:t[5]||(t[5]=l=>e.$emit("pointerleave",l))}),[e.icon?(C(),q(i,{key:0},{default:$(()=>[(C(),q(Lt(e.icon)))]),_:1})):W("v-if",!0),he(e.$slots,"default")],16,_le)],64)}var wle=ze(yle,[["render",ble],["__file","dropdown-item-impl.vue"]]);const cO=()=>{const e=Be("elDropdown",{}),t=R(()=>e==null?void 0:e.dropdownSize);return{elDropdown:e,_elDropdownSize:t}},Cle=Q({name:"ElDropdownItem",components:{ElDropdownCollectionItem:dle,ElRovingFocusItem:ile,ElDropdownItemImpl:wle},inheritAttrs:!1,props:aO,emits:["pointermove","pointerleave","click"],setup(e,{emit:t,attrs:n}){const{elDropdown:o}=cO(),r=at(),s=K(null),i=R(()=>{var p,h;return(h=(p=g(s))==null?void 0:p.textContent)!=null?h:""}),{onItemEnter:l,onItemLeave:a}=Be(K0,void 0),u=Nn(p=>(t("pointermove",p),p.defaultPrevented),b6(p=>{if(e.disabled){a(p);return}const h=p.currentTarget;h===document.activeElement||h.contains(document.activeElement)||(l(p),p.defaultPrevented||h==null||h.focus())})),c=Nn(p=>(t("pointerleave",p),p.defaultPrevented),b6(p=>{a(p)})),d=Nn(p=>{if(!e.disabled)return t("click",p),p.type!=="keydown"&&p.defaultPrevented},p=>{var h,m,y;if(e.disabled){p.stopImmediatePropagation();return}(h=o==null?void 0:o.hideOnClick)!=null&&h.value&&((m=o.handleClick)==null||m.call(o)),(y=o.commandHandler)==null||y.call(o,e.command,r,p)}),f=R(()=>({...e,...n}));return{handleClick:d,handlePointerMove:u,handlePointerLeave:c,textContent:i,propsAndAttrs:f}}});function kle(e,t,n,o,r,s){var i;const l=re("el-dropdown-item-impl"),a=re("el-roving-focus-item"),u=re("el-dropdown-collection-item");return C(),q(u,{disabled:e.disabled,"text-value":(i=e.textValue)!=null?i:e.textContent},{default:$(()=>[k(a,{focusable:!e.disabled},{default:$(()=>[k(l,un(e.propsAndAttrs,{onPointerleave:e.handlePointerLeave,onPointermove:e.handlePointerMove,onClickimpl:e.handleClick}),{default:$(()=>[he(e.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])]),_:3},8,["disabled","text-value"])}var dO=ze(Cle,[["render",kle],["__file","dropdown-item.vue"]]);const Sle=Q({name:"ElDropdownMenu",props:lle,setup(e){const t=Re("dropdown"),{_elDropdownSize:n}=cO(),o=n.value,{focusTrapRef:r,onKeydown:s}=Be(A3,void 0),{contentRef:i,role:l,triggerId:a}=Be(K0,void 0),{collectionRef:u,getItems:c}=Be(fle,void 0),{rovingFocusGroupRef:d,rovingFocusGroupRootStyle:f,tabIndex:p,onBlur:h,onFocus:m,onMousedown:y}=Be(j3,void 0),{collectionRef:v}=Be(z3,void 0),w=R(()=>[t.b("menu"),t.bm("menu",o==null?void 0:o.value)]),_=f3(i,u,r,d,v),S=Nn(E=>{var T;(T=e.onKeydown)==null||T.call(e,E)},E=>{const{currentTarget:T,code:O,target:P}=E;if(T.contains(P),rt.tab===O&&E.stopImmediatePropagation(),E.preventDefault(),P!==g(i)||!ule.includes(O))return;const F=c().filter(B=>!B.disabled).map(B=>B.ref);uO.includes(O)&&F.reverse(),H3(F)});return{size:o,rovingFocusGroupRootStyle:f,tabIndex:p,dropdownKls:w,role:l,triggerId:a,dropdownListWrapperRef:_,handleKeydown:E=>{S(E),s(E)},onBlur:h,onFocus:m,onMousedown:y}}}),$le=["role","aria-labelledby"];function Ele(e,t,n,o,r,s){return C(),M("ul",{ref:e.dropdownListWrapperRef,class:D(e.dropdownKls),style:Qe(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]=et((...i)=>e.handleKeydown&&e.handleKeydown(...i),["self"])),onMousedown:t[3]||(t[3]=et((...i)=>e.onMousedown&&e.onMousedown(...i),["self"]))},[he(e.$slots,"default")],46,$le)}var fO=ze(Sle,[["render",Ele],["__file","dropdown-menu.vue"]]);const _h=Zt(vle,{DropdownItem:dO,DropdownMenu:fO}),bh=Gn(dO),wh=Gn(fO),xle=We({urlList:{type:Ce(Array),default:()=>$o([])},zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},hideOnClickModal:Boolean,teleported:Boolean,closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:Ce(String)}}),Mle={close:()=>!0,switch:e=>_t(e),rotate:e=>_t(e)},Tle=["src","crossorigin"],Ole=Q({name:"ElImageViewer"}),Ile=Q({...Ole,props:xle,emits:Mle,setup(e,{expose:t,emit:n}){var o;const r=e,s={CONTAIN:{name:"contain",icon:Ii(Qx)},ORIGINAL:{name:"original",icon:Ii(ZZ)}},{t:i}=Kt(),l=Re("image-viewer"),{nextZIndex:a}=D0(),u=K(),c=K([]),d=E$(),f=K(!0),p=K(r.initialIndex),h=Tn(s.CONTAIN),m=K({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),y=K((o=r.zIndex)!=null?o:a()),v=R(()=>{const{urlList:I}=r;return I.length<=1}),w=R(()=>p.value===0),_=R(()=>p.value===r.urlList.length-1),S=R(()=>r.urlList[p.value]),x=R(()=>[l.e("btn"),l.e("prev"),l.is("disabled",!r.infinite&&w.value)]),E=R(()=>[l.e("btn"),l.e("next"),l.is("disabled",!r.infinite&&_.value)]),T=R(()=>{const{scale:I,deg:X,offsetX:oe,offsetY:z,enableTransition:ge}=m.value;let Oe=oe/I,xe=z/I;switch(X%360){case 90:case-270:[Oe,xe]=[xe,-Oe];break;case 180:case-180:[Oe,xe]=[-Oe,-xe];break;case 270:case-90:[Oe,xe]=[-xe,Oe];break}const ee={transform:`scale(${I}) rotate(${X}deg) translate(${Oe}px, ${xe}px)`,transition:ge?"transform .3s":""};return h.value.name===s.CONTAIN.name&&(ee.maxWidth=ee.maxHeight="100%"),ee});function O(){N(),n("close")}function P(){const I=Jv(oe=>{switch(oe.code){case rt.esc:r.closeOnPressEscape&&O();break;case rt.space:U();break;case rt.left:V();break;case rt.up:L("zoomIn");break;case rt.right:H();break;case rt.down:L("zoomOut");break}}),X=Jv(oe=>{const z=oe.deltaY||oe.deltaX;L(z<0?"zoomIn":"zoomOut",{zoomRate:r.zoomRate,enableTransition:!1})});d.run(()=>{Ln(document,"keydown",I),Ln(document,"wheel",X)})}function N(){d.stop()}function F(){f.value=!1}function B(I){f.value=!1,I.target.alt=i("el.image.error")}function Y(I){if(f.value||I.button!==0||!u.value)return;m.value.enableTransition=!1;const{offsetX:X,offsetY:oe}=m.value,z=I.pageX,ge=I.pageY,Oe=Jv(ee=>{m.value={...m.value,offsetX:X+ee.pageX-z,offsetY:oe+ee.pageY-ge}}),xe=Ln(document,"mousemove",Oe);Ln(document,"mouseup",()=>{xe()}),I.preventDefault()}function Z(){m.value={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function U(){if(f.value)return;const I=G_(s),X=Object.values(s),oe=h.value.name,ge=(X.findIndex(Oe=>Oe.name===oe)+1)%I.length;h.value=s[I[ge]],Z()}function j(I){const X=r.urlList.length;p.value=(I+X)%X}function V(){w.value&&!r.infinite||j(p.value-1)}function H(){_.value&&!r.infinite||j(p.value+1)}function L(I,X={}){if(f.value)return;const{minScale:oe,maxScale:z}=r,{zoomRate:ge,rotateDeg:Oe,enableTransition:xe}={zoomRate:r.zoomRate,rotateDeg:90,enableTransition:!0,...X};switch(I){case"zoomOut":m.value.scale>oe&&(m.value.scale=Number.parseFloat((m.value.scale/ge).toFixed(3)));break;case"zoomIn":m.value.scale<z&&(m.value.scale=Number.parseFloat((m.value.scale*ge).toFixed(3)));break;case"clockwise":m.value.deg+=Oe,n("rotate",m.value.deg);break;case"anticlockwise":m.value.deg-=Oe,n("rotate",m.value.deg);break}m.value.enableTransition=xe}return Te(S,()=>{ot(()=>{const I=c.value[0];I!=null&&I.complete||(f.value=!0)})}),Te(p,I=>{Z(),n("switch",I)}),Ct(()=>{var I,X;P(),(X=(I=u.value)==null?void 0:I.focus)==null||X.call(I)}),t({setActiveItem:j}),(I,X)=>(C(),q(_s,{to:"body",disabled:!I.teleported},[k(_r,{name:"viewer-fade",appear:""},{default:$(()=>[b("div",{ref_key:"wrapper",ref:u,tabindex:-1,class:D(g(l).e("wrapper")),style:Qe({zIndex:y.value})},[b("div",{class:D(g(l).e("mask")),onClick:X[0]||(X[0]=et(oe=>I.hideOnClickModal&&O(),["self"]))},null,2),W(" CLOSE "),b("span",{class:D([g(l).e("btn"),g(l).e("close")]),onClick:O},[k(g(Ne),null,{default:$(()=>[k(g(Gs))]),_:1})],2),W(" ARROW "),g(v)?W("v-if",!0):(C(),M(fe,{key:0},[b("span",{class:D(g(x)),onClick:V},[k(g(Ne),null,{default:$(()=>[k(g(au))]),_:1})],2),b("span",{class:D(g(E)),onClick:H},[k(g(Ne),null,{default:$(()=>[k(g(js))]),_:1})],2)],64)),W(" ACTIONS "),b("div",{class:D([g(l).e("btn"),g(l).e("actions")])},[b("div",{class:D(g(l).e("actions__inner"))},[k(g(Ne),{onClick:X[1]||(X[1]=oe=>L("zoomOut"))},{default:$(()=>[k(g(fJ))]),_:1}),k(g(Ne),{onClick:X[2]||(X[2]=oe=>L("zoomIn"))},{default:$(()=>[k(g(oM))]),_:1}),b("i",{class:D(g(l).e("actions__divider"))},null,2),k(g(Ne),{onClick:U},{default:$(()=>[(C(),q(Lt(g(h).icon)))]),_:1}),b("i",{class:D(g(l).e("actions__divider"))},null,2),k(g(Ne),{onClick:X[3]||(X[3]=oe=>L("anticlockwise"))},{default:$(()=>[k(g(tM))]),_:1}),k(g(Ne),{onClick:X[4]||(X[4]=oe=>L("clockwise"))},{default:$(()=>[k(g(GZ))]),_:1})],2)],2),W(" CANVAS "),b("div",{class:D(g(l).e("canvas"))},[(C(!0),M(fe,null,nt(I.urlList,(oe,z)=>He((C(),M("img",{ref_for:!0,ref:ge=>c.value[z]=ge,key:oe,src:oe,style:Qe(g(T)),class:D(g(l).e("img")),crossorigin:I.crossorigin,onLoad:F,onError:B,onMousedown:Y},null,46,Tle)),[[en,z===p.value]])),128))],2),he(I.$slots,"default")],6)]),_:3})],8,["disabled"]))}});var Ale=ze(Ile,[["__file","image-viewer.vue"]]);const Nle=Zt(Ale),Ple=We({hideOnClickModal:Boolean,src:{type:String,default:""},fit:{type:String,values:["","contain","cover","fill","none","scale-down"],default:""},loading:{type:String,values:["eager","lazy"]},lazy:Boolean,scrollContainer:{type:Ce([String,Object])},previewSrcList:{type:Ce(Array),default:()=>$o([])},previewTeleported:Boolean,zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:Ce(String)}}),Lle={load:e=>e instanceof Event,error:e=>e instanceof Event,switch:e=>_t(e),close:()=>!0,show:()=>!0},Rle=["src","loading","crossorigin"],Dle={key:0},Fle=Q({name:"ElImage",inheritAttrs:!1}),Vle=Q({...Fle,props:Ple,emits:Lle,setup(e,{emit:t}){const n=e;let o="";const{t:r}=Kt(),s=Re("image"),i=_d(),l=aM(),a=K(),u=K(!1),c=K(!0),d=K(!1),f=K(),p=K(),h=xt&&"loading"in HTMLImageElement.prototype;let m,y;const v=R(()=>[s.e("inner"),S.value&&s.e("preview"),c.value&&s.is("loading")]),w=R(()=>i.style),_=R(()=>{const{fit:H}=n;return xt&&H?{objectFit:H}:{}}),S=R(()=>{const{previewSrcList:H}=n;return Array.isArray(H)&&H.length>0}),x=R(()=>{const{previewSrcList:H,initialIndex:L}=n;let I=L;return L>H.length-1&&(I=0),I}),E=R(()=>n.loading==="eager"?!1:!h&&n.loading==="lazy"||n.lazy),T=()=>{xt&&(c.value=!0,u.value=!1,a.value=n.src)};function O(H){c.value=!1,u.value=!1,t("load",H)}function P(H){c.value=!1,u.value=!0,t("error",H)}function N(){fH(f.value,p.value)&&(T(),Y())}const F=Kj(N,200,!0);async function B(){var H;if(!xt)return;await ot();const{scrollContainer:L}=n;gs(L)?p.value=L:tt(L)&&L!==""?p.value=(H=document.querySelector(L))!=null?H:void 0:f.value&&(p.value=yY(f.value)),p.value&&(m=Ln(p,"scroll",F),setTimeout(()=>N(),100))}function Y(){!xt||!p.value||!F||(m==null||m(),p.value=void 0)}function Z(H){if(H.ctrlKey){if(H.deltaY<0)return H.preventDefault(),!1;if(H.deltaY>0)return H.preventDefault(),!1}}function U(){S.value&&(y=Ln("wheel",Z,{passive:!1}),o=document.body.style.overflow,document.body.style.overflow="hidden",d.value=!0,t("show"))}function j(){y==null||y(),document.body.style.overflow=o,d.value=!1,t("close")}function V(H){t("switch",H)}return Te(()=>n.src,()=>{E.value?(c.value=!0,u.value=!1,Y(),B()):T()}),Ct(()=>{E.value?B():T()}),(H,L)=>(C(),M("div",{ref_key:"container",ref:f,class:D([g(s).b(),H.$attrs.class]),style:Qe(g(w))},[u.value?he(H.$slots,"error",{key:0},()=>[b("div",{class:D(g(s).e("error"))},A(g(r)("el.image.error")),3)]):(C(),M(fe,{key:1},[a.value!==void 0?(C(),M("img",un({key:0},g(l),{src:a.value,loading:H.loading,style:g(_),class:g(v),crossorigin:H.crossorigin,onClick:U,onLoad:O,onError:P}),null,16,Rle)):W("v-if",!0),c.value?(C(),M("div",{key:1,class:D(g(s).e("wrapper"))},[he(H.$slots,"placeholder",{},()=>[b("div",{class:D(g(s).e("placeholder"))},null,2)])],2)):W("v-if",!0)],64)),g(S)?(C(),M(fe,{key:2},[d.value?(C(),q(g(Nle),{key:0,"z-index":H.zIndex,"initial-index":g(x),infinite:H.infinite,"zoom-rate":H.zoomRate,"min-scale":H.minScale,"max-scale":H.maxScale,"url-list":H.previewSrcList,"hide-on-click-modal":H.hideOnClickModal,teleported:H.previewTeleported,"close-on-press-escape":H.closeOnPressEscape,onClose:j,onSwitch:V},{default:$(()=>[H.$slots.viewer?(C(),M("div",Dle,[he(H.$slots,"viewer")])):W("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"])):W("v-if",!0)],64)):W("v-if",!0)],6))}});var Ble=ze(Vle,[["__file","image.vue"]]);const Ed=Zt(Ble),zle=We({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:Number,readonly:Boolean,disabled:Boolean,size:qr,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:e=>e===null||_t(e)||["min","max"].includes(e),default:null},name:String,label:String,placeholder:String,precision:{type:Number,validator:e=>e>=0&&e===Number.parseInt(`${e}`,10)},validateEvent:{type:Boolean,default:!0}}),jle={[Cd]:(e,t)=>t!==e,blur:e=>e instanceof FocusEvent,focus:e=>e instanceof FocusEvent,[qm]:e=>_t(e)||xo(e),[Jt]:e=>_t(e)||xo(e)},Hle=["aria-label","onKeydown"],Ule=["aria-label","onKeydown"],Wle=Q({name:"ElInputNumber"}),Kle=Q({...Wle,props:zle,emits:jle,setup(e,{expose:t,emit:n}){const o=e,{t:r}=Kt(),s=Re("input-number"),i=K(),l=Dn({currentValue:o.modelValue,userInput:null}),{formItem:a}=ni(),u=R(()=>_t(o.modelValue)&&o.modelValue<=o.min),c=R(()=>_t(o.modelValue)&&o.modelValue>=o.max),d=R(()=>{const U=v(o.step);return Uo(o.precision)?Math.max(v(o.modelValue),U):(U>o.precision,o.precision)}),f=R(()=>o.controls&&o.controlsPosition==="right"),p=Jo(),h=Gr(),m=R(()=>{if(l.userInput!==null)return l.userInput;let U=l.currentValue;if(xo(U))return"";if(_t(U)){if(Number.isNaN(U))return"";Uo(o.precision)||(U=U.toFixed(o.precision))}return U}),y=(U,j)=>{if(Uo(j)&&(j=d.value),j===0)return Math.round(U);let V=String(U);const H=V.indexOf(".");if(H===-1||!V.replace(".","").split("")[H+j])return U;const X=V.length;return V.charAt(X-1)==="5"&&(V=`${V.slice(0,Math.max(0,X-1))}6`),Number.parseFloat(Number(V).toFixed(j))},v=U=>{if(xo(U))return 0;const j=U.toString(),V=j.indexOf(".");let H=0;return V!==-1&&(H=j.length-V-1),H},w=(U,j=1)=>_t(U)?y(U+o.step*j):l.currentValue,_=()=>{if(o.readonly||h.value||c.value)return;const U=Number(m.value)||0,j=w(U);E(j),n(qm,l.currentValue),Y()},S=()=>{if(o.readonly||h.value||u.value)return;const U=Number(m.value)||0,j=w(U,-1);E(j),n(qm,l.currentValue),Y()},x=(U,j)=>{const{max:V,min:H,step:L,precision:I,stepStrictly:X,valueOnClear:oe}=o;V<H&&ws("InputNumber","min should not be greater than max.");let z=Number(U);if(xo(U)||Number.isNaN(z))return null;if(U===""){if(oe===null)return null;z=tt(oe)?{min:H,max:V}[oe]:oe}return X&&(z=y(Math.round(z/L)*L,I)),Uo(I)||(z=y(z,I)),(z>V||z<H)&&(z=z>V?V:H,j&&n(Jt,z)),z},E=(U,j=!0)=>{var V;const H=l.currentValue,L=x(U);if(!j){n(Jt,L);return}H===L&&U||(l.userInput=null,n(Jt,L),H!==L&&n(Cd,L,H),o.validateEvent&&((V=a==null?void 0:a.validate)==null||V.call(a,"change").catch(I=>void 0)),l.currentValue=L)},T=U=>{l.userInput=U;const j=U===""?null:Number(U);n(qm,j),E(j,!1)},O=U=>{const j=U!==""?Number(U):"";(_t(j)&&!Number.isNaN(j)||U==="")&&E(j),Y(),l.userInput=null},P=()=>{var U,j;(j=(U=i.value)==null?void 0:U.focus)==null||j.call(U)},N=()=>{var U,j;(j=(U=i.value)==null?void 0:U.blur)==null||j.call(U)},F=U=>{n("focus",U)},B=U=>{var j;l.userInput=null,n("blur",U),o.validateEvent&&((j=a==null?void 0:a.validate)==null||j.call(a,"blur").catch(V=>void 0))},Y=()=>{l.currentValue!==o.modelValue&&(l.currentValue=o.modelValue)},Z=U=>{document.activeElement===U.target&&U.preventDefault()};return Te(()=>o.modelValue,(U,j)=>{const V=x(U,!0);l.userInput===null&&V!==j&&(l.currentValue=V)},{immediate:!0}),Ct(()=>{var U;const{min:j,max:V,modelValue:H}=o,L=(U=i.value)==null?void 0:U.input;if(L.setAttribute("role","spinbutton"),Number.isFinite(V)?L.setAttribute("aria-valuemax",String(V)):L.removeAttribute("aria-valuemax"),Number.isFinite(j)?L.setAttribute("aria-valuemin",String(j)):L.removeAttribute("aria-valuemin"),L.setAttribute("aria-valuenow",l.currentValue||l.currentValue===0?String(l.currentValue):""),L.setAttribute("aria-disabled",String(h.value)),!_t(H)&&H!=null){let I=Number(H);Number.isNaN(I)&&(I=null),n(Jt,I)}}),Fi(()=>{var U,j;const V=(U=i.value)==null?void 0:U.input;V==null||V.setAttribute("aria-valuenow",`${(j=l.currentValue)!=null?j:""}`)}),t({focus:P,blur:N}),(U,j)=>(C(),M("div",{class:D([g(s).b(),g(s).m(g(p)),g(s).is("disabled",g(h)),g(s).is("without-controls",!U.controls),g(s).is("controls-right",g(f))]),onDragstart:j[0]||(j[0]=et(()=>{},["prevent"]))},[U.controls?He((C(),M("span",{key:0,role:"button","aria-label":g(r)("el.inputNumber.decrease"),class:D([g(s).e("decrease"),g(s).is("disabled",g(u))]),onKeydown:Pt(S,["enter"])},[he(U.$slots,"decrease-icon",{},()=>[k(g(Ne),null,{default:$(()=>[g(f)?(C(),q(g(Su),{key:0})):(C(),q(g(TZ),{key:1}))]),_:1})])],42,Hle)),[[g(Rg),S]]):W("v-if",!0),U.controls?He((C(),M("span",{key:1,role:"button","aria-label":g(r)("el.inputNumber.increase"),class:D([g(s).e("increase"),g(s).is("disabled",g(c))]),onKeydown:Pt(_,["enter"])},[he(U.$slots,"increase-icon",{},()=>[k(g(Ne),null,{default:$(()=>[g(f)?(C(),q(g(N0),{key:0})):(C(),q(g(u3),{key:1}))]),_:1})])],42,Ule)),[[g(Rg),_]]):W("v-if",!0),k(g(At),{id:U.id,ref_key:"input",ref:i,type:"number",step:U.step,"model-value":g(m),placeholder:U.placeholder,readonly:U.readonly,disabled:g(h),size:g(p),max:U.max,min:U.min,name:U.name,label:U.label,"validate-event":!1,onWheel:Z,onKeydown:[Pt(et(_,["prevent"]),["up"]),Pt(et(S,["prevent"]),["down"])],onBlur:B,onFocus:F,onInput:T,onChange:O},null,8,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","label","onKeydown"])],34))}});var qle=ze(Kle,[["__file","input-number.vue"]]);const Gle=Zt(qle),pO=Symbol("elPaginationKey"),Yle=We({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:Oo}}),Zle={click:e=>e instanceof MouseEvent},Jle=["disabled","aria-label","aria-disabled"],Xle={key:0},Qle=Q({name:"ElPaginationPrev"}),eae=Q({...Qle,props:Yle,emits:Zle,setup(e){const t=e,{t:n}=Kt(),o=R(()=>t.disabled||t.currentPage<=1);return(r,s)=>(C(),M("button",{type:"button",class:"btn-prev",disabled:g(o),"aria-label":r.prevText||g(n)("el.pagination.prev"),"aria-disabled":g(o),onClick:s[0]||(s[0]=i=>r.$emit("click",i))},[r.prevText?(C(),M("span",Xle,A(r.prevText),1)):(C(),q(g(Ne),{key:1},{default:$(()=>[(C(),q(Lt(r.prevIcon)))]),_:1}))],8,Jle))}});var tae=ze(eae,[["__file","prev.vue"]]);const nae=We({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:Oo}}),oae=["disabled","aria-label","aria-disabled"],rae={key:0},sae=Q({name:"ElPaginationNext"}),iae=Q({...sae,props:nae,emits:["click"],setup(e){const t=e,{t:n}=Kt(),o=R(()=>t.disabled||t.currentPage===t.pageCount||t.pageCount===0);return(r,s)=>(C(),M("button",{type:"button",class:"btn-next",disabled:g(o),"aria-label":r.nextText||g(n)("el.pagination.next"),"aria-disabled":g(o),onClick:s[0]||(s[0]=i=>r.$emit("click",i))},[r.nextText?(C(),M("span",rae,A(r.nextText),1)):(C(),q(g(Ne),{key:1},{default:$(()=>[(C(),q(Lt(r.nextIcon)))]),_:1}))],8,oae))}});var lae=ze(iae,[["__file","next.vue"]]);const hO=Symbol("ElSelectGroup"),q0=Symbol("ElSelect");function aae(e,t){const n=Be(q0),o=Be(hO,{disabled:!1}),r=R(()=>n.props.multiple?c(n.props.modelValue,e.value):c([n.props.modelValue],e.value)),s=R(()=>{if(n.props.multiple){const p=n.props.modelValue||[];return!r.value&&p.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),i=R(()=>e.label||(ft(e.value)?"":e.value)),l=R(()=>e.value||e.label||""),a=R(()=>e.disabled||t.groupDisabled||s.value),u=at(),c=(p=[],h)=>{if(ft(e.value)){const m=n.props.valueKey;return p&&p.some(y=>Mt(Tr(y,m))===Tr(h,m))}else return p&&p.includes(h)},d=()=>{!e.disabled&&!o.disabled&&(n.states.hoveringIndex=n.optionsArray.indexOf(u.proxy))},f=p=>{const h=new RegExp(hY(p),"i");t.visible=h.test(i.value)||e.created};return Te(()=>i.value,()=>{!e.created&&!n.props.remote&&n.setSelected()}),Te(()=>e.value,(p,h)=>{const{remote:m,valueKey:y}=n.props;if(jl(p,h)||(n.onOptionDestroy(h,u.proxy),n.onOptionCreate(u.proxy)),!e.created&&!m){if(y&&ft(p)&&ft(h)&&p[y]===h[y])return;n.setSelected()}}),Te(()=>o.disabled,()=>{t.groupDisabled=o.disabled},{immediate:!0}),{select:n,currentLabel:i,currentValue:l,itemSelected:r,isDisabled:a,hoverItem:d,updateOption:f}}const uae=Q({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=Re("select"),n=Hr(),o=R(()=>[t.be("dropdown","item"),t.is("disabled",g(l)),t.is("selected",g(i)),t.is("hovering",g(f))]),r=Dn({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:s,itemSelected:i,isDisabled:l,select:a,hoverItem:u,updateOption:c}=aae(e,r),{visible:d,hover:f}=ei(r),p=at().proxy;a.onOptionCreate(p),En(()=>{const m=p.value,{selected:y}=a.states,w=(a.props.multiple?y:[y]).some(_=>_.value===p.value);ot(()=>{a.states.cachedOptions.get(m)===p&&!w&&a.states.cachedOptions.delete(m)}),a.onOptionDestroy(m,p)});function h(){e.disabled!==!0&&r.groupDisabled!==!0&&a.handleOptionSelect(p)}return{ns:t,id:n,containerKls:o,currentLabel:s,itemSelected:i,isDisabled:l,select:a,hoverItem:u,updateOption:c,visible:d,hover:f,selectOptionClick:h,states:r}}}),cae=["id","aria-disabled","aria-selected"];function dae(e,t,n,o,r,s){return He((C(),M("li",{id:e.id,class:D(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMouseenter:t[0]||(t[0]=(...i)=>e.hoverItem&&e.hoverItem(...i)),onClick:t[1]||(t[1]=et((...i)=>e.selectOptionClick&&e.selectOptionClick(...i),["stop"]))},[he(e.$slots,"default",{},()=>[b("span",null,A(e.currentLabel),1)])],42,cae)),[[en,e.visible]])}var U3=ze(uae,[["render",dae],["__file","option.vue"]]);const fae=Q({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=Be(q0),t=Re("select"),n=R(()=>e.props.popperClass),o=R(()=>e.props.multiple),r=R(()=>e.props.fitInputWidth),s=K("");function i(){var l;s.value=`${(l=e.selectRef)==null?void 0:l.offsetWidth}px`}return Ct(()=>{i(),Bo(e.selectRef,i)}),{ns:t,minWidth:s,popperClass:n,isMultiple:o,isFitInputWidth:r}}});function pae(e,t,n,o,r,s){return C(),M("div",{class:D([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:Qe({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(C(),M("div",{key:0,class:D(e.ns.be("dropdown","header"))},[he(e.$slots,"header")],2)):W("v-if",!0),he(e.$slots,"default"),e.$slots.footer?(C(),M("div",{key:1,class:D(e.ns.be("dropdown","footer"))},[he(e.$slots,"footer")],2)):W("v-if",!0)],6)}var hae=ze(fae,[["render",pae],["__file","select-dropdown.vue"]]);function mae(e){const t=K(!1);return{handleCompositionStart:()=>{t.value=!0},handleCompositionUpdate:s=>{const i=s.target.value,l=i[i.length-1]||"";t.value=!lM(l)},handleCompositionEnd:s=>{t.value&&(t.value=!1,Xe(e)&&e(s))}}}const gae=11,vae=(e,t)=>{const{t:n}=Kt(),o=Hr(),r=Re("select"),s=Re("input"),i=Dn({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=K(null),a=K(null),u=K(null),c=K(null),d=K(null),f=K(null),p=K(null),h=K(null),m=K(null),y=K(null),v=K(null),w=K(null),{wrapperRef:_,isFocused:S,handleFocus:x,handleBlur:E}=x3(d,{afterFocus(){e.automaticDropdown&&!T.value&&(T.value=!0,i.menuVisibleOnFocus=!0)},beforeBlur(be){var Ke,tn;return((Ke=u.value)==null?void 0:Ke.isFocusInsideContent(be))||((tn=c.value)==null?void 0:tn.isFocusInsideContent(be))},afterBlur(){T.value=!1,i.menuVisibleOnFocus=!1}}),T=K(!1),O=K(),{form:P,formItem:N}=ni(),{inputId:F}=Sd(e,{formItemContext:N}),{valueOnClear:B,isEmptyValue:Y}=HM(e),Z=R(()=>e.disabled||(P==null?void 0:P.disabled)),U=R(()=>e.multiple?Me(e.modelValue)&&e.modelValue.length>0:!Y(e.modelValue)),j=R(()=>e.clearable&&!Z.value&&i.inputHovering&&U.value),V=R(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),H=R(()=>r.is("reverse",V.value&&T.value)),L=R(()=>(N==null?void 0:N.validateState)||""),I=R(()=>iM[L.value]),X=R(()=>e.remote?300:0),oe=R(()=>e.loading?e.loadingText||n("el.select.loading"):e.remote&&!i.inputValue&&i.options.size===0?!1:e.filterable&&i.inputValue&&i.options.size>0&&z.value===0?e.noMatchText||n("el.select.noMatch"):i.options.size===0?e.noDataText||n("el.select.noData"):null),z=R(()=>ge.value.filter(be=>be.visible).length),ge=R(()=>{const be=Array.from(i.options.values()),Ke=[];return i.optionValues.forEach(tn=>{const Mn=be.findIndex(Ui=>Ui.value===tn);Mn>-1&&Ke.push(be[Mn])}),Ke.length>=be.length?Ke:be}),Oe=R(()=>Array.from(i.cachedOptions.values())),xe=R(()=>{const be=ge.value.filter(Ke=>!Ke.created).some(Ke=>Ke.currentLabel===i.inputValue);return e.filterable&&e.allowCreate&&i.inputValue!==""&&!be}),ee=()=>{e.filterable&&Xe(e.filterMethod)||e.filterable&&e.remote&&Xe(e.remoteMethod)||ge.value.forEach(be=>{var Ke;(Ke=be.updateOption)==null||Ke.call(be,i.inputValue)})},de=Jo(),ve=R(()=>["small"].includes(de.value)?"small":"default"),le=R({get(){return T.value&&oe.value!==!1},set(be){T.value=be}}),Ie=R(()=>Me(e.modelValue)?e.modelValue.length===0&&!i.inputValue:e.filterable?!i.inputValue:!0),Ge=R(()=>{var be;const Ke=(be=e.placeholder)!=null?be:n("el.select.placeholder");return e.multiple||!U.value?Ke:i.selectedLabel});Te(()=>e.modelValue,(be,Ke)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(i.inputValue="",G("")),ue(),!jl(be,Ke)&&e.validateEvent&&(N==null||N.validate("change").catch(tn=>void 0))},{flush:"post",deep:!0}),Te(()=>T.value,be=>{be?G(i.inputValue):(i.inputValue="",i.previousQuery=null,i.isBeforeHide=!0),t("visible-change",be)}),Te(()=>i.options.entries(),()=>{var be;if(!xt)return;const Ke=((be=l.value)==null?void 0:be.querySelectorAll("input"))||[];(!e.filterable&&!e.defaultFirstOption&&!Uo(e.modelValue)||!Array.from(Ke).includes(document.activeElement))&&ue(),e.defaultFirstOption&&(e.filterable||e.remote)&&z.value&&J()},{flush:"post"}),Te(()=>i.hoveringIndex,be=>{_t(be)&&be>-1?O.value=ge.value[be]||{}:O.value={},ge.value.forEach(Ke=>{Ke.hover=O.value===Ke})}),ls(()=>{i.isBeforeHide||ee()});const G=be=>{i.previousQuery!==be&&(i.previousQuery=be,e.filterable&&Xe(e.filterMethod)?e.filterMethod(be):e.filterable&&e.remote&&Xe(e.remoteMethod)&&e.remoteMethod(be),e.defaultFirstOption&&(e.filterable||e.remote)&&z.value?ot(J):ot(ye))},J=()=>{const be=ge.value.filter(Mn=>Mn.visible&&!Mn.disabled&&!Mn.states.groupDisabled),Ke=be.find(Mn=>Mn.created),tn=be[0];i.hoveringIndex=we(ge.value,Ke||tn)},ue=()=>{if(e.multiple)i.selectedLabel="";else{const Ke=_e(e.modelValue);i.selectedLabel=Ke.currentLabel,i.selected=Ke;return}const be=[];Me(e.modelValue)&&e.modelValue.forEach(Ke=>{be.push(_e(Ke))}),i.selected=be},_e=be=>{let Ke;const tn=Fm(be).toLowerCase()==="object",Mn=Fm(be).toLowerCase()==="null",Ui=Fm(be).toLowerCase()==="undefined";for(let la=i.cachedOptions.size-1;la>=0;la--){const Es=Oe.value[la];if(tn?Tr(Es.value,e.valueKey)===Tr(be,e.valueKey):Es.value===be){Ke={value:be,currentLabel:Es.currentLabel,isDisabled:Es.isDisabled};break}}if(Ke)return Ke;const Iu=tn?be.label:!Mn&&!Ui?be:"";return{value:be,currentLabel:Iu}},ye=()=>{e.multiple?i.hoveringIndex=ge.value.findIndex(be=>i.selected.some(Ke=>Vd(Ke)===Vd(be))):i.hoveringIndex=ge.value.findIndex(be=>Vd(be)===Vd(i.selected))},Ae=()=>{i.selectionWidth=a.value.getBoundingClientRect().width},Le=()=>{i.calculatorWidth=f.value.getBoundingClientRect().width},Ee=()=>{i.collapseItemWidth=v.value.getBoundingClientRect().width},Pe=()=>{var be,Ke;(Ke=(be=u.value)==null?void 0:be.updatePopper)==null||Ke.call(be)},me=()=>{var be,Ke;(Ke=(be=c.value)==null?void 0:be.updatePopper)==null||Ke.call(be)},je=()=>{i.inputValue.length>0&&!T.value&&(T.value=!0),G(i.inputValue)},Ze=be=>{if(i.inputValue=be.target.value,e.remote)ce();else return je()},ce=zl(()=>{je()},X.value),te=be=>{jl(e.modelValue,be)||t(Cd,be)},pe=be=>eY(be,Ke=>!i.disabledOptions.has(Ke)),Ve=be=>{if(e.multiple&&be.code!==rt.delete&&be.target.value.length<=0){const Ke=e.modelValue.slice(),tn=pe(Ke);if(tn<0)return;Ke.splice(tn,1),t(Jt,Ke),te(Ke)}},Je=(be,Ke)=>{const tn=i.selected.indexOf(Ke);if(tn>-1&&!Z.value){const Mn=e.modelValue.slice();Mn.splice(tn,1),t(Jt,Mn),te(Mn),t("remove-tag",Ke.value)}be.stopPropagation(),Un()},$e=be=>{be.stopPropagation();const Ke=e.multiple?[]:B.value;if(e.multiple)for(const tn of i.selected)tn.isDisabled&&Ke.push(tn.value);t(Jt,Ke),te(Ke),i.hoveringIndex=-1,T.value=!1,t("clear"),Un()},ie=be=>{if(e.multiple){const Ke=(e.modelValue||[]).slice(),tn=we(Ke,be.value);tn>-1?Ke.splice(tn,1):(e.multipleLimit<=0||Ke.length<e.multipleLimit)&&Ke.push(be.value),t(Jt,Ke),te(Ke),be.created&&G(""),e.filterable&&!e.reserveKeyword&&(i.inputValue="")}else t(Jt,be.value),te(be.value),T.value=!1;Un(),!T.value&&ot(()=>{ae(be)})},we=(be=[],Ke)=>{if(!ft(Ke))return be.indexOf(Ke);const tn=e.valueKey;let Mn=-1;return be.some((Ui,Iu)=>Mt(Tr(Ui,tn))===Tr(Ke,tn)?(Mn=Iu,!0):!1),Mn},ae=be=>{var Ke,tn,Mn,Ui,Iu;const Uh=Me(be)?be[0]:be;let la=null;if(Uh!=null&&Uh.value){const Es=ge.value.filter(Gk=>Gk.value===Uh.value);Es.length>0&&(la=Es[0].$el)}if(u.value&&la){const Es=(Ui=(Mn=(tn=(Ke=u.value)==null?void 0:Ke.popperRef)==null?void 0:tn.contentRef)==null?void 0:Mn.querySelector)==null?void 0:Ui.call(Mn,`.${r.be("dropdown","wrap")}`);Es&&bY(Es,la)}(Iu=w.value)==null||Iu.handleScroll()},Se=be=>{i.options.set(be.value,be),i.cachedOptions.set(be.value,be),be.disabled&&i.disabledOptions.set(be.value,be)},Fe=(be,Ke)=>{i.options.get(be)===Ke&&i.options.delete(be)},{handleCompositionStart:st,handleCompositionUpdate:se,handleCompositionEnd:De}=mae(be=>Ze(be)),Ot=R(()=>{var be,Ke;return(Ke=(be=u.value)==null?void 0:be.popperRef)==null?void 0:Ke.contentRef}),mn=()=>{i.isBeforeHide=!1,ot(()=>ae(i.selected))},Un=()=>{var be;(be=d.value)==null||be.focus()},Zr=()=>{nr()},qt=be=>{$e(be)},nr=be=>{if(T.value=!1,S.value){const Ke=new FocusEvent("focus",be);ot(()=>E(Ke))}},pR=()=>{i.inputValue.length>0?i.inputValue="":T.value=!1},Kk=()=>{Z.value||(i.menuVisibleOnFocus?i.menuVisibleOnFocus=!1:T.value=!T.value)},hR=()=>{T.value?ge.value[i.hoveringIndex]&&ie(ge.value[i.hoveringIndex]):Kk()},Vd=be=>ft(be.value)?Tr(be.value,e.valueKey):be.value,mR=R(()=>ge.value.filter(be=>be.visible).every(be=>be.disabled)),gR=R(()=>e.multiple?e.collapseTags?i.selected.slice(0,e.maxCollapseTags):i.selected:[]),vR=R(()=>e.multiple?e.collapseTags?i.selected.slice(e.maxCollapseTags):[]:[]),qk=be=>{if(!T.value){T.value=!0;return}if(!(i.options.size===0||z.value===0)&&!mR.value){be==="next"?(i.hoveringIndex++,i.hoveringIndex===i.options.size&&(i.hoveringIndex=0)):be==="prev"&&(i.hoveringIndex--,i.hoveringIndex<0&&(i.hoveringIndex=i.options.size-1));const Ke=ge.value[i.hoveringIndex];(Ke.disabled===!0||Ke.states.groupDisabled===!0||!Ke.visible)&&qk(be),ot(()=>ae(O.value))}},yR=()=>{if(!a.value)return 0;const be=window.getComputedStyle(a.value);return Number.parseFloat(be.gap||"6px")},_R=R(()=>{const be=yR();return{maxWidth:`${v.value&&e.maxCollapseTags===1?i.selectionWidth-i.collapseItemWidth-be:i.selectionWidth}px`}}),bR=R(()=>({maxWidth:`${i.selectionWidth}px`})),wR=R(()=>({width:`${Math.max(i.calculatorWidth,gae)}px`}));return e.multiple&&!Me(e.modelValue)&&t(Jt,[]),!e.multiple&&Me(e.modelValue)&&t(Jt,""),Bo(a,Ae),Bo(f,Le),Bo(m,Pe),Bo(_,Pe),Bo(y,me),Bo(v,Ee),Ct(()=>{ue()}),{inputId:F,contentId:o,nsSelect:r,nsInput:s,states:i,isFocused:S,expanded:T,optionsArray:ge,hoverOption:O,selectSize:de,filteredOptionsCount:z,resetCalculatorWidth:Le,updateTooltip:Pe,updateTagTooltip:me,debouncedOnInputChange:ce,onInput:Ze,deletePrevTag:Ve,deleteTag:Je,deleteSelected:$e,handleOptionSelect:ie,scrollToOption:ae,hasModelValue:U,shouldShowPlaceholder:Ie,currentPlaceholder:Ge,showClose:j,iconComponent:V,iconReverse:H,validateState:L,validateIcon:I,showNewOption:xe,updateOptions:ee,collapseTagSize:ve,setSelected:ue,selectDisabled:Z,emptyText:oe,handleCompositionStart:st,handleCompositionUpdate:se,handleCompositionEnd:De,onOptionCreate:Se,onOptionDestroy:Fe,handleMenuEnter:mn,handleFocus:x,focus:Un,blur:Zr,handleBlur:E,handleClearClick:qt,handleClickOutside:nr,handleEsc:pR,toggleMenu:Kk,selectOption:hR,getValueKey:Vd,navigateOptions:qk,dropdownMenuVisible:le,showTagList:gR,collapseTagList:vR,tagStyle:_R,collapseTagStyle:bR,inputStyle:wR,popperRef:Ot,inputRef:d,tooltipRef:u,tagTooltipRef:c,calculatorRef:f,prefixRef:p,suffixRef:h,selectRef:l,wrapperRef:_,selectionRef:a,scrollbarRef:w,menuRef:m,tagMenuRef:y,collapseItemRef:v}};var yae=Q({name:"ElOptions",setup(e,{slots:t}){const n=Be(q0);let o=[];return()=>{var r,s;const i=(r=t.default)==null?void 0:r.call(t),l=[];function a(u){Me(u)&&u.forEach(c=>{var d,f,p,h;const m=(d=(c==null?void 0:c.type)||{})==null?void 0:d.name;m==="ElOptionGroup"?a(!tt(c.children)&&!Me(c.children)&&Xe((f=c.children)==null?void 0:f.default)?(p=c.children)==null?void 0:p.default():c.children):m==="ElOption"?l.push((h=c.props)==null?void 0:h.value):Me(c.children)&&a(c.children)})}return i.length&&a((s=i[0])==null?void 0:s.children),jl(l,o)||(o=l,n&&(n.states.optionValues=l)),i}}});const _ae=We({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:qr,effect:{type:Ce(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Ce(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:ar.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:Oo,default:wd},fitInputWidth:Boolean,suffixIcon:{type:Oo,default:Su},tagType:{...PT.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,placement:{type:Ce(String),values:L0,default:"bottom-start"},fallbackPlacements:{type:Ce(Array),default:["bottom-start","top-start","right","left"]},ariaLabel:{type:String,default:void 0},...M3}),v8="ElSelect",bae=Q({name:v8,componentName:v8,components:{ElInput:At,ElSelectMenu:hae,ElOption:U3,ElOptions:yae,ElTag:mh,ElScrollbar:ks,ElTooltip:$u,ElIcon:Ne},directives:{ClickOutside:id},props:_ae,emits:[Jt,Cd,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const n=vae(e,t);return wt(q0,Dn({props:e,states:n.states,optionsArray:n.optionsArray,handleOptionSelect:n.handleOptionSelect,onOptionCreate:n.onOptionCreate,onOptionDestroy:n.onOptionDestroy,selectRef:n.selectRef,setSelected:n.setSelected})),{...n}}}),wae=["id","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],Cae=["textContent"];function kae(e,t,n,o,r,s){const i=re("el-tag"),l=re("el-tooltip"),a=re("el-icon"),u=re("el-option"),c=re("el-options"),d=re("el-scrollbar"),f=re("el-select-menu"),p=zt("click-outside");return He((C(),M("div",{ref:"selectRef",class:D([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),onMouseenter:t[16]||(t[16]=h=>e.states.inputHovering=!0),onMouseleave:t[17]||(t[17]=h=>e.states.inputHovering=!1),onClick:t[18]||(t[18]=et((...h)=>e.toggleMenu&&e.toggleMenu(...h),["prevent","stop"]))},[k(l,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,onBeforeShow:e.handleMenuEnter,onHide:t[15]||(t[15]=h=>e.states.isBeforeHide=!1)},{default:$(()=>{var h;return[b("div",{ref:"wrapperRef",class:D([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)])},[e.$slots.prefix?(C(),M("div",{key:0,ref:"prefixRef",class:D(e.nsSelect.e("prefix"))},[he(e.$slots,"prefix")],2)):W("v-if",!0),b("div",{ref:"selectionRef",class:D([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?he(e.$slots,"tag",{key:0},()=>[(C(!0),M(fe,null,nt(e.showTagList,m=>(C(),M("div",{key:e.getValueKey(m),class:D(e.nsSelect.e("selected-item"))},[k(i,{closable:!e.selectDisabled&&!m.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:Qe(e.tagStyle),onClose:y=>e.deleteTag(y,m)},{default:$(()=>[b("span",{class:D(e.nsSelect.e("tags-text"))},A(m.currentLabel),3)]),_:2},1032,["closable","size","type","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(C(),q(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:$(()=>[b("div",{ref:"collapseItemRef",class:D(e.nsSelect.e("selected-item"))},[k(i,{closable:!1,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:Qe(e.collapseTagStyle)},{default:$(()=>[b("span",{class:D(e.nsSelect.e("tags-text"))}," + "+A(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","style"])],2)]),content:$(()=>[b("div",{ref:"tagMenuRef",class:D(e.nsSelect.e("selection"))},[(C(!0),M(fe,null,nt(e.collapseTagList,m=>(C(),M("div",{key:e.getValueKey(m),class:D(e.nsSelect.e("selected-item"))},[k(i,{class:"in-tooltip",closable:!e.selectDisabled&&!m.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",onClose:y=>e.deleteTag(y,m)},{default:$(()=>[b("span",{class:D(e.nsSelect.e("tags-text"))},A(m.currentLabel),3)]),_:2},1032,["closable","size","type","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect","teleported"])):W("v-if",!0)]):W("v-if",!0),e.selectDisabled?W("v-if",!0):(C(),M("div",{key:1,class:D([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[He(b("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":t[0]||(t[0]=m=>e.states.inputValue=m),type:"text",class:D([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:Qe(e.inputStyle),role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((h=e.hoverOption)==null?void 0:h.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onFocus:t[1]||(t[1]=(...m)=>e.handleFocus&&e.handleFocus(...m)),onBlur:t[2]||(t[2]=(...m)=>e.handleBlur&&e.handleBlur(...m)),onKeydown:[t[3]||(t[3]=Pt(et(m=>e.navigateOptions("next"),["stop","prevent"]),["down"])),t[4]||(t[4]=Pt(et(m=>e.navigateOptions("prev"),["stop","prevent"]),["up"])),t[5]||(t[5]=Pt(et((...m)=>e.handleEsc&&e.handleEsc(...m),["stop","prevent"]),["esc"])),t[6]||(t[6]=Pt(et((...m)=>e.selectOption&&e.selectOption(...m),["stop","prevent"]),["enter"])),t[7]||(t[7]=Pt(et((...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]=et((...m)=>e.toggleMenu&&e.toggleMenu(...m),["stop"]))},null,46,wae),[[Bc,e.states.inputValue]]),e.filterable?(C(),M("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:D(e.nsSelect.e("input-calculator")),textContent:A(e.states.inputValue)},null,10,Cae)):W("v-if",!0)],2)),e.shouldShowPlaceholder?(C(),M("div",{key:2,class:D([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[b("span",null,A(e.currentPlaceholder),1)],2)):W("v-if",!0)],2),b("div",{ref:"suffixRef",class:D(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(C(),q(a,{key:0,class:D([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:$(()=>[(C(),q(Lt(e.iconComponent)))]),_:1},8,["class"])):W("v-if",!0),e.showClose&&e.clearIcon?(C(),q(a,{key:1,class:D([e.nsSelect.e("caret"),e.nsSelect.e("icon")]),onClick:e.handleClearClick},{default:$(()=>[(C(),q(Lt(e.clearIcon)))]),_:1},8,["class","onClick"])):W("v-if",!0),e.validateState&&e.validateIcon?(C(),q(a,{key:2,class:D([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:$(()=>[(C(),q(Lt(e.validateIcon)))]),_:1},8,["class"])):W("v-if",!0)],2)],2)]}),content:$(()=>[k(f,{ref:"menuRef"},{default:$(()=>[e.$slots.header?(C(),M("div",{key:0,class:D(e.nsSelect.be("dropdown","header")),onClick:t[13]||(t[13]=et(()=>{},["stop"]))},[he(e.$slots,"header")],2)):W("v-if",!0),He(k(d,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:D([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:$(()=>[e.showNewOption?(C(),q(u,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):W("v-if",!0),k(c,null,{default:$(()=>[he(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[en,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(C(),M("div",{key:1,class:D(e.nsSelect.be("dropdown","loading"))},[he(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(C(),M("div",{key:2,class:D(e.nsSelect.be("dropdown","empty"))},[he(e.$slots,"empty",{},()=>[b("span",null,A(e.emptyText),1)])],2)):W("v-if",!0),e.$slots.footer?(C(),M("div",{key:3,class:D(e.nsSelect.be("dropdown","footer")),onClick:t[14]||(t[14]=et(()=>{},["stop"]))},[he(e.$slots,"footer")],2)):W("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","onBeforeShow"])],34)),[[p,e.handleClickOutside,e.popperRef]])}var Sae=ze(bae,[["render",kae],["__file","select.vue"]]);const $ae=Q({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=Re("select"),n=K(null),o=at(),r=K([]);wt(hO,Dn({...ei(e)}));const s=R(()=>r.value.some(a=>a.visible===!0)),i=a=>{const u=[];return Me(a.children)&&a.children.forEach(c=>{var d,f;c.type&&c.type.name==="ElOption"&&c.component&&c.component.proxy?u.push(c.component.proxy):(d=c.children)!=null&&d.length?u.push(...i(c)):(f=c.component)!=null&&f.subTree&&u.push(...i(c.component.subTree))}),u},l=()=>{r.value=i(o.subTree)};return Ct(()=>{l()}),oH(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:s,ns:t}}});function Eae(e,t,n,o,r,s){return He((C(),M("ul",{ref:"groupRef",class:D(e.ns.be("group","wrap"))},[b("li",{class:D(e.ns.be("group","title"))},A(e.label),3),b("li",null,[b("ul",{class:D(e.ns.b("group"))},[he(e.$slots,"default")],2)])],2)),[[en,e.visible]])}var mO=ze($ae,[["render",Eae],["__file","option-group.vue"]]);const vr=Zt(Sae,{Option:U3,OptionGroup:mO}),Ss=Gn(U3),xae=Gn(mO),W3=()=>Be(pO,{}),Mae=We({pageSize:{type:Number,required:!0},pageSizes:{type:Ce(Array),default:()=>$o([10,20,30,40,50,100])},popperClass:{type:String},disabled:Boolean,teleported:Boolean,size:{type:String,values:Zl}}),Tae=Q({name:"ElPaginationSizes"}),Oae=Q({...Tae,props:Mae,emits:["page-size-change"],setup(e,{emit:t}){const n=e,{t:o}=Kt(),r=Re("pagination"),s=W3(),i=K(n.pageSize);Te(()=>n.pageSizes,(u,c)=>{if(!jl(u,c)&&Array.isArray(u)){const d=u.includes(n.pageSize)?n.pageSize:n.pageSizes[0];t("page-size-change",d)}}),Te(()=>n.pageSize,u=>{i.value=u});const l=R(()=>n.pageSizes);function a(u){var c;u!==i.value&&(i.value=u,(c=s.handleSizeChange)==null||c.call(s,Number(u)))}return(u,c)=>(C(),M("span",{class:D(g(r).e("sizes"))},[k(g(vr),{"model-value":i.value,disabled:u.disabled,"popper-class":u.popperClass,size:u.size,teleported:u.teleported,"validate-event":!1,onChange:a},{default:$(()=>[(C(!0),M(fe,null,nt(g(l),d=>(C(),q(g(Ss),{key:d,value:d,label:d+g(o)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","size","teleported"])],2))}});var Iae=ze(Oae,[["__file","sizes.vue"]]);const Aae=We({size:{type:String,values:Zl}}),Nae=["disabled"],Pae=Q({name:"ElPaginationJumper"}),Lae=Q({...Pae,props:Aae,setup(e){const{t}=Kt(),n=Re("pagination"),{pageCount:o,disabled:r,currentPage:s,changeEvent:i}=W3(),l=K(),a=R(()=>{var d;return(d=l.value)!=null?d:s==null?void 0:s.value});function u(d){l.value=d?+d:""}function c(d){d=Math.trunc(+d),i==null||i(d),l.value=void 0}return(d,f)=>(C(),M("span",{class:D(g(n).e("jump")),disabled:g(r)},[b("span",{class:D([g(n).e("goto")])},A(g(t)("el.pagination.goto")),3),k(g(At),{size:d.size,class:D([g(n).e("editor"),g(n).is("in-pagination")]),min:1,max:g(o),disabled:g(r),"model-value":g(a),"validate-event":!1,label:g(t)("el.pagination.page"),type:"number","onUpdate:modelValue":u,onChange:c},null,8,["size","class","max","disabled","model-value","label"]),b("span",{class:D([g(n).e("classifier")])},A(g(t)("el.pagination.pageClassifier")),3)],10,Nae))}});var Rae=ze(Lae,[["__file","jumper.vue"]]);const Dae=We({total:{type:Number,default:1e3}}),Fae=["disabled"],Vae=Q({name:"ElPaginationTotal"}),Bae=Q({...Vae,props:Dae,setup(e){const{t}=Kt(),n=Re("pagination"),{disabled:o}=W3();return(r,s)=>(C(),M("span",{class:D(g(n).e("total")),disabled:g(o)},A(g(t)("el.pagination.total",{total:r.total})),11,Fae))}});var zae=ze(Bae,[["__file","total.vue"]]);const jae=We({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),Hae=["onKeyup"],Uae=["aria-current","aria-label","tabindex"],Wae=["tabindex","aria-label"],Kae=["aria-current","aria-label","tabindex"],qae=["tabindex","aria-label"],Gae=["aria-current","aria-label","tabindex"],Yae=Q({name:"ElPaginationPager"}),Zae=Q({...Yae,props:jae,emits:["change"],setup(e,{emit:t}){const n=e,o=Re("pager"),r=Re("icon"),{t:s}=Kt(),i=K(!1),l=K(!1),a=K(!1),u=K(!1),c=K(!1),d=K(!1),f=R(()=>{const S=n.pagerCount,x=(S-1)/2,E=Number(n.currentPage),T=Number(n.pageCount);let O=!1,P=!1;T>S&&(E>S-x&&(O=!0),E<T-x&&(P=!0));const N=[];if(O&&!P){const F=T-(S-2);for(let B=F;B<T;B++)N.push(B)}else if(!O&&P)for(let F=2;F<S;F++)N.push(F);else if(O&&P){const F=Math.floor(S/2)-1;for(let B=E-F;B<=E+F;B++)N.push(B)}else for(let F=2;F<T;F++)N.push(F);return N}),p=R(()=>["more","btn-quickprev",r.b(),o.is("disabled",n.disabled)]),h=R(()=>["more","btn-quicknext",r.b(),o.is("disabled",n.disabled)]),m=R(()=>n.disabled?-1:0);ls(()=>{const S=(n.pagerCount-1)/2;i.value=!1,l.value=!1,n.pageCount>n.pagerCount&&(n.currentPage>n.pagerCount-S&&(i.value=!0),n.currentPage<n.pageCount-S&&(l.value=!0))});function y(S=!1){n.disabled||(S?a.value=!0:u.value=!0)}function v(S=!1){S?c.value=!0:d.value=!0}function w(S){const x=S.target;if(x.tagName.toLowerCase()==="li"&&Array.from(x.classList).includes("number")){const E=Number(x.textContent);E!==n.currentPage&&t("change",E)}else x.tagName.toLowerCase()==="li"&&Array.from(x.classList).includes("more")&&_(S)}function _(S){const x=S.target;if(x.tagName.toLowerCase()==="ul"||n.disabled)return;let E=Number(x.textContent);const T=n.pageCount,O=n.currentPage,P=n.pagerCount-2;x.className.includes("more")&&(x.className.includes("quickprev")?E=O-P:x.className.includes("quicknext")&&(E=O+P)),Number.isNaN(+E)||(E<1&&(E=1),E>T&&(E=T)),E!==O&&t("change",E)}return(S,x)=>(C(),M("ul",{class:D(g(o).b()),onClick:_,onKeyup:Pt(w,["enter"])},[S.pageCount>0?(C(),M("li",{key:0,class:D([[g(o).is("active",S.currentPage===1),g(o).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===1,"aria-label":g(s)("el.pagination.currentPage",{pager:1}),tabindex:g(m)}," 1 ",10,Uae)):W("v-if",!0),i.value?(C(),M("li",{key:1,class:D(g(p)),tabindex:g(m),"aria-label":g(s)("el.pagination.prevPages",{pager:S.pagerCount-2}),onMouseenter:x[0]||(x[0]=E=>y(!0)),onMouseleave:x[1]||(x[1]=E=>a.value=!1),onFocus:x[2]||(x[2]=E=>v(!0)),onBlur:x[3]||(x[3]=E=>c.value=!1)},[(a.value||c.value)&&!S.disabled?(C(),q(g(Jc),{key:0})):(C(),q(g(Y_),{key:1}))],42,Wae)):W("v-if",!0),(C(!0),M(fe,null,nt(g(f),E=>(C(),M("li",{key:E,class:D([[g(o).is("active",S.currentPage===E),g(o).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===E,"aria-label":g(s)("el.pagination.currentPage",{pager:E}),tabindex:g(m)},A(E),11,Kae))),128)),l.value?(C(),M("li",{key:2,class:D(g(h)),tabindex:g(m),"aria-label":g(s)("el.pagination.nextPages",{pager:S.pagerCount-2}),onMouseenter:x[4]||(x[4]=E=>y()),onMouseleave:x[5]||(x[5]=E=>u.value=!1),onFocus:x[6]||(x[6]=E=>v()),onBlur:x[7]||(x[7]=E=>d.value=!1)},[(u.value||d.value)&&!S.disabled?(C(),q(g(Xc),{key:0})):(C(),q(g(Y_),{key:1}))],42,qae)):W("v-if",!0),S.pageCount>1?(C(),M("li",{key:3,class:D([[g(o).is("active",S.currentPage===S.pageCount),g(o).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===S.pageCount,"aria-label":g(s)("el.pagination.currentPage",{pager:S.pageCount}),tabindex:g(m)},A(S.pageCount),11,Gae)):W("v-if",!0)],42,Hae))}});var Jae=ze(Zae,[["__file","pager.vue"]]);const wo=e=>typeof e!="number",Xae=We({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:e=>_t(e)&&Math.trunc(e)===e&&e>4&&e<22&&e%2===1,default:7},currentPage:Number,defaultCurrentPage:Number,layout:{type:String,default:["prev","pager","next","jumper","->","total"].join(", ")},pageSizes:{type:Ce(Array),default:()=>$o([10,20,30,40,50,100])},popperClass:{type:String,default:""},prevText:{type:String,default:""},prevIcon:{type:Oo,default:()=>au},nextText:{type:String,default:""},nextIcon:{type:Oo,default:()=>js},teleported:{type:Boolean,default:!0},small:Boolean,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean}),Qae={"update:current-page":e=>_t(e),"update:page-size":e=>_t(e),"size-change":e=>_t(e),change:(e,t)=>_t(e)&&_t(t),"current-change":e=>_t(e),"prev-click":e=>_t(e),"next-click":e=>_t(e)},y8="ElPagination";var eue=Q({name:y8,props:Xae,emits:Qae,setup(e,{emit:t,slots:n}){const{t:o}=Kt(),r=Re("pagination"),s=at().vnode.props||{},i="onUpdate:currentPage"in s||"onUpdate:current-page"in s||"onCurrentChange"in s,l="onUpdate:pageSize"in s||"onUpdate:page-size"in s||"onSizeChange"in s,a=R(()=>{if(wo(e.total)&&wo(e.pageCount)||!wo(e.currentPage)&&!i)return!1;if(e.layout.includes("sizes")){if(wo(e.pageCount)){if(!wo(e.total)&&!wo(e.pageSize)&&!l)return!1}else if(!l)return!1}return!0}),u=K(wo(e.defaultPageSize)?10:e.defaultPageSize),c=K(wo(e.defaultCurrentPage)?1:e.defaultCurrentPage),d=R({get(){return wo(e.pageSize)?u.value:e.pageSize},set(_){wo(e.pageSize)&&(u.value=_),l&&(t("update:page-size",_),t("size-change",_))}}),f=R(()=>{let _=0;return wo(e.pageCount)?wo(e.total)||(_=Math.max(1,Math.ceil(e.total/d.value))):_=e.pageCount,_}),p=R({get(){return wo(e.currentPage)?c.value:e.currentPage},set(_){let S=_;_<1?S=1:_>f.value&&(S=f.value),wo(e.currentPage)&&(c.value=S),i&&(t("update:current-page",S),t("current-change",S))}});Te(f,_=>{p.value>_&&(p.value=_)}),Te([p,d],_=>{t("change",..._)},{flush:"post"});function h(_){p.value=_}function m(_){d.value=_;const S=f.value;p.value>S&&(p.value=S)}function y(){e.disabled||(p.value-=1,t("prev-click",p.value))}function v(){e.disabled||(p.value+=1,t("next-click",p.value))}function w(_,S){_&&(_.props||(_.props={}),_.props.class=[_.props.class,S].join(" "))}return wt(pO,{pageCount:f,disabled:R(()=>e.disabled),currentPage:p,changeEvent:h,handleSizeChange:m}),()=>{var _,S;if(!a.value)return o("el.pagination.deprecationWarning"),null;if(!e.layout||e.hideOnSinglePage&&f.value<=1)return null;const x=[],E=[],T=lt("div",{class:r.e("rightwrapper")},E),O={prev:lt(tae,{disabled:e.disabled,currentPage:p.value,prevText:e.prevText,prevIcon:e.prevIcon,onClick:y}),jumper:lt(Rae,{size:e.small?"small":"default"}),pager:lt(Jae,{currentPage:p.value,pageCount:f.value,pagerCount:e.pagerCount,onChange:h,disabled:e.disabled}),next:lt(lae,{disabled:e.disabled,currentPage:p.value,pageCount:f.value,nextText:e.nextText,nextIcon:e.nextIcon,onClick:v}),sizes:lt(Iae,{pageSize:d.value,pageSizes:e.pageSizes,popperClass:e.popperClass,disabled:e.disabled,teleported:e.teleported,size:e.small?"small":"default"}),slot:(S=(_=n==null?void 0:n.default)==null?void 0:_.call(n))!=null?S:null,total:lt(zae,{total:wo(e.total)?0:e.total})},P=e.layout.split(",").map(F=>F.trim());let N=!1;return P.forEach(F=>{if(F==="->"){N=!0;return}N?E.push(O[F]):x.push(O[F])}),w(x[0],r.is("first")),w(x[x.length-1],r.is("last")),N&&E.length>0&&(w(E[0],r.is("first")),w(E[E.length-1],r.is("last")),x.push(T)),lt("div",{class:[r.b(),r.is("background",e.background),{[r.m("small")]:e.small}]},x)}}});const tue=Zt(eue),nue=We({trigger:Dp.trigger,placement:o1.placement,disabled:Dp.disabled,visible:ar.visible,transition:ar.transition,popperOptions:o1.popperOptions,tabindex:o1.tabindex,content:ar.content,popperStyle:ar.popperStyle,popperClass:ar.popperClass,enterable:{...ar.enterable,default:!0},effect:{...ar.effect,default:"light"},teleported:ar.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),oue={"update:visible":e=>Br(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},rue="onUpdate:visible",sue=Q({name:"ElPopover"}),iue=Q({...sue,props:nue,emits:oue,setup(e,{expose:t,emit:n}){const o=e,r=R(()=>o[rue]),s=Re("popover"),i=K(),l=R(()=>{var y;return(y=g(i))==null?void 0:y.popperRef}),a=R(()=>[{width:Zo(o.width)},o.popperStyle]),u=R(()=>[s.b(),o.popperClass,{[s.m("plain")]:!!o.content}]),c=R(()=>o.transition===`${s.namespace.value}-fade-in-linear`),d=()=>{var y;(y=i.value)==null||y.hide()},f=()=>{n("before-enter")},p=()=>{n("before-leave")},h=()=>{n("after-enter")},m=()=>{n("update:visible",!1),n("after-leave")};return t({popperRef:l,hide:d}),(y,v)=>(C(),q(g($u),un({ref_key:"tooltipRef",ref:i},y.$attrs,{trigger:y.trigger,placement:y.placement,disabled:y.disabled,visible:y.visible,transition:y.transition,"popper-options":y.popperOptions,tabindex:y.tabindex,content:y.content,offset:y.offset,"show-after":y.showAfter,"hide-after":y.hideAfter,"auto-close":y.autoClose,"show-arrow":y.showArrow,"aria-label":y.title,effect:y.effect,enterable:y.enterable,"popper-class":g(u),"popper-style":g(a),teleported:y.teleported,persistent:y.persistent,"gpu-acceleration":g(c),"onUpdate:visible":g(r),onBeforeShow:f,onBeforeHide:p,onShow:h,onHide:m}),{content:$(()=>[y.title?(C(),M("div",{key:0,class:D(g(s).e("title")),role:"title"},A(y.title),3)):W("v-if",!0),he(y.$slots,"default",{},()=>[ne(A(y.content),1)])]),default:$(()=>[y.$slots.reference?he(y.$slots,"reference",{key:0}):W("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 lue=ze(iue,[["__file","popover.vue"]]);const _8=(e,t)=>{const n=t.arg||t.value,o=n==null?void 0:n.popperRef;o&&(o.triggerRef=e)};var aue={mounted(e,t){_8(e,t)},updated(e,t){_8(e,t)}};const uue="popover",cue=gJ(aue,uue),Po=Zt(lue,{directive:cue}),due=We({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:e=>e>=0&&e<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:{type:Boolean,default:!1},duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:Ce(String),default:"round"},textInside:{type:Boolean,default:!1},width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:Ce([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:Ce(Function),default:e=>`${e}%`}}),fue=["aria-valuenow"],pue={viewBox:"0 0 100 100"},hue=["d","stroke","stroke-linecap","stroke-width"],mue=["d","stroke","opacity","stroke-linecap","stroke-width"],gue={key:0},vue=Q({name:"ElProgress"}),yue=Q({...vue,props:due,setup(e){const t=e,n={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},o=Re("progress"),r=R(()=>({width:`${t.percentage}%`,animationDuration:`${t.duration}s`,backgroundColor:w(t.percentage)})),s=R(()=>(t.strokeWidth/t.width*100).toFixed(1)),i=R(()=>["circle","dashboard"].includes(t.type)?Number.parseInt(`${50-Number.parseFloat(s.value)/2}`,10):0),l=R(()=>{const _=i.value,S=t.type==="dashboard";return`
72 +*/const H_="_Mousewheel",wA=function(t,e){if(t&&t.addEventListener){uV(t);const n=function(i){const s=_he(i);e&&Reflect.apply(e,this,[i,s])};t[H_]={wheelHandler:n},t.addEventListener("wheel",n,{passive:!0})}},uV=t=>{var e;(e=t[H_])!=null&&e.wheelHandler&&(t.removeEventListener("wheel",t[H_].wheelHandler),t[H_]=null)},yhe={beforeMount(t,e){wA(t,e.value)},unmounted(t){uV(t)},updated(t,e){e.value!==e.oldValue&&wA(t,e.value)}},bhe=Ge({...she,datetimeRole:String,parsedValue:{type:de(Object)}}),whe=({getAvailableHours:t,getAvailableMinutes:e,getAvailableSeconds:n})=>{const i=(r,a,l,c)=>{const u={hour:t,minute:e,second:n};let d=r;return["hour","minute","second"].forEach(h=>{if(u[h]){let f;const p=u[h];switch(h){case"minute":f=p(d.hour(),a,c);break;case"second":f=p(d.hour(),d.minute(),a,c);break;default:f=p(a,c);break}if(f!=null&&f.length&&!f.includes(d[h]())){const m=l?0:f.length-1;d=d[h](f[m])}}}),d},s={};return{timePickerOptions:s,getAvailableTime:i,onSetOption:([r,a])=>{s[r]=a}}},Nw=t=>{const e=(i,s)=>i||s,n=i=>i!==!0;return t.map(e).filter(n)},dV=(t,e,n)=>({getHoursList:(r,a)=>Fw(24,t&&(()=>t==null?void 0:t(r,a))),getMinutesList:(r,a,l)=>Fw(60,e&&(()=>e==null?void 0:e(r,a,l))),getSecondsList:(r,a,l,c)=>Fw(60,n&&(()=>n==null?void 0:n(r,a,l,c)))}),khe=(t,e,n)=>{const{getHoursList:i,getMinutesList:s,getSecondsList:o}=dV(t,e,n);return{getAvailableHours:(c,u)=>Nw(i(c,u)),getAvailableMinutes:(c,u,d)=>Nw(s(c,u,d)),getAvailableSeconds:(c,u,d,h)=>Nw(o(c,u,d,h))}},Che=(t,e)=>{const n=ee(t.parsedValue);return Te(()=>t.visible,i=>{const s=vk(e.modelValue),o=vk(e.valueOnClear);if(i&&s===o){n.value=o;return}i||(n.value=t.parsedValue)}),n},xhe=Ge({role:{type:String,required:!0},spinnerDate:{type:de(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:de(String),default:""},...f8}),She=["onClick"],$he=["onMouseenter"];var Ahe=fe({__name:"basic-time-spinner",props:xhe,emits:[dn,"select-range","set-option"],setup(t,{emit:e}){const n=t,{isRange:i,format:s,saveOnBlur:o}=qe(Oa).props,r=e,a=Be("time"),{getHoursList:l,getMinutesList:c,getSecondsList:u}=dV(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let d=!1;const h={hours:!1,minutes:!1,seconds:!1},f=ee(),p={hours:ee(),minutes:ee(),seconds:ee()},m=W(()=>n.showSeconds?dA:dA.slice(0,2)),b=W(()=>{const{spinnerDate:Q}=n;return{hours:Q.hour(),minutes:Q.minute(),seconds:Q.second()}}),w=W(()=>{const{hours:Q,minutes:ne}=E(b),{role:K,spinnerDate:ae}=n,ge=i?void 0:ae;return{hours:l(K,ge),minutes:c(Q,K,ge),seconds:u(Q,ne,K,ge)}}),k=W(()=>{const{hours:Q,minutes:ne,seconds:K}=E(b);return{hours:Vw(Q,23),minutes:Vw(ne,59),seconds:Vw(K,59)}}),C=yd(Q=>{d=!1,M(Q)},200),A=Q=>{if(!n.amPmMode)return"";const ne=n.amPmMode==="A";let K=Q<12?" am":" pm";return ne&&(K=K.toUpperCase()),K},S=Q=>{let ne=[0,0];const K=s||n1,ae=K.indexOf("HH"),ge=K.indexOf("mm"),Ce=K.indexOf("ss");switch(Q){case"hours":ae!==-1&&(ne=[ae,ae+2]);break;case"minutes":ge!==-1&&(ne=[ge,ge+2]);break;case"seconds":Ce!==-1&&(ne=[Ce,Ce+2]);break}const[oe,pe]=ne;r("select-range",oe,pe),f.value=Q},M=Q=>{I(Q,E(b)[Q])},P=()=>{M("hours"),M("minutes"),M("seconds")},T=Q=>Q.querySelector(`.${a.namespace.value}-scrollbar__wrap`),I=(Q,ne)=>{if(n.arrowControl)return;const K=E(p[Q]);K&&K.$el&&(o||(h[Q]=!0,Kg(()=>{h[Q]=!1})),T(K.$el).scrollTop=Math.max(0,ne*L(Q)))},L=Q=>{var K;const ne=(K=E(p[Q]))==null?void 0:K.$el.querySelector("li");return ne&&Number.parseFloat(il(ne,"height"))||0},R=()=>{H(1)},V=()=>{H(-1)},H=Q=>{f.value||S("hours");const ne=f.value,K=E(b)[ne],ae=F(ne,K,Q,f.value==="hours"?24:60);U(ne,ae),I(ne,ae),ot(()=>S(ne))},F=(Q,ne,K,ae)=>{let ge=(ne+K+ae)%ae;const Ce=E(w)[Q];for(;Ce[ge]&&ge!==ne;)ge=(ge+K+ae)%ae;return ge},U=(Q,ne)=>{if(E(w)[Q][ne])return;const{hours:K,minutes:ae,seconds:ge}=E(b);let Ce;switch(Q){case"hours":Ce=n.spinnerDate.hour(ne).minute(ae).second(ge);break;case"minutes":Ce=n.spinnerDate.hour(K).minute(ne).second(ge);break;case"seconds":Ce=n.spinnerDate.hour(K).minute(ae).second(ne);break}r(dn,Ce)},Y=(Q,{value:ne,disabled:K})=>{K||(U(Q,ne),S(Q),I(Q,ne))},z=Q=>{if(!o&&h[Q])return;const ne=E(p[Q]);ne&&(d=!0,C(Q),U(Q,Math.min(Math.round((T(ne.$el).scrollTop-(X(Q)*.5-10)/L(Q)+3)/L(Q)),Q==="hours"?23:59)))},X=Q=>E(p[Q]).$el.offsetHeight,Z=()=>{const Q=ne=>{const K=E(p[ne]);K&&K.$el&&(T(K.$el).onscroll=()=>{z(ne)})};Q("hours"),Q("minutes"),Q("seconds")};Nt(()=>{ot(()=>{!n.arrowControl&&Z(),P(),n.role==="start"&&S("hours")})});const G=(Q,ne)=>{p[ne].value=Q??void 0};return r("set-option",[`${n.role}_scrollDown`,H]),r("set-option",[`${n.role}_emitSelectRange`,S]),Te(()=>n.spinnerDate,()=>{d||P()}),(Q,ne)=>(v(),$("div",{class:q([E(a).b("spinner"),{"has-seconds":Q.showSeconds}])},[Q.arrowControl?O("v-if",!0):(v(!0),$(J,{key:0},ye(m.value,K=>(v(),D(E(zs),{key:K,ref_for:!0,ref:ae=>G(ae,K),class:q(E(a).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":E(a).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:ae=>S(K),onMousemove:ae=>M(K)},{default:y(()=>[(v(!0),$(J,null,ye(w.value[K],(ae,ge)=>(v(),$("li",{key:ge,class:q([E(a).be("spinner","item"),E(a).is("active",ge===b.value[K]),E(a).is("disabled",ae)]),onClick:Ce=>Y(K,{value:ge,disabled:ae})},[K==="hours"?(v(),$(J,{key:0},[N(x(("0"+(Q.amPmMode?ge%12||12:ge)).slice(-2))+x(A(ge)),1)],64)):(v(),$(J,{key:1},[N(x(("0"+ge).slice(-2)),1)],64))],10,She))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),Q.arrowControl?(v(!0),$(J,{key:1},ye(m.value,K=>(v(),$("div",{key:K,class:q([E(a).be("spinner","wrapper"),E(a).is("arrow")]),onMouseenter:ae=>S(K)},[Re((v(),D(E(we),{class:q(["arrow-up",E(a).be("spinner","arrow")])},{default:y(()=>[_(E(n2))]),_:1},8,["class"])),[[E(S0),V]]),Re((v(),D(E(we),{class:q(["arrow-down",E(a).be("spinner","arrow")])},{default:y(()=>[_(E(zd))]),_:1},8,["class"])),[[E(S0),R]]),g("ul",{class:q(E(a).be("spinner","list"))},[(v(!0),$(J,null,ye(k.value[K],(ae,ge)=>(v(),$("li",{key:ge,class:q([E(a).be("spinner","item"),E(a).is("active",ae===b.value[K]),E(a).is("disabled",w.value[K][ae])])},[E(wt)(ae)?(v(),$(J,{key:0},[K==="hours"?(v(),$(J,{key:0},[N(x(("0"+(Q.amPmMode?ae%12||12:ae)).slice(-2))+x(A(ae)),1)],64)):(v(),$(J,{key:1},[N(x(("0"+ae).slice(-2)),1)],64))],64)):O("v-if",!0)],2))),128))],2)],42,$he))),128)):O("v-if",!0)],2))}}),Ehe=Ahe,Mhe=fe({__name:"panel-time-pick",props:bhe,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,i=e,s=qe(Oa),{arrowControl:o,disabledHours:r,disabledMinutes:a,disabledSeconds:l,defaultValue:c}=s.props,{getAvailableHours:u,getAvailableMinutes:d,getAvailableSeconds:h}=khe(r,a,l),f=Be("time"),{t:p,lang:m}=en(),b=ee([0,2]),w=Che(n,{modelValue:W(()=>s.props.modelValue),valueOnClear:W(()=>s!=null&&s.emptyValues?s.emptyValues.valueOnClear.value:null)}),k=W(()=>sn(n.actualVisible)?`${f.namespace.value}-zoom-in-top`:""),C=W(()=>n.format.includes("ss")),A=W(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),S=X=>{const Z=ft(X).locale(m.value),G=U(Z);return Z.isSame(G)},M=()=>{const X=w.value;i("pick",X,!1),ot(()=>{w.value=X})},P=(X=!1,Z=!1)=>{Z||i("pick",n.parsedValue,X)},T=X=>{n.visible&&i("pick",U(X).millisecond(0),!0)},I=(X,Z)=>{i("select-range",X,Z),b.value=[X,Z]},L=X=>{const Z=n.format,G=Z.indexOf("HH"),Q=Z.indexOf("mm"),ne=Z.indexOf("ss"),K=[],ae=[];G!==-1&&(K.push(G),ae.push("hours")),Q!==-1&&(K.push(Q),ae.push("minutes")),ne!==-1&&C.value&&(K.push(ne),ae.push("seconds"));const ge=(K.indexOf(b.value[0])+X+K.length)%K.length;V.start_emitSelectRange(ae[ge])},R=X=>{const Z=ls(X),{left:G,right:Q,up:ne,down:K}=Ue;if([G,Q].includes(Z)){L(Z===G?-1:1),X.preventDefault();return}if([ne,K].includes(Z)){const ae=Z===ne?-1:1;V.start_scrollDown(ae),X.preventDefault();return}},{timePickerOptions:V,onSetOption:H,getAvailableTime:F}=whe({getAvailableHours:u,getAvailableMinutes:d,getAvailableSeconds:h}),U=X=>F(X,n.datetimeRole||"",!0),Y=X=>X?ft(X,n.format).locale(m.value):null,z=()=>ft(c).locale(m.value);return i("set-picker-option",["isValidValue",S]),i("set-picker-option",["parseUserInput",Y]),i("set-picker-option",["handleKeydownInput",R]),i("set-picker-option",["getRangeAvailableTime",U]),i("set-picker-option",["getDefaultValue",z]),i("set-picker-option",["handleCancel",M]),(X,Z)=>(v(),D(jo,{name:k.value},{default:y(()=>[X.actualVisible||X.visible?(v(),$("div",{key:0,class:q(E(f).b("panel"))},[g("div",{class:q([E(f).be("panel","content"),{"has-seconds":C.value}])},[_(Ehe,{ref:"spinner",role:X.datetimeRole||"start","arrow-control":E(o),"show-seconds":C.value,"am-pm-mode":A.value,"spinner-date":X.parsedValue,"disabled-hours":E(r),"disabled-minutes":E(a),"disabled-seconds":E(l),onChange:T,onSetOption:E(H),onSelectRange:I},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),g("div",{class:q(E(f).be("panel","footer"))},[g("button",{type:"button",class:q([E(f).be("panel","btn"),"cancel"]),onClick:M},x(E(p)("el.datepicker.cancel")),3),g("button",{type:"button",class:q([E(f).be("panel","btn"),"confirm"]),onClick:Z[0]||(Z[0]=G=>P())},x(E(p)("el.datepicker.confirm")),3)],2)],2)):O("v-if",!0)]),_:1},8,["name"]))}}),SC=Mhe,hV={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(xs,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,o=/\d\d/,r=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},c=function(b){return(b=+b)+(b>68?1900:2e3)},u=function(b){return function(w){this[b]=+w}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(b){(this.zone||(this.zone={})).offset=function(w){if(!w||w==="Z")return 0;var k=w.match(/([+-]|\d\d)/g),C=60*k[1]+(+k[2]||0);return C===0?0:k[0]==="+"?-C:C}(b)}],h=function(b){var w=l[b];return w&&(w.indexOf?w:w.s.concat(w.f))},f=function(b,w){var k,C=l.meridiem;if(C){for(var A=1;A<=24;A+=1)if(b.indexOf(C(A,0,w))>-1){k=A>12;break}}else k=b===(w?"pm":"PM");return k},p={A:[a,function(b){this.afternoon=f(b,!1)}],a:[a,function(b){this.afternoon=f(b,!0)}],Q:[s,function(b){this.month=3*(b-1)+1}],S:[s,function(b){this.milliseconds=100*+b}],SS:[o,function(b){this.milliseconds=10*+b}],SSS:[/\d{3}/,function(b){this.milliseconds=+b}],s:[r,u("seconds")],ss:[r,u("seconds")],m:[r,u("minutes")],mm:[r,u("minutes")],H:[r,u("hours")],h:[r,u("hours")],HH:[r,u("hours")],hh:[r,u("hours")],D:[r,u("day")],DD:[o,u("day")],Do:[a,function(b){var w=l.ordinal,k=b.match(/\d+/);if(this.day=k[0],w)for(var C=1;C<=31;C+=1)w(C).replace(/\[|\]/g,"")===b&&(this.day=C)}],w:[r,u("week")],ww:[o,u("week")],M:[r,u("month")],MM:[o,u("month")],MMM:[a,function(b){var w=h("months"),k=(h("monthsShort")||w.map(function(C){return C.slice(0,3)})).indexOf(b)+1;if(k<1)throw new Error;this.month=k%12||k}],MMMM:[a,function(b){var w=h("months").indexOf(b)+1;if(w<1)throw new Error;this.month=w%12||w}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(b){this.year=c(b)}],YYYY:[/\d{4}/,u("year")],Z:d,ZZ:d};function m(b){var w,k;w=b,k=l&&l.formats;for(var C=(b=w.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(L,R,V){var H=V&&V.toUpperCase();return R||k[V]||n[V]||k[H].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,U,Y){return U||Y.slice(1)})})).match(i),A=C.length,S=0;S<A;S+=1){var M=C[S],P=p[M],T=P&&P[0],I=P&&P[1];C[S]=I?{regex:T,parser:I}:M.replace(/^\[|\]$/g,"")}return function(L){for(var R={},V=0,H=0;V<A;V+=1){var F=C[V];if(typeof F=="string")H+=F.length;else{var U=F.regex,Y=F.parser,z=L.slice(H),X=U.exec(z)[0];Y.call(R,X),L=L.replace(X,"")}}return function(Z){var G=Z.afternoon;if(G!==void 0){var Q=Z.hours;G?Q<12&&(Z.hours+=12):Q===12&&(Z.hours=0),delete Z.afternoon}}(R),R}}return function(b,w,k){k.p.customParseFormat=!0,b&&b.parseTwoDigitYear&&(c=b.parseTwoDigitYear);var C=w.prototype,A=C.parse;C.parse=function(S){var M=S.date,P=S.utc,T=S.args;this.$u=P;var I=T[1];if(typeof I=="string"){var L=T[2]===!0,R=T[3]===!0,V=L||R,H=T[2];R&&(H=T[2]),l=this.$locale(),!L&&H&&(l=k.Ls[H]),this.$d=function(z,X,Z,G){try{if(["x","X"].indexOf(X)>-1)return new Date((X==="X"?1e3:1)*z);var Q=m(X)(z),ne=Q.year,K=Q.month,ae=Q.day,ge=Q.hours,Ce=Q.minutes,oe=Q.seconds,pe=Q.milliseconds,ie=Q.zone,re=Q.week,ke=new Date,je=ae||(ne||K?1:ke.getDate()),te=ne||ke.getFullYear(),se=0;ne&&!K||(se=K>0?K-1:ke.getMonth());var me,$e=ge||0,Se=Ce||0,Le=oe||0,We=pe||0;return ie?new Date(Date.UTC(te,se,je,$e,Se,Le,We+60*ie.offset*1e3)):Z?new Date(Date.UTC(te,se,je,$e,Se,Le,We)):(me=new Date(te,se,je,$e,Se,Le,We),re&&(me=G(me).week(re).toDate()),me)}catch{return new Date("")}}(M,I,P,k),this.init(),H&&H!==!0&&(this.$L=this.locale(H).$L),V&&M!=this.format(I)&&(this.$d=new Date("")),l={}}else if(I instanceof Array)for(var F=I.length,U=1;U<=F;U+=1){T[1]=I[U-1];var Y=k.apply(this,T);if(Y.isValid()){this.$d=Y.$d,this.$L=Y.$L,this.init();break}U===F&&(this.$d=new Date(""))}else A.call(this,S)}}})})(hV);var The=hV.exports;const fV=_i(The),i1=Ge({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:$l},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),Phe={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},Ihe=["aria-label"],Lhe=["aria-label"];var Ohe=fe({name:"ElTag",__name:"tag",props:i1,emits:Phe,setup(t,{emit:e}){const n=t,i=e,s=Ii(),{t:o}=en(),r=Be("tag"),a=W(()=>{const{type:d,hit:h,effect:f,closable:p,round:m}=n;return[r.b(),r.is("closable",p),r.m(d||"primary"),r.m(s.value),r.m(f),r.is("hit",h),r.is("round",m)]}),l=d=>{i("close",d)},c=d=>{i("click",d)},u=d=>{var h,f,p;(p=(f=(h=d==null?void 0:d.component)==null?void 0:h.subTree)==null?void 0:f.component)!=null&&p.bum&&(d.component.subTree.component.bum=null)};return(d,h)=>t.disableTransitions?(v(),$("span",{key:0,class:q(a.value),style:Xe({backgroundColor:t.color}),onClick:c},[g("span",{class:q(E(r).e("content"))},[le(d.$slots,"default")],2),t.closable?(v(),$("button",{key:0,"aria-label":E(o)("el.tag.close"),class:q(E(r).e("close")),type:"button",onClick:Me(l,["stop"])},[_(E(we),null,{default:y(()=>[_(E(Ho))]),_:1})],10,Ihe)):O("v-if",!0)],6)):(v(),D(jo,{key:1,name:`${E(r).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:u},{default:y(()=>[g("span",{class:q(a.value),style:Xe({backgroundColor:t.color}),onClick:c},[g("span",{class:q(E(r).e("content"))},[le(d.$slots,"default")],2),t.closable?(v(),$("button",{key:0,"aria-label":E(o)("el.tag.close"),class:q(E(r).e("close")),type:"button",onClick:Me(l,["stop"])},[_(E(we),null,{default:y(()=>[_(E(Ho))]),_:1})],10,Lhe)):O("v-if",!0)],6)]),_:3},8,["name"]))}}),Dhe=Ohe;const qs=Gt(Dhe),pV=Symbol("ElSelectGroup"),i2=Symbol("ElSelect"),$C={label:"label",value:"value",disabled:"disabled",options:"options"};function Rhe(t){const e=ee({...$C,...t.props});let n={...t.props};return Te(()=>t.props,a=>{Wi(a,n)||(e.value={...$C,...a},n={...a})},{deep:!0}),{aliasProps:e,getLabel:a=>ji(a,e.value.label),getValue:a=>ji(a,e.value.value),getDisabled:a=>ji(a,e.value.disabled),getOptions:a=>ji(a,e.value.options)}}const Vhe=Ge({name:String,id:String,modelValue:{type:de([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:Zi,effect:{type:de(String),default:"light"},disabled:{type:Boolean,default:void 0},clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperStyle:{type:de([String,Object])},popperOptions:{type:de(Object),default:()=>({})},remote:Boolean,debounce:{type:Number,default:300},loadingText:String,noMatchText:String,noDataText:String,remoteMethod:{type:de(Function)},filterMethod:{type:de(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,tagTooltip:{type:de(Object),default:()=>({})},maxCollapseTags:{type:Number,default:1},teleported:zn.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:ds,default:Zc},fitInputWidth:Boolean,suffixIcon:{type:ds,default:zd},tagType:{...i1.type,default:"info"},tagEffect:{...i1.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:de(String),values:hp,default:"bottom-start"},fallbackPlacements:{type:de(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:zn.appendTo,options:{type:de(Array)},props:{type:de(Object),default:()=>$C},...H1,...Sr(["ariaLabel"])});Mt+"",dn+"",VR.scroll;const AC="ElOption",Fhe=Ge({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean});function Nhe(t,e){const n=qe(i2);n||vo(AC,"usage: <el-select><el-option /></el-select/>");const i=qe(pV,{disabled:!1}),s=W(()=>u(js(n.props.modelValue),t.value)),o=W(()=>{if(n.props.multiple){const f=js(n.props.modelValue??[]);return!s.value&&f.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),r=W(()=>t.label??(yt(t.value)?"":t.value)),a=W(()=>t.value||t.label||""),l=W(()=>t.disabled||e.groupDisabled||o.value),c=pt(),u=(f=[],p)=>{if(yt(t.value)){const m=n.props.valueKey;return f&&f.some(b=>an(ji(b,m))===ji(p,m))}else return f&&f.includes(p)},d=()=>{l.value||(n.states.hoveringIndex=n.optionsArray.indexOf(c.proxy))},h=f=>{e.visible=new RegExp(Wie(f),"i").test(String(r.value))||t.created};return Te(()=>r.value,()=>{!t.created&&!n.props.remote&&n.setSelected()}),Te(()=>t.value,(f,p)=>{const{remote:m,valueKey:b}=n.props;if((m?f!==p:!Wi(f,p))&&(n.onOptionDestroy(p,c.proxy),n.onOptionCreate(c.proxy)),!t.created&&!m){if(b&&yt(f)&&yt(p)&&f[b]===p[b])return;n.setSelected()}}),Te(()=>i.disabled,()=>{e.groupDisabled=i.disabled},{immediate:!0}),{select:n,currentLabel:r,currentValue:a,itemSelected:s,isDisabled:l,hoverItem:d,updateOption:h}}var Bhe=fe({name:AC,componentName:AC,props:Fhe,setup(t){const e=Be("select"),n=kr(),i=W(()=>[e.be("dropdown","item"),e.is("disabled",E(a)),e.is("selected",E(r)),e.is("hovering",E(h))]),s=In({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:o,itemSelected:r,isDisabled:a,select:l,hoverItem:c,updateOption:u}=Nhe(t,s),{visible:d,hover:h}=go(s),f=pt().proxy;l.onOptionCreate(f),wn(()=>{const m=f.value;ot(()=>{const{selected:b}=l.states,w=b.some(k=>k.value===f.value);l.states.cachedOptions.get(m)===f&&!w&&l.states.cachedOptions.delete(m)}),l.onOptionDestroy(m,f)});function p(){a.value||l.handleOptionSelect(f)}return{ns:e,id:n,containerKls:i,currentLabel:o,itemSelected:r,isDisabled:a,select:l,visible:d,hover:h,states:s,hoverItem:c,updateOption:u,selectOptionClick:p}}});const zhe=["id","aria-disabled","aria-selected"];function Hhe(t,e,n,i,s,o){return Re((v(),$("li",{id:t.id,class:q(t.containerKls),role:"option","aria-disabled":t.isDisabled||void 0,"aria-selected":t.itemSelected,onMousemove:e[0]||(e[0]=(...r)=>t.hoverItem&&t.hoverItem(...r)),onClick:e[1]||(e[1]=Me((...r)=>t.selectOptionClick&&t.selectOptionClick(...r),["stop"]))},[le(t.$slots,"default",{},()=>[g("span",null,x(t.currentLabel),1)])],42,zhe)),[[jt,t.visible]])}var p8=vi(Bhe,[["render",Hhe]]),Uhe=fe({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=Be("select"),n=ee(),i=pt(),s=ee([]);Pt(pV,In({...go(t)}));const o=W(()=>s.value.some(c=>c.visible===!0)),r=c=>{var u;return c.type.name==="ElOption"&&!!((u=c.component)!=null&&u.proxy)},a=c=>{const u=js(c),d=[];return u.forEach(h=>{var f;is(h)&&(r(h)?d.push(h.component.proxy):Ee(h.children)&&h.children.length?d.push(...a(h.children)):(f=h.component)!=null&&f.subTree&&d.push(...a(h.component.subTree)))}),d},l=()=>{s.value=a(i.subTree)};return Nt(()=>{l()}),Die(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:o,ns:e}}});function jhe(t,e,n,i,s,o){return Re((v(),$("ul",{ref:"groupRef",class:q(t.ns.be("group","wrap"))},[g("li",{class:q(t.ns.be("group","title"))},x(t.label),3),g("li",null,[g("ul",{class:q(t.ns.b("group"))},[le(t.$slots,"default")],2)])],2)),[[jt,t.visible]])}var m8=vi(Uhe,[["render",jhe]]),Whe=fe({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=qe(i2),e=Be("select"),n=W(()=>t.props.popperClass),i=W(()=>t.props.multiple),s=W(()=>t.props.fitInputWidth),o=ee("");function r(){var l;const a=(l=t.selectRef)==null?void 0:l.offsetWidth;a?o.value=`${a-dJ}px`:o.value=""}return Nt(()=>{r(),Ts(t.selectRef,r)}),{ns:e,minWidth:o,popperClass:n,isMultiple:i,isFitInputWidth:s}}});function Yhe(t,e,n,i,s,o){return v(),$("div",{class:q([t.ns.b("dropdown"),t.ns.is("multiple",t.isMultiple),t.popperClass]),style:Xe({[t.isFitInputWidth?"width":"minWidth"]:t.minWidth})},[t.$slots.header?(v(),$("div",{key:0,class:q(t.ns.be("dropdown","header"))},[le(t.$slots,"header")],2)):O("v-if",!0),le(t.$slots,"default"),t.$slots.footer?(v(),$("div",{key:1,class:q(t.ns.be("dropdown","footer"))},[le(t.$slots,"footer")],2)):O("v-if",!0)],6)}var qhe=vi(Whe,[["render",Yhe]]);const Ghe=(t,e)=>{const{t:n}=en(),i=gi(),s=kr(),o=Be("select"),r=Be("input"),a=In({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),l=ee(),c=ee(),u=ee(),d=ee(),h=ee(),f=ee(),p=ee(),m=ee(),b=ee(),w=ee(),k=ee(),C=ee(!1),A=ee(),S=ee(!1),{form:M,formItem:P}=_o(),{inputId:T}=Tl(t,{formItemContext:P}),{valueOnClear:I,isEmptyValue:L}=K4(t),{isComposing:R,handleCompositionStart:V,handleCompositionUpdate:H,handleCompositionEnd:F}=X4({afterComposition:xe=>_t(xe)}),U=bs(),{wrapperRef:Y,isFocused:z,handleBlur:X}=pp(h,{disabled:U,afterFocus(){t.automaticDropdown&&!C.value&&(C.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(xe){var Qe,$t;return((Qe=u.value)==null?void 0:Qe.isFocusInsideContent(xe))||(($t=d.value)==null?void 0:$t.isFocusInsideContent(xe))},afterBlur(){var xe;C.value=!1,a.menuVisibleOnFocus=!1,t.validateEvent&&((xe=P==null?void 0:P.validate)==null||xe.call(P,"blur").catch(Qe=>Tt(Qe)))}}),Z=W(()=>Ee(t.modelValue)?t.modelValue.length>0:!L(t.modelValue)),G=W(()=>(M==null?void 0:M.statusIcon)??!1),Q=W(()=>t.clearable&&!U.value&&Z.value&&(z.value||a.inputHovering)),ne=W(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),K=W(()=>o.is("reverse",!!(ne.value&&C.value))),ae=W(()=>(P==null?void 0:P.validateState)||""),ge=W(()=>ae.value&&o8[ae.value]),Ce=W(()=>t.remote?t.debounce:0),oe=W(()=>t.remote&&!a.inputValue&&a.options.size===0),pe=W(()=>t.loading?t.loadingText||n("el.select.loading"):t.filterable&&a.inputValue&&a.options.size>0&&ie.value===0?t.noMatchText||n("el.select.noMatch"):a.options.size===0?t.noDataText||n("el.select.noData"):null),ie=W(()=>re.value.filter(xe=>xe.visible).length),re=W(()=>{const xe=Array.from(a.options.values()),Qe=[];return a.optionValues.forEach($t=>{const Mn=xe.findIndex(ks=>ks.value===$t);Mn>-1&&Qe.push(xe[Mn])}),Qe.length>=xe.length?Qe:xe}),ke=W(()=>Array.from(a.cachedOptions.values())),je=W(()=>{const xe=re.value.filter(Qe=>!Qe.created).some(Qe=>Qe.currentLabel===a.inputValue);return t.filterable&&t.allowCreate&&a.inputValue!==""&&!xe}),te=()=>{t.filterable&&et(t.filterMethod)||t.filterable&&t.remote&&et(t.remoteMethod)||re.value.forEach(xe=>{var Qe;(Qe=xe.updateOption)==null||Qe.call(xe,a.inputValue)})},se=Ii(),me=W(()=>["small"].includes(se.value)?"small":"default"),$e=W({get(){return C.value&&(t.loading||!oe.value||t.remote&&!!i.empty)&&(!S.value||!T4(a.previousQuery)||a.options.size>0)},set(xe){C.value=xe}}),Se=W(()=>{if(t.multiple&&!sn(t.modelValue))return js(t.modelValue).length===0&&!a.inputValue;const xe=Ee(t.modelValue)?t.modelValue[0]:t.modelValue;return t.filterable||sn(xe)?!a.inputValue:!0}),Le=W(()=>{const xe=t.placeholder??n("el.select.placeholder");return t.multiple||!Z.value?xe:a.selectedLabel}),We=W(()=>Zk?null:"mouseenter");Te(()=>t.modelValue,(xe,Qe)=>{t.multiple&&t.filterable&&!t.reserveKeyword&&(a.inputValue="",Fe("")),Ae(),!Wi(xe,Qe)&&t.validateEvent&&(P==null||P.validate("change").catch($t=>Tt($t)))},{flush:"post",deep:!0}),Te(()=>C.value,xe=>{xe?Fe(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0,a.menuVisibleOnFocus=!1)}),Te(()=>a.options.entries(),()=>{Jt&&(Ae(),t.defaultFirstOption&&(t.filterable||t.remote)&&ie.value&&He())},{flush:"post"}),Te([()=>a.hoveringIndex,re],([xe])=>{wt(xe)&&xe>-1?A.value=re.value[xe]||{}:A.value={},re.value.forEach(Qe=>{Qe.hover=A.value===Qe})}),_l(()=>{a.isBeforeHide||te()});const Fe=xe=>{a.previousQuery===xe||R.value||(a.previousQuery=xe,t.filterable&&et(t.filterMethod)?t.filterMethod(xe):t.filterable&&t.remote&&et(t.remoteMethod)&&t.remoteMethod(xe),t.defaultFirstOption&&(t.filterable||t.remote)&&ie.value?ot(He):ot(Ye))},He=()=>{const xe=re.value.filter(Mn=>Mn.visible&&!Mn.disabled&&!Mn.states.groupDisabled),Qe=xe.find(Mn=>Mn.created),$t=xe[0];a.hoveringIndex=De(re.value.map(Mn=>Mn.value),Qe||$t)},Ae=()=>{if(t.multiple)a.selectedLabel="";else{const Qe=Ze(Ee(t.modelValue)?t.modelValue[0]:t.modelValue);a.selectedLabel=Qe.currentLabel,a.selected=[Qe];return}const xe=[];sn(t.modelValue)||js(t.modelValue).forEach(Qe=>{xe.push(Ze(Qe))}),a.selected=xe},Ze=xe=>{let Qe;const $t=fd(xe);for(let Mn=a.cachedOptions.size-1;Mn>=0;Mn--){const ks=ke.value[Mn];if($t?ji(ks.value,t.valueKey)===ji(xe,t.valueKey):ks.value===xe){Qe={index:re.value.filter(Ks=>!Ks.created).indexOf(ks),value:xe,currentLabel:ks.currentLabel,get isDisabled(){return ks.isDisabled}};break}}return Qe||{index:-1,value:xe,currentLabel:$t?xe.label:xe??""}},Ye=()=>{const xe=a.selected.length;if(xe>0){const Qe=a.selected[xe-1];a.hoveringIndex=re.value.findIndex($t=>Ko(Qe)===Ko($t))}else a.hoveringIndex=-1},it=()=>{a.selectionWidth=Number.parseFloat(window.getComputedStyle(c.value).width)},be=()=>{a.collapseItemWidth=w.value.getBoundingClientRect().width},ve=()=>{var xe,Qe;(Qe=(xe=u.value)==null?void 0:xe.updatePopper)==null||Qe.call(xe)},Pe=()=>{var xe,Qe;(Qe=(xe=d.value)==null?void 0:xe.updatePopper)==null||Qe.call(xe)},Ie=()=>{a.inputValue.length>0&&!C.value&&(C.value=!0),Fe(a.inputValue)},_t=xe=>{if(a.inputValue=xe.target.value,t.remote)S.value=!0,Lt();else return Ie()},Lt=CD(()=>{Ie(),S.value=!1},Ce),Je=xe=>{Wi(t.modelValue,xe)||e(dn,xe)},dt=xe=>Jse(xe,Qe=>{const $t=a.cachedOptions.get(Qe);return!($t!=null&&$t.disabled)&&!($t!=null&&$t.states.groupDisabled)}),mt=xe=>{const Qe=ls(xe);if(t.multiple&&Qe!==Ue.delete&&xe.target.value.length<=0){const $t=js(t.modelValue).slice(),Mn=dt($t);if(Mn<0)return;const ks=$t[Mn];$t.splice(Mn,1),e(Mt,$t),Je($t),e("remove-tag",ks)}},_e=(xe,Qe)=>{const $t=a.selected.indexOf(Qe);if($t>-1&&!U.value){const Mn=js(t.modelValue).slice();Mn.splice($t,1),e(Mt,Mn),Je(Mn),e("remove-tag",Qe.value)}xe.stopPropagation(),Vl()},Oe=xe=>{xe.stopPropagation();const Qe=t.multiple?[]:I.value;if(t.multiple)for(const $t of a.selected)$t.isDisabled&&Qe.push($t.value);e(Mt,Qe),Je(Qe),a.hoveringIndex=-1,C.value=!1,e("clear"),Vl()},ue=xe=>{if(t.multiple){const Qe=js(t.modelValue??[]).slice(),$t=De(Qe,xe);$t>-1?Qe.splice($t,1):(t.multipleLimit<=0||Qe.length<t.multipleLimit)&&Qe.push(xe.value),e(Mt,Qe),Je(Qe),xe.created&&Fe(""),t.filterable&&(xe.created||!t.reserveKeyword)&&(a.inputValue="")}else!Wi(t.modelValue,xe.value)&&e(Mt,xe.value),Je(xe.value),C.value=!1;Vl(),!C.value&&ot(()=>{gt(xe)})},De=(xe,Qe)=>sn(Qe)?-1:yt(Qe.value)?xe.findIndex($t=>Wi(ji($t,t.valueKey),Ko(Qe))):xe.indexOf(Qe.value),gt=xe=>{var Mn,ks,Ks,Hp,m9;const Qe=Ee(xe)?xe[xe.length-1]:xe;let $t=null;if(!hi(Qe==null?void 0:Qe.value)){const Up=re.value.filter(HW=>HW.value===Qe.value);Up.length>0&&($t=Up[0].$el)}if(u.value&&$t){const Up=(Hp=(Ks=(ks=(Mn=u.value)==null?void 0:Mn.popperRef)==null?void 0:ks.contentRef)==null?void 0:Ks.querySelector)==null?void 0:Hp.call(Ks,`.${o.be("dropdown","wrap")}`);Up&&noe(Up,$t)}(m9=k.value)==null||m9.handleScroll()},bn=xe=>{a.options.set(xe.value,xe),a.cachedOptions.set(xe.value,xe)},gs=(xe,Qe)=>{a.options.get(xe)===Qe&&a.options.delete(xe)},hu=W(()=>{var xe,Qe;return(Qe=(xe=u.value)==null?void 0:xe.popperRef)==null?void 0:Qe.contentRef}),Bp=()=>{a.isBeforeHide=!1,ot(()=>{var xe;(xe=k.value)==null||xe.update(),gt(a.selected)})},Vl=()=>{var xe;(xe=h.value)==null||xe.focus()},da=()=>{var xe;if(C.value){C.value=!1,ot(()=>{var Qe;return(Qe=h.value)==null?void 0:Qe.blur()});return}(xe=h.value)==null||xe.blur()},$n=xe=>{Oe(xe)},Di=xe=>{if(C.value=!1,z.value){const Qe=new FocusEvent("blur",xe);ot(()=>X(Qe))}},nt=()=>{a.inputValue.length>0?a.inputValue="":C.value=!1},at=xe=>{var Qe;U.value||t.filterable&&C.value&&xe&&!((Qe=p.value)!=null&&Qe.contains(xe.target))||(Zk&&(a.inputHovering=!0),a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:C.value=!C.value)},vt=()=>{if(!C.value)at();else{const xe=re.value[a.hoveringIndex];xe&&!xe.isDisabled&&ue(xe)}},Ko=xe=>yt(xe.value)?ji(xe.value,t.valueKey):xe.value,Fl=W(()=>re.value.filter(xe=>xe.visible).every(xe=>xe.isDisabled)),fu=W(()=>t.multiple?t.collapseTags?a.selected.slice(0,t.maxCollapseTags):a.selected:[]),RW=W(()=>t.multiple?t.collapseTags?a.selected.slice(t.maxCollapseTags):[]:[]),Iv=xe=>{if(!C.value){C.value=!0;return}if(!(a.options.size===0||ie.value===0||R.value)&&!Fl.value){xe==="next"?(a.hoveringIndex++,a.hoveringIndex===a.options.size&&(a.hoveringIndex=0)):xe==="prev"&&(a.hoveringIndex--,a.hoveringIndex<0&&(a.hoveringIndex=a.options.size-1));const Qe=re.value[a.hoveringIndex];(Qe.isDisabled||!Qe.visible)&&Iv(xe),ot(()=>gt(A.value))}},p9=(xe,Qe,$t,Mn)=>{for(let ks=Qe;ks>=0&&ks<Mn;ks+=$t){const Ks=xe[ks];if(!(Ks!=null&&Ks.isDisabled)&&(Ks!=null&&Ks.visible))return ks}return null},Lv=(xe,Qe)=>{const $t=a.options.size;if($t===0)return;const Mn=GO(xe,0,$t-1),ks=re.value,Ks=Qe==="up"?-1:1,Hp=p9(ks,Mn,Ks,$t)??p9(ks,Mn-Ks,-Ks,$t);Hp!=null&&(a.hoveringIndex=Hp,ot(()=>gt(A.value)))},VW=xe=>{const Qe=ls(xe);let $t=!0;switch(Qe){case Ue.up:Iv("prev");break;case Ue.down:Iv("next");break;case Ue.enter:case Ue.numpadEnter:R.value||vt();break;case Ue.esc:nt();break;case Ue.backspace:$t=!1,mt(xe);return;case Ue.home:if(!C.value)return;Lv(0,"down");break;case Ue.end:if(!C.value)return;Lv(a.options.size-1,"up");break;case Ue.pageUp:if(!C.value)return;Lv(a.hoveringIndex-10,"up");break;case Ue.pageDown:if(!C.value)return;Lv(a.hoveringIndex+10,"down");break;default:$t=!1;break}$t&&(xe.preventDefault(),xe.stopPropagation())},FW=()=>{if(!c.value)return 0;const xe=window.getComputedStyle(c.value);return Number.parseFloat(xe.gap||"6px")},NW=W(()=>{const xe=FW(),Qe=t.filterable?xe+d4:0;return{maxWidth:`${w.value&&t.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-xe-Qe:a.selectionWidth-Qe}px`}}),BW=W(()=>({maxWidth:`${a.selectionWidth}px`})),zW=xe=>{e("popup-scroll",xe)};Ts(c,it),Ts(Y,ve),Ts(b,Pe),Ts(w,be);let zp;return Te(()=>$e.value,xe=>{xe?zp=Ts(m,ve).stop:(zp==null||zp(),zp=void 0),e("visible-change",xe)}),Nt(()=>{Ae()}),{inputId:T,contentId:s,nsSelect:o,nsInput:r,states:a,isFocused:z,expanded:C,optionsArray:re,hoverOption:A,selectSize:se,filteredOptionsCount:ie,updateTooltip:ve,updateTagTooltip:Pe,debouncedOnInputChange:Lt,onInput:_t,deletePrevTag:mt,deleteTag:_e,deleteSelected:Oe,handleOptionSelect:ue,scrollToOption:gt,hasModelValue:Z,shouldShowPlaceholder:Se,currentPlaceholder:Le,mouseEnterEventName:We,needStatusIcon:G,showClearBtn:Q,iconComponent:ne,iconReverse:K,validateState:ae,validateIcon:ge,showNewOption:je,updateOptions:te,collapseTagSize:me,setSelected:Ae,selectDisabled:U,emptyText:pe,handleCompositionStart:V,handleCompositionUpdate:H,handleCompositionEnd:F,handleKeydown:VW,onOptionCreate:bn,onOptionDestroy:gs,handleMenuEnter:Bp,focus:Vl,blur:da,handleClearClick:$n,handleClickOutside:Di,handleEsc:nt,toggleMenu:at,selectOption:vt,getValueKey:Ko,navigateOptions:Iv,dropdownMenuVisible:$e,showTagList:fu,collapseTagList:RW,popupScroll:zW,getOption:Ze,tagStyle:NW,collapseTagStyle:BW,popperRef:hu,inputRef:h,tooltipRef:u,tagTooltipRef:d,prefixRef:f,suffixRef:p,selectRef:l,wrapperRef:Y,selectionRef:c,scrollbarRef:k,menuRef:m,tagMenuRef:b,collapseItemRef:w}};var Xhe=fe({name:"ElOptions",setup(t,{slots:e}){const n=qe(i2);let i=[];return()=>{var a,l;const s=(a=e.default)==null?void 0:a.call(e),o=[];function r(c){Ee(c)&&c.forEach(u=>{var h,f,p,m;const d=(h=(u==null?void 0:u.type)||{})==null?void 0:h.name;d==="ElOptionGroup"?r(!Ke(u.children)&&!Ee(u.children)&&et((f=u.children)==null?void 0:f.default)?(p=u.children)==null?void 0:p.default():u.children):d==="ElOption"?o.push((m=u.props)==null?void 0:m.value):Ee(u.children)&&r(u.children)})}return s.length&&r((l=s[0])==null?void 0:l.children),Wi(o,i)||(i=o,n&&(n.states.optionValues=o)),s}}});const kA="ElSelect",o1=new WeakMap,Khe=t=>(...e)=>{var s,o;const n=e[0];if(!n||n.includes('Slot "default" invoked outside of the render function')&&((s=e[2])!=null&&s.includes("ElTreeSelect")))return;const i=(o=o1.get(t))==null?void 0:o.originalWarnHandler;if(i){i(...e);return}console.warn(...e)},Zhe=t=>{let e=o1.get(t);return e||(e={originalWarnHandler:t.config.warnHandler,handler:Khe(t),count:0},o1.set(t,e)),e};var Jhe=fe({name:kA,componentName:kA,components:{ElSelectMenu:qhe,ElOption:p8,ElOptions:Xhe,ElOptionGroup:m8,ElTag:qs,ElScrollbar:zs,ElTooltip:Ss,ElIcon:we},directives:{ClickOutside:s1},props:Vhe,emits:[Mt,dn,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(t,{emit:e,slots:n}){const i=pt(),s=Zhe(i.appContext);s.count+=1,i.appContext.config.warnHandler=s.handler;const o=W(()=>{const{modelValue:k,multiple:C}=t,A=C?[]:void 0;return Ee(k)?C?k:A:C?A:k}),r=In({...go(t),modelValue:o}),a=Ghe(r,e),{calculatorRef:l,inputStyle:c}=$D(),{getLabel:u,getValue:d,getOptions:h,getDisabled:f}=Rhe(t),p=k=>({label:u(k),value:d(k),disabled:f(k)}),m=k=>k.reduce((C,A)=>(C.push(A),A.children&&A.children.length>0&&C.push(...m(A.children)),C),[]),b=k=>{kc(k||[]).forEach(C=>{var A;if(yt(C)&&(C.type.name==="ElOption"||C.type.name==="ElTree")){const S=C.type.name;if(S==="ElTree")m(((A=C.props)==null?void 0:A.data)||[]).forEach(M=>{M.currentLabel=M.label??(yt(M.value)?"":M.value),a.onOptionCreate(M)});else if(S==="ElOption"){const M={...C.props};M.currentLabel=M.label??(yt(M.value)?"":M.value),a.onOptionCreate(M)}}})};Te(()=>{var k;return[t.persistent||a.expanded.value||!n.default||(k=n.default)==null?void 0:k.call(n),o.value]},()=>{var k;t.persistent||a.expanded.value||n.default&&(a.states.options.clear(),b((k=n.default)==null?void 0:k.call(n)))},{immediate:!0}),Pt(i2,In({props:r,states:a.states,selectRef:a.selectRef,optionsArray:a.optionsArray,setSelected:a.setSelected,handleOptionSelect:a.handleOptionSelect,onOptionCreate:a.onOptionCreate,onOptionDestroy:a.onOptionDestroy}));const w=W(()=>t.multiple?a.states.selected.map(k=>k.currentLabel):a.states.selectedLabel);return wn(()=>{const k=o1.get(i.appContext);k&&(k.count-=1,k.count<=0&&(i.appContext.config.warnHandler=k.originalWarnHandler,o1.delete(i.appContext)))}),{...a,modelValue:o,selectedLabel:w,calculatorRef:l,inputStyle:c,getLabel:u,getValue:d,getOptions:h,getDisabled:f,getOptionProps:p}}});const Qhe=["id","value","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],efe=["textContent"],tfe={key:1};function nfe(t,e,n,i,s,o){const r=B("el-tag"),a=B("el-tooltip"),l=B("el-icon"),c=B("el-option"),u=B("el-option-group"),d=B("el-options"),h=B("el-scrollbar"),f=B("el-select-menu"),p=xt("click-outside");return Re((v(),$("div",Yt({ref:"selectRef",class:[t.nsSelect.b(),t.nsSelect.m(t.selectSize)]},{[Gu(t.mouseEnterEventName)]:e[11]||(e[11]=m=>t.states.inputHovering=!0)},{onMouseleave:e[12]||(e[12]=m=>t.states.inputHovering=!1)}),[_(a,{ref:"tooltipRef",visible:t.dropdownMenuVisible,placement:t.placement,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"popper-style":t.popperStyle,"popper-options":t.popperOptions,"fallback-placements":t.fallbackPlacements,effect:t.effect,pure:"",trigger:"click",transition:`${t.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:t.persistent,"append-to":t.appendTo,"show-arrow":t.showArrow,offset:t.offset,onBeforeShow:t.handleMenuEnter,onHide:e[10]||(e[10]=m=>t.states.isBeforeHide=!1)},{default:y(()=>{var m;return[g("div",{ref:"wrapperRef",class:q([t.nsSelect.e("wrapper"),t.nsSelect.is("focused",t.isFocused),t.nsSelect.is("hovering",t.states.inputHovering),t.nsSelect.is("filterable",t.filterable),t.nsSelect.is("disabled",t.selectDisabled)]),onClick:e[7]||(e[7]=Me((...b)=>t.toggleMenu&&t.toggleMenu(...b),["prevent"]))},[t.$slots.prefix?(v(),$("div",{key:0,ref:"prefixRef",class:q(t.nsSelect.e("prefix"))},[le(t.$slots,"prefix")],2)):O("v-if",!0),g("div",{ref:"selectionRef",class:q([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.states.selected.length)])},[t.multiple?le(t.$slots,"tag",{key:0,data:t.states.selected,deleteTag:t.deleteTag,selectDisabled:t.selectDisabled},()=>{var b,w,k,C,A,S,M,P,T,I,L,R,V;return[(v(!0),$(J,null,ye(t.showTagList,H=>(v(),$("div",{key:t.getValueKey(H),class:q(t.nsSelect.e("selected-item"))},[_(r,{closable:!t.selectDisabled&&!H.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:Xe(t.tagStyle),onClose:F=>t.deleteTag(F,H)},{default:y(()=>[g("span",{class:q(t.nsSelect.e("tags-text"))},[le(t.$slots,"label",{index:H.index,label:H.currentLabel,value:H.value},()=>[N(x(H.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.states.selected.length>t.maxCollapseTags?(v(),D(a,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":((b=t.tagTooltip)==null?void 0:b.fallbackPlacements)??["bottom","top","right","left"],effect:((w=t.tagTooltip)==null?void 0:w.effect)??t.effect,placement:((k=t.tagTooltip)==null?void 0:k.placement)??"bottom","popper-class":((C=t.tagTooltip)==null?void 0:C.popperClass)??t.popperClass,"popper-style":((A=t.tagTooltip)==null?void 0:A.popperStyle)??t.popperStyle,teleported:((S=t.tagTooltip)==null?void 0:S.teleported)??t.teleported,"append-to":((M=t.tagTooltip)==null?void 0:M.appendTo)??t.appendTo,"popper-options":((P=t.tagTooltip)==null?void 0:P.popperOptions)??t.popperOptions,transition:(T=t.tagTooltip)==null?void 0:T.transition,"show-after":(I=t.tagTooltip)==null?void 0:I.showAfter,"hide-after":(L=t.tagTooltip)==null?void 0:L.hideAfter,"auto-close":(R=t.tagTooltip)==null?void 0:R.autoClose,offset:(V=t.tagTooltip)==null?void 0:V.offset},{default:y(()=>[g("div",{ref:"collapseItemRef",class:q(t.nsSelect.e("selected-item"))},[_(r,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:Xe(t.collapseTagStyle)},{default:y(()=>[g("span",{class:q(t.nsSelect.e("tags-text"))}," + "+x(t.states.selected.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:y(()=>[g("div",{ref:"tagMenuRef",class:q(t.nsSelect.e("selection"))},[(v(!0),$(J,null,ye(t.collapseTagList,H=>(v(),$("div",{key:t.getValueKey(H),class:q(t.nsSelect.e("selected-item"))},[_(r,{class:"in-tooltip",closable:!t.selectDisabled&&!H.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:F=>t.deleteTag(F,H)},{default:y(()=>[g("span",{class:q(t.nsSelect.e("tags-text"))},[le(t.$slots,"label",{index:H.index,label:H.currentLabel,value:H.value},()=>[N(x(H.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","fallback-placements","effect","placement","popper-class","popper-style","teleported","append-to","popper-options","transition","show-after","hide-after","auto-close","offset"])):O("v-if",!0)]}):O("v-if",!0),g("div",{class:q([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable||t.selectDisabled||!t.states.inputValue&&!t.isFocused)])},[g("input",{id:t.inputId,ref:"inputRef",value:t.states.inputValue,type:"text",name:t.name,class:q([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,autocomplete:t.autocomplete,style:Xe(t.inputStyle),tabindex:t.tabindex,role:"combobox",readonly:!t.filterable,spellcheck:"false","aria-activedescendant":((m=t.hoverOption)==null?void 0:m.id)||"","aria-controls":t.contentId,"aria-expanded":t.dropdownMenuVisible,"aria-label":t.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:e[0]||(e[0]=(...b)=>t.handleKeydown&&t.handleKeydown(...b)),onCompositionstart:e[1]||(e[1]=(...b)=>t.handleCompositionStart&&t.handleCompositionStart(...b)),onCompositionupdate:e[2]||(e[2]=(...b)=>t.handleCompositionUpdate&&t.handleCompositionUpdate(...b)),onCompositionend:e[3]||(e[3]=(...b)=>t.handleCompositionEnd&&t.handleCompositionEnd(...b)),onInput:e[4]||(e[4]=(...b)=>t.onInput&&t.onInput(...b)),onChange:e[5]||(e[5]=Me(()=>{},["stop"])),onClick:e[6]||(e[6]=Me((...b)=>t.toggleMenu&&t.toggleMenu(...b),["stop"]))},null,46,Qhe),t.filterable?(v(),$("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:q(t.nsSelect.e("input-calculator")),textContent:x(t.states.inputValue)},null,10,efe)):O("v-if",!0)],2),t.shouldShowPlaceholder?(v(),$("div",{key:1,class:q([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?le(t.$slots,"label",{key:0,index:t.getOption(t.modelValue).index,label:t.currentPlaceholder,value:t.modelValue},()=>[g("span",null,x(t.currentPlaceholder),1)]):(v(),$("span",tfe,x(t.currentPlaceholder),1))],2)):O("v-if",!0)],2),g("div",{ref:"suffixRef",class:q(t.nsSelect.e("suffix"))},[t.iconComponent&&!t.showClearBtn?(v(),D(l,{key:0,class:q([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.iconReverse])},{default:y(()=>[(v(),D(Ct(t.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),t.showClearBtn&&t.clearIcon?(v(),D(l,{key:1,class:q([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.nsSelect.e("clear")]),onClick:t.handleClearClick},{default:y(()=>[(v(),D(Ct(t.clearIcon)))]),_:1},8,["class","onClick"])):O("v-if",!0),t.validateState&&t.validateIcon&&t.needStatusIcon?(v(),D(l,{key:2,class:q([t.nsInput.e("icon"),t.nsInput.e("validateIcon"),t.nsInput.is("loading",t.validateState==="validating")])},{default:y(()=>[(v(),D(Ct(t.validateIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],2)]}),content:y(()=>[_(f,{ref:"menuRef"},{default:y(()=>[t.$slots.header?(v(),$("div",{key:0,class:q(t.nsSelect.be("dropdown","header")),onClick:e[8]||(e[8]=Me(()=>{},["stop"]))},[le(t.$slots,"header")],2)):O("v-if",!0),Re(_(h,{id:t.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":t.nsSelect.be("dropdown","wrap"),"view-class":t.nsSelect.be("dropdown","list"),class:q([t.nsSelect.is("empty",t.filteredOptionsCount===0)]),role:"listbox","aria-label":t.ariaLabel,"aria-orientation":"vertical",onScroll:t.popupScroll},{default:y(()=>[t.showNewOption?(v(),D(c,{key:0,value:t.states.inputValue,created:!0},null,8,["value"])):O("v-if",!0),_(d,null,{default:y(()=>[le(t.$slots,"default",{},()=>[(v(!0),$(J,null,ye(t.options,(m,b)=>{var w;return v(),$(J,{key:b},[(w=t.getOptions(m))!=null&&w.length?(v(),D(u,{key:0,label:t.getLabel(m),disabled:t.getDisabled(m)},{default:y(()=>[(v(!0),$(J,null,ye(t.getOptions(m),k=>(v(),D(c,Yt({key:t.getValue(k)},{ref_for:!0},t.getOptionProps(k)),null,16))),128))]),_:2},1032,["label","disabled"])):(v(),D(c,Yt({key:1,ref_for:!0},t.getOptionProps(m)),null,16))],64)}),128))])]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll"]),[[jt,t.states.options.size>0&&!t.loading]]),t.$slots.loading&&t.loading?(v(),$("div",{key:1,class:q(t.nsSelect.be("dropdown","loading"))},[le(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(v(),$("div",{key:2,class:q(t.nsSelect.be("dropdown","empty"))},[le(t.$slots,"empty",{},()=>[g("span",null,x(t.emptyText),1)])],2)):O("v-if",!0),t.$slots.footer?(v(),$("div",{key:3,class:q(t.nsSelect.be("dropdown","footer")),onClick:e[9]||(e[9]=Me(()=>{},["stop"]))},[le(t.$slots,"footer")],2)):O("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-style","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow"])],16)),[[p,t.handleClickOutside,t.popperRef]])}var sfe=vi(Jhe,[["render",nfe]]);const Wt=Gt(sfe,{Option:p8,OptionGroup:m8}),Zt=Os(p8),q1=Os(m8);var mV={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(xs,function(){return function(n,i,s){var o=i.prototype,r=function(d){return d&&(d.indexOf?d:d.s)},a=function(d,h,f,p,m){var b=d.name?d:d.$locale(),w=r(b[h]),k=r(b[f]),C=w||k.map(function(S){return S.slice(0,p)});if(!m)return C;var A=b.weekStart;return C.map(function(S,M){return C[(M+(A||0))%7]})},l=function(){return s.Ls[s.locale()]},c=function(d,h){return d.formats[h]||function(f){return f.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(p,m,b){return m||b.slice(1)})}(d.formats[h.toUpperCase()])},u=function(){var d=this;return{months:function(h){return h?h.format("MMMM"):a(d,"months")},monthsShort:function(h){return h?h.format("MMM"):a(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):a(d,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):a(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):a(d,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return c(d.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return u.bind(this)()},s.localeData=function(){var d=l();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return s.weekdays()},weekdaysShort:function(){return s.weekdaysShort()},weekdaysMin:function(){return s.weekdaysMin()},months:function(){return s.months()},monthsShort:function(){return s.monthsShort()},longDateFormat:function(h){return c(d,h)},meridiem:d.meridiem,ordinal:d.ordinal}},s.months=function(){return a(l(),"months")},s.monthsShort=function(){return a(l(),"monthsShort","months",3)},s.weekdays=function(d){return a(l(),"weekdays",null,null,d)},s.weekdaysShort=function(d){return a(l(),"weekdaysShort","weekdays",3,d)},s.weekdaysMin=function(d){return a(l(),"weekdaysMin","weekdays",2,d)}}})})(mV);var ife=mV.exports;const ofe=_i(ife),gV={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:{type:Boolean,default:void 0},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},border:Boolean,size:Zi,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},ariaLabel:String,...Sr(["ariaControls"])},vV={[Mt]:t=>Ke(t)||wt(t)||Jn(t),change:t=>Ke(t)||wt(t)||Jn(t)},gp=Symbol("checkboxGroupContextKey"),rfe=Ge({modelValue:{type:de(Array),default:()=>[]},disabled:{type:Boolean,default:void 0},min:Number,max:Number,size:Zi,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},options:{type:de(Array)},props:{type:de(Object),default:()=>_V},type:{type:String,values:["checkbox","button"],default:"checkbox"},...Sr(["ariaLabel"])}),afe={[Mt]:t=>Ee(t),change:t=>Ee(t)},_V={label:"label",value:"value",disabled:"disabled"},lfe=({model:t,isChecked:e})=>{const n=qe(gp,void 0),i=qe(Hd,void 0),s=W(()=>{var a,l;const o=(a=n==null?void 0:n.max)==null?void 0:a.value,r=(l=n==null?void 0:n.min)==null?void 0:l.value;return!sn(o)&&t.value.length>=o&&!e.value||!sn(r)&&t.value.length<=r&&e.value});return{isDisabled:bs(W(()=>{var o;return n===void 0?(i==null?void 0:i.disabled)??s.value:((o=n.disabled)==null?void 0:o.value)||s.value})),isLimitDisabled:s}},cfe=(t,{model:e,isLimitExceeded:n,hasOwnLabel:i,isDisabled:s,isLabeledByFormItem:o})=>{const r=qe(gp,void 0),{formItem:a}=_o(),{emit:l}=pt();function c(p){return[!0,t.trueValue,t.trueLabel].includes(p)?t.trueValue??t.trueLabel??!0:t.falseValue??t.falseLabel??!1}function u(p,m){l(dn,c(p),m)}function d(p){if(n.value)return;const m=p.target;l(dn,c(m.checked),p)}async function h(p){n.value||!i.value&&!s.value&&o.value&&(p.composedPath().some(m=>m.tagName==="LABEL")||(e.value=c([!1,t.falseValue,t.falseLabel].includes(e.value)),await ot(),u(e.value,p)))}const f=W(()=>(r==null?void 0:r.validateEvent)||t.validateEvent);return Te(()=>t.modelValue,()=>{f.value&&(a==null||a.validate("change").catch(p=>Tt(p)))}),{handleChange:d,onClickRoot:h}},ufe=t=>{const e=ee(!1),{emit:n}=pt(),i=qe(gp,void 0),s=W(()=>sn(i)===!1),o=ee(!1),r=W({get(){var a;return s.value?(a=i==null?void 0:i.modelValue)==null?void 0:a.value:t.modelValue??e.value},set(a){var l,c;s.value&&Ee(a)?(o.value=((l=i==null?void 0:i.max)==null?void 0:l.value)!==void 0&&a.length>(i==null?void 0:i.max.value)&&a.length>r.value.length,o.value===!1&&((c=i==null?void 0:i.changeEvent)==null||c.call(i,a))):(n(Mt,a),e.value=a)}});return{model:r,isGroup:s,isLimitExceeded:o}},dfe=(t,e,{model:n})=>{const i=qe(gp,void 0),s=ee(!1),o=W(()=>xa(t.value)?t.label:t.value),r=W(()=>{const a=n.value;return Jn(a)?a:Ee(a)?yt(o.value)?a.map(an).some(l=>Wi(l,o.value)):a.map(an).includes(o.value):a!=null?a===t.trueValue||a===t.trueLabel:!!a});return{checkboxButtonSize:Ii(W(()=>{var a;return(a=i==null?void 0:i.size)==null?void 0:a.value}),{prop:!0}),isChecked:r,isFocused:s,checkboxSize:Ii(W(()=>{var a;return(a=i==null?void 0:i.size)==null?void 0:a.value})),hasOwnLabel:W(()=>!!e.default||!xa(o.value)),actualValue:o}},yV=(t,e)=>{const{formItem:n}=_o(),{model:i,isGroup:s,isLimitExceeded:o}=ufe(t),{isFocused:r,isChecked:a,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:u,actualValue:d}=dfe(t,e,{model:i}),{isDisabled:h}=lfe({model:i,isChecked:a}),{inputId:f,isLabeledByFormItem:p}=Tl(t,{formItemContext:n,disableIdGeneration:u,disableIdManagement:s}),{handleChange:m,onClickRoot:b}=cfe(t,{model:i,isLimitExceeded:o,hasOwnLabel:u,isDisabled:h,isLabeledByFormItem:p});return(()=>{function k(){Ee(i.value)&&!i.value.includes(d.value)?i.value.push(d.value):i.value=t.trueValue??t.trueLabel??!0}t.checked&&k()})(),fl({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},W(()=>s.value&&xa(t.value))),fl({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},W(()=>!!t.trueLabel)),fl({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},W(()=>!!t.falseLabel)),{inputId:f,isLabeledByFormItem:p,isChecked:a,isDisabled:h,isFocused:r,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:u,model:i,actualValue:d,handleChange:m,onClickRoot:b}},hfe=["id","indeterminate","name","tabindex","disabled"];var ffe=fe({name:"ElCheckbox",__name:"checkbox",props:gV,emits:vV,setup(t){const e=t,{inputId:n,isLabeledByFormItem:i,isChecked:s,isDisabled:o,isFocused:r,checkboxSize:a,hasOwnLabel:l,model:c,actualValue:u,handleChange:d,onClickRoot:h}=yV(e,gi()),f=W(()=>e.trueValue||e.falseValue||e.trueLabel||e.falseLabel?{"true-value":e.trueValue??e.trueLabel??!0,"false-value":e.falseValue??e.falseLabel??!1}:{value:u.value}),p=Be("checkbox"),m=W(()=>[p.b(),p.m(a.value),p.is("disabled",o.value),p.is("bordered",e.border),p.is("checked",s.value)]),b=W(()=>[p.e("input"),p.is("disabled",o.value),p.is("checked",s.value),p.is("indeterminate",e.indeterminate),p.is("focus",r.value)]);return(w,k)=>(v(),D(Ct(!E(l)&&E(i)?"span":"label"),{for:!E(l)&&E(i)?null:E(n),class:q(m.value),"aria-controls":t.indeterminate?t.ariaControls:null,"aria-checked":t.indeterminate?"mixed":void 0,"aria-label":t.ariaLabel,onClick:E(h)},{default:y(()=>[g("span",{class:q(b.value)},[Re(g("input",Yt({id:E(n),"onUpdate:modelValue":k[0]||(k[0]=C=>hn(c)?c.value=C:null),class:E(p).e("original"),type:"checkbox",indeterminate:t.indeterminate,name:t.name,tabindex:t.tabindex,disabled:E(o)},f.value,{onChange:k[1]||(k[1]=(...C)=>E(d)&&E(d)(...C)),onFocus:k[2]||(k[2]=C=>r.value=!0),onBlur:k[3]||(k[3]=C=>r.value=!1),onClick:k[4]||(k[4]=Me(()=>{},["stop"]))}),null,16,hfe),[[P1,E(c)]]),g("span",{class:q(E(p).e("inner"))},null,2)],2),E(l)?(v(),$("span",{key:0,class:q(E(p).e("label"))},[le(w.$slots,"default"),w.$slots.default?O("v-if",!0):(v(),$(J,{key:0},[N(x(t.label),1)],64))],2)):O("v-if",!0)]),_:3},8,["for","class","aria-controls","aria-checked","aria-label","onClick"]))}}),bV=ffe;const pfe=["name","tabindex","disabled"];var mfe=fe({name:"ElCheckboxButton",__name:"checkbox-button",props:gV,emits:vV,setup(t){const e=t,{isFocused:n,isChecked:i,isDisabled:s,checkboxButtonSize:o,model:r,actualValue:a,handleChange:l}=yV(e,gi()),c=W(()=>e.trueValue||e.falseValue||e.trueLabel||e.falseLabel?{"true-value":e.trueValue??e.trueLabel??!0,"false-value":e.falseValue??e.falseLabel??!1}:{value:a.value}),u=qe(gp,void 0),d=Be("checkbox"),h=W(()=>{var m,b;const p=((m=u==null?void 0:u.fill)==null?void 0:m.value)??"";return{backgroundColor:p,borderColor:p,color:((b=u==null?void 0:u.textColor)==null?void 0:b.value)??"",boxShadow:p?`-1px 0 0 0 ${p}`:void 0}}),f=W(()=>[d.b("button"),d.bm("button",o.value),d.is("disabled",s.value),d.is("checked",i.value),d.is("focus",n.value)]);return(p,m)=>(v(),$("label",{class:q(f.value)},[Re(g("input",Yt({"onUpdate:modelValue":m[0]||(m[0]=b=>hn(r)?r.value=b:null),class:E(d).be("button","original"),type:"checkbox",name:t.name,tabindex:t.tabindex,disabled:E(s)},c.value,{onChange:m[1]||(m[1]=(...b)=>E(l)&&E(l)(...b)),onFocus:m[2]||(m[2]=b=>n.value=!0),onBlur:m[3]||(m[3]=b=>n.value=!1),onClick:m[4]||(m[4]=Me(()=>{},["stop"]))}),null,16,pfe),[[P1,E(r)]]),p.$slots.default||t.label?(v(),$("span",{key:0,class:q(E(d).be("button","inner")),style:Xe(E(i)?h.value:void 0)},[le(p.$slots,"default",{},()=>[N(x(t.label),1)])],6)):O("v-if",!0)],2))}}),g8=mfe,gfe=fe({name:"ElCheckboxGroup",__name:"checkbox-group",props:rfe,emits:afe,setup(t,{emit:e}){const n=t,i=e,s=Be("checkbox"),o=bs(),{formItem:r}=_o(),{inputId:a,isLabeledByFormItem:l}=Tl(n,{formItemContext:r}),c=async p=>{i(Mt,p),await ot(),i(dn,p)},u=W({get(){return n.modelValue},set(p){c(p)}}),d=W(()=>({..._V,...n.props})),h=p=>{const{label:m,value:b,disabled:w}=d.value,k={label:p[m],value:p[b],disabled:p[w]};return{...Yb(p,[m,b,w]),...k}},f=W(()=>n.type==="button"?g8:bV);return Pt(gp,{...M4(go(n),["size","min","max","validateEvent","fill","textColor"]),disabled:o,modelValue:u,changeEvent:c}),Te(()=>n.modelValue,(p,m)=>{n.validateEvent&&!Wi(p,m)&&(r==null||r.validate("change").catch(b=>Tt(b)))}),(p,m)=>{var b;return v(),D(Ct(t.tag),{id:E(a),class:q(E(s).b("group")),role:"group","aria-label":E(l)?void 0:t.ariaLabel||"checkbox-group","aria-labelledby":E(l)?(b=E(r))==null?void 0:b.labelId:void 0},{default:y(()=>[le(p.$slots,"default",{},()=>[(v(!0),$(J,null,ye(t.options,(w,k)=>(v(),D(Ct(f.value),Yt({key:k},{ref_for:!0},h(w)),null,16))),128))])]),_:3},8,["id","class","aria-label","aria-labelledby"])}}}),wV=gfe;const qt=Gt(bV,{CheckboxButton:g8,CheckboxGroup:wV});Os(g8);const o2=Os(wV),kV=Ge({modelValue:{type:[String,Number,Boolean],default:void 0},size:Zi,disabled:{type:Boolean,default:void 0},label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),vfe=Ge({...kV,border:Boolean}),CV={[Mt]:t=>Ke(t)||wt(t)||Jn(t),[dn]:t=>Ke(t)||wt(t)||Jn(t)},xV=Symbol("radioGroupKey"),_fe=Ge({...kV}),SV={label:"label",value:"value",disabled:"disabled"},yfe=Ge({id:{type:String,default:void 0},size:Zi,disabled:{type:Boolean,default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},options:{type:de(Array)},props:{type:de(Object),default:()=>SV},type:{type:String,values:["radio","button"],default:"radio"},...Sr(["ariaLabel"])}),bfe=CV,$V=(t,e)=>{const n=ee(),i=qe(xV,void 0),s=W(()=>!!i),o=W(()=>xa(t.value)?t.label:t.value),r=W({get(){return s.value?i.modelValue:t.modelValue},set(d){s.value?i.changeEvent(d):e&&e(Mt,d),n.value.checked=t.modelValue===o.value}}),a=Ii(W(()=>i==null?void 0:i.size)),l=bs(W(()=>i==null?void 0:i.disabled)),c=ee(!1),u=W(()=>l.value||s.value&&r.value!==o.value?-1:0);return fl({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},W(()=>s.value&&xa(t.value))),{radioRef:n,isGroup:s,radioGroup:i,focus:c,size:a,disabled:l,tabIndex:u,modelValue:r,actualValue:o}},wfe=["value","name","disabled","checked"];var kfe=fe({name:"ElRadio",__name:"radio",props:vfe,emits:CV,setup(t,{emit:e}){const n=t,i=e,s=Be("radio"),{radioRef:o,radioGroup:r,focus:a,size:l,disabled:c,modelValue:u,actualValue:d}=$V(n,i);function h(){ot(()=>i(dn,u.value))}return(f,p)=>{var m;return v(),$("label",{class:q([E(s).b(),E(s).is("disabled",E(c)),E(s).is("focus",E(a)),E(s).is("bordered",t.border),E(s).is("checked",E(u)===E(d)),E(s).m(E(l))])},[g("span",{class:q([E(s).e("input"),E(s).is("disabled",E(c)),E(s).is("checked",E(u)===E(d))])},[Re(g("input",{ref_key:"radioRef",ref:o,"onUpdate:modelValue":p[0]||(p[0]=b=>hn(u)?u.value=b:null),class:q(E(s).e("original")),value:E(d),name:t.name||((m=E(r))==null?void 0:m.name),disabled:E(c),checked:E(u)===E(d),type:"radio",onFocus:p[1]||(p[1]=b=>a.value=!0),onBlur:p[2]||(p[2]=b=>a.value=!1),onChange:h,onClick:p[3]||(p[3]=Me(()=>{},["stop"]))},null,42,wfe),[[I1,E(u)]]),g("span",{class:q(E(s).e("inner"))},null,2)],2),g("span",{class:q(E(s).e("label")),onKeydown:p[4]||(p[4]=Me(()=>{},["stop"]))},[le(f.$slots,"default",{},()=>[N(x(t.label),1)])],34)],2)}}}),AV=kfe;const Cfe=["value","name","disabled"];var xfe=fe({name:"ElRadioButton",__name:"radio-button",props:_fe,setup(t){const e=t,n=Be("radio"),{radioRef:i,focus:s,size:o,disabled:r,modelValue:a,radioGroup:l,actualValue:c}=$V(e),u=W(()=>({backgroundColor:(l==null?void 0:l.fill)||"",borderColor:(l==null?void 0:l.fill)||"",boxShadow:l!=null&&l.fill?`-1px 0 0 0 ${l.fill}`:"",color:(l==null?void 0:l.textColor)||""}));return(d,h)=>{var f;return v(),$("label",{class:q([E(n).b("button"),E(n).is("active",E(a)===E(c)),E(n).is("disabled",E(r)),E(n).is("focus",E(s)),E(n).bm("button",E(o))])},[Re(g("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":h[0]||(h[0]=p=>hn(a)?a.value=p:null),class:q(E(n).be("button","original-radio")),value:E(c),type:"radio",name:t.name||((f=E(l))==null?void 0:f.name),disabled:E(r),onFocus:h[1]||(h[1]=p=>s.value=!0),onBlur:h[2]||(h[2]=p=>s.value=!1),onClick:h[3]||(h[3]=Me(()=>{},["stop"]))},null,42,Cfe),[[I1,E(a)]]),g("span",{class:q(E(n).be("button","inner")),style:Xe(E(a)===E(c)?u.value:{}),onKeydown:h[4]||(h[4]=Me(()=>{},["stop"]))},[le(d.$slots,"default",{},()=>[N(x(t.label),1)])],38)],2)}}}),v8=xfe;const Sfe=["id","aria-label","aria-labelledby"];var $fe=fe({name:"ElRadioGroup",__name:"radio-group",props:yfe,emits:bfe,setup(t,{emit:e}){const n=t,i=e,s=Be("radio"),o=kr(),r=ee(),{formItem:a}=_o(),{inputId:l,isLabeledByFormItem:c}=Tl(n,{formItemContext:a}),u=m=>{i(Mt,m),ot(()=>i(dn,m))};Nt(()=>{const m=r.value.querySelectorAll("[type=radio]"),b=m[0];!Array.from(m).some(w=>w.checked)&&b&&(b.tabIndex=0)});const d=W(()=>n.name||o.value),h=W(()=>({...SV,...n.props})),f=m=>{const{label:b,value:w,disabled:k}=h.value,C={label:m[b],value:m[w],disabled:m[k]};return{...Yb(m,[b,w,k]),...C}},p=W(()=>n.type==="button"?v8:AV);return Pt(xV,In({...go(n),changeEvent:u,name:d})),Te(()=>n.modelValue,(m,b)=>{n.validateEvent&&!Wi(m,b)&&(a==null||a.validate("change").catch(w=>Tt(w)))}),(m,b)=>(v(),$("div",{id:E(l),ref_key:"radioGroupRef",ref:r,class:q(E(s).b("group")),role:"radiogroup","aria-label":E(c)?void 0:t.ariaLabel||"radio-group","aria-labelledby":E(c)?E(a).labelId:void 0},[le(m.$slots,"default",{},()=>[(v(!0),$(J,null,ye(t.options,(w,k)=>(v(),D(Ct(p.value),Yt({key:k},{ref_for:!0},f(w)),null,16))),128))])],10,Sfe))}}),EV=$fe;const Li=Gt(AV,{RadioButton:v8,RadioGroup:EV}),ws=Os(EV),Qc=Os(v8),Afe=Ge({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:de([Number,Object]),default:()=>li({})},sm:{type:de([Number,Object]),default:()=>li({})},md:{type:de([Number,Object]),default:()=>li({})},lg:{type:de([Number,Object]),default:()=>li({})},xl:{type:de([Number,Object]),default:()=>li({})}}),Efe=["start","center","end","space-around","space-between","space-evenly"],Mfe=["top","middle","bottom"],Tfe=Ge({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:Efe,default:"start"},align:{type:String,values:Mfe}}),MV=Symbol("rowContextKey");var Pfe=fe({name:"ElRow",__name:"row",props:Tfe,setup(t){const e=t,n=Be("row");Pt(MV,{gutter:W(()=>e.gutter)});const i=W(()=>{const o={};return e.gutter&&(o.marginRight=o.marginLeft=`-${e.gutter/2}px`),o}),s=W(()=>[n.b(),n.is(`justify-${e.justify}`,e.justify!=="start"),n.is(`align-${e.align}`,!!e.align)]);return(o,r)=>(v(),D(Ct(t.tag),{class:q(s.value),style:Xe(i.value)},{default:y(()=>[le(o.$slots,"default")]),_:3},8,["class","style"]))}}),Ife=Pfe;const Ud=Gt(Ife);var Lfe=fe({name:"ElCol",__name:"col",props:Afe,setup(t){const e=t,{gutter:n}=qe(MV,{gutter:W(()=>0)}),i=Be("col"),s=W(()=>{const r={};return n.value&&(r.paddingLeft=r.paddingRight=`${n.value/2}px`),r}),o=W(()=>{const r=[];return["span","offset","pull","push"].forEach(a=>{const l=e[a];wt(l)&&(a==="span"?r.push(i.b(`${e[a]}`)):l>0&&r.push(i.b(`${a}-${e[a]}`)))}),["xs","sm","md","lg","xl"].forEach(a=>{wt(e[a])?r.push(i.b(`${a}-${e[a]}`)):yt(e[a])&&Object.entries(e[a]).forEach(([l,c])=>{r.push(l!=="span"?i.b(`${a}-${l}-${c}`):i.b(`${a}-${c}`))})}),n.value&&r.push(i.is("guttered")),[i.b(),r]});return(r,a)=>(v(),D(Ct(t.tag),{class:q(o.value),style:Xe(s.value)},{default:y(()=>[le(r.$slots,"default")]),_:3},8,["class","style"]))}}),Ofe=Lfe;const jd=Gt(Ofe),CA=t=>wt(t)||Ke(t)||Ee(t),Dfe=Ge({accordion:Boolean,modelValue:{type:de([Array,String,Number]),default:()=>li([])},expandIconPosition:{type:de([String]),default:"right"},beforeCollapse:{type:de(Function)}}),Rfe={[Mt]:CA,[dn]:CA},TV=Symbol("collapseContextKey"),Vfe=Ge({title:{type:String,default:""},name:{type:de([String,Number]),default:void 0},icon:{type:ds,default:jr},disabled:Boolean});var Ffe=fe({name:"ElCollapseTransition",__name:"collapse-transition",setup(t){const e=Be("collapse-transition"),n=s=>{s.style.maxHeight="",s.style.overflow=s.dataset.oldOverflow,s.style.paddingTop=s.dataset.oldPaddingTop,s.style.paddingBottom=s.dataset.oldPaddingBottom},i={beforeEnter(s){s.dataset||(s.dataset={}),s.dataset.oldPaddingTop=s.style.paddingTop,s.dataset.oldPaddingBottom=s.style.paddingBottom,s.style.height&&(s.dataset.elExistsHeight=s.style.height),s.style.maxHeight=0,s.style.paddingTop=0,s.style.paddingBottom=0},enter(s){requestAnimationFrame(()=>{s.dataset.oldOverflow=s.style.overflow,s.dataset.elExistsHeight?s.style.maxHeight=s.dataset.elExistsHeight:s.scrollHeight!==0?s.style.maxHeight=`${s.scrollHeight}px`:s.style.maxHeight=0,s.style.paddingTop=s.dataset.oldPaddingTop,s.style.paddingBottom=s.dataset.oldPaddingBottom,s.style.overflow="hidden"})},afterEnter(s){s.style.maxHeight="",s.style.overflow=s.dataset.oldOverflow},enterCancelled(s){n(s)},beforeLeave(s){s.dataset||(s.dataset={}),s.dataset.oldPaddingTop=s.style.paddingTop,s.dataset.oldPaddingBottom=s.style.paddingBottom,s.dataset.oldOverflow=s.style.overflow,s.style.maxHeight=`${s.scrollHeight}px`,s.style.overflow="hidden"},leave(s){s.scrollHeight!==0&&(s.style.maxHeight=0,s.style.paddingTop=0,s.style.paddingBottom=0)},afterLeave(s){n(s)},leaveCancelled(s){n(s)}};return(s,o)=>(v(),D(jo,Yt({name:E(e).b()},Mb(i)),{default:y(()=>[le(s.$slots,"default")]),_:3},16,["name"]))}}),Nfe=Ffe;const Bfe=Gt(Nfe),xA="ElCollapse",zfe=(t,e)=>{const n=ee(js(t.modelValue)),i=r=>{n.value=r;const a=t.accordion?n.value[0]:n.value;e(Mt,a),e(dn,a)},s=r=>{if(t.accordion)i([n.value[0]===r?"":r]);else{const a=[...n.value],l=a.indexOf(r);l>-1?a.splice(l,1):a.push(r),i(a)}},o=async r=>{const{beforeCollapse:a}=t;if(!a){s(r);return}const l=a(r);[hd(l),Jn(l)].includes(!0)||vo(xA,"beforeCollapse must return type `Promise<boolean>` or `boolean`"),hd(l)?l.then(c=>{c!==!1&&s(r)}).catch(c=>{Tt(xA,`some error occurred: ${c}`)}):l&&s(r)};return Te(()=>t.modelValue,()=>n.value=js(t.modelValue),{deep:!0}),Pt(TV,{activeNames:n,handleItemClick:o}),{activeNames:n,setActiveNames:i}},Hfe=t=>{const e=Be("collapse");return{rootKls:W(()=>[e.b(),e.b(`icon-position-${t.expandIconPosition}`)])}};var Ufe=fe({name:"ElCollapse",__name:"collapse",props:Dfe,emits:Rfe,setup(t,{expose:e,emit:n}){const i=t,{activeNames:s,setActiveNames:o}=zfe(i,n),{rootKls:r}=Hfe(i);return e({activeNames:s,setActiveNames:o}),(a,l)=>(v(),$("div",{class:q(E(r))},[le(a.$slots,"default")],2))}}),jfe=Ufe;const Wfe=t=>{const e=qe(TV),{namespace:n}=Be("collapse"),i=ee(!1),s=ee(!1),o=W4(),r=W(()=>o.current++),a=W(()=>t.name??`${n.value}-id-${o.prefix}-${E(r)}`),l=W(()=>e==null?void 0:e.activeNames.value.includes(E(a)));return{focusing:i,id:r,isActive:l,handleFocus:()=>{setTimeout(()=>{s.value?s.value=!1:i.value=!0},50)},handleHeaderClick:h=>{var f;t.disabled||(f=h.target)!=null&&f.closest("input, textarea, select")||(e==null||e.handleItemClick(E(a)),i.value=!1,s.value=!0)},handleEnterClick:h=>{var f;(f=h.target)!=null&&f.closest("input, textarea, select")||(h.preventDefault(),e==null||e.handleItemClick(E(a)))}}},Yfe=(t,{focusing:e,isActive:n,id:i})=>{const s=Be("collapse"),o=W(()=>[s.b("item"),s.is("active",E(n)),s.is("disabled",t.disabled)]),r=W(()=>[s.be("item","header"),s.is("active",E(n)),{focusing:E(e)&&!t.disabled}]),a=W(()=>[s.be("item","arrow"),s.is("active",E(n))]);return{itemTitleKls:W(()=>[s.be("item","title")]),arrowKls:a,headKls:r,rootKls:o,itemWrapperKls:W(()=>s.be("item","wrap")),itemContentKls:W(()=>s.be("item","content")),scopedContentId:W(()=>s.b(`content-${E(i)}`)),scopedHeadId:W(()=>s.b(`head-${E(i)}`))}},qfe=["id","aria-expanded","aria-controls","aria-describedby","tabindex","aria-disabled"],Gfe=["id","aria-hidden","aria-labelledby"];var Xfe=fe({name:"ElCollapseItem",__name:"collapse-item",props:Vfe,setup(t,{expose:e}){const n=t,{focusing:i,id:s,isActive:o,handleFocus:r,handleHeaderClick:a,handleEnterClick:l}=Wfe(n),{arrowKls:c,headKls:u,rootKls:d,itemTitleKls:h,itemWrapperKls:f,itemContentKls:p,scopedContentId:m,scopedHeadId:b}=Yfe(n,{focusing:i,isActive:o,id:s});return e({isActive:o}),(w,k)=>(v(),$("div",{class:q(E(d))},[g("div",{id:E(b),class:q(E(u)),"aria-expanded":E(o),"aria-controls":E(m),"aria-describedby":E(m),tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,role:"button",onClick:k[0]||(k[0]=(...C)=>E(a)&&E(a)(...C)),onKeydown:k[1]||(k[1]=ut(Me((...C)=>E(l)&&E(l)(...C),["stop"]),["space","enter"])),onFocus:k[2]||(k[2]=(...C)=>E(r)&&E(r)(...C)),onBlur:k[3]||(k[3]=C=>i.value=!1)},[g("span",{class:q(E(h))},[le(w.$slots,"title",{isActive:E(o)},()=>[N(x(t.title),1)])],2),le(w.$slots,"icon",{isActive:E(o)},()=>[_(E(we),{class:q(E(c))},{default:y(()=>[(v(),D(Ct(t.icon)))]),_:1},8,["class"])])],42,qfe),_(E(Bfe),null,{default:y(()=>[Re(g("div",{id:E(m),role:"region",class:q(E(f)),"aria-hidden":!E(o),"aria-labelledby":E(b)},[g("div",{class:q(E(p))},[le(w.$slots,"default")],2)],10,Gfe),[[jt,E(o)]])]),_:3})],2))}}),PV=Xfe;const IV=Gt(jfe,{CollapseItem:PV}),LV=Os(PV),OV=Ge({modelValue:{type:de(String),default:void 0},border:{type:Boolean,default:!0},showAlpha:Boolean,colorFormat:{type:de(String)},disabled:Boolean,predefine:{type:de(Array)},validateEvent:{type:Boolean,default:!0},hueSliderClass:{type:de([String,Array,Object])},hueSliderStyle:{type:de([String,Array,Object])}}),Kfe={[Mt]:t=>Ke(t)||hi(t)},DV=Symbol("colorCommonPickerKey"),RV=Symbol("colorPickerPanelContextKey"),VV=Ge({color:{type:de(Object),required:!0},vertical:Boolean,disabled:Boolean}),Zfe=VV,FV=t=>{let e,n;return t.type==="touchend"?(n=t.changedTouches[0].clientY,e=t.changedTouches[0].clientX):t.type.startsWith("touch")?(n=t.touches[0].clientY,e=t.touches[0].clientX):(n=t.clientY,e=t.clientX),{clientX:e,clientY:n}};let Bw=!1;function EC(t,e){if(!Jt)return;const n=function(o){var r;(r=e.drag)==null||r.call(e,o)},i=function(o){var r;document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",i),document.removeEventListener("touchmove",n),document.removeEventListener("touchend",i),document.onselectstart=null,document.ondragstart=null,Bw=!1,(r=e.end)==null||r.call(e,o)},s=function(o){var r;Bw||(document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",i),document.addEventListener("touchmove",n),document.addEventListener("touchend",i),Bw=!0,(r=e.start)==null||r.call(e,o))};t.addEventListener("mousedown",s),t.addEventListener("touchstart",s,{passive:!1})}const NV=(t,{key:e,minValue:n,maxValue:i})=>{const s=pt(),o=Fn(),r=Fn(),a=W(()=>t.color.get(e));function l(h){var f;t.disabled||(h.target!==o.value&&c(h),(f=o.value)==null||f.focus())}function c(h){if(!r.value||!o.value||t.disabled)return;const f=s.vnode.el.getBoundingClientRect(),{clientX:p,clientY:m}=FV(h);let b;if(t.vertical){let w=m-f.top;w=Math.max(o.value.offsetHeight/2,w),w=Math.min(w,f.height-o.value.offsetHeight/2),b=Math.round((w-o.value.offsetHeight/2)/(f.height-o.value.offsetHeight)*i)}else{let w=p-f.left;w=Math.max(o.value.offsetWidth/2,w),w=Math.min(w,f.width-o.value.offsetWidth/2),b=Math.round((w-o.value.offsetWidth/2)/(f.width-o.value.offsetWidth)*i)}t.color.set(e,b)}function u(h){if(t.disabled)return;const{shiftKey:f}=h,p=ls(h),m=f?10:1,b=e==="hue"?-1:1;let w=!0;switch(p){case Ue.left:case Ue.down:d(-m*b);break;case Ue.right:case Ue.up:d(m*b);break;case Ue.home:t.color.set(e,e==="hue"?i:n);break;case Ue.end:t.color.set(e,e==="hue"?n:i);break;case Ue.pageDown:d(-4*b);break;case Ue.pageUp:d(4*b);break;default:w=!1;break}w&&h.preventDefault()}function d(h){let f=a.value+h;f=f<n?n:f>i?i:f,t.color.set(e,f)}return{thumb:o,bar:r,currentValue:a,handleDrag:c,handleClick:l,handleKeydown:u}},BV=(t,{namespace:e,maxValue:n,bar:i,thumb:s,currentValue:o,handleDrag:r,getBackground:a})=>{const l=pt(),c=Be(e),u=ee(0),d=ee(0),h=ee();function f(){if(!s.value||t.vertical)return 0;const C=l.vnode.el,A=o.value;return C?Math.round(A*(C.offsetWidth-s.value.offsetWidth/2)/n):0}function p(){if(!s.value)return 0;const C=l.vnode.el;if(!t.vertical)return 0;const A=o.value;return C?Math.round(A*(C.offsetHeight-s.value.offsetHeight/2)/n):0}function m(){u.value=f(),d.value=p(),h.value=a==null?void 0:a()}Nt(()=>{if(!i.value||!s.value)return;const C={drag:A=>{r(A)},end:A=>{r(A)}};EC(i.value,C),EC(s.value,C),m()}),Te(o,()=>m()),Te(()=>t.color.value,()=>m());const b=W(()=>[c.b(),c.is("vertical",t.vertical),c.is("disabled",t.disabled)]),w=W(()=>c.e("bar")),k=W(()=>c.e("thumb"));return{rootKls:b,barKls:w,barStyle:W(()=>({background:h.value})),thumbKls:k,thumbStyle:W(()=>({left:pi(u.value),top:pi(d.value)})),thumbLeft:u,thumbTop:d,update:m}},Jfe=["aria-label","aria-valuenow","aria-valuetext","aria-orientation","tabindex","aria-disabled"],SA=0,zw=100;var Qfe=fe({name:"ElColorAlphaSlider",__name:"alpha-slider",props:VV,setup(t,{expose:e}){const n=t,{currentValue:i,bar:s,thumb:o,handleDrag:r,handleClick:a,handleKeydown:l}=NV(n,{key:"alpha",minValue:SA,maxValue:zw}),{rootKls:c,barKls:u,barStyle:d,thumbKls:h,thumbStyle:f,update:p}=BV(n,{namespace:"color-alpha-slider",maxValue:zw,currentValue:i,bar:s,thumb:o,handleDrag:r,getBackground:k}),{t:m}=en(),b=W(()=>m("el.colorpicker.alphaLabel")),w=W(()=>m("el.colorpicker.alphaDescription",{alpha:i.value,color:n.color.value}));function k(){if(n.color&&n.color.value){const{r:C,g:A,b:S}=n.color.toRgb();return`linear-gradient(to right, rgba(${C}, ${A}, ${S}, 0) 0%, rgba(${C}, ${A}, ${S}, 1) 100%)`}return""}return e({update:p,bar:s,thumb:o}),(C,A)=>(v(),$("div",{class:q(E(c))},[g("div",{ref_key:"bar",ref:s,class:q(E(u)),style:Xe(E(d)),onClick:A[0]||(A[0]=(...S)=>E(a)&&E(a)(...S))},null,6),g("div",{ref_key:"thumb",ref:o,class:q(E(h)),style:Xe(E(f)),"aria-label":b.value,"aria-valuenow":E(i),"aria-valuetext":w.value,"aria-orientation":t.vertical?"vertical":"horizontal","aria-valuemin":SA,"aria-valuemax":zw,role:"slider",tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,onKeydown:A[1]||(A[1]=(...S)=>E(l)&&E(l)(...S))},null,46,Jfe)],2))}}),epe=Qfe;const tpe=["aria-label","aria-valuenow","aria-valuetext","aria-orientation","tabindex","aria-disabled"],$A=0,Hw=360;var npe=fe({name:"ElColorHueSlider",__name:"hue-slider",props:Zfe,setup(t,{expose:e}){const n=t,{currentValue:i,bar:s,thumb:o,handleDrag:r,handleClick:a,handleKeydown:l}=NV(n,{key:"hue",minValue:$A,maxValue:Hw}),{rootKls:c,barKls:u,thumbKls:d,thumbStyle:h,thumbTop:f,update:p}=BV(n,{namespace:"color-hue-slider",maxValue:Hw,currentValue:i,bar:s,thumb:o,handleDrag:r}),{t:m}=en(),b=W(()=>m("el.colorpicker.hueLabel")),w=W(()=>m("el.colorpicker.hueDescription",{hue:i.value,color:n.color.value}));return e({bar:s,thumb:o,thumbTop:f,update:p}),(k,C)=>(v(),$("div",{class:q(E(c))},[g("div",{ref_key:"bar",ref:s,class:q(E(u)),onClick:C[0]||(C[0]=(...A)=>E(a)&&E(a)(...A))},null,2),g("div",{ref_key:"thumb",ref:o,class:q(E(d)),style:Xe(E(h)),"aria-label":b.value,"aria-valuenow":E(i),"aria-valuetext":w.value,"aria-orientation":t.vertical?"vertical":"horizontal","aria-valuemin":$A,"aria-valuemax":Hw,role:"slider",tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,onKeydown:C[1]||(C[1]=(...A)=>E(l)&&E(l)(...A))},null,46,tpe)],2))}}),spe=npe;const ipe=Ge({colors:{type:de(Array),required:!0},color:{type:de(Object),required:!0},enableAlpha:{type:Boolean,required:!0},disabled:Boolean});var $0=class{constructor(t={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this._tiny=new Qn,this._isValid=!1,this.enableAlpha=!1,this.format="",this.value="";for(const e in t)zt(t,e)&&(this[e]=t[e]);t.value?this.fromString(t.value):this.doOnChange()}set(t,e){if(arguments.length===1&&typeof t=="object"){for(const n in t)zt(t,n)&&this.set(n,t[n]);return}this[`_${t}`]=e,this._isValid=!0,this.doOnChange()}get(t){return["hue","saturation","value","alpha"].includes(t)?Math.round(this[`_${t}`]):this[`_${t}`]}toRgb(){return this._isValid?this._tiny.toRgb():{r:255,g:255,b:255,a:0}}fromString(t){const e=new Qn(t);if(this._isValid=e.isValid,e.isValid){const{h:n,s:i,v:s,a:o}=e.toHsv();this._hue=n,this._saturation=i*100,this._value=s*100,this._alpha=o*100}else this._hue=0,this._saturation=100,this._value=100,this._alpha=100;this.doOnChange()}clear(){this._isValid=!1,this.value="",this._hue=0,this._saturation=100,this._value=100,this._alpha=100}compare(t){const e=new Qn({h:t._hue,s:t._saturation/100,v:t._value/100,a:t._alpha/100});return this._tiny.equals(e)}doOnChange(){const{_hue:t,_saturation:e,_value:n,_alpha:i,format:s,enableAlpha:o}=this;let r=s||(o?"rgb":"hex");s==="hex"&&o&&(r="hex8"),this._tiny=new Qn({h:t,s:e/100,v:n/100,a:i/100}),this.value=this._isValid?this._tiny.toString(r):""}};const ope=t=>{const{currentColor:e}=qe(RV),n=ee(s(t.colors,t.color));Te(()=>e.value,o=>{const r=new $0({value:o,enableAlpha:t.enableAlpha});n.value.forEach(a=>{a.selected=r.compare(a)})}),_l(()=>{n.value=s(t.colors,t.color)});function i(o){t.color.fromString(t.colors[o])}function s(o,r){return o.map(a=>{const l=new $0({value:a,enableAlpha:t.enableAlpha});return l.selected=l.compare(r),l})}return{rgbaColors:n,handleSelect:i}},rpe=t=>{const e=Be("color-predefine"),n=W(()=>[e.b(),e.is("disabled",t.disabled)]),i=W(()=>e.e("colors"));function s(o){return[e.e("color-selector"),e.is("alpha",o.get("alpha")<100),{selected:o.selected}]}return{rootKls:n,colorsKls:i,colorSelectorKls:s}},ape=["disabled","aria-label","onClick"];var lpe=fe({name:"ElColorPredefine",__name:"predefine",props:ipe,setup(t){const e=t,{rgbaColors:n,handleSelect:i}=ope(e),{rootKls:s,colorsKls:o,colorSelectorKls:r}=rpe(e),{t:a}=en(),l=c=>a("el.colorpicker.predefineDescription",{value:c});return(c,u)=>(v(),$("div",{class:q(E(s))},[g("div",{class:q(E(o))},[(v(!0),$(J,null,ye(E(n),(d,h)=>(v(),$("button",{key:t.colors[h],type:"button",disabled:t.disabled,"aria-label":l(d.value),class:q(E(r)(d)),onClick:f=>E(i)(h)},[g("div",{style:Xe({backgroundColor:d.value})},null,4)],10,ape))),128))],2)],2))}}),cpe=lpe;const upe=Ge({color:{type:de(Object),required:!0},disabled:Boolean}),dpe=t=>{const e=pt(),n=ee(),i=ee(0),s=ee(0),o=ee("hsl(0, 100%, 50%)"),r=W(()=>t.color.get("saturation")),a=W(()=>t.color.get("value")),l=W(()=>t.color.get("hue"));function c(p){var m;t.disabled||(p.target!==n.value&&u(p),(m=n.value)==null||m.focus({preventScroll:!0}))}function u(p){if(t.disabled)return;const m=e.vnode.el.getBoundingClientRect(),{clientX:b,clientY:w}=FV(p);let k=b-m.left,C=w-m.top;k=Math.max(0,k),k=Math.min(k,m.width),C=Math.max(0,C),C=Math.min(C,m.height),s.value=k,i.value=C,t.color.set({saturation:k/m.width*100,value:100-C/m.height*100})}function d(p){if(t.disabled)return;const{shiftKey:m}=p,b=ls(p),w=m?10:1;let k=!0;switch(b){case Ue.left:h(-w);break;case Ue.right:h(w);break;case Ue.up:f(w);break;case Ue.down:f(-w);break;default:k=!1;break}k&&p.preventDefault()}function h(p){let m=r.value+p;m=m<0?0:m>100?100:m,t.color.set("saturation",m)}function f(p){let m=a.value+p;m=m<0?0:m>100?100:m,t.color.set("value",m)}return{cursorRef:n,cursorTop:i,cursorLeft:s,background:o,saturation:r,brightness:a,hue:l,handleClick:c,handleDrag:u,handleKeydown:d}},hpe=(t,{cursorTop:e,cursorLeft:n,background:i,handleDrag:s})=>{const o=pt(),r=Be("color-svpanel");function a(){const l=t.color.get("saturation"),c=t.color.get("value"),{clientWidth:u,clientHeight:d}=o.vnode.el;n.value=l*u/100,e.value=(100-c)*d/100,i.value=`hsl(${t.color.get("hue")}, 100%, 50%)`}return Nt(()=>{EC(o.vnode.el,{drag:l=>{s(l)},end:l=>{s(l)}}),a()}),Te([()=>t.color.get("hue"),()=>t.color.get("value"),()=>t.color.value],()=>a()),{rootKls:W(()=>r.b()),cursorKls:W(()=>r.e("cursor")),rootStyle:W(()=>({backgroundColor:i.value})),cursorStyle:W(()=>({top:pi(e.value),left:pi(n.value)})),update:a}},fpe=["tabindex","aria-disabled","aria-label","aria-valuenow","aria-valuetext"];var ppe=fe({name:"ElSvPanel",__name:"sv-panel",props:upe,setup(t,{expose:e}){const n=t,{cursorRef:i,cursorTop:s,cursorLeft:o,background:r,saturation:a,brightness:l,handleClick:c,handleDrag:u,handleKeydown:d}=dpe(n),{rootKls:h,cursorKls:f,rootStyle:p,cursorStyle:m,update:b}=hpe(n,{cursorTop:s,cursorLeft:o,background:r,handleDrag:u}),{t:w}=en(),k=W(()=>w("el.colorpicker.svLabel")),C=W(()=>w("el.colorpicker.svDescription",{saturation:a.value,brightness:l.value,color:n.color.value}));return e({update:b}),(A,S)=>(v(),$("div",{class:q(E(h)),style:Xe(E(p)),onClick:S[1]||(S[1]=(...M)=>E(c)&&E(c)(...M))},[g("div",{ref_key:"cursorRef",ref:i,class:q(E(f)),style:Xe(E(m)),tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,role:"slider","aria-valuemin":"0,0","aria-valuemax":"100,100","aria-label":k.value,"aria-valuenow":`${E(a)},${E(l)}`,"aria-valuetext":C.value,onKeydown:S[0]||(S[0]=(...M)=>E(d)&&E(d)(...M))},null,46,fpe)],6))}}),mpe=ppe;const zV=(t,e)=>{const n=In(new $0({enableAlpha:t.showAlpha,format:t.colorFormat||"",value:t.modelValue}));return Te(()=>[t.colorFormat,t.showAlpha],()=>{n.enableAlpha=t.showAlpha,n.format=t.colorFormat||n.format,n.doOnChange(),e(Mt,n.value)}),{color:n}};var gpe=fe({name:"ElColorPickerPanel",__name:"color-picker-panel",props:OV,emits:Kfe,setup(t,{expose:e,emit:n}){const i=t,s=n,o=Be("color-picker-panel"),{formItem:r}=_o(),a=bs(),l=ee(),c=ee(),u=ee(),d=ee(),h=ee(""),{color:f}=qe(DV,()=>zV(i,s),!0);function p(){f.fromString(h.value),f.value!==h.value&&(h.value=f.value)}function m(){var w;i.validateEvent&&((w=r==null?void 0:r.validate)==null||w.call(r,"blur").catch(k=>Tt(k)))}function b(){var w,k,C;(w=l.value)==null||w.update(),(k=c.value)==null||k.update(),(C=u.value)==null||C.update()}return Nt(()=>{i.modelValue&&(h.value=f.value),ot(b)}),Te(()=>i.modelValue,w=>{w!==f.value&&(w?f.fromString(w):f.clear())}),Te(()=>f.value,w=>{s(Mt,w),h.value=w,i.validateEvent&&(r==null||r.validate("change").catch(k=>Tt(k)))}),Pt(RV,{currentColor:W(()=>f.value)}),e({color:f,inputRef:d,update:b}),(w,k)=>(v(),$("div",{class:q([E(o).b(),E(o).is("disabled",E(a)),E(o).is("border",t.border)]),onFocusout:m},[g("div",{class:q(E(o).e("wrapper"))},[_(spe,{ref_key:"hueRef",ref:l,color:E(f),vertical:"",disabled:E(a),class:q(["hue-slider",t.hueSliderClass]),style:Xe(t.hueSliderStyle)},null,8,["color","disabled","class","style"]),_(mpe,{ref_key:"svRef",ref:c,color:E(f),disabled:E(a)},null,8,["color","disabled"])],2),t.showAlpha?(v(),D(epe,{key:0,ref_key:"alphaRef",ref:u,color:E(f),disabled:E(a)},null,8,["color","disabled"])):O("v-if",!0),t.predefine?(v(),D(cpe,{key:1,ref:"predefine","enable-alpha":t.showAlpha,color:E(f),colors:t.predefine,disabled:E(a)},null,8,["enable-alpha","color","colors","disabled"])):O("v-if",!0),g("div",{class:q(E(o).e("footer"))},[_(E(ht),{ref_key:"inputRef",ref:d,modelValue:h.value,"onUpdate:modelValue":k[0]||(k[0]=C=>h.value=C),"validate-event":!1,size:"small",disabled:E(a),onChange:p},null,8,["modelValue","disabled"]),le(w.$slots,"footer")],2)],34))}}),vpe=gpe;const _pe=Gt(vpe),ype=Ge({persistent:{type:Boolean,default:!0},modelValue:{type:de(String),default:void 0},id:String,showAlpha:Boolean,colorFormat:{type:de(String)},disabled:{type:Boolean,default:void 0},clearable:{type:Boolean,default:!0},size:Zi,popperClass:zn.popperClass,popperStyle:zn.popperStyle,tabindex:{type:[String,Number],default:0},teleported:zn.teleported,appendTo:zn.appendTo,predefine:{type:de(Array)},validateEvent:{type:Boolean,default:!0},...H1,...Sr(["ariaLabel"])}),bpe={[Mt]:t=>Ke(t)||hi(t),[dn]:t=>Ke(t)||hi(t),activeChange:t=>Ke(t)||hi(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0},wpe=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"];var kpe=fe({name:"ElColorPicker",__name:"color-picker",props:ype,emits:bpe,setup(t,{expose:e,emit:n}){const i=t,s=n,{t:o}=en(),r=Be("color"),{formItem:a}=_o(),l=Ii(),c=bs(),{valueOnClear:u,isEmptyValue:d}=K4(i,null),h=zV(i,s),{inputId:f,isLabeledByFormItem:p}=Tl(i,{formItemContext:a}),m=ee(),b=ee(),w=ee(),k=ee(!1),C=ee(!1);let A=!0;const{isFocused:S,handleFocus:M,handleBlur:P}=pp(b,{disabled:c,beforeBlur(re){var ke;return(ke=m.value)==null?void 0:ke.isFocusInsideContent(re)},afterBlur(){var re;Y(!1),G(),i.validateEvent&&((re=a==null?void 0:a.validate)==null||re.call(a,"blur").catch(ke=>Tt(ke)))}}),T=Cie(()=>{var re;return((re=w.value)==null?void 0:re.color)??h.color}),I=W(()=>M4(i,Object.keys(OV))),L=W(()=>!i.modelValue&&!C.value?"transparent":U(T,i.showAlpha)),R=W(()=>!i.modelValue&&!C.value?"":T.value),V=W(()=>p.value?void 0:i.ariaLabel||o("el.colorpicker.defaultLabel")),H=W(()=>p.value?a==null?void 0:a.labelId:void 0),F=W(()=>[r.b("picker"),r.is("disabled",c.value),r.bm("picker",l.value),r.is("focused",S.value)]);function U(re,ke){const{r:je,g:te,b:se,a:me}=re.toRgb();return ke?`rgba(${je}, ${te}, ${se}, ${me})`:`rgb(${je}, ${te}, ${se})`}function Y(re){k.value=re}const z=yd(Y,100,{leading:!0});function X(){c.value||Y(!0)}function Z(){z(!1),G()}function G(){ot(()=>{i.modelValue?T.fromString(i.modelValue):(T.value="",ot(()=>{C.value=!1}))})}function Q(){c.value||(k.value&&G(),z(!k.value))}function ne(){const re=d(T.value)?u.value:T.value;s(Mt,re),s(dn,re),i.validateEvent&&(a==null||a.validate("change").catch(ke=>Tt(ke))),z(!1),ot(()=>{const ke=new $0({enableAlpha:i.showAlpha,format:i.colorFormat||"",value:i.modelValue});T.compare(ke)||G()})}function K(){z(!1),s(Mt,u.value),s(dn,u.value),i.modelValue!==u.value&&i.validateEvent&&(a==null||a.validate("change").catch(re=>Tt(re))),G(),s("clear")}function ae(){var re,ke;(ke=(re=w==null?void 0:w.value)==null?void 0:re.inputRef)==null||ke.focus()}function ge(){k.value&&(Z(),S.value&&pe())}function Ce(re){re.preventDefault(),re.stopPropagation(),Y(!1),G()}function oe(re){switch(ls(re)){case Ue.enter:case Ue.numpadEnter:case Ue.space:re.preventDefault(),re.stopPropagation(),X();break;case Ue.esc:Ce(re);break}}function pe(){b.value.focus()}function ie(){b.value.blur()}return Te(()=>R.value,re=>{A&&s("activeChange",re),A=!0}),Te(()=>T.value,()=>{!i.modelValue&&!C.value&&(C.value=!0)}),Te(()=>i.modelValue,re=>{re?re&&re!==T.value&&(A=!1,T.fromString(re)):C.value=!1}),Te(()=>k.value,()=>{w.value&&ot(w.value.update)}),Pt(DV,h),e({color:T,show:X,hide:Z,focus:pe,blur:ie}),(re,ke)=>(v(),D(E(Ss),{ref_key:"popper",ref:m,visible:k.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[E(r).be("picker","panel"),t.popperClass],"popper-style":t.popperStyle,"stop-popper-mouse-event":!1,pure:"",loop:"",role:"dialog",effect:"light",trigger:"click",teleported:t.teleported,transition:`${E(r).namespace.value}-zoom-in-top`,persistent:t.persistent,"append-to":t.appendTo,onShow:ae,onHide:ke[2]||(ke[2]=je=>Y(!1))},{content:y(()=>[Re((v(),D(E(_pe),Yt({ref_key:"pickerPanelRef",ref:w},I.value,{border:!1,"validate-event":!1,onKeydown:ut(Ce,["esc"])}),{footer:y(()=>[g("div",null,[t.clearable?(v(),D(E(ze),{key:0,class:q(E(r).be("footer","link-btn")),text:"",size:"small",onClick:K},{default:y(()=>[N(x(E(o)("el.colorpicker.clear")),1)]),_:1},8,["class"])):O("v-if",!0),_(E(ze),{plain:"",size:"small",class:q(E(r).be("footer","btn")),onClick:ne},{default:y(()=>[N(x(E(o)("el.colorpicker.confirm")),1)]),_:1},8,["class"])])]),_:1},16)),[[E(s1),ge,b.value]])]),default:y(()=>[g("div",Yt({id:E(f),ref_key:"triggerRef",ref:b},re.$attrs,{class:F.value,role:"button","aria-label":V.value,"aria-labelledby":H.value,"aria-description":E(o)("el.colorpicker.description",{color:t.modelValue||""}),"aria-disabled":E(c),tabindex:E(c)?void 0:t.tabindex,onKeydown:oe,onFocus:ke[0]||(ke[0]=(...je)=>E(M)&&E(M)(...je)),onBlur:ke[1]||(ke[1]=(...je)=>E(P)&&E(P)(...je))}),[g("div",{class:q(E(r).be("picker","trigger")),onClick:Q},[g("span",{class:q([E(r).be("picker","color"),E(r).is("alpha",t.showAlpha)])},[g("span",{class:q(E(r).be("picker","color-inner")),style:Xe({backgroundColor:L.value})},[Re(_(E(we),{class:q([E(r).be("picker","icon"),E(r).is("icon-arrow-down")])},{default:y(()=>[_(E(zd))]),_:1},8,["class"]),[[jt,t.modelValue||C.value]]),Re(_(E(we),{class:q([E(r).be("picker","empty"),E(r).is("icon-close")])},{default:y(()=>[_(E(Ho))]),_:1},8,["class"]),[[jt,!t.modelValue&&!C.value]])],6)],2)],2)],16,wpe)]),_:1},8,["visible","popper-class","popper-style","teleported","transition","persistent","append-to"]))}}),Cpe=kpe;const eu=Gt(Cpe);var xpe=fe({name:"ElContainer",__name:"container",props:{direction:{type:String,required:!1}},setup(t){const e=t,n=gi(),i=Be("container"),s=W(()=>e.direction==="vertical"?!0:e.direction==="horizontal"?!1:n&&n.default?n.default().some(o=>{const r=o.type.name;return r==="ElHeader"||r==="ElFooter"}):!1);return(o,r)=>(v(),$("section",{class:q([E(i).b(),E(i).is("vertical",s.value)])},[le(o.$slots,"default")],2))}}),Spe=xpe,$pe=fe({name:"ElAside",__name:"aside",props:{width:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=Be("aside"),i=W(()=>e.width?n.cssVarBlock({width:e.width}):{});return(s,o)=>(v(),$("aside",{class:q(E(n).b()),style:Xe(i.value)},[le(s.$slots,"default")],6))}}),HV=$pe,Ape=fe({name:"ElFooter",__name:"footer",props:{height:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=Be("footer"),i=W(()=>e.height?n.cssVarBlock({height:e.height}):{});return(s,o)=>(v(),$("footer",{class:q(E(n).b()),style:Xe(i.value)},[le(s.$slots,"default")],6))}}),UV=Ape,Epe=fe({name:"ElHeader",__name:"header",props:{height:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=Be("header"),i=W(()=>e.height?n.cssVarBlock({height:e.height}):{});return(s,o)=>(v(),$("header",{class:q(E(n).b()),style:Xe(i.value)},[le(s.$slots,"default")],6))}}),jV=Epe,Mpe=fe({name:"ElMain",__name:"main",setup(t){const e=Be("main");return(n,i)=>(v(),$("main",{class:q(E(e).b())},[le(n.$slots,"default")],2))}}),WV=Mpe;const G1=Gt(Spe,{Aside:HV,Footer:UV,Header:jV,Main:WV}),X1=Os(HV);Os(UV);const K1=Os(jV),yo=Os(WV),Tpe=Ge({valueFormat:String,dateFormat:String,timeFormat:String,disabled:{type:Boolean,default:void 0},modelValue:{type:de([Date,Array,String,Number]),default:""},defaultValue:{type:de([Date,Array])},defaultTime:{type:de([Date,Array])},isRange:Boolean,...f8,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,unlinkPanels:Boolean,showNow:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:Boolean,showWeekNumber:Boolean,type:{type:de(String),default:"date"},clearable:{type:Boolean,default:!0},border:{type:Boolean,default:!0},editable:{type:Boolean,default:!0}}),_8=Symbol("rootPickerContextKey"),Z1="ElIsDefaultFormat",Ppe=["date","dates","year","years","month","months","week","range"],y8=Ge({cellClassName:{type:de(Function)},disabledDate:{type:de(Function)},date:{type:de(Object),required:!0},minDate:{type:de(Object)},maxDate:{type:de(Object)},parsedValue:{type:de([Object,Array])},rangeState:{type:de(Object),default:()=>({endDate:null,selecting:!1})},disabled:Boolean}),YV=Ge({type:{type:de(String),required:!0,values:uJ},dateFormat:String,timeFormat:String,showNow:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:{type:Boolean,default:!0},showWeekNumber:Boolean,border:Boolean,disabled:Boolean,editable:{type:Boolean,default:!0}}),b8=Ge({unlinkPanels:Boolean,visible:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:{type:Boolean,default:!0},border:Boolean,disabled:Boolean,parsedValue:{type:de(Array)}}),w8=t=>({type:String,values:Ppe,default:t}),Ipe=Ge({...YV,parsedValue:{type:de([Object,Array])},visible:{type:Boolean,default:!0},format:{type:String,default:""}}),r1=t=>{if(!Ee(t))return!1;const[e,n]=t;return ft.isDayjs(e)&&ft.isDayjs(n)&&ft(e).isValid()&&ft(n).isValid()&&e.isSameOrBefore(n)},r2=(t,{lang:e,step:n=1,unit:i,unlinkPanels:s})=>{let o;if(Ee(t)){let[r,a]=t.map(l=>ft(l).locale(e));return s||(a=r.add(n,i)),[r,a]}else t?o=ft(t):o=ft();return o=o.locale(e),[o,o.add(n,i)]},Lpe=(t,e,{columnIndexOffset:n,startDate:i,nextEndDate:s,now:o,unit:r,relativeDateGetter:a,setCellMetadata:l,setRowMetadata:c})=>{for(let u=0;u<t.row;u++){const d=e[u];for(let h=0;h<t.column;h++){let f=d[h+n];f||(f={row:u,column:h,type:"normal",inRange:!1,start:!1,end:!1});const p=a(u*t.column+h);f.dayjs=p,f.date=p.toDate(),f.timestamp=p.valueOf(),f.type="normal",f.inRange=!!(i&&p.isSameOrAfter(i,r)&&s&&p.isSameOrBefore(s,r))||!!(i&&p.isSameOrBefore(i,r)&&s&&p.isSameOrAfter(s,r)),i!=null&&i.isSameOrAfter(s)?(f.start=!!s&&p.isSame(s,r),f.end=i&&p.isSame(i,r)):(f.start=!!i&&p.isSame(i,r),f.end=!!s&&p.isSame(s,r)),p.isSame(o,r)&&(f.type="today"),l==null||l(f,{rowIndex:u,columnIndex:h}),d[h+n]=f}c==null||c(d)}},A0=(t,e,n,i)=>{const s=ft().locale(i).startOf("month").month(n).year(e).hour(t.hour()).minute(t.minute()).second(t.second());return ZR(s.daysInMonth()).map(o=>s.add(o,"day").toDate())},Wf=(t,e,n,i,s)=>{const o=ft().year(e).month(n).startOf("month").hour(t.hour()).minute(t.minute()).second(t.second()),r=A0(t,e,n,i).find(a=>!(s!=null&&s(a)));return r?ft(r).locale(i):o.locale(i)},E0=(t,e,n)=>{const i=t.year();if(!(n!=null&&n(t.toDate())))return t.locale(e);const s=t.month();if(!A0(t,i,s,e).every(n))return Wf(t,i,s,e,n);for(let o=0;o<12;o++)if(!A0(t,i,o,e).every(n))return Wf(t,i,o,e,n);return t},Yf=(t,e,n,i)=>{if(Ee(t))return t.map(s=>Yf(s,e,n,i));if(Ke(t)){const s=i!=null&&i.value?ft(t):ft(t,e);if(!s.isValid())return s}return ft(t,e).locale(n)},Ope=Ge({...y8,showWeekNumber:Boolean,selectionMode:w8("date")}),Dpe=["changerange","pick","select"],M0=(t="")=>["normal","today"].includes(t),Rpe=(t,e)=>{const{lang:n}=en(),i=ee(),s=ee(),o=ee(),r=ee(),a=ee([[],[],[],[],[],[]]);let l=!1;const c=t.date.$locale().weekStart||7,u=t.date.locale("en").localeData().weekdaysShort().map(Z=>Z.toLowerCase()),d=W(()=>c>3?7-c:-c),h=W(()=>{const Z=t.date.startOf("month");return Z.subtract(Z.day()||7,"day")}),f=W(()=>u.concat(u).slice(c,c+7)),p=W(()=>g0(E(A)).some(Z=>Z.isCurrent)),m=W(()=>{const Z=t.date.startOf("month");return{startOfMonthDay:Z.day()||7,dateCountOfMonth:Z.daysInMonth(),dateCountOfLastMonth:Z.subtract(1,"month").daysInMonth()}}),b=W(()=>t.selectionMode==="dates"?ao(t.parsedValue):[]),w=(Z,{count:G,rowIndex:Q,columnIndex:ne})=>{const{startOfMonthDay:K,dateCountOfMonth:ae,dateCountOfLastMonth:ge}=E(m),Ce=E(d);if(Q>=0&&Q<=1){const oe=K+Ce<0?7+K+Ce:K+Ce;if(ne+Q*7>=oe)return Z.text=G,!0;Z.text=ge-(oe-ne%7)+1+Q*7,Z.type="prev-month"}else return G<=ae?Z.text=G:(Z.text=G-ae,Z.type="next-month"),!0;return!1},k=(Z,{columnIndex:G,rowIndex:Q},ne)=>{const{disabledDate:K,cellClassName:ae}=t,ge=E(b),Ce=w(Z,{count:ne,rowIndex:Q,columnIndex:G}),oe=Z.dayjs.toDate();return Z.selected=ge.find(pe=>pe.isSame(Z.dayjs,"day")),Z.isSelected=!!Z.selected,Z.isCurrent=M(Z),Z.disabled=K==null?void 0:K(oe),Z.customClass=ae==null?void 0:ae(oe),Ce},C=Z=>{if(t.selectionMode==="week"){const[G,Q]=t.showWeekNumber?[1,7]:[0,6],ne=X(Z[G+1]);Z[G].inRange=ne,Z[G].start=ne,Z[Q].inRange=ne,Z[Q].end=ne}},A=W(()=>{const{minDate:Z,maxDate:G,rangeState:Q,showWeekNumber:ne}=t,K=E(d),ae=E(a),ge="day";let Ce=1;if(Lpe({row:6,column:7},ae,{startDate:Z,columnIndexOffset:ne?1:0,nextEndDate:Q.endDate||G||Q.selecting&&Z||null,now:ft().locale(E(n)).startOf(ge),unit:ge,relativeDateGetter:oe=>E(h).add(oe-K,ge),setCellMetadata:(...oe)=>{k(...oe,Ce)&&(Ce+=1)},setRowMetadata:C}),ne)for(let oe=0;oe<6;oe++)ae[oe][1].dayjs&&(ae[oe][0]={type:"week",text:ae[oe][1].dayjs.week()});return ae});Te(()=>t.date,async()=>{var Z;(Z=E(i))!=null&&Z.contains(document.activeElement)&&(await ot(),await S())});const S=async()=>{var Z;return(Z=E(s))==null?void 0:Z.focus()},M=Z=>t.selectionMode==="date"&&M0(Z.type)&&P(Z,t.parsedValue),P=(Z,G)=>G?ft(G).locale(E(n)).isSame(t.date.date(Number(Z.text)),"day"):!1,T=(Z,G)=>{const Q=E(m).startOfMonthDay,ne=E(d),K=Q+ne<0?7+Q+ne:Q+ne,ae=Z*7+(G-(t.showWeekNumber?1:0));return t.date.startOf("month").subtract(K,"day").add(ae,"day")},I=Z=>{var K;if(!t.rangeState.selecting)return;let G=Z.target;if(G.tagName==="SPAN"&&(G=(K=G.parentNode)==null?void 0:K.parentNode),G.tagName==="DIV"&&(G=G.parentNode),G.tagName!=="TD")return;const Q=G.parentNode.rowIndex-1,ne=G.cellIndex;E(A)[Q][ne].disabled||(Q!==E(o)||ne!==E(r))&&(o.value=Q,r.value=ne,e("changerange",{selecting:!0,endDate:T(Q,ne)}))},L=Z=>!E(p)&&(Z==null?void 0:Z.text)===1&&M0(Z.type)||Z.isCurrent,R=Z=>{l||E(p)||t.selectionMode!=="date"||z(Z,!0)},V=Z=>{Z.target.closest("td")&&(l=!0)},H=Z=>{Z.target.closest("td")&&(l=!1)},F=Z=>{!t.rangeState.selecting||!t.minDate?(e("pick",{minDate:Z,maxDate:null}),e("select",!0)):(Z>=t.minDate?e("pick",{minDate:t.minDate,maxDate:Z}):e("pick",{minDate:Z,maxDate:t.minDate}),e("select",!1))},U=Z=>{const G=Z.week(),Q=`${Z.year()}w${G}`;e("pick",{year:Z.year(),week:G,value:Q,date:Z.startOf("week")})},Y=(Z,G)=>{e("pick",G?ao(t.parsedValue).filter(Q=>(Q==null?void 0:Q.valueOf())!==Z.valueOf()):ao(t.parsedValue).concat([Z]))},z=(Z,G=!1)=>{if(t.disabled)return;const Q=Z.target.closest("td");if(!Q)return;const ne=Q.parentNode.rowIndex-1,K=Q.cellIndex,ae=E(A)[ne][K];if(ae.disabled||ae.type==="week")return;const ge=T(ne,K);switch(t.selectionMode){case"range":F(ge);break;case"date":e("pick",ge,G);break;case"week":U(ge);break;case"dates":Y(ge,!!ae.selected);break}},X=Z=>{if(t.selectionMode!=="week")return!1;let G=t.date.startOf("day");if(Z.type==="prev-month"&&(G=G.subtract(1,"month")),Z.type==="next-month"&&(G=G.add(1,"month")),G=G.date(Number.parseInt(Z.text,10)),t.parsedValue&&!Ee(t.parsedValue)){const Q=(t.parsedValue.day()-c+7)%7-1;return t.parsedValue.subtract(Q,"day").isSame(G,"day")}return!1};return{WEEKS:f,rows:A,tbodyRef:i,currentCellRef:s,focus:S,isCurrent:M,isWeekActive:X,isSelectedCell:L,handlePickDate:z,handleMouseUp:H,handleMouseDown:V,handleMouseMove:I,handleFocus:R}},Vpe=(t,{isCurrent:e,isWeekActive:n})=>{const i=Be("date-table"),{t:s}=en(),o=W(()=>[i.b(),i.is("week-mode",t.selectionMode==="week"&&!t.disabled)]),r=W(()=>s("el.datepicker.dateTablePrompt")),a=c=>{const u=[];return M0(c.type)&&!c.disabled?(u.push("available"),c.type==="today"&&u.push("today")):u.push(c.type),e(c)&&u.push("current"),c.inRange&&(M0(c.type)||t.selectionMode==="week")&&(u.push("in-range"),c.start&&u.push("start-date"),c.end&&u.push("end-date")),(c.disabled||t.disabled)&&u.push("disabled"),c.selected&&u.push("selected"),c.customClass&&u.push(c.customClass),u.join(" ")},l=c=>[i.e("row"),{current:n(c)}];return{tableKls:o,tableLabel:r,weekHeaderClass:i.e("week-header"),getCellClasses:a,getRowKls:l,t:s}},Fpe=Ge({cell:{type:de(Object)}});var k8=fe({name:"ElDatePickerCell",props:Fpe,setup(t){const e=Be("date-table-cell"),{slots:n}=qe(_8);return()=>{const{cell:i}=t;return le(n,"default",{...i},()=>[_("div",{class:e.b()},[_("span",{class:e.e("text")},[(i==null?void 0:i.renderText)??(i==null?void 0:i.text)])])])}}});const Npe=["aria-label"],Bpe=["aria-label"],zpe=["aria-current","aria-selected","tabindex","aria-disabled"];var Hpe=fe({__name:"basic-date-table",props:Ope,emits:Dpe,setup(t,{expose:e,emit:n}){const i=t,{WEEKS:s,rows:o,tbodyRef:r,currentCellRef:a,focus:l,isCurrent:c,isWeekActive:u,isSelectedCell:d,handlePickDate:h,handleMouseUp:f,handleMouseDown:p,handleMouseMove:m,handleFocus:b}=Rpe(i,n),{tableLabel:w,tableKls:k,getCellClasses:C,getRowKls:A,weekHeaderClass:S,t:M}=Vpe(i,{isCurrent:c,isWeekActive:u});let P=!1;return wn(()=>{P=!0}),e({focus:l}),(T,I)=>(v(),$("table",{"aria-label":E(w),class:q(E(k)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:I[1]||(I[1]=(...L)=>E(h)&&E(h)(...L)),onMousemove:I[2]||(I[2]=(...L)=>E(m)&&E(m)(...L)),onMousedown:I[3]||(I[3]=(...L)=>E(p)&&E(p)(...L)),onMouseup:I[4]||(I[4]=(...L)=>E(f)&&E(f)(...L))},[g("tbody",{ref_key:"tbodyRef",ref:r},[g("tr",null,[T.showWeekNumber?(v(),$("th",{key:0,scope:"col",class:q(E(S))},null,2)):O("v-if",!0),(v(!0),$(J,null,ye(E(s),(L,R)=>(v(),$("th",{key:R,"aria-label":E(M)("el.datepicker.weeksFull."+L),scope:"col"},x(E(M)("el.datepicker.weeks."+L)),9,Bpe))),128))]),(v(!0),$(J,null,ye(E(o),(L,R)=>(v(),$("tr",{key:R,class:q(E(A)(T.showWeekNumber?L[2]:L[1]))},[(v(!0),$(J,null,ye(L,(V,H)=>(v(),$("td",{key:`${R}.${H}`,ref_for:!0,ref:F=>!E(P)&&E(d)(V)&&(a.value=F),class:q(E(C)(V)),"aria-current":V.isCurrent?"date":void 0,"aria-selected":V.isCurrent,tabindex:T.disabled?void 0:E(d)(V)?0:-1,"aria-disabled":T.disabled,onFocus:I[0]||(I[0]=(...F)=>E(b)&&E(b)(...F))},[_(E(k8),{cell:V},null,8,["cell"])],42,zpe))),128))],2))),128))],512)],42,Npe))}}),MC=Hpe;const Upe=Ge({...y8,selectionMode:w8("month")}),jpe=["aria-label"],Wpe=["aria-selected","aria-label","tabindex","onKeydown"];var Ype=fe({__name:"basic-month-table",props:Upe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const i=t,s=n,o=Be("month-table"),{t:r,lang:a}=en(),l=ee(),c=ee(),u=ee(i.date.locale("en").localeData().monthsShort().map(A=>A.toLowerCase())),d=ee([[],[],[]]),h=ee(),f=ee(),p=W(()=>{var M,P,T;const A=d.value,S=ft().locale(a.value).startOf("month");for(let I=0;I<3;I++){const L=A[I];for(let R=0;R<4;R++){const V=L[R]||(L[R]={row:I,column:R,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1,isSelected:!1,customClass:void 0,date:void 0,dayjs:void 0,isCurrent:void 0,selected:void 0,renderText:void 0,timestamp:void 0});V.type="normal";const H=I*4+R,F=i.date.startOf("year").month(H),U=i.rangeState.endDate||i.maxDate||i.rangeState.selecting&&i.minDate||null;V.inRange=!!(i.minDate&&F.isSameOrAfter(i.minDate,"month")&&U&&F.isSameOrBefore(U,"month"))||!!(i.minDate&&F.isSameOrBefore(i.minDate,"month")&&U&&F.isSameOrAfter(U,"month")),(M=i.minDate)!=null&&M.isSameOrAfter(U)?(V.start=!!(U&&F.isSame(U,"month")),V.end=i.minDate&&F.isSame(i.minDate,"month")):(V.start=!!(i.minDate&&F.isSame(i.minDate,"month")),V.end=!!(U&&F.isSame(U,"month"))),S.isSame(F)&&(V.type="today");const Y=F.toDate();V.text=H,V.disabled=((P=i.disabledDate)==null?void 0:P.call(i,Y))||!1,V.date=Y,V.customClass=(T=i.cellClassName)==null?void 0:T.call(i,Y),V.dayjs=F,V.timestamp=F.valueOf(),V.isSelected=w(V)}}return A}),m=()=>{var A;(A=c.value)==null||A.focus()},b=A=>{const S={},M=i.date.year(),P=new Date,T=A.text;return S.disabled=i.disabled||(i.disabledDate?A0(i.date,M,T,a.value).every(i.disabledDate):!1),S.current=ao(i.parsedValue).some(I=>ft.isDayjs(I)&&I.year()===M&&I.month()===T),S.today=P.getFullYear()===M&&P.getMonth()===T,A.customClass&&(S[A.customClass]=!0),A.inRange&&(S["in-range"]=!0,A.start&&(S["start-date"]=!0),A.end&&(S["end-date"]=!0)),S},w=A=>{const S=i.date.year(),M=A.text;return ao(i.date).some(P=>P.year()===S&&P.month()===M)},k=A=>{var T;if(!i.rangeState.selecting)return;let S=A.target;if(S.tagName==="SPAN"&&(S=(T=S.parentNode)==null?void 0:T.parentNode),S.tagName==="DIV"&&(S=S.parentNode),S.tagName!=="TD")return;const M=S.parentNode.rowIndex,P=S.cellIndex;p.value[M][P].disabled||(M!==h.value||P!==f.value)&&(h.value=M,f.value=P,s("changerange",{selecting:!0,endDate:i.date.startOf("year").month(M*4+P)}))},C=A=>{var I;if(i.disabled)return;const S=(I=A.target)==null?void 0:I.closest("td");if((S==null?void 0:S.tagName)!=="TD"||pl(S,"disabled"))return;const M=S.cellIndex,P=S.parentNode.rowIndex*4+M,T=i.date.startOf("year").month(P);if(i.selectionMode==="months"){if(A.type==="keydown"){s("pick",ao(i.parsedValue),!1);return}const L=Wf(i.date,i.date.year(),P,a.value,i.disabledDate);s("pick",pl(S,"current")?ao(i.parsedValue).filter(R=>(R==null?void 0:R.year())!==L.year()||(R==null?void 0:R.month())!==L.month()):ao(i.parsedValue).concat([ft(L)]))}else i.selectionMode==="range"?i.rangeState.selecting?(i.minDate&&T>=i.minDate?s("pick",{minDate:i.minDate,maxDate:T}):s("pick",{minDate:T,maxDate:i.minDate}),s("select",!1)):(s("pick",{minDate:T,maxDate:null}),s("select",!0)):s("pick",P)};return Te(()=>i.date,async()=>{var A,S;(A=l.value)!=null&&A.contains(document.activeElement)&&(await ot(),(S=c.value)==null||S.focus())}),e({focus:m}),(A,S)=>(v(),$("table",{role:"grid","aria-label":E(r)("el.datepicker.monthTablePrompt"),class:q(E(o).b()),onClick:C,onMousemove:k},[g("tbody",{ref_key:"tbodyRef",ref:l},[(v(!0),$(J,null,ye(p.value,(M,P)=>(v(),$("tr",{key:P},[(v(!0),$(J,null,ye(M,(T,I)=>(v(),$("td",{key:I,ref_for:!0,ref:L=>T.isSelected&&(c.value=L),class:q(b(T)),"aria-selected":!!T.isSelected,"aria-label":E(r)(`el.datepicker.month${+T.text+1}`),tabindex:T.isSelected?0:-1,onKeydown:[ut(Me(C,["prevent","stop"]),["space"]),ut(Me(C,["prevent","stop"]),["enter"])]},[_(E(k8),{cell:{...T,renderText:E(r)("el.datepicker.months."+u.value[T.text])}},null,8,["cell"])],42,Wpe))),128))]))),128))],512)],42,jpe))}}),a1=Ype;const qpe=Ge({...y8,selectionMode:w8("year")}),Gpe=["aria-label"],Xpe=["aria-selected","aria-label","tabindex","onKeydown"];var Kpe=fe({__name:"basic-year-table",props:qpe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const i=(S,M)=>{const P=ft(String(S)).locale(M).startOf("year");return ZR(P.endOf("year").dayOfYear()).map(T=>P.add(T,"day").toDate())},s=t,o=n,r=Be("year-table"),{t:a,lang:l}=en(),c=ee(),u=ee(),d=W(()=>Math.floor(s.date.year()/10)*10),h=ee([[],[],[]]),f=ee(),p=ee(),m=W(()=>{var P,T,I;const S=h.value,M=ft().locale(l.value).startOf("year");for(let L=0;L<3;L++){const R=S[L];for(let V=0;V<4&&!(L*4+V>=10);V++){let H=R[V];H||(H={row:L,column:V,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1,isSelected:!1,customClass:void 0,date:void 0,dayjs:void 0,isCurrent:void 0,selected:void 0,renderText:void 0,timestamp:void 0}),H.type="normal";const F=L*4+V+d.value,U=ft().year(F),Y=s.rangeState.endDate||s.maxDate||s.rangeState.selecting&&s.minDate||null;H.inRange=!!(s.minDate&&U.isSameOrAfter(s.minDate,"year")&&Y&&U.isSameOrBefore(Y,"year"))||!!(s.minDate&&U.isSameOrBefore(s.minDate,"year")&&Y&&U.isSameOrAfter(Y,"year")),(P=s.minDate)!=null&&P.isSameOrAfter(Y)?(H.start=!!(Y&&U.isSame(Y,"year")),H.end=!!(s.minDate&&U.isSame(s.minDate,"year"))):(H.start=!!(s.minDate&&U.isSame(s.minDate,"year")),H.end=!!(Y&&U.isSame(Y,"year"))),M.isSame(U)&&(H.type="today"),H.text=F;const z=U.toDate();H.disabled=((T=s.disabledDate)==null?void 0:T.call(s,z))||!1,H.date=z,H.customClass=(I=s.cellClassName)==null?void 0:I.call(s,z),H.dayjs=U,H.timestamp=U.valueOf(),H.isSelected=k(H),R[V]=H}}return S}),b=()=>{var S;(S=u.value)==null||S.focus()},w=S=>{const M={},P=ft().locale(l.value),T=S.text;return M.disabled=s.disabled||(s.disabledDate?i(T,l.value).every(s.disabledDate):!1),M.today=P.year()===T,M.current=ao(s.parsedValue).some(I=>I.year()===T),S.customClass&&(M[S.customClass]=!0),S.inRange&&(M["in-range"]=!0,S.start&&(M["start-date"]=!0),S.end&&(M["end-date"]=!0)),M},k=S=>{const M=S.text;return ao(s.date).some(P=>P.year()===M)},C=S=>{var L;if(s.disabled)return;const M=(L=S.target)==null?void 0:L.closest("td");if(!M||!M.textContent||pl(M,"disabled"))return;const P=M.cellIndex,T=M.parentNode.rowIndex*4+P+d.value,I=ft().year(T);if(s.selectionMode==="range")s.rangeState.selecting?(s.minDate&&I>=s.minDate?o("pick",{minDate:s.minDate,maxDate:I}):o("pick",{minDate:I,maxDate:s.minDate}),o("select",!1)):(o("pick",{minDate:I,maxDate:null}),o("select",!0));else if(s.selectionMode==="years"){if(S.type==="keydown"){o("pick",ao(s.parsedValue),!1);return}const R=E0(I.startOf("year"),l.value,s.disabledDate);o("pick",pl(M,"current")?ao(s.parsedValue).filter(V=>(V==null?void 0:V.year())!==T):ao(s.parsedValue).concat([R]))}else o("pick",T)},A=S=>{var I;if(!s.rangeState.selecting)return;const M=(I=S.target)==null?void 0:I.closest("td");if(!M)return;const P=M.parentNode.rowIndex,T=M.cellIndex;m.value[P][T].disabled||(P!==f.value||T!==p.value)&&(f.value=P,p.value=T,o("changerange",{selecting:!0,endDate:ft().year(d.value).add(P*4+T,"year")}))};return Te(()=>s.date,async()=>{var S,M;(S=c.value)!=null&&S.contains(document.activeElement)&&(await ot(),(M=u.value)==null||M.focus())}),e({focus:b}),(S,M)=>(v(),$("table",{role:"grid","aria-label":E(a)("el.datepicker.yearTablePrompt"),class:q(E(r).b()),onClick:C,onMousemove:A},[g("tbody",{ref_key:"tbodyRef",ref:c},[(v(!0),$(J,null,ye(m.value,(P,T)=>(v(),$("tr",{key:T},[(v(!0),$(J,null,ye(P,(I,L)=>(v(),$("td",{key:`${T}_${L}`,ref_for:!0,ref:R=>I.isSelected&&(u.value=R),class:q(["available",w(I)]),"aria-selected":I.isSelected,"aria-label":String(I.text),tabindex:I.isSelected?0:-1,onKeydown:[ut(Me(C,["prevent","stop"]),["space"]),ut(Me(C,["prevent","stop"]),["enter"])]},[_(E(k8),{cell:I},null,8,["cell"])],42,Xpe))),128))]))),128))],512)],42,Gpe))}}),l1=Kpe;const Zpe=["disabled","onClick"],Jpe=["aria-label","disabled"],Qpe=["aria-label","disabled"],eme=["tabindex","aria-disabled"],tme=["tabindex","aria-disabled"],nme=["aria-label","disabled"],sme=["aria-label","disabled"];var ime=fe({__name:"panel-date-pick",props:Ipe,emits:["pick","set-picker-option","panel-change"],setup(t,{emit:e}){const n=(_e,Oe,ue)=>!0,i=t,s=e,o=Be("picker-panel"),r=Be("date-picker"),a=Rd(),l=gi(),{t:c,lang:u}=en(),d=qe(Oa),h=qe(Z1,void 0),{shortcuts:f,disabledDate:p,cellClassName:m,defaultTime:b}=d.props,w=Sn(d.props,"defaultValue"),k=ee(),C=ee(ft().locale(u.value)),A=ee(!1);let S=!1;const M=W(()=>ft(b).locale(u.value)),P=W(()=>C.value.month()),T=W(()=>C.value.year()),I=ee([]),L=ee(null),R=ee(null),V=_e=>I.value.length>0?n(_e,I.value,i.format||"HH:mm:ss"):!0,H=_e=>b&&!Le.value&&!A.value&&!S?M.value.year(_e.year()).month(_e.month()).date(_e.date()):ie.value?_e.millisecond(0):_e.startOf("day"),F=(_e,...Oe)=>{_e?Ee(_e)?s("pick",_e.map(H),...Oe):s("pick",H(_e),...Oe):s("pick",_e,...Oe),L.value=null,R.value=null,A.value=!1,S=!1},U=async(_e,Oe)=>{if(Q.value==="date"&&ft.isDayjs(_e)){const ue=Zp(i.parsedValue);let De=ue?ue.year(_e.year()).month(_e.month()).date(_e.date()):_e;V(De)||(De=I.value[0][0].year(_e.year()).month(_e.month()).date(_e.date())),C.value=De,F(De,ie.value||Oe)}else Q.value==="week"?F(_e.date):Q.value==="dates"&&F(_e,!0)},Y=_e=>{const Oe=_e?"add":"subtract";C.value=C.value[Oe](1,"month"),mt("month")},z=_e=>{const Oe=C.value,ue=_e?"add":"subtract";C.value=X.value==="year"?Oe[ue](10,"year"):Oe[ue](1,"year"),mt("year")},X=ee("date"),Z=W(()=>{const _e=c("el.datepicker.year");if(X.value==="year"){const Oe=Math.floor(T.value/10)*10;return _e?`${Oe} ${_e} - ${Oe+9} ${_e}`:`${Oe} - ${Oe+9}`}return`${T.value} ${_e}`}),G=_e=>{const Oe=et(_e.value)?_e.value():_e.value;if(Oe){S=!0,F(ft(Oe).locale(u.value));return}_e.onClick&&_e.onClick({attrs:a,slots:l,emit:s})},Q=W(()=>{const{type:_e}=i;return["week","month","months","year","years","dates"].includes(_e)?_e:"date"}),ne=W(()=>Q.value==="dates"||Q.value==="months"||Q.value==="years"),K=W(()=>Q.value==="date"?X.value:Q.value),ae=W(()=>!!f.length),ge=async(_e,Oe)=>{Q.value==="month"?(C.value=Wf(C.value,C.value.year(),_e,u.value,p),F(C.value,!1)):Q.value==="months"?F(_e,Oe??!0):(C.value=Wf(C.value,C.value.year(),_e,u.value,p),X.value="date",["month","year","date","week"].includes(Q.value)&&(F(C.value,!0),await ot(),_t())),mt("month")},Ce=async(_e,Oe)=>{Q.value==="year"?(C.value=E0(C.value.startOf("year").year(_e),u.value,p),F(C.value,!1)):Q.value==="years"?F(_e,Oe??!0):(C.value=E0(C.value.year(_e),u.value,p),X.value="month",["month","year","date","week"].includes(Q.value)&&(F(C.value,!0),await ot(),_t())),mt("year")},oe=bs(),pe=async _e=>{oe.value||(X.value=_e,await ot(),_t())},ie=W(()=>i.type==="datetime"||i.type==="datetimerange"),re=W(()=>{const _e=ie.value||Q.value==="dates",Oe=Q.value==="years",ue=Q.value==="months",De=X.value==="date",gt=X.value==="year",bn=X.value==="month";return _e&&De||Oe&&gt||ue&&bn}),ke=W(()=>!ne.value&&i.showNow||i.showConfirm),je=W(()=>p?i.parsedValue?Ee(i.parsedValue)?p(i.parsedValue[0].toDate()):p(i.parsedValue.toDate()):!0:!1),te=()=>{if(ne.value)F(i.parsedValue);else{let _e=Zp(i.parsedValue);if(!_e){const Oe=ft(b).locale(u.value),ue=Ie();_e=Oe.year(ue.year()).month(ue.month()).date(ue.date())}C.value=_e,F(_e)}},se=W(()=>p?p(ft().locale(u.value).toDate()):!1),me=()=>{const _e=ft().locale(u.value).toDate();A.value=!0,(!p||!p(_e))&&V(_e)&&(C.value=ft().locale(u.value),F(C.value))},$e=W(()=>i.timeFormat||QR(i.format)||n1),Se=W(()=>i.dateFormat||JR(i.format)||mc),Le=W(()=>{if(R.value)return R.value;if(!(!i.parsedValue&&!w.value))return(Zp(i.parsedValue)||C.value).format($e.value)}),We=W(()=>{if(L.value)return L.value;if(!(!i.parsedValue&&!w.value))return(Zp(i.parsedValue)||C.value).format(Se.value)}),Fe=ee(!1),He=()=>{Fe.value=!0},Ae=()=>{Fe.value=!1},Ze=_e=>({hour:_e.hour(),minute:_e.minute(),second:_e.second(),year:_e.year(),month:_e.month(),date:_e.date()}),Ye=(_e,Oe,ue)=>{const{hour:De,minute:gt,second:bn}=Ze(_e),gs=Zp(i.parsedValue);C.value=gs?gs.hour(De).minute(gt).second(bn):_e,F(C.value,!0),ue||(Fe.value=Oe)},it=_e=>{const Oe=ft(_e,$e.value).locale(u.value);if(Oe.isValid()&&V(Oe)){const{year:ue,month:De,date:gt}=Ze(C.value);C.value=Oe.year(ue).month(De).date(gt),R.value=null,Fe.value=!1,F(C.value,!0)}},be=_e=>{const Oe=Yf(_e,Se.value,u.value,h);if(Oe.isValid()){if(p&&p(Oe.toDate()))return;const{hour:ue,minute:De,second:gt}=Ze(C.value);C.value=Oe.hour(ue).minute(De).second(gt),L.value=null,F(C.value,!0)}},ve=_e=>ft.isDayjs(_e)&&_e.isValid()&&(p?!p(_e.toDate()):!0),Pe=_e=>Yf(_e,i.format,u.value,h),Ie=()=>{const _e=ft(w.value).locale(u.value);if(!w.value){const Oe=M.value;return ft().hour(Oe.hour()).minute(Oe.minute()).second(Oe.second()).locale(u.value)}return _e},_t=()=>{var _e;["week","month","year","date"].includes(Q.value)&&((_e=k.value)==null||_e.focus())},Lt=()=>{_t(),Q.value==="week"&&dt(Ue.down)},Je=_e=>{const Oe=ls(_e);[Ue.up,Ue.down,Ue.left,Ue.right,Ue.home,Ue.end,Ue.pageUp,Ue.pageDown].includes(Oe)&&(dt(Oe),_e.stopPropagation(),_e.preventDefault()),[Ue.enter,Ue.space,Ue.numpadEnter].includes(Oe)&&L.value===null&&R.value===null&&(_e.preventDefault(),F(C.value,!1))},dt=_e=>{const{up:Oe,down:ue,left:De,right:gt,home:bn,end:gs,pageUp:hu,pageDown:Bp}=Ue,Vl={year:{[Oe]:-4,[ue]:4,[De]:-1,[gt]:1,offset:($n,Di)=>$n.setFullYear($n.getFullYear()+Di)},month:{[Oe]:-4,[ue]:4,[De]:-1,[gt]:1,offset:($n,Di)=>$n.setMonth($n.getMonth()+Di)},week:{[Oe]:-1,[ue]:1,[De]:-1,[gt]:1,offset:($n,Di)=>$n.setDate($n.getDate()+Di*7)},date:{[Oe]:-7,[ue]:7,[De]:-1,[gt]:1,[bn]:$n=>-$n.getDay(),[gs]:$n=>-$n.getDay()+6,[hu]:$n=>-new Date($n.getFullYear(),$n.getMonth(),0).getDate(),[Bp]:$n=>new Date($n.getFullYear(),$n.getMonth()+1,0).getDate(),offset:($n,Di)=>$n.setDate($n.getDate()+Di)}},da=C.value.toDate();for(;Math.abs(C.value.diff(da,"year",!0))<1;){const $n=Vl[K.value];if(!$n)return;if($n.offset(da,et($n[_e])?$n[_e](da):$n[_e]??0),p&&p(da))break;const Di=ft(da).locale(u.value);C.value=Di,s("pick",Di,!0);break}},mt=_e=>{s("panel-change",C.value.toDate(),_e,X.value)};return Te(()=>Q.value,_e=>{if(["month","year"].includes(_e)){X.value=_e;return}else if(_e==="years"){X.value="year";return}else if(_e==="months"){X.value="month";return}X.value="date"},{immediate:!0}),Te(()=>w.value,_e=>{_e&&(C.value=Ie())},{immediate:!0}),Te(()=>i.parsedValue,_e=>{if(_e){if(ne.value||Ee(_e))return;C.value=_e}else C.value=Ie()},{immediate:!0}),s("set-picker-option",["isValidValue",ve]),s("set-picker-option",["parseUserInput",Pe]),s("set-picker-option",["handleFocusPicker",Lt]),(_e,Oe)=>(v(),$("div",{class:q([E(o).b(),E(r).b(),E(o).is("border",_e.border),E(o).is("disabled",E(oe)),{"has-sidebar":_e.$slots.sidebar||ae.value,"has-time":ie.value}])},[g("div",{class:q(E(o).e("body-wrapper"))},[le(_e.$slots,"sidebar",{class:q(E(o).e("sidebar"))}),ae.value?(v(),$("div",{key:0,class:q(E(o).e("sidebar"))},[(v(!0),$(J,null,ye(E(f),(ue,De)=>(v(),$("button",{key:De,type:"button",disabled:E(oe),class:q(E(o).e("shortcut")),onClick:gt=>G(ue)},x(ue.text),11,Zpe))),128))],2)):O("v-if",!0),g("div",{class:q(E(o).e("body"))},[ie.value?(v(),$("div",{key:0,class:q(E(r).e("time-header"))},[g("span",{class:q(E(r).e("editor-wrap"))},[_(E(ht),{placeholder:E(c)("el.datepicker.selectDate"),"model-value":We.value,size:"small","validate-event":!1,disabled:E(oe),readonly:!_e.editable,onInput:Oe[0]||(Oe[0]=ue=>L.value=ue),onChange:be},null,8,["placeholder","model-value","disabled","readonly"])],2),Re((v(),$("span",{class:q(E(r).e("editor-wrap"))},[_(E(ht),{placeholder:E(c)("el.datepicker.selectTime"),"model-value":Le.value,size:"small","validate-event":!1,disabled:E(oe),readonly:!_e.editable,onFocus:He,onInput:Oe[1]||(Oe[1]=ue=>R.value=ue),onChange:it},null,8,["placeholder","model-value","disabled","readonly"]),_(E(SC),{visible:Fe.value,format:$e.value,"parsed-value":C.value,onPick:Ye},null,8,["visible","format","parsed-value"])],2)),[[E(s1),Ae]])],2)):O("v-if",!0),Re(g("div",{class:q([E(r).e("header"),(X.value==="year"||X.value==="month")&&E(r).em("header","bordered")])},[g("span",{class:q(E(r).e("prev-btn"))},[g("button",{type:"button","aria-label":E(c)("el.datepicker.prevYear"),class:q(["d-arrow-left",E(o).e("icon-btn")]),disabled:E(oe),onClick:Oe[2]||(Oe[2]=ue=>z(!1))},[le(_e.$slots,"prev-year",{},()=>[_(E(we),null,{default:y(()=>[_(E(zc))]),_:1})])],10,Jpe),Re(g("button",{type:"button","aria-label":E(c)("el.datepicker.prevMonth"),class:q([E(o).e("icon-btn"),"arrow-left"]),disabled:E(oe),onClick:Oe[3]||(Oe[3]=ue=>Y(!1))},[le(_e.$slots,"prev-month",{},()=>[_(E(we),null,{default:y(()=>[_(E(wd))]),_:1})])],10,Qpe),[[jt,X.value==="date"]])],2),g("span",{role:"button",class:q(E(r).e("header-label")),"aria-live":"polite",tabindex:_e.disabled?void 0:0,"aria-disabled":_e.disabled,onKeydown:Oe[4]||(Oe[4]=ut(ue=>pe("year"),["enter"])),onClick:Oe[5]||(Oe[5]=ue=>pe("year"))},x(Z.value),43,eme),Re(g("span",{role:"button","aria-live":"polite",tabindex:_e.disabled?void 0:0,"aria-disabled":_e.disabled,class:q([E(r).e("header-label"),{active:X.value==="month"}]),onKeydown:Oe[6]||(Oe[6]=ut(ue=>pe("month"),["enter"])),onClick:Oe[7]||(Oe[7]=ue=>pe("month"))},x(E(c)(`el.datepicker.month${P.value+1}`)),43,tme),[[jt,X.value==="date"]]),g("span",{class:q(E(r).e("next-btn"))},[Re(g("button",{type:"button","aria-label":E(c)("el.datepicker.nextMonth"),class:q([E(o).e("icon-btn"),"arrow-right"]),disabled:E(oe),onClick:Oe[8]||(Oe[8]=ue=>Y(!0))},[le(_e.$slots,"next-month",{},()=>[_(E(we),null,{default:y(()=>[_(E(jr))]),_:1})])],10,nme),[[jt,X.value==="date"]]),g("button",{type:"button","aria-label":E(c)("el.datepicker.nextYear"),class:q([E(o).e("icon-btn"),"d-arrow-right"]),disabled:E(oe),onClick:Oe[9]||(Oe[9]=ue=>z(!0))},[le(_e.$slots,"next-year",{},()=>[_(E(we),null,{default:y(()=>[_(E(Hc))]),_:1})])],10,sme)],2)],2),[[jt,X.value!=="time"]]),g("div",{class:q(E(o).e("content")),onKeydown:Je},[X.value==="date"?(v(),D(MC,{key:0,ref_key:"currentViewRef",ref:k,"selection-mode":Q.value,date:C.value,"parsed-value":_e.parsedValue,"disabled-date":E(p),disabled:E(oe),"cell-class-name":E(m),"show-week-number":_e.showWeekNumber,onPick:U},null,8,["selection-mode","date","parsed-value","disabled-date","disabled","cell-class-name","show-week-number"])):O("v-if",!0),X.value==="year"?(v(),D(l1,{key:1,ref_key:"currentViewRef",ref:k,"selection-mode":Q.value,date:C.value,"disabled-date":E(p),disabled:E(oe),"parsed-value":_e.parsedValue,"cell-class-name":E(m),onPick:Ce},null,8,["selection-mode","date","disabled-date","disabled","parsed-value","cell-class-name"])):O("v-if",!0),X.value==="month"?(v(),D(a1,{key:2,ref_key:"currentViewRef",ref:k,"selection-mode":Q.value,date:C.value,"parsed-value":_e.parsedValue,"disabled-date":E(p),disabled:E(oe),"cell-class-name":E(m),onPick:ge},null,8,["selection-mode","date","parsed-value","disabled-date","disabled","cell-class-name"])):O("v-if",!0)],34)],2)],2),_e.showFooter&&re.value&&ke.value?(v(),$("div",{key:0,class:q(E(o).e("footer"))},[Re(_(E(ze),{text:"",size:"small",class:q(E(o).e("link-btn")),disabled:se.value,onClick:me},{default:y(()=>[N(x(E(c)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[jt,!ne.value&&_e.showNow]]),_e.showConfirm?(v(),D(E(ze),{key:0,plain:"",size:"small",class:q(E(o).e("link-btn")),disabled:je.value,onClick:te},{default:y(()=>[N(x(E(c)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])):O("v-if",!0)],2)):O("v-if",!0)],2))}}),ome=ime;const rme=Ge({...YV,...b8}),ame=t=>{const{emit:e}=pt(),n=Rd(),i=gi();return o=>{const r=et(o.value)?o.value():o.value;if(r){e("pick",[ft(r[0]).locale(t.value),ft(r[1]).locale(t.value)]);return}o.onClick&&o.onClick({attrs:n,slots:i,emit:e})}},C8=(t,{defaultValue:e,defaultTime:n,leftDate:i,rightDate:s,step:o,unit:r,sortDates:a})=>{const{emit:l}=pt(),{pickerNs:c}=qe(_8),u=Be("date-range-picker"),{t:d,lang:h}=en(),f=ame(h),p=ee(),m=ee(),b=ee({endDate:null,selecting:!1}),w=M=>{b.value=M},k=(M=!1)=>{const P=E(p),T=E(m);r1([P,T])&&l("pick",[P,T],M)},C=M=>{b.value.selecting=M,M||(b.value.endDate=null)},A=M=>{if(Ee(M)&&M.length===2){const[P,T]=M;p.value=P,i.value=P,m.value=T,a(E(p),E(m))}else S()},S=()=>{let[M,P]=r2(E(e),{lang:E(h),step:o,unit:r,unlinkPanels:t.unlinkPanels});const T=L=>L.diff(L.startOf("d"),"ms"),I=E(n);if(I){let L=0,R=0;if(Ee(I)){const[V,H]=I.map(ft);L=T(V),R=T(H)}else{const V=T(ft(I));L=V,R=V}M=M.startOf("d").add(L,"ms"),P=P.startOf("d").add(R,"ms")}p.value=void 0,m.value=void 0,i.value=M,s.value=P};return Te(e,M=>{M&&S()},{immediate:!0}),Te(()=>t.parsedValue,M=>{(!(M!=null&&M.length)||!Wi(M,[p.value,m.value]))&&A(M)},{immediate:!0}),Te(()=>t.visible,()=>{t.visible&&A(t.parsedValue)},{immediate:!0}),{minDate:p,maxDate:m,rangeState:b,lang:h,ppNs:c,drpNs:u,handleChangeRange:w,handleRangeConfirm:k,handleShortcutClick:f,onSelect:C,parseValue:A,t:d}},lme=(t,e,n,i)=>{const s=ee("date"),o=ee(),r=ee("date"),a=ee(),{disabledDate:l}=qe(Oa).props,{t:c,lang:u}=en(),d=W(()=>n.value.year()),h=W(()=>n.value.month()),f=W(()=>i.value.year()),p=W(()=>i.value.month());function m(S,M){const P=c("el.datepicker.year");if(S.value==="year"){const T=Math.floor(M.value/10)*10;return P?`${T} ${P} - ${T+9} ${P}`:`${T} - ${T+9}`}return`${M.value} ${P}`}function b(S){S==null||S.focus()}async function w(S,M){if(t.disabled)return;const P=S==="left"?s:r,T=S==="left"?o:a;P.value=M,await ot(),b(T.value)}async function k(S,M,P){if(t.disabled)return;const T=M==="left",I=T?n:i,L=T?i:n,R=T?s:r,V=T?o:a;S==="year"&&(I.value=E0(I.value.year(P),u.value,l)),S==="month"&&(I.value=Wf(I.value,I.value.year(),P,u.value,l)),t.unlinkPanels||(L.value=M==="left"?I.value.add(1,"month"):I.value.subtract(1,"month")),R.value=S==="year"?"month":"date",await ot(),b(V.value),C(S)}function C(S){e("panel-change",[n.value.toDate(),i.value.toDate()],S)}function A(S,M,P){const T=P?"add":"subtract";return S==="year"?M[T](10,"year"):M[T](1,"year")}return{leftCurrentView:s,rightCurrentView:r,leftCurrentViewRef:o,rightCurrentViewRef:a,leftYear:d,rightYear:f,leftMonth:h,rightMonth:p,leftYearLabel:W(()=>m(s,d)),rightYearLabel:W(()=>m(r,f)),showLeftPicker:S=>w("left",S),showRightPicker:S=>w("right",S),handleLeftYearPick:S=>k("year","left",S),handleRightYearPick:S=>k("year","right",S),handleLeftMonthPick:S=>k("month","left",S),handleRightMonthPick:S=>k("month","right",S),handlePanelChange:C,adjustDateByView:A}},cme=["disabled","onClick"],ume=["aria-label","disabled"],dme=["aria-label","disabled"],hme=["disabled","aria-label"],fme=["disabled","aria-label"],pme=["tabindex","aria-disabled"],mme=["tabindex","aria-disabled"],gme=["disabled","aria-label"],vme=["disabled","aria-label"],_me=["aria-label","disabled"],yme=["disabled","aria-label"],bme=["tabindex","aria-disabled"],wme=["tabindex","aria-disabled"],a_="month";var kme=fe({__name:"panel-date-range",props:rme,emits:["pick","set-picker-option","calendar-change","panel-change","clear"],setup(t,{emit:e}){const n=t,i=e,s=qe(Oa),o=qe(Z1,void 0),{disabledDate:r,cellClassName:a,defaultTime:l,clearable:c}=s.props,u=Sn(s.props,"format"),d=Sn(s.props,"shortcuts"),h=Sn(s.props,"defaultValue"),{lang:f}=en(),p=ee(ft().locale(f.value)),m=ee(ft().locale(f.value).add(1,a_)),{minDate:b,maxDate:w,rangeState:k,ppNs:C,drpNs:A,handleChangeRange:S,handleRangeConfirm:M,handleShortcutClick:P,onSelect:T,parseValue:I,t:L}=C8(n,{defaultValue:h,defaultTime:l,leftDate:p,rightDate:m,unit:a_,sortDates:Di});Te(()=>n.visible,nt=>{!nt&&k.value.selecting&&(I(n.parsedValue),T(!1))});const R=ee({min:null,max:null}),V=ee({min:null,max:null}),{leftCurrentView:H,rightCurrentView:F,leftCurrentViewRef:U,rightCurrentViewRef:Y,leftYear:z,rightYear:X,leftMonth:Z,rightMonth:G,leftYearLabel:Q,rightYearLabel:ne,showLeftPicker:K,showRightPicker:ae,handleLeftYearPick:ge,handleRightYearPick:Ce,handleLeftMonthPick:oe,handleRightMonthPick:pe,handlePanelChange:ie,adjustDateByView:re}=lme(n,i,p,m),ke=W(()=>!!d.value.length),je=W(()=>R.value.min!==null?R.value.min:b.value?b.value.format(Se.value):""),te=W(()=>R.value.max!==null?R.value.max:w.value||b.value?(w.value||b.value).format(Se.value):""),se=W(()=>V.value.min!==null?V.value.min:b.value?b.value.format($e.value):""),me=W(()=>V.value.max!==null?V.value.max:w.value||b.value?(w.value||b.value).format($e.value):""),$e=W(()=>n.timeFormat||QR(u.value||"")||n1),Se=W(()=>n.dateFormat||JR(u.value||"")||mc),Le=nt=>r1(nt)&&(r?!r(nt[0].toDate())&&!r(nt[1].toDate()):!0),We=()=>{p.value=re(H.value,p.value,!1),n.unlinkPanels||(m.value=p.value.add(1,"month")),ie("year")},Fe=()=>{p.value=p.value.subtract(1,"month"),n.unlinkPanels||(m.value=p.value.add(1,"month")),ie("month")},He=()=>{n.unlinkPanels?m.value=re(F.value,m.value,!0):(p.value=re(F.value,p.value,!0),m.value=p.value.add(1,"month")),ie("year")},Ae=()=>{n.unlinkPanels?m.value=m.value.add(1,"month"):(p.value=p.value.add(1,"month"),m.value=p.value.add(1,"month")),ie("month")},Ze=()=>{p.value=re(H.value,p.value,!0),ie("year")},Ye=()=>{p.value=p.value.add(1,"month"),ie("month")},it=()=>{m.value=re(F.value,m.value,!1),ie("year")},be=()=>{m.value=m.value.subtract(1,"month"),ie("month")},ve=W(()=>{const nt=(Z.value+1)%12,at=Z.value+1>=12?1:0;return n.unlinkPanels&&new Date(z.value+at,nt)<new Date(X.value,G.value)}),Pe=W(()=>n.unlinkPanels&&X.value*12+G.value-(z.value*12+Z.value+1)>=12),Ie=bs(),_t=W(()=>!(b.value&&w.value&&!k.value.selecting&&r1([b.value,w.value])&&!Ie.value)),Lt=W(()=>n.type==="datetime"||n.type==="datetimerange"),Je=(nt,at)=>{if(nt)return l?ft(l[at]||l).locale(f.value).year(nt.year()).month(nt.month()).date(nt.date()):nt},dt=(nt,at=!0)=>{const vt=nt.minDate,Ko=nt.maxDate,Fl=Je(vt,0),fu=Je(Ko,1);w.value===fu&&b.value===Fl||(i("calendar-change",[vt.toDate(),Ko&&Ko.toDate()]),w.value=fu,b.value=Fl,!Lt.value&&at&&(at=!Fl||!fu),M(at))},mt=ee(!1),_e=ee(!1),Oe=()=>{mt.value=!1},ue=()=>{_e.value=!1},De=(nt,at)=>{R.value[at]=nt;const vt=ft(nt,Se.value).locale(f.value);if(vt.isValid()){if(r&&r(vt.toDate()))return;at==="min"?(p.value=vt,b.value=(b.value||p.value).year(vt.year()).month(vt.month()).date(vt.date()),!n.unlinkPanels&&(!w.value||w.value.isBefore(b.value))&&(m.value=vt.add(1,"month"),w.value=b.value.add(1,"month"))):(m.value=vt,w.value=(w.value||m.value).year(vt.year()).month(vt.month()).date(vt.date()),!n.unlinkPanels&&(!b.value||b.value.isAfter(w.value))&&(p.value=vt.subtract(1,"month"),b.value=w.value.subtract(1,"month"))),Di(b.value,w.value),M(!0)}},gt=(nt,at)=>{R.value[at]=null},bn=(nt,at)=>{V.value[at]=nt;const vt=ft(nt,$e.value).locale(f.value);vt.isValid()&&(at==="min"?(mt.value=!0,b.value=(b.value||p.value).hour(vt.hour()).minute(vt.minute()).second(vt.second()),p.value=b.value):(_e.value=!0,w.value=(w.value||m.value).hour(vt.hour()).minute(vt.minute()).second(vt.second()),m.value=w.value))},gs=(nt,at)=>{V.value[at]=null,at==="min"?(p.value=b.value,mt.value=!1,(!w.value||w.value.isBefore(b.value))&&(w.value=b.value)):(m.value=w.value,_e.value=!1,w.value&&w.value.isBefore(b.value)&&(b.value=w.value)),M(!0)},hu=(nt,at,vt)=>{V.value.min||(nt&&(b.value=(b.value||p.value).hour(nt.hour()).minute(nt.minute()).second(nt.second())),vt||(mt.value=at),(!w.value||w.value.isBefore(b.value))&&(w.value=b.value,m.value=nt,ot(()=>{I(n.parsedValue)})),M(!0))},Bp=(nt,at,vt)=>{V.value.max||(nt&&(w.value=(w.value||m.value).hour(nt.hour()).minute(nt.minute()).second(nt.second())),vt||(_e.value=at),w.value&&w.value.isBefore(b.value)&&(b.value=w.value),M(!0))},Vl=()=>{da(),i("clear")},da=()=>{let nt=null;s!=null&&s.emptyValues&&(nt=s.emptyValues.valueOnClear.value),p.value=r2(E(h),{lang:E(f),unit:"month",unlinkPanels:n.unlinkPanels})[0],m.value=p.value.add(1,"month"),w.value=void 0,b.value=void 0,M(!0),i("pick",nt)},$n=nt=>Yf(nt,u.value||"",f.value,o);function Di(nt,at){if(n.unlinkPanels&&at){const vt=(nt==null?void 0:nt.year())||0,Ko=(nt==null?void 0:nt.month())||0,Fl=at.year(),fu=at.month();m.value=vt===Fl&&Ko===fu?at.add(1,a_):at}else m.value=p.value.add(1,a_),at&&(m.value=m.value.hour(at.hour()).minute(at.minute()).second(at.second()))}return i("set-picker-option",["isValidValue",Le]),i("set-picker-option",["parseUserInput",$n]),i("set-picker-option",["handleClear",da]),(nt,at)=>(v(),$("div",{class:q([E(C).b(),E(A).b(),E(C).is("border",nt.border),E(C).is("disabled",E(Ie)),{"has-sidebar":nt.$slots.sidebar||ke.value,"has-time":Lt.value}])},[g("div",{class:q(E(C).e("body-wrapper"))},[le(nt.$slots,"sidebar",{class:q(E(C).e("sidebar"))}),ke.value?(v(),$("div",{key:0,class:q(E(C).e("sidebar"))},[(v(!0),$(J,null,ye(d.value,(vt,Ko)=>(v(),$("button",{key:Ko,type:"button",disabled:E(Ie),class:q(E(C).e("shortcut")),onClick:Fl=>E(P)(vt)},x(vt.text),11,cme))),128))],2)):O("v-if",!0),g("div",{class:q(E(C).e("body"))},[Lt.value?(v(),$("div",{key:0,class:q(E(A).e("time-header"))},[g("span",{class:q(E(A).e("editors-wrap"))},[g("span",{class:q(E(A).e("time-picker-wrap"))},[_(E(ht),{size:"small",disabled:E(k).selecting||E(Ie),placeholder:E(L)("el.datepicker.startDate"),class:q(E(A).e("editor")),"model-value":je.value,"validate-event":!1,readonly:!nt.editable,onInput:at[0]||(at[0]=vt=>De(vt,"min")),onChange:at[1]||(at[1]=vt=>gt(vt,"min"))},null,8,["disabled","placeholder","class","model-value","readonly"])],2),Re((v(),$("span",{class:q(E(A).e("time-picker-wrap"))},[_(E(ht),{size:"small",class:q(E(A).e("editor")),disabled:E(k).selecting||E(Ie),placeholder:E(L)("el.datepicker.startTime"),"model-value":se.value,"validate-event":!1,readonly:!nt.editable,onFocus:at[2]||(at[2]=vt=>mt.value=!0),onInput:at[3]||(at[3]=vt=>bn(vt,"min")),onChange:at[4]||(at[4]=vt=>gs(vt,"min"))},null,8,["class","disabled","placeholder","model-value","readonly"]),_(E(SC),{visible:mt.value,format:$e.value,"datetime-role":"start","parsed-value":E(b)||p.value,onPick:hu},null,8,["visible","format","parsed-value"])],2)),[[E(s1),Oe]])],2),g("span",null,[_(E(we),null,{default:y(()=>[_(E(jr))]),_:1})]),g("span",{class:q([E(A).e("editors-wrap"),"is-right"])},[g("span",{class:q(E(A).e("time-picker-wrap"))},[_(E(ht),{size:"small",class:q(E(A).e("editor")),disabled:E(k).selecting||E(Ie),placeholder:E(L)("el.datepicker.endDate"),"model-value":te.value,readonly:!E(b)||!nt.editable,"validate-event":!1,onInput:at[5]||(at[5]=vt=>De(vt,"max")),onChange:at[6]||(at[6]=vt=>gt(vt,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"])],2),Re((v(),$("span",{class:q(E(A).e("time-picker-wrap"))},[_(E(ht),{size:"small",class:q(E(A).e("editor")),disabled:E(k).selecting||E(Ie),placeholder:E(L)("el.datepicker.endTime"),"model-value":me.value,readonly:!E(b)||!nt.editable,"validate-event":!1,onFocus:at[7]||(at[7]=vt=>E(b)&&(_e.value=!0)),onInput:at[8]||(at[8]=vt=>bn(vt,"max")),onChange:at[9]||(at[9]=vt=>gs(vt,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"]),_(E(SC),{"datetime-role":"end",visible:_e.value,format:$e.value,"parsed-value":E(w)||m.value,onPick:Bp},null,8,["visible","format","parsed-value"])],2)),[[E(s1),ue]])],2)],2)):O("v-if",!0),g("div",{class:q([[E(C).e("content"),E(A).e("content")],"is-left"])},[g("div",{class:q(E(A).e("header"))},[g("button",{type:"button",class:q([E(C).e("icon-btn"),"d-arrow-left"]),"aria-label":E(L)("el.datepicker.prevYear"),disabled:E(Ie),onClick:We},[le(nt.$slots,"prev-year",{},()=>[_(E(we),null,{default:y(()=>[_(E(zc))]),_:1})])],10,ume),Re(g("button",{type:"button",class:q([E(C).e("icon-btn"),"arrow-left"]),"aria-label":E(L)("el.datepicker.prevMonth"),disabled:E(Ie),onClick:Fe},[le(nt.$slots,"prev-month",{},()=>[_(E(we),null,{default:y(()=>[_(E(wd))]),_:1})])],10,dme),[[jt,E(H)==="date"]]),nt.unlinkPanels?(v(),$("button",{key:0,type:"button",disabled:!Pe.value||E(Ie),class:q([[E(C).e("icon-btn"),E(C).is("disabled",!Pe.value||E(Ie))],"d-arrow-right"]),"aria-label":E(L)("el.datepicker.nextYear"),onClick:Ze},[le(nt.$slots,"next-year",{},()=>[_(E(we),null,{default:y(()=>[_(E(Hc))]),_:1})])],10,hme)):O("v-if",!0),nt.unlinkPanels&&E(H)==="date"?(v(),$("button",{key:1,type:"button",disabled:!ve.value||E(Ie),class:q([[E(C).e("icon-btn"),E(C).is("disabled",!ve.value||E(Ie))],"arrow-right"]),"aria-label":E(L)("el.datepicker.nextMonth"),onClick:Ye},[le(nt.$slots,"next-month",{},()=>[_(E(we),null,{default:y(()=>[_(E(jr))]),_:1})])],10,fme)):O("v-if",!0),g("div",null,[g("span",{role:"button",class:q(E(A).e("header-label")),"aria-live":"polite",tabindex:nt.disabled?void 0:0,"aria-disabled":nt.disabled,onKeydown:at[10]||(at[10]=ut(vt=>E(K)("year"),["enter"])),onClick:at[11]||(at[11]=vt=>E(K)("year"))},x(E(Q)),43,pme),Re(g("span",{role:"button","aria-live":"polite",tabindex:nt.disabled?void 0:0,"aria-disabled":nt.disabled,class:q([E(A).e("header-label"),{active:E(H)==="month"}]),onKeydown:at[12]||(at[12]=ut(vt=>E(K)("month"),["enter"])),onClick:at[13]||(at[13]=vt=>E(K)("month"))},x(E(L)(`el.datepicker.month${p.value.month()+1}`)),43,mme),[[jt,E(H)==="date"]])])],2),E(H)==="date"?(v(),D(MC,{key:0,ref_key:"leftCurrentViewRef",ref:U,"selection-mode":"range",date:p.value,"min-date":E(b),"max-date":E(w),"range-state":E(k),"disabled-date":E(r),"cell-class-name":E(a),"show-week-number":nt.showWeekNumber,disabled:E(Ie),onChangerange:E(S),onPick:dt,onSelect:E(T)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","show-week-number","disabled","onChangerange","onSelect"])):O("v-if",!0),E(H)==="year"?(v(),D(l1,{key:1,ref_key:"leftCurrentViewRef",ref:U,"selection-mode":"year",date:p.value,"disabled-date":E(r),"parsed-value":nt.parsedValue,disabled:E(Ie),onPick:E(ge)},null,8,["date","disabled-date","parsed-value","disabled","onPick"])):O("v-if",!0),E(H)==="month"?(v(),D(a1,{key:2,ref_key:"leftCurrentViewRef",ref:U,"selection-mode":"month",date:p.value,"parsed-value":nt.parsedValue,"disabled-date":E(r),disabled:E(Ie),onPick:E(oe)},null,8,["date","parsed-value","disabled-date","disabled","onPick"])):O("v-if",!0)],2),g("div",{class:q([[E(C).e("content"),E(A).e("content")],"is-right"])},[g("div",{class:q(E(A).e("header"))},[nt.unlinkPanels?(v(),$("button",{key:0,type:"button",disabled:!Pe.value||E(Ie),class:q([[E(C).e("icon-btn"),E(C).is("disabled",!Pe.value||E(Ie))],"d-arrow-left"]),"aria-label":E(L)("el.datepicker.prevYear"),onClick:it},[le(nt.$slots,"prev-year",{},()=>[_(E(we),null,{default:y(()=>[_(E(zc))]),_:1})])],10,gme)):O("v-if",!0),nt.unlinkPanels&&E(F)==="date"?(v(),$("button",{key:1,type:"button",disabled:!ve.value||E(Ie),class:q([[E(C).e("icon-btn"),E(C).is("disabled",!ve.value||E(Ie))],"arrow-left"]),"aria-label":E(L)("el.datepicker.prevMonth"),onClick:be},[le(nt.$slots,"prev-month",{},()=>[_(E(we),null,{default:y(()=>[_(E(wd))]),_:1})])],10,vme)):O("v-if",!0),g("button",{type:"button","aria-label":E(L)("el.datepicker.nextYear"),class:q([E(C).e("icon-btn"),"d-arrow-right"]),disabled:E(Ie),onClick:He},[le(nt.$slots,"next-year",{},()=>[_(E(we),null,{default:y(()=>[_(E(Hc))]),_:1})])],10,_me),Re(g("button",{type:"button",class:q([E(C).e("icon-btn"),"arrow-right"]),disabled:E(Ie),"aria-label":E(L)("el.datepicker.nextMonth"),onClick:Ae},[le(nt.$slots,"next-month",{},()=>[_(E(we),null,{default:y(()=>[_(E(jr))]),_:1})])],10,yme),[[jt,E(F)==="date"]]),g("div",null,[g("span",{role:"button",class:q(E(A).e("header-label")),"aria-live":"polite",tabindex:nt.disabled?void 0:0,"aria-disabled":nt.disabled,onKeydown:at[14]||(at[14]=ut(vt=>E(ae)("year"),["enter"])),onClick:at[15]||(at[15]=vt=>E(ae)("year"))},x(E(ne)),43,bme),Re(g("span",{role:"button","aria-live":"polite",tabindex:nt.disabled?void 0:0,"aria-disabled":nt.disabled,class:q([E(A).e("header-label"),{active:E(F)==="month"}]),onKeydown:at[16]||(at[16]=ut(vt=>E(ae)("month"),["enter"])),onClick:at[17]||(at[17]=vt=>E(ae)("month"))},x(E(L)(`el.datepicker.month${m.value.month()+1}`)),43,wme),[[jt,E(F)==="date"]])])],2),E(F)==="date"?(v(),D(MC,{key:0,ref_key:"rightCurrentViewRef",ref:Y,"selection-mode":"range",date:m.value,"min-date":E(b),"max-date":E(w),"range-state":E(k),"disabled-date":E(r),"cell-class-name":E(a),"show-week-number":nt.showWeekNumber,disabled:E(Ie),onChangerange:E(S),onPick:dt,onSelect:E(T)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","show-week-number","disabled","onChangerange","onSelect"])):O("v-if",!0),E(F)==="year"?(v(),D(l1,{key:1,ref_key:"rightCurrentViewRef",ref:Y,"selection-mode":"year",date:m.value,"disabled-date":E(r),"parsed-value":nt.parsedValue,disabled:E(Ie),onPick:E(Ce)},null,8,["date","disabled-date","parsed-value","disabled","onPick"])):O("v-if",!0),E(F)==="month"?(v(),D(a1,{key:2,ref_key:"rightCurrentViewRef",ref:Y,"selection-mode":"month",date:m.value,"parsed-value":nt.parsedValue,"disabled-date":E(r),disabled:E(Ie),onPick:E(pe)},null,8,["date","parsed-value","disabled-date","disabled","onPick"])):O("v-if",!0)],2)],2)],2),nt.showFooter&&Lt.value&&(nt.showConfirm||E(c))?(v(),$("div",{key:0,class:q(E(C).e("footer"))},[E(c)?(v(),D(E(ze),{key:0,text:"",size:"small",class:q(E(C).e("link-btn")),onClick:Vl},{default:y(()=>[N(x(E(L)("el.datepicker.clear")),1)]),_:1},8,["class"])):O("v-if",!0),nt.showConfirm?(v(),D(E(ze),{key:1,plain:"",size:"small",class:q(E(C).e("link-btn")),disabled:_t.value,onClick:at[18]||(at[18]=vt=>E(M)(!1))},{default:y(()=>[N(x(E(L)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])):O("v-if",!0)],2)):O("v-if",!0)],2))}}),Cme=kme;const xme=Ge({...b8}),Sme=["pick","set-picker-option","calendar-change"],$me=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const{t:i}=en();return{leftPrevYear:()=>{e.value=e.value.subtract(1,"year"),t.value||(n.value=n.value.subtract(1,"year"))},rightNextYear:()=>{t.value||(e.value=e.value.add(1,"year")),n.value=n.value.add(1,"year")},leftNextYear:()=>{e.value=e.value.add(1,"year")},rightPrevYear:()=>{n.value=n.value.subtract(1,"year")},leftLabel:W(()=>`${e.value.year()} ${i("el.datepicker.year")}`),rightLabel:W(()=>`${n.value.year()} ${i("el.datepicker.year")}`),leftYear:W(()=>e.value.year()),rightYear:W(()=>n.value.year()===e.value.year()?e.value.year()+1:n.value.year())}},Ame=["disabled","onClick"],Eme=["disabled"],Mme=["disabled"],Tme=["disabled"],Pme=["disabled"],l_="year";var Ime=fe({name:"DatePickerMonthRange",__name:"panel-month-range",props:xme,emits:Sme,setup(t,{emit:e}){const n=t,i=e,{lang:s}=en(),o=qe(Oa),r=qe(Z1,void 0),{shortcuts:a,disabledDate:l,cellClassName:c}=o.props,u=Sn(o.props,"format"),d=Sn(o.props,"defaultValue"),h=ee(ft().locale(s.value)),f=ee(ft().locale(s.value).add(1,l_)),{minDate:p,maxDate:m,rangeState:b,ppNs:w,drpNs:k,handleChangeRange:C,handleRangeConfirm:A,handleShortcutClick:S,onSelect:M,parseValue:P}=C8(n,{defaultValue:d,leftDate:h,rightDate:f,unit:l_,sortDates:Q}),T=W(()=>!!a.length),{leftPrevYear:I,rightNextYear:L,leftNextYear:R,rightPrevYear:V,leftLabel:H,rightLabel:F,leftYear:U,rightYear:Y}=$me({unlinkPanels:Sn(n,"unlinkPanels"),leftDate:h,rightDate:f}),z=W(()=>n.unlinkPanels&&Y.value>U.value+1),X=(K,ae=!0)=>{const ge=K.minDate,Ce=K.maxDate;m.value===Ce&&p.value===ge||(i("calendar-change",[ge.toDate(),Ce&&Ce.toDate()]),m.value=Ce,p.value=ge,ae&&A())},Z=()=>{let K=null;o!=null&&o.emptyValues&&(K=o.emptyValues.valueOnClear.value),h.value=r2(E(d),{lang:E(s),unit:"year",unlinkPanels:n.unlinkPanels})[0],f.value=h.value.add(1,"year"),i("pick",K)},G=K=>Yf(K,u.value,s.value,r);function Q(K,ae){n.unlinkPanels&&ae?f.value=((K==null?void 0:K.year())||0)===ae.year()?ae.add(1,l_):ae:f.value=h.value.add(1,l_)}const ne=bs();return Te(()=>n.visible,K=>{!K&&b.value.selecting&&(P(n.parsedValue),M(!1))}),i("set-picker-option",["isValidValue",r1]),i("set-picker-option",["parseUserInput",G]),i("set-picker-option",["handleClear",Z]),(K,ae)=>(v(),$("div",{class:q([E(w).b(),E(k).b(),E(w).is("border",K.border),E(w).is("disabled",E(ne)),{"has-sidebar":!!K.$slots.sidebar||T.value}])},[g("div",{class:q(E(w).e("body-wrapper"))},[le(K.$slots,"sidebar",{class:q(E(w).e("sidebar"))}),T.value?(v(),$("div",{key:0,class:q(E(w).e("sidebar"))},[(v(!0),$(J,null,ye(E(a),(ge,Ce)=>(v(),$("button",{key:Ce,type:"button",class:q(E(w).e("shortcut")),disabled:E(ne),onClick:oe=>E(S)(ge)},x(ge.text),11,Ame))),128))],2)):O("v-if",!0),g("div",{class:q(E(w).e("body"))},[g("div",{class:q([[E(w).e("content"),E(k).e("content")],"is-left"])},[g("div",{class:q(E(k).e("header"))},[g("button",{type:"button",class:q([E(w).e("icon-btn"),"d-arrow-left"]),disabled:E(ne),onClick:ae[0]||(ae[0]=(...ge)=>E(I)&&E(I)(...ge))},[le(K.$slots,"prev-year",{},()=>[_(E(we),null,{default:y(()=>[_(E(zc))]),_:1})])],10,Eme),K.unlinkPanels?(v(),$("button",{key:0,type:"button",disabled:!z.value||E(ne),class:q([[E(w).e("icon-btn"),E(w).is("disabled",!z.value||E(ne))],"d-arrow-right"]),onClick:ae[1]||(ae[1]=(...ge)=>E(R)&&E(R)(...ge))},[le(K.$slots,"next-year",{},()=>[_(E(we),null,{default:y(()=>[_(E(Hc))]),_:1})])],10,Mme)):O("v-if",!0),g("div",null,x(E(H)),1)],2),_(a1,{"selection-mode":"range",date:h.value,"min-date":E(p),"max-date":E(m),"range-state":E(b),"disabled-date":E(l),disabled:E(ne),"cell-class-name":E(c),onChangerange:E(C),onPick:X,onSelect:E(M)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2),g("div",{class:q([[E(w).e("content"),E(k).e("content")],"is-right"])},[g("div",{class:q(E(k).e("header"))},[K.unlinkPanels?(v(),$("button",{key:0,type:"button",disabled:!z.value||E(ne),class:q([[E(w).e("icon-btn"),E(w).is("disabled",!z.value||E(ne))],"d-arrow-left"]),onClick:ae[2]||(ae[2]=(...ge)=>E(V)&&E(V)(...ge))},[le(K.$slots,"prev-year",{},()=>[_(E(we),null,{default:y(()=>[_(E(zc))]),_:1})])],10,Tme)):O("v-if",!0),g("button",{type:"button",class:q([E(w).e("icon-btn"),"d-arrow-right"]),disabled:E(ne),onClick:ae[3]||(ae[3]=(...ge)=>E(L)&&E(L)(...ge))},[le(K.$slots,"next-year",{},()=>[_(E(we),null,{default:y(()=>[_(E(Hc))]),_:1})])],10,Pme),g("div",null,x(E(F)),1)],2),_(a1,{"selection-mode":"range",date:f.value,"min-date":E(p),"max-date":E(m),"range-state":E(b),"disabled-date":E(l),disabled:E(ne),"cell-class-name":E(c),onChangerange:E(C),onPick:X,onSelect:E(M)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2)],2)],2)],2))}}),Lme=Ime;const Ome=Ge({...b8}),Dme=["pick","set-picker-option","calendar-change"],Rme=({unlinkPanels:t,leftDate:e,rightDate:n})=>({leftPrevYear:()=>{e.value=e.value.subtract(10,"year"),t.value||(n.value=n.value.subtract(10,"year"))},rightNextYear:()=>{t.value||(e.value=e.value.add(10,"year")),n.value=n.value.add(10,"year")},leftNextYear:()=>{e.value=e.value.add(10,"year")},rightPrevYear:()=>{n.value=n.value.subtract(10,"year")},leftLabel:W(()=>{const a=Math.floor(e.value.year()/10)*10;return`${a}-${a+9}`}),rightLabel:W(()=>{const a=Math.floor(n.value.year()/10)*10;return`${a}-${a+9}`}),leftYear:W(()=>Math.floor(e.value.year()/10)*10+9),rightYear:W(()=>Math.floor(n.value.year()/10)*10)}),Vme=["disabled","onClick"],Fme=["disabled"],Nme=["disabled"],Bme=["disabled"],zme=["disabled"],uh=10,Jp="year";var Hme=fe({name:"DatePickerYearRange",__name:"panel-year-range",props:Ome,emits:Dme,setup(t,{emit:e}){const n=t,i=e,{lang:s}=en(),o=ee(ft().locale(s.value)),r=ee(ft().locale(s.value).add(uh,Jp)),a=qe(Z1,void 0),l=qe(Oa),{shortcuts:c,disabledDate:u,cellClassName:d}=l.props,h=Sn(l.props,"format"),f=Sn(l.props,"defaultValue"),{minDate:p,maxDate:m,rangeState:b,ppNs:w,drpNs:k,handleChangeRange:C,handleRangeConfirm:A,handleShortcutClick:S,onSelect:M,parseValue:P}=C8(n,{defaultValue:f,leftDate:o,rightDate:r,step:uh,unit:Jp,sortDates:Ce}),{leftPrevYear:T,rightNextYear:I,leftNextYear:L,rightPrevYear:R,leftLabel:V,rightLabel:H,leftYear:F,rightYear:U}=Rme({unlinkPanels:Sn(n,"unlinkPanels"),leftDate:o,rightDate:r}),Y=bs(),z=W(()=>!!c.length),X=W(()=>[w.b(),k.b(),w.is("border",n.border),w.is("disabled",Y.value),{"has-sidebar":!!gi().sidebar||z.value}]),Z=W(()=>({content:[w.e("content"),k.e("content"),"is-left"],arrowLeftBtn:[w.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[w.e("icon-btn"),w.is("disabled",!Q.value||Y.value),"d-arrow-right"]})),G=W(()=>({content:[w.e("content"),k.e("content"),"is-right"],arrowLeftBtn:[w.e("icon-btn"),w.is("disabled",!Q.value||Y.value),"d-arrow-left"],arrowRightBtn:[w.e("icon-btn"),"d-arrow-right"]})),Q=W(()=>n.unlinkPanels&&U.value>F.value+1),ne=(oe,pe=!0)=>{const ie=oe.minDate,re=oe.maxDate;m.value===re&&p.value===ie||(i("calendar-change",[ie.toDate(),re&&re.toDate()]),m.value=re,p.value=ie,pe&&A())},K=oe=>Yf(oe,h.value,s.value,a),ae=oe=>r1(oe)&&(u?!u(oe[0].toDate())&&!u(oe[1].toDate()):!0),ge=()=>{let oe=null;l!=null&&l.emptyValues&&(oe=l.emptyValues.valueOnClear.value);const pe=r2(E(f),{lang:E(s),step:uh,unit:Jp,unlinkPanels:n.unlinkPanels});o.value=pe[0],r.value=pe[1],i("pick",oe)};function Ce(oe,pe){if(n.unlinkPanels&&pe){const ie=(oe==null?void 0:oe.year())||0,re=pe.year();r.value=ie+uh>re?pe.add(uh,Jp):pe}else r.value=o.value.add(uh,Jp)}return Te(()=>n.visible,oe=>{!oe&&b.value.selecting&&(P(n.parsedValue),M(!1))}),i("set-picker-option",["isValidValue",ae]),i("set-picker-option",["parseUserInput",K]),i("set-picker-option",["handleClear",ge]),(oe,pe)=>(v(),$("div",{class:q(X.value)},[g("div",{class:q(E(w).e("body-wrapper"))},[le(oe.$slots,"sidebar",{class:q(E(w).e("sidebar"))}),z.value?(v(),$("div",{key:0,class:q(E(w).e("sidebar"))},[(v(!0),$(J,null,ye(E(c),(ie,re)=>(v(),$("button",{key:re,type:"button",class:q(E(w).e("shortcut")),disabled:E(Y),onClick:ke=>E(S)(ie)},x(ie.text),11,Vme))),128))],2)):O("v-if",!0),g("div",{class:q(E(w).e("body"))},[g("div",{class:q(Z.value.content)},[g("div",{class:q(E(k).e("header"))},[g("button",{type:"button",class:q(Z.value.arrowLeftBtn),disabled:E(Y),onClick:pe[0]||(pe[0]=(...ie)=>E(T)&&E(T)(...ie))},[le(oe.$slots,"prev-year",{},()=>[_(E(we),null,{default:y(()=>[_(E(zc))]),_:1})])],10,Fme),oe.unlinkPanels?(v(),$("button",{key:0,type:"button",disabled:!Q.value||E(Y),class:q(Z.value.arrowRightBtn),onClick:pe[1]||(pe[1]=(...ie)=>E(L)&&E(L)(...ie))},[le(oe.$slots,"next-year",{},()=>[_(E(we),null,{default:y(()=>[_(E(Hc))]),_:1})])],10,Nme)):O("v-if",!0),g("div",null,x(E(V)),1)],2),_(l1,{"selection-mode":"range",date:o.value,"min-date":E(p),"max-date":E(m),"range-state":E(b),"disabled-date":E(u),disabled:E(Y),"cell-class-name":E(d),onChangerange:E(C),onPick:ne,onSelect:E(M)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2),g("div",{class:q(G.value.content)},[g("div",{class:q(E(k).e("header"))},[oe.unlinkPanels?(v(),$("button",{key:0,type:"button",disabled:!Q.value||E(Y),class:q(G.value.arrowLeftBtn),onClick:pe[2]||(pe[2]=(...ie)=>E(R)&&E(R)(...ie))},[le(oe.$slots,"prev-year",{},()=>[_(E(we),null,{default:y(()=>[_(E(zc))]),_:1})])],10,Bme)):O("v-if",!0),g("button",{type:"button",class:q(G.value.arrowRightBtn),disabled:E(Y),onClick:pe[3]||(pe[3]=(...ie)=>E(I)&&E(I)(...ie))},[le(oe.$slots,"next-year",{},()=>[_(E(we),null,{default:y(()=>[_(E(Hc))]),_:1})])],10,zme),g("div",null,x(E(H)),1)],2),_(l1,{"selection-mode":"range",date:r.value,"min-date":E(p),"max-date":E(m),"range-state":E(b),"disabled-date":E(u),disabled:E(Y),"cell-class-name":E(d),onChangerange:E(C),onPick:ne,onSelect:E(M)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2)],2)],2)],2))}}),Ume=Hme;const jme=function(t){switch(t){case"daterange":case"datetimerange":return Cme;case"monthrange":return Lme;case"yearrange":return Ume;default:return ome}};var qV={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(xs,function(){return function(n,i){var s=i.prototype,o=s.format;s.format=function(r){var a=this,l=this.$locale();if(!this.isValid())return o.bind(this)(r);var c=this.$utils(),u=(r||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(d){switch(d){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return l.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return l.ordinal(a.week(),"W");case"w":case"ww":return c.s(a.week(),d==="w"?1:2,"0");case"W":case"WW":return c.s(a.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return c.s(String(a.$H===0?24:a.$H),d==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return d}});return o.bind(this)(u)}}})})(qV);var Wme=qV.exports;const Yme=_i(Wme);var GV={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(xs,function(){var n="week",i="year";return function(s,o,r){var a=o.prototype;a.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=r(this).startOf(i).add(1,i).date(c),d=r(this).endOf(n);if(u.isBefore(d))return 1}var h=r(this).startOf(i).date(c).startOf(n).subtract(1,"millisecond"),f=this.diff(h,n,!0);return f<0?r(this).startOf("week").week():Math.ceil(f)},a.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})})(GV);var qme=GV.exports;const Gme=_i(qme);var XV={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(xs,function(){return function(n,i){i.prototype.weekYear=function(){var s=this.month(),o=this.week(),r=this.year();return o===1&&s===11?r+1:s===0&&o>=52?r-1:r}}})})(XV);var Xme=XV.exports;const Kme=_i(Xme);var KV={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(xs,function(){return function(n,i,s){i.prototype.dayOfYear=function(o){var r=Math.round((s(this).startOf("day")-s(this).startOf("year"))/864e5)+1;return o==null?r:this.add(o-r,"day")}}})})(KV);var Zme=KV.exports;const Jme=_i(Zme);var ZV={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(xs,function(){return function(n,i){i.prototype.isSameOrAfter=function(s,o){return this.isSame(s,o)||this.isAfter(s,o)}}})})(ZV);var Qme=ZV.exports;const ege=_i(Qme);var JV={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(xs,function(){return function(n,i){i.prototype.isSameOrBefore=function(s,o){return this.isSame(s,o)||this.isBefore(s,o)}}})})(JV);var tge=JV.exports;const nge=_i(tge);function sge(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!is(t)}ft.extend(ofe);ft.extend(Yme);ft.extend(fV);ft.extend(Gme);ft.extend(Kme);ft.extend(Jme);ft.extend(ege);ft.extend(nge);var ige=fe({name:"ElDatePickerPanel",install:null,inheritAttrs:!1,props:Tpe,emits:[Mt,"calendar-change","panel-change","visible-change","clear"],setup(t,{slots:e,emit:n,attrs:i}){const s=Be("picker-panel");sn(qe(Oa,void 0))&&Pt(Oa,{props:In({...go(t)})}),Pt(_8,{slots:e,pickerNs:s});const{parsedValue:o,onCalendarChange:r,onPanelChange:a,onSetPickerOption:l,onPick:c}=qe(XR,()=>nV(t,n),!0);return()=>_(jme(t.type),Yt(Yb(i,"onPick"),t,{parsedValue:o.value,"onSet-picker-option":l,"onCalendar-change":r,"onPanel-change":a,onClear:()=>n("clear"),onPick:c}),sge(e)?e:{default:()=>[e]})}});const oge=Gt(ige),rge=Ge({...tV,type:{type:de(String),default:"date"}});function age(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!is(t)}var lge=fe({name:"ElDatePicker",install:null,props:rge,emits:[Mt],setup(t,{expose:e,emit:n,slots:i}){Pt(Z1,W(()=>!t.format)),Pt(GR,In(Sn(t,"popperOptions")));const s=ee();e({focus:()=>{var r;(r=s.value)==null||r.focus()},blur:()=>{var r;(r=s.value)==null||r.blur()},handleOpen:()=>{var r;(r=s.value)==null||r.handleOpen()},handleClose:()=>{var r;(r=s.value)==null||r.handleClose()}});const o=r=>{n(Mt,r)};return()=>{const r=t.format??(the[t.type]||mc);return _(uhe,Yt(t,{format:r,type:t.type,ref:s,"onUpdate:modelValue":o}),{default:a=>_(oge,Yt({disabled:t.disabled,editable:t.editable,border:!1},a),age(i)?i:{default:()=>[i]}),"range-separator":i["range-separator"]})}}});const Wd=Gt(lge),QV=Ge({center:Boolean,alignCenter:{type:Boolean,default:void 0},closeIcon:{type:ds},draggable:{type:Boolean,default:void 0},overflow:{type:Boolean,default:void 0},fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),cge={close:()=>!0},eF=Ge({...QV,appendToBody:Boolean,appendTo:{type:P4.to.type,default:"body"},beforeClose:{type:de(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},modalPenetrable:Boolean,openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,headerClass:String,bodyClass:String,footerClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"},transition:{type:de([String,Object]),default:void 0}}),tF={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[Mt]:t=>Jn(t),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},uge=Ge({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:de([String,Array,Object])},zIndex:{type:de([String,Number])}}),dge={click:t=>t instanceof MouseEvent},hge="overlay";var fge=fe({name:"ElOverlay",props:uge,emits:dge,setup(t,{slots:e,emit:n}){const i=Be(hge),s=l=>{n("click",l)},{onClick:o,onMousedown:r,onMouseup:a}=j4(t.customMaskEvent?void 0:s);return()=>t.mask?_("div",{class:[i.b(),t.overlayClass],style:{zIndex:t.zIndex},onClick:o,onMousedown:r,onMouseup:a},[le(e,"default")],Mw.STYLE|Mw.CLASS|Mw.PROPS,["onClick","onMouseup","onMousedown"]):bt("div",{class:t.overlayClass,style:{zIndex:t.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[le(e,"default")])}});const x8=fge,nF=Symbol("dialogInjectionKey"),Uw="dialog-fade",pge="ElDialog",sF=(t,e)=>{const n=pt().emit,{nextZIndex:i}=Zb();let s="";const o=kr(),r=kr(),a=ee(!1),l=ee(!1),c=ee(!1),u=ee(t.zIndex??i()),d=ee(!1);let h,f;const p=Jc(),m=W(()=>{var G;return((G=p.value)==null?void 0:G.namespace)??ng}),b=W(()=>{var G;return(G=p.value)==null?void 0:G.dialog}),w=W(()=>{const G={},Q=`--${m.value}-dialog`;if(!t.fullscreen){t.top&&(G[`${Q}-margin-top`]=t.top);const ne=pi(t.width);ne&&(G[`${Q}-width`]=ne)}return G}),k=W(()=>{var G;return(t.draggable??((G=b.value)==null?void 0:G.draggable)??!1)&&!t.fullscreen}),C=W(()=>{var G;return t.alignCenter??((G=b.value)==null?void 0:G.alignCenter)??!1}),A=W(()=>{var G;return t.overflow??((G=b.value)==null?void 0:G.overflow)??!1}),S=W(()=>C.value?{display:"flex"}:{}),M=W(()=>{var ne;const G=t.transition??((ne=b.value)==null?void 0:ne.transition)??Uw,Q={name:G,onAfterEnter:P,onBeforeLeave:I,onAfterLeave:T};if(yt(G)){const K={...G},ae=(ge,Ce)=>oe=>{Ee(ge)?ge.forEach(pe=>{et(pe)&&pe(oe)}):et(ge)&&ge(oe),Ce()};return K.onAfterEnter=ae(K.onAfterEnter,P),K.onBeforeLeave=ae(K.onBeforeLeave,I),K.onAfterLeave=ae(K.onAfterLeave,T),K.name||(K.name=Uw,Tt(pge,`transition.name is missing when using object syntax, fallback to '${Uw}'`)),K}return Q});function P(){n("opened")}function T(){n("closed"),n(Mt,!1),t.destroyOnClose&&(c.value=!1),d.value=!1}function I(){d.value=!0,n("close")}function L(){f==null||f(),h==null||h(),t.openDelay&&t.openDelay>0?{stop:h}=Jk(()=>F(),t.openDelay):F()}function R(){h==null||h(),f==null||f(),t.closeDelay&&t.closeDelay>0?{stop:f}=Jk(()=>U(),t.closeDelay):U()}function V(){function G(Q){Q||(l.value=!0,a.value=!1)}t.beforeClose?t.beforeClose(G):R()}function H(){t.closeOnClickModal&&V()}function F(){Jt&&(a.value=!0)}function U(){a.value=!1}function Y(){n("openAutoFocus")}function z(){n("closeAutoFocus")}function X(G){var Q;((Q=G.detail)==null?void 0:Q.focusReason)==="pointer"&&G.preventDefault()}t.lockScroll&&D4(a);function Z(){t.closeOnPressEscape&&V()}return Te(()=>t.zIndex,()=>{u.value=t.zIndex??i()}),Te(()=>t.modelValue,G=>{G?(l.value=!1,d.value=!1,L(),c.value=!0,u.value=t.zIndex??i(),ot(()=>{n("open"),e.value&&(e.value.parentElement.scrollTop=0,e.value.parentElement.scrollLeft=0,e.value.scrollTop=0)})):a.value&&R()}),Te(()=>t.fullscreen,G=>{e.value&&(G?(s=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=s)}),Nt(()=>{t.modelValue&&(a.value=!0,c.value=!0,L())}),{afterEnter:P,afterLeave:T,beforeLeave:I,handleClose:V,onModalClick:H,close:R,doClose:U,onOpenAutoFocus:Y,onCloseAutoFocus:z,onCloseRequested:Z,onFocusoutPrevented:X,titleId:o,bodyId:r,closed:l,style:w,overlayDialogStyle:S,rendered:c,visible:a,zIndex:u,transitionConfig:M,_draggable:k,_alignCenter:C,_overflow:A,closing:d}},S8=(...t)=>e=>{t.forEach(n=>{n.value=e})},mge=["aria-level"],gge=["aria-label"],vge=["id"];var _ge=fe({name:"ElDialogContent",__name:"dialog-content",props:QV,emits:cge,setup(t,{expose:e}){const{t:n}=en(),{Close:i}=ice,s=t,{dialogRef:o,headerRef:r,bodyId:a,ns:l,style:c}=qe(nF),{focusTrapRef:u}=qe(DR),d=S8(u,o),h=W(()=>!!s.draggable),{resetPosition:f,updatePosition:p,isDragging:m}=PD(o,r,h,W(()=>!!s.overflow)),b=W(()=>[l.b(),l.is("fullscreen",s.fullscreen),l.is("draggable",h.value),l.is("dragging",m.value),l.is("align-center",!!s.alignCenter),{[l.m("center")]:s.center}]);return e({resetPosition:f,updatePosition:p}),(w,k)=>(v(),$("div",{ref:E(d),class:q(b.value),style:Xe(E(c)),tabindex:"-1"},[g("header",{ref_key:"headerRef",ref:r,class:q([E(l).e("header"),t.headerClass,{"show-close":t.showClose}])},[le(w.$slots,"header",{},()=>[g("span",{role:"heading","aria-level":t.ariaLevel,class:q(E(l).e("title"))},x(t.title),11,mge)]),t.showClose?(v(),$("button",{key:0,"aria-label":E(n)("el.dialog.close"),class:q(E(l).e("headerbtn")),type:"button",onClick:k[0]||(k[0]=C=>w.$emit("close"))},[_(E(we),{class:q(E(l).e("close"))},{default:y(()=>[(v(),D(Ct(t.closeIcon||E(i))))]),_:1},8,["class"])],10,gge)):O("v-if",!0)],2),g("div",{id:E(a),class:q([E(l).e("body"),t.bodyClass])},[le(w.$slots,"default")],10,vge),w.$slots.footer?(v(),$("footer",{key:0,class:q([E(l).e("footer"),t.footerClass])},[le(w.$slots,"footer")],2)):O("v-if",!0)],6))}}),yge=_ge;const bge=["aria-label","aria-labelledby","aria-describedby"];var wge=fe({name:"ElDialog",inheritAttrs:!1,__name:"dialog",props:eF,emits:tF,setup(t,{expose:e}){const n=t,i=gi();fl({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"},W(()=>!!i.title));const s=Be("dialog"),o=ee(),r=ee(),a=ee(),{visible:l,titleId:c,bodyId:u,style:d,overlayDialogStyle:h,rendered:f,transitionConfig:p,zIndex:m,_draggable:b,_alignCenter:w,_overflow:k,handleClose:C,onModalClick:A,onOpenAutoFocus:S,onCloseAutoFocus:M,onCloseRequested:P,onFocusoutPrevented:T,closing:I}=sF(n,o);Pt(nF,{dialogRef:o,headerRef:r,bodyId:u,ns:s,rendered:f,style:d});const L=j4(A),R=W(()=>n.modalPenetrable&&!n.modal&&!n.fullscreen);return e({visible:l,dialogContentRef:a,resetPosition:()=>{var H;(H=a.value)==null||H.resetPosition()},handleClose:C}),(H,F)=>(v(),D(E(t2),{to:t.appendTo,disabled:t.appendTo!=="body"?!1:!t.appendToBody},{default:y(()=>[_(jo,Yt(E(p),{persisted:""}),{default:y(()=>[Re(_(E(x8),{"custom-mask-event":"",mask:t.modal,"overlay-class":[t.modalClass??"",`${E(s).namespace.value}-modal-dialog`,E(s).is("penetrable",R.value)],"z-index":E(m)},{default:y(()=>[g("div",{role:"dialog","aria-modal":"true","aria-label":t.title||void 0,"aria-labelledby":t.title?void 0:E(c),"aria-describedby":E(u),class:q([`${E(s).namespace.value}-overlay-dialog`,E(s).is("closing",E(I))]),style:Xe(E(h)),onClick:F[0]||(F[0]=(...U)=>E(L).onClick&&E(L).onClick(...U)),onMousedown:F[1]||(F[1]=(...U)=>E(L).onMousedown&&E(L).onMousedown(...U)),onMouseup:F[2]||(F[2]=(...U)=>E(L).onMouseup&&E(L).onMouseup(...U))},[_(E(Y1),{loop:"",trapped:E(l),"focus-start-el":"container",onFocusAfterTrapped:E(S),onFocusAfterReleased:E(M),onFocusoutPrevented:E(T),onReleaseRequested:E(P)},{default:y(()=>[E(f)?(v(),D(yge,Yt({key:0,ref_key:"dialogContentRef",ref:a},H.$attrs,{center:t.center,"align-center":E(w),"close-icon":t.closeIcon,draggable:E(b),overflow:E(k),fullscreen:t.fullscreen,"header-class":t.headerClass,"body-class":t.bodyClass,"footer-class":t.footerClass,"show-close":t.showClose,title:t.title,"aria-level":t.headerAriaLevel,onClose:E(C)}),hs({header:y(()=>[H.$slots.title?le(H.$slots,"title",{key:1}):le(H.$slots,"header",{key:0,close:E(C),titleId:E(c),titleClass:E(s).e("title")})]),default:y(()=>[le(H.$slots,"default")]),_:2},[H.$slots.footer?{name:"footer",fn:y(()=>[le(H.$slots,"footer")]),key:"0"}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose"])):O("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,bge)]),_:3},8,["mask","overlay-class","z-index"]),[[jt,E(l)]])]),_:3},16)]),_:3},8,["to","disabled"]))}}),kge=wge;const $s=Gt(kge),Cge=Ge({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:de(String),default:"solid"}});var xge=fe({name:"ElDivider",__name:"divider",props:Cge,setup(t){const e=t,n=Be("divider"),i=W(()=>n.cssVar({"border-style":e.borderStyle}));return(s,o)=>(v(),$("div",{class:q([E(n).b(),E(n).m(t.direction)]),style:Xe(i.value),role:"separator"},[s.$slots.default&&t.direction!=="vertical"?(v(),$("div",{key:0,class:q([E(n).e("text"),E(n).is(t.contentPosition)])},[le(s.$slots,"default")],2)):O("v-if",!0)],6))}}),Sge=xge;const $8=Gt(Sge),$ge=Ge({...eF,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},resizable:Boolean,size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),Age={...tF,"resize-start":(t,e)=>t instanceof MouseEvent&&typeof e=="number",resize:(t,e)=>t instanceof MouseEvent&&typeof e=="number","resize-end":(t,e)=>t instanceof MouseEvent&&typeof e=="number"};function Ege(t,e,n){const{width:i,height:s}=Hie(),o=W(()=>["ltr","rtl"].includes(t.direction)),r=W(()=>["ltr","ttb"].includes(t.direction)?1:-1),a=W(()=>o.value?i.value:s.value),l=W(()=>wD(c.value+r.value*u.value,4,a.value)),c=ee(0),u=ee(0),d=ee(!1),h=ee(!1);let f=[],p=[];const m=()=>{var S;const A=(S=e.value)==null?void 0:S.closest('[aria-modal="true"]');return A?o.value?A.offsetWidth:A.offsetHeight:100};Te(()=>[t.size,t.resizable],()=>{h.value=!1,c.value=0,u.value=0,k()});const b=A=>{t.resizable&&(h.value||(c.value=m(),h.value=!0),f=[A.pageX,A.pageY],d.value=!0,n("resize-start",A,c.value),p.push(Hn(window,"mouseup",k),Hn(window,"mousemove",w)))},w=A=>{const{pageX:S,pageY:M}=A,P=S-f[0],T=M-f[1];u.value=o.value?P:T,n("resize",A,l.value)},k=A=>{d.value&&(f=[],c.value=l.value,u.value=0,d.value=!1,p.forEach(S=>S==null?void 0:S()),p=[],A&&n("resize-end",A,c.value))},C=Hn(e,"mousedown",b);return wn(()=>{C(),k()}),{size:W(()=>h.value?`${l.value}px`:pi(t.size)),isResizing:d,isHorizontal:o}}const Mge=["aria-label","aria-labelledby","aria-describedby"],Tge=["id","aria-level"],Pge=["aria-label"],Ige=["id"];var Lge=fe({name:"ElDrawer",inheritAttrs:!1,__name:"drawer",props:$ge,emits:Age,setup(t,{expose:e,emit:n}){const i=t,s=n,o=gi();fl({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"},W(()=>!!o.title));const r=ee(),a=ee(),l=ee(),c=Be("drawer"),{t:u}=en(),{afterEnter:d,afterLeave:h,beforeLeave:f,visible:p,rendered:m,titleId:b,bodyId:w,zIndex:k,onModalClick:C,onOpenAutoFocus:A,onCloseAutoFocus:S,onFocusoutPrevented:M,onCloseRequested:P,handleClose:T}=sF(i,r),{isHorizontal:I,size:L,isResizing:R}=Ege(i,l,s),V=W(()=>i.modalPenetrable&&!i.modal);return e({handleClose:T,afterEnter:d,afterLeave:h}),(H,F)=>(v(),D(E(t2),{to:t.appendTo,disabled:t.appendTo!=="body"?!1:!t.appendToBody},{default:y(()=>[_(jo,{name:E(c).b("fade"),onAfterEnter:E(d),onAfterLeave:E(h),onBeforeLeave:E(f),persisted:""},{default:y(()=>[Re(_(E(x8),{mask:t.modal,"overlay-class":[E(c).is("drawer"),t.modalClass??"",`${E(c).namespace.value}-modal-drawer`,E(c).is("penetrable",V.value)],"z-index":E(k),onClick:E(C)},{default:y(()=>[_(E(Y1),{loop:"",trapped:E(p),"focus-trap-el":r.value,"focus-start-el":a.value,onFocusAfterTrapped:E(A),onFocusAfterReleased:E(S),onFocusoutPrevented:E(M),onReleaseRequested:E(P)},{default:y(()=>[g("div",Yt({ref_key:"drawerRef",ref:r,"aria-modal":"true","aria-label":t.title||void 0,"aria-labelledby":t.title?void 0:E(b),"aria-describedby":E(w)},H.$attrs,{class:[E(c).b(),t.direction,E(p)&&"open",E(c).is("dragging",E(R))],style:{[E(I)?"width":"height"]:E(L)},role:"dialog",onClick:F[1]||(F[1]=Me(()=>{},["stop"]))}),[g("span",{ref_key:"focusStartRef",ref:a,class:q(E(c).e("sr-focus")),tabindex:"-1"},null,2),t.withHeader?(v(),$("header",{key:0,class:q([E(c).e("header"),t.headerClass])},[H.$slots.title?le(H.$slots,"title",{key:1},()=>[O(" DEPRECATED SLOT ")]):le(H.$slots,"header",{key:0,close:E(T),titleId:E(b),titleClass:E(c).e("title")},()=>[g("span",{id:E(b),role:"heading","aria-level":t.headerAriaLevel,class:q(E(c).e("title"))},x(t.title),11,Tge)]),t.showClose?(v(),$("button",{key:2,"aria-label":E(u)("el.drawer.close"),class:q(E(c).e("close-btn")),type:"button",onClick:F[0]||(F[0]=(...U)=>E(T)&&E(T)(...U))},[_(E(we),{class:q(E(c).e("close"))},{default:y(()=>[_(E(Ho))]),_:1},8,["class"])],10,Pge)):O("v-if",!0)],2)):O("v-if",!0),E(m)?(v(),$("div",{key:1,id:E(w),class:q([E(c).e("body"),t.bodyClass])},[le(H.$slots,"default")],10,Ige)):O("v-if",!0),H.$slots.footer?(v(),$("div",{key:2,class:q([E(c).e("footer"),t.footerClass])},[le(H.$slots,"footer")],2)):O("v-if",!0),t.resizable?(v(),$("div",{key:3,ref_key:"draggerRef",ref:l,style:Xe({zIndex:E(k)}),class:q(E(c).e("dragger"))},null,6)):O("v-if",!0)],16,Mge)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[jt,E(p)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}}),Oge=Lge;const Fa=Gt(Oge),U_=Ge({trigger:{...Ec.trigger,type:de([String,Array])},triggerKeys:{type:de(Array),default:()=>[Ue.enter,Ue.numpadEnter,Ue.space,Ue.down]},virtualTriggering:Ec.virtualTriggering,virtualRef:Ec.virtualRef,effect:{...zn.effect,default:"light"},type:{type:de(String)},placement:{type:de(String),default:"bottom"},popperOptions:{type:de(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:de([Number,String]),default:0},maxHeight:{type:de([Number,String]),default:""},popperClass:zn.popperClass,popperStyle:zn.popperStyle,disabled:Boolean,role:{type:String,values:SR,default:"menu"},buttonProps:{type:de(Object)},teleported:zn.teleported,appendTo:zn.appendTo,persistent:{type:Boolean,default:!0}}),iF=Ge({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:ds}}),Dge=Ge({onKeydown:{type:de(Function)}}),a2=Symbol("elDropdown"),oF="elDropdown";var Rge=fe({inheritAttrs:!1});function Vge(t,e,n,i,s,o){return le(t.$slots,"default")}var Fge=vi(Rge,[["render",Vge]]),Nge=fe({name:"ElCollectionItem",inheritAttrs:!1});function Bge(t,e,n,i,s,o){return le(t.$slots,"default")}var zge=vi(Nge,[["render",Bge]]);const rF="data-el-collection-item",Hge=t=>{const e=`El${t}Collection`,n=`${e}Item`,i=Symbol(e),s=Symbol(n);return{COLLECTION_INJECTION_KEY:i,COLLECTION_ITEM_INJECTION_KEY:s,ElCollection:Object.assign({},Fge,{name:e,setup(){const o=ee(),r=new Map;Pt(i,{itemMap:r,getItems:()=>{const l=E(o);if(!l)return[];const c=Array.from(l.querySelectorAll(`[${rF}]`));return[...r.values()].sort((u,d)=>c.indexOf(u.ref)-c.indexOf(d.ref))},collectionRef:o})}}),ElCollectionItem:Object.assign({},zge,{name:n,setup(o,{attrs:r}){const a=ee(),l=qe(i,void 0);Pt(s,{collectionItemRef:a}),Nt(()=>{const c=E(a);c&&l.itemMap.set(c,{ref:c,...r})}),wn(()=>{const c=E(a);l.itemMap.delete(c)})}})}},Uge=Ge({style:{type:de([String,Array,Object])},currentTabId:{type:de(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:de(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:jge,ElCollectionItem:Wge,COLLECTION_INJECTION_KEY:aF,COLLECTION_ITEM_INJECTION_KEY:Yge}=Hge("RovingFocusGroup"),A8=Symbol("elRovingFocusGroup"),lF=Symbol("elRovingFocusGroupItem"),qge={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},Gge=(t,e)=>{if(e!=="rtl")return t;switch(t){case Ue.right:return Ue.left;case Ue.left:return Ue.right;default:return t}},Xge=(t,e,n)=>{const i=Gge(ls(t),n);if(!(e==="vertical"&&[Ue.left,Ue.right].includes(i))&&!(e==="horizontal"&&[Ue.up,Ue.down].includes(i)))return qge[i]},Kge=(t,e)=>t.map((n,i)=>t[(i+e)%t.length]),AA=t=>{const{activeElement:e}=document;for(const n of t)if(n===e||(n.focus(),e!==document.activeElement))return},EA="currentTabIdChange",MA="rovingFocusGroup.entryFocus",Zge={bubbles:!1,cancelable:!0};var Jge=fe({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:Uge,emits:[EA,"entryFocus"],setup(t,{emit:e}){const n=ee((t.currentTabId||t.defaultCurrentTabId)??null),i=ee(!1),s=ee(!1),o=ee(),{getItems:r}=qe(aF,void 0),a=W(()=>[{outline:"none"},t.style]),l=m=>{e(EA,m)},c=()=>{i.value=!0},u=Ms(m=>{var b;(b=t.onMousedown)==null||b.call(t,m)},()=>{s.value=!0}),d=Ms(m=>{var b;(b=t.onFocus)==null||b.call(t,m)},m=>{const b=!E(s),{target:w,currentTarget:k}=m;if(w===k&&b&&!E(i)){const C=new Event(MA,Zge);if(k==null||k.dispatchEvent(C),!C.defaultPrevented){const A=r().filter(S=>S.focusable);AA([A.find(S=>S.active),A.find(S=>S.id===E(n)),...A].filter(Boolean).map(S=>S.ref))}}s.value=!1}),h=Ms(m=>{var b;(b=t.onBlur)==null||b.call(t,m)},()=>{i.value=!1}),f=(...m)=>{e("entryFocus",...m)},p=m=>{const b=Xge(m);if(b){m.preventDefault();let w=r().filter(k=>k.focusable).map(k=>k.ref);switch(b){case"last":w.reverse();break;case"prev":case"next":{b==="prev"&&w.reverse();const k=w.indexOf(m.currentTarget);w=t.loop?Kge(w,k+1):w.slice(k+1);break}}ot(()=>{AA(w)})}};Pt(A8,{currentTabbedId:Rc(n),loop:Sn(t,"loop"),tabIndex:W(()=>E(i)?-1:0),rovingFocusGroupRef:o,rovingFocusGroupRootStyle:a,orientation:Sn(t,"orientation"),dir:Sn(t,"dir"),onItemFocus:l,onItemShiftTab:c,onBlur:h,onFocus:d,onMousedown:u,onKeydown:p}),Te(()=>t.currentTabId,m=>{n.value=m??null}),Hn(o,MA,f)}});function Qge(t,e,n,i,s,o){return le(t.$slots,"default")}var e1e=vi(Jge,[["render",Qge]]),t1e=fe({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:jge,ElRovingFocusGroupImpl:e1e}});function n1e(t,e,n,i,s,o){const r=B("el-roving-focus-group-impl"),a=B("el-focus-group-collection");return v(),D(a,null,{default:y(()=>[_(r,ef(of(t.$attrs)),{default:y(()=>[le(t.$slots,"default")]),_:3},16)]),_:3})}var s1e=vi(t1e,[["render",n1e]]),i1e=fe({components:{ElRovingFocusCollectionItem:Wge},props:{focusable:{type:Boolean,default:!0},active:Boolean},emits:["mousedown","focus","keydown"],setup(t,{emit:e}){const{currentTabbedId:n,onItemFocus:i,onItemShiftTab:s,onKeydown:o}=qe(A8,void 0),r=kr(),a=ee(),l=Ms(h=>{e("mousedown",h)},h=>{t.focusable?i(E(r)):h.preventDefault()}),c=Ms(h=>{e("focus",h)},()=>{i(E(r))}),u=Ms(h=>{e("keydown",h)},h=>{const{shiftKey:f,target:p,currentTarget:m}=h;if(ls(h)===Ue.tab&&f){s();return}p===m&&o(h)}),d=W(()=>n.value===E(r));return Pt(lF,{rovingFocusGroupItemRef:a,tabIndex:W(()=>E(d)?0:-1),handleMousedown:l,handleFocus:c,handleKeydown:u}),{id:r,handleKeydown:u,handleFocus:c,handleMousedown:l}}});function o1e(t,e,n,i,s,o){const r=B("el-roving-focus-collection-item");return v(),D(r,{id:t.id,focusable:t.focusable,active:t.active},{default:y(()=>[le(t.$slots,"default")]),_:3},8,["id","focusable","active"])}var r1e=vi(i1e,[["render",o1e]]),a1e=s1e;const{ButtonGroup:l1e}=ze;var c1e=fe({name:"ElDropdown",components:{ElButton:ze,ElButtonGroup:l1e,ElScrollbar:zs,ElTooltip:Ss,ElRovingFocusGroup:a1e,ElOnlyChild:MR,ElIcon:we,ArrowDown:zd},props:U_,emits:["visible-change","click","command"],setup(t,{emit:e}){const n=pt(),i=Be("dropdown"),{t:s}=en(),o=ee(),r=ee(),a=ee(),l=ee(),c=ee(null),u=ee(null),d=ee(!1),h=W(()=>({maxHeight:pi(t.maxHeight)})),f=W(()=>[i.m(A.value)]),p=W(()=>js(t.trigger)),m=kr().value,b=W(()=>t.id||m);function w(){var H;(H=a.value)==null||H.onClose(void 0,0)}function k(){var H;(H=a.value)==null||H.onClose()}function C(){var H;(H=a.value)==null||H.onOpen()}const A=Ii();function S(...H){e("command",...H)}function M(){}function P(){const H=E(l);p.value.includes("hover")&&(H==null||H.focus({preventScroll:!0})),u.value=null}function T(H){u.value=H}function I(){e("visible-change",!0)}function L(H){var F;d.value=(H==null?void 0:H.type)==="keydown",(F=l.value)==null||F.focus()}function R(){e("visible-change",!1)}return Pt(a2,{contentRef:l,role:W(()=>t.role),triggerId:b,isUsingKeyboard:d,onItemEnter:M,onItemLeave:P,handleClose:k}),Pt(oF,{instance:n,dropdownSize:A,handleClick:w,commandHandler:S,trigger:Sn(t,"trigger"),hideOnClick:Sn(t,"hideOnClick")}),{t:s,ns:i,scrollbar:c,wrapStyle:h,dropdownTriggerKls:f,dropdownSize:A,triggerId:b,currentTabId:u,handleCurrentTabIdChange:T,handlerMainButtonClick:H=>{e("click",H)},handleClose:k,handleOpen:C,handleBeforeShowTooltip:I,handleShowTooltip:L,handleBeforeHideTooltip:R,popperRef:a,contentRef:l,triggeringElementRef:o,referenceElementRef:r}}});function u1e(t,e,n,i,s,o){const r=B("el-roving-focus-group"),a=B("el-scrollbar"),l=B("el-only-child"),c=B("el-tooltip"),u=B("el-button"),d=B("arrow-down"),h=B("el-icon"),f=B("el-button-group");return v(),$("div",{class:q([t.ns.b(),t.ns.is("disabled",t.disabled)])},[_(c,{ref:"popperRef",role:t.role,effect:t.effect,"fallback-placements":["bottom","top"],"popper-options":t.popperOptions,"gpu-acceleration":!1,placement:t.placement,"popper-class":[t.ns.e("popper"),t.popperClass],"popper-style":t.popperStyle,trigger:t.trigger,"trigger-keys":t.triggerKeys,"trigger-target-el":t.contentRef,"show-arrow":t.showArrow,"show-after":t.trigger==="hover"?t.showTimeout:0,"hide-after":t.trigger==="hover"?t.hideTimeout:0,"virtual-ref":t.virtualRef??t.triggeringElementRef,"virtual-triggering":t.virtualTriggering||t.splitButton,disabled:t.disabled,transition:`${t.ns.namespace.value}-zoom-in-top`,teleported:t.teleported,"append-to":t.appendTo,pure:"","focus-on-target":"",persistent:t.persistent,onBeforeShow:t.handleBeforeShowTooltip,onShow:t.handleShowTooltip,onBeforeHide:t.handleBeforeHideTooltip},hs({content:y(()=>[_(a,{ref:"scrollbar","wrap-style":t.wrapStyle,tag:"div","view-class":t.ns.e("list")},{default:y(()=>[_(r,{loop:t.loop,"current-tab-id":t.currentTabId,orientation:"horizontal",onCurrentTabIdChange:t.handleCurrentTabIdChange},{default:y(()=>[le(t.$slots,"dropdown")]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange"])]),_:3},8,["wrap-style","view-class"])]),_:2},[t.splitButton?void 0:{name:"default",fn:y(()=>[_(l,{id:t.triggerId,ref:"triggeringElementRef",role:"button",tabindex:t.tabindex},{default:y(()=>[le(t.$slots,"default")]),_:3},8,["id","tabindex"])]),key:"0"}]),1032,["role","effect","popper-options","placement","popper-class","popper-style","trigger","trigger-keys","trigger-target-el","show-arrow","show-after","hide-after","virtual-ref","virtual-triggering","disabled","transition","teleported","append-to","persistent","onBeforeShow","onShow","onBeforeHide"]),t.splitButton?(v(),D(f,{key:0},{default:y(()=>[_(u,Yt({ref:"referenceElementRef"},t.buttonProps,{size:t.dropdownSize,type:t.type,disabled:t.disabled,tabindex:t.tabindex,onClick:t.handlerMainButtonClick}),{default:y(()=>[le(t.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),_(u,Yt({id:t.triggerId,ref:"triggeringElementRef"},t.buttonProps,{role:"button",size:t.dropdownSize,type:t.type,class:t.ns.e("caret-button"),disabled:t.disabled,tabindex:t.tabindex,"aria-label":t.t("el.dropdown.toggleDropdown")}),{default:y(()=>[_(h,{class:q(t.ns.e("icon"))},{default:y(()=>[_(d)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):O("v-if",!0)],2)}var d1e=vi(c1e,[["render",u1e]]),h1e=fe({name:"DropdownItemImpl",components:{ElIcon:we},props:iF,emits:["pointermove","pointerleave","click","clickimpl"],setup(t,{emit:e}){const n=Be("dropdown"),{role:i}=qe(a2,void 0),{collectionItemRef:s}=qe(Yge,void 0),{rovingFocusGroupItemRef:o,tabIndex:r,handleFocus:a,handleKeydown:l,handleMousedown:c}=qe(lF,void 0),u=S8(s,o),d=W(()=>i.value==="menu"?"menuitem":i.value==="navigation"?"link":"button"),h=Ms(f=>{const p=ls(f);if([Ue.enter,Ue.numpadEnter,Ue.space].includes(p))return f.preventDefault(),f.stopImmediatePropagation(),e("clickimpl",f),!0},l);return{ns:n,itemRef:u,dataset:{[rF]:""},role:d,tabIndex:r,handleFocus:a,handleKeydown:h,handleMousedown:c}}});const f1e=["aria-disabled","tabindex","role"];function p1e(t,e,n,i,s,o){const r=B("el-icon");return v(),$(J,null,[t.divided?(v(),$("li",{key:0,role:"separator",class:q(t.ns.bem("menu","item","divided"))},null,2)):O("v-if",!0),g("li",Yt({ref:t.itemRef},{...t.dataset,...t.$attrs},{"aria-disabled":t.disabled,class:[t.ns.be("menu","item"),t.ns.is("disabled",t.disabled)],tabindex:t.tabIndex,role:t.role,onClick:e[0]||(e[0]=a=>t.$emit("clickimpl",a)),onFocus:e[1]||(e[1]=(...a)=>t.handleFocus&&t.handleFocus(...a)),onKeydown:e[2]||(e[2]=Me((...a)=>t.handleKeydown&&t.handleKeydown(...a),["self"])),onMousedown:e[3]||(e[3]=(...a)=>t.handleMousedown&&t.handleMousedown(...a)),onPointermove:e[4]||(e[4]=a=>t.$emit("pointermove",a)),onPointerleave:e[5]||(e[5]=a=>t.$emit("pointerleave",a))}),[t.icon||t.$slots.icon?(v(),D(r,{key:0},{default:y(()=>[le(t.$slots,"icon",{},()=>[(v(),D(Ct(t.icon)))])]),_:3})):O("v-if",!0),le(t.$slots,"default")],16,f1e)],64)}var m1e=vi(h1e,[["render",p1e]]);const cF=()=>{const t=qe(oF,{});return{elDropdown:t,_elDropdownSize:W(()=>t==null?void 0:t.dropdownSize)}};var g1e=fe({name:"ElDropdownItem",components:{ElRovingFocusItem:r1e,ElDropdownItemImpl:m1e},inheritAttrs:!1,props:iF,emits:["pointermove","pointerleave","click"],setup(t,{emit:e,attrs:n}){const{elDropdown:i}=cF(),s=pt(),{onItemEnter:o,onItemLeave:r}=qe(a2,void 0),a=Ms(c=>(e("pointermove",c),c.defaultPrevented),k$(c=>{if(t.disabled){r(c);return}const u=c.currentTarget;u===document.activeElement||u.contains(document.activeElement)||(o(c),c.defaultPrevented||u==null||u.focus({preventScroll:!0}))})),l=Ms(c=>(e("pointerleave",c),c.defaultPrevented),k$(r));return{handleClick:Ms(c=>{if(!t.disabled)return e("click",c),c.type!=="keydown"&&c.defaultPrevented},c=>{var u,d,h;if(t.disabled){c.stopImmediatePropagation();return}(u=i==null?void 0:i.hideOnClick)!=null&&u.value&&((d=i.handleClick)==null||d.call(i)),(h=i.commandHandler)==null||h.call(i,t.command,s,c)}),handlePointerMove:a,handlePointerLeave:l,propsAndAttrs:W(()=>({...t,...n}))}}});function v1e(t,e,n,i,s,o){const r=B("el-dropdown-item-impl"),a=B("el-roving-focus-item");return v(),D(a,{focusable:!t.disabled},{default:y(()=>[_(r,Yt(t.propsAndAttrs,{onPointerleave:t.handlePointerLeave,onPointermove:t.handlePointerMove,onClickimpl:t.handleClick}),hs({default:y(()=>[le(t.$slots,"default")]),_:2},[t.$slots.icon?{name:"icon",fn:y(()=>[le(t.$slots,"icon")]),key:"0"}:void 0]),1040,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])}var uF=vi(g1e,[["render",v1e]]),_1e=fe({name:"ElDropdownMenu",props:Dge,setup(t){const e=Be("dropdown"),{_elDropdownSize:n}=cF(),i=n.value,{contentRef:s,role:o,triggerId:r,isUsingKeyboard:a,handleClose:l}=qe(a2,void 0),{rovingFocusGroupRef:c,rovingFocusGroupRootStyle:u,onBlur:d,onFocus:h,onKeydown:f,onMousedown:p}=qe(A8,void 0),{collectionRef:m}=qe(aF,void 0),b=W(()=>[e.b("menu"),e.bm("menu",i==null?void 0:i.value)]),w=S8(s,c,m),k=Ms(A=>{var S;(S=t.onKeydown)==null||S.call(t,A)},A=>{const{currentTarget:S,target:M}=A,P=ls(A);if(S.contains(M),Ue.tab===P)return l();f(A)});function C(A){a.value&&h(A)}return{size:i,rovingFocusGroupRootStyle:u,dropdownKls:b,role:o,triggerId:r,dropdownListWrapperRef:w,handleKeydown:k,onBlur:d,handleFocus:C,onMousedown:p}}});const y1e=["role","aria-labelledby"];function b1e(t,e,n,i,s,o){return v(),$("ul",{ref:t.dropdownListWrapperRef,class:q(t.dropdownKls),style:Xe(t.rovingFocusGroupRootStyle),tabindex:-1,role:t.role,"aria-labelledby":t.triggerId,onFocusin:e[0]||(e[0]=(...r)=>t.handleFocus&&t.handleFocus(...r)),onFocusout:e[1]||(e[1]=(...r)=>t.onBlur&&t.onBlur(...r)),onKeydown:e[2]||(e[2]=Me((...r)=>t.handleKeydown&&t.handleKeydown(...r),["self"])),onMousedown:e[3]||(e[3]=Me((...r)=>t.onMousedown&&t.onMousedown(...r),["self"]))},[le(t.$slots,"default")],46,y1e)}var dF=vi(_1e,[["render",b1e]]);const $r=Gt(d1e,{DropdownItem:uF,DropdownMenu:dF}),Ar=Os(uF),Er=Os(dF),w1e=Ge({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:de([String,Object])},previewSrcList:{type:de(Array),default:()=>li([])},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},scale:{type:Number,default:1},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},showProgress:Boolean,crossorigin:{type:de(String)}}),k1e={load:t=>t instanceof Event,error:t=>t instanceof Event,switch:t=>wt(t),close:()=>!0,show:()=>!0},C1e=Ge({urlList:{type:de(Array),default:()=>li([])},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},scale:{type:Number,default:1},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},showProgress:Boolean,crossorigin:{type:de(String)}}),x1e={close:()=>!0,error:t=>t instanceof Event,switch:t=>wt(t),rotate:t=>wt(t)},S1e=["src","crossorigin"];var $1e=fe({name:"ElImageViewer",__name:"image-viewer",props:C1e,emits:x1e,setup(t,{expose:e,emit:n}){const i={CONTAIN:{name:"contain",icon:Xs(yR)},ORIGINAL:{name:"original",icon:Xs(zle)}},s=t,o=n;let r;const{t:a}=en(),l=Be("image-viewer"),{nextZIndex:c}=Zb(),u=ee(),d=ee(),h=_b(),f=W(()=>{const{scale:ie,minScale:re,maxScale:ke}=s;return wD(ie,re,ke)}),p=ee(!0),m=ee(!1),b=ee(!1),w=ee(s.initialIndex),k=Fn(i.CONTAIN),C=ee({scale:f.value,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),A=ee(s.zIndex??c());D4(b,{ns:l});const S=W(()=>{const{urlList:ie}=s;return ie.length<=1}),M=W(()=>w.value===0),P=W(()=>w.value===s.urlList.length-1),T=W(()=>s.urlList[w.value]),I=W(()=>[l.e("btn"),l.e("prev"),l.is("disabled",!s.infinite&&M.value)]),L=W(()=>[l.e("btn"),l.e("next"),l.is("disabled",!s.infinite&&P.value)]),R=W(()=>{const{scale:ie,deg:re,offsetX:ke,offsetY:je,enableTransition:te}=C.value;let se=ke/ie,me=je/ie;const $e=re*Math.PI/180,Se=Math.cos($e),Le=Math.sin($e);se=se*Se+me*Le,me=me*Se-ke/ie*Le;const We={transform:`scale(${ie}) rotate(${re}deg) translate(${se}px, ${me}px)`,transition:te?"transform .3s":""};return k.value.name===i.CONTAIN.name&&(We.maxWidth=We.maxHeight="100%"),We}),V=W(()=>`${w.value+1} / ${s.urlList.length}`);function H(){U(),r==null||r(),b.value=!1,o("close")}function F(){const ie=Gv(ke=>{switch(ls(ke)){case Ue.esc:s.closeOnPressEscape&&H();break;case Ue.space:Q();break;case Ue.left:K();break;case Ue.up:ge("zoomIn");break;case Ue.right:ae();break;case Ue.down:ge("zoomOut");break}}),re=Gv(ke=>{ge((ke.deltaY||ke.deltaX)<0?"zoomIn":"zoomOut",{zoomRate:s.zoomRate,enableTransition:!1})});h.run(()=>{Hn(document,"keydown",ie),Hn(u,"wheel",re)})}function U(){h.stop()}function Y(){p.value=!1}function z(ie){m.value=!0,p.value=!1,o("error",ie),ie.target.alt=a("el.image.error")}function X(ie){if(p.value||ie.button!==0||!u.value)return;C.value.enableTransition=!1;const{offsetX:re,offsetY:ke}=C.value,je=ie.pageX,te=ie.pageY,se=Gv(Se=>{C.value={...C.value,offsetX:re+Se.pageX-je,offsetY:ke+Se.pageY-te}}),me=Hn(document,"mousemove",se),$e=Hn(document,"mouseup",()=>{me(),$e()});ie.preventDefault()}function Z(ie){if(p.value||!u.value||ie.touches.length!==1)return;C.value.enableTransition=!1;const{offsetX:re,offsetY:ke}=C.value,{pageX:je,pageY:te}=ie.touches[0],se=Gv(Se=>{const Le=Se.touches[0];C.value={...C.value,offsetX:re+Le.pageX-je,offsetY:ke+Le.pageY-te}}),me=Hn(document,"touchmove",se),$e=Hn(document,"touchend",()=>{me(),$e()});ie.preventDefault()}function G(){C.value={scale:f.value,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function Q(){if(p.value||m.value)return;const ie=y0(i),re=Object.values(i),ke=k.value.name;k.value=i[ie[(re.findIndex(je=>je.name===ke)+1)%ie.length]],G()}function ne(ie){m.value=!1;const re=s.urlList.length;w.value=(ie+re)%re}function K(){M.value&&!s.infinite||ne(w.value-1)}function ae(){P.value&&!s.infinite||ne(w.value+1)}function ge(ie,re={}){if(p.value||m.value)return;const{minScale:ke,maxScale:je}=s,{zoomRate:te,rotateDeg:se,enableTransition:me}={zoomRate:s.zoomRate,rotateDeg:90,enableTransition:!0,...re};switch(ie){case"zoomOut":C.value.scale>ke&&(C.value.scale=Number.parseFloat((C.value.scale/te).toFixed(3)));break;case"zoomIn":C.value.scale<je&&(C.value.scale=Number.parseFloat((C.value.scale*te).toFixed(3)));break;case"clockwise":C.value.deg+=se,o("rotate",C.value.deg);break;case"anticlockwise":C.value.deg-=se,o("rotate",C.value.deg);break}C.value.enableTransition=me}function Ce(ie){var re;((re=ie.detail)==null?void 0:re.focusReason)==="pointer"&&ie.preventDefault()}function oe(){s.closeOnPressEscape&&H()}function pe(ie){if(ie.ctrlKey){if(ie.deltaY<0)return ie.preventDefault(),!1;if(ie.deltaY>0)return ie.preventDefault(),!1}}return Te(()=>f.value,ie=>{C.value.scale=ie}),Te(T,()=>{ot(()=>{var ie;(ie=d.value)!=null&&ie.complete||(p.value=!0)})}),Te(w,ie=>{G(),o("switch",ie)}),Nt(()=>{b.value=!0,F(),r=Hn("wheel",pe,{passive:!1})}),e({setActiveItem:ne}),(ie,re)=>(v(),D(E(t2),{to:"body",disabled:!t.teleported},{default:y(()=>[_(jo,{name:"viewer-fade",appear:""},{default:y(()=>[g("div",{ref_key:"wrapper",ref:u,tabindex:-1,class:q(E(l).e("wrapper")),style:Xe({zIndex:A.value})},[_(E(Y1),{loop:"",trapped:"","focus-trap-el":u.value,"focus-start-el":"container",onFocusoutPrevented:Ce,onReleaseRequested:oe},{default:y(()=>[g("div",{class:q(E(l).e("mask")),onClick:re[0]||(re[0]=Me(ke=>t.hideOnClickModal&&H(),["self"]))},null,2),O(" CLOSE "),g("span",{class:q([E(l).e("btn"),E(l).e("close")]),onClick:H},[_(E(we),null,{default:y(()=>[_(E(Ho))]),_:1})],2),O(" ARROW "),S.value?O("v-if",!0):(v(),$(J,{key:0},[g("span",{class:q(I.value),onClick:K},[_(E(we),null,{default:y(()=>[_(E(wd))]),_:1})],2),g("span",{class:q(L.value),onClick:ae},[_(E(we),null,{default:y(()=>[_(E(jr))]),_:1})],2)],64)),ie.$slots.progress||t.showProgress?(v(),$("div",{key:1,class:q([E(l).e("btn"),E(l).e("progress")])},[le(ie.$slots,"progress",{activeIndex:w.value,total:t.urlList.length},()=>[N(x(V.value),1)])],2)):O("v-if",!0),O(" ACTIONS "),g("div",{class:q([E(l).e("btn"),E(l).e("actions")])},[g("div",{class:q(E(l).e("actions__inner"))},[le(ie.$slots,"toolbar",{actions:ge,prev:K,next:ae,reset:Q,activeIndex:w.value,setActiveItem:ne},()=>[_(E(we),{onClick:re[1]||(re[1]=ke=>ge("zoomOut"))},{default:y(()=>[_(E(sce))]),_:1}),_(E(we),{onClick:re[2]||(re[2]=ke=>ge("zoomIn"))},{default:y(()=>[_(E(CR))]),_:1}),g("i",{class:q(E(l).e("actions__divider"))},null,2),_(E(we),{onClick:Q},{default:y(()=>[(v(),D(Ct(k.value.icon)))]),_:1}),g("i",{class:q(E(l).e("actions__divider"))},null,2),_(E(we),{onClick:re[3]||(re[3]=ke=>ge("anticlockwise"))},{default:y(()=>[_(E(kR))]),_:1}),_(E(we),{onClick:re[4]||(re[4]=ke=>ge("clockwise"))},{default:y(()=>[_(E(Nle))]),_:1})])],2)],2),O(" CANVAS "),g("div",{class:q(E(l).e("canvas"))},[m.value&&ie.$slots["viewer-error"]?le(ie.$slots,"viewer-error",{key:0,activeIndex:w.value,src:T.value}):(v(),$("img",{ref_key:"imgRef",ref:d,key:T.value,src:T.value,style:Xe(R.value),class:q(E(l).e("img")),crossorigin:t.crossorigin,onLoad:Y,onError:z,onMousedown:X,onTouchstart:Z},null,46,S1e))],2),le(ie.$slots,"default")]),_:3},8,["focus-trap-el"])],6)]),_:3})]),_:3},8,["disabled"]))}}),A1e=$1e;const hF=Gt(A1e),E1e=["src","loading","crossorigin"],M1e={key:0};var T1e=fe({name:"ElImage",inheritAttrs:!1,__name:"image",props:w1e,emits:k1e,setup(t,{expose:e,emit:n}){const i=t,s=n,{t:o}=en(),r=Be("image"),a=Rd(),l=W(()=>Df(Object.entries(a).filter(([z])=>/^(data-|on[A-Z])/i.test(z)||["id","style"].includes(z)))),c=Gb({excludeListeners:!0,excludeKeys:W(()=>Object.keys(l.value))}),u=ee(),d=ee(!1),h=ee(!0),f=ee(!1),p=ee(),m=ee(),b=Jt&&"loading"in HTMLImageElement.prototype;let w;const k=W(()=>[r.e("inner"),A.value&&r.e("preview"),h.value&&r.is("loading")]),C=W(()=>{const{fit:z}=i;return Jt&&z?{objectFit:z}:{}}),A=W(()=>{const{previewSrcList:z}=i;return Ee(z)&&z.length>0}),S=W(()=>{const{previewSrcList:z,initialIndex:X}=i;let Z=X;return X>z.length-1&&(Z=0),Z}),M=W(()=>i.loading==="eager"?!1:!b&&i.loading==="lazy"||i.lazy),P=()=>{Jt&&(h.value=!0,d.value=!1,u.value=i.src)};function T(z){h.value=!1,d.value=!1,s("load",z)}function I(z){h.value=!1,d.value=!0,s("error",z)}function L(z){z&&(P(),H())}const R=Iie(L,200,!0);async function V(){if(!Jt)return;await ot();const{scrollContainer:z}=i;if(Lo(z))m.value=z;else if(Ke(z)&&z!=="")m.value=document.querySelector(z)??void 0;else if(p.value){const Z=eoe(p.value);m.value=_ie(Z)?void 0:Z}const{stop:X}=Nie(p,([Z])=>{R(Z.isIntersecting)},{root:m});w=X}function H(){!Jt||!R||(w==null||w(),m.value=void 0,w=void 0)}function F(){A.value&&(f.value=!0,s("show"))}function U(){f.value=!1,s("close")}function Y(z){s("switch",z)}return Te(()=>i.src,()=>{M.value?(h.value=!0,d.value=!1,H(),V()):P()}),Nt(()=>{M.value?V():P()}),e({showPreview:F}),(z,X)=>(v(),$("div",Yt({ref_key:"container",ref:p},l.value,{class:[E(r).b(),z.$attrs.class]}),[d.value?le(z.$slots,"error",{key:0},()=>[g("div",{class:q(E(r).e("error"))},x(E(o)("el.image.error")),3)]):(v(),$(J,{key:1},[u.value!==void 0?(v(),$("img",Yt({key:0},E(c),{src:u.value,loading:t.loading,style:C.value,class:k.value,crossorigin:t.crossorigin,onClick:F,onLoad:T,onError:I}),null,16,E1e)):O("v-if",!0),h.value?(v(),$("div",{key:1,class:q(E(r).e("wrapper"))},[le(z.$slots,"placeholder",{},()=>[g("div",{class:q(E(r).e("placeholder"))},null,2)])],2)):O("v-if",!0)],64)),A.value?(v(),$(J,{key:2},[f.value?(v(),D(E(hF),{key:0,"z-index":t.zIndex,"initial-index":S.value,infinite:t.infinite,"zoom-rate":t.zoomRate,"min-scale":t.minScale,"max-scale":t.maxScale,"show-progress":t.showProgress,"url-list":t.previewSrcList,scale:t.scale,crossorigin:t.crossorigin,"hide-on-click-modal":t.hideOnClickModal,teleported:t.previewTeleported,"close-on-press-escape":t.closeOnPressEscape,onClose:U,onSwitch:Y},hs({toolbar:y(Z=>[le(z.$slots,"toolbar",ef(of(Z)))]),default:y(()=>[z.$slots.viewer?(v(),$("div",M1e,[le(z.$slots,"viewer")])):O("v-if",!0)]),_:2},[z.$slots.progress?{name:"progress",fn:y(Z=>[le(z.$slots,"progress",ef(of(Z)))]),key:"0"}:void 0,z.$slots["viewer-error"]?{name:"viewer-error",fn:y(Z=>[le(z.$slots,"viewer-error",ef(of(Z)))]),key:"1"}:void 0]),1032,["z-index","initial-index","infinite","zoom-rate","min-scale","max-scale","show-progress","url-list","scale","crossorigin","hide-on-click-modal","teleported","close-on-press-escape"])):O("v-if",!0)],64)):O("v-if",!0)],16))}}),P1e=T1e;const bo=Gt(P1e),I1e=Ge({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.MAX_SAFE_INTEGER},min:{type:Number,default:Number.MIN_SAFE_INTEGER},modelValue:{type:[Number,null]},readonly:Boolean,disabled:{type:Boolean,default:void 0},size:Zi,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:de([String,Number,null]),validator:t=>t===null||wt(t)||["min","max"].includes(t),default:null},name:String,placeholder:String,precision:{type:Number,validator:t=>t>=0&&t===Number.parseInt(`${t}`,10)},validateEvent:{type:Boolean,default:!0},...Sr(["ariaLabel"]),inputmode:{type:de(String),default:void 0},align:{type:de(String),default:"center"},disabledScientific:Boolean}),L1e={[dn]:(t,e)=>e!==t,blur:t=>t instanceof FocusEvent,focus:t=>t instanceof FocusEvent,[Vo]:t=>wt(t)||hi(t),[Mt]:t=>wt(t)||hi(t)},O1e=["aria-label"],D1e=["aria-label"];var R1e=fe({name:"ElInputNumber",__name:"input-number",props:I1e,emits:L1e,setup(t,{expose:e,emit:n}){const i=t,s=n,{t:o}=en(),r=Be("input-number"),a=ee(),l=In({currentValue:i.modelValue,userInput:null}),{formItem:c}=_o(),u=W(()=>wt(i.modelValue)&&i.modelValue<=i.min),d=W(()=>wt(i.modelValue)&&i.modelValue>=i.max),h=W(()=>{const z=k(i.step);return sn(i.precision)?Math.max(k(i.modelValue),z):(z>i.precision&&Tt("InputNumber","precision should not be less than the decimal places of step"),i.precision)}),f=W(()=>i.controls&&i.controlsPosition==="right"),p=Ii(),m=bs(),b=W(()=>{if(l.userInput!==null)return l.userInput;let z=l.currentValue;if(hi(z))return"";if(wt(z)){if(Number.isNaN(z))return"";sn(i.precision)||(z=z.toFixed(i.precision))}return z}),w=(z,X)=>{if(sn(X)&&(X=h.value),X===0)return Math.round(z);let Z=String(z);const G=Z.indexOf(".");if(G===-1||!Z.replace(".","").split("")[G+X])return z;const Q=Z.length;return Z.charAt(Q-1)==="5"&&(Z=`${Z.slice(0,Math.max(0,Q-1))}6`),Number.parseFloat(Number(Z).toFixed(X))},k=z=>{if(hi(z))return 0;const X=z.toString(),Z=X.indexOf(".");let G=0;return Z!==-1&&(G=X.length-Z-1),G},C=(z,X=1)=>wt(z)?z>=Number.MAX_SAFE_INTEGER&&X===1?(Tt("InputNumber","The value has reached the maximum safe integer limit."),z):z<=Number.MIN_SAFE_INTEGER&&X===-1?(Tt("InputNumber","The value has reached the minimum safe integer limit."),z):w(z+i.step*X):l.currentValue,A=z=>{const X=ls(z),Z=OD(z);if(i.disabledScientific&&["e","E"].includes(Z)){z.preventDefault();return}switch(X){case Ue.up:z.preventDefault(),S();break;case Ue.down:z.preventDefault(),M();break}},S=()=>{i.readonly||m.value||d.value||(T(C(Number(b.value)||0)),s(Vo,l.currentValue),U())},M=()=>{i.readonly||m.value||u.value||(T(C(Number(b.value)||0,-1)),s(Vo,l.currentValue),U())},P=(z,X)=>{const{max:Z,min:G,step:Q,precision:ne,stepStrictly:K,valueOnClear:ae}=i;Z<G&&vo("InputNumber","min should not be greater than max.");let ge=Number(z);if(hi(z)||Number.isNaN(ge))return null;if(z===""){if(ae===null)return null;ge=Ke(ae)?{min:G,max:Z}[ae]:ae}return K&&(ge=w(Math.round(w(ge/Q))*Q,ne),ge!==z&&X&&s(Mt,ge)),sn(ne)||(ge=w(ge,ne)),(ge>Z||ge<G)&&(ge=ge>Z?Z:G,X&&s(Mt,ge)),ge},T=(z,X=!0)=>{var Q;const Z=l.currentValue,G=P(z);if(!X){s(Mt,G);return}l.userInput=null,!(Z===G&&z)&&(s(Mt,G),Z!==G&&s(dn,G,Z),i.validateEvent&&((Q=c==null?void 0:c.validate)==null||Q.call(c,"change").catch(ne=>Tt(ne))),l.currentValue=G)},I=z=>{l.userInput=z;const X=z===""?null:Number(z);s(Vo,X),T(X,!1)},L=z=>{const X=z!==""?Number(z):"";(wt(X)&&!Number.isNaN(X)||z==="")&&T(X),U(),l.userInput=null},R=()=>{var z,X;(X=(z=a.value)==null?void 0:z.focus)==null||X.call(z)},V=()=>{var z,X;(X=(z=a.value)==null?void 0:z.blur)==null||X.call(z)},H=z=>{s("focus",z)},F=z=>{var X,Z;l.userInput=null,l.currentValue===null&&((X=a.value)!=null&&X.input)&&(a.value.input.value=""),s("blur",z),i.validateEvent&&((Z=c==null?void 0:c.validate)==null||Z.call(c,"blur").catch(G=>Tt(G)))},U=()=>{l.currentValue!==i.modelValue&&(l.currentValue=i.modelValue)},Y=z=>{document.activeElement===z.target&&z.preventDefault()};return Te(()=>i.modelValue,(z,X)=>{const Z=P(z,!0);l.userInput===null&&Z!==X&&(l.currentValue=Z)},{immediate:!0}),Te(()=>i.precision,()=>{l.currentValue=P(i.modelValue)}),Nt(()=>{var Q;const{min:z,max:X,modelValue:Z}=i,G=(Q=a.value)==null?void 0:Q.input;if(G.setAttribute("role","spinbutton"),Number.isFinite(X)?G.setAttribute("aria-valuemax",String(X)):G.removeAttribute("aria-valuemax"),Number.isFinite(z)?G.setAttribute("aria-valuemin",String(z)):G.removeAttribute("aria-valuemin"),G.setAttribute("aria-valuenow",l.currentValue||l.currentValue===0?String(l.currentValue):""),G.setAttribute("aria-disabled",String(m.value)),!wt(Z)&&Z!=null){let ne=Number(Z);Number.isNaN(ne)&&(ne=null),s(Mt,ne)}G.addEventListener("wheel",Y,{passive:!1})}),xl(()=>{var z,X;(X=(z=a.value)==null?void 0:z.input)==null||X.setAttribute("aria-valuenow",`${l.currentValue??""}`)}),e({focus:R,blur:V}),(z,X)=>(v(),$("div",{class:q([E(r).b(),E(r).m(E(p)),E(r).is("disabled",E(m)),E(r).is("without-controls",!t.controls),E(r).is("controls-right",f.value),E(r).is(t.align,!!t.align)]),onDragstart:X[0]||(X[0]=Me(()=>{},["prevent"]))},[t.controls?Re((v(),$("span",{key:0,role:"button","aria-label":E(o)("el.inputNumber.decrease"),class:q([E(r).e("decrease"),E(r).is("disabled",u.value)]),onKeydown:ut(M,["enter"])},[le(z.$slots,"decrease-icon",{},()=>[_(E(we),null,{default:y(()=>[f.value?(v(),D(E(zd),{key:0})):(v(),D(E(_le),{key:1}))]),_:1})])],42,O1e)),[[E(S0),M]]):O("v-if",!0),t.controls?Re((v(),$("span",{key:1,role:"button","aria-label":E(o)("el.inputNumber.increase"),class:q([E(r).e("increase"),E(r).is("disabled",d.value)]),onKeydown:ut(S,["enter"])},[le(z.$slots,"increase-icon",{},()=>[_(E(we),null,{default:y(()=>[f.value?(v(),D(E(n2),{key:0})):(v(),D(E(e8),{key:1}))]),_:1})])],42,D1e)),[[E(S0),S]]):O("v-if",!0),_(E(ht),{id:t.id,ref_key:"input",ref:a,type:"number",step:t.step,"model-value":b.value,placeholder:t.placeholder,readonly:t.readonly,disabled:E(m),size:E(p),max:t.max,min:t.min,name:t.name,"aria-label":t.ariaLabel,"validate-event":!1,inputmode:t.inputmode,onKeydown:A,onBlur:F,onFocus:H,onInput:I,onChange:L},hs({_:2},[z.$slots.prefix?{name:"prefix",fn:y(()=>[le(z.$slots,"prefix")]),key:"0"}:void 0,z.$slots.suffix?{name:"suffix",fn:y(()=>[le(z.$slots,"suffix")]),key:"1"}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","inputmode"])],34))}}),V1e=R1e;const l2=Gt(V1e),F1e=Ge({modelValue:{type:de(Array)},max:Number,tagType:{...i1.type,default:"info"},tagEffect:i1.effect,effect:{type:de(String),default:"light"},trigger:{type:de(String),default:Ue.enter},draggable:Boolean,delimiter:{type:[String,RegExp],default:""},size:Zi,clearable:Boolean,clearIcon:{type:ds,default:Zc},disabled:{type:Boolean,default:void 0},validateEvent:{type:Boolean,default:!0},readonly:Boolean,autofocus:Boolean,id:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},placeholder:String,autocomplete:{type:de(String),default:"off"},saveOnBlur:{type:Boolean,default:!0},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},ariaLabel:String}),N1e={[Mt]:t=>Ee(t)||sn(t),[dn]:t=>Ee(t)||sn(t),[Vo]:t=>Ke(t),"add-tag":t=>Ke(t)||Ee(t),"remove-tag":(t,e)=>Ke(t)&&wt(e),"drag-tag":(t,e,n)=>wt(t)&&wt(e)&&Ke(n),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0};function B1e({wrapperRef:t,handleDragged:e,afterDragged:n}){const i=Be("input-tag"),s=Fn(),o=ee(!1);let r,a,l,c;function u(p){return`.${i.e("inner")} .${i.namespace.value}-tag:nth-child(${p+1})`}function d(p,m){r=m,a=t.value.querySelector(u(m)),a&&(a.style.opacity="0.5"),p.dataTransfer.effectAllowed="move"}function h(p,m){if(l=m,p.preventDefault(),p.dataTransfer.dropEffect="move",sn(r)||r===m){o.value=!1;return}const b=t.value.querySelector(u(m)).getBoundingClientRect(),w=r+1!==m,k=r-1!==m,C=p.clientX-b.left,A=w?k?.5:1:-1,S=k?w?.5:0:1;C<=b.width*A?c="before":C>b.width*S?c="after":c=void 0;const M=t.value.querySelector(`.${i.e("inner")}`),P=M.getBoundingClientRect(),T=Number.parseFloat(il(M,"gap"))/2,I=b.top-P.top;let L=-9999;if(c==="before")L=Math.max(b.left-P.left-T,Math.floor(-T/2));else if(c==="after"){const R=b.right-P.left;L=R+(P.width===R?Math.floor(T/2):T)}TD(s.value,{top:`${I}px`,left:`${L}px`}),o.value=!!c}function f(p){p.preventDefault(),a&&(a.style.opacity=""),c&&!sn(r)&&!sn(l)&&r!==l&&e(r,l,c),o.value=!1,r=void 0,a=null,l=void 0,c=void 0,n==null||n()}return{dropIndicatorRef:s,showDropIndicator:o,handleDragStart:d,handleDragOver:h,handleDragEnd:f}}function z1e(){const t=ee(!1);return{hovering:t,handleMouseEnter:()=>{t.value=!0},handleMouseLeave:()=>{t.value=!1}}}function H1e({props:t,emit:e,formItem:n}){const i=bs(),s=Ii(),o=Fn(),r=ee(),a=ee(),l=W(()=>["small"].includes(s.value)?"small":"default"),c=W(()=>{var Y;return(Y=t.modelValue)!=null&&Y.length?void 0:t.placeholder}),u=W(()=>!(t.readonly||i.value)),d=W(()=>{var Y;return sn(t.max)?!1:(((Y=t.modelValue)==null?void 0:Y.length)??0)>=t.max}),h=W(()=>{var Y;return t.collapseTags?(Y=t.modelValue)==null?void 0:Y.slice(0,t.maxCollapseTags):t.modelValue}),f=W(()=>{var Y;return t.collapseTags?(Y=t.modelValue)==null?void 0:Y.slice(t.maxCollapseTags):[]}),p=Y=>{const z=[...t.modelValue??[],...js(Y)];e(Mt,z),e(dn,z),e("add-tag",Y),r.value=void 0},m=Y=>{var Z;const z=Y.split(t.delimiter),X=z.length>1?z.map(G=>G.trim()).filter(Boolean):[];if(t.max){const G=t.max-(((Z=t.modelValue)==null?void 0:Z.length)??0);X.splice(G)}return X.length===1?X[0]:X},b=Y=>{var K;const z=(K=Y.clipboardData)==null?void 0:K.getData("text");if(t.readonly||d.value||!t.delimiter||!z)return;const{selectionStart:X=0,selectionEnd:Z=0,value:G}=Y.target,Q=G.slice(0,X)+z+G.slice(Z),ne=m(Q);ne.length&&(p(ne),e(Vo,Q),Y.preventDefault())},w=Y=>{if(d.value){r.value=void 0;return}if(!V.value){if(t.delimiter&&r.value){const z=m(r.value);z.length&&p(z)}e(Vo,Y.target.value)}},k=Y=>{var z;if(!V.value)switch(ls(Y)){case t.trigger:Y.preventDefault(),Y.stopPropagation(),A();break;case Ue.numpadEnter:t.trigger===Ue.enter&&(Y.preventDefault(),Y.stopPropagation(),A());break;case Ue.backspace:!r.value&&((z=t.modelValue)!=null&&z.length)&&(Y.preventDefault(),Y.stopPropagation(),S(t.modelValue.length-1));break}},C=Y=>{if(!(V.value||!ED()))switch(ls(Y)){case Ue.space:t.trigger===Ue.space&&(Y.preventDefault(),Y.stopPropagation(),A());break}},A=()=>{var z;const Y=(z=r.value)==null?void 0:z.trim();!Y||d.value||p(Y)},S=Y=>{const z=(t.modelValue??[]).slice(),[X]=z.splice(Y,1);e(Mt,z),e(dn,z),e("remove-tag",X,Y)},M=()=>{r.value=void 0,e(Mt,void 0),e(dn,void 0),e("clear")},P=(Y,z,X)=>{const Z=(t.modelValue??[]).slice(),[G]=Z.splice(Y,1),Q=z>Y&&X==="before"?-1:z<Y&&X==="after"?1:0;Z.splice(z+Q,0,G),e(Mt,Z),e(dn,Z),e("drag-tag",Y,z+Q,G)},T=()=>{var Y;(Y=o.value)==null||Y.focus()},I=()=>{var Y;(Y=o.value)==null||Y.blur()},{wrapperRef:L,isFocused:R}=pp(o,{disabled:i,beforeBlur(Y){var z;return(z=a.value)==null?void 0:z.isFocusInsideContent(Y)},afterBlur(){var Y;t.saveOnBlur?A():r.value=void 0,t.validateEvent&&((Y=n==null?void 0:n.validate)==null||Y.call(n,"blur").catch(z=>Tt(z)))}}),{isComposing:V,handleCompositionStart:H,handleCompositionUpdate:F,handleCompositionEnd:U}=X4({afterComposition:w});return Te(()=>t.modelValue,()=>{var Y;t.validateEvent&&((Y=n==null?void 0:n.validate)==null||Y.call(n,dn).catch(z=>Tt(z)))}),{inputRef:o,wrapperRef:L,tagTooltipRef:a,isFocused:R,isComposing:V,inputValue:r,size:s,tagSize:l,placeholder:c,closable:u,disabled:i,inputLimit:d,showTagList:h,collapseTagList:f,handleDragged:P,handlePaste:b,handleInput:w,handleKeydown:k,handleKeyup:C,handleAddTag:A,handleRemoveTag:S,handleClear:M,handleCompositionStart:H,handleCompositionUpdate:F,handleCompositionEnd:U,focus:T,blur:I}}function U1e({props:t,isFocused:e,hovering:n,disabled:i,inputValue:s,size:o,validateState:r,validateIcon:a,needStatusIcon:l}){const c=Rd(),u=gi(),d=Be("input-tag"),h=Be("input"),f=ee(),p=ee(),m=W(()=>[d.b(),d.is("focused",e.value),d.is("hovering",n.value),d.is("disabled",i.value),d.m(o.value),d.e("wrapper"),c.class]),b=W(()=>[c.style]),w=W(()=>{var I,L;return[d.e("inner"),d.is("draggable",t.draggable),d.is("left-space",!((I=t.modelValue)!=null&&I.length)&&!u.prefix),d.is("right-space",!((L=t.modelValue)!=null&&L.length)&&!C.value)]}),k=W(()=>{var I;return t.clearable&&!i.value&&!t.readonly&&(((I=t.modelValue)==null?void 0:I.length)||s.value)&&(e.value||n.value)}),C=W(()=>u.suffix||k.value||r.value&&a.value&&l.value),A=In({innerWidth:0,collapseItemWidth:0}),S=()=>{if(!p.value)return 0;const I=window.getComputedStyle(p.value);return Number.parseFloat(I.gap||"6px")},M=()=>{A.innerWidth=Number.parseFloat(window.getComputedStyle(p.value).width)},P=()=>{A.collapseItemWidth=f.value.getBoundingClientRect().width},T=W(()=>{if(!t.collapseTags)return{};const I=S(),L=I+d4,R=f.value&&t.maxCollapseTags===1?A.innerWidth-A.collapseItemWidth-I-L:A.innerWidth-L;return{maxWidth:`${Math.max(R,0)}px`}});return Ts(p,M),Ts(f,P),{ns:d,nsInput:h,containerKls:m,containerStyle:b,innerKls:w,showClear:k,showSuffix:C,tagStyle:T,collapseItemRef:f,innerRef:p}}const j1e=["id","minlength","maxlength","disabled","readonly","autocomplete","tabindex","placeholder","autofocus","ariaLabel"],W1e=["textContent"];var Y1e=fe({name:"ElInputTag",inheritAttrs:!1,__name:"input-tag",props:F1e,emits:N1e,setup(t,{expose:e,emit:n}){const i=t,s=n,o=Gb(),r=gi(),{form:a,formItem:l}=_o(),{inputId:c}=Tl(i,{formItemContext:l}),u=W(()=>(a==null?void 0:a.statusIcon)??!1),d=W(()=>(l==null?void 0:l.validateState)||""),h=W(()=>d.value&&o8[d.value]),{inputRef:f,wrapperRef:p,tagTooltipRef:m,isFocused:b,inputValue:w,size:k,tagSize:C,placeholder:A,closable:S,disabled:M,showTagList:P,collapseTagList:T,handleDragged:I,handlePaste:L,handleInput:R,handleKeydown:V,handleKeyup:H,handleRemoveTag:F,handleClear:U,handleCompositionStart:Y,handleCompositionUpdate:z,handleCompositionEnd:X,focus:Z,blur:G}=H1e({props:i,emit:s,formItem:l}),{hovering:Q,handleMouseEnter:ne,handleMouseLeave:K}=z1e(),{calculatorRef:ae,inputStyle:ge}=$D(),{dropIndicatorRef:Ce,showDropIndicator:oe,handleDragStart:pe,handleDragOver:ie,handleDragEnd:re}=B1e({wrapperRef:p,handleDragged:I,afterDragged:Z}),{ns:ke,nsInput:je,containerKls:te,containerStyle:se,innerKls:me,showClear:$e,showSuffix:Se,tagStyle:Le,collapseItemRef:We,innerRef:Fe}=U1e({props:i,hovering:Q,isFocused:b,inputValue:w,disabled:M,size:k,validateState:d,validateIcon:h,needStatusIcon:u});return e({focus:Z,blur:G}),(He,Ae)=>(v(),$("div",{ref_key:"wrapperRef",ref:p,class:q(E(te)),style:Xe(E(se)),onMouseenter:Ae[9]||(Ae[9]=(...Ze)=>E(ne)&&E(ne)(...Ze)),onMouseleave:Ae[10]||(Ae[10]=(...Ze)=>E(K)&&E(K)(...Ze))},[E(r).prefix?(v(),$("div",{key:0,class:q(E(ke).e("prefix"))},[le(He.$slots,"prefix")],2)):O("v-if",!0),g("div",{ref_key:"innerRef",ref:Fe,class:q(E(me))},[(v(!0),$(J,null,ye(E(P),(Ze,Ye)=>(v(),D(E(qs),{key:Ye,size:E(C),closable:E(S),type:t.tagType,effect:t.tagEffect,draggable:E(S)&&t.draggable,style:Xe(E(Le)),"disable-transitions":"",onClose:it=>E(F)(Ye),onDragstart:it=>E(pe)(it,Ye),onDragover:it=>E(ie)(it,Ye),onDragend:E(re),onDrop:Ae[0]||(Ae[0]=Me(()=>{},["stop"]))},{default:y(()=>[le(He.$slots,"tag",{value:Ze,index:Ye},()=>[N(x(Ze),1)])]),_:2},1032,["size","closable","type","effect","draggable","style","onClose","onDragstart","onDragover","onDragend"]))),128)),t.collapseTags&&t.modelValue&&t.modelValue.length>t.maxCollapseTags?(v(),D(E(Ss),{key:0,ref_key:"tagTooltipRef",ref:m,disabled:!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom"},{default:y(()=>[g("div",{ref_key:"collapseItemRef",ref:We,class:q(E(ke).e("collapse-tag"))},[_(E(qs),{closable:!1,size:E(C),type:t.tagType,effect:t.tagEffect,"disable-transitions":""},{default:y(()=>[N(" + "+x(t.modelValue.length-t.maxCollapseTags),1)]),_:1},8,["size","type","effect"])],2)]),content:y(()=>[g("div",{class:q(E(ke).e("input-tag-list"))},[(v(!0),$(J,null,ye(E(T),(Ze,Ye)=>(v(),D(E(qs),{key:Ye,size:E(C),closable:E(S),type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:it=>E(F)(Ye+t.maxCollapseTags)},{default:y(()=>[le(He.$slots,"tag",{value:Ze,index:Ye+t.maxCollapseTags},()=>[N(x(Ze),1)])]),_:2},1032,["size","closable","type","effect","onClose"]))),128))],2)]),_:3},8,["disabled","effect"])):O("v-if",!0),g("div",{class:q(E(ke).e("input-wrapper"))},[Re(g("input",Yt({id:E(c),ref_key:"inputRef",ref:f,"onUpdate:modelValue":Ae[1]||(Ae[1]=Ze=>hn(w)?w.value=Ze:null)},E(o),{type:"text",minlength:t.minlength,maxlength:t.maxlength,disabled:E(M),readonly:t.readonly,autocomplete:t.autocomplete,tabindex:t.tabindex,placeholder:E(A),autofocus:t.autofocus,ariaLabel:t.ariaLabel,class:E(ke).e("input"),style:E(ge),onCompositionstart:Ae[2]||(Ae[2]=(...Ze)=>E(Y)&&E(Y)(...Ze)),onCompositionupdate:Ae[3]||(Ae[3]=(...Ze)=>E(z)&&E(z)(...Ze)),onCompositionend:Ae[4]||(Ae[4]=(...Ze)=>E(X)&&E(X)(...Ze)),onPaste:Ae[5]||(Ae[5]=(...Ze)=>E(L)&&E(L)(...Ze)),onInput:Ae[6]||(Ae[6]=(...Ze)=>E(R)&&E(R)(...Ze)),onKeydown:Ae[7]||(Ae[7]=(...Ze)=>E(V)&&E(V)(...Ze)),onKeyup:Ae[8]||(Ae[8]=(...Ze)=>E(H)&&E(H)(...Ze))}),null,16,j1e),[[gd,E(w)]]),g("span",{ref_key:"calculatorRef",ref:ae,"aria-hidden":"true",class:q(E(ke).e("input-calculator")),textContent:x(E(w))},null,10,W1e)],2),Re(g("div",{ref_key:"dropIndicatorRef",ref:Ce,class:q(E(ke).e("drop-indicator"))},null,2),[[jt,E(oe)]])],2),E(Se)?(v(),$("div",{key:1,class:q(E(ke).e("suffix"))},[le(He.$slots,"suffix"),E($e)?(v(),D(E(we),{key:0,class:q([E(ke).e("icon"),E(ke).e("clear")]),onMousedown:Me(E(Dt),["prevent"]),onClick:E(U)},{default:y(()=>[(v(),D(Ct(t.clearIcon)))]),_:1},8,["class","onMousedown","onClick"])):O("v-if",!0),d.value&&h.value&&u.value?(v(),D(E(we),{key:1,class:q([E(je).e("icon"),E(je).e("validateIcon"),E(je).is("loading",d.value==="validating")])},{default:y(()=>[(v(),D(Ct(h.value)))]),_:1},8,["class"])):O("v-if",!0)],2)):O("v-if",!0)],38))}}),q1e=Y1e;const fF=Gt(q1e),G1e=Ge({type:{type:String,values:["primary","success","warning","info","danger","default"],default:void 0},underline:{type:[Boolean,String],values:[!0,!1,"always","never","hover"],default:void 0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:ds}}),X1e={click:t=>t instanceof MouseEvent},K1e=["href","target"];var Z1e=fe({name:"ElLink",__name:"link",props:G1e,emits:X1e,setup(t,{emit:e}){const n=t,i=e,s=Jc("link");fl({scope:"el-link",from:"The underline option (boolean)",replacement:"'always' | 'hover' | 'never'",version:"3.0.0",ref:"https://element-plus.org/en-US/component/link.html#underline"},W(()=>Jn(n.underline)));const o=Be("link"),r=W(()=>{var c;return[o.b(),o.m(n.type??((c=s.value)==null?void 0:c.type)??"default"),o.is("disabled",n.disabled),o.is("underline",a.value==="always"),o.is("hover-underline",a.value==="hover"&&!n.disabled)]}),a=W(()=>{var c;return Jn(n.underline)?n.underline?"hover":"never":n.underline??((c=s.value)==null?void 0:c.underline)??"hover"});function l(c){n.disabled||i("click",c)}return(c,u)=>(v(),$("a",{class:q(r.value),href:t.disabled||!t.href?void 0:t.href,target:t.disabled||!t.href?void 0:t.target,onClick:l},[t.icon?(v(),D(E(we),{key:0},{default:y(()=>[(v(),D(Ct(t.icon)))]),_:1})):O("v-if",!0),c.$slots.default?(v(),$("span",{key:1,class:q(E(o).e("inner"))},[le(c.$slots,"default")],2)):O("v-if",!0),c.$slots.icon?le(c.$slots,"icon",{key:2}):O("v-if",!0)],10,K1e))}}),J1e=Z1e;const E8=Gt(J1e),pF=Symbol("elPaginationKey"),Q1e=Ge({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:ds}}),eve={click:t=>t instanceof MouseEvent},tve=["disabled","aria-label","aria-disabled"],nve={key:0};var sve=fe({name:"ElPaginationPrev",__name:"prev",props:Q1e,emits:eve,setup(t){const e=t,{t:n}=en(),i=W(()=>e.disabled||e.currentPage<=1);return(s,o)=>(v(),$("button",{type:"button",class:"btn-prev",disabled:i.value,"aria-label":s.prevText||E(n)("el.pagination.prev"),"aria-disabled":i.value,onClick:o[0]||(o[0]=r=>s.$emit("click",r))},[s.prevText?(v(),$("span",nve,x(s.prevText),1)):(v(),D(E(we),{key:1},{default:y(()=>[(v(),D(Ct(s.prevIcon)))]),_:1}))],8,tve))}}),ive=sve;const ove=Ge({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:ds}}),rve=["disabled","aria-label","aria-disabled"],ave={key:0};var lve=fe({name:"ElPaginationNext",__name:"next",props:ove,emits:["click"],setup(t){const e=t,{t:n}=en(),i=W(()=>e.disabled||e.currentPage===e.pageCount||e.pageCount===0);return(s,o)=>(v(),$("button",{type:"button",class:"btn-next",disabled:i.value,"aria-label":s.nextText||E(n)("el.pagination.next"),"aria-disabled":i.value,onClick:o[0]||(o[0]=r=>s.$emit("click",r))},[s.nextText?(v(),$("span",ave,x(s.nextText),1)):(v(),D(E(we),{key:1},{default:y(()=>[(v(),D(Ct(s.nextIcon)))]),_:1}))],8,rve))}}),cve=lve;const M8=()=>qe(pF,{}),uve=Ge({pageSize:{type:Number,required:!0},pageSizes:{type:de(Array),default:()=>li([10,20,30,40,50,100])},popperClass:{type:String},popperStyle:{type:de([String,Object])},disabled:Boolean,teleported:Boolean,size:{type:String,values:$l},appendSizeTo:String});var dve=fe({name:"ElPaginationSizes",__name:"sizes",props:uve,emits:["page-size-change"],setup(t,{emit:e}){const n=t,i=e,{t:s}=en(),o=Be("pagination"),r=M8(),a=ee(n.pageSize);Te(()=>n.pageSizes,(u,d)=>{Wi(u,d)||Ee(u)&&i("page-size-change",u.includes(n.pageSize)?n.pageSize:n.pageSizes[0])}),Te(()=>n.pageSize,u=>{a.value=u});const l=W(()=>n.pageSizes);function c(u){var d;u!==a.value&&(a.value=u,(d=r.handleSizeChange)==null||d.call(r,Number(u)))}return(u,d)=>(v(),$("span",{class:q(E(o).e("sizes"))},[_(E(Wt),{"model-value":a.value,disabled:u.disabled,"popper-class":u.popperClass,"popper-style":u.popperStyle,size:u.size,teleported:u.teleported,"validate-event":!1,"append-to":u.appendSizeTo,onChange:c},{default:y(()=>[(v(!0),$(J,null,ye(l.value,h=>(v(),D(E(Zt),{key:h,value:h,label:h+E(s)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","popper-style","size","teleported","append-to"])],2))}}),hve=dve;const fve=Ge({size:{type:String,values:$l}}),pve=["disabled"];var mve=fe({name:"ElPaginationJumper",__name:"jumper",props:fve,setup(t){const{t:e}=en(),n=Be("pagination"),{pageCount:i,disabled:s,currentPage:o,changeEvent:r}=M8(),a=ee(),l=W(()=>a.value??(o==null?void 0:o.value));function c(d){a.value=d?+d:""}function u(d){d=Math.trunc(+d),r==null||r(d),a.value=void 0}return(d,h)=>(v(),$("span",{class:q(E(n).e("jump")),disabled:E(s)},[g("span",{class:q([E(n).e("goto")])},x(E(e)("el.pagination.goto")),3),_(E(ht),{size:d.size,class:q([E(n).e("editor"),E(n).is("in-pagination")]),min:1,max:E(i),disabled:E(s),"model-value":l.value,"validate-event":!1,"aria-label":E(e)("el.pagination.page"),type:"number","onUpdate:modelValue":c,onChange:u},null,8,["size","class","max","disabled","model-value","aria-label"]),g("span",{class:q([E(n).e("classifier")])},x(E(e)("el.pagination.pageClassifier")),3)],10,pve))}}),gve=mve;const vve=Ge({total:{type:Number,default:1e3}}),_ve=["disabled"];var yve=fe({name:"ElPaginationTotal",__name:"total",props:vve,setup(t){const{t:e}=en(),n=Be("pagination"),{disabled:i}=M8();return(s,o)=>(v(),$("span",{class:q(E(n).e("total")),disabled:E(i)},x(E(e)("el.pagination.total",{total:s.total})),11,_ve))}}),bve=yve;const wve=Ge({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),kve=["aria-current","aria-label","tabindex"],Cve=["tabindex","aria-label"],xve=["aria-current","aria-label","tabindex"],Sve=["tabindex","aria-label"],$ve=["aria-current","aria-label","tabindex"];var Ave=fe({name:"ElPaginationPager",__name:"pager",props:wve,emits:[dn],setup(t,{emit:e}){const n=t,i=e,s=Be("pager"),o=Be("icon"),{t:r}=en(),a=ee(!1),l=ee(!1),c=ee(!1),u=ee(!1),d=ee(!1),h=ee(!1),f=W(()=>{const S=n.pagerCount,M=(S-1)/2,P=Number(n.currentPage),T=Number(n.pageCount);let I=!1,L=!1;T>S&&(P>S-M&&(I=!0),P<T-M&&(L=!0));const R=[];if(I&&!L){const V=T-(S-2);for(let H=V;H<T;H++)R.push(H)}else if(!I&&L)for(let V=2;V<S;V++)R.push(V);else if(I&&L){const V=Math.floor(S/2)-1;for(let H=P-V;H<=P+V;H++)R.push(H)}else for(let V=2;V<T;V++)R.push(V);return R}),p=W(()=>["more","btn-quickprev",o.b(),s.is("disabled",n.disabled)]),m=W(()=>["more","btn-quicknext",o.b(),s.is("disabled",n.disabled)]),b=W(()=>n.disabled?-1:0);Te(()=>[n.pageCount,n.pagerCount,n.currentPage],([S,M,P])=>{const T=(M-1)/2;let I=!1,L=!1;S>M&&(I=P>M-T,L=P<S-T),c.value&&(c.value=I),u.value&&(u.value=L),a.value=I,l.value=L},{immediate:!0});function w(S=!1){n.disabled||(S?c.value=!0:u.value=!0)}function k(S=!1){S?d.value=!0:h.value=!0}function C(S){const M=S.target;if(M.tagName.toLowerCase()==="li"&&Array.from(M.classList).includes("number")){const P=Number(M.textContent);P!==n.currentPage&&i(dn,P)}else M.tagName.toLowerCase()==="li"&&Array.from(M.classList).includes("more")&&A(S)}function A(S){const M=S.target;if(M.tagName.toLowerCase()==="ul"||n.disabled)return;let P=Number(M.textContent);const T=n.pageCount,I=n.currentPage,L=n.pagerCount-2;M.className.includes("more")&&(M.className.includes("quickprev")?P=I-L:M.className.includes("quicknext")&&(P=I+L)),Number.isNaN(+P)||(P<1&&(P=1),P>T&&(P=T)),P!==I&&i(dn,P)}return(S,M)=>(v(),$("ul",{class:q(E(s).b()),onClick:A,onKeyup:ut(C,["enter"])},[S.pageCount>0?(v(),$("li",{key:0,class:q([[E(s).is("active",S.currentPage===1),E(s).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===1,"aria-label":E(r)("el.pagination.currentPage",{pager:1}),tabindex:b.value}," 1 ",10,kve)):O("v-if",!0),a.value?(v(),$("li",{key:1,class:q(p.value),tabindex:b.value,"aria-label":E(r)("el.pagination.prevPages",{pager:S.pagerCount-2}),onMouseenter:M[0]||(M[0]=P=>w(!0)),onMouseleave:M[1]||(M[1]=P=>c.value=!1),onFocus:M[2]||(M[2]=P=>k(!0)),onBlur:M[3]||(M[3]=P=>d.value=!1)},[(c.value||d.value)&&!S.disabled?(v(),D(E(zc),{key:0})):(v(),D(E(aC),{key:1}))],42,Cve)):O("v-if",!0),(v(!0),$(J,null,ye(f.value,P=>(v(),$("li",{key:P,class:q([[E(s).is("active",S.currentPage===P),E(s).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===P,"aria-label":E(r)("el.pagination.currentPage",{pager:P}),tabindex:b.value},x(P),11,xve))),128)),l.value?(v(),$("li",{key:2,class:q(m.value),tabindex:b.value,"aria-label":E(r)("el.pagination.nextPages",{pager:S.pagerCount-2}),onMouseenter:M[4]||(M[4]=P=>w()),onMouseleave:M[5]||(M[5]=P=>u.value=!1),onFocus:M[6]||(M[6]=P=>k()),onBlur:M[7]||(M[7]=P=>h.value=!1)},[(u.value||h.value)&&!S.disabled?(v(),D(E(Hc),{key:0})):(v(),D(E(aC),{key:1}))],42,Sve)):O("v-if",!0),S.pageCount>1?(v(),$("li",{key:3,class:q([[E(s).is("active",S.currentPage===S.pageCount),E(s).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===S.pageCount,"aria-label":E(r)("el.pagination.currentPage",{pager:S.pageCount}),tabindex:b.value},x(S.pageCount),11,$ve)):O("v-if",!0)],34))}}),Eve=Ave;const Ri=t=>typeof t!="number",Mve=Ge({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:t=>wt(t)&&Math.trunc(t)===t&&t>4&&t<22&&t%2===1,default:7},currentPage:Number,defaultCurrentPage:Number,layout:{type:String,default:["prev","pager","next","jumper","->","total"].join(", ")},pageSizes:{type:de(Array),default:()=>li([10,20,30,40,50,100])},popperClass:{type:String,default:""},popperStyle:{type:de([String,Object])},prevText:{type:String,default:""},prevIcon:{type:ds,default:()=>wd},nextText:{type:String,default:""},nextIcon:{type:ds,default:()=>jr},teleported:{type:Boolean,default:!0},small:Boolean,size:Zi,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean,appendSizeTo:String}),Tve={"update:current-page":t=>wt(t),"update:page-size":t=>wt(t),"size-change":t=>wt(t),change:(t,e)=>wt(t)&&wt(e),"current-change":t=>wt(t),"prev-click":t=>wt(t),"next-click":t=>wt(t)},TA="ElPagination";var Pve=fe({name:TA,props:Mve,emits:Tve,setup(t,{emit:e,slots:n}){const{t:i}=en(),s=Be("pagination"),o=pt().vnode.props||{},r=cR(),a=W(()=>t.small?"small":t.size??r.value);fl({from:"small",replacement:"size",version:"3.0.0",scope:"el-pagination",ref:"https://element-plus.org/zh-CN/component/pagination.html"},W(()=>!!t.small));const l="onUpdate:currentPage"in o||"onUpdate:current-page"in o||"onCurrentChange"in o,c="onUpdate:pageSize"in o||"onUpdate:page-size"in o||"onSizeChange"in o,u=W(()=>{if(Ri(t.total)&&Ri(t.pageCount)||!Ri(t.currentPage)&&!l)return!1;if(t.layout.includes("sizes")){if(Ri(t.pageCount)){if(!Ri(t.total)&&!Ri(t.pageSize)&&!c)return!1}else if(!c)return!1}return!0}),d=ee(Ri(t.defaultPageSize)?10:t.defaultPageSize),h=ee(Ri(t.defaultCurrentPage)?1:t.defaultCurrentPage),f=W({get(){return Ri(t.pageSize)?d.value:t.pageSize},set(S){Ri(t.pageSize)&&(d.value=S),c&&(e("update:page-size",S),e("size-change",S))}}),p=W(()=>{let S=0;return Ri(t.pageCount)?Ri(t.total)||(S=Math.max(1,Math.ceil(t.total/f.value))):S=t.pageCount,S}),m=W({get(){return Ri(t.currentPage)?h.value:t.currentPage},set(S){let M=S;S<1?M=1:S>p.value&&(M=p.value),Ri(t.currentPage)&&(h.value=M),l&&(e("update:current-page",M),e("current-change",M))}});Te(p,S=>{m.value>S&&(m.value=S)}),Te([m,f],S=>{e(dn,...S)},{flush:"post"});function b(S){m.value=S}function w(S){f.value=S;const M=p.value;m.value>M&&(m.value=M)}function k(){t.disabled||(m.value-=1,e("prev-click",m.value))}function C(){t.disabled||(m.value+=1,e("next-click",m.value))}function A(S,M){S&&(S.props||(S.props={}),S.props.class=[S.props.class,M].join(" "))}return Pt(pF,{pageCount:p,disabled:W(()=>t.disabled),currentPage:m,changeEvent:b,handleSizeChange:w}),()=>{var R;if(!u.value)return Tt(TA,i("el.pagination.deprecationWarning")),null;if(!t.layout||t.hideOnSinglePage&&p.value<=1)return null;const S=[],M=[],P=bt("div",{class:s.e("rightwrapper")},M),T={prev:bt(ive,{disabled:t.disabled,currentPage:m.value,prevText:t.prevText,prevIcon:t.prevIcon,onClick:k}),jumper:bt(gve,{size:a.value}),pager:bt(Eve,{currentPage:m.value,pageCount:p.value,pagerCount:t.pagerCount,onChange:b,disabled:t.disabled}),next:bt(cve,{disabled:t.disabled,currentPage:m.value,pageCount:p.value,nextText:t.nextText,nextIcon:t.nextIcon,onClick:C}),sizes:bt(hve,{pageSize:f.value,pageSizes:t.pageSizes,popperClass:t.popperClass,popperStyle:t.popperStyle,disabled:t.disabled,teleported:t.teleported,size:a.value,appendSizeTo:t.appendSizeTo}),slot:((R=n==null?void 0:n.default)==null?void 0:R.call(n))??null,total:bt(bve,{total:Ri(t.total)?0:t.total})},I=t.layout.split(",").map(V=>V.trim());let L=!1;return I.forEach(V=>{if(V==="->"){L=!0;return}L?M.push(T[V]):S.push(T[V])}),A(S[0],s.is("first")),A(S[S.length-1],s.is("last")),L&&M.length>0&&(A(M[0],s.is("first")),A(M[M.length-1],s.is("last")),S.push(P)),bt("div",{class:[s.b(),s.is("background",t.background),s.m(a.value)]},S)}}});const Ive=Gt(Pve),Lve=Ge({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:t=>t>=0&&t<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:Boolean,duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:de(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:de([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:de(Function),default:t=>`${t}%`}}),Ove=["aria-valuenow"],Dve={viewBox:"0 0 100 100"},Rve=["d","stroke","stroke-linecap","stroke-width"],Vve=["d","stroke","opacity","stroke-linecap","stroke-width"],Fve={key:0};var Nve=fe({name:"ElProgress",__name:"progress",props:Lve,setup(t){const e={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},n=t,i=Be("progress"),s=W(()=>{const C={width:`${n.percentage}%`,animationDuration:`${n.duration}s`},A=k(n.percentage);return A.includes("gradient")?C.background=A:C.backgroundColor=A,C}),o=W(()=>(n.strokeWidth/n.width*100).toFixed(1)),r=W(()=>["circle","dashboard"].includes(n.type)?Number.parseInt(`${50-Number.parseFloat(o.value)/2}`,10):0),a=W(()=>{const C=r.value,A=n.type==="dashboard";return`
72 73 M 50 50
73 - m 0 ${S?"":"-"}${_}
74 - a ${_} ${_} 0 1 1 0 ${S?"-":""}${_*2}
75 - a ${_} ${_} 0 1 1 0 ${S?"":"-"}${_*2}
76 - `}),a=R(()=>2*Math.PI*i.value),u=R(()=>t.type==="dashboard"?.75:1),c=R(()=>`${-1*a.value*(1-u.value)/2}px`),d=R(()=>({strokeDasharray:`${a.value*u.value}px, ${a.value}px`,strokeDashoffset:c.value})),f=R(()=>({strokeDasharray:`${a.value*u.value*(t.percentage/100)}px, ${a.value}px`,strokeDashoffset:c.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),p=R(()=>{let _;return t.color?_=w(t.percentage):_=n[t.status]||n.default,_}),h=R(()=>t.status==="warning"?d3:t.type==="line"?t.status==="success"?i3:wd:t.status==="success"?Yx:Gs),m=R(()=>t.type==="line"?12+t.strokeWidth*.4:t.width*.111111+2),y=R(()=>t.format(t.percentage));function v(_){const S=100/_.length;return _.map((E,T)=>tt(E)?{color:E,percentage:(T+1)*S}:E).sort((E,T)=>E.percentage-T.percentage)}const w=_=>{var S;const{color:x}=t;if(Xe(x))return x(_);if(tt(x))return x;{const E=v(x);for(const T of E)if(T.percentage>_)return T.color;return(S=E[E.length-1])==null?void 0:S.color}};return(_,S)=>(C(),M("div",{class:D([g(o).b(),g(o).m(_.type),g(o).is(_.status),{[g(o).m("without-text")]:!_.showText,[g(o).m("text-inside")]:_.textInside}]),role:"progressbar","aria-valuenow":_.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[_.type==="line"?(C(),M("div",{key:0,class:D(g(o).b("bar"))},[b("div",{class:D(g(o).be("bar","outer")),style:Qe({height:`${_.strokeWidth}px`})},[b("div",{class:D([g(o).be("bar","inner"),{[g(o).bem("bar","inner","indeterminate")]:_.indeterminate},{[g(o).bem("bar","inner","striped")]:_.striped},{[g(o).bem("bar","inner","striped-flow")]:_.stripedFlow}]),style:Qe(g(r))},[(_.showText||_.$slots.default)&&_.textInside?(C(),M("div",{key:0,class:D(g(o).be("bar","innerText"))},[he(_.$slots,"default",{percentage:_.percentage},()=>[b("span",null,A(g(y)),1)])],2)):W("v-if",!0)],6)],6)],2)):(C(),M("div",{key:1,class:D(g(o).b("circle")),style:Qe({height:`${_.width}px`,width:`${_.width}px`})},[(C(),M("svg",pue,[b("path",{class:D(g(o).be("circle","track")),d:g(l),stroke:`var(${g(o).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":_.strokeLinecap,"stroke-width":g(s),fill:"none",style:Qe(g(d))},null,14,hue),b("path",{class:D(g(o).be("circle","path")),d:g(l),stroke:g(p),fill:"none",opacity:_.percentage?1:0,"stroke-linecap":_.strokeLinecap,"stroke-width":g(s),style:Qe(g(f))},null,14,mue)]))],6)),(_.showText||_.$slots.default)&&!_.textInside?(C(),M("div",{key:2,class:D(g(o).e("text")),style:Qe({fontSize:`${g(m)}px`})},[he(_.$slots,"default",{percentage:_.percentage},()=>[_.status?(C(),q(g(Ne),{key:1},{default:$(()=>[(C(),q(Lt(g(h))))]),_:1})):(C(),M("span",gue,A(g(y)),1))])],6)):W("v-if",!0)],10,fue))}});var _ue=ze(yue,[["__file","progress.vue"]]);const gO=Zt(_ue),bue=We({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:Number}}),wue=We({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),Cue=Q({name:"ElSkeletonItem"}),kue=Q({...Cue,props:wue,setup(e){const t=Re("skeleton");return(n,o)=>(C(),M("div",{class:D([g(t).e("item"),g(t).e(n.variant)])},[n.variant==="image"?(C(),q(g(FZ),{key:0})):W("v-if",!0)],2))}});var Dg=ze(kue,[["__file","skeleton-item.vue"]]);const Sue=Q({name:"ElSkeleton"}),$ue=Q({...Sue,props:bue,setup(e,{expose:t}){const n=e,o=Re("skeleton"),r=AX(pn(n,"loading"),n.throttle);return t({uiLoading:r}),(s,i)=>g(r)?(C(),M("div",un({key:0,class:[g(o).b(),g(o).is("animated",s.animated)]},s.$attrs),[(C(!0),M(fe,null,nt(s.count,l=>(C(),M(fe,{key:l},[s.loading?he(s.$slots,"template",{key:l},()=>[k(Dg,{class:D(g(o).is("first")),variant:"p"},null,8,["class"]),(C(!0),M(fe,null,nt(s.rows,a=>(C(),q(Dg,{key:a,class:D([g(o).e("paragraph"),g(o).is("last",a===s.rows&&s.rows>1)]),variant:"p"},null,8,["class"]))),128))]):W("v-if",!0)],64))),128))],16)):he(s.$slots,"default",Z2(un({key:1},s.$attrs)))}});var Eue=ze($ue,[["__file","skeleton.vue"]]);const lo=Zt(Eue,{SkeletonItem:Dg});Gn(Dg);const uy=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},xue=function(e,t,n,o,r){if(!t&&!o&&(!r||Array.isArray(r)&&!r.length))return e;typeof n=="string"?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const s=o?null:function(l,a){return r?(Array.isArray(r)||(r=[r]),r.map(u=>typeof u=="string"?Tr(l,u):u(l,a,e))):(t!=="$key"&&ft(l)&&"$value"in l&&(l=l.$value),[ft(l)?Tr(l,t):l])},i=function(l,a){if(o)return o(l.value,a.value);for(let u=0,c=l.key.length;u<c;u++){if(l.key[u]<a.key[u])return-1;if(l.key[u]>a.key[u])return 1}return 0};return e.map((l,a)=>({value:l,index:a,key:s?s(l,a):null})).sort((l,a)=>{let u=i(l,a);return u||(u=l.index-a.index),u*+n}).map(l=>l.value)},vO=function(e,t){let n=null;return e.columns.forEach(o=>{o.id===t&&(n=o)}),n},Mue=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||ws("ElTable",`No column matching with column-key: ${t}`),n},b8=function(e,t,n){const o=(t.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return o?vO(e,o[0]):null},oo=(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)},Pa=function(e,t){const n={};return(e||[]).forEach((o,r)=>{n[oo(o,t)]={row:o,index:r}}),n};function Tue(e,t){const n={};let o;for(o in e)n[o]=e[o];for(o in t)if(vt(t,o)){const r=t[o];typeof r<"u"&&(n[o]=r)}return n}function K3(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function yO(e){return e===""||e!==void 0&&(e=K3(e),Number.isNaN(e)&&(e=80)),e}function Oue(e){return typeof e=="number"?e:typeof e=="string"?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function Iue(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...o)=>t(n(...o)))}function Yf(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,Me(t.children)&&t.children.forEach(a=>{Yf(e,a,n??!s)})};return Br(n)?n&&!s?i("add"):!n&&s&&i("remove"):i(s?"remove":"add"),o}function Aue(e,t,n="children",o="hasChildren"){const r=i=>!(Array.isArray(i)&&i.length);function s(i,l,a){t(i,l,a),l.forEach(u=>{if(u[o]){t(u,null,a+1);return}const c=u[n];r(c)||s(u,c,a+1)})}e.forEach(i=>{if(i[o]){t(i,null,0);return}const l=i[n];r(l)||s(i,l,0)})}let Sr=null;function Nue(e,t,n,o){if((Sr==null?void 0:Sr.trigger)===n)return;Sr==null||Sr();const r=o==null?void 0:o.refs.tableWrapper,s=r==null?void 0:r.dataset.prefix,i={strategy:"fixed",...e.popperOptions},l=k($u,{content:t,virtualTriggering:!0,virtualRef:n,appendTo:r,placement:"top",transition:"none",offset:0,hideAfter:0,...e,popperOptions:i,onHide:()=>{Sr==null||Sr()}});l.appContext={...o.appContext,...o};const a=document.createElement("div");Ni(l,a),l.component.exposed.onOpen();const u=r==null?void 0:r.querySelector(`.${s}-scrollbar__wrap`);Sr=()=>{Ni(null,a),u==null||u.removeEventListener("scroll",Sr),Sr=null},Sr.trigger=n,u==null||u.addEventListener("scroll",Sr)}function _O(e){return e.children?oY(e.children,_O):[e]}function w8(e,t){return e+t.colSpan}const bO=(e,t,n,o)=>{let r=0,s=e;const i=n.states.columns.value;if(o){const a=_O(o[e]);r=i.slice(0,i.indexOf(a[0])).reduce(w8,0),s=r+a.reduce(w8,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}:{}},q3=(e,t,n,o,r,s=0)=>{const i=[],{direction:l,start:a,after:u}=bO(t,n,o,r);if(l){const c=l==="left";i.push(`${e}-fixed-column--${l}`),c&&u+s===o.states.fixedLeafColumnsLength.value-1?i.push("is-last-column"):!c&&a-s===o.states.columns.value.length-o.states.rightFixedLeafColumnsLength.value&&i.push("is-first-column")}return i};function C8(e,t){return e+(t.realWidth===null||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const G3=(e,t,n,o)=>{const{direction:r,start:s=0,after:i=0}=bO(e,t,n,o);if(!r)return;const l={},a=r==="left",u=n.states.columns.value;return a?l.left=u.slice(0,s).reduce(C8,0):l.right=u.slice(i+1).reverse().reduce(C8,0),l},ld=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function Pue(e){const t=at(),n=K(!1),o=K([]);return{updateExpandRows:()=>{const a=e.data.value||[],u=e.rowKey.value;if(n.value)o.value=a.slice();else if(u){const c=Pa(o.value,u);o.value=a.reduce((d,f)=>{const p=oo(f,u);return c[p]&&d.push(f),d},[])}else o.value=[]},toggleRowExpansion:(a,u)=>{Yf(o.value,a,u)&&t.emit("expand-change",a,o.value.slice())},setExpandRowKeys:a=>{t.store.assertRowKey();const u=e.data.value||[],c=e.rowKey.value,d=Pa(u,c);o.value=a.reduce((f,p)=>{const h=d[p];return h&&f.push(h.row),f},[])},isRowExpanded:a=>{const u=e.rowKey.value;return u?!!Pa(o.value,u)[oo(a,u)]:o.value.includes(a)},states:{expandRows:o,defaultExpandAll:n}}}function Lue(e){const t=at(),n=K(null),o=K(null),r=u=>{t.store.assertRowKey(),n.value=u,i(u)},s=()=>{n.value=null},i=u=>{const{data:c,rowKey:d}=e;let f=null;d.value&&(f=(g(c)||[]).find(p=>oo(p,d.value)===u)),o.value=f,t.emit("current-change",o.value,null)};return{setCurrentRowKey:r,restoreCurrentRowKey:s,setCurrentRowByKey:i,updateCurrentRow:u=>{const c=o.value;if(u&&u!==c){o.value=u,t.emit("current-change",o.value,c);return}!u&&c&&(o.value=null,t.emit("current-change",null,c))},updateCurrentRowData:()=>{const u=e.rowKey.value,c=e.data.value||[],d=o.value;if(!c.includes(d)&&d){if(u){const f=oo(d,u);i(f)}else o.value=null;o.value===null&&t.emit("current-change",null,d)}else n.value&&(i(n.value),s())},states:{_currentRowKey:n,currentRow:o}}}function Rue(e){const t=K([]),n=K({}),o=K(16),r=K(!1),s=K({}),i=K("hasChildren"),l=K("children"),a=at(),u=R(()=>{if(!e.rowKey.value)return{};const v=e.data.value||[];return d(v)}),c=R(()=>{const v=e.rowKey.value,w=Object.keys(s.value),_={};return w.length&&w.forEach(S=>{if(s.value[S].length){const x={children:[]};s.value[S].forEach(E=>{const T=oo(E,v);x.children.push(T),E[i.value]&&!_[T]&&(_[T]={children:[]})}),_[S]=x}}),_}),d=v=>{const w=e.rowKey.value,_={};return Aue(v,(S,x,E)=>{const T=oo(S,w);Array.isArray(x)?_[T]={children:x.map(O=>oo(O,w)),level:E}:r.value&&(_[T]={children:[],lazy:!0,level:E})},l.value,i.value),_},f=(v=!1,w=(_=>(_=a.store)==null?void 0:_.states.defaultExpandAll.value)())=>{var _;const S=u.value,x=c.value,E=Object.keys(S),T={};if(E.length){const O=g(n),P=[],N=(B,Y)=>{if(v)return t.value?w||t.value.includes(Y):!!(w||B!=null&&B.expanded);{const Z=w||t.value&&t.value.includes(Y);return!!(B!=null&&B.expanded||Z)}};E.forEach(B=>{const Y=O[B],Z={...S[B]};if(Z.expanded=N(Y,B),Z.lazy){const{loaded:U=!1,loading:j=!1}=Y||{};Z.loaded=!!U,Z.loading=!!j,P.push(B)}T[B]=Z});const F=Object.keys(x);r.value&&F.length&&P.length&&F.forEach(B=>{const Y=O[B],Z=x[B].children;if(P.includes(B)){if(T[B].children.length!==0)throw new Error("[ElTable]children must be an empty array.");T[B].children=Z}else{const{loaded:U=!1,loading:j=!1}=Y||{};T[B]={lazy:!0,loaded:!!U,loading:!!j,expanded:N(Y,B),children:Z,level:""}}})}n.value=T,(_=a.store)==null||_.updateTableScrollY()};Te(()=>t.value,()=>{f(!0)}),Te(()=>u.value,()=>{f()}),Te(()=>c.value,()=>{f()});const p=v=>{t.value=v,f()},h=(v,w)=>{a.store.assertRowKey();const _=e.rowKey.value,S=oo(v,_),x=S&&n.value[S];if(S&&x&&"expanded"in x){const E=x.expanded;w=typeof w>"u"?!x.expanded:w,n.value[S].expanded=w,E!==w&&a.emit("expand-change",v,w),a.store.updateTableScrollY()}},m=v=>{a.store.assertRowKey();const w=e.rowKey.value,_=oo(v,w),S=n.value[_];r.value&&S&&"loaded"in S&&!S.loaded?y(v,_,S):h(v,void 0)},y=(v,w,_)=>{const{load:S}=a.props;S&&!n.value[w].loaded&&(n.value[w].loading=!0,S(v,_,x=>{if(!Array.isArray(x))throw new TypeError("[ElTable] data must be an array");n.value[w].loading=!1,n.value[w].loaded=!0,n.value[w].expanded=!0,x.length&&(s.value[w]=x),a.emit("expand-change",v,!0)}))};return{loadData:y,loadOrToggle:m,toggleTreeExpansion:h,updateTreeExpandKeys:p,updateTreeData:f,normalize:d,states:{expandRowKeys:t,treeData:n,indent:o,lazy:r,lazyTreeNodeMap:s,lazyColumnIdentifier:i,childrenColumnName:l}}}const Due=(e,t)=>{const n=t.sortingColumn;return!n||typeof n.sortable=="string"?e:xue(e,t.sortProp,t.sortOrder,n.sortMethod,n.sortBy)},r1=e=>{const t=[];return e.forEach(n=>{n.children&&n.children.length>0?t.push.apply(t,r1(n.children)):t.push(n)}),t};function Fue(){var e;const t=at(),{size:n}=ei((e=t.proxy)==null?void 0:e.$props),o=K(null),r=K([]),s=K([]),i=K(!1),l=K([]),a=K([]),u=K([]),c=K([]),d=K([]),f=K([]),p=K([]),h=K([]),m=[],y=K(0),v=K(0),w=K(0),_=K(!1),S=K([]),x=K(!1),E=K(!1),T=K(null),O=K({}),P=K(null),N=K(null),F=K(null),B=K(null),Y=K(null);Te(r,()=>t.state&&V(!1),{deep:!0});const Z=()=>{if(!o.value)throw new Error("[ElTable] prop row-key is required")},U=$e=>{var ie;(ie=$e.children)==null||ie.forEach(we=>{we.fixed=$e.fixed,U(we)})},j=()=>{l.value.forEach(Se=>{U(Se)}),c.value=l.value.filter(Se=>Se.fixed===!0||Se.fixed==="left"),d.value=l.value.filter(Se=>Se.fixed==="right"),c.value.length>0&&l.value[0]&&l.value[0].type==="selection"&&!l.value[0].fixed&&(l.value[0].fixed=!0,c.value.unshift(l.value[0]));const $e=l.value.filter(Se=>!Se.fixed);a.value=[].concat(c.value).concat($e).concat(d.value);const ie=r1($e),we=r1(c.value),ae=r1(d.value);y.value=ie.length,v.value=we.length,w.value=ae.length,u.value=[].concat(we).concat(ie).concat(ae),i.value=c.value.length>0||d.value.length>0},V=($e,ie=!1)=>{$e&&j(),ie?t.state.doLayout():t.state.debouncedUpdateLayout()},H=$e=>S.value.includes($e),L=()=>{_.value=!1,S.value.length&&(S.value=[],t.emit("selection-change",[]))},I=()=>{let $e;if(o.value){$e=[];const ie=Pa(S.value,o.value),we=Pa(r.value,o.value);for(const ae in ie)vt(ie,ae)&&!we[ae]&&$e.push(ie[ae].row)}else $e=S.value.filter(ie=>!r.value.includes(ie));if($e.length){const ie=S.value.filter(we=>!$e.includes(we));S.value=ie,t.emit("selection-change",ie.slice())}},X=()=>(S.value||[]).slice(),oe=($e,ie=void 0,we=!0)=>{if(Yf(S.value,$e,ie)){const Se=(S.value||[]).slice();we&&t.emit("select",Se,$e),t.emit("selection-change",Se)}},z=()=>{var $e,ie;const we=E.value?!_.value:!(_.value||S.value.length);_.value=we;let ae=!1,Se=0;const Fe=(ie=($e=t==null?void 0:t.store)==null?void 0:$e.states)==null?void 0:ie.rowKey.value;r.value.forEach((st,se)=>{const De=se+Se;T.value?T.value.call(null,st,De)&&Yf(S.value,st,we)&&(ae=!0):Yf(S.value,st,we)&&(ae=!0),Se+=xe(oo(st,Fe))}),ae&&t.emit("selection-change",S.value?S.value.slice():[]),t.emit("select-all",S.value)},ge=()=>{const $e=Pa(S.value,o.value);r.value.forEach(ie=>{const we=oo(ie,o.value),ae=$e[we];ae&&(S.value[ae.index]=ie)})},Oe=()=>{var $e,ie,we;if((($e=r.value)==null?void 0:$e.length)===0){_.value=!1;return}let ae;o.value&&(ae=Pa(S.value,o.value));const Se=function(De){return ae?!!ae[oo(De,o.value)]:S.value.includes(De)};let Fe=!0,st=0,se=0;for(let De=0,Ot=(r.value||[]).length;De<Ot;De++){const mn=(we=(ie=t==null?void 0:t.store)==null?void 0:ie.states)==null?void 0:we.rowKey.value,Un=De+se,Zr=r.value[De],qt=T.value&&T.value.call(null,Zr,Un);if(Se(Zr))st++;else if(!T.value||qt){Fe=!1;break}se+=xe(oo(Zr,mn))}st===0&&(Fe=!1),_.value=Fe},xe=$e=>{var ie;if(!t||!t.store)return 0;const{treeData:we}=t.store.states;let ae=0;const Se=(ie=we.value[$e])==null?void 0:ie.children;return Se&&(ae+=Se.length,Se.forEach(Fe=>{ae+=xe(Fe)})),ae},ee=($e,ie)=>{Array.isArray($e)||($e=[$e]);const we={};return $e.forEach(ae=>{O.value[ae.id]=ie,we[ae.columnKey||ae.id]=ie}),we},de=($e,ie,we)=>{N.value&&N.value!==$e&&(N.value.order=null),N.value=$e,F.value=ie,B.value=we},ve=()=>{let $e=g(s);Object.keys(O.value).forEach(ie=>{const we=O.value[ie];if(!we||we.length===0)return;const ae=vO({columns:u.value},ie);ae&&ae.filterMethod&&($e=$e.filter(Se=>we.some(Fe=>ae.filterMethod.call(null,Fe,Se,ae))))}),P.value=$e},le=()=>{r.value=Due(P.value,{sortingColumn:N.value,sortProp:F.value,sortOrder:B.value})},Ie=($e=void 0)=>{$e&&$e.filter||ve(),le()},Ge=$e=>{const{tableHeaderRef:ie}=t.refs;if(!ie)return;const we=Object.assign({},ie.filterPanels),ae=Object.keys(we);if(ae.length)if(typeof $e=="string"&&($e=[$e]),Array.isArray($e)){const Se=$e.map(Fe=>Mue({columns:u.value},Fe));ae.forEach(Fe=>{const st=Se.find(se=>se.id===Fe);st&&(st.filteredValue=[])}),t.store.commit("filterChange",{column:Se,values:[],silent:!0,multi:!0})}else ae.forEach(Se=>{const Fe=u.value.find(st=>st.id===Se);Fe&&(Fe.filteredValue=[])}),O.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},G=()=>{N.value&&(de(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:J,toggleRowExpansion:ue,updateExpandRows:_e,states:ye,isRowExpanded:Ae}=Pue({data:r,rowKey:o}),{updateTreeExpandKeys:Le,toggleTreeExpansion:Ee,updateTreeData:Pe,loadOrToggle:me,states:je}=Rue({data:r,rowKey:o}),{updateCurrentRowData:Ze,updateCurrentRow:ce,setCurrentRowKey:te,states:pe}=Lue({data:r,rowKey:o});return{assertRowKey:Z,updateColumns:j,scheduleLayout:V,isSelected:H,clearSelection:L,cleanSelection:I,getSelectionRows:X,toggleRowSelection:oe,_toggleAllSelection:z,toggleAllSelection:null,updateSelectionByRowKey:ge,updateAllSelected:Oe,updateFilters:ee,updateCurrentRow:ce,updateSort:de,execFilter:ve,execSort:le,execQuery:Ie,clearFilter:Ge,clearSort:G,toggleRowExpansion:ue,setExpandRowKeysAdapter:$e=>{J($e),Le($e)},setCurrentRowKey:te,toggleRowExpansionAdapter:($e,ie)=>{u.value.some(({type:ae})=>ae==="expand")?ue($e,ie):Ee($e,ie)},isRowExpanded:Ae,updateExpandRows:_e,updateCurrentRowData:Ze,loadOrToggle:me,updateTreeData:Pe,states:{tableSize:n,rowKey:o,data:r,_data:s,isComplex:i,_columns:l,originColumns:a,columns:u,fixedColumns:c,rightFixedColumns:d,leafColumns:f,fixedLeafColumns:p,rightFixedLeafColumns:h,updateOrderFns:m,leafColumnsLength:y,fixedLeafColumnsLength:v,rightFixedLeafColumnsLength:w,isAllSelected:_,selection:S,reserveSelection:x,selectOnIndeterminate:E,selectable:T,filters:O,filteredData:P,sortingColumn:N,sortProp:F,sortOrder:B,hoverRow:Y,...ye,...je,...pe}}}function kb(e,t){return e.map(n=>{var o;return n.id===t.id?t:((o=n.children)!=null&&o.length&&(n.children=kb(n.children,t)),n)})}function Sb(e){e.forEach(t=>{var n,o;t.no=(n=t.getColumnIndex)==null?void 0:n.call(t),(o=t.children)!=null&&o.length&&Sb(t.children)}),e.sort((t,n)=>t.no-n.no)}function Vue(){const e=at(),t=Fue();return{ns:Re("table"),...t,mutations:{setData(i,l){const a=g(i._data)!==l;i.data.value=l,i._data.value=l,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),g(i.reserveSelection)?(e.store.assertRowKey(),e.store.updateSelectionByRowKey()):a?e.store.clearSelection():e.store.cleanSelection(),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(i,l,a,u){const c=g(i._columns);let d=[];a?(a&&!a.children&&(a.children=[]),a.children.push(l),d=kb(c,a)):(c.push(l),d=c),Sb(d),i._columns.value=d,i.updateOrderFns.push(u),l.type==="selection"&&(i.selectable.value=l.selectable,i.reserveSelection.value=l.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(i,l){var a;((a=l.getColumnIndex)==null?void 0:a.call(l))!==l.no&&(Sb(i._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(i,l,a,u){const c=g(i._columns)||[];if(a)a.children.splice(a.children.findIndex(f=>f.id===l.id),1),ot(()=>{var f;((f=a.children)==null?void 0:f.length)===0&&delete a.children}),i._columns.value=kb(c,a);else{const f=c.indexOf(l);f>-1&&(c.splice(f,1),i._columns.value=c)}const d=i.updateOrderFns.indexOf(u);d>-1&&i.updateOrderFns.splice(d,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(i,l){const{prop:a,order:u,init:c}=l;if(a){const d=g(i.columns).find(f=>f.property===a);d&&(d.order=u,e.store.updateSort(d,a,u),e.store.commit("changeSortCondition",{init:c}))}},changeSortCondition(i,l){const{sortingColumn:a,sortProp:u,sortOrder:c}=i,d=g(a),f=g(u),p=g(c);p===null&&(i.sortingColumn.value=null,i.sortProp.value=null);const h={filter:!0};e.store.execQuery(h),(!l||!(l.silent||l.init))&&e.emit("sort-change",{column:d,prop:f,order:p}),e.store.updateTableScrollY()},filterChange(i,l){const{column:a,values:u,silent:c}=l,d=e.store.updateFilters(a,u);e.store.execQuery(),c||e.emit("filter-change",d),e.store.updateTableScrollY()},toggleAllSelection(){e.store.toggleAllSelection()},rowSelectedChanged(i,l){e.store.toggleRowSelection(l),e.store.updateAllSelected()},setHoverRow(i,l){i.hoverRow.value=l},setCurrentRow(i,l){e.store.updateCurrentRow(l)}},commit:function(i,...l){const a=e.store.mutations;if(a[i])a[i].apply(e,[e.store.states].concat(l));else throw new Error(`Action not found: ${i}`)},updateTableScrollY:function(){ot(()=>e.layout.updateScrollY.apply(e.layout))}}}const Zf={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 Bue(e,t){if(!e)throw new Error("Table is required.");const n=Vue();return n.toggleAllSelection=zl(n._toggleAllSelection,10),Object.keys(Zf).forEach(o=>{wO(CO(t,o),o,n)}),zue(n,t),n}function zue(e,t){Object.keys(Zf).forEach(n=>{Te(()=>CO(t,n),o=>{wO(o,n,e)})})}function wO(e,t,n){let o=e,r=Zf[t];typeof Zf[t]=="object"&&(r=r.key,o=o||Zf[t].default),n.states[r].value=o}function CO(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 jue{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=K(null),this.scrollX=K(!1),this.scrollY=K(!1),this.bodyWidth=K(null),this.fixedWidth=K(null),this.rightFixedWidth=K(null),this.gutterWidth=0;for(const n in t)vt(t,n)&&(on(this[n])?this[n].value=t[n]:this[n]=t[n]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){if(this.height.value===null)return!1;const n=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(n!=null&&n.wrapRef)){let o=!0;const r=this.scrollY.value;return o=n.wrapRef.scrollHeight>n.wrapRef.clientHeight,this.scrollY.value=o,r!==o}return!1}setHeight(t,n="height"){if(!xt)return;const o=this.table.vnode.el;if(t=Oue(t),this.height.value=Number(t),!o&&(t||t===0))return ot(()=>this.setHeight(t,n));typeof t=="number"?(o.style[n]=`${t}px`,this.updateElsHeight()):typeof t=="string"&&(o.style[n]=t,this.updateElsHeight())}setMaxHeight(t){this.setHeight(t,"max-height")}getFlattenColumns(){const t=[];return this.table.store.states.columns.value.forEach(o=>{o.isColumnGroup?t.push.apply(t,o.columns):t.push(o)}),t}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(t){if(!t)return!0;let n=t;for(;n.tagName!=="DIV";){if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}updateColumnsWidth(){if(!xt)return;const t=this.fit,n=this.table.vnode.el.clientWidth;let o=0;const r=this.getFlattenColumns(),s=r.filter(a=>typeof a.width!="number");if(r.forEach(a=>{typeof a.width=="number"&&a.realWidth&&(a.realWidth=null)}),s.length>0&&t){if(r.forEach(a=>{o+=Number(a.width||a.minWidth||80)}),o<=n){this.scrollX.value=!1;const a=n-o;if(s.length===1)s[0].realWidth=Number(s[0].minWidth||80)+a;else{const u=s.reduce((f,p)=>f+Number(p.minWidth||80),0),c=a/u;let d=0;s.forEach((f,p)=>{if(p===0)return;const h=Math.floor(Number(f.minWidth||80)*c);d+=h,f.realWidth=Number(f.minWidth||80)+h}),s[0].realWidth=Number(s[0].minWidth||80)+a-d}}else this.scrollX.value=!0,s.forEach(a=>{a.realWidth=Number(a.minWidth)});this.bodyWidth.value=Math.max(o,n),this.table.state.resizeState.value.width=this.bodyWidth.value}else r.forEach(a=>{!a.width&&!a.minWidth?a.realWidth=80:a.realWidth=Number(a.width||a.minWidth),o+=a.realWidth}),this.scrollX.value=o>n,this.bodyWidth.value=o;const i=this.store.states.fixedColumns.value;if(i.length>0){let a=0;i.forEach(u=>{a+=Number(u.realWidth||u.width)}),this.fixedWidth.value=a}const l=this.store.states.rightFixedColumns.value;if(l.length>0){let a=0;l.forEach(u=>{a+=Number(u.realWidth||u.width)}),this.rightFixedWidth.value=a}this.notifyObservers("columns")}addObserver(t){this.observers.push(t)}removeObserver(t){const n=this.observers.indexOf(t);n!==-1&&this.observers.splice(n,1)}notifyObservers(t){this.observers.forEach(o=>{var r,s;switch(t){case"columns":(r=o.state)==null||r.onColumnsChange(this);break;case"scrollable":(s=o.state)==null||s.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${t}.`)}})}}const{CheckboxGroup:Hue}=Hn,Uue=Q({name:"ElTableFilterPanel",components:{ElCheckbox:Hn,ElCheckboxGroup:Hue,ElScrollbar:ks,ElTooltip:$u,ElIcon:Ne,ArrowDown:Su,ArrowUp:N0},directives:{ClickOutside:id},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function}},setup(e){const t=at(),{t:n}=Kt(),o=Re("table-filter"),r=t==null?void 0:t.parent;r.filterPanels.value[e.column.id]||(r.filterPanels.value[e.column.id]=t);const s=K(!1),i=K(null),l=R(()=>e.column&&e.column.filters),a=R(()=>e.column.filterClassName?`${o.b()} ${e.column.filterClassName}`:o.b()),u=R({get:()=>{var x;return(((x=e.column)==null?void 0:x.filteredValue)||[])[0]},set:x=>{c.value&&(typeof x<"u"&&x!==null?c.value.splice(0,1,x):c.value.splice(0,1))}}),c=R({get(){return e.column?e.column.filteredValue||[]:[]},set(x){e.column&&e.upDataColumn("filteredValue",x)}}),d=R(()=>e.column?e.column.filterMultiple:!0),f=x=>x.value===u.value,p=()=>{s.value=!1},h=x=>{x.stopPropagation(),s.value=!s.value},m=()=>{s.value=!1},y=()=>{_(c.value),p()},v=()=>{c.value=[],_(c.value),p()},w=x=>{u.value=x,_(typeof x<"u"&&x!==null?c.value:[]),p()},_=x=>{e.store.commit("filterChange",{column:e.column,values:x}),e.store.updateAllSelected()};Te(s,x=>{e.column&&e.upDataColumn("filterOpened",x)},{immediate:!0});const S=R(()=>{var x,E;return(E=(x=i.value)==null?void 0:x.popperRef)==null?void 0:E.contentRef});return{tooltipVisible:s,multiple:d,filterClassName:a,filteredValue:c,filterValue:u,filters:l,handleConfirm:y,handleReset:v,handleSelect:w,isActive:f,t:n,ns:o,showFilterPanel:h,hideFilterPanel:m,popperPaneRef:S,tooltip:i}}}),Wue={key:0},Kue=["disabled"],que=["label","onClick"];function Gue(e,t,n,o,r,s){const i=re("el-checkbox"),l=re("el-checkbox-group"),a=re("el-scrollbar"),u=re("arrow-up"),c=re("arrow-down"),d=re("el-icon"),f=re("el-tooltip"),p=zt("click-outside");return C(),q(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:$(()=>[e.multiple?(C(),M("div",Wue,[b("div",{class:D(e.ns.e("content"))},[k(a,{"wrap-class":e.ns.e("wrap")},{default:$(()=>[k(l,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=h=>e.filteredValue=h),class:D(e.ns.e("checkbox-group"))},{default:$(()=>[(C(!0),M(fe,null,nt(e.filters,h=>(C(),q(i,{key:h.value,value:h.value},{default:$(()=>[ne(A(h.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),b("div",{class:D(e.ns.e("bottom"))},[b("button",{class:D({[e.ns.is("disabled")]:e.filteredValue.length===0}),disabled:e.filteredValue.length===0,type:"button",onClick:t[1]||(t[1]=(...h)=>e.handleConfirm&&e.handleConfirm(...h))},A(e.t("el.table.confirmFilter")),11,Kue),b("button",{type:"button",onClick:t[2]||(t[2]=(...h)=>e.handleReset&&e.handleReset(...h))},A(e.t("el.table.resetFilter")),1)],2)])):(C(),M("ul",{key:1,class:D(e.ns.e("list"))},[b("li",{class:D([e.ns.e("list-item"),{[e.ns.is("active")]:e.filterValue===void 0||e.filterValue===null}]),onClick:t[3]||(t[3]=h=>e.handleSelect(null))},A(e.t("el.table.clearFilter")),3),(C(!0),M(fe,null,nt(e.filters,h=>(C(),M("li",{key:h.value,class:D([e.ns.e("list-item"),e.ns.is("active",e.isActive(h))]),label:h.value,onClick:m=>e.handleSelect(h.value)},A(h.text),11,que))),128))],2))]),default:$(()=>[He((C(),M("span",{class:D([`${e.ns.namespace.value}-table__column-filter-trigger`,`${e.ns.namespace.value}-none-outline`]),onClick:t[4]||(t[4]=(...h)=>e.showFilterPanel&&e.showFilterPanel(...h))},[k(d,null,{default:$(()=>[e.column.filterOpened?(C(),q(u,{key:0})):(C(),q(c,{key:1}))]),_:1})],2)),[[p,e.hideFilterPanel,e.popperPaneRef]])]),_:1},8,["visible","placement","popper-class"])}var Yue=ze(Uue,[["render",Gue],["__file","filter-panel.vue"]]);function kO(e){const t=at();yd(()=>{n.value.addObserver(t)}),Ct(()=>{o(n.value),r(n.value)}),Fi(()=>{o(n.value),r(n.value)}),ti(()=>{n.value.removeObserver(t)});const n=R(()=>{const s=e.layout;if(!s)throw new Error("Can not find table layout.");return s}),o=s=>{var i;const l=((i=e.vnode.el)==null?void 0:i.querySelectorAll("colgroup > col"))||[];if(!l.length)return;const a=s.getFlattenColumns(),u={};a.forEach(c=>{u[c.id]=c});for(let c=0,d=l.length;c<d;c++){const f=l[c],p=f.getAttribute("name"),h=u[p];h&&f.setAttribute("width",h.realWidth||h.width)}},r=s=>{var i,l;const a=((i=e.vnode.el)==null?void 0:i.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let c=0,d=a.length;c<d;c++)a[c].setAttribute("width",s.scrollY.value?s.gutterWidth:"0");const u=((l=e.vnode.el)==null?void 0:l.querySelectorAll("th.gutter"))||[];for(let c=0,d=u.length;c<d;c++){const f=u[c];f.style.width=s.scrollY.value?`${s.gutterWidth}px`:"0",f.style.display=s.scrollY.value?"":"none"}};return{tableLayout:n.value,onColumnsChange:o,onScrollableChange:r}}const oi=Symbol("ElTable");function Zue(e,t){const n=at(),o=Be(oi),r=m=>{m.stopPropagation()},s=(m,y)=>{!y.filters&&y.sortable?h(m,y,!1):y.filterable&&!y.sortable&&r(m),o==null||o.emit("header-click",y,m)},i=(m,y)=>{o==null||o.emit("header-contextmenu",y,m)},l=K(null),a=K(!1),u=K({}),c=(m,y)=>{if(xt&&!(y.children&&y.children.length>0)&&l.value&&e.border){a.value=!0;const v=o;t("set-drag-visible",!0);const _=(v==null?void 0:v.vnode.el).getBoundingClientRect().left,S=n.vnode.el.querySelector(`th.${y.id}`),x=S.getBoundingClientRect(),E=x.left-_+30;lu(S,"noclick"),u.value={startMouseLeft:m.clientX,startLeft:x.right-_,startColumnLeft:x.left-_,tableLeft:_};const T=v==null?void 0:v.refs.resizeProxy;T.style.left=`${u.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const O=N=>{const F=N.clientX-u.value.startMouseLeft,B=u.value.startLeft+F;T.style.left=`${Math.max(E,B)}px`},P=()=>{if(a.value){const{startColumnLeft:N,startLeft:F}=u.value,Y=Number.parseInt(T.style.left,10)-N;y.width=y.realWidth=Y,v==null||v.emit("header-dragend",y.width,F-N,y,m),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",a.value=!1,l.value=null,u.value={},t("set-drag-visible",!1)}document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",P),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{qs(S,"noclick")},0)};document.addEventListener("mousemove",O),document.addEventListener("mouseup",P)}},d=(m,y)=>{if(y.children&&y.children.length>0)return;const v=m.target;if(!gs(v))return;const w=v==null?void 0:v.closest("th");if(!(!y||!y.resizable)&&!a.value&&e.border){const _=w.getBoundingClientRect(),S=document.body.style;_.width>12&&_.right-m.pageX<8?(S.cursor="col-resize",Ti(w,"is-sortable")&&(w.style.cursor="col-resize"),l.value=y):a.value||(S.cursor="",Ti(w,"is-sortable")&&(w.style.cursor="pointer"),l.value=null)}},f=()=>{xt&&(document.body.style.cursor="")},p=({order:m,sortOrders:y})=>{if(m==="")return y[0];const v=y.indexOf(m||null);return y[v>y.length-2?0:v+1]},h=(m,y,v)=>{var w;m.stopPropagation();const _=y.order===v?null:v||p(y),S=(w=m.target)==null?void 0:w.closest("th");if(S&&Ti(S,"noclick")){qs(S,"noclick");return}if(!y.sortable)return;const x=e.store.states;let E=x.sortProp.value,T;const O=x.sortingColumn.value;(O!==y||O===y&&O.order===null)&&(O&&(O.order=null),x.sortingColumn.value=y,E=y.property),_?T=y.order=_:T=y.order=null,x.sortProp.value=E,x.sortOrder.value=T,o==null||o.store.commit("changeSortCondition")};return{handleHeaderClick:s,handleHeaderContextMenu:i,handleMouseDown:c,handleMouseMove:d,handleMouseOut:f,handleSortClick:h,handleFilterClick:r}}function Jue(e){const t=Be(oi),n=Re("table");return{getHeaderRowStyle:l=>{const a=t==null?void 0:t.props.headerRowStyle;return typeof a=="function"?a.call(null,{rowIndex:l}):a},getHeaderRowClass:l=>{const a=[],u=t==null?void 0:t.props.headerRowClassName;return typeof u=="string"?a.push(u):typeof u=="function"&&a.push(u.call(null,{rowIndex:l})),a.join(" ")},getHeaderCellStyle:(l,a,u,c)=>{var d;let f=(d=t==null?void 0:t.props.headerCellStyle)!=null?d:{};typeof f=="function"&&(f=f.call(null,{rowIndex:l,columnIndex:a,row:u,column:c}));const p=G3(a,c.fixed,e.store,u);return ld(p,"left"),ld(p,"right"),Object.assign({},f,p)},getHeaderCellClass:(l,a,u,c)=>{const d=q3(n.b(),a,c.fixed,e.store,u),f=[c.id,c.order,c.headerAlign,c.className,c.labelClassName,...d];c.children||f.push("is-leaf"),c.sortable&&f.push("is-sortable");const p=t==null?void 0:t.props.headerCellClassName;return typeof p=="string"?f.push(p):typeof p=="function"&&f.push(p.call(null,{rowIndex:l,columnIndex:a,row:u,column:c})),f.push(n.e("cell")),f.filter(h=>!!h).join(" ")}}}const SO=e=>{const t=[];return e.forEach(n=>{n.children?(t.push(n),t.push.apply(t,SO(n.children))):t.push(n)}),t},Xue=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 SO(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 Que(e){const t=Be(oi),n=R(()=>Xue(e.store.states.originColumns.value));return{isGroup:R(()=>{const s=n.value.length>1;return s&&t&&(t.state.isGroup.value=!0),s}),toggleAllSelection:s=>{s.stopPropagation(),t==null||t.store.commit("toggleAllSelection")},columnRows:n}}var ece=Q({name:"ElTableHeader",components:{ElCheckbox:Hn},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e,{emit:t}){const n=at(),o=Be(oi),r=Re("table"),s=K({}),{onColumnsChange:i,onScrollableChange:l}=kO(o);Ct(async()=>{await ot(),await ot();const{prop:E,order:T}=e.defaultSort;o==null||o.store.commit("sort",{prop:E,order:T,init:!0})});const{handleHeaderClick:a,handleHeaderContextMenu:u,handleMouseDown:c,handleMouseMove:d,handleMouseOut:f,handleSortClick:p,handleFilterClick:h}=Zue(e,t),{getHeaderRowStyle:m,getHeaderRowClass:y,getHeaderCellStyle:v,getHeaderCellClass:w}=Jue(e),{isGroup:_,toggleAllSelection:S,columnRows:x}=Que(e);return n.state={onColumnsChange:i,onScrollableChange:l},n.filterPanels=s,{ns:r,filterPanels:s,onColumnsChange:i,onScrollableChange:l,columnRows:x,getHeaderRowClass:y,getHeaderRowStyle:m,getHeaderCellClass:w,getHeaderCellStyle:v,handleHeaderClick:a,handleHeaderContextMenu:u,handleMouseDown:c,handleMouseMove:d,handleMouseOut:f,handleSortClick:p,handleFilterClick:h,isGroup:_,toggleAllSelection:S}},render(){const{ns:e,isGroup:t,columnRows:n,getHeaderCellStyle:o,getHeaderCellClass:r,getHeaderRowClass:s,getHeaderRowStyle:i,handleHeaderClick:l,handleHeaderContextMenu:a,handleMouseDown:u,handleMouseMove:c,handleSortClick:d,handleMouseOut:f,store:p,$parent:h}=this;let m=1;return lt("thead",{class:{[e.is("group")]:t}},n.map((y,v)=>lt("tr",{class:s(v),key:v,style:i(v)},y.map((w,_)=>(w.rowSpan>m&&(m=w.rowSpan),lt("th",{class:r(v,_,y,w),colspan:w.colSpan,key:`${w.id}-thead`,rowspan:w.rowSpan,style:o(v,_,y,w),onClick:S=>l(S,w),onContextmenu:S=>a(S,w),onMousedown:S=>u(S,w),onMousemove:S=>c(S,w),onMouseout:f},[lt("div",{class:["cell",w.filteredValue&&w.filteredValue.length>0?"highlight":""]},[w.renderHeader?w.renderHeader({column:w,$index:_,store:p,_self:h}):w.label,w.sortable&&lt("span",{onClick:S=>d(S,w),class:"caret-wrapper"},[lt("i",{onClick:S=>d(S,w,"ascending"),class:"sort-caret ascending"}),lt("i",{onClick:S=>d(S,w,"descending"),class:"sort-caret descending"})]),w.filterable&&lt(Yue,{store:p,placement:w.filterPlacement||"bottom-start",column:w,upDataColumn:(S,x)=>{w[S]=x}})])]))))))}});function tce(e){const t=Be(oi),n=K(""),o=K(lt("div")),r=(h,m,y)=>{var v;const w=t,_=uy(h);let S;const x=(v=w==null?void 0:w.vnode.el)==null?void 0:v.dataset.prefix;_&&(S=b8({columns:e.store.states.columns.value},_,x),S&&(w==null||w.emit(`cell-${y}`,m,S,_,h))),w==null||w.emit(`row-${y}`,m,S,h)},s=(h,m)=>{r(h,m,"dblclick")},i=(h,m)=>{e.store.commit("setCurrentRow",m),r(h,m,"click")},l=(h,m)=>{r(h,m,"contextmenu")},a=zl(h=>{e.store.commit("setHoverRow",h)},30),u=zl(()=>{e.store.commit("setHoverRow",null)},30),c=h=>{const m=window.getComputedStyle(h,null),y=Number.parseInt(m.paddingLeft,10)||0,v=Number.parseInt(m.paddingRight,10)||0,w=Number.parseInt(m.paddingTop,10)||0,_=Number.parseInt(m.paddingBottom,10)||0;return{left:y,right:v,top:w,bottom:_}},d=(h,m,y)=>{let v=m.target.parentNode;for(;h>1&&(v=v==null?void 0:v.nextSibling,!(!v||v.nodeName!=="TR"));)y(v,"hover-row hover-fixed-row"),h--};return{handleDoubleClick:s,handleClick:i,handleContextMenu:l,handleMouseEnter:a,handleMouseLeave:u,handleCellMouseEnter:(h,m,y)=>{var v;const w=t,_=uy(h),S=(v=w==null?void 0:w.vnode.el)==null?void 0:v.dataset.prefix;if(_){const V=b8({columns:e.store.states.columns.value},_,S);_.rowSpan>1&&d(_.rowSpan,h,lu);const H=w.hoverState={cell:_,column:V,row:m};w==null||w.emit("cell-mouse-enter",H.row,H.column,H.cell,h)}if(!y)return;const x=h.target.querySelector(".cell");if(!(Ti(x,`${S}-tooltip`)&&x.childNodes.length))return;const E=document.createRange();E.setStart(x,0),E.setEnd(x,x.childNodes.length);let T=E.getBoundingClientRect().width,O=E.getBoundingClientRect().height;T-Math.floor(T)<.001&&(T=Math.floor(T)),O-Math.floor(O)<.001&&(O=Math.floor(O));const{top:F,left:B,right:Y,bottom:Z}=c(x),U=B+Y,j=F+Z;(T+U>x.offsetWidth||O+j>x.offsetHeight||x.scrollWidth>x.offsetWidth)&&Nue(y,_.innerText||_.textContent,_,w)},handleCellMouseLeave:h=>{const m=uy(h);if(!m)return;m.rowSpan>1&&d(m.rowSpan,h,qs);const y=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",y==null?void 0:y.row,y==null?void 0:y.column,y==null?void 0:y.cell,h)},tooltipContent:n,tooltipTrigger:o}}function nce(e){const t=Be(oi),n=Re("table");return{getRowStyle:(u,c)=>{const d=t==null?void 0:t.props.rowStyle;return typeof d=="function"?d.call(null,{row:u,rowIndex:c}):d||null},getRowClass:(u,c)=>{const d=[n.e("row")];t!=null&&t.props.highlightCurrentRow&&u===e.store.states.currentRow.value&&d.push("current-row"),e.stripe&&c%2===1&&d.push(n.em("row","striped"));const f=t==null?void 0:t.props.rowClassName;return typeof f=="string"?d.push(f):typeof f=="function"&&d.push(f.call(null,{row:u,rowIndex:c})),d},getCellStyle:(u,c,d,f)=>{const p=t==null?void 0:t.props.cellStyle;let h=p??{};typeof p=="function"&&(h=p.call(null,{rowIndex:u,columnIndex:c,row:d,column:f}));const m=G3(c,e==null?void 0:e.fixed,e.store);return ld(m,"left"),ld(m,"right"),Object.assign({},h,m)},getCellClass:(u,c,d,f,p)=>{const h=q3(n.b(),c,e==null?void 0:e.fixed,e.store,void 0,p),m=[f.id,f.align,f.className,...h],y=t==null?void 0:t.props.cellClassName;return typeof y=="string"?m.push(y):typeof y=="function"&&m.push(y.call(null,{rowIndex:u,columnIndex:c,row:d,column:f})),m.push(n.e("cell")),m.filter(v=>!!v).join(" ")},getSpan:(u,c,d,f)=>{let p=1,h=1;const m=t==null?void 0:t.props.spanMethod;if(typeof m=="function"){const y=m({row:u,column:c,rowIndex:d,columnIndex:f});Array.isArray(y)?(p=y[0],h=y[1]):typeof y=="object"&&(p=y.rowspan,h=y.colspan)}return{rowspan:p,colspan:h}},getColspanRealWidth:(u,c,d)=>{if(c<1)return u[d].realWidth;const f=u.map(({realWidth:p,width:h})=>p||h).slice(d,d+c);return Number(f.reduce((p,h)=>Number(p)+Number(h),-1))}}}function oce(e){const t=Be(oi),n=Re("table"),{handleDoubleClick:o,handleClick:r,handleContextMenu:s,handleMouseEnter:i,handleMouseLeave:l,handleCellMouseEnter:a,handleCellMouseLeave:u,tooltipContent:c,tooltipTrigger:d}=tce(e),{getRowStyle:f,getRowClass:p,getCellStyle:h,getCellClass:m,getSpan:y,getColspanRealWidth:v}=nce(e),w=R(()=>e.store.states.columns.value.findIndex(({type:T})=>T==="default")),_=(T,O)=>{const P=t.props.rowKey;return P?oo(T,P):O},S=(T,O,P,N=!1)=>{const{tooltipEffect:F,tooltipOptions:B,store:Y}=e,{indent:Z,columns:U}=Y.states,j=p(T,O);let V=!0;return P&&(j.push(n.em("row",`level-${P.level}`)),V=P.display),lt("tr",{style:[V?null:{display:"none"},f(T,O)],class:j,key:_(T,O),onDblclick:L=>o(L,T),onClick:L=>r(L,T),onContextmenu:L=>s(L,T),onMouseenter:()=>i(O),onMouseleave:l},U.value.map((L,I)=>{const{rowspan:X,colspan:oe}=y(T,L,O,I);if(!X||!oe)return null;const z=Object.assign({},L);z.realWidth=v(U.value,oe,I);const ge={store:e.store,_self:e.context||t,column:z,row:T,$index:O,cellIndex:I,expanded:N};I===w.value&&P&&(ge.treeNode={indent:P.level*Z.value,level:P.level},typeof P.expanded=="boolean"&&(ge.treeNode.expanded=P.expanded,"loading"in P&&(ge.treeNode.loading=P.loading),"noLazyChildren"in P&&(ge.treeNode.noLazyChildren=P.noLazyChildren)));const Oe=`${O},${I}`,xe=z.columnKey||z.rawColumnKey||"",ee=x(I,L,ge),de=L.showOverflowTooltip&&sY({effect:F},B,L.showOverflowTooltip);return lt("td",{style:h(O,I,T,L),class:m(O,I,T,L,oe-1),key:`${xe}${Oe}`,rowspan:X,colspan:oe,onMouseenter:ve=>a(ve,T,de),onMouseleave:u},[ee])}))},x=(T,O,P)=>O.renderCell(P);return{wrappedRowRender:(T,O)=>{const P=e.store,{isRowExpanded:N,assertRowKey:F}=P,{treeData:B,lazyTreeNodeMap:Y,childrenColumnName:Z,rowKey:U}=P.states,j=P.states.columns.value;if(j.some(({type:H})=>H==="expand")){const H=N(T),L=S(T,O,void 0,H),I=t.renderExpanded;return H?I?[[L,lt("tr",{key:`expanded-row__${L.key}`},[lt("td",{colspan:j.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[I({row:T,$index:O,store:P,expanded:H})])])]]:(console.error("[Element Error]renderExpanded is required."),L):[[L]]}else if(Object.keys(B.value).length){F();const H=oo(T,U.value);let L=B.value[H],I=null;L&&(I={expanded:L.expanded,level:L.level,display:!0},typeof L.lazy=="boolean"&&(typeof L.loaded=="boolean"&&L.loaded&&(I.noLazyChildren=!(L.children&&L.children.length)),I.loading=L.loading));const X=[S(T,O,I)];if(L){let oe=0;const z=(Oe,xe)=>{Oe&&Oe.length&&xe&&Oe.forEach(ee=>{const de={display:xe.display&&xe.expanded,level:xe.level+1,expanded:!1,noLazyChildren:!1,loading:!1},ve=oo(ee,U.value);if(ve==null)throw new Error("For nested data item, row-key is required.");if(L={...B.value[ve]},L&&(de.expanded=L.expanded,L.level=L.level||de.level,L.display=!!(L.expanded&&de.display),typeof L.lazy=="boolean"&&(typeof L.loaded=="boolean"&&L.loaded&&(de.noLazyChildren=!(L.children&&L.children.length)),de.loading=L.loading)),oe++,X.push(S(ee,O+oe,de)),L){const le=Y.value[ve]||ee[Z.value];z(le,L)}})};L.display=!0;const ge=Y.value[H]||T[Z.value];z(ge,L)}return X}else return S(T,O,void 0)},tooltipContent:c,tooltipTrigger:d}}const rce={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 sce=Q({name:"ElTableBody",props:rce,setup(e){const t=at(),n=Be(oi),o=Re("table"),{wrappedRowRender:r,tooltipContent:s,tooltipTrigger:i}=oce(e),{onColumnsChange:l,onScrollableChange:a}=kO(n),u=[];return Te(e.store.states.hoverRow,(c,d)=>{var f;const p=t==null?void 0:t.vnode.el,h=Array.from((p==null?void 0:p.children)||[]).filter(v=>v==null?void 0:v.classList.contains(`${o.e("row")}`));let m=c;const y=(f=h[m])==null?void 0:f.childNodes;if(y!=null&&y.length){let v=0;Array.from(y).reduce((_,S,x)=>{var E,T;return((E=y[x])==null?void 0:E.colSpan)>1&&(v=(T=y[x])==null?void 0:T.colSpan),S.nodeName!=="TD"&&v===0&&_.push(x),v>0&&v--,_},[]).forEach(_=>{for(var S;m>0;){const x=(S=h[m-1])==null?void 0:S.childNodes;if(x[_]&&x[_].nodeName==="TD"&&x[_].rowSpan>1){lu(x[_],"hover-cell"),u.push(x[_]);break}m--}})}else u.forEach(v=>qs(v,"hover-cell")),u.length=0;!e.store.states.isComplex.value||!xt||pY(()=>{const v=h[d],w=h[c];v&&!v.classList.contains("hover-fixed-row")&&qs(v,"hover-row"),w&&lu(w,"hover-row")})}),ti(()=>{var c;(c=Sr)==null||c()}),{ns:o,onColumnsChange:l,onScrollableChange:a,wrappedRowRender:r,tooltipContent:s,tooltipTrigger:i}},render(){const{wrappedRowRender:e,store:t}=this,n=t.states.data.value||[];return lt("tbody",{tabIndex:-1},[n.reduce((o,r)=>o.concat(e(r,o.length)),[])])}});function ice(){const e=Be(oi),t=e==null?void 0:e.store,n=R(()=>t.states.fixedLeafColumnsLength.value),o=R(()=>t.states.rightFixedColumns.value.length),r=R(()=>t.states.columns.value.length),s=R(()=>t.states.fixedColumns.value.length),i=R(()=>t.states.rightFixedColumns.value.length);return{leftFixedLeafCount:n,rightFixedLeafCount:o,columnsCount:r,leftFixedCount:s,rightFixedCount:i,columns:t.states.columns}}function lce(e){const{columns:t}=ice(),n=Re("table");return{getCellClasses:(s,i)=>{const l=s[i],a=[n.e("cell"),l.id,l.align,l.labelClassName,...q3(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=G3(i,s.fixed,e.store);return ld(l,"left"),ld(l,"right"),l},columns:t}}var ace=Q({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const{getCellClasses:t,getCellStyles:n,columns:o}=lce(e);return{ns:Re("table"),getCellClasses:t,getCellStyles:n,columns:o}},render(){const{columns:e,getCellStyles:t,getCellClasses:n,summaryMethod:o,sumText:r}=this,s=this.store.states.data.value;let i=[];return o?i=o({columns:e,data:s}):e.forEach((l,a)=>{if(a===0){i[a]=r;return}const u=s.map(p=>Number(p[l.property])),c=[];let d=!0;u.forEach(p=>{if(!Number.isNaN(+p)){d=!1;const h=`${p}`.split(".")[1];c.push(h?h.length:0)}});const f=Math.max.apply(null,c);d?i[a]="":i[a]=u.reduce((p,h)=>{const m=Number(h);return Number.isNaN(+m)?p:Number.parseFloat((p+h).toFixed(Math.min(f,20)))},0)}),lt(lt("tfoot",[lt("tr",{},[...e.map((l,a)=>lt("td",{key:a,colspan:l.colSpan,rowspan:l.rowSpan,class:n(e,a),style:t(l,a)},[lt("div",{class:["cell",l.labelClassName]},[i[a]])]))])]))}});function uce(e){return{setCurrentRow:c=>{e.commit("setCurrentRow",c)},getSelectionRows:()=>e.getSelectionRows(),toggleRowSelection:(c,d)=>{e.toggleRowSelection(c,d,!1),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:c=>{e.clearFilter(c)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(c,d)=>{e.toggleRowExpansionAdapter(c,d)},clearSort:()=>{e.clearSort()},sort:(c,d)=>{e.commit("sort",{prop:c,order:d})}}}function cce(e,t,n,o){const r=K(!1),s=K(null),i=K(!1),l=L=>{i.value=L},a=K({width:null,height:null,headerHeight:null}),u=K(!1),c={display:"inline-block",verticalAlign:"middle"},d=K(),f=K(0),p=K(0),h=K(0),m=K(0),y=K(0);ls(()=>{t.setHeight(e.height)}),ls(()=>{t.setMaxHeight(e.maxHeight)}),Te(()=>[e.currentRowKey,n.states.rowKey],([L,I])=>{!g(I)||!g(L)||n.setCurrentRowKey(`${L}`)},{immediate:!0}),Te(()=>e.data,L=>{o.store.commit("setData",L)},{immediate:!0,deep:!0}),ls(()=>{e.expandRowKeys&&n.setExpandRowKeysAdapter(e.expandRowKeys)});const v=()=>{o.store.commit("setHoverRow",null),o.hoverState&&(o.hoverState=null)},w=(L,I)=>{const{pixelX:X,pixelY:oe}=I;Math.abs(X)>=Math.abs(oe)&&(o.refs.bodyWrapper.scrollLeft+=I.pixelX/5)},_=R(()=>e.height||e.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),S=R(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),x=()=>{_.value&&t.updateElsHeight(),t.updateColumnsWidth(),requestAnimationFrame(P)};Ct(async()=>{await ot(),n.updateColumns(),N(),requestAnimationFrame(x);const L=o.vnode.el,I=o.refs.headerWrapper;e.flexible&&L&&L.parentElement&&(L.parentElement.style.minWidth="0"),a.value={width:d.value=L.offsetWidth,height:L.offsetHeight,headerHeight:e.showHeader&&I?I.offsetHeight:null},n.states.columns.value.forEach(X=>{X.filteredValue&&X.filteredValue.length&&o.store.commit("filterChange",{column:X,values:X.filteredValue,silent:!0})}),o.$ready=!0});const E=(L,I)=>{if(!L)return;const X=Array.from(L.classList).filter(oe=>!oe.startsWith("is-scrolling-"));X.push(t.scrollX.value?I:"is-scrolling-none"),L.className=X.join(" ")},T=L=>{const{tableWrapper:I}=o.refs;E(I,L)},O=L=>{const{tableWrapper:I}=o.refs;return!!(I&&I.classList.contains(L))},P=function(){if(!o.refs.scrollBarRef)return;if(!t.scrollX.value){const xe="is-scrolling-none";O(xe)||T(xe);return}const L=o.refs.scrollBarRef.wrapRef;if(!L)return;const{scrollLeft:I,offsetWidth:X,scrollWidth:oe}=L,{headerWrapper:z,footerWrapper:ge}=o.refs;z&&(z.scrollLeft=I),ge&&(ge.scrollLeft=I);const Oe=oe-X-1;I>=Oe?T("is-scrolling-right"):T(I===0?"is-scrolling-left":"is-scrolling-middle")},N=()=>{o.refs.scrollBarRef&&(o.refs.scrollBarRef.wrapRef&&Ln(o.refs.scrollBarRef.wrapRef,"scroll",P,{passive:!0}),e.fit?Bo(o.vnode.el,F):Ln(window,"resize",F),Bo(o.refs.bodyWrapper,()=>{var L,I;F(),(I=(L=o.refs)==null?void 0:L.scrollBarRef)==null||I.update()}))},F=()=>{var L,I,X,oe;const z=o.vnode.el;if(!o.$ready||!z)return;let ge=!1;const{width:Oe,height:xe,headerHeight:ee}=a.value,de=d.value=z.offsetWidth;Oe!==de&&(ge=!0);const ve=z.offsetHeight;(e.height||_.value)&&xe!==ve&&(ge=!0);const le=e.tableLayout==="fixed"?o.refs.headerWrapper:(L=o.refs.tableHeaderRef)==null?void 0:L.$el;e.showHeader&&(le==null?void 0:le.offsetHeight)!==ee&&(ge=!0),f.value=((I=o.refs.tableWrapper)==null?void 0:I.scrollHeight)||0,h.value=(le==null?void 0:le.scrollHeight)||0,m.value=((X=o.refs.footerWrapper)==null?void 0:X.offsetHeight)||0,y.value=((oe=o.refs.appendWrapper)==null?void 0:oe.offsetHeight)||0,p.value=f.value-h.value-m.value-y.value,ge&&(a.value={width:de,height:ve,headerHeight:e.showHeader&&(le==null?void 0:le.offsetHeight)||0},x())},B=Jo(),Y=R(()=>{const{bodyWidth:L,scrollY:I,gutterWidth:X}=t;return L.value?`${L.value-(I.value?X:0)}px`:""}),Z=R(()=>e.maxHeight?"fixed":e.tableLayout),U=R(()=>{if(e.data&&e.data.length)return null;let L="100%";e.height&&p.value&&(L=`${p.value}px`);const I=d.value;return{width:I?`${I}px`:"",height:L}}),j=R(()=>e.height?{height:Number.isNaN(Number(e.height))?e.height:`${e.height}px`}:e.maxHeight?{maxHeight:Number.isNaN(Number(e.maxHeight))?e.maxHeight:`${e.maxHeight}px`}:{}),V=R(()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${h.value+m.value}px)`}:{maxHeight:`${e.maxHeight-h.value-m.value}px`}:{});return{isHidden:r,renderExpanded:s,setDragVisible:l,isGroup:u,handleMouseLeave:v,handleHeaderFooterMousewheel:w,tableSize:B,emptyBlockStyle:U,handleFixedMousewheel:(L,I)=>{const X=o.refs.bodyWrapper;if(Math.abs(I.spinY)>0){const oe=X.scrollTop;I.pixelY<0&&oe!==0&&L.preventDefault(),I.pixelY>0&&X.scrollHeight-X.clientHeight>oe&&L.preventDefault(),X.scrollTop+=Math.ceil(I.pixelY/5)}else X.scrollLeft+=Math.ceil(I.pixelX/5)},resizeProxyVisible:i,bodyWidth:Y,resizeState:a,doLayout:x,tableBodyStyles:S,tableLayout:Z,scrollbarViewStyle:c,tableInnerStyle:j,scrollbarStyle:V}}function dce(e){const t=K(),n=()=>{const r=e.vnode.el.querySelector(".hidden-columns"),s={childList:!0,subtree:!0},i=e.store.states.updateOrderFns;t.value=new MutationObserver(()=>{i.forEach(l=>l())}),t.value.observe(r,s)};Ct(()=>{n()}),ti(()=>{var o;(o=t.value)==null||o.disconnect()})}var fce={data:{type:Array,default:()=>[]},size:qr,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 $O(e){const t=e.tableLayout==="auto";let n=e.columns||[];t&&n.every(r=>r.width===void 0)&&(n=[]);const o=r=>{const s={key:`${e.tableLayout}_${r.id}`,style:{},name:void 0};return t?s.style={width:`${r.width}px`}:s.name=r.id,s};return lt("colgroup",{},n.map(r=>lt("col",o(r))))}$O.props=["columns","tableLayout"];const pce=()=>{const e=K(),t=(s,i)=>{const l=e.value;l&&l.scrollTo(s,i)},n=(s,i)=>{const l=e.value;l&&_t(i)&&["Top","Left"].includes(s)&&l[`setScroll${s}`](i)};return{scrollBarRef:e,scrollTo:t,setScrollTop:s=>n("Top",s),setScrollLeft:s=>n("Left",s)}};let hce=1;const mce=Q({name:"ElTable",directives:{Mousewheel:toe},components:{TableHeader:ece,TableBody:sce,TableFooter:ace,ElScrollbar:ks,hColgroup:$O},props:fce,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],setup(e){const{t}=Kt(),n=Re("table"),o=at();wt(oi,o);const r=Bue(o,e);o.store=r;const s=new jue({store:o.store,table:o,fit:e.fit,showHeader:e.showHeader});o.layout=s;const i=R(()=>(r.states.data.value||[]).length===0),{setCurrentRow:l,getSelectionRows:a,toggleRowSelection:u,clearSelection:c,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:p,clearSort:h,sort:m}=uce(r),{isHidden:y,renderExpanded:v,setDragVisible:w,isGroup:_,handleMouseLeave:S,handleHeaderFooterMousewheel:x,tableSize:E,emptyBlockStyle:T,handleFixedMousewheel:O,resizeProxyVisible:P,bodyWidth:N,resizeState:F,doLayout:B,tableBodyStyles:Y,tableLayout:Z,scrollbarViewStyle:U,tableInnerStyle:j,scrollbarStyle:V}=cce(e,s,r,o),{scrollBarRef:H,scrollTo:L,setScrollLeft:I,setScrollTop:X}=pce(),oe=zl(B,50),z=`${n.namespace.value}-table_${hce++}`;o.tableId=z,o.state={isGroup:_,resizeState:F,doLayout:B,debouncedUpdateLayout:oe};const ge=R(()=>e.sumText||t("el.table.sumText")),Oe=R(()=>e.emptyText||t("el.table.emptyText"));return dce(o),{ns:n,layout:s,store:r,handleHeaderFooterMousewheel:x,handleMouseLeave:S,tableId:z,tableSize:E,isHidden:y,isEmpty:i,renderExpanded:v,resizeProxyVisible:P,resizeState:F,isGroup:_,bodyWidth:N,tableBodyStyles:Y,emptyBlockStyle:T,debouncedUpdateLayout:oe,handleFixedMousewheel:O,setCurrentRow:l,getSelectionRows:a,toggleRowSelection:u,clearSelection:c,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:p,clearSort:h,doLayout:B,sort:m,t,setDragVisible:w,context:o,computedSumText:ge,computedEmptyText:Oe,tableLayout:Z,scrollbarViewStyle:U,tableInnerStyle:j,scrollbarStyle:V,scrollBarRef:H,scrollTo:L,setScrollLeft:I,setScrollTop:X}}}),gce=["data-prefix"],vce={ref:"hiddenColumns",class:"hidden-columns"};function yce(e,t,n,o,r,s){const i=re("hColgroup"),l=re("table-header"),a=re("table-body"),u=re("table-footer"),c=re("el-scrollbar"),d=zt("mousewheel");return C(),M("div",{ref:"tableWrapper",class:D([{[e.ns.m("fit")]:e.fit,[e.ns.m("striped")]:e.stripe,[e.ns.m("border")]:e.border||e.isGroup,[e.ns.m("hidden")]:e.isHidden,[e.ns.m("group")]:e.isGroup,[e.ns.m("fluid-height")]:e.maxHeight,[e.ns.m("scrollable-x")]:e.layout.scrollX.value,[e.ns.m("scrollable-y")]:e.layout.scrollY.value,[e.ns.m("enable-row-hover")]:!e.store.states.isComplex.value,[e.ns.m("enable-row-transition")]:(e.store.states.data.value||[]).length!==0&&(e.store.states.data.value||[]).length<100,"has-footer":e.showSummary},e.ns.m(e.tableSize),e.className,e.ns.b(),e.ns.m(`layout-${e.tableLayout}`)]),style:Qe(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:t[0]||(t[0]=(...f)=>e.handleMouseLeave&&e.handleMouseLeave(...f))},[b("div",{class:D(e.ns.e("inner-wrapper")),style:Qe(e.tableInnerStyle)},[b("div",vce,[he(e.$slots,"default")],512),e.showHeader&&e.tableLayout==="fixed"?He((C(),M("div",{key:0,ref:"headerWrapper",class:D(e.ns.e("header-wrapper"))},[b("table",{ref:"tableHeader",class:D(e.ns.e("header")),style:Qe(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[k(i,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),k(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]]):W("v-if",!0),b("div",{ref:"bodyWrapper",class:D(e.ns.e("body-wrapper"))},[k(c,{ref:"scrollBarRef","view-style":e.scrollbarViewStyle,"wrap-style":e.scrollbarStyle,always:e.scrollbarAlwaysOn},{default:$(()=>[b("table",{ref:"tableBody",class:D(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:Qe({width:e.bodyWidth,tableLayout:e.tableLayout})},[k(i,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&e.tableLayout==="auto"?(C(),q(l,{key:0,ref:"tableHeaderRef",class:D(e.ns.e("body-header")),border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["class","border","default-sort","store","onSetDragVisible"])):W("v-if",!0),k(a,{context:e.context,highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":e.tooltipEffect,"tooltip-options":e.tooltipOptions,"row-style":e.rowStyle,store:e.store,stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),e.showSummary&&e.tableLayout==="auto"?(C(),q(u,{key:1,class:D(e.ns.e("body-footer")),border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):W("v-if",!0)],6),e.isEmpty?(C(),M("div",{key:0,ref:"emptyBlock",style:Qe(e.emptyBlockStyle),class:D(e.ns.e("empty-block"))},[b("span",{class:D(e.ns.e("empty-text"))},[he(e.$slots,"empty",{},()=>[ne(A(e.computedEmptyText),1)])],2)],6)):W("v-if",!0),e.$slots.append?(C(),M("div",{key:1,ref:"appendWrapper",class:D(e.ns.e("append-wrapper"))},[he(e.$slots,"append")],2)):W("v-if",!0)]),_:3},8,["view-style","wrap-style","always"])],2),e.showSummary&&e.tableLayout==="fixed"?He((C(),M("div",{key:1,ref:"footerWrapper",class:D(e.ns.e("footer-wrapper"))},[b("table",{class:D(e.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:Qe(e.tableBodyStyles)},[k(i,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),k(u,{border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[en,!e.isEmpty],[d,e.handleHeaderFooterMousewheel]]):W("v-if",!0),e.border||e.isGroup?(C(),M("div",{key:2,class:D(e.ns.e("border-left-patch"))},null,2)):W("v-if",!0)],6),He(b("div",{ref:"resizeProxy",class:D(e.ns.e("column-resize-proxy"))},null,2),[[en,e.resizeProxyVisible]])],46,gce)}var _ce=ze(mce,[["render",yce],["__file","table.vue"]]);const bce={selection:"table-column--selection",expand:"table__expand-column"},wce={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:""}},Cce=e=>bce[e]||"",kce={selection:{renderHeader({store:e,column:t}){function n(){return e.states.data.value&&e.states.data.value.length===0}return lt(Hn,{disabled:n(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection,modelValue:e.states.isAllSelected.value,ariaLabel:t.label})},renderCell({row:e,column:t,store:n,$index:o}){return lt(Hn,{disabled:t.selectable?!t.selectable.call(null,e,o):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",e)},onClick:r=>r.stopPropagation(),modelValue:n.isSelected(e),ariaLabel:t.label})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let n=t+1;const o=e.index;return typeof o=="number"?n=t+o:typeof o=="function"&&(n=o(t)),lt("div",{},[n])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({row:e,store:t,expanded:n}){const{ns:o}=t,r=[o.e("expand-icon")];return n&&r.push(o.em("expand-icon","expanded")),lt("div",{class:r,onClick:function(i){i.stopPropagation(),t.toggleRowExpansion(e)}},{default:()=>[lt(Ne,null,{default:()=>[lt(js)]})]})},sortable:!1,resizable:!1}};function Sce({row:e,column:t,$index:n}){var o;const r=t.property,s=r&&Km(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 $ce({row:e,treeNode:t,store:n},o=!1){const{ns:r}=n;if(!t)return o?[lt("span",{class:r.e("placeholder")})]:null;const s=[],i=function(l){l.stopPropagation(),!t.loading&&n.loadOrToggle(e)};if(t.indent&&s.push(lt("span",{class:r.e("indent"),style:{"padding-left":`${t.indent}px`}})),typeof t.expanded=="boolean"&&!t.noLazyChildren){const l=[r.e("expand-icon"),t.expanded?r.em("expand-icon","expanded"):""];let a=js;t.loading&&(a=a3),s.push(lt("div",{class:l,onClick:i},{default:()=>[lt(Ne,{class:{[r.is("loading")]:t.loading}},{default:()=>[lt(a)]})]}))}else s.push(lt("span",{class:r.e("placeholder")}));return s}function k8(e,t){return e.reduce((n,o)=>(n[o]=o,n),t)}function Ece(e,t){const n=at();return{registerComplexWatchers:()=>{const s=["fixed"],i={realWidth:"width",realMinWidth:"minWidth"},l=k8(s,i);Object.keys(l).forEach(a=>{const u=i[a];vt(t,u)&&Te(()=>t[u],c=>{let d=c;u==="width"&&a==="realWidth"&&(d=K3(c)),u==="minWidth"&&a==="realMinWidth"&&(d=yO(c)),n.columnConfig.value[u]=d,n.columnConfig.value[a]=d;const f=u==="fixed";e.value.store.scheduleLayout(f)})})},registerNormalWatchers:()=>{const s=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip"],i={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},l=k8(s,i);Object.keys(l).forEach(a=>{const u=i[a];vt(t,u)&&Te(()=>t[u],c=>{n.columnConfig.value[a]=c})})}}}function xce(e,t,n){const o=at(),r=K(""),s=K(!1),i=K(),l=K(),a=Re("table");ls(()=>{i.value=e.align?`is-${e.align}`:null,i.value}),ls(()=>{l.value=e.headerAlign?`is-${e.headerAlign}`:i.value,l.value});const u=R(()=>{let S=o.vnode.vParent||o.parent;for(;S&&!S.tableId&&!S.columnId;)S=S.vnode.vParent||S.parent;return S}),c=R(()=>{const{store:S}=o.parent;if(!S)return!1;const{treeData:x}=S.states,E=x.value;return E&&Object.keys(E).length>0}),d=K(K3(e.width)),f=K(yO(e.minWidth)),p=S=>(d.value&&(S.width=d.value),f.value&&(S.minWidth=f.value),!d.value&&f.value&&(S.width=void 0),S.minWidth||(S.minWidth=80),S.realWidth=Number(S.width===void 0?S.minWidth:S.width),S),h=S=>{const x=S.type,E=kce[x]||{};Object.keys(E).forEach(O=>{const P=E[O];O!=="className"&&P!==void 0&&(S[O]=P)});const T=Cce(x);if(T){const O=`${g(a.namespace)}-${T}`;S.className=S.className?`${S.className} ${O}`:O}return S},m=S=>{Array.isArray(S)?S.forEach(E=>x(E)):x(S);function x(E){var T;((T=E==null?void 0:E.type)==null?void 0:T.name)==="ElTableColumn"&&(E.vParent=o)}};return{columnId:r,realAlign:i,isSubColumn:s,realHeaderAlign:l,columnOrTableParent:u,setColumnWidth:p,setColumnForcedProps:h,setColumnRenders:S=>{e.renderHeader||S.type!=="selection"&&(S.renderHeader=E=>(o.columnConfig.value.label,he(t,"header",E,()=>[S.label])));let x=S.renderCell;return S.type==="expand"?(S.renderCell=E=>lt("div",{class:"cell"},[x(E)]),n.value.renderExpanded=E=>t.default?t.default(E):t.default):(x=x||Sce,S.renderCell=E=>{let T=null;if(t.default){const Y=t.default(E);T=Y.some(Z=>Z.type!==Kn)?Y:x(E)}else T=x(E);const{columns:O}=n.value.store.states,P=O.value.findIndex(Y=>Y.type==="default"),N=c.value&&E.cellIndex===P,F=$ce(E,N),B={class:"cell",style:{}};return S.showOverflowTooltip&&(B.class=`${B.class} ${g(a.namespace)}-tooltip`,B.style={width:`${(E.column.realWidth||Number(E.column.width))-1}px`}),m(T),lt("div",B,[F,T])}),S},getPropsData:(...S)=>S.reduce((x,E)=>(Array.isArray(E)&&E.forEach(T=>{x[T]=e[T]}),x),{}),getColumnElIndex:(S,x)=>Array.prototype.indexOf.call(S,x),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",o.columnConfig.value)}}}var Mce={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 Tce=1;var EO=Q({name:"ElTableColumn",components:{ElCheckbox:Hn},props:Mce,setup(e,{slots:t}){const n=at(),o=K({}),r=R(()=>{let _=n.parent;for(;_&&!_.tableId;)_=_.parent;return _}),{registerNormalWatchers:s,registerComplexWatchers:i}=Ece(r,e),{columnId:l,isSubColumn:a,realHeaderAlign:u,columnOrTableParent:c,setColumnWidth:d,setColumnForcedProps:f,setColumnRenders:p,getPropsData:h,getColumnElIndex:m,realAlign:y,updateColumnOrder:v}=xce(e,t,r),w=c.value;l.value=`${w.tableId||w.columnId}_column_${Tce++}`,yd(()=>{a.value=r.value!==w;const _=e.type||"default",S=e.sortable===""?!0:e.sortable,x=Uo(e.showOverflowTooltip)?w.props.showOverflowTooltip:e.showOverflowTooltip,E={...wce[_],id:l.value,type:_,property:e.prop||e.property,align:y,headerAlign:u,showOverflowTooltip:x,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:S,index:e.index,rawColumnKey:n.vnode.key};let F=h(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);F=Tue(E,F),F=Iue(p,d,f)(F),o.value=F,s(),i()}),Ct(()=>{var _;const S=c.value,x=a.value?S.vnode.el.children:(_=S.refs.hiddenColumns)==null?void 0:_.children,E=()=>m(x||[],n.vnode.el);o.value.getColumnIndex=E,E()>-1&&r.value.store.commit("insertColumn",o.value,a.value?S.columnConfig.value:null,v)}),En(()=>{r.value.store.commit("removeColumn",o.value,a.value?w.columnConfig.value:null,v)}),n.columnId=l.value,n.columnConfig=o},render(){var e,t,n;try{const o=(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1}),r=[];if(Array.isArray(o))for(const i of o)((n=i.type)==null?void 0:n.name)==="ElTableColumn"||i.shapeFlag&2?r.push(i):i.type===fe&&Array.isArray(i.children)&&i.children.forEach(l=>{(l==null?void 0:l.patchFlag)!==1024&&!tt(l==null?void 0:l.children)&&r.push(l)});return lt("div",r)}catch{return lt("div",[])}}});const G0=Zt(_ce,{TableColumn:EO}),Y0=Gn(EO),Z0=Symbol("tabsRootContextKey"),Oce=We({tabs:{type:Ce(Array),default:()=>$o([])}}),xO="ElTabBar",Ice=Q({name:xO}),Ace=Q({...Ice,props:Oce,setup(e,{expose:t}){const n=e,o=at(),r=Be(Z0);r||ws(xO,"<el-tabs><el-tab-bar /></el-tabs>");const s=Re("tabs"),i=K(),l=K(),a=()=>{let c=0,d=0;const f=["top","bottom"].includes(r.props.tabPosition)?"width":"height",p=f==="width"?"x":"y",h=p==="x"?"left":"top";return n.tabs.every(m=>{var y,v;const w=(v=(y=o.parent)==null?void 0:y.refs)==null?void 0:v[`tab-${m.uid}`];if(!w)return!1;if(!m.active)return!0;c=w[`offset${Cl(h)}`],d=w[`client${Cl(f)}`];const _=window.getComputedStyle(w);return f==="width"&&(n.tabs.length>1&&(d-=Number.parseFloat(_.paddingLeft)+Number.parseFloat(_.paddingRight)),c+=Number.parseFloat(_.paddingLeft)),!1}),{[f]:`${d}px`,transform:`translate${Cl(p)}(${c}px)`}},u=()=>l.value=a();return Te(()=>n.tabs,async()=>{await ot(),u()},{immediate:!0}),Bo(i,()=>u()),t({ref:i,update:u}),(c,d)=>(C(),M("div",{ref_key:"barRef",ref:i,class:D([g(s).e("active-bar"),g(s).is(g(r).props.tabPosition)]),style:Qe(l.value)},null,6))}});var Nce=ze(Ace,[["__file","tab-bar.vue"]]);const Pce=We({panes:{type:Ce(Array),default:()=>$o([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),Lce={tabClick:(e,t,n)=>n instanceof Event,tabRemove:(e,t)=>t instanceof Event},S8="ElTabNav",Rce=Q({name:S8,props:Pce,emits:Lce,setup(e,{expose:t,emit:n}){const o=at(),r=Be(Z0);r||ws(S8,"<el-tabs><tab-nav /></el-tabs>");const s=Re("tabs"),i=Zj(),l=cH(),a=K(),u=K(),c=K(),d=K(),f=K(!1),p=K(0),h=K(!1),m=K(!0),y=R(()=>["top","bottom"].includes(r.props.tabPosition)?"width":"height"),v=R(()=>({transform:`translate${y.value==="width"?"X":"Y"}(-${p.value}px)`})),w=()=>{if(!a.value)return;const P=a.value[`offset${Cl(y.value)}`],N=p.value;if(!N)return;const F=N>P?N-P:0;p.value=F},_=()=>{if(!a.value||!u.value)return;const P=u.value[`offset${Cl(y.value)}`],N=a.value[`offset${Cl(y.value)}`],F=p.value;if(P-F<=N)return;const B=P-F>N*2?F+N:P-N;p.value=B},S=async()=>{const P=u.value;if(!f.value||!c.value||!a.value||!P)return;await ot();const N=c.value.querySelector(".is-active");if(!N)return;const F=a.value,B=["top","bottom"].includes(r.props.tabPosition),Y=N.getBoundingClientRect(),Z=F.getBoundingClientRect(),U=B?P.offsetWidth-Z.width:P.offsetHeight-Z.height,j=p.value;let V=j;B?(Y.left<Z.left&&(V=j-(Z.left-Y.left)),Y.right>Z.right&&(V=j+Y.right-Z.right)):(Y.top<Z.top&&(V=j-(Z.top-Y.top)),Y.bottom>Z.bottom&&(V=j+(Y.bottom-Z.bottom))),V=Math.max(V,0),p.value=Math.min(V,U)},x=()=>{var P;if(!u.value||!a.value)return;e.stretch&&((P=d.value)==null||P.update());const N=u.value[`offset${Cl(y.value)}`],F=a.value[`offset${Cl(y.value)}`],B=p.value;F<N?(f.value=f.value||{},f.value.prev=B,f.value.next=B+F<N,N-B<F&&(p.value=N-F)):(f.value=!1,B>0&&(p.value=0))},E=P=>{const N=P.code,{up:F,down:B,left:Y,right:Z}=rt;if(![F,B,Y,Z].includes(N))return;const U=Array.from(P.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")),j=U.indexOf(P.target);let V;N===Y||N===F?j===0?V=U.length-1:V=j-1:j<U.length-1?V=j+1:V=0,U[V].focus({preventScroll:!0}),U[V].click(),T()},T=()=>{m.value&&(h.value=!0)},O=()=>h.value=!1;return Te(i,P=>{P==="hidden"?m.value=!1:P==="visible"&&setTimeout(()=>m.value=!0,50)}),Te(l,P=>{P?setTimeout(()=>m.value=!0,50):m.value=!1}),Bo(c,x),Ct(()=>setTimeout(()=>S(),0)),Fi(()=>x()),t({scrollToActiveTab:S,removeFocus:O}),Te(()=>e.panes,()=>o.update(),{flush:"post",deep:!0}),()=>{const P=f.value?[k("span",{class:[s.e("nav-prev"),s.is("disabled",!f.value.prev)],onClick:w},[k(Ne,null,{default:()=>[k(au,null,null)]})]),k("span",{class:[s.e("nav-next"),s.is("disabled",!f.value.next)],onClick:_},[k(Ne,null,{default:()=>[k(js,null,null)]})])]:null,N=e.panes.map((F,B)=>{var Y,Z,U,j;const V=F.uid,H=F.props.disabled,L=(Z=(Y=F.props.name)!=null?Y:F.index)!=null?Z:`${B}`,I=!H&&(F.isClosable||e.editable);F.index=`${B}`;const X=I?k(Ne,{class:"is-icon-close",onClick:ge=>n("tabRemove",F,ge)},{default:()=>[k(Gs,null,null)]}):null,oe=((j=(U=F.slots).label)==null?void 0:j.call(U))||F.props.label,z=!H&&F.active?0:-1;return k("div",{ref:`tab-${V}`,class:[s.e("item"),s.is(r.props.tabPosition),s.is("active",F.active),s.is("disabled",H),s.is("closable",I),s.is("focus",h.value)],id:`tab-${L}`,key:`tab-${V}`,"aria-controls":`pane-${L}`,role:"tab","aria-selected":F.active,tabindex:z,onFocus:()=>T(),onBlur:()=>O(),onClick:ge=>{O(),n("tabClick",F,L,ge)},onKeydown:ge=>{I&&(ge.code===rt.delete||ge.code===rt.backspace)&&n("tabRemove",F,ge)}},[oe,X])});return k("div",{ref:c,class:[s.e("nav-wrap"),s.is("scrollable",!!f.value),s.is(r.props.tabPosition)]},[P,k("div",{class:s.e("nav-scroll"),ref:a},[k("div",{class:[s.e("nav"),s.is(r.props.tabPosition),s.is("stretch",e.stretch&&["top","bottom"].includes(r.props.tabPosition))],ref:u,style:v.value,role:"tablist",onKeydown:E},[e.type?null:k(Nce,{ref:d,tabs:[...e.panes]},null),N])])])}}}),Dce=We({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:Ce(Function),default:()=>!0},stretch:Boolean}),cy=e=>tt(e)||_t(e),Fce={[Jt]:e=>cy(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>cy(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>cy(e),tabAdd:()=>!0},Vce=Q({name:"ElTabs",props:Dce,emits:Fce,setup(e,{emit:t,slots:n,expose:o}){var r;const s=Re("tabs"),{children:i,addChild:l,removeChild:a}=_Q(at(),"ElTabPane"),u=K(),c=K((r=e.modelValue)!=null?r:"0"),d=async(m,y=!1)=>{var v,w,_;if(!(c.value===m||Uo(m)))try{await((v=e.beforeLeave)==null?void 0:v.call(e,m,c.value))!==!1&&(c.value=m,y&&(t(Jt,m),t("tabChange",m)),(_=(w=u.value)==null?void 0:w.removeFocus)==null||_.call(w))}catch{}},f=(m,y,v)=>{m.props.disabled||(d(y,!0),t("tabClick",m,v))},p=(m,y)=>{m.props.disabled||Uo(m.props.name)||(y.stopPropagation(),t("edit",m.props.name,"remove"),t("tabRemove",m.props.name))},h=()=>{t("edit",void 0,"add"),t("tabAdd")};return Te(()=>e.modelValue,m=>d(m)),Te(c,async()=>{var m;await ot(),(m=u.value)==null||m.scrollToActiveTab()}),wt(Z0,{props:e,currentName:c,registerPane:l,unregisterPane:a}),o({currentName:c}),()=>{const m=n["add-icon"],y=e.editable||e.addable?k("span",{class:s.e("new-tab"),tabindex:"0",onClick:h,onKeydown:_=>{_.code===rt.enter&&h()}},[m?he(n,"add-icon"):k(Ne,{class:s.is("icon-plus")},{default:()=>[k(u3,null,null)]})]):null,v=k("div",{class:[s.e("header"),s.is(e.tabPosition)]},[y,k(Rce,{ref:u,currentName:c.value,editable:e.editable,type:e.type,panes:i.value,stretch:e.stretch,onTabClick:f,onTabRemove:p},null)]),w=k("div",{class:s.e("content")},[he(n,"default")]);return k("div",{class:[s.b(),s.m(e.tabPosition),{[s.m("card")]:e.type==="card",[s.m("border-card")]:e.type==="border-card"}]},[...e.tabPosition!=="bottom"?[v,w]:[w,v]])}}}),Bce=We({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),zce=["id","aria-hidden","aria-labelledby"],MO="ElTabPane",jce=Q({name:MO}),Hce=Q({...jce,props:Bce,setup(e){const t=e,n=at(),o=Kr(),r=Be(Z0);r||ws(MO,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const s=Re("tab-pane"),i=K(),l=R(()=>t.closable||r.props.closable),a=k6(()=>{var p;return r.currentName.value===((p=t.name)!=null?p:i.value)}),u=K(a.value),c=R(()=>{var p;return(p=t.name)!=null?p:i.value}),d=k6(()=>!t.lazy||u.value||a.value);Te(a,p=>{p&&(u.value=!0)});const f=Dn({uid:n.uid,slots:o,props:t,paneName:c,active:a,index:i,isClosable:l});return Ct(()=>{r.registerPane(f)}),ti(()=>{r.unregisterPane(f.uid)}),(p,h)=>g(d)?He((C(),M("div",{key:0,id:`pane-${g(c)}`,class:D(g(s).b()),role:"tabpanel","aria-hidden":!g(a),"aria-labelledby":`tab-${g(c)}`},[he(p.$slots,"default")],10,zce)),[[en,g(a)]]):W("v-if",!0)}});var TO=ze(Hce,[["__file","tab-pane.vue"]]);const OO=Zt(Vce,{TabPane:TO}),IO=Gn(TO),Uce=We({format:{type:String,default:"HH:mm"},modelValue:String,disabled:Boolean,editable:{type:Boolean,default:!0},effect:{type:String,default:"light"},clearable:{type:Boolean,default:!0},size:qr,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:"00:30"},minTime:String,maxTime:String,name:String,prefixIcon:{type:Ce([String,Object]),default:()=>Jx},clearIcon:{type:Ce([String,Object]),default:()=>wd},...M3}),wi=e=>{const t=(e||"").split(":");if(t.length>=2){let n=Number.parseInt(t[0],10);const o=Number.parseInt(t[1],10),r=e.toUpperCase();return r.includes("AM")&&n===12?n=0:r.includes("PM")&&n!==12&&(n+=12),{hours:n,minutes:o}}return null},dy=(e,t)=>{const n=wi(e);if(!n)return-1;const o=wi(t);if(!o)return-1;const r=n.minutes+n.hours*60,s=o.minutes+o.hours*60;return r===s?0:r>s?1:-1},$8=e=>`${e}`.padStart(2,"0"),Gu=e=>`${$8(e.hours)}:${$8(e.minutes)}`,Wce=(e,t)=>{const n=wi(e);if(!n)return"";const o=wi(t);if(!o)return"";const r={hours:n.hours,minutes:n.minutes};return r.minutes+=o.minutes,r.hours+=o.hours,r.hours+=Math.floor(r.minutes/60),r.minutes=r.minutes%60,Gu(r)},Kce=Q({name:"ElTimeSelect"}),qce=Q({...Kce,props:Uce,emits:["change","blur","focus","update:modelValue"],setup(e,{expose:t}){const n=e;ut.extend(aT);const{Option:o}=vr,r=Re("input"),s=K(),i=Gr(),{lang:l}=Kt(),a=R(()=>n.modelValue),u=R(()=>{const v=wi(n.start);return v?Gu(v):null}),c=R(()=>{const v=wi(n.end);return v?Gu(v):null}),d=R(()=>{const v=wi(n.step);return v?Gu(v):null}),f=R(()=>{const v=wi(n.minTime||"");return v?Gu(v):null}),p=R(()=>{const v=wi(n.maxTime||"");return v?Gu(v):null}),h=R(()=>{const v=[];if(n.start&&n.end&&n.step){let w=u.value,_;for(;w&&c.value&&dy(w,c.value)<=0;)_=ut(w,"HH:mm").locale(l.value).format(n.format),v.push({value:_,disabled:dy(w,f.value||"-1:-1")<=0||dy(w,p.value||"100:100")>=0}),w=Wce(w,d.value)}return v});return t({blur:()=>{var v,w;(w=(v=s.value)==null?void 0:v.blur)==null||w.call(v)},focus:()=>{var v,w;(w=(v=s.value)==null?void 0:v.focus)==null||w.call(v)}}),(v,w)=>(C(),q(g(vr),{ref_key:"select",ref:s,"model-value":g(a),disabled:g(i),clearable:v.clearable,"clear-icon":v.clearIcon,size:v.size,effect:v.effect,placeholder:v.placeholder,"default-first-option":"",filterable:v.editable,"empty-values":v.emptyValues,"value-on-clear":v.valueOnClear,"onUpdate:modelValue":w[0]||(w[0]=_=>v.$emit("update:modelValue",_)),onChange:w[1]||(w[1]=_=>v.$emit("change",_)),onBlur:w[2]||(w[2]=_=>v.$emit("blur",_)),onFocus:w[3]||(w[3]=_=>v.$emit("focus",_))},{prefix:$(()=>[v.prefixIcon?(C(),q(g(Ne),{key:0,class:D(g(r).e("prefix-icon"))},{default:$(()=>[(C(),q(Lt(v.prefixIcon)))]),_:1},8,["class"])):W("v-if",!0)]),default:$(()=>[(C(!0),M(fe,null,nt(g(h),_=>(C(),q(g(o),{key:_.value,label:_.value,value:_.value,disabled:_.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear"]))}});var s1=ze(qce,[["__file","time-select.vue"]]);s1.install=e=>{e.component(s1.name,s1)};const Gce=s1,AO=Gce,NO=Symbol("uploadContextKey"),Yce="ElUpload";class Zce extends Error{constructor(t,n,o,r){super(t),this.name="UploadAjaxError",this.status=n,this.method=o,this.url=r}}function E8(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 Zce(o,n.status,t.method,e)}function Jce(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const Xce=e=>{typeof XMLHttpRequest>"u"&&ws(Yce,"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))Me(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(E8(n,e,t))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(E8(n,e,t));e.onSuccess(Jce(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))xo(i)||t.setRequestHeader(s,String(i));return t.send(o),t},PO=["text","picture","picture-card"];let Qce=1;const $b=()=>Date.now()+Qce++,LO=We({action:{type:String,default:"#"},headers:{type:Ce(Object)},method:{type:String,default:"post"},data:{type:Ce([Object,Function,Promise]),default:()=>$o({})},multiple:{type:Boolean,default:!1},name:{type:String,default:"file"},drag:{type:Boolean,default:!1},withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:Ce(Array),default:()=>$o([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:PO,default:"text"},httpRequest:{type:Ce(Function),default:Xce},disabled:Boolean,limit:Number}),ede=We({...LO,beforeUpload:{type:Ce(Function),default:yt},beforeRemove:{type:Ce(Function)},onRemove:{type:Ce(Function),default:yt},onChange:{type:Ce(Function),default:yt},onPreview:{type:Ce(Function),default:yt},onSuccess:{type:Ce(Function),default:yt},onProgress:{type:Ce(Function),default:yt},onError:{type:Ce(Function),default:yt},onExceed:{type:Ce(Function),default:yt},crossorigin:{type:Ce(String)}}),tde=We({files:{type:Ce(Array),default:()=>$o([])},disabled:{type:Boolean,default:!1},handlePreview:{type:Ce(Function),default:yt},listType:{type:String,values:PO,default:"text"},crossorigin:{type:Ce(String)}}),nde={remove:e=>!!e},ode=["onKeydown"],rde=["src","crossorigin"],sde=["onClick"],ide=["title"],lde=["onClick"],ade=["onClick"],ude=Q({name:"ElUploadList"}),cde=Q({...ude,props:tde,emits:nde,setup(e,{emit:t}){const n=e,{t:o}=Kt(),r=Re("upload"),s=Re("icon"),i=Re("list"),l=Gr(),a=K(!1),u=R(()=>[r.b("list"),r.bm("list",n.listType),r.is("disabled",n.disabled)]),c=d=>{t("remove",d)};return(d,f)=>(C(),q(w0,{tag:"ul",class:D(g(u)),name:g(i).b()},{default:$(()=>[(C(!0),M(fe,null,nt(d.files,p=>(C(),M("li",{key:p.uid||p.name,class:D([g(r).be("list","item"),g(r).is(p.status),{focusing:a.value}]),tabindex:"0",onKeydown:Pt(h=>!g(l)&&c(p),["delete"]),onFocus:f[0]||(f[0]=h=>a.value=!0),onBlur:f[1]||(f[1]=h=>a.value=!1),onClick:f[2]||(f[2]=h=>a.value=!1)},[he(d.$slots,"default",{file:p},()=>[d.listType==="picture"||p.status!=="uploading"&&d.listType==="picture-card"?(C(),M("img",{key:0,class:D(g(r).be("list","item-thumbnail")),src:p.url,crossorigin:d.crossorigin,alt:""},null,10,rde)):W("v-if",!0),p.status==="uploading"||d.listType!=="picture-card"?(C(),M("div",{key:1,class:D(g(r).be("list","item-info"))},[b("a",{class:D(g(r).be("list","item-name")),onClick:et(h=>d.handlePreview(p),["prevent"])},[k(g(Ne),{class:D(g(s).m("document"))},{default:$(()=>[k(g(lZ))]),_:1},8,["class"]),b("span",{class:D(g(r).be("list","item-file-name")),title:p.name},A(p.name),11,ide)],10,sde),p.status==="uploading"?(C(),q(g(gO),{key:0,type:d.listType==="picture-card"?"circle":"line","stroke-width":d.listType==="picture-card"?6:2,percentage:Number(p.percentage),style:Qe(d.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):W("v-if",!0)],2)):W("v-if",!0),b("label",{class:D(g(r).be("list","item-status-label"))},[d.listType==="text"?(C(),q(g(Ne),{key:0,class:D([g(s).m("upload-success"),g(s).m("circle-check")])},{default:$(()=>[k(g(i3))]),_:1},8,["class"])):["picture-card","picture"].includes(d.listType)?(C(),q(g(Ne),{key:1,class:D([g(s).m("upload-success"),g(s).m("check")])},{default:$(()=>[k(g(Yx))]),_:1},8,["class"])):W("v-if",!0)],2),g(l)?W("v-if",!0):(C(),q(g(Ne),{key:2,class:D(g(s).m("close")),onClick:h=>c(p)},{default:$(()=>[k(g(Gs))]),_:2},1032,["class","onClick"])),W(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),W(" This is a bug which needs to be fixed "),W(" TODO: Fix the incorrect navigation interaction "),g(l)?W("v-if",!0):(C(),M("i",{key:3,class:D(g(s).m("close-tip"))},A(g(o)("el.upload.deleteTip")),3)),d.listType==="picture-card"?(C(),M("span",{key:4,class:D(g(r).be("list","item-actions"))},[b("span",{class:D(g(r).be("list","item-preview")),onClick:h=>d.handlePreview(p)},[k(g(Ne),{class:D(g(s).m("zoom-in"))},{default:$(()=>[k(g(oM))]),_:1},8,["class"])],10,lde),g(l)?W("v-if",!0):(C(),M("span",{key:0,class:D(g(r).be("list","item-delete")),onClick:h=>c(p)},[k(g(Ne),{class:D(g(s).m("delete"))},{default:$(()=>[k(g(Xx))]),_:1},8,["class"])],10,ade))],2)):W("v-if",!0)])],42,ode))),128)),he(d.$slots,"append")]),_:3},8,["class","name"]))}});var x8=ze(cde,[["__file","upload-list.vue"]]);const dde=We({disabled:{type:Boolean,default:!1}}),fde={file:e=>Me(e)},pde=["onDrop","onDragover"],RO="ElUploadDrag",hde=Q({name:RO}),mde=Q({...hde,props:dde,emits:fde,setup(e,{emit:t}){Be(NO)||ws(RO,"usage: <el-upload><el-upload-dragger /></el-upload>");const o=Re("upload"),r=K(!1),s=Gr(),i=a=>{if(s.value)return;r.value=!1,a.stopPropagation();const u=Array.from(a.dataTransfer.files);t("file",u)},l=()=>{s.value||(r.value=!0)};return(a,u)=>(C(),M("div",{class:D([g(o).b("dragger"),g(o).is("dragover",r.value)]),onDrop:et(i,["prevent"]),onDragover:et(l,["prevent"]),onDragleave:u[0]||(u[0]=et(c=>r.value=!1,["prevent"]))},[he(a.$slots,"default")],42,pde))}});var gde=ze(mde,[["__file","upload-dragger.vue"]]);const vde=We({...LO,beforeUpload:{type:Ce(Function),default:yt},onRemove:{type:Ce(Function),default:yt},onStart:{type:Ce(Function),default:yt},onSuccess:{type:Ce(Function),default:yt},onProgress:{type:Ce(Function),default:yt},onError:{type:Ce(Function),default:yt},onExceed:{type:Ce(Function),default:yt}}),yde=["onKeydown"],_de=["name","multiple","accept"],bde=Q({name:"ElUploadContent",inheritAttrs:!1}),wde=Q({...bde,props:vde,setup(e,{expose:t}){const n=e,o=Re("upload"),r=Gr(),s=Tn({}),i=Tn(),l=m=>{if(m.length===0)return;const{autoUpload:y,limit:v,fileList:w,multiple:_,onStart:S,onExceed:x}=n;if(v&&w.length+m.length>v){x(m,w);return}_||(m=m.slice(0,1));for(const E of m){const T=E;T.uid=$b(),S(T),y&&a(T)}},a=async m=>{if(i.value.value="",!n.beforeUpload)return c(m);let y,v={};try{const _=n.data,S=n.beforeUpload(m);v=rg(n.data)?i5(n.data):n.data,y=await S,rg(n.data)&&jl(_,v)&&(v=i5(n.data))}catch{y=!1}if(y===!1){n.onRemove(m);return}let w=m;y instanceof Blob&&(y instanceof File?w=y:w=new File([y],m.name,{type:m.type})),c(Object.assign(w,{uid:m.uid}),v)},u=async(m,y)=>Xe(m)?m(y):m,c=async(m,y)=>{const{headers:v,data:w,method:_,withCredentials:S,name:x,action:E,onProgress:T,onSuccess:O,onError:P,httpRequest:N}=n;try{y=await u(y??w,m)}catch{n.onRemove(m);return}const{uid:F}=m,B={headers:v||{},withCredentials:S,file:m,data:y,method:_,filename:x,action:E,onProgress:Z=>{T(Z,m)},onSuccess:Z=>{O(Z,m),delete s.value[F]},onError:Z=>{P(Z,m),delete s.value[F]}},Y=N(B);s.value[F]=Y,Y instanceof Promise&&Y.then(B.onSuccess,B.onError)},d=m=>{const y=m.target.files;y&&l(Array.from(y))},f=()=>{r.value||(i.value.value="",i.value.click())},p=()=>{f()};return t({abort:m=>{mY(s.value).filter(m?([v])=>String(m.uid)===v:()=>!0).forEach(([v,w])=>{w instanceof XMLHttpRequest&&w.abort(),delete s.value[v]})},upload:a}),(m,y)=>(C(),M("div",{class:D([g(o).b(),g(o).m(m.listType),g(o).is("drag",m.drag)]),tabindex:"0",onClick:f,onKeydown:Pt(et(p,["self"]),["enter","space"])},[m.drag?(C(),q(gde,{key:0,disabled:g(r),onFile:l},{default:$(()=>[he(m.$slots,"default")]),_:3},8,["disabled"])):he(m.$slots,"default",{key:1}),b("input",{ref_key:"inputRef",ref:i,class:D(g(o).e("input")),name:m.name,multiple:m.multiple,accept:m.accept,type:"file",onChange:d,onClick:y[0]||(y[0]=et(()=>{},["stop"]))},null,42,_de)],42,yde))}});var M8=ze(wde,[["__file","upload-content.vue"]]);const T8="ElUpload",O8=e=>{var t;(t=e.url)!=null&&t.startsWith("blob:")&&URL.revokeObjectURL(e.url)},Cde=(e,t)=>{const n=uH(e,"fileList",void 0,{passive:!0}),o=f=>n.value.find(p=>p.uid===f.uid);function r(f){var p;(p=t.value)==null||p.abort(f)}function s(f=["ready","uploading","success","fail"]){n.value=n.value.filter(p=>!f.includes(p.status))}const i=(f,p)=>{const h=o(p);h&&(console.error(f),h.status="fail",n.value.splice(n.value.indexOf(h),1),e.onError(f,h,n.value),e.onChange(h,n.value))},l=(f,p)=>{const h=o(p);h&&(e.onProgress(f,h,n.value),h.status="uploading",h.percentage=Math.round(f.percent))},a=(f,p)=>{const h=o(p);h&&(h.status="success",h.response=f,e.onSuccess(f,h,n.value),e.onChange(h,n.value))},u=f=>{xo(f.uid)&&(f.uid=$b());const p={name:f.name,percentage:0,status:"ready",size:f.size,raw:f,uid:f.uid};if(e.listType==="picture-card"||e.listType==="picture")try{p.url=URL.createObjectURL(f)}catch(h){h.message,e.onError(h,p,n.value)}n.value=[...n.value,p],e.onChange(p,n.value)},c=async f=>{const p=f instanceof File?o(f):f;p||ws(T8,"file to be removed not found");const h=m=>{r(m);const y=n.value;y.splice(y.indexOf(m),1),e.onRemove(m,y),O8(m)};e.beforeRemove?await e.beforeRemove(p,n.value)!==!1&&h(p):h(p)};function d(){n.value.filter(({status:f})=>f==="ready").forEach(({raw:f})=>{var p;return f&&((p=t.value)==null?void 0:p.upload(f))})}return Te(()=>e.listType,f=>{f!=="picture-card"&&f!=="picture"||(n.value=n.value.map(p=>{const{raw:h,url:m}=p;if(!m&&h)try{p.url=URL.createObjectURL(h)}catch(y){e.onError(y,p,n.value)}return p}))}),Te(n,f=>{for(const p of f)p.uid||(p.uid=$b()),p.status||(p.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:r,clearFiles:s,handleError:i,handleProgress:l,handleStart:u,handleSuccess:a,handleRemove:c,submit:d,revokeFileObjectURL:O8}},kde=Q({name:"ElUpload"}),Sde=Q({...kde,props:ede,setup(e,{expose:t}){const n=e,o=Gr(),r=Tn(),{abort:s,submit:i,clearFiles:l,uploadFiles:a,handleStart:u,handleError:c,handleRemove:d,handleSuccess:f,handleProgress:p,revokeFileObjectURL:h}=Cde(n,r),m=R(()=>n.listType==="picture-card"),y=R(()=>({...n,fileList:a.value,onStart:u,onProgress:p,onSuccess:f,onError:c,onRemove:d}));return En(()=>{a.value.forEach(h)}),wt(NO,{accept:pn(n,"accept")}),t({abort:s,submit:i,clearFiles:l,handleStart:u,handleRemove:d}),(v,w)=>(C(),M("div",null,[g(m)&&v.showFileList?(C(),q(x8,{key:0,disabled:g(o),"list-type":v.listType,files:g(a),crossorigin:v.crossorigin,"handle-preview":v.onPreview,onRemove:g(d)},tu({append:$(()=>[k(M8,un({ref_key:"uploadRef",ref:r},g(y)),{default:$(()=>[v.$slots.trigger?he(v.$slots,"trigger",{key:0}):W("v-if",!0),!v.$slots.trigger&&v.$slots.default?he(v.$slots,"default",{key:1}):W("v-if",!0)]),_:3},16)]),_:2},[v.$slots.file?{name:"default",fn:$(({file:_})=>[he(v.$slots,"file",{file:_})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):W("v-if",!0),!g(m)||g(m)&&!v.showFileList?(C(),q(M8,un({key:1,ref_key:"uploadRef",ref:r},g(y)),{default:$(()=>[v.$slots.trigger?he(v.$slots,"trigger",{key:0}):W("v-if",!0),!v.$slots.trigger&&v.$slots.default?he(v.$slots,"default",{key:1}):W("v-if",!0)]),_:3},16)):W("v-if",!0),v.$slots.trigger?he(v.$slots,"default",{key:2}):W("v-if",!0),he(v.$slots,"tip"),!g(m)&&v.showFileList?(C(),q(x8,{key:3,disabled:g(o),"list-type":v.listType,files:g(a),crossorigin:v.crossorigin,"handle-preview":v.onPreview,onRemove:g(d)},tu({_:2},[v.$slots.file?{name:"default",fn:$(({file:_})=>[he(v.$slots,"file",{file:_})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):W("v-if",!0)]))}});var $de=ze(Sde,[["__file","upload.vue"]]);const DO=Zt($de);function Ede(e){let t;const n=K(!1),o=Dn({...e,originalPosition:"",originalOverflow:"",visible:!1});function r(f){o.text=f}function s(){const f=o.parent,p=d.ns;if(!f.vLoadingAddClassList){let h=f.getAttribute("loading-number");h=Number.parseInt(h)-1,h?f.setAttribute("loading-number",h.toString()):(qs(f,p.bm("parent","relative")),f.removeAttribute("loading-number")),qs(f,p.bm("parent","hidden"))}i(),c.unmount()}function i(){var f,p;(p=(f=d.$el)==null?void 0:f.parentNode)==null||p.removeChild(d.$el)}function l(){var f;e.beforeClose&&!e.beforeClose()||(n.value=!0,clearTimeout(t),t=window.setTimeout(a,400),o.visible=!1,(f=e.closed)==null||f.call(e))}function a(){if(!n.value)return;const f=o.parent;n.value=!1,f.vLoadingAddClassList=void 0,s()}const c=ww(Q({name:"ElLoading",setup(f,{expose:p}){const{ns:h,zIndex:m}=T3("loading");return p({ns:h,zIndex:m}),()=>{const y=o.spinner||o.svg,v=lt("svg",{class:"circular",viewBox:o.svgViewBox?o.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},[lt("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),w=o.text?lt("p",{class:h.b("text")},[o.text]):void 0;return lt(_r,{name:h.b("fade"),onAfterLeave:a},{default:$(()=>[He(k("div",{style:{backgroundColor:o.background||""},class:[h.b("mask"),o.customClass,o.fullscreen?"is-fullscreen":""]},[lt("div",{class:h.b("spinner")},[v,w])]),[[en,o.visible]])])})}}})),d=c.mount(document.createElement("div"));return{...ei(o),setText:r,removeElLoadingChild:i,close:l,handleAfterLeave:a,vm:d,get $el(){return d.$el}}}let _m;const Eb=function(e={}){if(!xt)return;const t=xde(e);if(t.fullscreen&&_m)return _m;const n=Ede({...t,closed:()=>{var r;(r=t.closed)==null||r.call(t),t.fullscreen&&(_m=void 0)}});Mde(t,t.parent,n),I8(t,t.parent,n),t.parent.vLoadingAddClassList=()=>I8(t,t.parent,n);let o=t.parent.getAttribute("loading-number");return o?o=`${Number.parseInt(o)+1}`:o="1",t.parent.setAttribute("loading-number",o),t.parent.appendChild(n.$el),ot(()=>n.visible.value=t.visible),t.fullscreen&&(_m=n),n},xde=e=>{var t,n,o,r;let s;return tt(e.target)?s=(t=document.querySelector(e.target))!=null?t:document.body:s=e.target||document.body,{parent:s===document.body||e.body?document.body:s,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:s===document.body&&((n=e.fullscreen)!=null?n:!0),lock:(o=e.lock)!=null?o:!1,customClass:e.customClass||"",visible:(r=e.visible)!=null?r:!0,target:s}},Mde=async(e,t,n)=>{const{nextZIndex:o}=n.vm.zIndex||n.vm._.exposed.zIndex,r={};if(e.fullscreen)n.originalPosition.value=kl(document.body,"position"),n.originalOverflow.value=kl(document.body,"overflow"),r.zIndex=o();else if(e.parent===document.body){n.originalPosition.value=kl(document.body,"position"),await ot();for(const s of["top","left"]){const i=s==="top"?"scrollTop":"scrollLeft";r[s]=`${e.target.getBoundingClientRect()[s]+document.body[i]+document.documentElement[i]-Number.parseInt(kl(document.body,`margin-${s}`),10)}px`}for(const s of["height","width"])r[s]=`${e.target.getBoundingClientRect()[s]}px`}else n.originalPosition.value=kl(t,"position");for(const[s,i]of Object.entries(r))n.$el.style[s]=i},I8=(e,t,n)=>{const o=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?qs(t,o.bm("parent","relative")):lu(t,o.bm("parent","relative")),e.fullscreen&&e.lock?lu(t,o.bm("parent","hidden")):qs(t,o.bm("parent","hidden"))},i1=Symbol("ElLoading"),A8=(e,t)=>{var n,o,r,s;const i=t.instance,l=f=>ft(t.value)?t.value[f]:void 0,a=f=>{const p=tt(f)&&(i==null?void 0:i[f])||f;return p&&K(p)},u=f=>a(l(f)||e.getAttribute(`element-loading-${zo(f)}`)),c=(n=l("fullscreen"))!=null?n:t.modifiers.fullscreen,d={text:u("text"),svg:u("svg"),svgViewBox:u("svgViewBox"),spinner:u("spinner"),background:u("background"),customClass:u("customClass"),fullscreen:c,target:(o=l("target"))!=null?o:c?void 0:e,body:(r=l("body"))!=null?r:t.modifiers.body,lock:(s=l("lock"))!=null?s:t.modifiers.lock};e[i1]={options:d,instance:Eb(d)}},Tde=(e,t)=>{for(const n of Object.keys(t))on(t[n])&&(t[n].value=e[n])},N8={mounted(e,t){t.value&&A8(e,t)},updated(e,t){const n=e[i1];t.oldValue!==t.value&&(t.value&&!t.oldValue?A8(e,t):t.value&&t.oldValue?ft(t.value)&&Tde(t.value,n.options):n==null||n.instance.close())},unmounted(e){var t;(t=e[i1])==null||t.instance.close(),e[i1]=null}},Ode={install(e){e.directive("loading",N8),e.config.globalProperties.$loading=Eb},directive:N8,service:Eb},Ide=Q({name:"ElMessageBox",directives:{TrapFocus:Gne},components:{ElButton:pt,ElFocusTrap:j0,ElInput:At,ElOverlay:B3,ElIcon:Ne,...hJ},inheritAttrs:!1,props:{buttonSize:{type:String,validator:yJ},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}=T3("message-box",R(()=>e.buttonSize)),{t:i}=n,{nextZIndex:l}=o,a=K(!1),u=Dn({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:l()}),c=R(()=>{const j=u.type;return{[r.bm("icon",j)]:j&&Og[j]}}),d=Hr(),f=Hr(),p=R(()=>u.icon||Og[u.type]||""),h=R(()=>!!u.message),m=K(),y=K(),v=K(),w=K(),_=K(),S=R(()=>u.confirmButtonClass);Te(()=>u.inputValue,async j=>{await ot(),e.boxType==="prompt"&&j!==null&&B()},{immediate:!0}),Te(()=>a.value,j=>{var V,H;j&&(e.boxType!=="prompt"&&(u.autofocus?v.value=(H=(V=_.value)==null?void 0:V.$el)!=null?H:m.value:v.value=m.value),u.zIndex=l()),e.boxType==="prompt"&&(j?ot().then(()=>{var L;w.value&&w.value.$el&&(u.autofocus?v.value=(L=Y())!=null?L:m.value:v.value=m.value)}):(u.editorErrorMessage="",u.validateError=!1))});const x=R(()=>e.draggable),E=R(()=>e.overflow);uM(m,y,x,E),Ct(async()=>{await ot(),e.closeOnHashChange&&window.addEventListener("hashchange",T)}),En(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",T)});function T(){a.value&&(a.value=!1,ot(()=>{u.action&&t("action",u.action)}))}const O=()=>{e.closeOnClickModal&&F(u.distinguishCancelAndClose?"close":"cancel")},P=C3(O),N=j=>{if(u.inputType!=="textarea")return j.preventDefault(),F("confirm")},F=j=>{var V;e.boxType==="prompt"&&j==="confirm"&&!B()||(u.action=j,u.beforeClose?(V=u.beforeClose)==null||V.call(u,j,u,T):T())},B=()=>{if(e.boxType==="prompt"){const j=u.inputPattern;if(j&&!j.test(u.inputValue||""))return u.editorErrorMessage=u.inputErrorMessage||i("el.messagebox.error"),u.validateError=!0,!1;const V=u.inputValidator;if(typeof V=="function"){const H=V(u.inputValue);if(H===!1)return u.editorErrorMessage=u.inputErrorMessage||i("el.messagebox.error"),u.validateError=!0,!1;if(typeof H=="string")return u.editorErrorMessage=H,u.validateError=!0,!1}}return u.editorErrorMessage="",u.validateError=!1,!0},Y=()=>{const j=w.value.$refs;return j.input||j.textarea},Z=()=>{F("close")},U=()=>{e.closeOnPressEscape&&Z()};return e.lockScroll&&fM(a),{...ei(u),ns:r,overlayEvent:P,visible:a,hasMessage:h,typeClass:c,contentId:d,inputId:f,btnSize:s,iconComponent:p,confirmButtonClasses:S,rootRef:m,focusStartRef:v,headerRef:y,inputRef:w,confirmRef:_,doClose:T,handleClose:Z,onCloseRequested:U,handleWrapperClick:O,handleInputEnter:N,handleAction:F,t:i}}}),Ade=["aria-label","aria-describedby"],Nde=["aria-label"],Pde=["id"];function Lde(e,t,n,o,r,s){const i=re("el-icon"),l=re("close"),a=re("el-input"),u=re("el-button"),c=re("el-focus-trap"),d=re("el-overlay");return C(),q(_r,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=f=>e.$emit("vanish")),persisted:""},{default:$(()=>[He(k(d,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:$(()=>[b("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:D(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...f)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...f)),onMousedown:t[9]||(t[9]=(...f)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...f)),onMouseup:t[10]||(t[10]=(...f)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...f))},[k(c,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:$(()=>[b("div",{ref:"rootRef",class:D([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:Qe(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=et(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(C(),M("div",{key:0,ref:"headerRef",class:D([e.ns.e("header"),{"show-close":e.showClose}])},[b("div",{class:D(e.ns.e("title"))},[e.iconComponent&&e.center?(C(),q(i,{key:0,class:D([e.ns.e("status"),e.typeClass])},{default:$(()=>[(C(),q(Lt(e.iconComponent)))]),_:1},8,["class"])):W("v-if",!0),b("span",null,A(e.title),1)],2),e.showClose?(C(),M("button",{key:0,type:"button",class:D(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=Pt(et(f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[k(i,{class:D(e.ns.e("close"))},{default:$(()=>[k(l)]),_:1},8,["class"])],42,Nde)):W("v-if",!0)],2)):W("v-if",!0),b("div",{id:e.contentId,class:D(e.ns.e("content"))},[b("div",{class:D(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(C(),q(i,{key:0,class:D([e.ns.e("status"),e.typeClass])},{default:$(()=>[(C(),q(Lt(e.iconComponent)))]),_:1},8,["class"])):W("v-if",!0),e.hasMessage?(C(),M("div",{key:1,class:D(e.ns.e("message"))},[he(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(C(),q(Lt(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(C(),q(Lt(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:$(()=>[ne(A(e.dangerouslyUseHTMLString?"":e.message),1)]),_:1},8,["for"]))])],2)):W("v-if",!0)],2),He(b("div",{class:D(e.ns.e("input"))},[k(a,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=f=>e.inputValue=f),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:D({invalid:e.validateError}),onKeydown:Pt(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),b("div",{class:D(e.ns.e("errormsg")),style:Qe({visibility:e.editorErrorMessage?"visible":"hidden"})},A(e.editorErrorMessage),7)],2),[[en,e.showInput]])],10,Pde),b("div",{class:D(e.ns.e("btns"))},[e.showCancelButton?(C(),q(u,{key:0,loading:e.cancelButtonLoading,class:D([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=f=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=Pt(et(f=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:$(()=>[ne(A(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","class","round","size"])):W("v-if",!0),He(k(u,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,class:D([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=f=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=Pt(et(f=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:$(()=>[ne(A(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","class","round","disabled","size"]),[[en,e.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,Ade)]),_:3},8,["z-index","overlay-class","mask"]),[[en,e.visible]])]),_:3})}var Rde=ze(Ide,[["render",Lde],["__file","index.vue"]]);const Vp=new Map,Dde=e=>{let t=document.body;return e.appendTo&&(tt(e.appendTo)&&(t=document.querySelector(e.appendTo)),gs(e.appendTo)&&(t=e.appendTo),gs(t)||(t=document.body)),t},Fde=(e,t,n=null)=>{const o=k(Rde,e,Xe(e.message)||yo(e.message)?{default:Xe(e.message)?e.message:()=>e.message}:null);return o.appContext=n,Ni(o,t),Dde(e).appendChild(t.firstElementChild),o.component},Vde=()=>document.createElement("div"),Bde=(e,t)=>{const n=Vde();e.onVanish=()=>{Ni(null,n),Vp.delete(r)},e.onAction=s=>{const i=Vp.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=Fde(e,n,t),r=o.proxy;for(const s in e)vt(e,s)&&!vt(r.$props,s)&&(r[s]=e[s]);return r.visible=!0,r};function xd(e,t=null){if(!xt)return Promise.reject();let n;return tt(e)||yo(e)?e={message:e}:n=e.callback,new Promise((o,r)=>{const s=Bde(e,t??xd._context);Vp.set(s,{options:e,callback:n,resolve:o,reject:r})})}const zde=["alert","confirm","prompt"],jde={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};zde.forEach(e=>{xd[e]=Hde(e)});function Hde(e){return(t,n,o,r)=>{let s="";return ft(n)?(o=n,s=""):Uo(n)?s="":s=n,xd(Object.assign({title:s,message:t,type:"",...jde[e]},o,{boxType:e}),r)}}xd.close=()=>{Vp.forEach((e,t)=>{t.doClose()}),Vp.clear()};xd._context=null;const nl=xd;nl.install=e=>{nl._context=e._context,e.config.globalProperties.$msgbox=nl,e.config.globalProperties.$messageBox=nl,e.config.globalProperties.$alert=nl.alert,e.config.globalProperties.$confirm=nl.confirm,e.config.globalProperties.$prompt=nl.prompt};const fy=nl,FO=["success","info","warning","error"],Ude=We({customClass:{type:String,default:""},dangerouslyUseHTMLString:{type:Boolean,default:!1},duration:{type:Number,default:4500},icon:{type:Oo},id:{type:String,default:""},message:{type:Ce([String,Object]),default:""},offset:{type:Number,default:0},onClick:{type:Ce(Function),default:()=>{}},onClose:{type:Ce(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...FO,""],default:""},zIndex:Number}),Wde={destroy:()=>!0},Kde=["id"],qde=["textContent"],Gde={key:0},Yde=["innerHTML"],Zde=Q({name:"ElNotification"}),Jde=Q({...Zde,props:Ude,emits:Wde,setup(e,{expose:t}){const n=e,{ns:o,zIndex:r}=T3("notification"),{nextZIndex:s,currentZIndex:i}=r,{Close:l}=sM,a=K(!1);let u;const c=R(()=>{const _=n.type;return _&&Og[n.type]?o.m(_):""}),d=R(()=>n.type&&Og[n.type]||n.icon),f=R(()=>n.position.endsWith("right")?"right":"left"),p=R(()=>n.position.startsWith("top")?"top":"bottom"),h=R(()=>{var _;return{[p.value]:`${n.offset}px`,zIndex:(_=n.zIndex)!=null?_:i.value}});function m(){n.duration>0&&({stop:u}=V_(()=>{a.value&&v()},n.duration))}function y(){u==null||u()}function v(){a.value=!1}function w({code:_}){_===rt.delete||_===rt.backspace?y():_===rt.esc?a.value&&v():m()}return Ct(()=>{m(),s(),a.value=!0}),Ln(document,"keydown",w),t({visible:a,close:v}),(_,S)=>(C(),q(_r,{name:g(o).b("fade"),onBeforeLeave:_.onClose,onAfterLeave:S[1]||(S[1]=x=>_.$emit("destroy")),persisted:""},{default:$(()=>[He(b("div",{id:_.id,class:D([g(o).b(),_.customClass,g(f)]),style:Qe(g(h)),role:"alert",onMouseenter:y,onMouseleave:m,onClick:S[0]||(S[0]=(...x)=>_.onClick&&_.onClick(...x))},[g(d)?(C(),q(g(Ne),{key:0,class:D([g(o).e("icon"),g(c)])},{default:$(()=>[(C(),q(Lt(g(d))))]),_:1},8,["class"])):W("v-if",!0),b("div",{class:D(g(o).e("group"))},[b("h2",{class:D(g(o).e("title")),textContent:A(_.title)},null,10,qde),He(b("div",{class:D(g(o).e("content")),style:Qe(_.title?void 0:{margin:0})},[he(_.$slots,"default",{},()=>[_.dangerouslyUseHTMLString?(C(),M(fe,{key:1},[W(" Caution here, message could've been compromised, never use user's input as message "),b("p",{innerHTML:_.message},null,8,Yde)],2112)):(C(),M("p",Gde,A(_.message),1))])],6),[[en,_.message]]),_.showClose?(C(),q(g(Ne),{key:0,class:D(g(o).e("closeBtn")),onClick:et(v,["stop"])},{default:$(()=>[k(g(l))]),_:1},8,["class","onClick"])):W("v-if",!0)],2)],46,Kde),[[en,a.value]])]),_:3},8,["name","onBeforeLeave"]))}});var Xde=ze(Jde,[["__file","notification.vue"]]);const Fg={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},xb=16;let Qde=1;const ad=function(e={},t=null){if(!xt)return{close:()=>{}};(typeof e=="string"||yo(e))&&(e={message:e});const n=e.position||"top-right";let o=e.offset||0;Fg[n].forEach(({vm:c})=>{var d;o+=(((d=c.el)==null?void 0:d.offsetHeight)||0)+xb}),o+=xb;const r=`notification_${Qde++}`,s=e.onClose,i={...e,offset:o,id:r,onClose:()=>{efe(r,n,s)}};let l=document.body;gs(e.appendTo)?l=e.appendTo:tt(e.appendTo)&&(l=document.querySelector(e.appendTo)),gs(l)||(l=document.body);const a=document.createElement("div"),u=k(Xde,i,yo(i.message)?{default:()=>i.message}:null);return u.appContext=t??ad._context,u.props.onDestroy=()=>{Ni(null,a)},Ni(u,a),Fg[n].push({vm:u}),l.appendChild(a.firstElementChild),{close:()=>{u.component.exposed.visible.value=!1}}};FO.forEach(e=>{ad[e]=(t={})=>((typeof t=="string"||yo(t))&&(t={message:t}),ad({...t,type:e}))});function efe(e,t,n){const o=Fg[t],r=o.findIndex(({vm:u})=>{var c;return((c=u.component)==null?void 0:c.props.id)===e});if(r===-1)return;const{vm:s}=o[r];if(!s)return;n==null||n(s);const i=s.el.offsetHeight,l=t.split("-")[0];o.splice(r,1);const a=o.length;if(!(a<1))for(let u=r;u<a;u++){const{el:c,component:d}=o[u].vm,f=Number.parseInt(c.style[l],10)-i-xb;d.props.offset=f}}function tfe(){for(const e of Object.values(Fg))e.forEach(({vm:t})=>{t.component.exposed.visible.value=!1})}ad.closeAll=tfe;ad._context=null;const nfe=mJ(ad,"$notify"),qe=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},ofe={name:"PortalApplication",components:{},data(){return{loading:!1,hasSearchHolder:!1,hasNotificationHolder:!1,isSmallScreen:!1,menuItems:[{label:this.$t("General"),route:"settings",icon_svg:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.08301 10.0002C2.08301 6.26821 2.08301 4.40223 3.24238 3.24287C4.40175 2.0835 6.26772 2.0835 9.99967 2.0835C13.7316 2.0835 15.5976 2.0835 16.757 3.24287C17.9163 4.40223 17.9163 6.26821 17.9163 10.0002C17.9163 13.7321 17.9163 15.5981 16.757 16.7575C15.5976 17.9168 13.7316 17.9168 9.99967 17.9168C6.26772 17.9168 4.40175 17.9168 3.24238 16.7575C2.08301 15.5981 2.08301 13.7321 2.08301 10.0002Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M8.33301 12.917C8.33301 13.6073 7.77336 14.167 7.08301 14.167C6.39265 14.167 5.83301 13.6073 5.83301 12.917C5.83301 12.2266 6.39265 11.667 7.08301 11.667C7.77336 11.667 8.33301 12.2266 8.33301 12.917Z" stroke="currentColor" stroke-width="1.5"/><path d="M14.166 7.0835C14.166 6.39314 13.6064 5.8335 12.916 5.8335C12.2257 5.8335 11.666 6.39314 11.666 7.0835C11.666 7.77385 12.2257 8.3335 12.916 8.3335C13.6064 8.3335 14.166 7.77385 14.166 7.0835Z" stroke="currentColor" stroke-width="1.5"/><path d="M7.08301 11.6668L7.08301 5.8335" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.916 8.33366L12.916 14.167" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>'},{label:this.$t("Customizations"),route:"customization",icon_svg:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_3687_33463)"><path d="M18.3337 9.99984C18.3337 5.39746 14.6027 1.6665 10.0003 1.6665C5.39795 1.6665 1.66699 5.39746 1.66699 9.99984C1.66699 14.6022 5.39795 18.3332 10.0003 18.3332C10.7018 18.3332 11.667 18.4301 11.667 17.4998C11.667 16.9924 11.403 16.6008 11.1408 16.2119C10.7572 15.6428 10.3773 15.0793 10.8337 14.1665C11.3892 13.0554 12.3152 13.0554 13.7349 13.0554C14.4448 13.0554 15.2781 13.0554 16.2504 12.9165C18.0012 12.6664 18.3337 11.5902 18.3337 9.99984Z" stroke="currentColor" stroke-width="1.5"/><path d="M5.83398 12.502L5.84121 12.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><ellipse cx="7.91699" cy="7.08301" rx="1.25" ry="1.25" stroke="currentColor" stroke-width="1.5"/><ellipse cx="13.75" cy="7.9165" rx="1.25" ry="1.25" stroke="currentColor" stroke-width="1.5"/></g><defs><clipPath id="clip0_3687_33463"><rect width="20" height="20" fill="white"/></clipPath></defs></svg>'},{label:this.$t("Managers"),route:"admin_moderators",icon_svg:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.3117 15C17.9361 15 18.4328 14.6071 18.8787 14.0576C19.7916 12.9329 18.2928 12.034 17.7211 11.5938C17.14 11.1463 16.4912 10.8928 15.8333 10.8333M15 9.16667C16.1506 9.16667 17.0833 8.23393 17.0833 7.08333C17.0833 5.93274 16.1506 5 15 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M2.68797 15C2.06355 15 1.5669 14.6071 1.12096 14.0576C0.208082 12.9329 1.7069 12.034 2.27855 11.5938C2.85965 11.1463 3.50849 10.8928 4.16634 10.8333M4.58301 9.16667C3.43241 9.16667 2.49967 8.23393 2.49967 7.08333C2.49967 5.93274 3.43241 5 4.58301 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.73618 12.593C5.8847 13.1195 3.65216 14.1946 5.01192 15.5398C5.67616 16.197 6.41594 16.667 7.34603 16.667H12.6533C13.5834 16.667 14.3232 16.197 14.9874 15.5398C16.3472 14.1946 14.1147 13.1195 13.2632 12.593C11.2665 11.3583 8.73289 11.3583 6.73618 12.593Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M12.9163 6.25016C12.9163 7.86099 11.6105 9.16683 9.99967 9.16683C8.38884 9.16683 7.08301 7.86099 7.08301 6.25016C7.08301 4.63933 8.38884 3.3335 9.99967 3.3335C11.6105 3.3335 12.9163 4.63933 12.9163 6.25016Z" stroke="currentColor" stroke-width="1.5"/></svg>'},{label:this.$t("Email Settings"),route:"email_notifications",icon_svg:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.83398 7.08301L8.28566 8.53253C9.715 9.37761 10.2863 9.37761 11.7156 8.53253L14.1673 7.08301" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M1.68013 11.2295C1.73461 13.7841 1.76185 15.0614 2.70446 16.0076C3.64706 16.9538 4.95894 16.9868 7.58268 17.0527C9.19975 17.0933 10.8009 17.0933 12.418 17.0527C15.0417 16.9868 16.3536 16.9538 17.2962 16.0076C18.2388 15.0614 18.266 13.7841 18.3205 11.2295C18.338 10.4081 18.338 9.59157 18.3205 8.77017C18.266 6.21555 18.2388 4.93825 17.2962 3.99206C16.3536 3.04586 15.0417 3.0129 12.418 2.94698C10.8009 2.90635 9.19975 2.90635 7.58268 2.94697C4.95893 3.01289 3.64706 3.04585 2.70445 3.99204C1.76184 4.93824 1.73461 6.21554 1.68013 8.77015C1.66261 9.59156 1.66261 10.4081 1.68013 11.2295Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></svg>'},{label:this.$t("Features & Addons"),route:"features",icon_svg:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_3687_33503)"><path d="M3.33301 10.0002C3.33301 6.85746 3.33301 5.28612 4.30932 4.3098C5.28563 3.3335 6.85697 3.3335 9.99967 3.3335C13.1423 3.3335 14.7138 3.3335 15.69 4.3098C16.6663 5.28612 16.6663 6.85746 16.6663 10.0002C16.6663 13.1428 16.6663 14.7142 15.69 15.6905C14.7138 16.6668 13.1423 16.6668 9.99967 16.6668C6.85697 16.6668 5.28563 16.6668 4.30932 15.6905C3.33301 14.7142 3.33301 13.1428 3.33301 10.0002Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M6.4432 13.5567C7.0534 14.1668 8.03549 14.1668 9.99967 14.1668C10.6578 14.1668 11.2058 14.1668 11.6663 14.1438L14.1433 11.6668C14.1663 11.2062 14.1663 10.6583 14.1663 10.0002C14.1663 8.03598 14.1663 7.05389 13.5562 6.44369C12.9459 5.8335 11.9638 5.8335 9.99967 5.8335C8.03549 5.8335 7.0534 5.8335 6.4432 6.44369C5.83301 7.05389 5.83301 8.03598 5.83301 10.0002C5.83301 11.9643 5.83301 12.9464 6.4432 13.5567Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M6.66699 1.6665V3.33317M13.3337 1.6665V3.33317M10.0003 1.6665V3.33317M6.66699 16.6665V18.3332M10.0003 16.6665V18.3332M13.3337 16.6665V18.3332M18.3337 13.3332H16.667M3.33366 6.6665H1.66699M3.33366 13.3332H1.66699M3.33366 9.99984H1.66699M18.3337 6.6665H16.667M18.3337 9.99984H16.667" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></g><defs><clipPath id="clip0_3687_33503"><rect width="20" height="20" fill="white"/></clipPath></defs></svg>'},{label:this.$t("Manage Topics"),route:"all_topics",icon_svg:'<svg viewBox="0 0 24 24" width="20" height="20" color="currentColor" fill="none"><path d="M2.73552 11.6867C1.78253 12.7511 1.76203 14.3569 2.63665 15.4865C4.37226 17.7281 6.2719 19.6277 8.51351 21.3633C9.64313 22.238 11.2489 22.2175 12.3133 21.2645C15.203 18.6771 17.8494 15.9731 20.4033 13.0016C20.6558 12.7078 20.8137 12.3477 20.8492 11.9619C21.0059 10.2561 21.3279 5.34144 19.9932 4.00675C18.6586 2.67207 13.7439 2.99408 12.0381 3.15083C11.6523 3.18627 11.2922 3.34421 10.9984 3.59671C8.02692 6.15064 5.32291 8.797 2.73552 11.6867Z" stroke="currentColor" stroke-width="1.5" /><path opacity="0.4" d="M7.5 14.5L9.5 16.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /><path d="M18 6L22 2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" /></svg>'},{label:this.$t("Space Groups"),route:"space_groups",icon_svg:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_3687_33515)"><path d="M5.00033 3.33317C5.00033 4.25365 4.25413 4.99984 3.33366 4.99984C2.41318 4.99984 1.66699 4.25365 1.66699 3.33317C1.66699 2.4127 2.41318 1.6665 3.33366 1.6665C4.25413 1.6665 5.00033 2.4127 5.00033 3.33317Z" stroke="currentColor" stroke-width="1.5"/><path d="M18.3333 3.33317C18.3333 4.25365 17.5872 4.99984 16.6667 4.99984C15.7462 4.99984 15 4.25365 15 3.33317C15 2.4127 15.7462 1.6665 16.6667 1.6665C17.5872 1.6665 18.3333 2.4127 18.3333 3.33317Z" stroke="currentColor" stroke-width="1.5"/><path d="M18.3333 16.6667C18.3333 17.5872 17.5872 18.3333 16.6667 18.3333C15.7462 18.3333 15 17.5872 15 16.6667C15 15.7462 15.7462 15 16.6667 15C17.5872 15 18.3333 15.7462 18.3333 16.6667Z" stroke="currentColor" stroke-width="1.5"/><path d="M5.00033 16.6667C5.00033 17.5872 4.25413 18.3333 3.33366 18.3333C2.41318 18.3333 1.66699 17.5872 1.66699 16.6667C1.66699 15.7462 2.41318 15 3.33366 15C4.25413 15 5.00033 15.7462 5.00033 16.6667Z" stroke="currentColor" stroke-width="1.5"/><path d="M16.6663 5.00016V15.0002M14.9997 16.6668H4.99967M14.9997 3.3335H4.99967M3.33301 5.00016V15.0002" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M13.75 7.5C13.75 7.11172 13.75 6.91758 13.6866 6.76443C13.602 6.56024 13.4397 6.39801 13.2356 6.31343C13.0824 6.25 12.8882 6.25 12.5 6.25H7.5C7.11172 6.25 6.91758 6.25 6.76443 6.31343C6.56024 6.39801 6.39801 6.56024 6.31343 6.76443C6.25 6.91758 6.25 7.11172 6.25 7.5C6.25 7.88828 6.25 8.08242 6.31343 8.23557C6.39801 8.43975 6.56024 8.602 6.76443 8.68658C6.91758 8.75 7.11172 8.75 7.5 8.75H12.5C12.8882 8.75 13.0824 8.75 13.2356 8.68658C13.4397 8.602 13.602 8.43975 13.6866 8.23557C13.75 8.08242 13.75 7.88828 13.75 7.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M13.75 12.5C13.75 12.1117 13.75 11.9176 13.6866 11.7644C13.602 11.5603 13.4397 11.398 13.2356 11.3134C13.0824 11.25 12.8882 11.25 12.5 11.25H7.5C7.11172 11.25 6.91758 11.25 6.76443 11.3134C6.56024 11.398 6.39801 11.5603 6.31343 11.7644C6.25 11.9176 6.25 12.1117 6.25 12.5C6.25 12.8882 6.25 13.0824 6.31343 13.2356C6.39801 13.4397 6.56024 13.602 6.76443 13.6866C6.91758 13.75 7.11172 13.75 7.5 13.75H12.5C12.8882 13.75 13.0824 13.75 13.2356 13.6866C13.4397 13.602 13.602 13.4397 13.6866 13.2356C13.75 13.0824 13.75 12.8882 13.75 12.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></g><defs><clipPath id="clip0_3687_33515"><rect width="20" height="20" fill="white"/></clipPath></defs></svg>'},{label:this.$t("Menu Settings"),route:"menu_settings",icon_svg:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.33301 4.1665L16.6663 4.1665" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.33301 10L16.6663 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.33301 15.833L11.6663 15.833" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>'}]}},watch:{},methods:{},created(){this.isSmallScreen=window.innerWidth<=1024},mounted(){}},rfe={class:"fcom_general_menu"},sfe=["href"],ife={class:"el-icon"},lfe={class:"fcom_communities_menu"},afe={style:{"margin-left":"18px","font-size":"0.875rem","font-weight":"bold","margin-bottom":"10px",color:"currentColor"}},ufe={style:{"margin-bottom":"30px"},class:"fcom_general_menu"},cfe={class:"community_avatar"},dfe={class:"fcom_shape"},ffe={class:"community_name"},pfe={style:{"margin-left":"18px","font-size":"0.875rem","font-weight":"bold","margin-bottom":"10px",color:"currentColor"}},hfe={class:"fcom_general_menu"},mfe={class:"community_avatar"},gfe={class:"fcom_shape"},vfe=b("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[b("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"}),b("path",{d:"M9.99996 17.4559L9.20634 17.672C6.96165 18.2832 5.83931 18.5889 4.95512 18.0701C4.07093 17.5513 3.7702 16.4107 3.16874 14.1295L2.31814 10.9035C1.71668 8.62232 1.41595 7.48174 1.92643 6.58318C2.36802 5.80591 3.33329 5.83421 4.58329 5.83411",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})],-1),yfe={class:"community_name"};function _fe(e,t,n,o,r,s){const i=re("router-view"),l=re("Back"),a=Ne,u=re("router-link");return C(),M(fe,null,[k(i,{class:D(e.appVars.route_classes)},null,8,["class"]),(C(),q(_s,{to:"#fcom_menu_sidebar"},[b("ul",rfe,[b("li",null,[b("a",{href:e.appVars.portal_url},[b("i",ife,[k(l)]),b("span",null,A(e.$t("Back to home")),1)],8,sfe)])]),b("div",lfe,[b("h4",afe,A(e.$t("Portal Settings")),1),b("ul",ufe,[(C(!0),M(fe,null,nt(r.menuItems,c=>(C(),M("li",{key:c.name,class:D("course_inner_menu_"+c.name)},[k(u,{to:{name:c.route}},{default:$(()=>[b("div",cfe,[b("span",dfe,[k(a,{innerHTML:c.icon_svg},null,8,["innerHTML"])])]),b("span",ffe,A(c.label),1)]),_:2},1032,["to"])],2))),128))]),e.hasFeature("has_course")?(C(),M(fe,{key:0},[b("h4",pfe,A(e.$t("Course Management")),1),b("ul",hfe,[b("li",null,[k(u,{to:{name:"manage_courses"}},{default:$(()=>[b("div",mfe,[b("span",gfe,[k(a,null,{default:$(()=>[vfe]),_:1})])]),b("span",yfe,A(e.$t("Manage Courses")),1)]),_:1})])])],64)):W("",!0)])]))],64)}const bfe=qe(ofe,[["render",_fe]]),wfe={name:"SettingsRoute",components:{},data(){return{loading:!1}}};function Cfe(e,t,n,o,r,s){const i=re("router-view");return C(),q(i)}const kfe=qe(wfe,[["render",Cfe]]),Sfe={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 $fe(e,t,n,o,r,s){const i=pt,l=DO,a=re("CloseBold"),u=Ne,c=zt("loading");return C(),M(fe,null,[k(l,{class:D(n.className),multiple:n.isMultiple,action:s.action_url,headers:s.headers,accept:"image/*",data:n.additionalData,"on-success":s.handleSuccess,"on-progress":s.inProgress,"on-error":s.handleError,"show-file-list":!1},{default:$(()=>[he(e.$slots,"trigger",{},()=>[he(e.$slots,"default",{},()=>[He((C(),q(i,{disabled:r.loading,text:n.isTextBtn,class:"fcom_plain_button"},{default:$(()=>[ne(A(n.button_text),1)]),_:1},8,["disabled","text"])),[[c,r.loading]])])])]),_:3},8,["class","multiple","action","headers","data","on-success","on-progress","on-error"]),n.can_remove?(C(),q(i,{key:0,class:"remove_img",size:"small",type:"danger",plain:"",onClick:t[0]||(t[0]=d=>e.$emit("uploaded","")),text:n.isTextBtn},{default:$(()=>[n.removeIcon?(C(),q(u,{key:0},{default:$(()=>[k(a)]),_:1})):W("",!0),b("span",null,A(e.$t("Remove")),1)]),_:1},8,["text"])):W("",!0)],64)}const Md=qe(Sfe,[["render",$fe]]);function Efe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ch=Efe,xfe=typeof On=="object"&&On&&On.Object===Object&&On,VO=xfe,Mfe=VO,Tfe=typeof self=="object"&&self&&self.Object===Object&&self,Ofe=Mfe||Tfe||Function("return this")(),zi=Ofe,Ife=zi,Afe=function(){return Ife.Date.now()},Nfe=Afe,Pfe=/\s/;function Lfe(e){for(var t=e.length;t--&&Pfe.test(e.charAt(t)););return t}var Rfe=Lfe,Dfe=Rfe,Ffe=/^\s+/;function Vfe(e){return e&&e.slice(0,Dfe(e)+1).replace(Ffe,"")}var Bfe=Vfe,zfe=zi,jfe=zfe.Symbol,BO=jfe,P8=BO,zO=Object.prototype,Hfe=zO.hasOwnProperty,Ufe=zO.toString,Kd=P8?P8.toStringTag:void 0;function Wfe(e){var t=Hfe.call(e,Kd),n=e[Kd];try{e[Kd]=void 0;var o=!0}catch{}var r=Ufe.call(e);return o&&(t?e[Kd]=n:delete e[Kd]),r}var Kfe=Wfe,qfe=Object.prototype,Gfe=qfe.toString;function Yfe(e){return Gfe.call(e)}var Zfe=Yfe,L8=BO,Jfe=Kfe,Xfe=Zfe,Qfe="[object Null]",epe="[object Undefined]",R8=L8?L8.toStringTag:void 0;function tpe(e){return e==null?e===void 0?epe:Qfe:R8&&R8 in Object(e)?Jfe(e):Xfe(e)}var kh=tpe;function npe(e){return e!=null&&typeof e=="object"}var J0=npe,ope=kh,rpe=J0,spe="[object Symbol]";function ipe(e){return typeof e=="symbol"||rpe(e)&&ope(e)==spe}var lpe=ipe,ape=Bfe,D8=Ch,upe=lpe,F8=0/0,cpe=/^[-+]0x[0-9a-f]+$/i,dpe=/^0b[01]+$/i,fpe=/^0o[0-7]+$/i,ppe=parseInt;function hpe(e){if(typeof e=="number")return e;if(upe(e))return F8;if(D8(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=D8(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ape(e);var n=dpe.test(e);return n||fpe.test(e)?ppe(e.slice(2),n?2:8):cpe.test(e)?F8:+e}var mpe=hpe,gpe=Ch,py=Nfe,V8=mpe,vpe="Expected a function",ype=Math.max,_pe=Math.min;function bpe(e,t,n){var o,r,s,i,l,a,u=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(vpe);t=V8(t)||0,gpe(n)&&(c=!!n.leading,d="maxWait"in n,s=d?ype(V8(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function p(E){var T=o,O=r;return o=r=void 0,u=E,i=e.apply(O,T),i}function h(E){return u=E,l=setTimeout(v,t),c?p(E):i}function m(E){var T=E-a,O=E-u,P=t-T;return d?_pe(P,s-O):P}function y(E){var T=E-a,O=E-u;return a===void 0||T>=t||T<0||d&&O>=s}function v(){var E=py();if(y(E))return w(E);l=setTimeout(v,m(E))}function w(E){return l=void 0,f&&o?p(E):(o=r=void 0,i)}function _(){l!==void 0&&clearTimeout(l),u=0,o=a=r=l=void 0}function S(){return l===void 0?i:w(py())}function x(){var E=py(),T=y(E);if(o=arguments,r=this,a=E,T){if(l===void 0)return h(a);if(d)return clearTimeout(l),l=setTimeout(v,t),p(a)}return l===void 0&&(l=setTimeout(v,t)),i}return x.cancel=_,x.flush=S,x}var jO=bpe;const wpe=_o(jO);var Cpe=jO,kpe=Ch,Spe="Expected a function";function $pe(e,t,n){var o=!0,r=!0;if(typeof e!="function")throw new TypeError(Spe);return kpe(n)&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),Cpe(e,t,{leading:o,maxWait:t,trailing:r})}var Epe=$pe;const xpe=_o(Epe),Mpe={name:"ContentLayout",props:["title","content_class","wrapper_class"],data(){return{throttledScrollHandler:null}},created(){this.throttledScrollHandler=xpe(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}},Tpe={key:0,class:"fhr_content_layout_header"},Ope={role:"region","aria-label":"Actions",class:"fhr_page_actions"};function Ipe(e,t,n,o,r,s){const i=ks;return C(),M("div",{class:D([n.wrapper_class,"fhr_content_layout"])},[k(i,{"min-size":100,always:!0,noresize:!0,native:!0,onScroll:s.handleLayoutScroll,ref:"layoutScrollbarRef",height:"calc(100vh - var(--fcom-header-height, 0px)"},{default:$(()=>[he(e.$slots,"header",{},()=>[n.title?(C(),M("div",Tpe,[he(e.$slots,"title",{},()=>[b("h1",{role:"region","aria-label":"Page Title",style:{cursor:"pointer"},onClick:t[0]||(t[0]=l=>e.$eventBus.emit("toTop")),class:"fhr_page_title"},A(n.title),1)]),b("div",Ope,[he(e.$slots,"actions")])])):W("",!0)]),he(e.$slots,"sub_header"),b("div",{class:D([n.content_class,"fhr_content_layout_body"])},[he(e.$slots,"default")],2)]),_:3},8,["onScroll"])],2)}const ri=qe(Mpe,[["render",Ipe]]),Ape={name:"AppLayout",props:["wrapper_class"]},Npe={class:"feeds_main"};function Ppe(e,t,n,o,r,s){const i=re("router-view");return C(),M("div",{class:D([n.wrapper_class,"feeds"])},[b("div",Npe,[he(e.$slots,"before_route_view"),he(e.$slots,"default",{},()=>[k(i)]),he(e.$slots,"after_route_view")])],2)}const si=qe(Ape,[["render",Ppe]]),Lpe={name:"GeneralSettings",components:{ImageUploader:Md,Layout:ri,AppLayout:si,CopyDocument:eZ},data(){return{settings:null,user_roles:{},loading:!1,saving:!1}},computed:{loginUrl(){return this.appVars.urls.portal_base+"?fcom_action=auth"},isRoleBase(){return this.settings&&this.settings.access.acess_level==="role_based"}},methods:{copyToClipboard(e){navigator.clipboard.writeText(e).then(()=>{this.$notify.success(this.$t("Link copied to clipboard"))}).catch(t=>{this.$notify.error("Failed to copy")})},getSettings(){this.loading=!0,this.$get("admin/general").then(e=>{this.settings=e.settings,this.user_roles=e.user_roles}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},saveSettings(){this.saving=!0,this.$post("admin/general",{settings:this.settings}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings(),this.changeTitle(this.$t("General Settings"))}},Rpe={class:"settings_router"},Dpe={class:"fhr_content_layout_body"},Fpe={class:"setting_body"},Vpe={class:"settings_title"},Bpe={class:"settings_subtitle"},zpe={class:"settings_title"},jpe={class:"settings_subtitle"},Hpe=["src"],Upe={class:"settings_title"},Wpe={class:"settings_subtitle"},Kpe=["src"],qpe={class:"settings_title"},Gpe={class:"settings_subtitle"},Ype=["src"],Zpe={class:"settings_title"},Jpe={class:"settings_subtitle"},Xpe={class:"fcom_help_text"},Qpe={class:"settings_title"},ehe={class:"settings_subtitle"},the={class:"settings_title"},nhe={class:"settings_subtitle"},ohe={class:"help_text"},rhe={class:"settings_title"},she={class:"settings_subtitle"},ihe={class:"settings_title"},lhe={class:"settings_subtitle"},ahe={class:"settings_title"},uhe={class:"settings_subtitle"};function che(e,t,n,o,r,s){const i=pt,l=vh,a=At,u=io,c=gh,d=re("image-uploader"),f=Hn,p=U0,h=Eu,m=Ss,y=vr,v=re("CopyDocument"),w=Ne,_=so,S=lo,x=re("layout"),E=re("app-layout");return C(),q(E,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:$(()=>[k(x,{wrapper_class:"no_bg_layout",title:e.$t("General Settings")},{actions:$(()=>[k(i,{class:"fcom_primary_button",disabled:r.saving||r.loading,onClick:s.saveSettings},{default:$(()=>[b("span",null,A(e.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),default:$(()=>[b("div",Rpe,[b("div",Dpe,[b("div",Fpe,[r.settings?(C(),q(_,{key:0,onSubmit:t[10]||(t[10]=et(T=>e.doNothing(),["prevent"])),"label-position":"top","label-width":"120px"},{default:$(()=>[k(c,{gutter:20,class:"setting_row"},{default:$(()=>[k(l,{sm:12},{default:$(()=>[b("p",Vpe,A(e.$t("Community Title")),1),b("span",Bpe,A(e.$t("This title will be used for meta title and email notification referneces. Should be same as your site title")),1)]),_:1}),k(l,{sm:12},{default:$(()=>[k(u,null,{default:$(()=>[k(a,{placeholder:e.$t("Community title"),type:"text",modelValue:r.settings.site_title,"onUpdate:modelValue":t[0]||(t[0]=T=>r.settings.site_title=T)},null,8,["placeholder","modelValue"])]),_:1})]),_:1})]),_:1}),k(c,{gutter:20,class:"setting_row"},{default:$(()=>[k(l,{sm:12},{default:$(()=>[b("p",zpe,A(e.$t("Site Logo (For Light Background)")),1),b("span",jpe,A(e.$t("Recommended dimensions: 480 x 120, 4:1 aspect ratio.")),1)]),_:1}),k(l,{sm:12},{default:$(()=>[k(u,null,{default:$(()=>[r.settings.logo?(C(),M("img",{key:0,alt:"",class:"settings_img",src:r.settings.logo},null,8,Hpe)):W("",!0),k(d,{additionalData:{resize:!1,max_width:500,skip_convert:"yes"},button_text:r.settings.logo?e.$t("Change"):e.$t("Upload Logo"),can_remove:!!r.settings.logo,className:"setting_img_upload",isTextBtn:!1,removeIcon:!1,onUploaded:t[1]||(t[1]=T=>{r.settings.logo=T})},null,8,["button_text","can_remove"])]),_:1})]),_:1})]),_:1}),k(c,{gutter:30,class:"setting_row"},{default:$(()=>[k(l,{sm:12},{default:$(()=>[b("p",Upe,A(e.$t("Site Logo (For Dark Mode)")),1),b("span",Wpe,A(e.$t("Recommended dimensions: 480 x 120, 4:1 aspect ratio.")),1)]),_:1}),k(l,{sm:12},{default:$(()=>[k(u,null,{default:$(()=>[r.settings.white_logo?(C(),M("img",{key:0,alt:"",class:"settings_img",src:r.settings.white_logo},null,8,Kpe)):W("",!0),k(d,{additionalData:{resize:!1,max_width:500,skip_convert:"yes"},button_text:r.settings.white_logo?e.$t("Change"):e.$t("Set Logo"),can_remove:!!r.settings.white_logo,className:"setting_img_upload",isTextBtn:!1,removeIcon:!1,onUploaded:t[2]||(t[2]=T=>{r.settings.white_logo=T})},null,8,["button_text","can_remove"])]),_:1})]),_:1})]),_:1}),k(c,{gutter:30,class:"setting_row"},{default:$(()=>[k(l,{sm:12},{default:$(()=>[b("p",qpe,A(e.$t("Default Open Graph Image")),1),b("span",Gpe,A(e.$t("This image will be used on social sharing preview. Recommended size: 1200 x 630 px")),1)]),_:1}),k(l,{sm:12},{default:$(()=>[k(u,null,{default:$(()=>[r.settings.featured_image?(C(),M("img",{key:0,alt:"",style:{"max-height":"100px"},class:"settings_img",src:r.settings.featured_image},null,8,Ype)):W("",!0),k(d,{additionalData:{resize:!1,max_width:1600,skip_convert:"yes"},button_text:r.settings.featured_image?e.$t("Change"):e.$t("Set Featured Image"),can_remove:!!r.settings.featured_image,className:"setting_img_upload",isTextBtn:!1,removeIcon:!1,onUploaded:t[3]||(t[3]=T=>{r.settings.featured_image=T})},null,8,["button_text","can_remove"])]),_:1})]),_:1})]),_:1}),k(c,{gutter:30,class:"setting_row"},{default:$(()=>[k(l,{sm:12},{default:$(()=>[b("p",Zpe,A(e.$t("Global Post Status")),1),b("span",Jpe,A(e.$t("Enable/disable Post Status")),1)]),_:1}),k(l,{sm:12},{default:$(()=>[k(u,null,{default:$(()=>[k(f,{"true-value":"no","false-value":"yes",modelValue:r.settings.disable_global_posts,"onUpdate:modelValue":t[4]||(t[4]=T=>r.settings.disable_global_posts=T)},{default:$(()=>[ne(A(e.$t("Enable Global Posts Status Form")),1)]),_:1},8,["modelValue"]),b("div",Xpe,[b("p",null,A(e.$t("if you enable this, then user can post globally without selecting a space which will be available for everyone.")),1)])]),_:1})]),_:1})]),_:1}),k(c,{gutter:30,class:"setting_row"},{default:$(()=>[k(l,{sm:12},{default:$(()=>[b("p",Qpe,A(e.$t("Portal Access Settings")),1),b("span",ehe,A(e.$t("Who can access to the portal")),1)]),_:1}),k(l,{sm:12},{default:$(()=>[k(u,null,{default:$(()=>[k(h,{modelValue:r.settings.access.acess_level,"onUpdate:modelValue":t[5]||(t[5]=T=>r.settings.access.acess_level=T)},{default:$(()=>[k(p,{value:"public"},{default:$(()=>[ne(A(e.$t("Everyone")),1)]),_:1}),k(p,{value:"logged_in"},{default:$(()=>[ne(A(e.$t("Only Logged In Users")),1)]),_:1}),k(p,{value:"role_based"},{default:$(()=>[ne(A(e.$t("Only Selected User Roles")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),s.isRoleBase?(C(),q(c,{key:0,gutter:30,class:"setting_row"},{default:$(()=>[k(l,{sm:12},{default:$(()=>[b("p",the,A(e.$t("User Roles")),1),b("span",nhe,A(e.$t("Select User Roles who can access to the portal")),1)]),_:1}),k(l,{sm:12},{default:$(()=>[k(u,null,{default:$(()=>[k(y,{placeholder:e.$t("Select Access Roles"),modelValue:r.settings.access.access_roles,"onUpdate:modelValue":t[6]||(t[6]=T=>r.settings.access.access_roles=T),multiple:""},{default:$(()=>[(C(!0),M(fe,null,nt(r.user_roles,(T,O)=>(C(),q(m,{key:O,label:T,value:O},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"]),b("span",ohe,A(e.$t("__ALL_ADMIN_ACCESS_DESC")),1)]),_:1})]),_:1})]),_:1})):W("",!0),s.isRoleBase?(C(),q(c,{key:1,gutter:30,class:"setting_row"},{default:$(()=>[k(l,{sm:12},{default:$(()=>[b("p",rhe,A(e.$t("Not Matched User Roles")),1),b("span",she,A(e.$t("Message to show for not matched user roles")),1)]),_:1}),k(l,{sm:12},{default:$(()=>[k(u,null,{default:$(()=>[k(a,{type:"textarea",rows:3,modelValue:r.settings.restricted_role_content,"onUpdate:modelValue":t[7]||(t[7]=T=>r.settings.restricted_role_content=T)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):W("",!0),r.settings.access.acess_level!="public"?(C(),q(c,{key:2,gutter:30,class:"setting_row"},{default:$(()=>[k(l,{sm:12},{default:$(()=>[b("p",ihe,A(e.$t("Redirect URL")),1),b("span",lhe,A(e.$t("Redirect URL for Public Users")),1)]),_:1}),k(l,{sm:12},{default:$(()=>[k(u,null,{default:$(()=>[k(a,{type:"url",modelValue:r.settings.auth_url,"onUpdate:modelValue":t[8]||(t[8]=T=>r.settings.auth_url=T)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):W("",!0),r.settings.access.acess_level!="public"?(C(),q(c,{key:3,gutter:30,class:"setting_row"},{default:$(()=>[k(l,{sm:12},{default:$(()=>[b("p",ahe,A(e.$t("Login URL")),1),b("span",uhe,A(e.$t("For default authentication, please use this URL")),1)]),_:1}),k(l,{sm:12},{default:$(()=>[k(u,null,{default:$(()=>[k(a,{type:"url",disabled:"",value:s.loginUrl,placeholder:e.$t("Login URL for public Users")},{append:$(()=>[k(w,{onClick:t[9]||(t[9]=T=>s.copyToClipboard(s.loginUrl))},{default:$(()=>[k(v)]),_:1}),b("span",null,A(e.$t("Copy")),1)]),_:1},8,["value","placeholder"])]),_:1})]),_:1})]),_:1})):W("",!0),k(c,{gutter:30},{default:$(()=>[k(i,{class:"fcom_primary_button",disabled:r.saving||r.loading,onClick:s.saveSettings},{default:$(()=>[b("span",null,A(e.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})):r.loading?(C(),q(S,{key:1,animated:!0,rows:10})):W("",!0)])])])]),_:1},8,["title"])]),_:1})}const dhe=qe(Lpe,[["render",che]]),fhe={name:"ManagerForm",props:["modelValue"],emits:["completed"],data(){return{users:[],loading:!1,form:this.modelValue||{user_id:"",roles:[]},adding:!1}},methods:{fetchUsers(e=""){this.loading=!0,this.$get("admin/users",{context:"add_manager",search:e}).then(t=>{this.users=t.users.data}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},addManager(){if(!this.form.user_id||!this.form.roles.length){this.$notify.error(this.$t("Please select a user and role"));return}this.adding=!0,this.$post("admin/managers",{user_id:this.form.user_id,roles:this.form.roles}).then(e=>{this.$notify.success(e.message),this.$emit("completed")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.adding=!1})}},mounted(){this.form.roles||(this.form.roles=[]),this.modelValue.editing_user||this.fetchUsers()}},phe={style:{float:"left"}},hhe={style:{float:"right",color:"#8492a6","font-size":"13px"}},mhe={key:1},ghe={class:"dialog_footer"},vhe={key:0},yhe={key:1};function _he(e,t,n,o,r,s){const i=Ss,l=vr,a=io,u=Hn,c=xoe,d=pt,f=so,p=zt("loading");return C(),q(f,{onSubmit:t[3]||(t[3]=et(h=>e.doNothing(),["prevent"])),"label-position":"top",modelValue:r.form,"onUpdate:modelValue":t[4]||(t[4]=h=>r.form=h),size:"large"},{default:$(()=>[r.form.editing_user?(C(),M("p",mhe,A(e.$t("Editing manager role for %s",r.form.editing_user.display_name)),1)):(C(),q(a,{key:0,label:e.$t("User")},{default:$(()=>[k(l,{class:"rich_select",filterable:"",remote:"",loading:r.loading,"remote-method":s.fetchUsers,placeholder:e.$t("Select User"),modelValue:r.form.user_id,"onUpdate:modelValue":t[0]||(t[0]=h=>r.form.user_id=h)},{default:$(()=>[(C(!0),M(fe,null,nt(r.users,h=>(C(),q(i,{key:h.ID,label:h.display_name+" ("+h.user_email+")",value:h.ID},{default:$(()=>[b("span",phe,A(h.display_name),1),b("span",hhe,A(h.user_email),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["loading","remote-method","placeholder","modelValue"])]),_:1},8,["label"])),k(a,{label:e.$t("Space Management Roles")},{default:$(()=>[k(c,{modelValue:r.form.roles,"onUpdate:modelValue":t[1]||(t[1]=h=>r.form.roles=h)},{default:$(()=>[k(u,{value:"admin"},{default:$(()=>[ne(A(e.$t("Space Admin (All Access)")),1)]),_:1}),k(u,{disabled:r.form.roles.includes("admin"),value:"moderator"},{default:$(()=>[ne(A(e.$t("Space Moderator")),1)]),_:1},8,["disabled"]),k(u,{disabled:r.form.roles.includes("admin"),value:"course_admin"},{default:$(()=>[ne(A(e.$t("Course Admin")),1)]),_:1},8,["disabled"]),k(u,{disabled:r.form.roles.includes("admin")||r.form.roles.includes("course_admin"),value:"course_creatror"},{default:$(()=>[ne(A(e.$t("Course Creator")),1)]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),b("div",ghe,[he(e.$slots,"after_form",{},()=>[He((C(),q(d,{class:"fcom_primary_button",disabled:r.adding,onClick:t[2]||(t[2]=h=>s.addManager())},{default:$(()=>[r.form.editing_user?(C(),M("span",vhe,A(e.$t("Update Role")),1)):(C(),M("span",yhe,A(e.$t("Add Manager")),1))]),_:1},8,["disabled"])),[[p,r.adding]])])])]),_:3},8,["modelValue"])}const bhe=qe(fhe,[["render",_he]]);function whe(e,t){for(var n=-1,o=e==null?0:e.length;++n<o&&t(e[n],n,e)!==!1;);return e}var Che=whe;function khe(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 She=khe,$he=She,Ehe=$he(),xhe=Ehe;function Mhe(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var The=Mhe,Ohe=kh,Ihe=J0,Ahe="[object Arguments]";function Nhe(e){return Ihe(e)&&Ohe(e)==Ahe}var Phe=Nhe,B8=Phe,Lhe=J0,HO=Object.prototype,Rhe=HO.hasOwnProperty,Dhe=HO.propertyIsEnumerable,Fhe=B8(function(){return arguments}())?B8:function(e){return Lhe(e)&&Rhe.call(e,"callee")&&!Dhe.call(e,"callee")},UO=Fhe,Vhe=Array.isArray,Y3=Vhe,Vg={exports:{}};function Bhe(){return!1}var zhe=Bhe;Vg.exports;(function(e,t){var n=zi,o=zhe,r=t&&!t.nodeType&&t,s=r&&!0&&e&&!e.nodeType&&e,i=s&&s.exports===r,l=i?n.Buffer:void 0,a=l?l.isBuffer:void 0,u=a||o;e.exports=u})(Vg,Vg.exports);var WO=Vg.exports,jhe=9007199254740991,Hhe=/^(?:0|[1-9]\d*)$/;function Uhe(e,t){var n=typeof e;return t=t??jhe,!!t&&(n=="number"||n!="symbol"&&Hhe.test(e))&&e>-1&&e%1==0&&e<t}var Whe=Uhe,Khe=9007199254740991;function qhe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Khe}var KO=qhe,Ghe=kh,Yhe=KO,Zhe=J0,Jhe="[object Arguments]",Xhe="[object Array]",Qhe="[object Boolean]",eme="[object Date]",tme="[object Error]",nme="[object Function]",ome="[object Map]",rme="[object Number]",sme="[object Object]",ime="[object RegExp]",lme="[object Set]",ame="[object String]",ume="[object WeakMap]",cme="[object ArrayBuffer]",dme="[object DataView]",fme="[object Float32Array]",pme="[object Float64Array]",hme="[object Int8Array]",mme="[object Int16Array]",gme="[object Int32Array]",vme="[object Uint8Array]",yme="[object Uint8ClampedArray]",_me="[object Uint16Array]",bme="[object Uint32Array]",dn={};dn[fme]=dn[pme]=dn[hme]=dn[mme]=dn[gme]=dn[vme]=dn[yme]=dn[_me]=dn[bme]=!0;dn[Jhe]=dn[Xhe]=dn[cme]=dn[Qhe]=dn[dme]=dn[eme]=dn[tme]=dn[nme]=dn[ome]=dn[rme]=dn[sme]=dn[ime]=dn[lme]=dn[ame]=dn[ume]=!1;function wme(e){return Zhe(e)&&Yhe(e.length)&&!!dn[Ghe(e)]}var Cme=wme;function kme(e){return function(t){return e(t)}}var Sme=kme,Bg={exports:{}};Bg.exports;(function(e,t){var n=VO,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})(Bg,Bg.exports);var $me=Bg.exports,Eme=Cme,xme=Sme,z8=$me,j8=z8&&z8.isTypedArray,Mme=j8?xme(j8):Eme,qO=Mme,Tme=The,Ome=UO,Ime=Y3,Ame=WO,Nme=Whe,Pme=qO,Lme=Object.prototype,Rme=Lme.hasOwnProperty;function Dme(e,t){var n=Ime(e),o=!n&&Ome(e),r=!n&&!o&&Ame(e),s=!n&&!o&&!r&&Pme(e),i=n||o||r||s,l=i?Tme(e.length,String):[],a=l.length;for(var u in e)(t||Rme.call(e,u))&&!(i&&(u=="length"||r&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Nme(u,a)))&&l.push(u);return l}var Fme=Dme,Vme=Object.prototype;function Bme(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Vme;return e===n}var GO=Bme;function zme(e,t){return function(n){return e(t(n))}}var jme=zme,Hme=jme,Ume=Hme(Object.keys,Object),Wme=Ume,Kme=GO,qme=Wme,Gme=Object.prototype,Yme=Gme.hasOwnProperty;function Zme(e){if(!Kme(e))return qme(e);var t=[];for(var n in Object(e))Yme.call(e,n)&&n!="constructor"&&t.push(n);return t}var YO=Zme,Jme=kh,Xme=Ch,Qme="[object AsyncFunction]",e1e="[object Function]",t1e="[object GeneratorFunction]",n1e="[object Proxy]";function o1e(e){if(!Xme(e))return!1;var t=Jme(e);return t==e1e||t==t1e||t==Qme||t==n1e}var ZO=o1e,r1e=ZO,s1e=KO;function i1e(e){return e!=null&&s1e(e.length)&&!r1e(e)}var Z3=i1e,l1e=Fme,a1e=YO,u1e=Z3;function c1e(e){return u1e(e)?l1e(e):a1e(e)}var d1e=c1e,f1e=xhe,p1e=d1e;function h1e(e,t){return e&&f1e(e,t,p1e)}var m1e=h1e,g1e=Z3;function v1e(e,t){return function(n,o){if(n==null)return n;if(!g1e(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 y1e=v1e,_1e=m1e,b1e=y1e,w1e=b1e(_1e),C1e=w1e;function k1e(e){return e}var S1e=k1e,$1e=S1e;function E1e(e){return typeof e=="function"?e:$1e}var x1e=E1e,M1e=Che,T1e=C1e,O1e=x1e,I1e=Y3;function A1e(e,t){var n=I1e(e)?M1e:T1e;return n(e,O1e(t))}var N1e=A1e,P1e=N1e;const cu=_o(P1e);function Et(e){return window.fluentComAdmin.i18n[e]||e}const L1e={public:{label:Et("Public"),description:Et("__PUBLIC_SPACE_DESC"),space_description:Et("__PIBLIC_SPACE_DESC_2")},private:{label:Et("Private"),description:Et("__PRIVATE_SPACE_DESC"),space_description:Et("__PRIVATE_SPACE_DESC_2")},secret:{label:Et("Secret"),description:Et("Only invited members can view and post."),space_description:Et("__SECRET_SPACE_DESC_2")}},R1e={public:{label:Et("Public"),description:Et("Anyone can view and enroll the course for free")},private:{label:Et("Private"),description:Et("__PRIVATE_COURSE_DESC")},secret:{label:Et("Secret"),description:Et("Only invited students can view and enroll the course content.")}},D1e={self_paced:{label:Et("Self Paced"),description:Et("__SELF_PAED_COURSE_DESC")},structured:{label:"Structured",description:Et("__STRUCTURED_COURSE_DESC")},scheduled:{label:Et("Scheduled"),description:Et("Course starts on a specific date. Sections are dripped relative to that date.")}},F1e={leader_board_module:{headerTitle:Et("Leaderboard Settings"),headerDescription:Et("Settings for Leaderboard & Gamification features"),featureImage:"leaderboard_module.png",bodyTitle:Et("Get Leaderboard & Gamification Module"),bodyDescription:Et("Unlock potential by creating new feeds and earning points for likes. Advance in rank based on your total points using this module")},emoji_module:{headerTitle:Et("Emoji Module"),headerDescription:Et("Settings for Emoji & Reaction features"),featureImage:"emoji_module.png",bodyTitle:Et("Get Emoji & Reaction Module"),bodyDescription:Et("Use emojis to add a personal touch and make your new article, post, or comment more expressive")},giphy_module:{headerTitle:Et("Giphy Module"),headerDescription:Et("Customize Your Giphy Module Settings"),featureImage:"giphy_module.png",bodyTitle:Et("Get Giphy Module"),bodyDescription:Et("Want to use awesome GIF, upgrade to pro plan now and enjoy your surfing on Fluent community")},user_badge_module:{headerTitle:Et("User Badge Module"),headerDescription:Et("Add a badge next to user profile name to highlight valued users"),featureImage:"badge_module.png",bodyTitle:Et("Get User Badge Module"),bodyDescription:Et("Show customized Badge to user profile beside name to easily recognize your admins / moderators or give appriciations to your power users")},media_module:{headerTitle:Et("Media Module"),headerDescription:Et("Add a badge next to user profile name to highlight valued users"),featureImage:"media_module.png",bodyTitle:Et("Get Media Module"),bodyDescription:Et("Choose where to store your media files. Options include Local File System, Amazon S3, or Cloudflare R2 for storing and serving your media assets")}},Yu=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 V1e=zi,B1e=V1e["__core-js_shared__"],z1e=B1e,hy=z1e,H8=function(){var e=/[^.]+$/.exec(hy&&hy.keys&&hy.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function j1e(e){return!!H8&&H8 in e}var H1e=j1e,U1e=Function.prototype,W1e=U1e.toString;function K1e(e){if(e!=null){try{return W1e.call(e)}catch{}try{return e+""}catch{}}return""}var JO=K1e,q1e=ZO,G1e=H1e,Y1e=Ch,Z1e=JO,J1e=/[\\^$.*+?()[\]{}|]/g,X1e=/^\[object .+?Constructor\]$/,Q1e=Function.prototype,ege=Object.prototype,tge=Q1e.toString,nge=ege.hasOwnProperty,oge=RegExp("^"+tge.call(nge).replace(J1e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function rge(e){if(!Y1e(e)||G1e(e))return!1;var t=q1e(e)?oge:X1e;return t.test(Z1e(e))}var sge=rge;function ige(e,t){return e==null?void 0:e[t]}var lge=ige,age=sge,uge=lge;function cge(e,t){var n=uge(e,t);return age(n)?n:void 0}var Sh=cge,dge=Sh,fge=zi,pge=dge(fge,"DataView"),hge=pge,mge=Sh,gge=zi,vge=mge(gge,"Map"),yge=vge,_ge=Sh,bge=zi,wge=_ge(bge,"Promise"),Cge=wge,kge=Sh,Sge=zi,$ge=kge(Sge,"Set"),Ege=$ge,xge=Sh,Mge=zi,Tge=xge(Mge,"WeakMap"),Oge=Tge,Mb=hge,Tb=yge,Ob=Cge,Ib=Ege,Ab=Oge,XO=kh,Td=JO,U8="[object Map]",Ige="[object Object]",W8="[object Promise]",K8="[object Set]",q8="[object WeakMap]",G8="[object DataView]",Age=Td(Mb),Nge=Td(Tb),Pge=Td(Ob),Lge=Td(Ib),Rge=Td(Ab),ya=XO;(Mb&&ya(new Mb(new ArrayBuffer(1)))!=G8||Tb&&ya(new Tb)!=U8||Ob&&ya(Ob.resolve())!=W8||Ib&&ya(new Ib)!=K8||Ab&&ya(new Ab)!=q8)&&(ya=function(e){var t=XO(e),n=t==Ige?e.constructor:void 0,o=n?Td(n):"";if(o)switch(o){case Age:return G8;case Nge:return U8;case Pge:return W8;case Lge:return K8;case Rge:return q8}return t});var Dge=ya,Fge=YO,Vge=Dge,Bge=UO,zge=Y3,jge=Z3,Hge=WO,Uge=GO,Wge=qO,Kge="[object Map]",qge="[object Set]",Gge=Object.prototype,Yge=Gge.hasOwnProperty;function Zge(e){if(e==null)return!0;if(jge(e)&&(zge(e)||typeof e=="string"||typeof e.splice=="function"||Hge(e)||Wge(e)||Bge(e)))return!e.length;var t=Vge(e);if(t==Kge||t==qge)return!e.size;if(Uge(e))return!Fge(e).length;for(var n in e)if(Yge.call(e,n))return!1;return!0}var Jge=Zge;const QO=_o(Jge),Xge={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),QO(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}}},Qge={class:"fcom_social_links"},e0e=["href","title"];function t0e(e,t,n,o,r,s){const i=Ne,l=re("router-link");return C(),M("div",Qge,[(C(!0),M(fe,null,nt(s.socialLinks,a=>(C(),M("a",{rel:"noopener nofollow",target:"_blank",href:a.url,key:a.title,title:a.title},[k(i,{innerHTML:a.icon},null,8,["innerHTML"])],8,e0e))),128)),n.isOwn&&!s.socialLinks.length?(C(),q(l,{key:0,to:{name:"update_profile",params:{username:n.xprofile.username}}},{default:$(()=>[ne(A("+ "+e.$t("Add social links")),1)]),_:1},8,["to"])):W("",!0)])}const n0e=qe(Xge,[["render",t0e]]),o0e={name:"UserRouteLink",props:{xprofile:{default:()=>({})},show_pop:{type:Boolean,default(){return!0}},show_badge:{type:Boolean,default(){return!1}}},components:{SocialLinks:n0e},data(){return{showingPop:!1,userLevel:null}},methods:{initShow(){this.showingPop=!0,this.has_leaderboard&&!this.userLevel&&(this.userLevel=Yu(this.xprofile.total_points))}}},r0e=["href"],s0e=["href"],i0e={key:0,class:"fcom_profile_pop"},l0e={class:"fcom_profile_pop_avatar"},a0e={key:0,class:"fcom_prfile_tagline"},u0e={class:"fcom_level_name"},c0e={style:{display:"block"},class:"fcoml_level_sub meta_line"},d0e={class:"fcom_profile_pop_info"},f0e=["href"],p0e={class:"fcom_user_name"},h0e={key:0,class:"fcom_profile_pop_bio"},m0e={class:"meta_line"},g0e={key:1,class:"meta_line"},v0e={class:"fcom_profile_btns"},y0e=["href"],_0e=["href"];function b0e(e,t,n,o,r,s){const i=re("verified-sign"),l=re("UserBadge"),a=re("UserAvatar"),u=vh,c=re("SocialLinks"),d=gh,f=Po;return n.show_pop?(C(),q(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:$(()=>[he(e.$slots,"default",{},()=>[b("a",{href:e.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[ne(A(n.xprofile.display_name||e.$t("No name"))+" ",1),n.xprofile.is_verified?(C(),q(i,{key:0})):W("",!0),n.show_badge?(C(),q(l,{key:1,profile:n.xprofile},null,8,["profile"])):W("",!0)],8,s0e)])]),default:$(()=>[r.showingPop?(C(),M("div",i0e,[k(d,{gutter:20},{default:$(()=>[k(u,{sm:24,md:8},{default:$(()=>[b("div",l0e,[k(a,{xprofile:n.xprofile},null,8,["xprofile"]),r.userLevel?(C(),M("div",a0e,[b("div",u0e,A(r.userLevel.title),1),b("div",c0e,A(r.userLevel.tagline),1)])):W("",!0)])]),_:1}),k(u,{sm:24,md:16},{default:$(()=>[b("div",d0e,[b("a",{href:e.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[ne(A(n.xprofile.display_name)+" ",1),n.xprofile.is_verified?(C(),q(i,{key:0})):W("",!0),n.show_badge?(C(),q(l,{key:1,profile:n.xprofile},null,8,["profile"])):W("",!0)],8,f0e),b("span",p0e," @"+A(n.xprofile.username),1),n.xprofile.short_description?(C(),M("div",h0e,A(e.getExcerpt(n.xprofile.short_description,160)),1)):W("",!0),b("div",m0e," Joined: "+A(e.humanDateDiff(n.xprofile.created_at)),1),n.xprofile.last_activity?(C(),M("div",g0e," Last seen: "+A(e.humanDateDiff(n.xprofile.last_activity)),1)):W("",!0),b("div",v0e,[b("a",{class:"el-button el-button--primary is-text is-has-bg",href:e.$getRouteLink("u/:username",{username:n.xprofile.username})},A(e.$t("View Profile")),9,y0e),e.appVars.has_chat?(C(),M("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})},A(e.$t("Message")),9,_0e)):W("",!0)]),k(c,{style:{"justify-content":"left"},xprofile:n.xprofile,isOwn:!1},null,8,["xprofile"])])]),_:1})]),_:1})])):W("",!0)]),_:3},8,["onShow"])):(C(),M("a",{key:0,href:e.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[he(e.$slots,"default",{},()=>[ne(A(n.xprofile.display_name)+" ",1),n.xprofile.is_verified?(C(),q(i,{key:0})):W("",!0),n.show_badge?(C(),q(l,{key:1,profile:n.xprofile},null,8,["profile"])):W("",!0)])],8,r0e))}const X0=qe(o0e,[["render",b0e]]),w0e={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=Yu(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=Yu(this.xprofile.total_points),t=Yu(e.max_points+1);return e.level!==t.level},getOutlineStyle(){if(!this.withCompletion)return{};const e=Yu(this.xprofile.total_points),t=Yu(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"}}},C0e=["src"],k0e={key:1,class:"fcom_no_image"},S0e={key:0,role:"region","aria-label":"User Level",class:"fcom_user_level_mark"};function $0e(e,t,n,o,r,s){return C(),M("div",{class:D([{fcom_avatar_is_rounded:n.is_rounded,is_member_online:n.is_online},"fcom_user_avatar"])},[b("span",{style:Qe(s.getOutlineStyle),class:D({fcom_compilation_avatar:s.withCompletion})},[n.xprofile?(C(),M("img",{key:0,onError:t[0]||(t[0]=(...i)=>s.setAltImg&&s.setAltImg(...i)),src:n.xprofile.avatar,alt:""},null,40,C0e)):(C(),M("span",k0e))],6),s.level||n.is_online?(C(),M("div",S0e,[b("span",null,A(s.level),1)])):W("",!0)],2)}const eI=qe(w0e,[["render",$0e]]),E0e={name:"ModeratorSettings",components:{UserAvatar:eI,UserRouteLink:X0,ManagerForm:bhe,Layout:ri,AppLayout:si},data(){return{managers:[],loading:!1,paginate:{page:1,per_page:20,total:0},search:"",bulkAction:"",showModal:!1,editing_manager:{user_id:"",roles:[]}}},methods:{applyBulkAction(){this.bulkAction=""},showForm(e){this.editing_manager=e?{user_id:e.ID,roles:e.community_role.value,editing_user:e}:{user_id:"",roles:[]},this.showModal=!0},fetch(){this.loading=!0,this.$get("admin/managers",{page:this.paginate.page,per_page:this.paginate.per_page,search:this.search}).then(e=>{this.managers=e.managers.data,this.paginate.total=e.total}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},removeManager(e){this.$confirm(this.$t("Are you sure you want to remove this manager?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Remove"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.working=!0,this.$del("admin/managers/"+e.ID).then(t=>{this.$notify.success(t.message),this.fetch()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1})})},formatRoles(e){let t=[];return this.each(e,n=>{t.push(this.ucWords(n.replace("_"," ")))}),t.join(", ")}},mounted(){this.has_pro&&this.fetch(),this.changeTitle(this.$t("Moderator Settings"))}},x0e=["href"],M0e={class:"settings_router manager_section"},T0e={class:"fhr_content_layout_body"},O0e={key:0,class:"setting_body"},I0e={class:"fcom_manager_actions"},A0e={class:"bulk_search"},N0e=b("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[b("path",{d:"M14.5833 14.584L18.3333 18.334",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),b("path",{d:"M16.6667 9.16699C16.6667 5.02486 13.3088 1.66699 9.16666 1.66699C5.02453 1.66699 1.66666 5.02486 1.66666 9.16699C1.66666 13.3091 5.02453 16.667 9.16666 16.667C13.3088 16.667 16.6667 13.3091 16.6667 9.16699Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})],-1),P0e={class:"fcom_manager_table"},L0e={class:"user_col"},R0e={class:"user_info"},D0e={class:"user_id"},F0e={class:"user_email"},V0e={class:"fcom_table_action_col"},B0e={key:1,class:"setting_body",style:{"text-align":"center"}},z0e=b("p",null,"Add your team members as an Admin/Moderator of this community. This feature is available on the premium version of FluentCommunity. Please upgrade to pro",-1),j0e=["href"],H0e={class:"dialog_header"},U0e={class:"dialog_left"},W0e=b("div",{class:"header_icon"},[b("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[b("path",{d:"M11.5 11.689V13.2565C10.8212 13.0165 10.0947 12.9429 9.38155 13.0418C8.6684 13.1408 7.9894 13.4094 7.40157 13.8252C6.81375 14.2409 6.33426 14.7916 6.00337 15.4311C5.67249 16.0705 5.49986 16.78 5.5 17.5L4 17.4993C3.99977 16.5834 4.20919 15.6797 4.61222 14.8573C5.01526 14.0349 5.6012 13.3157 6.32516 12.7548C7.04912 12.1939 7.89188 11.8061 8.78887 11.6212C9.68585 11.4364 10.6132 11.4593 11.5 11.6883V11.689ZM10 10.75C7.51375 10.75 5.5 8.73625 5.5 6.25C5.5 3.76375 7.51375 1.75 10 1.75C12.4862 1.75 14.5 3.76375 14.5 6.25C14.5 8.73625 12.4862 10.75 10 10.75ZM10 9.25C11.6575 9.25 13 7.9075 13 6.25C13 4.5925 11.6575 3.25 10 3.25C8.3425 3.25 7 4.5925 7 6.25C7 7.9075 8.3425 9.25 10 9.25ZM14.5 13.75V11.5H16V13.75H18.25V15.25H16V17.5H14.5V15.25H12.25V13.75H14.5Z",fill:"currentColor"})])],-1),K0e={class:"dialog_body"};function q0e(e,t,n,o,r,s){const i=re("Plus"),l=Ne,a=pt,u=At,c=Xte,d=re("user-route-link"),f=Y0,p=G0,h=re("layout"),m=re("app-layout"),y=re("manager-form"),v=yh,w=zt("loading");return C(),M(fe,null,[k(m,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:$(()=>[k(h,{wrapper_class:"no_bg_layout fcom_setting_route",title:e.$t("Community Managers")},{actions:$(()=>[e.has_pro?(C(),q(a,{key:0,class:"fcom_primary_button",onClick:t[0]||(t[0]=_=>s.showForm(null))},{default:$(()=>[k(l,null,{default:$(()=>[k(i)]),_:1}),b("span",null,A(e.$t("Add Manager")),1)]),_:1})):(C(),M("a",{key:1,target:"_blank",rel:"noopener",href:e.appVars.upgrade_url,class:"el-button el-button--danger"},A(e.$t("Upgrade to Pro")),9,x0e))]),default:$(()=>[b("div",M0e,[b("div",T0e,[e.has_pro?(C(),M("div",O0e,[b("div",I0e,[b("div",A0e,[k(u,{modelValue:r.search,"onUpdate:modelValue":t[1]||(t[1]=_=>r.search=_),onKeydown:Pt(s.fetch,["enter"]),placeholder:e.$t("Search"),class:"el-input-round"},{prefix:$(()=>[N0e]),_:1},8,["modelValue","onKeydown","placeholder"])])]),b("div",P0e,[He((C(),q(p,{data:r.managers},{default:$(()=>[k(f,{label:e.$t("Members"),sortable:"","min-width":"160"},{default:$(_=>[b("div",L0e,[k(c,{src:_.row.xprofile.avatar},null,8,["src"]),b("div",R0e,[b("div",null,[k(d,{xprofile:_.row.xprofile},null,8,["xprofile"]),b("span",D0e,"#"+A(_.row.ID),1)]),b("span",F0e,A(_.row.user_email),1)])])]),_:1},8,["label"]),k(f,{label:e.$t("Role"),sortable:""},{default:$(_=>[b("span",null,A(s.formatRoles(_.row.community_role.value)),1)]),_:1},8,["label"]),k(f,null,{default:$(_=>[b("div",V0e,[k(a,{onClick:S=>s.showForm(_.row),size:"small"},{default:$(()=>[ne(A(e.$t("Edit")),1)]),_:2},1032,["onClick"]),k(a,{onClick:S=>s.removeManager(_.row),type:"danger",plain:"",size:"small"},{default:$(()=>[ne(A(e.$t("Remove")),1)]),_:2},1032,["onClick"])])]),_:1})]),_:1},8,["data"])),[[w,r.loading]])])])):(C(),M("div",B0e,[z0e,b("a",{target:"_blank",rel:"noopener",href:e.appVars.upgrade_url,class:"el-button el-button--danger"},A(e.$t("Upgrade to Pro")),9,j0e)]))])])]),_:1},8,["title"])]),_:1}),k(v,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:e.dialogWidth,modelValue:r.showModal,"onUpdate:modelValue":t[4]||(t[4]=_=>r.showModal=_),direction:"rtl"},{header:$(({close:_})=>[b("div",H0e,[b("div",U0e,[W0e,b("div",null,[b("h4",null,A(e.$t(r.editing_manager.editing_user?"Update Role":"Add Manager")),1),b("p",null,A(e.$t("you can edit your role here")),1)])])])]),default:$(()=>[b("div",K0e,[r.showModal?(C(),q(y,{key:0,onCompleted:t[2]||(t[2]=()=>{s.fetch(),r.showModal=!1}),modelValue:r.editing_manager,"onUpdate:modelValue":t[3]||(t[3]=_=>r.editing_manager=_)},null,8,["modelValue"])):W("",!0)])]),_:1},8,["width","modelValue"])],64)}const G0e=qe(E0e,[["render",q0e]]);var Xo=(e=>(e.docTypeError="docTypeError",e.contextNotFound="contextNotFound",e.timerNotFound="timerNotFound",e.ctxCallOutOfScope="ctxCallOutOfScope",e.createNodeInParserFail="createNodeInParserFail",e.stackOverFlow="stackOverFlow",e.parserMatchError="parserMatchError",e.serializerMatchError="serializerMatchError",e.getAtomFromSchemaFail="getAtomFromSchemaFail",e.expectDomTypeError="expectDomTypeError",e.callCommandBeforeEditorView="callCommandBeforeEditorView",e.missingRootElement="missingRootElement",e.missingNodeInSchema="missingNodeInSchema",e.missingMarkInSchema="missingMarkInSchema",e.ctxNotBind="ctxNotBind",e.missingYjsDoc="missingYjsDoc",e))(Xo||{});let wr=class extends Error{constructor(t,n){super(n),this.name="MilkdownError",this.code=t}};const Y0e=(e,t)=>typeof t=="function"?"[Function]":t,ud=e=>JSON.stringify(e,Y0e);function Z0e(e){return new wr(Xo.docTypeError,`Doc type error, unsupported type: ${ud(e)}`)}function J0e(e){return new wr(Xo.contextNotFound,`Context "${e}" not found, do you forget to inject it?`)}function X0e(e){return new wr(Xo.timerNotFound,`Timer "${e}" not found, do you forget to record it?`)}function J3(){return new wr(Xo.ctxCallOutOfScope,"Should not call a context out of the plugin.")}function Q0e(...e){const t=e.reduce((n,o)=>{if(!o)return n;const r=s=>Array.isArray(s)?s.map(i=>r(i)).join(", "):s.toJSON?ud(s.toJSON()):s.spec?ud(s.spec):s.toString();return`${n}, ${r(o)}`},"Create prosemirror node from remark failed in parser");return new wr(Xo.createNodeInParserFail,t)}function tI(){return new wr(Xo.stackOverFlow,"Stack over flow, cannot pop on an empty stack.")}function eve(e){return new wr(Xo.parserMatchError,`Cannot match target parser for node: ${ud(e)}.`)}function tve(e){return new wr(Xo.serializerMatchError,`Cannot match target serializer for node: ${ud(e)}.`)}function nve(e,t){return new wr(Xo.getAtomFromSchemaFail,`Cannot get ${e}: ${t} from schema.`)}function ii(e){return new wr(Xo.expectDomTypeError,`Expect to be a dom, but get: ${ud(e)}.`)}function ove(){return new wr(Xo.callCommandBeforeEditorView,"You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized")}function nI(e){return new wr(Xo.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${e}" in schema.`)}function rve(e){return new wr(Xo.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${e}" in schema.`)}var oI=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},it=(e,t,n)=>(oI(e,t,"read from private field"),n?n.call(e):t.get(e)),kn=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ut=(e,t,n,o)=>(oI(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);let rI=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 J0e(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 Os,ol,Qd;let sve=class{constructor(t,n,o){kn(this,Os,void 0),kn(this,ol,void 0),kn(this,Qd,void 0),Ut(this,Os,[]),Ut(this,Qd,()=>{it(this,Os).forEach(r=>r(it(this,ol)))}),this.set=r=>{Ut(this,ol,r),it(this,Qd).call(this)},this.get=()=>it(this,ol),this.update=r=>{Ut(this,ol,r(it(this,ol))),it(this,Qd).call(this)},this.type=o,Ut(this,ol,n),t.set(o.id,this)}on(t){return it(this,Os).push(t),()=>{Ut(this,Os,it(this,Os).filter(n=>n!==t))}}once(t){const n=this.on(o=>{t(o),n()});return n}off(t){Ut(this,Os,it(this,Os).filter(n=>n!==t))}offAll(){Ut(this,Os,[])}};Os=new WeakMap,ol=new WeakMap,Qd=new WeakMap;let ive=class{constructor(t,n){this.id=Symbol(`Context-${n}`),this.name=n,this._defaultValue=t,this._typeInfo=()=>{throw J3()}}create(t,n=this._defaultValue){return new sve(t,n,this)}};const jt=(e,t)=>new ive(e,t);var l1,a1,u1,Zu,ef,_a,tf,nf,of;let lve=class{constructor(t,n,o){kn(this,l1,void 0),kn(this,a1,void 0),kn(this,u1,void 0),kn(this,Zu,void 0),kn(this,ef,void 0),kn(this,_a,void 0),kn(this,tf,void 0),kn(this,nf,void 0),kn(this,of,void 0),Ut(this,Zu,new Set),Ut(this,ef,new Set),Ut(this,_a,new Map),Ut(this,tf,new Map),this.read=()=>({metadata:it(this,l1),injectedSlices:[...it(this,Zu)].map(r=>({name:typeof r=="string"?r:r.name,value:it(this,nf).call(this,r)})),consumedSlices:[...it(this,ef)].map(r=>({name:typeof r=="string"?r:r.name,value:it(this,nf).call(this,r)})),recordedTimers:[...it(this,_a)].map(([r,{duration:s}])=>({name:r.name,duration:s,status:it(this,of).call(this,r)})),waitTimers:[...it(this,tf)].map(([r,{duration:s}])=>({name:r.name,duration:s,status:it(this,of).call(this,r)}))}),this.onRecord=r=>{it(this,_a).set(r,{start:Date.now(),duration:0})},this.onClear=r=>{it(this,_a).delete(r)},this.onDone=r=>{const s=it(this,_a).get(r);s&&(s.duration=Date.now()-s.start)},this.onWait=(r,s)=>{const i=Date.now();s.finally(()=>{it(this,tf).set(r,{duration:Date.now()-i})})},this.onInject=r=>{it(this,Zu).add(r)},this.onRemove=r=>{it(this,Zu).delete(r)},this.onUse=r=>{it(this,ef).add(r)},Ut(this,nf,r=>it(this,a1).get(r).get()),Ut(this,of,r=>it(this,u1).get(r).status),Ut(this,a1,t),Ut(this,u1,n),Ut(this,l1,o)}};l1=new WeakMap,a1=new WeakMap,u1=new WeakMap,Zu=new WeakMap,ef=new WeakMap,_a=new WeakMap,tf=new WeakMap,nf=new WeakMap,of=new WeakMap;var rl,sl,c1,Qr;const ave=class sI{constructor(t,n,o){kn(this,rl,void 0),kn(this,sl,void 0),kn(this,c1,void 0),kn(this,Qr,void 0),this.produce=r=>r&&Object.keys(r).length?new sI(it(this,rl),it(this,sl),{...r}):this,this.inject=(r,s)=>{var i;const l=r.create(it(this,rl).sliceMap);return s!=null&&l.set(s),(i=it(this,Qr))==null||i.onInject(r),this},this.remove=r=>{var s;return it(this,rl).remove(r),(s=it(this,Qr))==null||s.onRemove(r),this},this.record=r=>{var s;return r.create(it(this,sl).store),(s=it(this,Qr))==null||s.onRecord(r),this},this.clearTimer=r=>{var s;return it(this,sl).remove(r),(s=it(this,Qr))==null||s.onClear(r),this},this.isInjected=r=>it(this,rl).has(r),this.isRecorded=r=>it(this,sl).has(r),this.use=r=>{var s;return(s=it(this,Qr))==null||s.onUse(r),it(this,rl).get(r)},this.get=r=>this.use(r).get(),this.set=(r,s)=>this.use(r).set(s),this.update=(r,s)=>this.use(r).update(s),this.timer=r=>it(this,sl).get(r),this.done=r=>{var s;this.timer(r).done(),(s=it(this,Qr))==null||s.onDone(r)},this.wait=r=>{var s;const i=this.timer(r).start();return(s=it(this,Qr))==null||s.onWait(r,i),i},this.waitTimers=async r=>{await Promise.all(this.get(r).map(s=>this.wait(s)))},Ut(this,rl,t),Ut(this,sl,n),Ut(this,c1,o),o&&Ut(this,Qr,new lve(t,n,o))}get meta(){return it(this,c1)}get inspector(){return it(this,Qr)}};rl=new WeakMap,sl=new WeakMap,c1=new WeakMap,Qr=new WeakMap;let uve=ave,cve=class{constructor(){this.store=new Map,this.get=t=>{const n=this.store.get(t.id);if(!n)throw X0e(t.name);return n},this.remove=t=>{this.store.delete(t.id)},this.has=t=>this.store.has(t.id)}};var Ju,ba,rf,il,sf,d1;let dve=class{constructor(t,n){kn(this,Ju,void 0),kn(this,ba,void 0),kn(this,rf,void 0),kn(this,il,void 0),kn(this,sf,void 0),kn(this,d1,void 0),Ut(this,Ju,null),Ut(this,ba,null),Ut(this,il,"pending"),this.start=()=>(it(this,Ju)??Ut(this,Ju,new Promise((o,r)=>{Ut(this,ba,s=>{s instanceof CustomEvent&&s.detail.id===it(this,rf)&&(Ut(this,il,"resolved"),it(this,sf).call(this),s.stopImmediatePropagation(),o())}),it(this,d1).call(this,()=>{it(this,il)==="pending"&&Ut(this,il,"rejected"),it(this,sf).call(this),r(new Error(`Timing ${this.type.name} timeout.`))}),Ut(this,il,"pending"),addEventListener(this.type.name,it(this,ba))})),it(this,Ju)),this.done=()=>{const o=new CustomEvent(this.type.name,{detail:{id:it(this,rf)}});dispatchEvent(o)},Ut(this,sf,()=>{it(this,ba)&&removeEventListener(this.type.name,it(this,ba))}),Ut(this,d1,o=>{setTimeout(()=>{o()},this.type.timeout)}),Ut(this,rf,Symbol(n.name)),this.type=n,t.set(n.id,this)}get status(){return it(this,il)}};Ju=new WeakMap,ba=new WeakMap,rf=new WeakMap,il=new WeakMap,sf=new WeakMap,d1=new WeakMap;let fve=class{constructor(t,n=3e3){this.create=o=>new dve(o,this),this.id=Symbol(`Timer-${t}`),this.name=t,this.timeout=n}};const ea=(e,t=3e3)=>new fve(e,t);function Xn(e){this.content=e}Xn.prototype={constructor:Xn,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 Xn(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 Xn(n)},addToStart:function(e,t){return new Xn([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Xn(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 Xn(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=Xn.from(e),e.size?new Xn(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Xn.from(e),e.size?new Xn(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Xn.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}};Xn.from=function(e){if(e instanceof Xn)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Xn(t)};function iI(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=iI(r.content,s.content,n+1);if(i!=null)return i}n+=r.nodeSize}}function lI(e,t,n,o){for(let r=e.childCount,s=t.childCount;;){if(r==0||s==0)return r==s?null:{a:n,b:o};let i=e.child(--r),l=t.child(--s),a=i.nodeSize;if(i==l){n-=a,o-=a;continue}if(!i.sameMarkup(l))return{a:n,b:o};if(i.isText&&i.text!=l.text){let u=0,c=Math.min(i.text.length,l.text.length);for(;u<c&&i.text[i.text.length-u-1]==l.text[l.text.length-u-1];)u++,n--,o--;return{a:n,b:o}}if(i.content.size||l.content.size){let u=lI(i.content,l.content,n-1,o-1);if(u)return u}n-=a,o-=a}}let Ue=class ko{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let o=0;o<t.length;o++)this.size+=t[o].nodeSize}nodesBetween(t,n,o,r=0,s){for(let i=0,l=0;l<n;i++){let a=this.content[i],u=l+a.nodeSize;if(u>t&&o(a,r+l,s||null,i)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,t-c),Math.min(a.content.size,n-c),o,r+c)}l=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,o,r){let s="",i=!0;return this.nodesBetween(t,n,(l,a)=>{let u=l.isText?l.text.slice(Math.max(t,a)-a,n-a):l.isLeaf?r?typeof r=="function"?r(l):r:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&u||l.isTextblock)&&o&&(i?i=!1:s+=o),s+=u},0),s}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,o=t.firstChild,r=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(o)&&(r[r.length-1]=n.withText(n.text+o.text),s=1);s<t.content.length;s++)r.push(t.content[s]);return new ko(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 ko(o,r)}cutByIndex(t,n){return t==n?ko.empty:t==0&&n==this.content.length?this:new ko(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 ko(r,s)}addToStart(t){return new ko([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new ko(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 iI(this,t,n)}findDiffEnd(t,n=this.size,o=t.size){return lI(this,t,n,o)}findIndex(t,n=-1){if(t==0)return bm(0,t);if(t==this.size)return bm(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?bm(o+1,i):bm(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 ko.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new ko(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return ko.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 ko(n||t,o)}static from(t){if(!t)return ko.empty;if(t instanceof ko)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new ko([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};Ue.empty=new Ue([],0);const my={index:0,offset:0};function bm(e,t){return my.index=e,my.offset=t,my}function zg(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(!zg(e[o],t[o]))return!1}else{for(let o in e)if(!(o in t)||!zg(e[o],t[o]))return!1;for(let o in t)if(!(o in e))return!1}return!0}let Yt=class Nb{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&&zg(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 Nb.none;if(t instanceof Nb)return[t];let n=t.slice();return n.sort((o,r)=>o.type.rank-r.type.rank),n}};Yt.none=[];class jg extends Error{}class Ye{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=uI(this.content,t+this.openStart,n);return o&&new Ye(o,this.openStart,this.openEnd)}removeBetween(t,n){return new Ye(aI(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 Ye.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 Ye(Ue.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 Ye(t,o,r)}}Ye.empty=new Ye(Ue.empty,0,0);function aI(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(aI(s.content,t-r-1,n-r-1)))}function uI(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=uI(i.content,t-s-1,n);return l&&e.replaceChild(r,i.copy(l))}function pve(e,t,n){if(n.openStart>e.depth)throw new jg("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new jg("Inconsistent open depths");return cI(e,t,n,0)}function cI(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=cI(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 qa(i,l.cut(0,e.parentOffset).append(n.content).append(l.cut(t.parentOffset)))}else{let{start:i,end:l}=hve(n,e);return qa(s,fI(e,i,l,t,o))}else return qa(s,Hg(e,t,o))}function dI(e,t){if(!t.type.compatibleContent(e.type))throw new jg("Cannot join "+t.type.name+" onto "+e.type.name)}function Pb(e,t,n){let o=e.node(n);return dI(o,t.node(n)),o}function Ka(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 Jf(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&&(Ka(e.nodeAfter,o),s++));for(let l=s;l<i;l++)Ka(r.child(l),o);t&&t.depth==n&&t.textOffset&&Ka(t.nodeBefore,o)}function qa(e,t){return e.type.checkContent(t),e.copy(t)}function fI(e,t,n,o,r){let s=e.depth>r&&Pb(e,t,r+1),i=o.depth>r&&Pb(n,o,r+1),l=[];return Jf(null,e,r,l),s&&i&&t.index(r)==n.index(r)?(dI(s,i),Ka(qa(s,fI(e,t,n,o,r+1)),l)):(s&&Ka(qa(s,Hg(e,t,r+1)),l),Jf(t,n,r,l),i&&Ka(qa(i,Hg(n,o,r+1)),l)),Jf(o,null,r,l),new Ue(l)}function Hg(e,t,n){let o=[];if(Jf(null,e,n,o),e.depth>n){let r=Pb(e,t,n+1);Ka(qa(r,Hg(e,t,n+1)),o)}return Jf(t,null,n,o),new Ue(o)}function hve(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(Ue.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}class Bp{constructor(t,n,o){this.pos=t,this.path=n,this.parentOffset=o,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let o=this.pos-this.path[this.path.length-1],r=t.child(n);return o?t.child(n).cut(o):r}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let o=this.path[n*3],r=n==0?0:this.path[n*3-1]+1;for(let s=0;s<t;s++)r+=o.child(s).nodeSize;return r}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return Yt.none;if(this.textOffset)return t.child(n).marks;let o=t.maybeChild(n-1),r=t.maybeChild(n);if(!o){let l=o;o=r,r=l}let s=o.marks;for(var i=0;i<s.length;i++)s[i].type.spec.inclusive===!1&&(!r||!s[i].isInSet(r.marks))&&(s=s[i--].removeFromSet(s));return s}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let o=n.marks,r=t.parent.maybeChild(t.index());for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!r||!o[s].isInSet(r.marks))&&(o=o[s--].removeFromSet(o));return o}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let o=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);o>=0;o--)if(t.pos<=this.end(o)&&(!n||n(this.node(o))))return new pI(this,t,o);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let o=[],r=0,s=n;for(let i=t;;){let{index:l,offset:a}=i.content.findIndex(s),u=s-a;if(o.push(i,l,r+a),!u||(i=i.child(l),i.isText))break;s=u-1,r+=a+1}return new Bp(n,o,s)}static resolveCached(t,n){let o=Y8.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 Y8.set(t,o=new mve);let r=o.elts[o.i]=Bp.resolve(t,n);return o.i=(o.i+1)%gve,r}}class mve{constructor(){this.elts=[],this.i=0}}const gve=12,Y8=new WeakMap;class pI{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 vve=Object.create(null);let Ll=class Lb{constructor(t,n,o,r=Yt.none){this.type=t,this.attrs=n,this.marks=r,this.content=o||Ue.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&&zg(this.attrs,n||t.defaultAttrs||vve)&&Yt.sameSet(this.marks,o||Yt.none)}copy(t=null){return t==this.content?this:new Lb(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new Lb(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 Ye.empty;let r=this.resolve(t),s=this.resolve(n),i=o?0:r.sharedDepth(n),l=r.start(i),u=r.node(i).content.cut(r.pos-l,s.pos-l);return new Ye(u,r.depth-i,s.depth-i)}replace(t,n,o){return pve(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 Bp.resolveCached(this,t)}resolveNoCache(t){return Bp.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()+")"),hI(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=Ue.empty,r=0,s=o.childCount){let i=this.contentMatchAt(t).matchFragment(o,r,s),l=i&&i.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=r;a<s;a++)if(!this.type.allowsMarks(o.child(a).marks))return!1;return!0}canReplaceWith(t,n,o,r){if(r&&!this.type.allowsMarks(r))return!1;let s=this.contentMatchAt(t).matchType(o),i=s&&s.matchFragment(this.content,n);return i?i.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=Yt.none;for(let n=0;n<this.marks.length;n++){let o=this.marks[n];o.type.checkAttrs(o.attrs),t=o.addToSet(t)}if(!Yt.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let o;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");o=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,o)}let r=Ue.fromJSON(t,n.content),s=t.nodeType(n.type).create(n.attrs,r,o);return s.type.checkAttrs(s.attrs),s}};Ll.prototype.text=void 0;class Ug extends Ll{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):hI(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 Ug(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Ug(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 hI(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class du{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let o=new yve(t,n);if(o.next==null)return du.empty;let r=mI(o);o.next&&o.err("Unexpected trailing text");let s=$ve(Sve(r));return Eve(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 Ue.from(l.map(u=>u.createAndFill()));for(let u=0;u<i.next.length;u++){let{type:c,next:d}=i.next[u];if(!(c.isText||c.hasRequiredAttrs())&&r.indexOf(d)==-1){r.push(d);let f=s(d,l.concat(c));if(f)return f}}return null}return s(this,[])}findWrapping(t){for(let o=0;o<this.wrapCache.length;o+=2)if(this.wrapCache[o]==t)return this.wrapCache[o+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),o=[{match:this,type:null,via:null}];for(;o.length;){let r=o.shift(),s=r.match;if(s.matchType(t)){let i=[];for(let l=r;l.type;l=l.via)i.push(l.type);return i.reverse()}for(let i=0;i<s.next.length;i++){let{type:l,next:a}=s.next[i];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!r.type||a.validEnd)&&(o.push({match:l.contentMatch,type:l,via:r}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(o){t.push(o);for(let r=0;r<o.next.length;r++)t.indexOf(o.next[r].next)==-1&&n(o.next[r].next)}return n(this),t.map((o,r)=>{let s=r+(o.validEnd?"*":" ")+" ";for(let i=0;i<o.next.length;i++)s+=(i?", ":"")+o.next[i].type.name+"->"+t.indexOf(o.next[i].next);return s}).join(`
77 -`)}}du.empty=new du(!0);class yve{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 mI(e){let t=[];do t.push(_ve(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function _ve(e){let t=[];do t.push(bve(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function bve(e){let t=kve(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=wve(e,t);else break;return t}function Z8(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function wve(e,t){let n=Z8(e),o=n;return e.eat(",")&&(e.next!="}"?o=Z8(e):o=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:o,expr:t}}function Cve(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 kve(e){if(e.eat("(")){let t=mI(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=Cve(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 Sve(e){let t=[[]];return r(s(e,0),n()),t;function n(){return t.push([])-1}function o(i,l,a){let u={term:a,to:l};return t[i].push(u),u}function r(i,l){i.forEach(a=>a.to=l)}function s(i,l){if(i.type=="choice")return i.exprs.reduce((a,u)=>a.concat(s(u,l)),[]);if(i.type=="seq")for(let a=0;;a++){let u=s(i.exprs[a],l);if(a==i.exprs.length-1)return u;r(u,l=n())}else if(i.type=="star"){let a=n();return o(l,a),r(s(i.expr,a),a),[o(a)]}else if(i.type=="plus"){let a=n();return r(s(i.expr,l),a),r(s(i.expr,a),a),[o(a)]}else{if(i.type=="opt")return[o(l)].concat(s(i.expr,l));if(i.type=="range"){let a=l;for(let u=0;u<i.min;u++){let c=n();r(s(i.expr,a),c),a=c}if(i.max==-1)r(s(i.expr,a),a);else for(let u=i.min;u<i.max;u++){let c=n();o(a,c),r(s(i.expr,a),c),a=c}return[o(a)]}else{if(i.type=="name")return[o(l,void 0,i.value)];throw new Error("Unknown expr type")}}}}function gI(e,t){return t-e}function J8(e,t){let n=[];return o(t),n.sort(gI);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 $ve(e){let t=Object.create(null);return n(J8(e,0));function n(o){let r=[];o.forEach(i=>{e[i].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c<r.length;c++)r[c][0]==l&&(u=r[c][1]);J8(e,a).forEach(c=>{u||r.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let s=t[o.join(",")]=new du(o.indexOf(e.length-1)>-1);for(let i=0;i<r.length;i++){let l=r[i][1].sort(gI);s.next.push({type:r[i][0],next:t[l.join(",")]||n(l)})}return s}}function Eve(e,t){for(let n=0,o=[e];n<o.length;n++){let r=o[n],s=!r.validEnd,i=[];for(let l=0;l<r.next.length;l++){let{type:a,next:u}=r.next[l];i.push(a.name),s&&!(a.isText||a.hasRequiredAttrs())&&(s=!1),o.indexOf(u)==-1&&o.push(u)}s&&t.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function vI(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 yI(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 _I(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 bI(e,t){let n=Object.create(null);if(t)for(let o in t)n[o]=new Mve(e,o,t[o]);return n}let X8=class wI{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=bI(t,o.attrs),this.defaultAttrs=vI(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==du.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:yI(this.attrs,t)}create(t=null,n,o){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ll(this,this.computeAttrs(t),Ue.from(n),Yt.setFrom(o))}createChecked(t=null,n,o){return n=Ue.from(n),this.checkContent(n),new Ll(this,this.computeAttrs(t),n,Yt.setFrom(o))}createAndFill(t=null,n,o){if(t=this.computeAttrs(t),n=Ue.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(Ue.empty,!0);return s?new Ll(this,t,n.append(s),Yt.setFrom(o)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let o=0;o<t.childCount;o++)if(!this.allowsMarks(t.child(o).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){_I(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let o=0;o<t.length;o++)this.allowsMarkType(t[o].type)?n&&n.push(t[o]):n||(n=t.slice(0,o));return n?n.length?n:Yt.none:t}static compile(t,n){let o=Object.create(null);t.forEach((s,i)=>o[s]=new wI(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 xve(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 Mve{constructor(t,n,o){this.hasDefault=Object.prototype.hasOwnProperty.call(o,"default"),this.default=o.default,this.validate=typeof o.validate=="string"?xve(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=bI(t,r.attrs),this.excluded=null;let s=vI(this.attrs);this.instance=s?new Yt(this,s):null}create(t=null){return!t&&this.instance?this.instance:new Yt(this,yI(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){_I(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class Tve{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=Xn.from(t.nodes),n.marks=Xn.from(t.marks||{}),this.nodes=X8.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]=du.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 X8){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 Ug(o,o.defaultAttrs,t,Yt.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return Ll.fromJSON(this,t)}markFromJSON(t){return Yt.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function 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 Ove(e){return e.tag!=null}function Ive(e){return e.style!=null}class fu{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let o=this.matchedStyles=[];n.forEach(r=>{if(Ove(r))this.tags.push(r);else if(Ive(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 tS(this,n,!1);return o.addAll(t,Yt.none,n.from,n.to),o.finish()}parseSlice(t,n={}){let o=new tS(this,n,!0);return o.addAll(t,Yt.none,n.from,n.to),Ye.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(Pve(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=nS(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=nS(i)),i.node||i.ignore||i.mark||(i.node=r)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new fu(t,fu.schemaRules(t)))}}const CI={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},Ave={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},kI={ol:!0,ul:!0},Wg=1,Kg=2,Xf=4;function eS(e,t,n){return t!=null?(t?Wg:0)|(t==="full"?Kg:0):e&&e.whitespace=="pre"?Wg|Kg:n&~Xf}class wm{constructor(t,n,o,r,s,i){this.type=t,this.attrs=n,this.marks=o,this.solid=r,this.options=i,this.content=[],this.activeMarks=Yt.none,this.match=s||(i&Xf?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Ue.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&Wg)){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=Ue.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(Ue.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&&!CI.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class tS{constructor(t,n,o){this.parser=t,this.options=n,this.isOpen=o,this.open=0;let r=n.topNode,s,i=eS(null,n.preserveWhitespace,0)|(o?Xf:0);r?s=new wm(r.type,r.attrs,Yt.none,!0,n.topMatch||r.type.contentMatch,i):o?s=new wm(null,null,Yt.none,!0,null,i):s=new wm(t.schema.topNodeType,null,Yt.none,!0,null,i),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let o=t.nodeValue,r=this.top;if(r.options&Kg||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(o)){if(r.options&Wg)r.options&Kg?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;kI.hasOwnProperty(r)&&this.parser.normalizeLists&&Nve(t);let i=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(s=this.parser.matchTag(t,this,o));if(i?i.ignore:Ave.hasOwnProperty(r))this.findInside(t),this.ignoreFallback(t,n);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(t=i.skip);let l,a=this.top,u=this.needsBlock;if(CI.hasOwnProperty(r))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),l=!0,a.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);return}let c=i&&i.skip?n:this.readStyles(t,n);c&&this.addAll(t,c),l&&this.sync(a),this.needsBlock=u}else{let l=this.readStyles(t,n);l&&this.addElementByRule(t,i,l,i.consuming===!1?s:void 0)}}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
79 -`),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(t,n){let o=t.style;if(o&&o.length)for(let r=0;r<this.parser.matchedStyles.length;r++){let s=this.parser.matchedStyles[r],i=o.getPropertyValue(s);if(i)for(let l=void 0;;){let a=this.parser.matchStyle(s,i,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?n=n.filter(u=>!a.clearMark(u)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(t,n,o,r){let s,i;if(n.node)if(i=this.parser.schema.nodes[n.node],i.isLeaf)this.insertNode(i.create(n.attrs),o)||this.leafFallback(t,o);else{let a=this.enter(i,n.attrs||null,o,n.preserveWhitespace);a&&(s=!0,o=a)}else{let a=this.parser.schema.marks[n.mark];o=o.concat(a.create(n.attrs))}let l=this.top;if(i&&i.isLeaf)this.findInside(t);else if(r)this.addElement(t,o,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(a=>this.insertNode(a,o));else{let a=t;typeof n.contentElement=="string"?a=t.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(t):n.contentElement&&(a=n.contentElement),this.findAround(t,a,!0),this.addAll(a,o)}s&&this.sync(l)&&this.open--}addAll(t,n,o,r){let s=o||0;for(let i=o?t.childNodes[o]:t.firstChild,l=r==null?null:t.childNodes[r];i!=l;i=i.nextSibling,++s)this.findAtPoint(t,s),this.addDOM(i,n);this.findAtPoint(t,s)}findPlace(t,n){let o,r;for(let s=this.open;s>=0;s--){let i=this.nodes[s],l=i.findWrapping(t);if(l&&(!o||o.length>l.length)&&(o=l,r=i,!l.length)||i.solid)break}if(!o)return null;this.sync(r);for(let s=0;s<o.length;s++)n=this.enterInner(o[s],null,n,!1);return n}insertNode(t,n){if(t.isInline&&this.needsBlock&&!this.top.type){let r=this.textblockFromContext();r&&(n=this.enterInner(r,null,n))}let o=this.findPlace(t,n);if(o){this.closeExtra();let r=this.top;r.match&&(r.match=r.match.matchType(t.type));let s=Yt.none;for(let i of o.concat(t.marks))(r.type?r.type.allowsMarkType(i.type):oS(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=eS(t,s,i.options);i.options&Xf&&i.content.length==0&&(l|=Xf);let a=Yt.none;return o=o.filter(u=>(i.type?i.type.allowsMarkType(u.type):oS(u.type,t))?(a=u.addToSet(a),!1):!0),this.nodes.push(new wm(t,n,a,r,null,l)),this.open++,o}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let n=this.open;n>=0;n--)if(this.nodes[n]==t)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let o=this.nodes[n].content;for(let r=o.length-1;r>=0;r--)t+=o[r].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let o=0;o<this.find.length;o++)this.find[o].node==t&&this.find[o].offset==n&&(this.find[o].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,o){if(t!=n&&this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&t.nodeType==1&&t.contains(this.find[r].node)&&n.compareDocumentPosition(this.find[r].node)&(o?2:4)&&(this.find[r].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),o=this.options.context,r=!this.isOpen&&(!o||o.parent.type==this.nodes[0].type),s=-(o?o.depth+1:0)+(r?0:1),i=(l,a)=>{for(;l>=0;l--){let u=n[l];if(u==""){if(l==n.length-1||l==0)continue;for(;a>=s;a--)if(i(l-1,a))return!0;return!1}else{let c=a>0||a==0&&r?this.nodes[a].type:o&&a>=s?o.node(a-s).type:null;if(!c||c.name!=u&&c.groups.indexOf(u)==-1)return!1;a--}}return!0};return i(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(o&&o.isTextblock&&o.defaultAttrs)return o}for(let n in this.parser.schema.nodes){let o=this.parser.schema.nodes[n];if(o.isTextblock&&o.defaultAttrs)return o}}}function Nve(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let o=t.nodeType==1?t.nodeName.toLowerCase():null;o&&kI.hasOwnProperty(o)&&n?(n.appendChild(t),t=n):o=="li"?n=t:o&&(n=null)}}function Pve(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function nS(e){let t={};for(let n in e)t[n]=e[n];return t}function oS(e,t){let n=t.schema.nodes;for(let o in n){let r=n[o];if(!r.allowsMarkType(e))continue;let s=[],i=l=>{s.push(l);for(let a=0;a<l.edgeCount;a++){let{type:u,next:c}=l.edge(a);if(u==t||s.indexOf(c)<0&&i(c))return!0}};if(i(r.contentMatch))return!0}}class ta{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},o){o||(o=gy(n).createDocumentFragment());let r=o,s=[];return t.forEach(i=>{if(s.length||i.marks.length){let l=0,a=0;for(;l<s.length&&a<i.marks.length;){let u=i.marks[a];if(!this.marks[u.type.name]){a++;continue}if(!u.eq(s[l][0])||u.type.spec.spanning===!1)break;l++,a++}for(;l<s.length;)r=s.pop()[1];for(;a<i.marks.length;){let u=i.marks[a++],c=this.serializeMark(u,i.isInline,n);c&&(s.push([u,r]),r.appendChild(c.dom),r=c.contentDOM||c.dom)}}r.appendChild(this.serializeNodeInner(i,n))}),o}serializeNodeInner(t,n){let{dom:o,contentDOM:r}=f1(gy(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&&f1(gy(o),r(t,n),null,t.attrs)}static renderSpec(t,n,o=null,r){return f1(t,n,o,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new ta(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=rS(t.nodes);return n.text||(n.text=o=>o.text),n}static marksFromSchema(t){return rS(t.marks)}}function rS(e){let t={};for(let n in e){let o=e[n].spec.toDOM;o&&(t[n]=o)}return t}function gy(e){return e.document||window.document}const sS=new WeakMap;function Lve(e){let t=sS.get(e);return t===void 0&&sS.set(e,t=Rve(e)),t}function Rve(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 f1(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=Lve(o))&&s.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let i=r.indexOf(" ");i>0&&(n=r.slice(0,i),r=r.slice(i+1));let l,a=n?e.createElementNS(n,r):e.createElement(r),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):a.setAttribute(d,u[d])}}for(let d=c;d<t.length;d++){let f=t[d];if(f===0){if(d<t.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:p,contentDOM:h}=f1(e,f,n,o);if(a.appendChild(p),h){if(l)throw new RangeError("Multiple content holes");l=h}}}return{dom:a,contentDOM:l}}const Dve={};function X3(e,t){const n=t||Dve,o=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,r=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return SI(e,o,r)}function SI(e,t,n){if(Fve(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 iS(e.children,t,n)}return Array.isArray(e)?iS(e,t,n):""}function iS(e,t,n){const o=[];let r=-1;for(;++r<e.length;)o[r]=SI(e[r],t,n);return o.join("")}function Fve(e){return!!(e&&typeof e=="object")}const lS=document.createElement("i");function Q3(e){const t="&"+e+";";lS.innerHTML=t;const n=lS.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Rr(e,t,n,o){const r=e.length;let s=0,i;if(t<0?t=-t>r?0:r+t:t=t>r?r:t,n=n>0?n:0,o.length<1e4)i=Array.from(o),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);s<o.length;)i=o.slice(s,s+1e4),i.unshift(t,0),e.splice(...i),s+=1e4,t+=1e4}function xr(e,t){return e.length>0?(Rr(e,e.length,0,t),e):t}const aS={}.hasOwnProperty;function $I(e){const t={};let n=-1;for(;++n<e.length;)Vve(t,e[n]);return t}function Vve(e,t){let n;for(n in t){const r=(aS.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let i;if(s)for(i in s){aS.call(r,i)||(r[i]=[]);const l=s[i];Bve(r[i],Array.isArray(l)?l:l?[l]:[])}}}function Bve(e,t){let n=-1;const o=[];for(;++n<t.length;)(t[n].add==="after"?e:o).push(t[n]);Rr(e,0,0,o)}function EI(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 cs(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Eo=na(/[A-Za-z]/),Wo=na(/[\dA-Za-z]/),zve=na(/[#-'*+\--9=?A-Z^-~]/);function qg(e){return e!==null&&(e<32||e===127)}const Rb=na(/\d/),jve=na(/[\dA-Fa-f]/),Hve=na(/[!-/:-@[-`{-~]/);function dt(e){return e!==null&&e<-2}function nn(e){return e!==null&&(e<0||e===32)}function Nt(e){return e===-2||e===-1||e===32}const ev=na(/\p{P}|\p{S}/u),pu=na(/\s/);function na(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Vt(e,t,n,o){const r=o?o-1:Number.POSITIVE_INFINITY;let s=0;return i;function i(a){return Nt(a)?(e.enter(n),l(a)):t(a)}function l(a){return Nt(a)&&s++<r?(e.consume(a),l):(e.exit(n),t(a))}}const Uve={tokenize:Wve};function Wve(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"),Vt(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 dt(l)?(e.consume(l),e.exit("chunkText"),s):(e.consume(l),i)}}const Kve={tokenize:qve},uS={tokenize:Gve};function qve(e){const t=this,n=[];let o=0,r,s,i;return l;function l(_){if(o<n.length){const S=n[o];return t.containerState=S[1],e.attempt(S[0].continuation,a,u)(_)}return u(_)}function a(_){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&w();const S=t.events.length;let x=S,E;for(;x--;)if(t.events[x][0]==="exit"&&t.events[x][1].type==="chunkFlow"){E=t.events[x][1].end;break}v(o);let T=S;for(;T<t.events.length;)t.events[T][1].end=Object.assign({},E),T++;return Rr(t.events,x+1,0,t.events.slice(S)),t.events.length=T,u(_)}return l(_)}function u(_){if(o===n.length){if(!r)return f(_);if(r.currentConstruct&&r.currentConstruct.concrete)return h(_);t.interrupt=!!(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(uS,c,d)(_)}function c(_){return r&&w(),v(o),f(_)}function d(_){return t.parser.lazy[t.now().line]=o!==n.length,i=t.now().offset,h(_)}function f(_){return t.containerState={},e.attempt(uS,p,h)(_)}function p(_){return o++,n.push([t.currentConstruct,t.containerState]),f(_)}function h(_){if(_===null){r&&w(),v(0),e.consume(_);return}return r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:s,_tokenizer:r}),m(_)}function m(_){if(_===null){y(e.exit("chunkFlow"),!0),v(0),e.consume(_);return}return dt(_)?(e.consume(_),y(e.exit("chunkFlow")),o=0,t.interrupt=void 0,l):(e.consume(_),m)}function y(_,S){const x=t.sliceStream(_);if(S&&x.push(null),_.previous=s,s&&(s.next=_),s=_,r.defineSkip(_.start),r.write(x),t.parser.lazy[_.start.line]){let E=r.events.length;for(;E--;)if(r.events[E][1].start.offset<i&&(!r.events[E][1].end||r.events[E][1].end.offset>i))return;const T=t.events.length;let O=T,P,N;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(P){N=t.events[O][1].end;break}P=!0}for(v(o),E=T;E<t.events.length;)t.events[E][1].end=Object.assign({},N),E++;Rr(t.events,O+1,0,t.events.slice(T)),t.events.length=E}}function v(_){let S=n.length;for(;S-- >_;){const x=n[S];t.containerState=x[1],x[0].exit.call(t,e)}n.length=_}function w(){r.write([null]),s=void 0,r=void 0,t.containerState._closeFlow=void 0}}function Gve(e,t,n){return Vt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Gg(e){if(e===null||nn(e)||pu(e))return 1;if(ev(e))return 2}function tv(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 Db={name:"attention",tokenize:Zve,resolveAll:Yve};function Yve(e,t){let n=-1,o,r,s,i,l,a,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(o=n;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[o][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;a=e[o][1].end.offset-e[o][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d=Object.assign({},e[o][1].end),f=Object.assign({},e[n][1].start);cS(d,-a),cS(f,a),i={type:a>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[o][1].end)},l={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:f},s={type:a>1?"strongText":"emphasisText",start:Object.assign({},e[o][1].end),end:Object.assign({},e[n][1].start)},r={type:a>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},l.end)},e[o][1].end=Object.assign({},i.start),e[n][1].start=Object.assign({},l.end),u=[],e[o][1].end.offset-e[o][1].start.offset&&(u=xr(u,[["enter",e[o][1],t],["exit",e[o][1],t]])),u=xr(u,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",s,t]]),u=xr(u,tv(t.parser.constructs.insideSpan.null,e.slice(o+1,n),t)),u=xr(u,[["exit",s,t],["enter",l,t],["exit",l,t],["exit",r,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=xr(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Rr(e,o-1,n-o+3,u),n=o+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Zve(e,t){const n=this.parser.constructs.attentionMarkers.null,o=this.previous,r=Gg(o);let s;return i;function i(a){return s=a,e.enter("attentionSequence"),l(a)}function l(a){if(a===s)return e.consume(a),l;const u=e.exit("attentionSequence"),c=Gg(a),d=!c||c===2&&r||n.includes(a),f=!r||r===2&&c||n.includes(o);return u._open=!!(s===42?d:d&&(r||!f)),u._close=!!(s===42?f:f&&(c||!d)),t(a)}}function cS(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Jve={name:"autolink",tokenize:Xve};function Xve(e,t,n){let o=0;return r;function r(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(p){return Eo(p)?(e.consume(p),i):p===64?n(p):u(p)}function i(p){return p===43||p===45||p===46||Wo(p)?(o=1,l(p)):u(p)}function l(p){return p===58?(e.consume(p),o=0,a):(p===43||p===45||p===46||Wo(p))&&o++<32?(e.consume(p),l):(o=0,u(p))}function a(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||qg(p)?n(p):(e.consume(p),a)}function u(p){return p===64?(e.consume(p),c):zve(p)?(e.consume(p),u):n(p)}function c(p){return Wo(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),o=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||Wo(p))&&o++<63){const h=p===45?f:d;return e.consume(p),h}return n(p)}}const $h={tokenize:Qve,partial:!0};function Qve(e,t,n){return o;function o(s){return Nt(s)?Vt(e,r,"linePrefix")(s):r(s)}function r(s){return s===null||dt(s)?t(s):n(s)}}const xI={name:"blockQuote",tokenize:eye,continuation:{tokenize:tye},exit:nye};function eye(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 Nt(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function tye(e,t,n){const o=this;return r;function r(i){return Nt(i)?Vt(e,s,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):s(i)}function s(i){return e.attempt(xI,t,n)(i)}}function nye(e){e.exit("blockQuote")}const MI={name:"characterEscape",tokenize:oye};function oye(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 Hve(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const TI={name:"characterReference",tokenize:rye};function rye(e,t,n){const o=this;let r=0,s,i;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),a}function a(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,i=Wo,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,i=jve,c):(e.enter("characterReferenceValue"),s=7,i=Rb,c(d))}function c(d){if(d===59&&r){const f=e.exit("characterReferenceValue");return i===Wo&&!Q3(o.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return i(d)&&r++<s?(e.consume(d),c):n(d)}}const dS={tokenize:iye,partial:!0},fS={name:"codeFenced",tokenize:sye,concrete:!0};function sye(e,t,n){const o=this,r={tokenize:x,partial:!0};let s=0,i=0,l;return a;function a(E){return u(E)}function u(E){const T=o.events[o.events.length-1];return s=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,l=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(E)}function c(E){return E===l?(i++,e.consume(E),c):i<3?n(E):(e.exit("codeFencedFenceSequence"),Nt(E)?Vt(e,d,"whitespace")(E):d(E))}function d(E){return E===null||dt(E)?(e.exit("codeFencedFence"),o.interrupt?t(E):e.check(dS,m,S)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(E))}function f(E){return E===null||dt(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(E)):Nt(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Vt(e,p,"whitespace")(E)):E===96&&E===l?n(E):(e.consume(E),f)}function p(E){return E===null||dt(E)?d(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(E))}function h(E){return E===null||dt(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(E)):E===96&&E===l?n(E):(e.consume(E),h)}function m(E){return e.attempt(r,S,y)(E)}function y(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),v}function v(E){return s>0&&Nt(E)?Vt(e,w,"linePrefix",s+1)(E):w(E)}function w(E){return E===null||dt(E)?e.check(dS,m,S)(E):(e.enter("codeFlowValue"),_(E))}function _(E){return E===null||dt(E)?(e.exit("codeFlowValue"),w(E)):(e.consume(E),_)}function S(E){return e.exit("codeFenced"),t(E)}function x(E,T,O){let P=0;return N;function N(U){return E.enter("lineEnding"),E.consume(U),E.exit("lineEnding"),F}function F(U){return E.enter("codeFencedFence"),Nt(U)?Vt(E,B,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):B(U)}function B(U){return U===l?(E.enter("codeFencedFenceSequence"),Y(U)):O(U)}function Y(U){return U===l?(P++,E.consume(U),Y):P>=i?(E.exit("codeFencedFenceSequence"),Nt(U)?Vt(E,Z,"whitespace")(U):Z(U)):O(U)}function Z(U){return U===null||dt(U)?(E.exit("codeFencedFence"),T(U)):O(U)}}}function iye(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 vy={name:"codeIndented",tokenize:aye},lye={tokenize:uye,partial:!0};function aye(e,t,n){const o=this;return r;function r(u){return e.enter("codeIndented"),Vt(e,s,"linePrefix",4+1)(u)}function s(u){const c=o.events[o.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?i(u):n(u)}function i(u){return u===null?a(u):dt(u)?e.attempt(lye,i,a)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||dt(u)?(e.exit("codeFlowValue"),i(u)):(e.consume(u),l)}function a(u){return e.exit("codeIndented"),t(u)}}function uye(e,t,n){const o=this;return r;function r(i){return o.parser.lazy[o.now().line]?n(i):dt(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r):Vt(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):dt(i)?r(i):n(i)}}const cye={name:"codeText",tokenize:pye,resolve:dye,previous:fye};function dye(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 fye(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function pye(e,t,n){let o=0,r,s;return i;function i(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),o++,l):(e.exit("codeTextSequence"),a(d))}function a(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),a):d===96?(s=e.enter("codeTextSequence"),r=0,c(d)):dt(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||dt(d)?(e.exit("codeTextData"),a(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",u(d))}}class hye{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&&qd(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),qd(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),qd(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);qd(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);qd(this.left,n.reverse())}}}function qd(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 OI(e){const t={};let n=-1,o,r,s,i,l,a,u;const c=new hye(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(o=c.get(n),n&&o[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(a=o[1]._tokenizer.events,s=0,s<a.length&&a[s][1].type==="lineEndingBlank"&&(s+=2),s<a.length&&a[s][1].type==="content"))for(;++s<a.length&&a[s][1].type!=="content";)a[s][1].type==="chunkText"&&(a[s][1]._isInFirstContentOfListItem=!0,s++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,mye(c,n)),n=t[n],u=!0);else if(o[1]._container){for(s=n,r=void 0;s--&&(i=c.get(s),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank");)i[0]==="enter"&&(r&&(c.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=s);r&&(o[1].end=Object.assign({},c.get(r)[1].start),l=c.slice(r,n),l.unshift(o),c.splice(r,n-r+1,l))}}return Rr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function mye(e,t){const n=e.get(t)[1],o=e.get(t)[2];let r=t-1;const s=[],i=n._tokenizer||o.parser[n.contentType](n.start),l=i.events,a=[],u={};let c,d,f=-1,p=n,h=0,m=0;const y=[m];for(;p;){for(;e.get(++r)[1]!==p;);s.push(r),p._tokenizer||(c=o.sliceStream(p),p.next||c.push(null),d&&i.defineSkip(p.start),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(c),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<l.length;)l[f][0]==="exit"&&l[f-1][0]==="enter"&&l[f][1].type===l[f-1][1].type&&l[f][1].start.line!==l[f][1].end.line&&(m=f+1,y.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(i.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),f=y.length;f--;){const v=l.slice(y[f],y[f+1]),w=s.pop();a.push([w,w+v.length-1]),e.splice(w,2,v)}for(a.reverse(),f=-1;++f<a.length;)u[h+a[f][0]]=h+a[f][1],h+=a[f][1]-a[f][0]-1;return u}const gye={tokenize:_ye,resolve:yye},vye={tokenize:bye,partial:!0};function yye(e){return OI(e),e}function _ye(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):dt(l)?e.check(vye,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 bye(e,t,n){const o=this;return r;function r(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Vt(e,s,"linePrefix")}function s(i){if(i===null||dt(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 II(e,t,n,o,r,s,i,l,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return d;function d(v){return v===60?(e.enter(o),e.enter(r),e.enter(s),e.consume(v),e.exit(s),f):v===null||v===32||v===41||qg(v)?n(v):(e.enter(o),e.enter(i),e.enter(l),e.enter("chunkString",{contentType:"string"}),m(v))}function f(v){return v===62?(e.enter(s),e.consume(v),e.exit(s),e.exit(r),e.exit(o),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===62?(e.exit("chunkString"),e.exit(l),f(v)):v===null||v===60||dt(v)?n(v):(e.consume(v),v===92?h:p)}function h(v){return v===60||v===62||v===92?(e.consume(v),p):p(v)}function m(v){return!c&&(v===null||v===41||nn(v))?(e.exit("chunkString"),e.exit(l),e.exit(i),e.exit(o),t(v)):c<u&&v===40?(e.consume(v),c++,m):v===41?(e.consume(v),c--,m):v===null||v===32||v===40||qg(v)?n(v):(e.consume(v),v===92?y:m)}function y(v){return v===40||v===41||v===92?(e.consume(v),m):m(v)}}function AI(e,t,n,o,r,s){const i=this;let l=0,a;return u;function u(p){return e.enter(o),e.enter(r),e.consume(p),e.exit(r),e.enter(s),c}function c(p){return l>999||p===null||p===91||p===93&&!a||p===94&&!l&&"_hiddenFootnoteSupport"in i.parser.constructs?n(p):p===93?(e.exit(s),e.enter(r),e.consume(p),e.exit(r),e.exit(o),t):dt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||dt(p)||l++>999?(e.exit("chunkString"),c(p)):(e.consume(p),a||(a=!Nt(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),l++,d):d(p)}}function NI(e,t,n,o,r,s){let i;return l;function l(f){return f===34||f===39||f===40?(e.enter(o),e.enter(r),e.consume(f),e.exit(r),i=f===40?41:f,a):n(f)}function a(f){return f===i?(e.enter(r),e.consume(f),e.exit(r),e.exit(o),t):(e.enter(s),u(f))}function u(f){return f===i?(e.exit(s),a(i)):f===null?n(f):dt(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Vt(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===i||f===null||dt(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:c)}function d(f){return f===i||f===92?(e.consume(f),c):c(f)}}function Qf(e,t){let n;return o;function o(r){return dt(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n=!0,o):Nt(r)?Vt(e,o,n?"linePrefix":"lineSuffix")(r):t(r)}}const wye={name:"definition",tokenize:kye},Cye={tokenize:Sye,partial:!0};function kye(e,t,n){const o=this;let r;return s;function s(p){return e.enter("definition"),i(p)}function i(p){return AI.call(o,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return r=cs(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),a):n(p)}function a(p){return nn(p)?Qf(e,u)(p):u(p)}function u(p){return II(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(Cye,d,d)(p)}function d(p){return Nt(p)?Vt(e,f,"whitespace")(p):f(p)}function f(p){return p===null||dt(p)?(e.exit("definition"),o.parser.defined.push(r),t(p)):n(p)}}function Sye(e,t,n){return o;function o(l){return nn(l)?Qf(e,r)(l):n(l)}function r(l){return NI(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return Nt(l)?Vt(e,i,"whitespace")(l):i(l)}function i(l){return l===null||dt(l)?t(l):n(l)}}const $ye={name:"hardBreakEscape",tokenize:Eye};function Eye(e,t,n){return o;function o(s){return e.enter("hardBreakEscape"),e.consume(s),r}function r(s){return dt(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const xye={name:"headingAtx",tokenize:Tye,resolve:Mye};function Mye(e,t){let n=e.length-2,o=3,r,s;return e[o][1].type==="whitespace"&&(o+=2),n-2>o&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(o===n-1||n-4>o&&e[n-2][1].type==="whitespace")&&(n-=o+1===n?2:4),n>o&&(r={type:"atxHeadingText",start:e[o][1].start,end:e[n][1].end},s={type:"chunkText",start:e[o][1].start,end:e[n][1].end,contentType:"text"},Rr(e,o,n-o+1,[["enter",r,t],["enter",s,t],["exit",s,t],["exit",r,t]])),e}function Tye(e,t,n){let o=0;return r;function r(c){return e.enter("atxHeading"),s(c)}function s(c){return e.enter("atxHeadingSequence"),i(c)}function i(c){return c===35&&o++<6?(e.consume(c),i):c===null||nn(c)?(e.exit("atxHeadingSequence"),l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),a(c)):c===null||dt(c)?(e.exit("atxHeading"),t(c)):Nt(c)?Vt(e,l,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function a(c){return c===35?(e.consume(c),a):(e.exit("atxHeadingSequence"),l(c))}function u(c){return c===null||c===35||nn(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),u)}}const Oye=["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"],pS=["pre","script","style","textarea"],Iye={name:"htmlFlow",tokenize:Lye,resolveTo:Pye,concrete:!0},Aye={tokenize:Dye,partial:!0},Nye={tokenize:Rye,partial:!0};function Pye(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 Lye(e,t,n){const o=this;let r,s,i,l,a;return u;function u(z){return c(z)}function c(z){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(z),d}function d(z){return z===33?(e.consume(z),f):z===47?(e.consume(z),s=!0,m):z===63?(e.consume(z),r=3,o.interrupt?t:I):Eo(z)?(e.consume(z),i=String.fromCharCode(z),y):n(z)}function f(z){return z===45?(e.consume(z),r=2,p):z===91?(e.consume(z),r=5,l=0,h):Eo(z)?(e.consume(z),r=4,o.interrupt?t:I):n(z)}function p(z){return z===45?(e.consume(z),o.interrupt?t:I):n(z)}function h(z){const ge="CDATA[";return z===ge.charCodeAt(l++)?(e.consume(z),l===ge.length?o.interrupt?t:B:h):n(z)}function m(z){return Eo(z)?(e.consume(z),i=String.fromCharCode(z),y):n(z)}function y(z){if(z===null||z===47||z===62||nn(z)){const ge=z===47,Oe=i.toLowerCase();return!ge&&!s&&pS.includes(Oe)?(r=1,o.interrupt?t(z):B(z)):Oye.includes(i.toLowerCase())?(r=6,ge?(e.consume(z),v):o.interrupt?t(z):B(z)):(r=7,o.interrupt&&!o.parser.lazy[o.now().line]?n(z):s?w(z):_(z))}return z===45||Wo(z)?(e.consume(z),i+=String.fromCharCode(z),y):n(z)}function v(z){return z===62?(e.consume(z),o.interrupt?t:B):n(z)}function w(z){return Nt(z)?(e.consume(z),w):N(z)}function _(z){return z===47?(e.consume(z),N):z===58||z===95||Eo(z)?(e.consume(z),S):Nt(z)?(e.consume(z),_):N(z)}function S(z){return z===45||z===46||z===58||z===95||Wo(z)?(e.consume(z),S):x(z)}function x(z){return z===61?(e.consume(z),E):Nt(z)?(e.consume(z),x):_(z)}function E(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),a=z,T):Nt(z)?(e.consume(z),E):O(z)}function T(z){return z===a?(e.consume(z),a=null,P):z===null||dt(z)?n(z):(e.consume(z),T)}function O(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||nn(z)?x(z):(e.consume(z),O)}function P(z){return z===47||z===62||Nt(z)?_(z):n(z)}function N(z){return z===62?(e.consume(z),F):n(z)}function F(z){return z===null||dt(z)?B(z):Nt(z)?(e.consume(z),F):n(z)}function B(z){return z===45&&r===2?(e.consume(z),j):z===60&&r===1?(e.consume(z),V):z===62&&r===4?(e.consume(z),X):z===63&&r===3?(e.consume(z),I):z===93&&r===5?(e.consume(z),L):dt(z)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(Aye,oe,Y)(z)):z===null||dt(z)?(e.exit("htmlFlowData"),Y(z)):(e.consume(z),B)}function Y(z){return e.check(Nye,Z,oe)(z)}function Z(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),U}function U(z){return z===null||dt(z)?Y(z):(e.enter("htmlFlowData"),B(z))}function j(z){return z===45?(e.consume(z),I):B(z)}function V(z){return z===47?(e.consume(z),i="",H):B(z)}function H(z){if(z===62){const ge=i.toLowerCase();return pS.includes(ge)?(e.consume(z),X):B(z)}return Eo(z)&&i.length<8?(e.consume(z),i+=String.fromCharCode(z),H):B(z)}function L(z){return z===93?(e.consume(z),I):B(z)}function I(z){return z===62?(e.consume(z),X):z===45&&r===2?(e.consume(z),I):B(z)}function X(z){return z===null||dt(z)?(e.exit("htmlFlowData"),oe(z)):(e.consume(z),X)}function oe(z){return e.exit("htmlFlow"),t(z)}}function Rye(e,t,n){const o=this;return r;function r(i){return dt(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 Dye(e,t,n){return o;function o(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt($h,t,n)}}const Fye={name:"htmlText",tokenize:Vye};function Vye(e,t,n){const o=this;let r,s,i;return l;function l(I){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(I),a}function a(I){return I===33?(e.consume(I),u):I===47?(e.consume(I),x):I===63?(e.consume(I),_):Eo(I)?(e.consume(I),O):n(I)}function u(I){return I===45?(e.consume(I),c):I===91?(e.consume(I),s=0,h):Eo(I)?(e.consume(I),w):n(I)}function c(I){return I===45?(e.consume(I),p):n(I)}function d(I){return I===null?n(I):I===45?(e.consume(I),f):dt(I)?(i=d,V(I)):(e.consume(I),d)}function f(I){return I===45?(e.consume(I),p):d(I)}function p(I){return I===62?j(I):I===45?f(I):d(I)}function h(I){const X="CDATA[";return I===X.charCodeAt(s++)?(e.consume(I),s===X.length?m:h):n(I)}function m(I){return I===null?n(I):I===93?(e.consume(I),y):dt(I)?(i=m,V(I)):(e.consume(I),m)}function y(I){return I===93?(e.consume(I),v):m(I)}function v(I){return I===62?j(I):I===93?(e.consume(I),v):m(I)}function w(I){return I===null||I===62?j(I):dt(I)?(i=w,V(I)):(e.consume(I),w)}function _(I){return I===null?n(I):I===63?(e.consume(I),S):dt(I)?(i=_,V(I)):(e.consume(I),_)}function S(I){return I===62?j(I):_(I)}function x(I){return Eo(I)?(e.consume(I),E):n(I)}function E(I){return I===45||Wo(I)?(e.consume(I),E):T(I)}function T(I){return dt(I)?(i=T,V(I)):Nt(I)?(e.consume(I),T):j(I)}function O(I){return I===45||Wo(I)?(e.consume(I),O):I===47||I===62||nn(I)?P(I):n(I)}function P(I){return I===47?(e.consume(I),j):I===58||I===95||Eo(I)?(e.consume(I),N):dt(I)?(i=P,V(I)):Nt(I)?(e.consume(I),P):j(I)}function N(I){return I===45||I===46||I===58||I===95||Wo(I)?(e.consume(I),N):F(I)}function F(I){return I===61?(e.consume(I),B):dt(I)?(i=F,V(I)):Nt(I)?(e.consume(I),F):P(I)}function B(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),r=I,Y):dt(I)?(i=B,V(I)):Nt(I)?(e.consume(I),B):(e.consume(I),Z)}function Y(I){return I===r?(e.consume(I),r=void 0,U):I===null?n(I):dt(I)?(i=Y,V(I)):(e.consume(I),Y)}function Z(I){return I===null||I===34||I===39||I===60||I===61||I===96?n(I):I===47||I===62||nn(I)?P(I):(e.consume(I),Z)}function U(I){return I===47||I===62||nn(I)?P(I):n(I)}function j(I){return I===62?(e.consume(I),e.exit("htmlTextData"),e.exit("htmlText"),t):n(I)}function V(I){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),H}function H(I){return Nt(I)?Vt(e,L,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):L(I)}function L(I){return e.enter("htmlTextData"),i(I)}}const eC={name:"labelEnd",tokenize:Wye,resolveTo:Uye,resolveAll:Hye},Bye={tokenize:Kye},zye={tokenize:qye},jye={tokenize:Gye};function Hye(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 Uye(e,t){let n=e.length,o=0,r,s,i,l;for(;n--;)if(r=e[n][1],s){if(r.type==="link"||r.type==="labelLink"&&r._inactive)break;e[n][0]==="enter"&&r.type==="labelLink"&&(r._inactive=!0)}else if(i){if(e[n][0]==="enter"&&(r.type==="labelImage"||r.type==="labelLink")&&!r._balanced&&(s=n,r.type!=="labelLink")){o=2;break}}else r.type==="labelEnd"&&(i=n);const a={type:e[s][1].type==="labelLink"?"link":"image",start:Object.assign({},e[s][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[s][1].start),end:Object.assign({},e[i][1].end)},c={type:"labelText",start:Object.assign({},e[s+o+2][1].end),end:Object.assign({},e[i-2][1].start)};return l=[["enter",a,t],["enter",u,t]],l=xr(l,e.slice(s+1,s+o+3)),l=xr(l,[["enter",c,t]]),l=xr(l,tv(t.parser.constructs.insideSpan.null,e.slice(s+o+4,i-3),t)),l=xr(l,[["exit",c,t],e[i-2],e[i-1],["exit",u,t]]),l=xr(l,e.slice(i+1)),l=xr(l,[["exit",a,t]]),Rr(e,s,e.length,l),e}function Wye(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(cs(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(Bye,c,i?c:d)(f):f===91?e.attempt(zye,c,i?u:d)(f):i?c(f):d(f)}function u(f){return e.attempt(jye,c,d)(f)}function c(f){return t(f)}function d(f){return s._balanced=!0,n(f)}}function Kye(e,t,n){return o;function o(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),r}function r(d){return nn(d)?Qf(e,s)(d):s(d)}function s(d){return d===41?c(d):II(e,i,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function i(d){return nn(d)?Qf(e,a)(d):c(d)}function l(d){return n(d)}function a(d){return d===34||d===39||d===40?NI(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return nn(d)?Qf(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function qye(e,t,n){const o=this;return r;function r(l){return AI.call(o,e,s,i,"reference","referenceMarker","referenceString")(l)}function s(l){return o.parser.defined.includes(cs(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function i(l){return n(l)}}function Gye(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 Yye={name:"labelStartImage",tokenize:Zye,resolveAll:eC.resolveAll};function Zye(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 Jye={name:"labelStartLink",tokenize:Xye,resolveAll:eC.resolveAll};function Xye(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 yy={name:"lineEnding",tokenize:Qye};function Qye(e,t){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Vt(e,t,"linePrefix")}}const p1={name:"thematicBreak",tokenize:e_e};function e_e(e,t,n){let o=0,r;return s;function s(u){return e.enter("thematicBreak"),i(u)}function i(u){return r=u,l(u)}function l(u){return u===r?(e.enter("thematicBreakSequence"),a(u)):o>=3&&(u===null||dt(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===r?(e.consume(u),o++,a):(e.exit("thematicBreakSequence"),Nt(u)?Vt(e,l,"whitespace")(u):l(u))}}const Fo={name:"list",tokenize:o_e,continuation:{tokenize:r_e},exit:i_e},t_e={tokenize:l_e,partial:!0},n_e={tokenize:s_e,partial:!0};function o_e(e,t,n){const o=this,r=o.events[o.events.length-1];let s=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,i=0;return l;function l(p){const h=o.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!o.containerState.marker||p===o.containerState.marker:Rb(p)){if(o.containerState.type||(o.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(p1,n,u)(p):u(p);if(!o.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(p)}return n(p)}function a(p){return Rb(p)&&++i<10?(e.consume(p),a):(!o.interrupt||i<2)&&(o.containerState.marker?p===o.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||p,e.check($h,o.interrupt?n:c,e.attempt(t_e,f,d))}function c(p){return o.containerState.initialBlankLine=!0,s++,f(p)}function d(p){return Nt(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return o.containerState.size=s+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function r_e(e,t,n){const o=this;return o.containerState._closeFlow=void 0,e.check($h,r,s);function r(l){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Vt(e,t,"listItemIndent",o.containerState.size+1)(l)}function s(l){return o.containerState.furtherBlankLines||!Nt(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(n_e,t,i)(l))}function i(l){return o.containerState._closeFlow=!0,o.interrupt=void 0,Vt(e,e.attempt(Fo,t,n),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function s_e(e,t,n){const o=this;return Vt(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 i_e(e){e.exit(this.containerState.type)}function l_e(e,t,n){const o=this;return Vt(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!Nt(s)&&i&&i[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const hS={name:"setextUnderline",tokenize:u_e,resolveTo:a_e};function a_e(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 u_e(e,t,n){const o=this;let r;return s;function s(u){let c=o.events.length,d;for(;c--;)if(o.events[c][1].type!=="lineEnding"&&o.events[c][1].type!=="linePrefix"&&o.events[c][1].type!=="content"){d=o.events[c][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||d)?(e.enter("setextHeadingLine"),r=u,i(u)):n(u)}function i(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===r?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),Nt(u)?Vt(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||dt(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const c_e={tokenize:d_e};function d_e(e){const t=this,n=e.attempt($h,o,e.attempt(this.parser.constructs.flowInitial,r,Vt(e,e.attempt(this.parser.constructs.flow,r,e.attempt(gye,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 f_e={resolveAll:LI()},p_e=PI("string"),h_e=PI("text");function PI(e){return{tokenize:t,resolveAll:LI(e==="text"?m_e:void 0)};function t(n){const o=this,r=this.parser.constructs[e],s=n.attempt(r,i,l);return i;function i(c){return u(c)?s(c):l(c)}function l(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),a}function a(c){return u(c)?(n.exit("data"),s(c)):(n.consume(c),a)}function u(c){if(c===null)return!0;const d=r[c];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(o,o.previous))return!0}return!1}}}function LI(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 m_e(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const o=e[n-1][1],r=t.sliceStream(o);let s=r.length,i=-1,l=0,a;for(;s--;){const u=r[s];if(typeof u=="string"){for(i=u.length;u.charCodeAt(i-1)===32;)l++,i--;if(i)break;i=-1}else if(u===-2)a=!0,l++;else if(u!==-1){s++;break}}if(l){const u={type:n===e.length||a||l<2?"lineSuffix":"hardBreakTrailing",start:{line:o.end.line,column:o.end.column-l,offset:o.end.offset-l,_index:o.start._index+s,_bufferIndex:s?i:o.start._bufferIndex+i},end:Object.assign({},o.end)};o.end=Object.assign({},u.start),o.start.offset===o.end.offset?Object.assign(o,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}function g_e(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:w,enter:_,exit:S,attempt:T(x),check:T(E),interrupt:T(E,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:f,now:h,defineSkip:m,write:d};let c=t.tokenize.call(u,a);return t.resolveAll&&s.push(t),u;function d(F){return i=xr(i,F),y(),i[i.length-1]!==null?[]:(O(t,0),u.events=tv(s,u.events,u),u.events)}function f(F,B){return y_e(p(F),B)}function p(F){return v_e(i,F)}function h(){const{line:F,column:B,offset:Y,_index:Z,_bufferIndex:U}=o;return{line:F,column:B,offset:Y,_index:Z,_bufferIndex:U}}function m(F){r[F.line]=F.column,N()}function y(){let F;for(;o._index<i.length;){const B=i[o._index];if(typeof B=="string")for(F=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===F&&o._bufferIndex<B.length;)v(B.charCodeAt(o._bufferIndex));else v(B)}}function v(F){c=c(F)}function w(F){dt(F)?(o.line++,o.column=1,o.offset+=F===-3?2:1,N()):F!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===i[o._index].length&&(o._bufferIndex=-1,o._index++)),u.previous=F}function _(F,B){const Y=B||{};return Y.type=F,Y.start=h(),u.events.push(["enter",Y,u]),l.push(Y),Y}function S(F){const B=l.pop();return B.end=h(),u.events.push(["exit",B,u]),B}function x(F,B){O(F,B.from)}function E(F,B){B.restore()}function T(F,B){return Y;function Y(Z,U,j){let V,H,L,I;return Array.isArray(Z)?oe(Z):"tokenize"in Z?oe([Z]):X(Z);function X(xe){return ee;function ee(de){const ve=de!==null&&xe[de],le=de!==null&&xe.null,Ie=[...Array.isArray(ve)?ve:ve?[ve]:[],...Array.isArray(le)?le:le?[le]:[]];return oe(Ie)(de)}}function oe(xe){return V=xe,H=0,xe.length===0?j:z(xe[H])}function z(xe){return ee;function ee(de){return I=P(),L=xe,xe.partial||(u.currentConstruct=xe),xe.name&&u.parser.constructs.disable.null.includes(xe.name)?Oe():xe.tokenize.call(B?Object.assign(Object.create(u),B):u,a,ge,Oe)(de)}}function ge(xe){return F(L,I),U}function Oe(xe){return I.restore(),++H<V.length?z(V[H]):j}}}function O(F,B){F.resolveAll&&!s.includes(F)&&s.push(F),F.resolve&&Rr(u.events,B,u.events.length-B,F.resolve(u.events.slice(B),u)),F.resolveTo&&(u.events=F.resolveTo(u.events,u))}function P(){const F=h(),B=u.previous,Y=u.currentConstruct,Z=u.events.length,U=Array.from(l);return{restore:j,from:Z};function j(){o=F,u.previous=B,u.currentConstruct=Y,u.events.length=Z,l=U,N()}}function N(){o.line in r&&o.column<2&&(o.column=r[o.line],o.offset+=r[o.line]-1)}}function v_e(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 y_e(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 __e={42:Fo,43:Fo,45:Fo,48:Fo,49:Fo,50:Fo,51:Fo,52:Fo,53:Fo,54:Fo,55:Fo,56:Fo,57:Fo,62:xI},b_e={91:wye},w_e={[-2]:vy,[-1]:vy,32:vy},C_e={35:xye,42:p1,45:[hS,p1],60:Iye,61:hS,95:p1,96:fS,126:fS},k_e={38:TI,92:MI},S_e={[-5]:yy,[-4]:yy,[-3]:yy,33:Yye,38:TI,42:Db,60:[Jve,Fye],91:Jye,92:[$ye,MI],93:eC,95:Db,96:cye},$_e={null:[Db,f_e]},E_e={null:[42,95]},x_e={null:[]},M_e=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:E_e,contentInitial:b_e,disable:x_e,document:__e,flow:C_e,flowInitial:w_e,insideSpan:$_e,string:k_e,text:S_e},Symbol.toStringTag,{value:"Module"}));function T_e(e){const n=$I([M_e,...(e||{}).extensions||[]]),o={defined:[],lazy:{},constructs:n,content:r(Uve),document:r(Kve),flow:r(c_e),string:r(p_e),text:r(h_e)};return o;function r(s){return i;function i(l){return g_e(o,s,l)}}}function O_e(e){for(;!OI(e););return e}const mS=/[\0\t\n\r]/g;function I_e(){let e=1,t="",n=!0,o;return r;function r(s,i,l){const a=[];let u,c,d,f,p;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(i||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(mS.lastIndex=d,u=mS.exec(s),f=u&&u.index!==void 0?u.index:s.length,p=s.charCodeAt(f),!u){t=s.slice(d);break}if(p===10&&d===f&&o)a.push(-3),o=void 0;else switch(o&&(a.push(-5),o=void 0),d<f&&(a.push(s.slice(d,f)),e+=f-d),p){case 0:{a.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,a.push(-2);e++<c;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:o=!0,e=1}d=f+1}return l&&(o&&a.push(-5),t&&a.push(t),a.push(null)),a}}const A_e=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function RI(e){return e.replace(A_e,N_e)}function N_e(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),s=r===120||r===88;return EI(n.slice(s?2:1),s?16:10)}return Q3(n)||e}function ep(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?gS(e.position):"start"in e||"end"in e?gS(e):"line"in e||"column"in e?Fb(e):""}function Fb(e){return vS(e&&e.line)+":"+vS(e&&e.column)}function gS(e){return Fb(e&&e.start)+"-"+Fb(e&&e.end)}function vS(e){return e&&typeof e=="number"?e:1}const DI={}.hasOwnProperty;function P_e(e,t,n){return typeof t!="string"&&(n=t,t=void 0),L_e(n)(O_e(T_e(n).document().write(I_e()(e,t,!0))))}function L_e(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Le),autolinkProtocol:P,autolinkEmail:P,atxHeading:s(ue),blockQuote:s(le),characterEscape:P,characterReference:P,codeFenced:s(Ie),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:s(Ie,i),codeText:s(Ge,i),codeTextData:P,data:P,codeFlowValue:P,definition:s(G),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:s(J),hardBreakEscape:s(_e),hardBreakTrailing:s(_e),htmlFlow:s(ye,i),htmlFlowData:P,htmlText:s(ye,i),htmlTextData:P,image:s(Ae),label:i,link:s(Le),listItem:s(Pe),listItemValue:f,listOrdered:s(Ee,d),listUnordered:s(Ee),paragraph:s(me),reference:z,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:s(ue),strong:s(je),thematicBreak:s(ce)},exit:{atxHeading:a(),atxHeadingSequence:x,autolink:a(),autolinkEmail:ve,autolinkProtocol:de,blockQuote:a(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:Oe,characterReferenceMarkerNumeric:Oe,characterReferenceValue:xe,characterReference:ee,codeFenced:a(y),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:N,codeIndented:a(v),codeText:a(U),codeTextData:N,data:N,definition:a(),definitionDestinationString:S,definitionLabelString:w,definitionTitleString:_,emphasis:a(),hardBreakEscape:a(B),hardBreakTrailing:a(B),htmlFlow:a(Y),htmlFlowData:N,htmlText:a(Z),htmlTextData:N,image:a(V),label:L,labelText:H,lineEnding:F,link:a(j),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:ge,resourceDestinationString:I,resourceTitleString:X,resource:oe,setextHeading:a(O),setextHeadingLineSequence:T,setextHeadingText:E,strong:a(),thematicBreak:a()}};FI(t,(e||{}).mdastExtensions||[]);const n={};return o;function o(te){let pe={type:"root",children:[]};const Ve={stack:[pe],tokenStack:[],config:t,enter:l,exit:u,buffer:i,resume:c,data:n},Je=[];let $e=-1;for(;++$e<te.length;)if(te[$e][1].type==="listOrdered"||te[$e][1].type==="listUnordered")if(te[$e][0]==="enter")Je.push($e);else{const ie=Je.pop();$e=r(te,ie,$e)}for($e=-1;++$e<te.length;){const ie=t[te[$e][0]];DI.call(ie,te[$e][1].type)&&ie[te[$e][1].type].call(Object.assign({sliceSerialize:te[$e][2].sliceSerialize},Ve),te[$e][1])}if(Ve.tokenStack.length>0){const ie=Ve.tokenStack[Ve.tokenStack.length-1];(ie[1]||yS).call(Ve,void 0,ie[0])}for(pe.position={start:Ji(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:Ji(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e<t.transforms.length;)pe=t.transforms[$e](pe)||pe;return pe}function r(te,pe,Ve){let Je=pe-1,$e=-1,ie=!1,we,ae,Se,Fe;for(;++Je<=Ve;){const st=te[Je];switch(st[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{st[0]==="enter"?$e++:$e--,Fe=void 0;break}case"lineEndingBlank":{st[0]==="enter"&&(we&&!Fe&&!$e&&!Se&&(Se=Je),Fe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Fe=void 0}if(!$e&&st[0]==="enter"&&st[1].type==="listItemPrefix"||$e===-1&&st[0]==="exit"&&(st[1].type==="listUnordered"||st[1].type==="listOrdered")){if(we){let se=Je;for(ae=void 0;se--;){const De=te[se];if(De[1].type==="lineEnding"||De[1].type==="lineEndingBlank"){if(De[0]==="exit")continue;ae&&(te[ae][1].type="lineEndingBlank",ie=!0),De[1].type="lineEnding",ae=se}else if(!(De[1].type==="linePrefix"||De[1].type==="blockQuotePrefix"||De[1].type==="blockQuotePrefixWhitespace"||De[1].type==="blockQuoteMarker"||De[1].type==="listItemIndent"))break}Se&&(!ae||Se<ae)&&(we._spread=!0),we.end=Object.assign({},ae?te[ae][1].start:st[1].end),te.splice(ae||Je,0,["exit",we,st[2]]),Je++,Ve++}if(st[1].type==="listItemPrefix"){const se={type:"listItem",_spread:!1,start:Object.assign({},st[1].start),end:void 0};we=se,te.splice(Je,0,["enter",se,st[2]]),Je++,Ve++,Se=void 0,Fe=!0}}}return te[pe][1]._spread=ie,Ve}function s(te,pe){return Ve;function Ve(Je){l.call(this,te(Je),Je),pe&&pe.call(this,Je)}}function i(){this.stack.push({type:"fragment",children:[]})}function l(te,pe,Ve){this.stack[this.stack.length-1].children.push(te),this.stack.push(te),this.tokenStack.push([pe,Ve]),te.position={start:Ji(pe.start),end:void 0}}function a(te){return pe;function pe(Ve){te&&te.call(this,Ve),u.call(this,Ve)}}function u(te,pe){const Ve=this.stack.pop(),Je=this.tokenStack.pop();if(Je)Je[0].type!==te.type&&(pe?pe.call(this,te,Je[0]):(Je[1]||yS).call(this,te,Je[0]));else throw new Error("Cannot close `"+te.type+"` ("+ep({start:te.start,end:te.end})+"): it’s not open");Ve.position.end=Ji(te.end)}function c(){return X3(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(te){if(this.data.expectingFirstListItemValue){const pe=this.stack[this.stack.length-2];pe.start=Number.parseInt(this.sliceSerialize(te),10),this.data.expectingFirstListItemValue=void 0}}function p(){const te=this.resume(),pe=this.stack[this.stack.length-1];pe.lang=te}function h(){const te=this.resume(),pe=this.stack[this.stack.length-1];pe.meta=te}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const te=this.resume(),pe=this.stack[this.stack.length-1];pe.value=te.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const te=this.resume(),pe=this.stack[this.stack.length-1];pe.value=te.replace(/(\r?\n|\r)$/g,"")}function w(te){const pe=this.resume(),Ve=this.stack[this.stack.length-1];Ve.label=pe,Ve.identifier=cs(this.sliceSerialize(te)).toLowerCase()}function _(){const te=this.resume(),pe=this.stack[this.stack.length-1];pe.title=te}function S(){const te=this.resume(),pe=this.stack[this.stack.length-1];pe.url=te}function x(te){const pe=this.stack[this.stack.length-1];if(!pe.depth){const Ve=this.sliceSerialize(te).length;pe.depth=Ve}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function T(te){const pe=this.stack[this.stack.length-1];pe.depth=this.sliceSerialize(te).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function P(te){const Ve=this.stack[this.stack.length-1].children;let Je=Ve[Ve.length-1];(!Je||Je.type!=="text")&&(Je=Ze(),Je.position={start:Ji(te.start),end:void 0},Ve.push(Je)),this.stack.push(Je)}function N(te){const pe=this.stack.pop();pe.value+=this.sliceSerialize(te),pe.position.end=Ji(te.end)}function F(te){const pe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ve=pe.children[pe.children.length-1];Ve.position.end=Ji(te.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(pe.type)&&(P.call(this,te),N.call(this,te))}function B(){this.data.atHardBreak=!0}function Y(){const te=this.resume(),pe=this.stack[this.stack.length-1];pe.value=te}function Z(){const te=this.resume(),pe=this.stack[this.stack.length-1];pe.value=te}function U(){const te=this.resume(),pe=this.stack[this.stack.length-1];pe.value=te}function j(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=pe,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function V(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=pe,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function H(te){const pe=this.sliceSerialize(te),Ve=this.stack[this.stack.length-2];Ve.label=RI(pe),Ve.identifier=cs(pe).toLowerCase()}function L(){const te=this.stack[this.stack.length-1],pe=this.resume(),Ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ve.type==="link"){const Je=te.children;Ve.children=Je}else Ve.alt=pe}function I(){const te=this.resume(),pe=this.stack[this.stack.length-1];pe.url=te}function X(){const te=this.resume(),pe=this.stack[this.stack.length-1];pe.title=te}function oe(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function ge(te){const pe=this.resume(),Ve=this.stack[this.stack.length-1];Ve.label=pe,Ve.identifier=cs(this.sliceSerialize(te)).toLowerCase(),this.data.referenceType="full"}function Oe(te){this.data.characterReferenceType=te.type}function xe(te){const pe=this.sliceSerialize(te),Ve=this.data.characterReferenceType;let Je;Ve?(Je=EI(pe,Ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Je=Q3(pe);const $e=this.stack[this.stack.length-1];$e.value+=Je}function ee(te){const pe=this.stack.pop();pe.position.end=Ji(te.end)}function de(te){N.call(this,te);const pe=this.stack[this.stack.length-1];pe.url=this.sliceSerialize(te)}function ve(te){N.call(this,te);const pe=this.stack[this.stack.length-1];pe.url="mailto:"+this.sliceSerialize(te)}function le(){return{type:"blockquote",children:[]}}function Ie(){return{type:"code",lang:null,meta:null,value:""}}function Ge(){return{type:"inlineCode",value:""}}function G(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function J(){return{type:"emphasis",children:[]}}function ue(){return{type:"heading",depth:0,children:[]}}function _e(){return{type:"break"}}function ye(){return{type:"html",value:""}}function Ae(){return{type:"image",title:null,url:"",alt:null}}function Le(){return{type:"link",title:null,url:"",children:[]}}function Ee(te){return{type:"list",ordered:te.type==="listOrdered",start:null,spread:te._spread,children:[]}}function Pe(te){return{type:"listItem",spread:te._spread,checked:null,children:[]}}function me(){return{type:"paragraph",children:[]}}function je(){return{type:"strong",children:[]}}function Ze(){return{type:"text",value:""}}function ce(){return{type:"thematicBreak"}}}function Ji(e){return{line:e.line,column:e.column,offset:e.offset}}function FI(e,t){let n=-1;for(;++n<t.length;){const o=t[n];Array.isArray(o)?FI(e,o):R_e(e,o)}}function R_e(e,t){let n;for(n in t)if(DI.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 yS(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ep({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ep({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ep({start:t.start,end:t.end})+") is still open")}function Vb(e){const t=this;t.parser=n;function n(o){return P_e(o,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}const _S={}.hasOwnProperty;function D_e(e,t){const n=t||{};function o(r,...s){let i=o.invalid;const l=o.handlers;if(r&&_S.call(r,e)){const a=String(r[e]);i=_S.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 F_e={}.hasOwnProperty;function VI(e,t){let n=-1,o;if(t.extensions)for(;++n<t.extensions.length;)VI(e,t.extensions[n]);for(o in t)if(F_e.call(t,o))switch(o){case"extensions":break;case"unsafe":{bS(e[o],t[o]);break}case"join":{bS(e[o],t[o]);break}case"handlers":{V_e(e[o],t[o]);break}default:e.options[o]=t[o]}return e}function bS(e,t){t&&e.push(...t)}function V_e(e,t){t&&Object.assign(e,t)}function B_e(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()),z_e);return r(),i}function z_e(e,t,n){return">"+(n?"":" ")+e}function BI(e,t){return wS(e,t.inConstruct,!0)&&!wS(e,t.notInConstruct,!1)}function wS(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 CS(e,t,n,o){let r=-1;for(;++r<n.unsafe.length;)if(n.unsafe[r].character===`
82 -`&&BI(n.stack,n.unsafe[r]))return/[ \t]/.test(o.before)?"":" ";return`\\
83 -`}function j_e(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 Bb(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 H_e(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 U_e(e,t,n,o){const r=H_e(n),s=e.value||"",i=r==="`"?"GraveAccent":"Tilde";if(Bb(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(s,W_e);return d(),f}const l=n.createTracker(o),a=r.repeat(Math.max(j_e(s,r)+1,3)),u=n.enter("codeFenced");let c=l.move(a);if(e.lang){const d=n.enter(`codeFencedLang${i}`);c+=l.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${i}`);c+=l.move(" "),c+=l.move(n.safe(e.meta,{before:c,after:`
84 -`,encode:["`"],...l.current()})),d()}return c+=l.move(`
85 -`),s&&(c+=l.move(s+`
86 -`)),c+=l.move(a),u(),c}function W_e(e,t,n){return(n?"":" ")+e}function tC(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 K_e(e,t,n,o){const r=tC(n),s=r==='"'?"Quote":"Apostrophe",i=n.enter("definition");let l=n.enter("label");const a=n.createTracker(o);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":`
87 -`,...a.current()}))),l(),e.title&&(l=n.enter(`title${s}`),u+=a.move(" "+r),u+=a.move(n.safe(e.title,{before:u,after:r,...a.current()})),u+=a.move(r),l()),i(),u}function q_e(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}zI.peek=G_e;function zI(e,t,n,o){const r=q_e(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 G_e(e,t,n){return n.options.emphasis||"*"}const nv=function(e){if(e==null)return X_e;if(typeof e=="function")return ov(e);if(typeof e=="object")return Array.isArray(e)?Y_e(e):Z_e(e);if(typeof e=="string")return J_e(e);throw new Error("Expected function, string, or object as test")};function Y_e(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=nv(e[n]);return ov(o);function o(...r){let s=-1;for(;++s<t.length;)if(t[s].apply(this,r))return!0;return!1}}function Z_e(e){const t=e;return ov(n);function n(o){const r=o;let s;for(s in e)if(r[s]!==t[s])return!1;return!0}}function J_e(e){return ov(t);function t(n){return n&&n.type===e}}function ov(e){return t;function t(n,o,r){return!!(Q_e(n)&&e.call(this,n,typeof o=="number"?o:void 0,r||void 0))}}function X_e(){return!0}function Q_e(e){return e!==null&&typeof e=="object"&&"type"in e}const jI=[],ebe=!0,zb=!1,jb="skip";function HI(e,t,n,o){let r;typeof t=="function"&&typeof n!="function"?(o=n,n=t):r=t;const s=nv(r),i=o?-1:1;l(e,void 0,[])();function l(a,u,c){const d=a&&typeof a=="object"?a:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(a.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=jI,h,m,y;if((!t||s(a,u,c[c.length-1]||void 0))&&(p=tbe(n(a,c)),p[0]===zb))return p;if("children"in a&&a.children){const v=a;if(v.children&&p[0]!==jb)for(m=(o?v.children.length:-1)+i,y=c.concat(v);m>-1&&m<v.children.length;){const w=v.children[m];if(h=l(w,m,y)(),h[0]===zb)return h;m=typeof h[1]=="number"?h[1]:m+i}}return p}}}function tbe(e){return Array.isArray(e)?e:typeof e=="number"?[ebe,e]:e==null?jI:[e]}function Od(e,t,n,o){let r,s,i;typeof t=="function"&&typeof n!="function"?(s=void 0,i=t,r=n):(s=t,i=n,r=o),HI(e,s,l,r);function l(a,u){const c=u[u.length-1],d=c?c.children.indexOf(a):void 0;return i(a,d,c)}}function UI(e,t){let n=!1;return Od(e,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return n=!0,zb}),!!((!e.depth||e.depth<3)&&X3(e)&&(t.options.setext||n))}function nbe(e,t,n,o){const r=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(o);if(UI(e,n)){const c=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...s.current(),before:`
74 + m 0 ${A?"":"-"}${C}
75 + a ${C} ${C} 0 1 1 0 ${A?"-":""}${C*2}
76 + a ${C} ${C} 0 1 1 0 ${A?"":"-"}${C*2}
77 + `}),l=W(()=>2*Math.PI*r.value),c=W(()=>n.type==="dashboard"?.75:1),u=W(()=>`${-1*l.value*(1-c.value)/2}px`),d=W(()=>({strokeDasharray:`${l.value*c.value}px, ${l.value}px`,strokeDashoffset:u.value})),h=W(()=>({strokeDasharray:`${l.value*c.value*(n.percentage/100)}px, ${l.value}px`,strokeDashoffset:u.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),f=W(()=>{let C;return n.color?C=k(n.percentage):C=e[n.status]||e.default,C}),p=W(()=>n.status==="warning"?i8:n.type==="line"?n.status==="success"?J4:Zc:n.status==="success"?Z4:Ho),m=W(()=>n.type==="line"?12+n.strokeWidth*.4:n.width*.111111+2),b=W(()=>n.format(n.percentage));function w(C){const A=100/C.length;return C.map((S,M)=>Ke(S)?{color:S,percentage:(M+1)*A}:S).sort((S,M)=>S.percentage-M.percentage)}const k=C=>{var S;const{color:A}=n;if(et(A))return A(C);if(Ke(A))return A;{const M=w(A);for(const P of M)if(P.percentage>C)return P.color;return(S=M[M.length-1])==null?void 0:S.color}};return(C,A)=>(v(),$("div",{class:q([E(i).b(),E(i).m(t.type),E(i).is(t.status),{[E(i).m("without-text")]:!t.showText,[E(i).m("text-inside")]:t.textInside}]),role:"progressbar","aria-valuenow":t.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[t.type==="line"?(v(),$("div",{key:0,class:q(E(i).b("bar"))},[g("div",{class:q(E(i).be("bar","outer")),style:Xe({height:`${t.strokeWidth}px`})},[g("div",{class:q([E(i).be("bar","inner"),{[E(i).bem("bar","inner","indeterminate")]:t.indeterminate},{[E(i).bem("bar","inner","striped")]:t.striped},{[E(i).bem("bar","inner","striped-flow")]:t.stripedFlow}]),style:Xe(s.value)},[(t.showText||C.$slots.default)&&t.textInside?(v(),$("div",{key:0,class:q(E(i).be("bar","innerText"))},[le(C.$slots,"default",{percentage:t.percentage},()=>[g("span",null,x(b.value),1)])],2)):O("v-if",!0)],6)],6)],2)):(v(),$("div",{key:1,class:q(E(i).b("circle")),style:Xe({height:`${t.width}px`,width:`${t.width}px`})},[(v(),$("svg",Dve,[g("path",{class:q(E(i).be("circle","track")),d:a.value,stroke:`var(${E(i).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":t.strokeLinecap,"stroke-width":o.value,fill:"none",style:Xe(d.value)},null,14,Rve),g("path",{class:q(E(i).be("circle","path")),d:a.value,stroke:f.value,fill:"none",opacity:t.percentage?1:0,"stroke-linecap":t.strokeLinecap,"stroke-width":o.value,style:Xe(h.value)},null,14,Vve)]))],6)),(t.showText||C.$slots.default)&&!t.textInside?(v(),$("div",{key:2,class:q(E(i).e("text")),style:Xe({fontSize:`${m.value}px`})},[le(C.$slots,"default",{percentage:t.percentage},()=>[t.status?(v(),D(E(we),{key:1},{default:y(()=>[(v(),D(Ct(p.value)))]),_:1})):(v(),$("span",Fve,x(b.value),1))])],6)):O("v-if",!0)],10,Ove))}}),Bve=Nve;const c2=Gt(Bve),zve="horizontal",Hve=({atEndEdge:t,atStartEdge:e,layout:n},i)=>{let s,o=0;const r=l=>l<0&&e.value||l>0&&t.value;return{hasReachedEdge:r,onWheel:l=>{Jie(s);let{deltaX:c,deltaY:u}=l;l.shiftKey&&u!==0&&(c=u,u=0);const d=n.value===zve?c:u;r(d)||(o+=d,!L4()&&d!==0&&l.preventDefault(),s=Kg(()=>{i(o),o=0}))}}},Uve=Ge({animated:Boolean,count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:de([Number,Object])}}),jve=Ge({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}});var Wve=fe({name:"ElSkeletonItem",__name:"skeleton-item",props:jve,setup(t){const e=Be("skeleton");return(n,i)=>(v(),$("div",{class:q([E(e).e("item"),E(e).e(t.variant)])},[t.variant==="image"?(v(),D(E(Mle),{key:0})):O("v-if",!0)],2))}}),T0=Wve,Yve=fe({name:"ElSkeleton",__name:"skeleton",props:Uve,setup(t,{expose:e}){const n=t,i=Be("skeleton"),s=cre(Sn(n,"loading"),n.throttle);return e({uiLoading:s}),(o,r)=>E(s)?(v(),$("div",Yt({key:0,class:[E(i).b(),E(i).is("animated",t.animated)]},o.$attrs),[(v(!0),$(J,null,ye(t.count,a=>(v(),$(J,{key:a},[E(s)?le(o.$slots,"template",{key:a},()=>[_(T0,{class:q(E(i).is("first")),variant:"p"},null,8,["class"]),(v(!0),$(J,null,ye(t.rows,l=>(v(),D(T0,{key:l,class:q([E(i).e("paragraph"),E(i).is("last",l===t.rows&&t.rows>1)]),variant:"p"},null,8,["class"]))),128))]):O("v-if",!0)],64))),128))],16)):le(o.$slots,"default",ef(Yt({key:1},o.$attrs)))}}),qve=Yve;const Vt=Gt(qve,{SkeletonItem:T0});Os(T0);const mF=t=>["",...$l].includes(t),Gve=Ge({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:void 0},loading:Boolean,size:{type:String,validator:mF},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:ds},activeActionIcon:{type:ds},activeIcon:{type:ds},inactiveIcon:{type:ds},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:de(Function)},id:String,tabindex:{type:[String,Number]},...Sr(["ariaLabel"])}),Xve={[Mt]:t=>Jn(t)||Ke(t)||wt(t),[dn]:t=>Jn(t)||Ke(t)||wt(t),[Vo]:t=>Jn(t)||Ke(t)||wt(t)},Kve=["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex"],Zve=["aria-hidden"],Jve={key:1},Qve={key:1},e_e=["aria-hidden"],jw="ElSwitch";var t_e=fe({name:jw,__name:"switch",props:Gve,emits:Xve,setup(t,{expose:e,emit:n}){const i=t,s=n,{formItem:o}=_o(),r=Ii(),a=Be("switch"),{inputId:l}=Tl(i,{formItemContext:o}),c=bs(W(()=>{if(i.loading)return!0})),u=ee(i.modelValue!==!1),d=Fn(),h=W(()=>[a.b(),a.m(r.value),a.is("disabled",c.value),a.is("checked",w.value)]),f=W(()=>[a.e("label"),a.em("label","left"),a.is("active",!w.value)]),p=W(()=>[a.e("label"),a.em("label","right"),a.is("active",w.value)]),m=W(()=>({width:pi(i.width)}));Te(()=>i.modelValue,()=>{u.value=!0});const b=W(()=>u.value?i.modelValue:!1),w=W(()=>b.value===i.activeValue);[i.activeValue,i.inactiveValue].includes(b.value)||(s(Mt,i.inactiveValue),s(dn,i.inactiveValue),s(Vo,i.inactiveValue)),Te(w,S=>{var M;d.value.checked=S,i.validateEvent&&((M=o==null?void 0:o.validate)==null||M.call(o,"change").catch(P=>Tt(P)))});const k=()=>{const S=w.value?i.inactiveValue:i.activeValue;s(Mt,S),s(dn,S),s(Vo,S),ot(()=>{d.value.checked=w.value})},C=()=>{if(c.value)return;const{beforeChange:S}=i;if(!S){k();return}const M=S();[hd(M),Jn(M)].includes(!0)||vo(jw,"beforeChange must return type `Promise<boolean>` or `boolean`"),hd(M)?M.then(P=>{P&&k()}).catch(P=>{Tt(jw,`some error occurred: ${P}`)}):M&&k()},A=()=>{var S,M;(M=(S=d.value)==null?void 0:S.focus)==null||M.call(S)};return Nt(()=>{d.value.checked=w.value}),e({focus:A,checked:w}),(S,M)=>(v(),$("div",{class:q(h.value),onClick:Me(C,["prevent"])},[g("input",{id:E(l),ref_key:"input",ref:d,class:q(E(a).e("input")),type:"checkbox",role:"switch","aria-checked":w.value,"aria-disabled":E(c),"aria-label":t.ariaLabel,name:t.name,"true-value":t.activeValue,"false-value":t.inactiveValue,disabled:E(c),tabindex:t.tabindex,onChange:k,onKeydown:ut(C,["enter"])},null,42,Kve),!t.inlinePrompt&&(t.inactiveIcon||t.inactiveText||S.$slots.inactive)?(v(),$("span",{key:0,class:q(f.value)},[le(S.$slots,"inactive",{},()=>[t.inactiveIcon?(v(),D(E(we),{key:0},{default:y(()=>[(v(),D(Ct(t.inactiveIcon)))]),_:1})):O("v-if",!0),!t.inactiveIcon&&t.inactiveText?(v(),$("span",{key:1,"aria-hidden":w.value},x(t.inactiveText),9,Zve)):O("v-if",!0)])],2)):O("v-if",!0),g("span",{class:q(E(a).e("core")),style:Xe(m.value)},[t.inlinePrompt?(v(),$("div",{key:0,class:q(E(a).e("inner"))},[w.value?(v(),$("div",{key:1,class:q(E(a).e("inner-wrapper"))},[le(S.$slots,"active",{},()=>[t.activeIcon?(v(),D(E(we),{key:0},{default:y(()=>[(v(),D(Ct(t.activeIcon)))]),_:1})):O("v-if",!0),!t.activeIcon&&t.activeText?(v(),$("span",Qve,x(t.activeText),1)):O("v-if",!0)])],2)):(v(),$("div",{key:0,class:q(E(a).e("inner-wrapper"))},[le(S.$slots,"inactive",{},()=>[t.inactiveIcon?(v(),D(E(we),{key:0},{default:y(()=>[(v(),D(Ct(t.inactiveIcon)))]),_:1})):O("v-if",!0),!t.inactiveIcon&&t.inactiveText?(v(),$("span",Jve,x(t.inactiveText),1)):O("v-if",!0)])],2))],2)):O("v-if",!0),g("div",{class:q(E(a).e("action"))},[t.loading?(v(),D(E(we),{key:0,class:q(E(a).is("loading"))},{default:y(()=>[_(E(Uf))]),_:1},8,["class"])):w.value?le(S.$slots,"active-action",{key:1},()=>[t.activeActionIcon?(v(),D(E(we),{key:0},{default:y(()=>[(v(),D(Ct(t.activeActionIcon)))]),_:1})):O("v-if",!0)]):w.value?O("v-if",!0):le(S.$slots,"inactive-action",{key:2},()=>[t.inactiveActionIcon?(v(),D(E(we),{key:0},{default:y(()=>[(v(),D(Ct(t.inactiveActionIcon)))]),_:1})):O("v-if",!0)])],2)],6),!t.inlinePrompt&&(t.activeIcon||t.activeText||S.$slots.active)?(v(),$("span",{key:1,class:q(p.value)},[le(S.$slots,"active",{},()=>[t.activeIcon?(v(),D(E(we),{key:0},{default:y(()=>[(v(),D(Ct(t.activeIcon)))]),_:1})):O("v-if",!0),!t.activeIcon&&t.activeText?(v(),$("span",{key:1,"aria-hidden":!w.value},x(t.activeText),9,e_e)):O("v-if",!0)])],2)):O("v-if",!0)],2))}}),n_e=t_e;const tu=Gt(n_e),Ww=function(t){var e;return(e=t.target)==null?void 0:e.closest("td")},s_e=function(t,e,n,i,s){if(!e&&!i&&(!s||Ee(s)&&!s.length))return t;Ke(n)?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const o=i?null:function(a,l){return s?fD(js(s),c=>Ke(c)?ji(a,c):c(a,l,t)):(e!=="$key"&&yt(a)&&"$value"in a&&(a=a.$value),[yt(a)?e?ji(a,e):null:a])},r=function(a,l){var c,u,d,h,f;if(i)return i(a.value,l.value);for(let p=0,m=((c=a.key)==null?void 0:c.length)??0;p<m;p++){if(((u=a.key)==null?void 0:u[p])<((d=l.key)==null?void 0:d[p]))return-1;if(((h=a.key)==null?void 0:h[p])>((f=l.key)==null?void 0:f[p]))return 1}return 0};return t.map((a,l)=>({value:a,index:l,key:o?o(a,l):null})).sort((a,l)=>{let c=r(a,l);return c||(c=a.index-l.index),c*+n}).map(a=>a.value)},gF=function(t,e){let n=null;return t.columns.forEach(i=>{i.id===e&&(n=i)}),n},i_e=function(t,e){let n=null;for(let i=0;i<t.columns.length;i++){const s=t.columns[i];if(s.columnKey===e){n=s;break}}return n||vo("ElTable",`No column matching with column-key: ${e}`),n},PA=function(t,e,n){const i=(e.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return i?gF(t,i[0]):null},ci=(t,e)=>{if(!t)throw new Error("Row is required when get row identity");if(Ke(e)){if(!e.includes("."))return`${t[e]}`;const n=e.split(".");let i=t;for(const s of n)i=i[s];return`${i}`}else if(et(e))return e.call(null,t);return""},lf=function(t,e,n=!1,i="children"){const s=t||[],o={};return s.forEach((r,a)=>{if(o[ci(r,e)]={row:r,index:a},n){const l=r[i];Ee(l)&&Object.assign(o,lf(l,e,!0,i))}}),o};function o_e(t,e){const n={};let i;for(i in t)n[i]=t[i];for(i in e)if(zt(e,i)){const s=e[i];sn(s)||(n[i]=s)}return n}function T8(t){return t===""||sn(t)||(t=Number.parseInt(t,10),Number.isNaN(t)&&(t="")),t}function vF(t){return t===""||sn(t)||(t=T8(t),Number.isNaN(t)&&(t=80)),t}function r_e(t){return wt(t)?t:Ke(t)?/^\d+(?:px)?$/.test(t)?Number.parseInt(t,10):t:null}function a_e(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...i)=>e(n(...i)))}function P0(t,e,n,i,s,o,r){let a=o??0,l=!1;const u=(()=>{if(!r)return t.indexOf(e);const m=ci(e,r);return t.findIndex(b=>ci(b,r)===m)})(),d=u!==-1,h=s==null?void 0:s.call(null,e,a),f=m=>{m==="add"?t.push(e):t.splice(u,1),l=!0},p=m=>{let b=0;const w=(i==null?void 0:i.children)&&m[i.children];return w&&Ee(w)&&(b+=w.length,w.forEach(k=>{b+=p(k)})),b};return(!s||h)&&(Jn(n)?n&&!d?f("add"):!n&&d&&f("remove"):f(d?"remove":"add")),!(i!=null&&i.checkStrictly)&&(i!=null&&i.children)&&Ee(e[i.children])&&e[i.children].forEach(m=>{const b=P0(t,m,n??!d,i,s,a+1,r);a+=p(m)+1,b&&(l=b)}),l}function l_e(t,e,n="children",i="hasChildren",s=!1){const o=a=>!(Ee(a)&&a.length);function r(a,l,c){e(a,l,c),l.forEach(u=>{if(u[i]&&s){e(u,null,c+1);return}const d=u[n];o(d)||r(u,d,c+1)})}t.forEach(a=>{if(a[i]&&s){e(a,null,0);return}const l=a[n];o(l)||r(a,l,0)})}const c_e=(t,e,n,i)=>{const s={strategy:"fixed",...t.popperOptions},o=et(i==null?void 0:i.tooltipFormatter)?i.tooltipFormatter({row:n,column:i,cellValue:Ac(n,i.property).value}):void 0;return is(o)?{slotContent:o,content:null,...t,popperOptions:s}:{slotContent:null,content:o??e,...t,popperOptions:s}};let Rn=null;function u_e(t,e,n,i,s,o){var f;const r=c_e(t,e,n,i),a={...r,slotContent:void 0};if((Rn==null?void 0:Rn.trigger)===s){const p=(f=Rn.vm)==null?void 0:f.component;pD(p==null?void 0:p.props,a),p&&r.slotContent&&(p.slots.content=()=>[r.slotContent]);return}Rn==null||Rn();const l=o==null?void 0:o.refs.tableWrapper,c=l==null?void 0:l.dataset.prefix,u=_(Ss,{virtualTriggering:!0,virtualRef:s,appendTo:l,placement:"top",transition:"none",offset:0,hideAfter:0,...a},r.slotContent?{content:()=>r.slotContent}:void 0);u.appContext={...o.appContext,...o};const d=document.createElement("div");Fc(u,d),u.component.exposed.onOpen();const h=l==null?void 0:l.querySelector(`.${c}-scrollbar__wrap`);Rn=()=>{var m,b;(b=(m=u.component)==null?void 0:m.exposed)!=null&&b.onClose&&u.component.exposed.onClose(),Fc(null,d);const p=Rn;h==null||h.removeEventListener("scroll",p),p.trigger=void 0,p.vm=void 0,Rn=null},Rn.trigger=s??void 0,Rn.vm=u,h==null||h.addEventListener("scroll",Rn)}function _F(t){return t.children?fD(t.children,_F):[t]}function IA(t,e){return t+e.colSpan}const yF=(t,e,n,i)=>{let s=0,o=t;const r=n.states.columns.value;if(i){const l=_F(i[t]);s=r.slice(0,r.indexOf(l[0])).reduce(IA,0),o=s+l.reduce(IA,0)-1}else s=t;let a;switch(e){case"left":o<n.states.fixedLeafColumnsLength.value&&(a="left");break;case"right":s>=r.length-n.states.rightFixedLeafColumnsLength.value&&(a="right");break;default:o<n.states.fixedLeafColumnsLength.value?a="left":s>=r.length-n.states.rightFixedLeafColumnsLength.value&&(a="right")}return a?{direction:a,start:s,after:o}:{}},P8=(t,e,n,i,s,o=0)=>{const r=[],{direction:a,start:l,after:c}=yF(e,n,i,s);if(a){const u=a==="left";r.push(`${t}-fixed-column--${a}`),u&&c+o===i.states.fixedLeafColumnsLength.value-1?r.push("is-last-column"):!u&&l-o===i.states.columns.value.length-i.states.rightFixedLeafColumnsLength.value&&r.push("is-first-column")}return r};function LA(t,e){return t+(Wb(e.realWidth)||Number.isNaN(e.realWidth)?Number(e.width):e.realWidth)}const I8=(t,e,n,i)=>{const{direction:s,start:o=0,after:r=0}=yF(t,e,n,i);if(!s)return;const a={},l=s==="left",c=n.states.columns.value;return l?a.left=c.slice(0,o).reduce(LA,0):a.right=c.slice(r+1).reverse().reduce(LA,0),a},qf=(t,e)=>{t&&(Number.isNaN(t[e])||(t[e]=`${t[e]}px`))};function bF(t){return t.some(e=>is(e)?!(e.type===Zn||e.type===J&&!bF(e.children)):!0)?t:null}function d_e(t){const e=pt(),n=ee(!1),i=ee([]),s=(c,u)=>{const d=e.store.states.rowExpandable.value;return(d==null?void 0:d(c,u))??!0};return{updateExpandRows:()=>{const c=t.data.value||[],u=t.rowKey.value;if(n.value)i.value=e.store.states.rowExpandable.value?c.filter(s):c.slice();else if(u){const d=lf(i.value,u);i.value=c.filter((h,f)=>!!d[ci(h,u)]&&s(h,f))}else i.value=[]},toggleRowExpansion:(c,u)=>{const d=(t.data.value||[]).indexOf(c);d>-1&&!s(c,d)||P0(i.value,c,u,void 0,void 0,void 0,t.rowKey.value)&&e.emit("expand-change",c,i.value.slice())},setExpandRowKeys:c=>{e.store.assertRowKey();const u=t.data.value||[],d=t.rowKey.value,h=lf(u,d);i.value=c.reduce((f,p)=>{const m=h[p];return m&&s(m.row,m.index)&&f.push(m.row),f},[])},isRowExpanded:c=>{const u=t.rowKey.value;return u?!!lf(i.value,u)[ci(c,u)]:i.value.includes(c)},states:{expandRows:i,defaultExpandAll:n}}}function h_e(t){const e=pt(),n=ee(null),i=ee(null),s=c=>{e.store.assertRowKey(),n.value=c,r(c)},o=()=>{n.value=null},r=c=>{const{data:u,rowKey:d}=t,h=i.value;let f=null;d.value&&(f=(E(u)||[]).find(p=>ci(p,d.value)===c)??null),i.value=f??null,e.emit("current-change",i.value,h)};return{setCurrentRowKey:s,restoreCurrentRowKey:o,setCurrentRowByKey:r,updateCurrentRow:c=>{const u=i.value;if(c&&c!==u){i.value=c,e.emit("current-change",i.value,u);return}!c&&u&&(i.value=null,e.emit("current-change",null,u))},updateCurrentRowData:()=>{const c=t.rowKey.value,u=t.data.value||[],d=i.value;d&&!u.includes(d)?c?r(ci(d,c)):(i.value=null,e.emit("current-change",null,d)):n.value&&(r(n.value),o())},states:{_currentRowKey:n,currentRow:i}}}function f_e(t){const e=ee([]),n=ee({}),i=ee(16),s=ee(!1),o=ee({}),r=ee("hasChildren"),a=ee("children"),l=ee(!1),c=pt(),u=W(()=>t.rowKey.value?h(t.data.value||[]):{}),d=W(()=>{const A=t.rowKey.value,S=Object.keys(o.value),M={};return S.length&&S.forEach(P=>{if(o.value[P].length){const T={children:[]};o.value[P].forEach(I=>{const L=ci(I,A);T.children.push(L),I[r.value]&&!M[L]&&(M[L]={children:[]})}),M[P]=T}}),M}),h=A=>{const S=t.rowKey.value,M={};return l_e(A,(P,T,I)=>{const L=ci(P,S);Ee(T)?M[L]={children:T.map(R=>ci(R,S)),level:I}:s.value&&(M[L]={children:[],lazy:!0,level:I})},a.value,r.value,s.value),M},f=(A=!1,S)=>{var L,R;S||(S=(L=c.store)==null?void 0:L.states.defaultExpandAll.value);const M=u.value,P=d.value,T=Object.keys(M),I={};if(T.length){const V=E(n),H=[],F=(Y,z)=>{if(A)return e.value?S||e.value.includes(z):!!(S||Y!=null&&Y.expanded);{const X=S||e.value&&e.value.includes(z);return!!(Y!=null&&Y.expanded||X)}};T.forEach(Y=>{const z=V[Y],X={...M[Y]};if(X.expanded=F(z,Y),X.lazy){const{loaded:Z=!1,loading:G=!1}=z||{};X.loaded=!!Z,X.loading=!!G,H.push(Y)}I[Y]=X});const U=Object.keys(P);s.value&&U.length&&H.length&&U.forEach(Y=>{var Z;const z=V[Y],X=P[Y].children;if(H.includes(Y)){if(((Z=I[Y].children)==null?void 0:Z.length)!==0)throw new Error("[ElTable]children must be an empty array.");I[Y].children=X}else{const{loaded:G=!1,loading:Q=!1}=z||{};I[Y]={lazy:!0,loaded:!!G,loading:!!Q,expanded:F(z,Y),children:X,level:void 0}}})}n.value=I,(R=c.store)==null||R.updateTableScrollY()};Te(()=>e.value,()=>{f(!0)},{deep:!0}),Te(()=>u.value,()=>{f()}),Te(()=>d.value,()=>{f()});const p=A=>{e.value=A,f()},m=A=>s.value&&A&&"loaded"in A&&!A.loaded,b=(A,S)=>{c.store.assertRowKey();const M=t.rowKey.value,P=ci(A,M),T=P&&n.value[P];if(P&&T&&"expanded"in T){const I=T.expanded;S=sn(S)?!T.expanded:S,n.value[P].expanded=S,I!==S&&c.emit("expand-change",A,S),S&&m(T)&&k(A,P,T),c.store.updateTableScrollY()}},w=A=>{c.store.assertRowKey();const S=t.rowKey.value,M=ci(A,S),P=n.value[M];m(P)?k(A,M,P):b(A,void 0)},k=(A,S,M)=>{const{load:P}=c.props;P&&!n.value[S].loaded&&(n.value[S].loading=!0,P(A,M,T=>{if(!Ee(T))throw new TypeError("[ElTable] data must be an array");n.value[S].loading=!1,n.value[S].loaded=!0,n.value[S].expanded=!0,T.length&&(o.value[S]=T),c.emit("expand-change",A,!0)}))};return{loadData:k,loadOrToggle:w,toggleTreeExpansion:b,updateTreeExpandKeys:p,updateTreeData:f,updateKeyChildren:(A,S)=>{const{lazy:M,rowKey:P}=c.props;if(M){if(!P)throw new Error("[Table] rowKey is required in updateKeyChild");o.value[A]&&(o.value[A]=S)}},normalize:h,states:{expandRowKeys:e,treeData:n,indent:i,lazy:s,lazyTreeNodeMap:o,lazyColumnIdentifier:r,childrenColumnName:a,checkStrictly:l}}}const p_e=(t,e)=>{const n=e.sortingColumn;return!n||Ke(n.sortable)?t:s_e(t,e.sortProp,e.sortOrder,n.sortMethod,n.sortBy)},j_=t=>{const e=[];return t.forEach(n=>{n.children&&n.children.length>0?e.push.apply(e,j_(n.children)):e.push(n)}),e};function m_e(){var Lt;const t=pt(),{size:e}=go((Lt=t.proxy)==null?void 0:Lt.$props),n=ee(null),i=ee([]),s=ee([]),o=ee(!1),r=ee([]),a=ee([]),l=ee([]),c=ee([]),u=ee([]),d=ee([]),h=ee([]),f=ee([]),p=[],m=ee(0),b=ee(0),w=ee(0),k=ee(!1),C=ee([]),A=ee(!1),S=ee(!1),M=ee(null),P=ee(null),T=ee({}),I=ee(null),L=ee(null),R=ee(null),V=ee(null),H=ee(null),F=W(()=>n.value?lf(C.value,n.value):void 0);Te(i,()=>{var Je;t.state&&(X(!1),t.props.tableLayout==="auto"&&((Je=t.refs.tableHeaderRef)==null||Je.updateFixedColumnStyle()))},{deep:!0});const U=()=>{if(!n.value)throw new Error("[ElTable] prop row-key is required")},Y=Je=>{var dt;(dt=Je.children)==null||dt.forEach(mt=>{mt.fixed=Je.fixed,Y(mt)})},z=()=>{r.value.forEach(De=>{Y(De)}),c.value=r.value.filter(De=>[!0,"left"].includes(De.fixed));const Je=r.value.find(De=>De.type==="selection");let dt;Je&&Je.fixed!=="right"&&!c.value.includes(Je)&&r.value.indexOf(Je)===0&&c.value.length&&(c.value.unshift(Je),dt=!0),u.value=r.value.filter(De=>De.fixed==="right");const mt=r.value.filter(De=>(dt?De.type!=="selection":!0)&&!De.fixed);a.value=Array.from(c.value).concat(mt).concat(u.value);const _e=j_(mt),Oe=j_(c.value),ue=j_(u.value);m.value=_e.length,b.value=Oe.length,w.value=ue.length,l.value=Array.from(Oe).concat(_e).concat(ue),o.value=c.value.length>0||u.value.length>0},X=(Je,dt=!1)=>{Je&&z(),dt?t.state.doLayout():t.state.debouncedUpdateLayout()},Z=Je=>F.value?!!F.value[ci(Je,n.value)]:C.value.includes(Je),G=()=>{k.value=!1;const Je=C.value;C.value=[],Je.length&&t.emit("selection-change",[])},Q=()=>{var dt,mt;let Je;if(n.value){Je=[];const _e=(mt=(dt=t==null?void 0:t.store)==null?void 0:dt.states)==null?void 0:mt.childrenColumnName.value,Oe=lf(i.value,n.value,!0,_e);for(const ue in F.value)zt(F.value,ue)&&!Oe[ue]&&Je.push(F.value[ue].row)}else Je=C.value.filter(_e=>!i.value.includes(_e));if(Je.length){const _e=C.value.filter(Oe=>!Je.includes(Oe));C.value=_e,t.emit("selection-change",_e.slice())}},ne=()=>(C.value||[]).slice(),K=(Je,dt,mt=!0,_e=!1)=>{var ue,De,gt,bn;const Oe={children:(De=(ue=t==null?void 0:t.store)==null?void 0:ue.states)==null?void 0:De.childrenColumnName.value,checkStrictly:(bn=(gt=t==null?void 0:t.store)==null?void 0:gt.states)==null?void 0:bn.checkStrictly.value};if(P0(C.value,Je,dt,Oe,_e?void 0:M.value,i.value.indexOf(Je),n.value)){const gs=(C.value||[]).slice();mt&&t.emit("select",gs,Je),t.emit("selection-change",gs)}},ae=()=>{var De,gt;const Je=S.value?!k.value:!(k.value||C.value.length);k.value=Je;let dt=!1,mt=0;const _e=(gt=(De=t==null?void 0:t.store)==null?void 0:De.states)==null?void 0:gt.rowKey.value,{childrenColumnName:Oe}=t.store.states,ue={children:Oe.value,checkStrictly:!1};i.value.forEach((bn,gs)=>{const hu=gs+mt;P0(C.value,bn,Je,ue,M.value,hu,_e)&&(dt=!0),mt+=Ce(ci(bn,_e))}),dt&&t.emit("selection-change",C.value?C.value.slice():[]),t.emit("select-all",(C.value||[]).slice())},ge=()=>{var ue;if(((ue=i.value)==null?void 0:ue.length)===0){k.value=!1;return}const{childrenColumnName:Je}=t.store.states;let dt=0,mt=0;const _e=De=>{var gt;for(const bn of De){const gs=M.value&&M.value.call(null,bn,dt);if(Z(bn))mt++;else if(!M.value||gs)return!1;if(dt++,(gt=bn[Je.value])!=null&&gt.length&&!_e(bn[Je.value]))return!1}return!0},Oe=_e(i.value||[]);k.value=mt===0?!1:Oe},Ce=Je=>{var Oe;if(!t||!t.store)return 0;const{treeData:dt}=t.store.states;let mt=0;const _e=(Oe=dt.value[Je])==null?void 0:Oe.children;return _e&&(mt+=_e.length,_e.forEach(ue=>{mt+=Ce(ue)})),mt},oe=(Je,dt)=>{const mt={};return js(Je).forEach(_e=>{T.value[_e.id]=dt,mt[_e.columnKey||_e.id]=dt}),mt},pe=(Je,dt,mt)=>{L.value&&L.value!==Je&&(L.value.order=null),L.value=Je,R.value=dt,V.value=mt},ie=()=>{let Je=E(s);Object.keys(T.value).forEach(dt=>{const mt=T.value[dt];if(!mt||mt.length===0)return;const _e=gF({columns:l.value},dt);_e&&_e.filterMethod&&(Je=Je.filter(Oe=>mt.some(ue=>_e.filterMethod.call(null,ue,Oe,_e))))}),I.value=Je},re=()=>{i.value=p_e(I.value??[],{sortingColumn:L.value,sortProp:R.value,sortOrder:V.value})},ke=(Je=void 0)=>{Je!=null&&Je.filter||ie(),re()},je=Je=>{const{tableHeaderRef:dt}=t.refs;if(!dt)return;const mt=Object.assign({},dt.filterPanels),_e=Object.keys(mt);if(_e.length)if(Ke(Je)&&(Je=[Je]),Ee(Je)){const Oe=Je.map(ue=>i_e({columns:l.value},ue));_e.forEach(ue=>{const De=Oe.find(gt=>gt.id===ue);De&&(De.filteredValue=[])}),t.store.commit("filterChange",{column:Oe,values:[],silent:!0,multi:!0})}else _e.forEach(Oe=>{const ue=l.value.find(De=>De.id===Oe);ue&&(ue.filteredValue=[])}),T.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},te=()=>{L.value&&(pe(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:se,toggleRowExpansion:me,updateExpandRows:$e,states:Se,isRowExpanded:Le}=d_e({data:i,rowKey:n}),{updateTreeExpandKeys:We,toggleTreeExpansion:Fe,updateTreeData:He,updateKeyChildren:Ae,loadOrToggle:Ze,states:Ye}=f_e({data:i,rowKey:n}),{updateCurrentRowData:it,updateCurrentRow:be,setCurrentRowKey:ve,states:Pe}=h_e({data:i,rowKey:n});return{assertRowKey:U,updateColumns:z,scheduleLayout:X,isSelected:Z,clearSelection:G,cleanSelection:Q,getSelectionRows:ne,toggleRowSelection:K,_toggleAllSelection:ae,toggleAllSelection:null,updateAllSelected:ge,updateFilters:oe,updateCurrentRow:be,updateSort:pe,execFilter:ie,execSort:re,execQuery:ke,clearFilter:je,clearSort:te,toggleRowExpansion:me,setExpandRowKeysAdapter:Je=>{se(Je),We(Je)},setCurrentRowKey:ve,toggleRowExpansionAdapter:(Je,dt)=>{l.value.some(({type:mt})=>mt==="expand")?me(Je,dt):Fe(Je,dt)},isRowExpanded:Le,updateExpandRows:$e,updateCurrentRowData:it,loadOrToggle:Ze,updateTreeData:He,updateKeyChildren:Ae,states:{tableSize:e,rowKey:n,data:i,_data:s,isComplex:o,_columns:r,originColumns:a,columns:l,fixedColumns:c,rightFixedColumns:u,leafColumns:d,fixedLeafColumns:h,rightFixedLeafColumns:f,updateOrderFns:p,leafColumnsLength:m,fixedLeafColumnsLength:b,rightFixedLeafColumnsLength:w,isAllSelected:k,selection:C,reserveSelection:A,selectOnIndeterminate:S,selectable:M,rowExpandable:P,filters:T,filteredData:I,sortingColumn:L,sortProp:R,sortOrder:V,hoverRow:H,...Se,...Ye,...Pe}}}function TC(t,e){return t.map(n=>{var i;return n.id===e.id?e:((i=n.children)!=null&&i.length&&(n.children=TC(n.children,e)),n)})}function PC(t){t.forEach(e=>{var n,i;e.no=(n=e.getColumnIndex)==null?void 0:n.call(e),(i=e.children)!=null&&i.length&&PC(e.children)}),t.sort((e,n)=>e.no-n.no)}function g_e(){const t=pt(),e=m_e(),n=Be("table"),{t:i}=en();return{ns:n,t:i,...e,mutations:{setData(a,l){const c=E(a._data)!==l;a.data.value=l,a._data.value=l,t.store.execQuery(),t.store.updateCurrentRowData(),t.store.updateExpandRows(),t.store.updateTreeData(t.store.states.defaultExpandAll.value),E(a.reserveSelection)?t.store.assertRowKey():c?t.store.clearSelection():t.store.cleanSelection(),t.store.updateAllSelected(),t.$ready&&t.store.scheduleLayout()},insertColumn(a,l,c,u){var f;const d=E(a._columns);let h=[];c?(c&&!c.children&&(c.children=[]),(f=c.children)==null||f.push(l),h=TC(d,c)):(d.push(l),h=d),PC(h),a._columns.value=h,a.updateOrderFns.push(u),l.type==="selection"&&(a.selectable.value=l.selectable,a.reserveSelection.value=l.reserveSelection),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},updateColumnOrder(a,l){var c;((c=l.getColumnIndex)==null?void 0:c.call(l))!==l.no&&(PC(a._columns.value),t.$ready&&t.store.updateColumns())},removeColumn(a,l,c,u){var f;const d=E(a._columns)||[];if(c)(f=c.children)==null||f.splice(c.children.findIndex(p=>p.id===l.id),1),ot(()=>{var p;((p=c.children)==null?void 0:p.length)===0&&delete c.children}),a._columns.value=TC(d,c);else{const p=d.indexOf(l);p>-1&&(d.splice(p,1),a._columns.value=d)}const h=a.updateOrderFns.indexOf(u);h>-1&&a.updateOrderFns.splice(h,1),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},sort(a,l){const{prop:c,order:u,init:d}=l;if(c){const h=E(a.columns).find(f=>f.property===c);h&&(h.order=u,t.store.updateSort(h,c,u),t.store.commit("changeSortCondition",{init:d}))}},changeSortCondition(a,l){const{sortingColumn:c,sortProp:u,sortOrder:d}=a,h=E(c),f=E(u),p=E(d);Wb(p)&&(a.sortingColumn.value=null,a.sortProp.value=null),t.store.execQuery({filter:!0}),(!l||!(l.silent||l.init))&&t.emit("sort-change",{column:h,prop:f,order:p}),t.store.updateTableScrollY()},filterChange(a,l){const{column:c,values:u,silent:d}=l,h=t.store.updateFilters(c,u);t.store.execQuery(),d||t.emit("filter-change",h),t.store.updateTableScrollY()},toggleAllSelection(){var a,l;(l=(a=t.store).toggleAllSelection)==null||l.call(a)},rowSelectedChanged(a,l){t.store.toggleRowSelection(l),t.store.updateAllSelected()},setHoverRow(a,l){a.hoverRow.value=l},setCurrentRow(a,l){t.store.updateCurrentRow(l)}},commit:function(a,...l){const c=t.store.mutations;if(c[a])c[a].apply(t,[t.store.states,...l]);else throw new Error(`Action not found: ${a}`)},updateTableScrollY:function(){ot(()=>t.layout.updateScrollY.apply(t.layout))}}}const L8={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",rowExpandable:"rowExpandable",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"},"treeProps.checkStrictly":{key:"checkStrictly",default:!1}};function v_e(t,e){if(!t)throw new Error("Table is required.");const n=g_e();return n.toggleAllSelection=yd(n._toggleAllSelection,10),Object.keys(L8).forEach(i=>{wF(kF(e,i),i,n)}),__e(n,e),n}function __e(t,e){Object.keys(L8).forEach(n=>{Te(()=>kF(e,n),i=>{wF(i,n,t)})})}function wF(t,e,n){let i=t,s=L8[e];yt(s)&&(i=i||s.default,s=s.key),n.states[s].value=i}function kF(t,e){if(e.includes(".")){const n=e.split(".");let i=t;return n.forEach(s=>{i=i[s]}),i}else return t[e]}var y_e=class{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=ee(null),this.scrollX=ee(!1),this.scrollY=ee(!1),this.bodyWidth=ee(null),this.fixedWidth=ee(null),this.rightFixedWidth=ee(null),this.gutterWidth=0;for(const e in t)zt(t,e)&&(hn(this[e])?this[e].value=t[e]:this[e]=t[e]);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(){const t=this.height.value;if(Wb(t))return!1;const e=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(e!=null&&e.wrapRef)){let n=!0;const i=this.scrollY.value;return n=e.wrapRef.scrollHeight>e.wrapRef.clientHeight,this.scrollY.value=n,i!==n}return!1}setHeight(t,e="height"){if(!Jt)return;const n=this.table.vnode.el;if(t=r_e(t),this.height.value=Number(t),!n&&(t||t===0)){ot(()=>this.setHeight(t,e));return}n&&wt(t)?(n.style[e]=`${t}px`,this.updateElsHeight()):n&&Ke(t)&&(n.style[e]=t,this.updateElsHeight())}setMaxHeight(t){this.setHeight(t,"max-height")}getFlattenColumns(){const t=[];return this.table.store.states.columns.value.forEach(e=>{e.isColumnGroup?t.push.apply(t,e.columns):t.push(e)}),t}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(t){if(!t)return!0;let e=t;for(;e.tagName!=="DIV";){if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}updateColumnsWidth(){var a;if(!Jt)return;const t=this.fit,e=(a=this.table.vnode.el)==null?void 0:a.clientWidth;let n=0;const i=this.getFlattenColumns(),s=i.filter(l=>!wt(l.width));if(i.forEach(l=>{wt(l.width)&&l.realWidth&&(l.realWidth=null)}),s.length>0&&t){if(i.forEach(l=>{n+=Number(l.width||l.minWidth||80)}),n<=e){this.scrollX.value=!1;const l=e-n;if(s.length===1)s[0].realWidth=Number(s[0].minWidth||80)+l;else{const c=l/s.reduce((d,h)=>d+Number(h.minWidth||80),0);let u=0;s.forEach((d,h)=>{if(h===0)return;const f=Math.floor(Number(d.minWidth||80)*c);u+=f,d.realWidth=Number(d.minWidth||80)+f}),s[0].realWidth=Number(s[0].minWidth||80)+l-u}}else this.scrollX.value=!0,s.forEach(l=>{l.realWidth=Number(l.minWidth)});this.bodyWidth.value=Math.max(n,e),this.table.state.resizeState.value.width=this.bodyWidth.value}else i.forEach(l=>{!l.width&&!l.minWidth?l.realWidth=80:l.realWidth=Number(l.width||l.minWidth),n+=l.realWidth}),this.scrollX.value=n>e,this.bodyWidth.value=n;const o=this.store.states.fixedColumns.value;if(o.length>0){let l=0;o.forEach(c=>{l+=Number(c.realWidth||c.width)}),this.fixedWidth.value=l}const r=this.store.states.rightFixedColumns.value;if(r.length>0){let l=0;r.forEach(c=>{l+=Number(c.realWidth||c.width)}),this.rightFixedWidth.value=l}this.notifyObservers("columns")}addObserver(t){this.observers.push(t)}removeObserver(t){const e=this.observers.indexOf(t);e!==-1&&this.observers.splice(e,1)}notifyObservers(t){this.observers.forEach(e=>{var n,i;switch(t){case"columns":(n=e.state)==null||n.onColumnsChange(this);break;case"scrollable":(i=e.state)==null||i.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${t}.`)}})}};const ra=Symbol("ElTable"),CF=t=>{const e=[];return t.forEach(n=>{n.children?(e.push(n),e.push.apply(e,CF(n.children))):e.push(n)}),e},xF=t=>{let e=1;const n=(s,o)=>{if(o&&(s.level=o.level+1,e<s.level&&(e=s.level)),s.children){let r=0;s.children.forEach(a=>{n(a,s),r+=a.colSpan}),s.colSpan=r}else s.colSpan=1};t.forEach(s=>{s.level=1,n(s,void 0)});const i=[];for(let s=0;s<e;s++)i.push([]);return CF(t).forEach(s=>{s.children?(s.rowSpan=1,s.children.forEach(o=>o.isSubColumn=!0)):s.rowSpan=e-s.level+1,i[s.level-1].push(s)}),i};function b_e(t){const e=qe(ra),n=W(()=>xF(t.store.states.originColumns.value));return{isGroup:W(()=>{const o=n.value.length>1;return o&&e&&(e.state.isGroup.value=!0),o}),toggleAllSelection:o=>{o.stopPropagation(),e==null||e.store.commit("toggleAllSelection")},columnRows:n}}var w_e=fe({name:"ElTableFilterPanel",components:{ElCheckbox:qt,ElCheckboxGroup:o2,ElScrollbar:zs,ElTooltip:Ss,ElIcon:we,ArrowDown:zd,ArrowUp:n2},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:zn.appendTo},setup(t){const e=pt(),{t:n}=en(),i=Be("table-filter"),s=e==null?void 0:e.parent;t.column&&!s.filterPanels.value[t.column.id]&&(s.filterPanels.value[t.column.id]=e);const o=ee(null),r=ee(null),a=ee(0),l=W(()=>t.column&&t.column.filters),c=W(()=>t.column&&t.column.filterClassName?`${i.b()} ${t.column.filterClassName}`:i.b()),u=W({get:()=>{var P;return(((P=t.column)==null?void 0:P.filteredValue)||[])[0]},set:P=>{d.value&&(xa(P)?d.value.splice(0,1):d.value.splice(0,1,P))}}),d=W({get(){return t.column?t.column.filteredValue||[]:[]},set(P){var T;t.column&&((T=t.upDataColumn)==null||T.call(t,"filteredValue",P))}}),h=W(()=>t.column?t.column.filterMultiple:!0),f=P=>P.value===u.value,p=()=>{var P;(P=o.value)==null||P.onClose()},m=()=>{k(d.value),p()},b=()=>{d.value=[],k(d.value),p()},w=(P,T)=>{u.value=P,a.value=T,xa(P)?k([]):k(d.value),p()},k=P=>{var T,I;(T=t.store)==null||T.commit("filterChange",{column:t.column,values:P}),(I=t.store)==null||I.updateAllSelected()},C=()=>{var P,T;(P=r.value)==null||P.focus(),!h.value&&S(),t.column&&((T=t.upDataColumn)==null||T.call(t,"filterOpened",!0))},A=()=>{var P;t.column&&((P=t.upDataColumn)==null||P.call(t,"filterOpened",!1))},S=()=>{if(xa(u)){a.value=0;return}const P=(l.value||[]).findIndex(T=>T.value===u.value);a.value=P>=0?P+1:0};return{multiple:h,filterClassName:c,filteredValue:d,filterValue:u,filters:l,handleConfirm:m,handleReset:b,handleSelect:w,isPropAbsent:xa,isActive:f,t:n,ns:i,tooltipRef:o,rootRef:r,checkedIndex:a,handleShowTooltip:C,handleHideTooltip:A,handleKeydown:P=>{var V,H;const T=ls(P),I=(l.value?l.value.length:0)+1;let L=a.value,R=!0;switch(T){case Ue.down:case Ue.right:L=(L+1)%I;break;case Ue.up:case Ue.left:L=(L-1+I)%I;break;case Ue.tab:p(),R=!1;break;case Ue.enter:case Ue.space:if(L===0)w(null,0);else{const F=(l.value||[])[L-1];F.value&&w(F.value,L)}break;default:R=!1;break}R&&P.preventDefault(),a.value=L,(H=(V=r.value)==null?void 0:V.querySelector(`.${i.e("list-item")}:nth-child(${L+1})`))==null||H.focus()}}}});const k_e=["disabled"],C_e=["tabindex","aria-checked"],x_e=["tabindex","aria-checked","onClick"],S_e=["aria-label"];function $_e(t,e,n,i,s,o){const r=B("el-checkbox"),a=B("el-checkbox-group"),l=B("el-scrollbar"),c=B("arrow-up"),u=B("arrow-down"),d=B("el-icon"),h=B("el-tooltip");return v(),D(h,{ref:"tooltipRef",offset:0,placement:t.placement,"show-arrow":!1,trigger:"click",role:"dialog",teleported:"",effect:"light",pure:"",loop:"","popper-class":t.filterClassName,persistent:"","append-to":t.appendTo,onShow:t.handleShowTooltip,onHide:t.handleHideTooltip},{content:y(()=>[t.multiple?(v(),$("div",{key:0,ref:"rootRef",tabindex:"-1",class:q(t.ns.e("multiple"))},[g("div",{class:q(t.ns.e("content"))},[_(l,{"wrap-class":t.ns.e("wrap")},{default:y(()=>[_(a,{modelValue:t.filteredValue,"onUpdate:modelValue":e[0]||(e[0]=f=>t.filteredValue=f),class:q(t.ns.e("checkbox-group"))},{default:y(()=>[(v(!0),$(J,null,ye(t.filters,f=>(v(),D(r,{key:f.value,value:f.value},{default:y(()=>[N(x(f.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),g("div",{class:q(t.ns.e("bottom"))},[g("button",{class:q(t.ns.is("disabled",t.filteredValue.length===0)),disabled:t.filteredValue.length===0,type:"button",onClick:e[1]||(e[1]=(...f)=>t.handleConfirm&&t.handleConfirm(...f))},x(t.t("el.table.confirmFilter")),11,k_e),g("button",{type:"button",onClick:e[2]||(e[2]=(...f)=>t.handleReset&&t.handleReset(...f))},x(t.t("el.table.resetFilter")),1)],2)],2)):(v(),$("ul",{key:1,ref:"rootRef",tabindex:"-1",role:"radiogroup",class:q(t.ns.e("list")),onKeydown:e[4]||(e[4]=(...f)=>t.handleKeydown&&t.handleKeydown(...f))},[g("li",{role:"radio",class:q([t.ns.e("list-item"),t.ns.is("active",t.isPropAbsent(t.filterValue))]),tabindex:t.checkedIndex===0?0:-1,"aria-checked":t.isPropAbsent(t.filterValue),onClick:e[3]||(e[3]=f=>t.handleSelect(null,0))},x(t.t("el.table.clearFilter")),11,C_e),(v(!0),$(J,null,ye(t.filters,(f,p)=>(v(),$("li",{key:f.value,role:"radio",class:q([t.ns.e("list-item"),t.ns.is("active",t.isActive(f))]),tabindex:t.checkedIndex===p+1?0:-1,"aria-checked":t.isActive(f),onClick:m=>t.handleSelect(f.value,p+1)},x(f.text),11,x_e))),128))],34))]),default:y(()=>{var f;return[g("button",{type:"button",class:q(`${t.ns.namespace.value}-table__column-filter-trigger`),"aria-label":t.t("el.table.filterLabel",{column:((f=t.column)==null?void 0:f.label)||""})},[_(d,null,{default:y(()=>[le(t.$slots,"filter-icon",{},()=>{var p;return[(p=t.column)!=null&&p.filterOpened?(v(),D(c,{key:0})):(v(),D(u,{key:1}))]})]),_:3})],10,S_e)]}),_:3},8,["placement","popper-class","append-to","onShow","onHide"])}var A_e=vi(w_e,[["render",$_e]]);function O8(t){const e=pt();Dd(()=>{n.value.addObserver(e)}),Nt(()=>{i(n.value),s(n.value)}),xl(()=>{i(n.value),s(n.value)}),Sl(()=>{n.value.removeObserver(e)});const n=W(()=>{const o=t.layout;if(!o)throw new Error("Can not find table layout.");return o}),i=o=>{var c;const r=((c=t.vnode.el)==null?void 0:c.querySelectorAll("colgroup > col"))||[];if(!r.length)return;const a=o.getFlattenColumns(),l={};a.forEach(u=>{l[u.id]=u});for(let u=0,d=r.length;u<d;u++){const h=r[u],f=l[h.getAttribute("name")];f&&h.setAttribute("width",f.realWidth||f.width)}},s=o=>{var l,c;const r=((l=t.vnode.el)==null?void 0:l.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let u=0,d=r.length;u<d;u++)r[u].setAttribute("width",o.scrollY.value?o.gutterWidth:"0");const a=((c=t.vnode.el)==null?void 0:c.querySelectorAll("th.gutter"))||[];for(let u=0,d=a.length;u<d;u++){const h=a[u];h.style.width=o.scrollY.value?`${o.gutterWidth}px`:"0",h.style.display=o.scrollY.value?"":"none"}};return{tableLayout:n.value,onColumnsChange:i,onScrollableChange:s}}function E_e(t,e){const n=pt(),i=qe(ra),s=m=>{m.stopPropagation()},o=(m,b)=>{!b.filters&&b.sortable?p(m,b,!1):b.filterable&&!b.sortable&&s(m),i==null||i.emit("header-click",b,m)},r=(m,b)=>{i==null||i.emit("header-contextmenu",b,m)},a=ee(null),l=ee(!1),c=ee(),u=(m,b)=>{var w,k,C;if(Jt&&!(b.children&&b.children.length>0)&&a.value&&t.border&&a.value.id===b.id){l.value=!0;const A=i;e("set-drag-visible",!0);const S=(w=A==null?void 0:A.vnode.el)==null?void 0:w.getBoundingClientRect().left,M=(C=(k=n==null?void 0:n.vnode)==null?void 0:k.el)==null?void 0:C.querySelector(`th.${b.id}`),P=M.getBoundingClientRect(),T=P.left-S+30;bd(M,"noclick"),c.value={startMouseLeft:m.clientX,startLeft:P.right-S,startColumnLeft:P.left-S,tableLeft:S};const I=A==null?void 0:A.refs.resizeProxy;I.style.left=`${c.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const L=V=>{const H=V.clientX-c.value.startMouseLeft,F=c.value.startLeft+H;I.style.left=`${Math.max(T,F)}px`},R=()=>{if(l.value){const{startColumnLeft:V,startLeft:H}=c.value;b.width=b.realWidth=Number.parseInt(I.style.left,10)-V,A==null||A.emit("header-dragend",b.width,H-V,b,m),requestAnimationFrame(()=>{t.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",l.value=!1,a.value=null,c.value=void 0,e("set-drag-visible",!1)}document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",R),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{Pa(M,"noclick")},0)};document.addEventListener("mousemove",L),document.addEventListener("mouseup",R)}},d=(m,b)=>{var I;if(!t.border||b.children&&b.children.length>0)return;const w=m.target,k=Lo(w)?w.closest("th"):null;if(!k)return;const C=pl(k,"is-sortable");if(C){const L=l.value?"col-resize":"";k.style.cursor=L;const R=k.querySelector(".caret-wrapper");R&&(R.style.cursor=L)}if(!b.resizable||l.value){a.value=null;return}const A=k.getBoundingClientRect(),S=((I=k.parentNode)==null?void 0:I.lastElementChild)===k,M=t.allowDragLastColumn||!S,P=A.width>12&&A.right-m.clientX<8&&M,T=P?"col-resize":"";document.body.style.cursor=T,a.value=P?b:null,C&&(k.style.cursor=T)},h=()=>{!Jt||l.value||(document.body.style.cursor="")},f=({order:m,sortOrders:b})=>{if(m==="")return b[0];const w=b.indexOf(m||null);return b[w>b.length-2?0:w+1]},p=(m,b,w)=>{var I;m.stopPropagation();const k=b.order===w?null:w||f(b),C=(I=m.target)==null?void 0:I.closest("th");if(C&&pl(C,"noclick")){Pa(C,"noclick");return}if(!b.sortable)return;const A=m.currentTarget;if(["ascending","descending"].some(L=>pl(A,L)&&!b.sortOrders.includes(L)))return;const S=t.store.states;let M=S.sortProp.value,P;const T=S.sortingColumn.value;(T!==b||T===b&&Wb(T.order))&&(T&&(T.order=null),S.sortingColumn.value=b,M=b.property),k?P=b.order=k:P=b.order=null,S.sortProp.value=M,S.sortOrder.value=P,i==null||i.store.commit("changeSortCondition")};return{handleHeaderClick:o,handleHeaderContextMenu:r,handleMouseDown:u,handleMouseMove:d,handleMouseOut:h,handleSortClick:p,handleFilterClick:s}}function M_e(t){const e=qe(ra),n=Be("table");return{getHeaderRowStyle:a=>{const l=e==null?void 0:e.props.headerRowStyle;return et(l)?l.call(null,{rowIndex:a}):l},getHeaderRowClass:a=>{const l=[],c=e==null?void 0:e.props.headerRowClassName;return Ke(c)?l.push(c):et(c)&&l.push(c.call(null,{rowIndex:a})),l.join(" ")},getHeaderCellStyle:(a,l,c,u)=>{let d=(e==null?void 0:e.props.headerCellStyle)??{};et(d)&&(d=d.call(null,{rowIndex:a,columnIndex:l,row:c,column:u}));const h=I8(l,u.fixed,t.store,c);return qf(h,"left"),qf(h,"right"),Object.assign({},d,h)},getHeaderCellClass:(a,l,c,u)=>{const d=P8(n.b(),l,u.fixed,t.store,c),h=[u.id,u.order,u.headerAlign,u.className,u.labelClassName,...d];u.children||h.push("is-leaf"),u.sortable&&h.push("is-sortable");const f=e==null?void 0:e.props.headerCellClassName;return Ke(f)?h.push(f):et(f)&&h.push(f.call(null,{rowIndex:a,columnIndex:l,row:c,column:u})),h.push(n.e("cell")),h.filter(p=>!!p).join(" ")}}}var T_e=fe({name:"ElTableHeader",components:{ElCheckbox:qt},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})},appendFilterPanelTo:{type:String},allowDragLastColumn:{type:Boolean}},setup(t,{emit:e}){const n=pt(),i=qe(ra),s=Be("table"),o=ee({}),{onColumnsChange:r,onScrollableChange:a}=O8(i),l=(i==null?void 0:i.props.tableLayout)==="auto",c=In(new Map),u=ee();let d;const h=()=>{d=setTimeout(()=>{c.size>0&&(c.forEach((V,H)=>{const F=u.value.querySelector(`.${H.replace(/\s/g,".")}`);F&&(V.width=F.getBoundingClientRect().width||V.width)}),c.clear())})};Te(c,h),wn(()=>{d&&(clearTimeout(d),d=void 0)}),Nt(async()=>{await ot(),await ot();const{prop:V,order:H}=t.defaultSort;i==null||i.store.commit("sort",{prop:V,order:H,init:!0}),h()});const{handleHeaderClick:f,handleHeaderContextMenu:p,handleMouseDown:m,handleMouseMove:b,handleMouseOut:w,handleSortClick:k,handleFilterClick:C}=E_e(t,e),{getHeaderRowStyle:A,getHeaderRowClass:S,getHeaderCellStyle:M,getHeaderCellClass:P}=M_e(t),{isGroup:T,toggleAllSelection:I,columnRows:L}=b_e(t),{t:R}=en();return n.state={onColumnsChange:r,onScrollableChange:a},n.filterPanels=o,{ns:s,t:R,filterPanels:o,onColumnsChange:r,onScrollableChange:a,columnRows:L,getHeaderRowClass:S,getHeaderRowStyle:A,getHeaderCellClass:P,getHeaderCellStyle:M,handleHeaderClick:f,handleHeaderContextMenu:p,handleMouseDown:m,handleMouseMove:b,handleMouseOut:w,handleSortClick:k,handleFilterClick:C,isGroup:T,toggleAllSelection:I,saveIndexSelection:c,isTableLayoutAuto:l,theadRef:u,updateFixedColumnStyle:h}},render(){const{ns:t,t:e,isGroup:n,columnRows:i,getHeaderCellStyle:s,getHeaderCellClass:o,getHeaderRowClass:r,getHeaderRowStyle:a,handleHeaderClick:l,handleHeaderContextMenu:c,handleMouseDown:u,handleMouseMove:d,handleSortClick:h,handleMouseOut:f,store:p,$parent:m,saveIndexSelection:b,isTableLayoutAuto:w}=this;let k=1;return bt("thead",{ref:"theadRef",class:t.is("group",n)},i.map((C,A)=>bt("tr",{class:r(A),key:A,style:a(A)},C.map((S,M)=>{S.rowSpan>k&&(k=S.rowSpan);const P=o(A,M,C,S);return w&&S.fixed&&b.set(P,S),bt("th",{class:P,colspan:S.colSpan,key:`${S.id}-thead`,rowspan:S.rowSpan,scope:S.colSpan>1?"colgroup":"col",ariaSort:S.sortable?S.order:void 0,style:s(A,M,C,S),onClick:T=>{var I;(I=T.currentTarget)!=null&&I.classList.contains("noclick")||l(T,S)},onContextmenu:T=>c(T,S),onMousedown:T=>u(T,S),onMousemove:T=>d(T,S),onMouseout:f},[bt("div",{class:["cell",S.filteredValue&&S.filteredValue.length>0?"highlight":""]},[S.renderHeader?S.renderHeader({column:S,$index:M,store:p,_self:m}):S.label,S.sortable&&bt("button",{type:"button",class:"caret-wrapper","aria-label":e("el.table.sortLabel",{column:S.label||""}),onClick:T=>h(T,S)},[bt("i",{onClick:T=>h(T,S,"ascending"),class:"sort-caret ascending"}),bt("i",{onClick:T=>h(T,S,"descending"),class:"sort-caret descending"})]),S.filterable&&bt(A_e,{store:p,placement:S.filterPlacement||"bottom-start",appendTo:m==null?void 0:m.appendFilterPanelTo,column:S,upDataColumn:(T,I)=>{S[T]=I}},{"filter-icon":()=>S.renderFilterIcon?S.renderFilterIcon({filterOpened:S.filterOpened}):null})])])}))))}});function cf(t,e,n=.03){return t-e>n}function P_e(t){const e=qe(ra),n=ee(""),i=ee(bt("div")),s=(p,m,b)=>{var S,M;const w=e,k=Ww(p);let C=null;const A=(S=w==null?void 0:w.vnode.el)==null?void 0:S.dataset.prefix;k&&(C=PA({columns:((M=t.store)==null?void 0:M.states.columns.value)??[]},k,A),C&&(w==null||w.emit(`cell-${b}`,m,C,k,p))),w==null||w.emit(`row-${b}`,m,C,p)},o=(p,m)=>{s(p,m,"dblclick")},r=(p,m)=>{var b;(b=t.store)==null||b.commit("setCurrentRow",m),s(p,m,"click")},a=(p,m)=>{s(p,m,"contextmenu")},l=yd(p=>{var m;(m=t.store)==null||m.commit("setHoverRow",p)},30),c=yd(()=>{var p;(p=t.store)==null||p.commit("setHoverRow",null)},30),u=p=>{const m=window.getComputedStyle(p,null);return{left:Number.parseInt(m.paddingLeft,10)||0,right:Number.parseInt(m.paddingRight,10)||0,top:Number.parseInt(m.paddingTop,10)||0,bottom:Number.parseInt(m.paddingBottom,10)||0}},d=(p,m,b)=>{var k;let w=(k=m==null?void 0:m.target)==null?void 0:k.parentNode;for(;p>1&&(w=w==null?void 0:w.nextSibling,!(!w||w.nodeName!=="TR"));)b(w,"hover-row hover-fixed-row"),p--};return{handleDoubleClick:o,handleClick:r,handleContextMenu:a,handleMouseEnter:l,handleMouseLeave:c,handleCellMouseEnter:(p,m,b)=>{var z,X,Z;if(!e)return;const w=e,k=Ww(p),C=(z=w==null?void 0:w.vnode.el)==null?void 0:z.dataset.prefix;let A=null;if(k){if(A=PA({columns:((X=t.store)==null?void 0:X.states.columns.value)??[]},k,C),!A)return;k.rowSpan>1&&d(k.rowSpan,p,bd);const G=w.hoverState={cell:k,column:A,row:m};w==null||w.emit("cell-mouse-enter",G.row,G.column,G.cell,p)}if(!b){(Rn==null?void 0:Rn.trigger)===k&&(Rn==null||Rn());return}const S=p.target.querySelector(".cell");if(!(pl(S,`${C}-tooltip`)&&S.childNodes.length&&((Z=S.textContent)!=null&&Z.trim())))return;const M=document.createRange();M.setStart(S,0),M.setEnd(S,S.childNodes.length);const{width:P,height:T}=M.getBoundingClientRect(),{width:I,height:L}=S.getBoundingClientRect(),{top:R,left:V,right:H,bottom:F}=u(S),U=V+H,Y=R+F;cf(P+U,I)||cf(T+Y,L)||cf(S.scrollWidth,I)?u_e(b,((k==null?void 0:k.innerText)||(k==null?void 0:k.textContent))??"",m,A,k,w):(Rn==null?void 0:Rn.trigger)===k&&(Rn==null||Rn())},handleCellMouseLeave:p=>{const m=Ww(p);if(!m)return;m.rowSpan>1&&d(m.rowSpan,p,Pa);const b=e==null?void 0:e.hoverState;e==null||e.emit("cell-mouse-leave",b==null?void 0:b.row,b==null?void 0:b.column,b==null?void 0:b.cell,p)},tooltipContent:n,tooltipTrigger:i}}function I_e(t){const e=qe(ra),n=Be("table");return{getRowStyle:(c,u)=>{const d=e==null?void 0:e.props.rowStyle;return et(d)?d.call(null,{row:c,rowIndex:u}):d||null},getRowClass:(c,u,d)=>{var p;const h=[n.e("row")];e!=null&&e.props.highlightCurrentRow&&c===((p=t.store)==null?void 0:p.states.currentRow.value)&&h.push("current-row"),t.stripe&&d%2===1&&h.push(n.em("row","striped"));const f=e==null?void 0:e.props.rowClassName;return Ke(f)?h.push(f):et(f)&&h.push(f.call(null,{row:c,rowIndex:u})),h},getCellStyle:(c,u,d,h)=>{const f=e==null?void 0:e.props.cellStyle;let p=f??{};et(f)&&(p=f.call(null,{rowIndex:c,columnIndex:u,row:d,column:h}));const m=I8(u,t==null?void 0:t.fixed,t.store);return qf(m,"left"),qf(m,"right"),Object.assign({},p,m)},getCellClass:(c,u,d,h,f)=>{const p=P8(n.b(),u,t==null?void 0:t.fixed,t.store,void 0,f),m=[h.id,h.align,h.className,...p],b=e==null?void 0:e.props.cellClassName;return Ke(b)?m.push(b):et(b)&&m.push(b.call(null,{rowIndex:c,columnIndex:u,row:d,column:h})),m.push(n.e("cell")),m.filter(w=>!!w).join(" ")},getSpan:(c,u,d,h)=>{let f=1,p=1;const m=e==null?void 0:e.props.spanMethod;if(et(m)){const b=m({row:c,column:u,rowIndex:d,columnIndex:h});Ee(b)?(f=b[0],p=b[1]):yt(b)&&(f=b.rowspan,p=b.colspan)}return{rowspan:f,colspan:p}},getColspanRealWidth:(c,u,d)=>{if(u<1)return c[d].realWidth;const h=c.map(({realWidth:f,width:p})=>f||p).slice(d,d+u);return Number(h.reduce((f,p)=>Number(f)+Number(p),-1))}}}const L_e=["colspan","rowspan"];var O_e=fe({name:"TableTdWrapper",__name:"td-wrapper",props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup(t){return(e,n)=>(v(),$("td",{colspan:t.colspan,rowspan:t.rowspan},[le(e.$slots,"default")],8,L_e))}}),D_e=O_e;function R_e(t){const e=qe(ra),n=Be("table"),{handleDoubleClick:i,handleClick:s,handleContextMenu:o,handleMouseEnter:r,handleMouseLeave:a,handleCellMouseEnter:l,handleCellMouseLeave:c,tooltipContent:u,tooltipTrigger:d}=P_e(t),{getRowStyle:h,getRowClass:f,getCellStyle:p,getCellClass:m,getSpan:b,getColspanRealWidth:w}=I_e(t);let k=-1;const C=W(()=>{var T;return(T=t.store)==null?void 0:T.states.columns.value.findIndex(({type:I})=>I==="default")}),A=(T,I)=>{var R;const L=(R=e==null?void 0:e.props)==null?void 0:R.rowKey;return L?ci(T,L):I},S=(T,I,L,R=!1)=>{const{tooltipEffect:V,tooltipOptions:H,store:F}=t,{indent:U,columns:Y}=F.states,z=[];let X=!0;return L&&(z.push(n.em("row",`level-${L.level}`)),X=!!L.display),I===0&&(k=-1),t.stripe&&X&&k++,z.push(...f(T,I,k)),bt("tr",{style:[X?null:{display:"none"},h(T,I)],class:z,key:A(T,I),onDblclick:Z=>i(Z,T),onClick:Z=>s(Z,T),onContextmenu:Z=>o(Z,T),onMouseenter:()=>r(I),onMouseleave:a},Y.value.map((Z,G)=>{const{rowspan:Q,colspan:ne}=b(T,Z,I,G);if(!Q||!ne)return null;const K=Object.assign({},Z);K.realWidth=w(Y.value,ne,G);const ae={store:F,_self:t.context||e,column:K,row:T,$index:I,cellIndex:G,expanded:R};G===C.value&&L&&(ae.treeNode={indent:L.level&&L.level*U.value,level:L.level},Jn(L.expanded)&&(ae.treeNode.expanded=L.expanded,"loading"in L&&(ae.treeNode.loading=L.loading),"noLazyChildren"in L&&(ae.treeNode.noLazyChildren=L.noLazyChildren)));const ge=`${A(T,I)},${G}`,Ce=K.columnKey||K.rawColumnKey||"",oe=Z.showOverflowTooltip&&pD({effect:V},H,Z.showOverflowTooltip);return bt(D_e,{style:p(I,G,T,Z),class:m(I,G,T,Z,ne-1),key:`${Ce}${ge}`,rowspan:Q,colspan:ne,onMouseenter:pe=>l(pe,T,oe),onMouseleave:c},{default:()=>M(G,Z,ae)})}))},M=(T,I,L)=>I.renderCell(L);return{wrappedRowRender:(T,I)=>{const L=t.store,{isRowExpanded:R,assertRowKey:V}=L,{treeData:H,lazyTreeNodeMap:F,childrenColumnName:U,rowKey:Y}=L.states,z=L.states.columns.value;if(z.some(({type:X})=>X==="expand")){const X=R(T),Z=S(T,I,void 0,X),G=e==null?void 0:e.renderExpanded;if(!G)return console.error("[Element Error]renderExpanded is required."),Z;const Q=[[Z]];return(e.props.preserveExpandedContent||X)&&Q[0].push(bt("tr",{key:`expanded-row__${Z.key}`,style:{display:X?"":"none"}},[bt("td",{colspan:z.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[G({row:T,$index:I,store:L,expanded:X})])])),Q}else if(Object.keys(H.value).length){V();const X=ci(T,Y.value);let Z=H.value[X],G=null;Z&&(G={expanded:Z.expanded,level:Z.level,display:!0,noLazyChildren:void 0,loading:void 0},Jn(Z.lazy)&&(G&&Jn(Z.loaded)&&Z.loaded&&(G.noLazyChildren=!(Z.children&&Z.children.length)),G.loading=Z.loading));const Q=[S(T,I,G??void 0)];if(Z){let ne=0;const K=(ae,ge)=>{ae&&ae.length&&ge&&ae.forEach(Ce=>{const oe={display:ge.display&&ge.expanded,level:ge.level+1,expanded:!1,noLazyChildren:!1,loading:!1},pe=ci(Ce,Y.value);if(xa(pe))throw new Error("For nested data item, row-key is required.");Z={...H.value[pe]},Z&&(oe.expanded=Z.expanded,Z.level=Z.level||oe.level,Z.display=!!(Z.expanded&&oe.display),Jn(Z.lazy)&&(Jn(Z.loaded)&&Z.loaded&&(oe.noLazyChildren=!(Z.children&&Z.children.length)),oe.loading=Z.loading)),ne++,Q.push(S(Ce,I+ne,oe)),Z&&K(F.value[pe]||Ce[U.value],Z)})};Z.display=!0,K(F.value[X]||T[U.value],Z)}return Q}else return S(T,I,void 0)},tooltipContent:u,tooltipTrigger:d}}const V_e={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 F_e=fe({name:"ElTableBody",props:V_e,setup(t){var u;const e=pt(),n=qe(ra),i=Be("table"),{wrappedRowRender:s,tooltipContent:o,tooltipTrigger:r}=R_e(t),{onColumnsChange:a,onScrollableChange:l}=O8(n),c=[];return Te((u=t.store)==null?void 0:u.states.hoverRow,(d,h)=>{var w,k;const f=e==null?void 0:e.vnode.el,p=Array.from((f==null?void 0:f.children)||[]).filter(C=>C==null?void 0:C.classList.contains(`${i.e("row")}`));let m=d;const b=(w=p[m])==null?void 0:w.childNodes;if(b!=null&&b.length){let C=0;Array.from(b).reduce((A,S,M)=>{var P,T;return((P=b[M])==null?void 0:P.colSpan)>1&&(C=(T=b[M])==null?void 0:T.colSpan),S.nodeName!=="TD"&&C===0&&A.push(M),C>0&&C--,A},[]).forEach(A=>{var S;for(m=d;m>0;){const M=(S=p[m-1])==null?void 0:S.childNodes;if(M[A]&&M[A].nodeName==="TD"&&M[A].rowSpan>1){bd(M[A],"hover-cell"),c.push(M[A]);break}m--}})}else c.forEach(C=>Pa(C,"hover-cell")),c.length=0;!((k=t.store)!=null&&k.states.isComplex.value)||!Jt||Kg(()=>{const C=p[h],A=p[d];C&&!C.classList.contains("hover-fixed-row")&&Pa(C,"hover-row"),A&&bd(A,"hover-row")})}),Sl(()=>{Rn==null||Rn()}),{ns:i,onColumnsChange:a,onScrollableChange:l,wrappedRowRender:s,tooltipContent:o,tooltipTrigger:r}},render(){const{wrappedRowRender:t,store:e}=this;return bt("tbody",{tabIndex:-1},[((e==null?void 0:e.states.data.value)||[]).reduce((n,i)=>n.concat(t(i,n.length)),[])])}});function N_e(){var e;const t=(e=qe(ra))==null?void 0:e.store;return{leftFixedLeafCount:W(()=>(t==null?void 0:t.states.fixedLeafColumnsLength.value)??0),rightFixedLeafCount:W(()=>(t==null?void 0:t.states.rightFixedColumns.value.length)??0),columnsCount:W(()=>(t==null?void 0:t.states.columns.value.length)??0),leftFixedCount:W(()=>(t==null?void 0:t.states.fixedColumns.value.length)??0),rightFixedCount:W(()=>(t==null?void 0:t.states.rightFixedColumns.value.length)??0),columns:W(()=>(t==null?void 0:t.states.columns.value)??[])}}function B_e(t){const{columns:e}=N_e(),n=Be("table");return{getCellClasses:(o,r)=>{const a=o[r],l=[n.e("cell"),a.id,a.align,a.labelClassName,...P8(n.b(),r,a.fixed,t.store)];return a.className&&l.push(a.className),a.children||l.push(n.is("leaf")),l},getCellStyles:(o,r)=>{const a=I8(r,o.fixed,t.store);return qf(a,"left"),qf(a,"right"),a},columns:e}}var z_e=fe({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(t){const e=qe(ra),n=Be("table"),{getCellClasses:i,getCellStyles:s,columns:o}=B_e(t),{onScrollableChange:r,onColumnsChange:a}=O8(e);return{ns:n,onScrollableChange:r,onColumnsChange:a,getCellClasses:i,getCellStyles:s,columns:o}},render(){const{columns:t,getCellStyles:e,getCellClasses:n,summaryMethod:i,sumText:s}=this,o=this.store.states.data.value;let r=[];return i?r=i({columns:t,data:o}):t.forEach((a,l)=>{if(l===0){r[l]=s;return}const c=o.map(f=>Number(f[a.property])),u=[];let d=!0;c.forEach(f=>{if(!Number.isNaN(+f)){d=!1;const p=`${f}`.split(".")[1];u.push(p?p.length:0)}});const h=Math.max.apply(null,u);d?r[l]="":r[l]=c.reduce((f,p)=>{const m=Number(p);return Number.isNaN(+m)?f:Number.parseFloat((f+p).toFixed(Math.min(h,20)))},0)}),bt(bt("tfoot",[bt("tr",{},[...t.map((a,l)=>bt("td",{key:l,colspan:a.colSpan,rowspan:a.rowSpan,class:n(t,l),style:e(a,l)},[bt("div",{class:["cell",a.labelClassName]},[r[l]])]))])]))}});function H_e(t){return{setCurrentRow:d=>{t.commit("setCurrentRow",d)},getSelectionRows:()=>t.getSelectionRows(),toggleRowSelection:(d,h,f=!0)=>{t.toggleRowSelection(d,h,!1,f),t.updateAllSelected()},clearSelection:()=>{t.clearSelection()},clearFilter:d=>{t.clearFilter(d)},toggleAllSelection:()=>{t.commit("toggleAllSelection")},toggleRowExpansion:(d,h)=>{t.toggleRowExpansionAdapter(d,h)},clearSort:()=>{t.clearSort()},sort:(d,h)=>{t.commit("sort",{prop:d,order:h})},updateKeyChildren:(d,h)=>{t.updateKeyChildren(d,h)}}}function U_e(t,e,n,i){const s=ee(!1),o=ee(null),r=ee(!1),a=U=>{r.value=U},l=ee({width:null,height:null,headerHeight:null}),c=ee(!1),u={display:"inline-block",verticalAlign:"middle"},d=ee(),h=ee(0),f=ee(0),p=ee(0),m=ee(0),b=ee(0);Te(()=>t.height,U=>{e.setHeight(U??null)},{immediate:!0}),Te(()=>t.maxHeight,U=>{e.setMaxHeight(U??null)},{immediate:!0}),Te(()=>[t.currentRowKey,n.states.rowKey],([U,Y])=>{!E(Y)||!E(U)||n.setCurrentRowKey(`${U}`)},{immediate:!0}),Te(()=>t.data,U=>{i.store.commit("setData",U)},{immediate:!0,deep:!0}),_l(()=>{t.expandRowKeys&&n.setExpandRowKeysAdapter(t.expandRowKeys)});const w=()=>{i.store.commit("setHoverRow",null),i.hoverState&&(i.hoverState=null)},k=(U,Y)=>{const{pixelX:z,pixelY:X}=Y;Math.abs(z)>=Math.abs(X)&&(i.refs.bodyWrapper.scrollLeft+=Y.pixelX/5)},C=W(()=>t.height||t.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),A=W(()=>({width:e.bodyWidth.value?`${e.bodyWidth.value}px`:""})),S=()=>{C.value&&e.updateElsHeight(),e.updateColumnsWidth(),!(typeof window>"u")&&requestAnimationFrame(I)};Nt(async()=>{await ot(),n.updateColumns(),L(),requestAnimationFrame(S);const U=i.vnode.el,Y=i.refs.headerWrapper;t.flexible&&U&&U.parentElement&&(U.parentElement.style.minWidth="0"),l.value={width:d.value=U.offsetWidth,height:U.offsetHeight,headerHeight:t.showHeader&&Y?Y.offsetHeight:null},n.states.columns.value.forEach(z=>{z.filteredValue&&z.filteredValue.length&&i.store.commit("filterChange",{column:z,values:z.filteredValue,silent:!0})}),i.$ready=!0});const M=(U,Y)=>{if(!U)return;const z=Array.from(U.classList).filter(X=>!X.startsWith("is-scrolling-"));z.push(e.scrollX.value?Y:"is-scrolling-none"),U.className=z.join(" ")},P=U=>{const{tableWrapper:Y}=i.refs;M(Y,U)},T=U=>{const{tableWrapper:Y}=i.refs;return!!(Y&&Y.classList.contains(U))},I=function(){if(!i.refs.scrollBarRef)return;if(!e.scrollX.value){const Q="is-scrolling-none";T(Q)||P(Q);return}const U=i.refs.scrollBarRef.wrapRef;if(!U)return;const{scrollLeft:Y,offsetWidth:z,scrollWidth:X}=U,{headerWrapper:Z,footerWrapper:G}=i.refs;Z&&(Z.scrollLeft=Y),G&&(G.scrollLeft=Y),Y>=X-z-1?P("is-scrolling-right"):P(Y===0?"is-scrolling-left":"is-scrolling-middle")},L=()=>{i.refs.scrollBarRef&&(i.refs.scrollBarRef.wrapRef&&Hn(i.refs.scrollBarRef.wrapRef,"scroll",I,{passive:!0}),t.fit?Ts(i.vnode.el,R):Hn(window,"resize",R),Ts(i.refs.tableInnerWrapper,()=>{var U,Y;R(),(Y=(U=i.refs)==null?void 0:U.scrollBarRef)==null||Y.update()}))},R=()=>{var K,ae,ge,Ce;const U=i.vnode.el;if(!i.$ready||!U)return;let Y=!1;const{width:z,height:X,headerHeight:Z}=l.value,G=d.value=U.offsetWidth;z!==G&&(Y=!0);const Q=U.offsetHeight;(t.height||C.value)&&X!==Q&&(Y=!0);const ne=t.tableLayout==="fixed"?i.refs.headerWrapper:(K=i.refs.tableHeaderRef)==null?void 0:K.$el;t.showHeader&&(ne==null?void 0:ne.offsetHeight)!==Z&&(Y=!0),h.value=((ae=i.refs.tableWrapper)==null?void 0:ae.scrollHeight)||0,p.value=(ne==null?void 0:ne.scrollHeight)||0,m.value=((ge=i.refs.footerWrapper)==null?void 0:ge.offsetHeight)||0,b.value=((Ce=i.refs.appendWrapper)==null?void 0:Ce.offsetHeight)||0,f.value=h.value-p.value-m.value-b.value,Y&&(l.value={width:G,height:Q,headerHeight:t.showHeader&&(ne==null?void 0:ne.offsetHeight)||0},S())},V=Ii(),H=W(()=>{const{bodyWidth:U,scrollY:Y,gutterWidth:z}=e;return U.value?`${U.value-(Y.value?z:0)}px`:""}),F=W(()=>t.maxHeight?"fixed":t.tableLayout);return{isHidden:s,renderExpanded:o,setDragVisible:a,isGroup:c,handleMouseLeave:w,handleHeaderFooterMousewheel:k,tableSize:V,emptyBlockStyle:W(()=>{if(t.data&&t.data.length)return;let U="100%";t.height&&f.value&&(U=`${f.value}px`);const Y=d.value;return{width:Y?`${Y}px`:"",height:U}}),resizeProxyVisible:r,bodyWidth:H,resizeState:l,doLayout:S,tableBodyStyles:A,tableLayout:F,scrollbarViewStyle:u,scrollbarStyle:W(()=>t.height?{height:"100%"}:t.maxHeight?Number.isNaN(Number(t.maxHeight))?{maxHeight:`calc(${t.maxHeight} - ${p.value+m.value}px)`}:{maxHeight:`${+t.maxHeight-p.value-m.value}px`}:{})}}function j_e(t){let e;const n=()=>{const i=t.vnode.el.querySelector(".hidden-columns"),s={childList:!0,subtree:!0},o=t.store.states.updateOrderFns;e=new MutationObserver(()=>{o.forEach(r=>r())}),e.observe(i,s)};Nt(()=>{n()}),Sl(()=>{e==null||e.disconnect()})}var W_e={data:{type:Array,default:()=>[]},size:Zi,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,rowExpandable:{type:Function},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",checkStrictly:!1})},lazy:Boolean,load:Function,style:{type:[String,Object,Array],default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,appendFilterPanelTo:String,scrollbarTabindex:{type:[Number,String],default:void 0},allowDragLastColumn:{type:Boolean,default:!0},preserveExpandedContent:Boolean,nativeScrollbar:Boolean};function SF(t){const e=t.tableLayout==="auto";let n=t.columns||[];e&&n.every(({width:s})=>sn(s))&&(n=[]);const i=s=>{const o={key:`${t.tableLayout}_${s.id}`,style:{},name:void 0};return e?o.style={width:`${s.width}px`}:o.name=s.id,o};return bt("colgroup",{},n.map(s=>bt("col",i(s))))}SF.props=["columns","tableLayout"];const Y_e=()=>{const t=ee(),e=(o,r)=>{const a=t.value;a&&a.scrollTo(o,r)},n=(o,r)=>{const a=t.value;a&&wt(r)&&["Top","Left"].includes(o)&&a[`setScroll${o}`](r)};return{scrollBarRef:t,scrollTo:e,setScrollTop:o=>n("Top",o),setScrollLeft:o=>n("Left",o)}};let q_e=1;var G_e=fe({name:"ElTable",directives:{Mousewheel:yhe},components:{TableHeader:T_e,TableBody:F_e,TableFooter:z_e,ElScrollbar:zs,hColgroup:SF},props:W_e,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","scroll"],setup(t){const{t:e}=en(),n=Be("table"),i=Jc("table"),s=pt();Pt(ra,s);const o=v_e(s,t);s.store=o;const r=new y_e({store:s.store,table:s,fit:t.fit,showHeader:t.showHeader});s.layout=r;const a=W(()=>(o.states.data.value||[]).length===0),{setCurrentRow:l,getSelectionRows:c,toggleRowSelection:u,clearSelection:d,clearFilter:h,toggleAllSelection:f,toggleRowExpansion:p,clearSort:m,sort:b,updateKeyChildren:w}=H_e(o),{isHidden:k,renderExpanded:C,setDragVisible:A,isGroup:S,handleMouseLeave:M,handleHeaderFooterMousewheel:P,tableSize:T,emptyBlockStyle:I,resizeProxyVisible:L,bodyWidth:R,resizeState:V,doLayout:H,tableBodyStyles:F,tableLayout:U,scrollbarViewStyle:Y,scrollbarStyle:z}=U_e(t,r,o,s),{scrollBarRef:X,scrollTo:Z,setScrollLeft:G,setScrollTop:Q}=Y_e(),ne=yd(H,50),K=`${n.namespace.value}-table_${q_e++}`;s.tableId=K,s.state={isGroup:S,resizeState:V,doLayout:H,debouncedUpdateLayout:ne};const ae=W(()=>t.sumText??e("el.table.sumText")),ge=W(()=>t.emptyText??e("el.table.emptyText")),Ce=W(()=>{var ie;return t.tooltipEffect??((ie=i.value)==null?void 0:ie.tooltipEffect)}),oe=W(()=>{var ie;return t.tooltipOptions??((ie=i.value)==null?void 0:ie.tooltipOptions)}),pe=W(()=>xF(o.states.originColumns.value)[0]);return j_e(s),wn(()=>{ne.cancel()}),{ns:n,layout:r,store:o,columns:pe,handleHeaderFooterMousewheel:P,handleMouseLeave:M,tableId:K,tableSize:T,isHidden:k,isEmpty:a,renderExpanded:C,resizeProxyVisible:L,resizeState:V,isGroup:S,bodyWidth:R,tableBodyStyles:F,emptyBlockStyle:I,debouncedUpdateLayout:ne,setCurrentRow:l,getSelectionRows:c,toggleRowSelection:u,clearSelection:d,clearFilter:h,toggleAllSelection:f,toggleRowExpansion:p,clearSort:m,doLayout:H,sort:b,updateKeyChildren:w,t:e,setDragVisible:A,context:s,computedSumText:ae,computedEmptyText:ge,computedTooltipEffect:Ce,computedTooltipOptions:oe,tableLayout:U,scrollbarViewStyle:Y,scrollbarStyle:z,scrollBarRef:X,scrollTo:Z,setScrollLeft:G,setScrollTop:Q,allowDragLastColumn:t.allowDragLastColumn}}});const X_e=["data-prefix"],K_e={ref:"hiddenColumns",class:"hidden-columns"};function Z_e(t,e,n,i,s,o){const r=B("hColgroup"),a=B("table-header"),l=B("table-body"),c=B("table-footer"),u=B("el-scrollbar"),d=xt("mousewheel");return v(),$("div",{ref:"tableWrapper",class:q([{[t.ns.m("fit")]:t.fit,[t.ns.m("striped")]:t.stripe,[t.ns.m("border")]:t.border||t.isGroup,[t.ns.m("hidden")]:t.isHidden,[t.ns.m("group")]:t.isGroup,[t.ns.m("fluid-height")]:t.maxHeight,[t.ns.m("scrollable-x")]:t.layout.scrollX.value,[t.ns.m("scrollable-y")]:t.layout.scrollY.value,[t.ns.m("enable-row-hover")]:!t.store.states.isComplex.value,[t.ns.m("enable-row-transition")]:(t.store.states.data.value||[]).length!==0&&(t.store.states.data.value||[]).length<100,"has-footer":t.showSummary},t.ns.m(t.tableSize),t.className,t.ns.b(),t.ns.m(`layout-${t.tableLayout}`)]),style:Xe(t.style),"data-prefix":t.ns.namespace.value,onMouseleave:e[1]||(e[1]=(...h)=>t.handleMouseLeave&&t.handleMouseLeave(...h))},[g("div",{ref:"tableInnerWrapper",class:q(t.ns.e("inner-wrapper"))},[g("div",K_e,[le(t.$slots,"default")],512),t.showHeader&&t.tableLayout==="fixed"?Re((v(),$("div",{key:0,ref:"headerWrapper",class:q(t.ns.e("header-wrapper"))},[g("table",{ref:"tableHeader",class:q(t.ns.e("header")),style:Xe(t.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[_(r,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),_(a,{ref:"tableHeaderRef",border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,"allow-drag-last-column":t.allowDragLastColumn,onSetDragVisible:t.setDragVisible},null,8,["border","default-sort","store","append-filter-panel-to","allow-drag-last-column","onSetDragVisible"])],6)],2)),[[d,t.handleHeaderFooterMousewheel]]):O("v-if",!0),g("div",{ref:"bodyWrapper",class:q(t.ns.e("body-wrapper"))},[_(u,{ref:"scrollBarRef","view-style":t.scrollbarViewStyle,"wrap-style":t.scrollbarStyle,always:t.scrollbarAlwaysOn,tabindex:t.scrollbarTabindex,native:t.nativeScrollbar,onScroll:e[0]||(e[0]=h=>t.$emit("scroll",h))},{default:y(()=>[g("table",{ref:"tableBody",class:q(t.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:Xe({width:t.bodyWidth,tableLayout:t.tableLayout})},[_(r,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),t.showHeader&&t.tableLayout==="auto"?(v(),D(a,{key:0,ref:"tableHeaderRef",class:q(t.ns.e("body-header")),border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,onSetDragVisible:t.setDragVisible},null,8,["class","border","default-sort","store","append-filter-panel-to","onSetDragVisible"])):O("v-if",!0),_(l,{context:t.context,highlight:t.highlightCurrentRow,"row-class-name":t.rowClassName,"tooltip-effect":t.computedTooltipEffect,"tooltip-options":t.computedTooltipOptions,"row-style":t.rowStyle,store:t.store,stripe:t.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),t.showSummary&&t.tableLayout==="auto"?(v(),D(c,{key:1,class:q(t.ns.e("body-footer")),border:t.border,"default-sort":t.defaultSort,store:t.store,"sum-text":t.computedSumText,"summary-method":t.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):O("v-if",!0)],6),t.isEmpty?(v(),$("div",{key:0,ref:"emptyBlock",style:Xe(t.emptyBlockStyle),class:q(t.ns.e("empty-block"))},[g("span",{class:q(t.ns.e("empty-text"))},[le(t.$slots,"empty",{},()=>[N(x(t.computedEmptyText),1)])],2)],6)):O("v-if",!0),t.$slots.append?(v(),$("div",{key:1,ref:"appendWrapper",class:q(t.ns.e("append-wrapper"))},[le(t.$slots,"append")],2)):O("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex","native"])],2),t.showSummary&&t.tableLayout==="fixed"?Re((v(),$("div",{key:1,ref:"footerWrapper",class:q(t.ns.e("footer-wrapper"))},[g("table",{class:q(t.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:Xe(t.tableBodyStyles)},[_(r,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),_(c,{border:t.border,"default-sort":t.defaultSort,store:t.store,"sum-text":t.computedSumText,"summary-method":t.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[jt,!t.isEmpty],[d,t.handleHeaderFooterMousewheel]]):O("v-if",!0),t.border||t.isGroup?(v(),$("div",{key:2,class:q(t.ns.e("border-left-patch"))},null,2)):O("v-if",!0)],2),Re(g("div",{ref:"resizeProxy",class:q(t.ns.e("column-resize-proxy"))},null,2),[[jt,t.resizeProxyVisible]])],46,X_e)}var J_e=vi(G_e,[["render",Z_e]]);const Q_e={selection:"table-column--selection",expand:"table__expand-column"},eye={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:""}},tye=t=>Q_e[t]||"",nye={selection:{renderHeader({store:t}){function e(){return t.states.data.value&&t.states.data.value.length===0}return bt(qt,{disabled:e(),size:t.states.tableSize.value,indeterminate:t.states.selection.value.length>0&&!t.states.isAllSelected.value,"onUpdate:modelValue":t.toggleAllSelection??void 0,modelValue:t.states.isAllSelected.value,ariaLabel:t.t("el.table.selectAllLabel")})},renderCell({row:t,column:e,store:n,$index:i}){return bt(qt,{disabled:e.selectable?!e.selectable.call(null,t,i):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",t)},onClick:s=>s.stopPropagation(),modelValue:n.isSelected(t),ariaLabel:n.t("el.table.selectRowLabel")})},sortable:!1,resizable:!1},index:{renderHeader({column:t}){return t.label||"#"},renderCell({column:t,$index:e}){let n=e+1;const i=t.index;return wt(i)?n=e+i:et(i)&&(n=i(e)),bt("div",{},[n])},sortable:!1},expand:{renderHeader({column:t}){return t.label||""},renderCell({column:t,row:e,store:n,expanded:i,$index:s}){var c,u;const{ns:o}=n,r=[o.e("expand-icon")];!t.renderExpand&&i&&r.push(o.em("expand-icon","expanded"));const a=function(d){d.stopPropagation(),n.toggleRowExpansion(e)},l=((u=(c=n.states.rowExpandable).value)==null?void 0:u.call(c,e,s))??!0;return l||r.push(o.is("disabled")),bt("button",{type:"button",disabled:!l,"aria-label":n.t(i?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":i,class:r,onClick:a},{default:()=>t.renderExpand?[t.renderExpand({expanded:i,expandable:l})]:[bt(we,null,{default:()=>[bt(jr)]})]})},sortable:!1,resizable:!1}};function sye({row:t,column:e,$index:n}){var o;const i=e.property,s=i&&Ac(t,i).value;return e&&e.formatter?e.formatter(t,e,s,n):((o=s==null?void 0:s.toString)==null?void 0:o.call(s))||""}function iye({row:t,treeNode:e,store:n},i=!1){const{ns:s}=n;if(!e)return i?[bt("span",{class:s.e("placeholder")})]:null;const o=[],r=function(a){a.stopPropagation(),!e.loading&&n.loadOrToggle(t)};if(e.indent&&o.push(bt("span",{class:s.e("indent"),style:{"padding-left":`${e.indent}px`}})),Jn(e.expanded)&&!e.noLazyChildren){const a=[s.e("expand-icon"),e.expanded?s.em("expand-icon","expanded"):""];let l=jr;e.loading&&(l=Uf),o.push(bt("button",{type:"button","aria-label":n.t(e.expanded?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":e.expanded,class:a,onClick:r},{default:()=>[bt(we,{class:s.is("loading",e.loading)},{default:()=>[bt(l)]})]}))}else o.push(bt("span",{class:s.e("placeholder")}));return o}function OA(t,e){return t.reduce((n,i)=>(n[i]=i,n),e)}function oye(t,e){const n=pt();return{registerComplexWatchers:()=>{const o=["fixed"],r={realWidth:"width",realMinWidth:"minWidth"},a=OA(o,r);Object.keys(a).forEach(l=>{const c=r[l];zt(e,c)&&Te(()=>e[c],u=>{let d=u;c==="width"&&l==="realWidth"&&(d=T8(u)),c==="minWidth"&&l==="realMinWidth"&&(d=vF(u)),n.columnConfig.value[c]=d,n.columnConfig.value[l]=d;const h=c==="fixed";t.value.store.scheduleLayout(h)})})},registerNormalWatchers:()=>{const o=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip","tooltipFormatter","resizable"],r=["showOverflowTooltip"],a={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},l=OA(o,a);Object.keys(l).forEach(u=>{const d=a[u];zt(e,d)&&Te(()=>e[d],h=>{n.columnConfig.value[u]=h,(u==="filters"||u==="filterMethod")&&(n.columnConfig.value.filterable=!!(n.columnConfig.value.filters||n.columnConfig.value.filterMethod))})}),r.forEach(u=>{zt(t.value.props,u)&&Te(()=>t.value.props[u],d=>{n.columnConfig.value.type!=="selection"&&sn(e[u])&&(n.columnConfig.value[u]=d)})});const c=Jc("table");c.value&&zt(c.value,"showOverflowTooltip")&&Te(()=>{var u;return(u=c.value)==null?void 0:u.showOverflowTooltip},u=>{n.columnConfig.value.type!=="selection"&&(!sn(e.showOverflowTooltip)||!sn(t.value.props.showOverflowTooltip)||(n.columnConfig.value.showOverflowTooltip=u))})}}}function rye(t,e,n){const i=pt(),s=ee(""),o=ee(!1),r=ee(),a=ee(),l=Be("table");_l(()=>{r.value=t.align?`is-${t.align}`:null,r.value}),_l(()=>{a.value=t.headerAlign?`is-${t.headerAlign}`:r.value,a.value});const c=W(()=>{let A=i.vnode.vParent||i.parent;for(;A&&!A.tableId&&!A.columnId;)A=A.vnode.vParent||A.parent;return A}),u=W(()=>{const{store:A}=i.parent;if(!A)return!1;const{treeData:S}=A.states,M=S.value;return M&&Object.keys(M).length>0}),d=ee(T8(t.width)),h=ee(vF(t.minWidth)),f=A=>(d.value&&(A.width=d.value),h.value&&(A.minWidth=h.value),!d.value&&h.value&&(A.width=void 0),A.minWidth||(A.minWidth=80),A.realWidth=Number(sn(A.width)?A.minWidth:A.width),A),p=A=>{const S=A.type,M=nye[S]||{};Object.keys(M).forEach(T=>{const I=M[T];T!=="className"&&!sn(I)&&(A[T]=I)});const P=tye(S);if(P){const T=`${E(l.namespace)}-${P}`;A.className=A.className?`${A.className} ${T}`:T}return A},m=A=>{Ee(A)?A.forEach(M=>S(M)):S(A);function S(M){var P;((P=M==null?void 0:M.type)==null?void 0:P.name)==="ElTableColumn"&&(M.vParent=i)}};return{columnId:s,realAlign:r,isSubColumn:o,realHeaderAlign:a,columnOrTableParent:c,setColumnWidth:f,setColumnForcedProps:p,setColumnRenders:A=>{t.renderHeader?Tt("TableColumn","Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header."):A.type!=="selection"&&(A.renderHeader=M=>{if(i.columnConfig.value.label,e.header){const P=e.header(M);if(bF(P))return bt(J,P)}return N(A.label)}),e["filter-icon"]&&(A.renderFilterIcon=M=>le(e,"filter-icon",M)),e.expand&&(A.renderExpand=M=>le(e,"expand",M));let S=A.renderCell;return A.type==="expand"?(A.renderCell=M=>bt("div",{class:"cell"},[S(M)]),n.value.renderExpanded=M=>e.default?e.default(M):e.default):(S=S||sye,A.renderCell=M=>{let P=null;if(e.default){const V=e.default(M);P=V.some(H=>H.type!==Zn)?V:S(M)}else P=S(M);const{columns:T}=n.value.store.states,I=T.value.findIndex(V=>V.type==="default"),L=iye(M,u.value&&M.cellIndex===I),R={class:"cell",style:{}};return A.showOverflowTooltip&&(R.class=`${R.class} ${E(l.namespace)}-tooltip`,R.style={width:`${(M.column.realWidth||Number(M.column.width))-1}px`}),m(P),bt("div",R,[L,P])}),A},getPropsData:(...A)=>A.reduce((S,M)=>(Ee(M)&&M.forEach(P=>{S[P]=t[P]}),S),{}),getColumnElIndex:(A,S)=>Array.prototype.indexOf.call(A,S),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",i.columnConfig.value)}}}var aye={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},tooltipFormatter:Function,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:t=>t.every(e=>["ascending","descending",null].includes(e))}};let lye=1;var cye=fe({name:"ElTableColumn",components:{ElCheckbox:qt},props:aye,setup(t,{slots:e}){const n=pt(),i=Jc("table"),s=ee({}),o=W(()=>{let A=n.parent;for(;A&&!A.tableId;)A=A.parent;return A}),{registerNormalWatchers:r,registerComplexWatchers:a}=oye(o,t),{columnId:l,isSubColumn:c,realHeaderAlign:u,columnOrTableParent:d,setColumnWidth:h,setColumnForcedProps:f,setColumnRenders:p,getPropsData:m,getColumnElIndex:b,realAlign:w,updateColumnOrder:k}=rye(t,e,o),C=d.value;l.value=`${"tableId"in C&&C.tableId||"columnId"in C&&C.columnId}_column_${lye++}`,Dd(()=>{var L,R;c.value=o.value!==C;const A=t.type||"default",S=t.sortable===""?!0:t.sortable,M=A==="selection"?!1:sn(t.showOverflowTooltip)?C.props.showOverflowTooltip??((L=i.value)==null?void 0:L.showOverflowTooltip):t.showOverflowTooltip,P=sn(t.tooltipFormatter)?C.props.tooltipFormatter??((R=i.value)==null?void 0:R.tooltipFormatter):t.tooltipFormatter,T={...eye[A],id:l.value,type:A,property:t.prop||t.property,align:w,headerAlign:u,showOverflowTooltip:M,tooltipFormatter:P,filterable:t.filters||t.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:S,index:t.index,rawColumnKey:n.vnode.key};let I=m(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);I=o_e(T,I),I=a_e(p,h,f)(I),s.value=I,r(),a()}),Nt(()=>{var P,T;const A=d.value,S=c.value?(P=A.vnode.el)==null?void 0:P.children:(T=A.refs.hiddenColumns)==null?void 0:T.children,M=()=>b(S||[],n.vnode.el);s.value.getColumnIndex=M,M()>-1&&o.value.store.commit("insertColumn",s.value,c.value?"columnConfig"in A&&A.columnConfig.value:null,k)}),wn(()=>{const A=s.value.getColumnIndex;(A?A():-1)>-1&&o.value.store.commit("removeColumn",s.value,c.value?"columnConfig"in C&&C.columnConfig.value:null,k)}),n.columnId=l.value,n.columnConfig=s},render(){var t,e,n;try{const i=(e=(t=this.$slots).default)==null?void 0:e.call(t,{row:{},column:{},$index:-1}),s=[];if(Ee(i))for(const o of i)((n=o.type)==null?void 0:n.name)==="ElTableColumn"||o.shapeFlag&2?s.push(o):o.type===J&&Ee(o.children)&&o.children.forEach(r=>{(r==null?void 0:r.patchFlag)!==1024&&!Ke(r==null?void 0:r.children)&&s.push(r)});return bt("div",s)}catch{return bt("div",[])}}}),$F=cye;const Pl=Gt(J_e,{TableColumn:$F}),Il=Os($F),u2=Symbol("tabsRootContextKey"),uye=Ge({tabs:{type:de(Array),default:()=>li([])},tabRefs:{type:de(Object),default:()=>li({})}}),DA="ElTabBar";var dye=fe({name:DA,__name:"tab-bar",props:uye,setup(t,{expose:e}){const n=t,i=qe(u2);i||vo(DA,"<el-tabs><el-tab-bar /></el-tabs>");const s=Be("tabs"),o=ee(),r=ee(),a=W(()=>{var f;return sn(i.props.defaultValue)||!!((f=r.value)!=null&&f.transform)}),l=()=>{let f=0,p=0;const m=["top","bottom"].includes(i.props.tabPosition)?"width":"height",b=m==="width"?"x":"y",w=b==="x"?"left":"top";return n.tabs.every(k=>{if(sn(k.paneName))return!1;const C=n.tabRefs[k.paneName];if(!C)return!1;if(!k.active)return!0;f=C[`offset${Aw(w)}`],p=C[`client${Aw(m)}`];const A=window.getComputedStyle(C);return m==="width"&&(p-=Number.parseFloat(A.paddingLeft)+Number.parseFloat(A.paddingRight),f+=Number.parseFloat(A.paddingLeft)),!1}),{[m]:`${p}px`,transform:`translate${Aw(b)}(${f}px)`}},c=()=>r.value=l(),u=[],d=()=>{u.forEach(f=>f.stop()),u.length=0,Object.values(n.tabRefs).forEach(f=>{u.push(Ts(f,c))})};Te(()=>n.tabs,async()=>{await ot(),c(),d()},{immediate:!0});const h=Ts(o,()=>c());return wn(()=>{u.forEach(f=>f.stop()),u.length=0,h.stop()}),e({ref:o,update:c}),(f,p)=>a.value?(v(),$("div",{key:0,ref_key:"barRef",ref:o,class:q([E(s).e("active-bar"),E(s).is(E(i).props.tabPosition)]),style:Xe(r.value)},null,6)):O("v-if",!0)}}),hye=dye;const fye=Ge({panes:{type:de(Array),default:()=>li([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean,tabindex:{type:[String,Number],default:void 0}}),pye={tabClick:(t,e,n)=>n instanceof Event,tabRemove:(t,e)=>e instanceof Event},RA="ElTabNav",mye=fe({name:RA,props:fye,emits:pye,setup(t,{expose:e,emit:n}){const i=qe(u2);i||vo(RA,"<el-tabs><tab-nav /></el-tabs>");const s=Be("tabs"),o=Fie(),r=zie(),a=ee(),l=ee(),c=ee(),u=ee({}),d=ee(),h=ee(!1),f=ee(0),p=ee(!1),m=ee(!0),b=ee(!1),w=Fn(),k=W(()=>["top","bottom"].includes(i.props.tabPosition)),C=W(()=>k.value?"width":"height"),A=W(()=>{const ne=C.value==="width"?"X":"Y";return{transition:b.value?"none":void 0,transform:`translate${ne}(-${f.value}px)`}}),{width:S,height:M}=y$(a),{width:P,height:T}=y$(l,{width:0,height:0},{box:"border-box"}),I=W(()=>k.value?S.value:M.value),L=W(()=>k.value?P.value:T.value),{onWheel:R}=Hve({atStartEdge:W(()=>f.value<=0),atEndEdge:W(()=>L.value-f.value<=I.value),layout:W(()=>k.value?"horizontal":"vertical")},ne=>{f.value=GO(f.value+ne,0,L.value-I.value)}),V=ne=>{b.value=!0,R(ne),Kg(()=>{b.value=!1})},H=()=>{if(!a.value)return;const ne=a.value.getBoundingClientRect()[C.value],K=f.value;K&&(f.value=K>ne?K-ne:0)},F=()=>{if(!a.value||!l.value)return;const ne=l.value.getBoundingClientRect()[C.value],K=a.value.getBoundingClientRect()[C.value],ae=f.value;cf(ne-ae,K)&&(f.value=ne-ae>K*2?ae+K:ne-K)},U=async()=>{const ne=l.value;if(!h.value||!c.value||!a.value||!ne)return;await ot();const K=u.value[t.currentName];if(!K)return;const ae=a.value,ge=K.getBoundingClientRect(),Ce=ae.getBoundingClientRect(),oe=Ce.left+1,pe=Ce.right-1,ie=ne.getBoundingClientRect(),re=k.value?ie.width-Ce.width:ie.height-Ce.height,ke=f.value;let je=ke;k.value?(ge.left<oe&&(je=ke-(oe-ge.left)),ge.right>pe&&(je=ke+ge.right-pe)):(ge.top<Ce.top&&(je=ke-(Ce.top-ge.top)),ge.bottom>Ce.bottom&&(je=ke+(ge.bottom-Ce.bottom))),je=Math.max(je,0),f.value=Math.min(je,re)},Y=()=>{var ge;if(!l.value||!a.value)return;t.stretch&&((ge=d.value)==null||ge.update());const ne=l.value.getBoundingClientRect()[C.value],K=a.value.getBoundingClientRect()[C.value],ae=f.value;K<ne?(h.value=h.value||{},h.value.prev=ae,h.value.next=cf(ne,ae+K),cf(K,ne-ae)&&(f.value=ne-K)):(h.value=!1,ae>0&&(f.value=0))},z=ne=>{const K=ls(ne);let ae=0;switch(K){case Ue.left:case Ue.up:ae=-1;break;case Ue.right:case Ue.down:ae=1;break;default:return}const ge=Array.from(ne.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let Ce=ge.indexOf(ne.target)+ae;Ce<0?Ce=ge.length-1:Ce>=ge.length&&(Ce=0),ge[Ce].focus({preventScroll:!0}),ge[Ce].click(),X()},X=()=>{m.value&&(p.value=!0)},Z=()=>p.value=!1,G=(ne,K)=>{u.value[K]=ne},Q=async()=>{var ne;await ot(),(ne=u.value[t.currentName])==null||ne.focus({preventScroll:!0})};return Te(o,ne=>{ne==="hidden"?m.value=!1:ne==="visible"&&setTimeout(()=>m.value=!0,50)}),Te(r,ne=>{ne?setTimeout(()=>m.value=!0,50):m.value=!1}),Ts(c,()=>{Kg(Y)}),Nt(()=>setTimeout(()=>U(),0)),xl(()=>Y()),e({scrollToActiveTab:U,removeFocus:Z,focusActiveTab:Q,tabListRef:l,tabBarRef:d,scheduleRender:()=>Ym(w)}),()=>{const ne=h.value?[_("span",{class:[s.e("nav-prev"),s.is("disabled",!h.value.prev)],onClick:H},[_(we,null,{default:()=>[_(wd,null,null)]})]),_("span",{class:[s.e("nav-next"),s.is("disabled",!h.value.next)],onClick:F},[_(we,null,{default:()=>[_(jr,null,null)]})])]:null,K=t.panes.map((ae,ge)=>{var te,se;const Ce=ae.uid,oe=ae.props.disabled,pe=ae.props.name??ae.index??`${ge}`,ie=!oe&&(ae.isClosable||ae.props.closable!==!1&&t.editable);ae.index=`${ge}`;const re=ie?_(we,{class:"is-icon-close",onClick:me=>n("tabRemove",ae,me)},{default:()=>[_(Ho,null,null)]}):null,ke=((se=(te=ae.slots).label)==null?void 0:se.call(te))||ae.props.label,je=!oe&&ae.active?t.tabindex??i.props.tabindex:-1;return _("div",{ref:me=>G(me,pe),class:[s.e("item"),s.is(i.props.tabPosition),s.is("active",ae.active),s.is("disabled",oe),s.is("closable",ie),s.is("focus",p.value)],id:`tab-${pe}`,key:`tab-${Ce}`,"aria-controls":`pane-${pe}`,role:"tab","aria-selected":ae.active,tabindex:je,onFocus:()=>X(),onBlur:()=>Z(),onClick:me=>{Z(),n("tabClick",ae,pe,me)},onKeydown:me=>{const $e=ls(me);ie&&($e===Ue.delete||$e===Ue.backspace)&&n("tabRemove",ae,me)}},[ke,re])});return w.value,_("div",{ref:c,class:[s.e("nav-wrap"),s.is("scrollable",!!h.value),s.is(i.props.tabPosition)]},[ne,_("div",{class:s.e("nav-scroll"),ref:a},[t.panes.length>0?_("div",{class:[s.e("nav"),s.is(i.props.tabPosition),s.is("stretch",t.stretch&&["top","bottom"].includes(i.props.tabPosition))],ref:l,style:A.value,role:"tablist",onKeydown:z,onWheel:V},[t.type?null:_(hye,{ref:d,tabs:[...t.panes],tabRefs:u.value},null),K]):null])])}}}),gye=Ge({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},defaultValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:de(Function),default:()=>!0},stretch:Boolean,tabindex:{type:[String,Number],default:0}}),Yw=t=>Ke(t)||wt(t),vye={[Mt]:t=>Yw(t),tabClick:(t,e)=>e instanceof Event,tabChange:t=>Yw(t),edit:(t,e)=>["remove","add"].includes(e),tabRemove:t=>Yw(t),tabAdd:()=>!0},_ye=fe({name:"ElTabs",props:gye,emits:vye,setup(t,{emit:e,slots:n,expose:i}){const s=Be("tabs"),o=W(()=>["left","right"].includes(t.tabPosition)),{children:r,addChild:a,removeChild:l,ChildrenSorter:c}=Zre(pt(),"ElTabPane"),u=ee(),d=ee((sn(t.modelValue)?t.defaultValue:t.modelValue)??"0"),h=async(k,C=!1)=>{var A,S,M,P;if(!(d.value===k||sn(k)))try{let T;if(t.beforeLeave){const I=t.beforeLeave(k,d.value);T=I instanceof Promise?await I:I}else T=!0;if(T!==!1){const I=(A=r.value.find(L=>L.paneName===d.value))==null?void 0:A.isFocusInsidePane();d.value=k,C&&(e(Mt,k),e("tabChange",k)),(M=(S=u.value)==null?void 0:S.removeFocus)==null||M.call(S),I&&((P=u.value)==null||P.focusActiveTab())}}catch{}},f=(k,C,A)=>{k.props.disabled||(e("tabClick",k,A),h(C,!0))},p=(k,C)=>{k.props.disabled||sn(k.props.name)||(C.stopPropagation(),e("edit",k.props.name,"remove"),e("tabRemove",k.props.name))},m=()=>{e("edit",void 0,"add"),e("tabAdd")},b=k=>{const C=ls(k);[Ue.enter,Ue.numpadEnter].includes(C)&&m()},w=k=>{const C=k.el.firstChild,A=["bottom","right"].includes(t.tabPosition)?k.children[0].el:k.children[1].el;C!==A&&C.before(A)};return Te(()=>t.modelValue,k=>h(k)),Te(d,async()=>{var k;await ot(),(k=u.value)==null||k.scrollToActiveTab()}),Pt(u2,{props:t,currentName:d,registerPane:a,unregisterPane:l,nav$:u}),i({currentName:d,get tabNavRef(){return Yb(u.value,["scheduleRender"])}}),()=>{const k=n["add-icon"],C=t.editable||t.addable?_("div",{class:[s.e("new-tab"),o.value&&s.e("new-tab-vertical")],tabindex:t.tabindex,onClick:m,onKeydown:b},[k?le(n,"add-icon"):_(we,{class:s.is("icon-plus")},{default:()=>[_(e8,null,null)]})]):null,A=()=>_(mye,{ref:u,currentName:d.value,editable:t.editable,type:t.type,panes:r.value,stretch:t.stretch,onTabClick:f,onTabRemove:p},null),S=_("div",{class:[s.e("header"),o.value&&s.e("header-vertical"),s.is(t.tabPosition)]},[_(c,null,{default:A,$stable:!0}),C]),M=_("div",{class:s.e("content")},[le(n,"default")]);return _("div",{class:[s.b(),s.m(t.tabPosition),{[s.m("card")]:t.type==="card",[s.m("border-card")]:t.type==="border-card"}],onVnodeMounted:w,onVnodeUpdated:w},[M,S])}}}),yye=Ge({label:{type:String,default:""},name:{type:[String,Number]},closable:{type:Boolean,default:void 0},disabled:Boolean,lazy:Boolean}),bye=["id","aria-hidden","aria-labelledby"],VA="ElTabPane";var wye=fe({name:VA,__name:"tab-pane",props:yye,setup(t){const e=t,n=pt(),i=gi(),s=qe(u2);s||vo(VA,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const o=Be("tab-pane"),r=ee(),a=ee(),l=W(()=>e.closable??s.props.closable),c=W(()=>s.currentName.value===(e.name??a.value)),u=ee(c.value),d=W(()=>e.name??a.value),h=W(()=>!e.lazy||u.value||c.value),f=()=>{var m;return(m=r.value)==null?void 0:m.contains(document.activeElement)};Te(c,m=>{m&&(u.value=!0)});const p=In({uid:n.uid,getVnode:()=>n.vnode,slots:i,props:e,paneName:d,active:c,index:a,isClosable:l,isFocusInsidePane:f});return s.registerPane(p),wn(()=>{s.unregisterPane(p)}),Eb(()=>{var m;i.label&&((m=s.nav$.value)==null||m.scheduleRender())}),(m,b)=>h.value?Re((v(),$("div",{key:0,id:`pane-${d.value}`,ref_key:"paneRef",ref:r,class:q(E(o).b()),role:"tabpanel","aria-hidden":!c.value,"aria-labelledby":`tab-${d.value}`},[le(m.$slots,"default")],10,bye)),[[jt,c.value]]):O("v-if",!0)}}),AF=wye;const d2=Gt(_ye,{TabPane:AF}),h2=Os(AF),IC="00:30",kye=Ge({format:{type:String,default:"HH:mm"},modelValue:{type:de(String)},disabled:{type:Boolean,default:void 0},editable:{type:Boolean,default:!0},effect:{type:de(String),default:"light"},clearable:{type:Boolean,default:!0},size:Zi,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:IC},minTime:{type:de(String)},maxTime:{type:de(String)},includeEndTime:Boolean,name:String,prefixIcon:{type:de([String,Object]),default:()=>pR},clearIcon:{type:de([String,Object]),default:()=>Zc},popperClass:{type:String,default:""},popperStyle:{type:de([String,Object])},...H1}),ol=t=>{const e=(t||"").split(":");if(e.length>=2){let n=Number.parseInt(e[0],10);const i=Number.parseInt(e[1],10),s=t.toUpperCase();return s.includes("AM")&&n===12?n=0:s.includes("PM")&&n!==12&&(n+=12),{hours:n,minutes:i}}return null},qw=(t,e)=>{const n=ol(t);if(!n)return-1;const i=ol(e);if(!i)return-1;const s=n.minutes+n.hours*60,o=i.minutes+i.hours*60;return s===o?0:s>o?1:-1},FA=t=>`${t}`.padStart(2,"0"),Eh=t=>`${FA(t.hours)}:${FA(t.minutes)}`,Cye=(t,e)=>{const n=ol(t);if(!n)return"";const i=ol(e);if(!i)return"";const s={hours:n.hours,minutes:n.minutes};return s.minutes+=i.minutes,s.hours+=i.hours,s.hours+=Math.floor(s.minutes/60),s.minutes=s.minutes%60,Eh(s)};var xye=fe({name:"ElTimeSelect",__name:"time-select",props:kye,emits:[dn,"blur","focus","clear",Mt],setup(t,{expose:e}){ft.extend(fV);const{Option:n}=Wt,i=t,s=Be("input"),o=ee(),r=bs(),{lang:a}=en(),l=W(()=>i.modelValue),c=W(()=>{const w=ol(i.start);return w?Eh(w):null}),u=W(()=>{const w=ol(i.end);return w?Eh(w):null}),d=W(()=>{const w=ol(i.minTime||"");return w?Eh(w):null}),h=W(()=>{const w=ol(i.maxTime||"");return w?Eh(w):null}),f=W(()=>{const w=ol(i.step),k=!w||w.hours<0||w.minutes<0||Number.isNaN(w.hours)||Number.isNaN(w.minutes)||w.hours===0&&w.minutes===0;return k&&Tt("ElTimeSelect",`invalid step, fallback to default step (${IC}).`),k?IC:Eh(w)}),p=W(()=>{var C;const w=[],k=(A,S)=>{w.push({value:A,rawValue:S,disabled:qw(S,d.value||"-1:-1")<=0||qw(S,h.value||"100:100")>=0})};if(i.start&&i.end&&i.step){let A=c.value,S;for(;A&&u.value&&qw(A,u.value)<=0;)S=ft(A,"HH:mm").locale(a.value).format(i.format),k(S,A),A=Cye(A,f.value);i.includeEndTime&&u.value&&((C=w[w.length-1])==null?void 0:C.rawValue)!==u.value&&k(ft(u.value,"HH:mm").locale(a.value).format(i.format),u.value)}return w});return e({blur:()=>{var w,k;(k=(w=o.value)==null?void 0:w.blur)==null||k.call(w)},focus:()=>{var w,k;(k=(w=o.value)==null?void 0:w.focus)==null||k.call(w)}}),(w,k)=>(v(),D(E(Wt),{ref_key:"select",ref:o,name:t.name,"model-value":l.value,disabled:E(r),clearable:t.clearable,"clear-icon":t.clearIcon,size:t.size,effect:t.effect,placeholder:t.placeholder,"default-first-option":"",filterable:t.editable,"empty-values":t.emptyValues,"value-on-clear":t.valueOnClear,"popper-class":t.popperClass,"popper-style":t.popperStyle,"onUpdate:modelValue":k[0]||(k[0]=C=>w.$emit(E(Mt),C)),onChange:k[1]||(k[1]=C=>w.$emit(E(dn),C)),onBlur:k[2]||(k[2]=C=>w.$emit("blur",C)),onFocus:k[3]||(k[3]=C=>w.$emit("focus",C)),onClear:k[4]||(k[4]=()=>w.$emit("clear"))},{prefix:y(()=>[t.prefixIcon?(v(),D(E(we),{key:0,class:q(E(s).e("prefix-icon"))},{default:y(()=>[(v(),D(Ct(t.prefixIcon)))]),_:1},8,["class"])):O("v-if",!0)]),default:y(()=>[(v(!0),$(J,null,ye(p.value,C=>(v(),D(E(n),{key:C.value,label:C.value,value:C.value,disabled:C.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["name","model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear","popper-class","popper-style"]))}}),Sye=xye;const D8=Gt(Sye),$ye="ElUpload";var Aye=class extends Error{constructor(t,e,n,i){super(t),this.name="UploadAjaxError",this.status=e,this.method=n,this.url=i}};function NA(t,e,n){let i;return n.response?i=`${n.response.error||n.response}`:n.responseText?i=`${n.responseText}`:i=`fail to ${e.method} ${t} ${n.status}`,new Aye(i,n.status,e.method,t)}function Eye(t){const e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}const Mye=t=>{typeof XMLHttpRequest>"u"&&vo($ye,"XMLHttpRequest is undefined");const e=new XMLHttpRequest,n=t.action;e.upload&&e.upload.addEventListener("progress",o=>{const r=o;r.percent=o.total>0?o.loaded/o.total*100:0,t.onProgress(r)});const i=new FormData;if(t.data)for(const[o,r]of Object.entries(t.data))Ee(r)?r.length===2&&r[0]instanceof Blob&&Ke(r[1])?i.append(o,r[0],r[1]):r.forEach(a=>{i.append(o,a)}):i.append(o,r);i.append(t.filename,t.file,t.file.name),e.addEventListener("error",()=>{t.onError(NA(n,t,e))}),e.addEventListener("load",()=>{if(e.status<200||e.status>=300)return t.onError(NA(n,t,e));t.onSuccess(Eye(e))}),e.open(t.method,n,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);const s=t.headers||{};if(s instanceof Headers)s.forEach((o,r)=>e.setRequestHeader(r,o));else for(const[o,r]of Object.entries(s))hi(r)||e.setRequestHeader(o,String(r));return e.send(i),e},EF=["text","picture","picture-card"];let Tye=1;const LC=()=>Date.now()+Tye++,MF=Ge({action:{type:String,default:"#"},headers:{type:de(Object)},method:{type:String,default:"post"},data:{type:de([Object,Function,Promise]),default:()=>li({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:de(Array),default:()=>li([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:EF,default:"text"},httpRequest:{type:de(Function),default:Mye},disabled:{type:Boolean,default:void 0},limit:Number,directory:Boolean}),Pye=Ge({...MF,beforeUpload:{type:de(Function),default:Dt},beforeRemove:{type:de(Function)},onRemove:{type:de(Function),default:Dt},onChange:{type:de(Function),default:Dt},onPreview:{type:de(Function),default:Dt},onSuccess:{type:de(Function),default:Dt},onProgress:{type:de(Function),default:Dt},onError:{type:de(Function),default:Dt},onExceed:{type:de(Function),default:Dt},crossorigin:{type:de(String)}}),TF=Symbol("uploadContextKey"),Iye=Ge({files:{type:de(Array),default:()=>li([])},disabled:{type:Boolean,default:void 0},handlePreview:{type:de(Function),default:Dt},listType:{type:String,values:EF,default:"text"},crossorigin:{type:de(String)}}),Lye={remove:t=>!!t},Oye=Ge({...MF,beforeUpload:{type:de(Function),default:Dt},onRemove:{type:de(Function),default:Dt},onStart:{type:de(Function),default:Dt},onSuccess:{type:de(Function),default:Dt},onProgress:{type:de(Function),default:Dt},onError:{type:de(Function),default:Dt},onExceed:{type:de(Function),default:Dt}}),Dye=Ge({disabled:{type:Boolean,default:void 0},directory:Boolean}),Rye={file:t=>Ee(t)},Vye=["tabindex","aria-disabled","onKeydown"],Fye=["src","crossorigin"],Nye=["onClick"],Bye=["title"],zye=["onClick"],Hye=["onClick"];var Uye=fe({name:"ElUploadList",__name:"upload-list",props:Iye,emits:Lye,setup(t,{emit:e}){const n=t,i=e,{t:s}=en(),o=Be("upload"),r=Be("icon"),a=Be("list"),l=bs(),c=ee(!1),u=W(()=>[o.b("list"),o.bm("list",n.listType),o.is("disabled",l.value)]),d=h=>{i("remove",h)};return(h,f)=>(v(),D(Lb,{tag:"ul",class:q(u.value),name:E(a).b()},{default:y(()=>[(v(!0),$(J,null,ye(t.files,(p,m)=>(v(),$("li",{key:p.uid||p.name,class:q([E(o).be("list","item"),E(o).is(p.status),{focusing:c.value}]),tabindex:E(l)?void 0:0,"aria-disabled":E(l),role:"button",onKeydown:ut(b=>!E(l)&&d(p),["delete"]),onFocus:f[0]||(f[0]=b=>c.value=!0),onBlur:f[1]||(f[1]=b=>c.value=!1),onClick:f[2]||(f[2]=b=>c.value=!1)},[le(h.$slots,"default",{file:p,index:m},()=>[t.listType==="picture"||p.status!=="uploading"&&t.listType==="picture-card"?(v(),$("img",{key:0,class:q(E(o).be("list","item-thumbnail")),src:p.url,crossorigin:t.crossorigin,alt:""},null,10,Fye)):O("v-if",!0),p.status==="uploading"||t.listType!=="picture-card"?(v(),$("div",{key:1,class:q(E(o).be("list","item-info"))},[g("a",{class:q(E(o).be("list","item-name")),onClick:Me(b=>t.handlePreview(p),["prevent"])},[_(E(we),{class:q(E(r).m("document"))},{default:y(()=>[_(E(U1))]),_:1},8,["class"]),g("span",{class:q(E(o).be("list","item-file-name")),title:p.name},x(p.name),11,Bye)],10,Nye),p.status==="uploading"?(v(),D(E(c2),{key:0,type:t.listType==="picture-card"?"circle":"line","stroke-width":t.listType==="picture-card"?6:2,percentage:Number(p.percentage),style:Xe(t.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):O("v-if",!0)],2)):O("v-if",!0),g("label",{class:q(E(o).be("list","item-status-label"))},[t.listType==="text"?(v(),D(E(we),{key:0,class:q([E(r).m("upload-success"),E(r).m("circle-check")])},{default:y(()=>[_(E(J4))]),_:1},8,["class"])):["picture-card","picture"].includes(t.listType)?(v(),D(E(we),{key:1,class:q([E(r).m("upload-success"),E(r).m("check")])},{default:y(()=>[_(E(Z4))]),_:1},8,["class"])):O("v-if",!0)],2),E(l)?O("v-if",!0):(v(),D(E(we),{key:2,class:q(E(r).m("close")),"aria-label":E(s)("el.upload.delete"),role:"button",tabindex:"0",onClick:b=>d(p),onKeydown:ut(Me(b=>d(p),["prevent"]),["enter","space"])},{default:y(()=>[_(E(Ho))]),_:1},8,["class","aria-label","onClick","onKeydown"])),E(l)?O("v-if",!0):(v(),$("i",{key:3,class:q(E(r).m("close-tip"))},x(E(s)("el.upload.deleteTip")),3)),t.listType==="picture-card"?(v(),$("span",{key:4,class:q(E(o).be("list","item-actions"))},[g("span",{class:q(E(o).be("list","item-preview")),onClick:b=>t.handlePreview(p)},[_(E(we),{class:q(E(r).m("zoom-in"))},{default:y(()=>[_(E(CR))]),_:1},8,["class"])],10,zye),E(l)?O("v-if",!0):(v(),$("span",{key:0,class:q(E(o).be("list","item-delete")),onClick:b=>d(p)},[_(E(we),{class:q(E(r).m("delete"))},{default:y(()=>[_(E(mp))]),_:1},8,["class"])],10,Hye))],2)):O("v-if",!0)])],42,Vye))),128)),le(h.$slots,"append")]),_:3},8,["class","name"]))}}),BA=Uye;const zA="ElUploadDrag";var jye=fe({name:zA,__name:"upload-dragger",props:Dye,emits:Rye,setup(t,{emit:e}){const n=t,i=e;qe(TF)||vo(zA,"usage: <el-upload><el-upload-dragger /></el-upload>");const s=Be("upload"),o=ee(!1),r=bs(),a=h=>new Promise((f,p)=>h.file(f,p)),l=async h=>{try{if(h.isFile){const f=await a(h);return f.isDirectory=!1,[f]}if(h.isDirectory){const f=h.createReader(),p=()=>new Promise((k,C)=>f.readEntries(k,C)),m=[];let b=await p();for(;b.length>0;)m.push(...b),b=await p();const w=m.map(k=>l(k).catch(()=>[]));return g0(await Promise.all(w))}}catch{return[]}return[]},c=async h=>{if(r.value)return;o.value=!1,h.stopPropagation();const f=Array.from(h.dataTransfer.files),p=h.dataTransfer.items||[];if(n.directory){const m=Array.from(p).map(b=>{var w;return(w=b==null?void 0:b.webkitGetAsEntry)==null?void 0:w.call(b)}).filter(b=>b);i("file",g0(await Promise.all(m.map(l))));return}f.forEach((m,b)=>{var k,C;const w=(C=(k=p[b])==null?void 0:k.webkitGetAsEntry)==null?void 0:C.call(k);w&&(m.isDirectory=w.isDirectory)}),i("file",f)},u=()=>{r.value||(o.value=!0)},d=h=>{h.currentTarget.contains(h.relatedTarget)||(o.value=!1)};return(h,f)=>(v(),$("div",{class:q([E(s).b("dragger"),E(s).is("dragover",o.value)]),onDrop:Me(c,["prevent"]),onDragover:Me(u,["prevent"]),onDragleave:Me(d,["prevent"])},[le(h.$slots,"default")],34))}}),Wye=jye;const Yye=["tabindex","aria-disabled","onKeydown"],qye=["name","disabled","multiple","accept","webkitdirectory"];var Gye=fe({name:"ElUploadContent",inheritAttrs:!1,__name:"upload-content",props:Oye,setup(t,{expose:e}){const n=t,i=Be("upload"),s=bs(),o=Fn({}),r=Fn(),a=m=>{if(m.length===0)return;const{autoUpload:b,limit:w,fileList:k,multiple:C,onStart:A,onExceed:S}=n;if(w&&k.length+m.length>w){S(m,k);return}C||(m=m.slice(0,1));for(const M of m){const P=M;P.uid=LC(),A(P),b&&l(P)}},l=async m=>{if(r.value.value="",!n.beforeUpload)return u(m);let b,w={};try{const C=n.data,A=n.beforeUpload(m);w=fd(n.data)?ed(n.data):n.data,b=await A,fd(n.data)&&Wi(C,w)&&(w=ed(n.data))}catch{b=!1}if(b===!1){n.onRemove(m);return}let k=m;b instanceof Blob&&(b instanceof File?k=b:k=new File([b],m.name,{type:m.type})),u(Object.assign(k,{uid:m.uid}),w)},c=async(m,b)=>et(m)?m(b):m,u=async(m,b)=>{const{headers:w,data:k,method:C,withCredentials:A,name:S,action:M,onProgress:P,onSuccess:T,onError:I,httpRequest:L}=n;try{b=await c(b??k,m)}catch{n.onRemove(m);return}const{uid:R}=m,V={headers:w||{},withCredentials:A,file:m,data:b,method:C,filename:S,action:M,onProgress:F=>{P(F,m)},onSuccess:F=>{T(F,m),delete o.value[R]},onError:F=>{I(F,m),delete o.value[R]}},H=L(V);o.value[R]=H,H instanceof Promise&&H.then(V.onSuccess,V.onError)},d=m=>{const b=m.target.files;b&&a(Array.from(b))},h=()=>{s.value||(r.value.value="",r.value.click())},f=()=>{h()};return e({abort:m=>{gD(o.value).filter(m?([b])=>String(m.uid)===b:()=>!0).forEach(([b,w])=>{w instanceof XMLHttpRequest&&w.abort(),delete o.value[b]})},upload:l}),(m,b)=>(v(),$("div",{class:q([E(i).b(),E(i).m(t.listType),E(i).is("drag",t.drag),E(i).is("disabled",E(s))]),tabindex:E(s)?void 0:0,"aria-disabled":E(s),role:"button",onClick:h,onKeydown:ut(Me(f,["self"]),["enter","space"])},[t.drag?(v(),D(Wye,{key:0,disabled:E(s),directory:t.directory,onFile:a},{default:y(()=>[le(m.$slots,"default")]),_:3},8,["disabled","directory"])):le(m.$slots,"default",{key:1}),g("input",{ref_key:"inputRef",ref:r,class:q(E(i).e("input")),name:t.name,disabled:E(s),multiple:t.multiple,accept:t.accept,webkitdirectory:t.directory||void 0,type:"file",onChange:d,onClick:b[0]||(b[0]=Me(()=>{},["stop"]))},null,42,qye)],42,Yye))}}),HA=Gye;const UA="ElUpload",jA=t=>{var e;(e=t.url)!=null&&e.startsWith("blob:")&&URL.revokeObjectURL(t.url)},Xye=(t,e)=>{const n=Bie(t,"fileList",void 0,{passive:!0}),i=p=>n.value.find(m=>m.uid===p.uid);function s(p){var m;(m=e.value)==null||m.abort(p)}function o(p=["ready","uploading","success","fail"]){n.value=n.value.filter(m=>!p.includes(m.status))}function r(p){n.value=n.value.filter(m=>m.uid!==p.uid)}const a=p=>{ot(()=>t.onChange(p,n.value))},l=(p,m)=>{const b=i(m);b&&(console.error(p),b.status="fail",r(b),t.onError(p,b,n.value),a(b))},c=(p,m)=>{const b=i(m);b&&(t.onProgress(p,b,n.value),b.status="uploading",b.percentage=Math.round(p.percent))},u=(p,m)=>{const b=i(m);b&&(b.status="success",b.response=p,t.onSuccess(p,b,n.value),a(b))},d=p=>{hi(p.uid)&&(p.uid=LC());const m={name:p.name,percentage:0,status:"ready",size:p.size,raw:p,uid:p.uid};if(t.listType==="picture-card"||t.listType==="picture")try{m.url=URL.createObjectURL(p)}catch(b){Tt(UA,b.message),t.onError(b,m,n.value)}n.value=[...n.value,m],a(m)},h=async p=>{const m=p instanceof File?i(p):p;m||vo(UA,"file to be removed not found");const b=w=>{s(w),r(w),t.onRemove(w,n.value),jA(w)};t.beforeRemove?await t.beforeRemove(m,n.value)!==!1&&b(m):b(m)};function f(){n.value.filter(({status:p})=>p==="ready").forEach(({raw:p})=>{var m;return p&&((m=e.value)==null?void 0:m.upload(p))})}return Te(()=>t.listType,p=>{p!=="picture-card"&&p!=="picture"||(n.value=n.value.map(m=>{const{raw:b,url:w}=m;if(!w&&b)try{m.url=URL.createObjectURL(b)}catch(k){t.onError(k,m,n.value)}return m}))}),Te(n,p=>{for(const m of p)m.uid||(m.uid=LC()),m.status||(m.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:s,clearFiles:o,handleError:l,handleProgress:c,handleStart:d,handleSuccess:u,handleRemove:h,submit:f,revokeFileObjectURL:jA}};var Kye=fe({name:"ElUpload",__name:"upload",props:Pye,setup(t,{expose:e}){const n=t,i=bs(),s=Fn(),{abort:o,submit:r,clearFiles:a,uploadFiles:l,handleStart:c,handleError:u,handleRemove:d,handleSuccess:h,handleProgress:f,revokeFileObjectURL:p}=Xye(n,s),m=W(()=>n.listType==="picture-card"),b=W(()=>({...n,fileList:l.value,onStart:c,onProgress:f,onSuccess:h,onError:u,onRemove:d}));return wn(()=>{l.value.forEach(p)}),Pt(TF,{accept:Sn(n,"accept")}),e({abort:o,submit:r,clearFiles:a,handleStart:c,handleRemove:d}),(w,k)=>(v(),$("div",null,[m.value&&t.showFileList?(v(),D(BA,{key:0,disabled:E(i),"list-type":t.listType,files:E(l),crossorigin:t.crossorigin,"handle-preview":t.onPreview,onRemove:E(d)},hs({append:y(()=>[_(HA,Yt({ref_key:"uploadRef",ref:s},b.value),{default:y(()=>[w.$slots.trigger?le(w.$slots,"trigger",{key:0}):O("v-if",!0),!w.$slots.trigger&&w.$slots.default?le(w.$slots,"default",{key:1}):O("v-if",!0)]),_:3},16)]),_:2},[w.$slots.file?{name:"default",fn:y(({file:C,index:A})=>[le(w.$slots,"file",{file:C,index:A})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):O("v-if",!0),!m.value||m.value&&!t.showFileList?(v(),D(HA,Yt({key:1,ref_key:"uploadRef",ref:s},b.value),{default:y(()=>[w.$slots.trigger?le(w.$slots,"trigger",{key:0}):O("v-if",!0),!w.$slots.trigger&&w.$slots.default?le(w.$slots,"default",{key:1}):O("v-if",!0)]),_:3},16)):O("v-if",!0),w.$slots.trigger?le(w.$slots,"default",{key:2}):O("v-if",!0),le(w.$slots,"tip"),!m.value&&t.showFileList?(v(),D(BA,{key:3,disabled:E(i),"list-type":t.listType,files:E(l),crossorigin:t.crossorigin,"handle-preview":t.onPreview,onRemove:E(d)},hs({_:2},[w.$slots.file?{name:"default",fn:y(({file:C,index:A})=>[le(w.$slots,"file",{file:C,index:A})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):O("v-if",!0)]))}}),Zye=Kye;const J1=Gt(Zye);function Jye(t,e){let n;const i=ee(!1),s=In({...t,originalPosition:"",originalOverflow:"",visible:!1});function o(h){s.text=h}function r(){const h=s.parent,f=d.ns;if(!h.vLoadingAddClassList){let p=h.getAttribute("loading-number");p=Number.parseInt(p)-1,p?h.setAttribute("loading-number",p.toString()):(Pa(h,f.bm("parent","relative")),h.removeAttribute("loading-number")),Pa(h,f.bm("parent","hidden"))}a(),u.unmount()}function a(){var h,f;(f=(h=d.$el)==null?void 0:h.parentNode)==null||f.removeChild(d.$el)}function l(){var h;t.beforeClose&&!t.beforeClose()||(i.value=!0,clearTimeout(n),n=setTimeout(c,400),s.visible=!1,(h=t.closed)==null||h.call(t))}function c(){if(!i.value)return;const h=s.parent;i.value=!1,h.vLoadingAddClassList=void 0,r()}const u=Dg(fe({name:"ElLoading",setup(h,{expose:f}){const{ns:p,zIndex:m}=h8("loading");return f({ns:p,zIndex:m}),()=>{const b=s.spinner||s.svg,w=bt("svg",{class:"circular",viewBox:s.svgViewBox?s.svgViewBox:"0 0 50 50",...b?{innerHTML:b}:{}},[bt("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),k=s.text?bt("p",{class:p.b("text")},[s.text]):void 0;return bt(jo,{name:p.b("fade"),onAfterLeave:c},{default:y(()=>[Re(_("div",{style:{backgroundColor:s.background||""},class:[p.b("mask"),s.customClass,p.is("fullscreen",s.fullscreen)]},[bt("div",{class:p.b("spinner")},[w,k])]),[[jt,s.visible]])])})}}}));Object.assign(u._context,e??{});const d=u.mount(document.createElement("div"));return{...go(s),setText:o,removeElLoadingChild:a,close:l,handleAfterLeave:c,vm:d,get $el(){return d.$el}}}let c_;const uf=function(t={},e){if(!Jt)return;const n=Qye(t);if(n.fullscreen&&c_)return c_;const i=Jye({...n,closed:()=>{var o;(o=n.closed)==null||o.call(n),n.fullscreen&&(c_=void 0)}},e??uf._context);e0e(n,n.parent,i),WA(n,n.parent,i),n.parent.vLoadingAddClassList=()=>WA(n,n.parent,i);let s=n.parent.getAttribute("loading-number");return s?s=`${Number.parseInt(s)+1}`:s="1",n.parent.setAttribute("loading-number",s),n.parent.appendChild(i.$el),ot(()=>i.visible.value=n.visible),n.fullscreen&&(c_=i),i},Qye=t=>{let e;return Ke(t.target)?e=document.querySelector(t.target)??document.body:e=t.target||document.body,{parent:e===document.body||t.body?document.body:e,background:t.background||"",svg:t.svg||"",svgViewBox:t.svgViewBox||"",spinner:t.spinner||!1,text:t.text||"",fullscreen:e===document.body&&(t.fullscreen??!0),lock:t.lock??!1,customClass:t.customClass||"",visible:t.visible??!0,beforeClose:t.beforeClose,closed:t.closed,target:e}},e0e=async(t,e,n)=>{const{nextZIndex:i}=n.vm.zIndex||n.vm._.exposed.zIndex,s={};if(t.fullscreen)n.originalPosition.value=il(document.body,"position"),n.originalOverflow.value=il(document.body,"overflow"),s.zIndex=i();else if(t.parent===document.body){n.originalPosition.value=il(document.body,"position"),await ot();for(const o of["top","left"]){const r=o==="top"?"scrollTop":"scrollLeft";s[o]=`${t.target.getBoundingClientRect()[o]+document.body[r]+document.documentElement[r]-Number.parseInt(il(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])s[o]=`${t.target.getBoundingClientRect()[o]}px`}else n.originalPosition.value=il(e,"position");for(const[o,r]of Object.entries(s))n.$el.style[o]=r},WA=(t,e,n)=>{const i=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?Pa(e,i.bm("parent","relative")):bd(e,i.bm("parent","relative")),t.fullscreen&&t.lock?bd(e,i.bm("parent","hidden")):Pa(e,i.bm("parent","hidden"))};uf._context=null;const am=Symbol("ElLoading"),Cu=t=>`element-loading-${zi(t)}`,YA=(t,e)=>{const n=e.instance,i=c=>yt(e.value)?e.value[c]:void 0,s=c=>ee(Ke(c)&&(n==null?void 0:n[c])||c),o=c=>s(i(c)||t.getAttribute(Cu(c))),r=i("fullscreen")??e.modifiers.fullscreen,a={text:o("text"),svg:o("svg"),svgViewBox:o("svgViewBox"),spinner:o("spinner"),background:o("background"),customClass:o("customClass"),fullscreen:r,target:i("target")??(r?void 0:t),body:i("body")??e.modifiers.body,lock:i("lock")??e.modifiers.lock},l=uf(a);l._context=ag._context,t[am]={options:a,instance:l}},t0e=(t,e)=>{for(const n of Object.keys(t))hn(t[n])&&(t[n].value=e[n])},ag={mounted(t,e){e.value&&YA(t,e)},updated(t,e){const n=t[am];if(!e.value){n==null||n.instance.close(),t[am]=null;return}n?t0e(n.options,yt(e.value)?e.value:{text:t.getAttribute(Cu("text")),svg:t.getAttribute(Cu("svg")),svgViewBox:t.getAttribute(Cu("svgViewBox")),spinner:t.getAttribute(Cu("spinner")),background:t.getAttribute(Cu("background")),customClass:t.getAttribute(Cu("customClass"))}):YA(t,e)},unmounted(t){var e;(e=t[am])==null||e.instance.close(),t[am]=null}};ag._context=null;const n0e={install(t){uf._context=t._context,ag._context=t._context,t.directive("loading",ag),t.config.globalProperties.$loading=uf},directive:ag,service:uf};var s0e=fe({name:"ElMessageBox",directives:{TrapFocus:fhe},components:{ElButton:ze,ElFocusTrap:Y1,ElInput:ht,ElOverlay:x8,ElIcon:we,...xR},inheritAttrs:!1,props:{buttonSize:{type:String,validator:mF},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:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(t,{emit:e}){const{locale:n,zIndex:i,ns:s,size:o}=h8("message-box",W(()=>t.buttonSize)),{t:r}=n,{nextZIndex:a}=i,l=ee(!1),c=In({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",cancelButtonType:"",confirmButtonType:"primary",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:Xs(Uf),cancelButtonLoadingIcon:Xs(Uf),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:a()}),u=W(()=>{const U=c.type;return{[s.bm("icon",U)]:U&&jf[U]}}),d=kr(),h=kr(),f=W(()=>{const U=c.type;return c.icon||U&&jf[U]||""}),p=W(()=>!!c.message),m=ee(),b=ee(),w=ee(),k=ee(),C=ee(),A=W(()=>c.confirmButtonClass);Te(()=>c.inputValue,async U=>{await ot(),t.boxType==="prompt"&&U&&R()},{immediate:!0}),Te(()=>l.value,U=>{var Y;U&&(t.boxType!=="prompt"&&(c.autofocus?w.value=((Y=C.value)==null?void 0:Y.$el)??m.value:w.value=m.value),c.zIndex=a()),t.boxType==="prompt"&&(U?ot().then(()=>{k.value&&k.value.$el&&(c.autofocus?w.value=V()??m.value:w.value=m.value)}):(c.editorErrorMessage="",c.validateError=!1))});const{isDragging:S}=PD(m,b,W(()=>t.draggable),W(()=>t.overflow));Nt(async()=>{await ot(),t.closeOnHashChange&&window.addEventListener("hashchange",M)}),wn(()=>{t.closeOnHashChange&&window.removeEventListener("hashchange",M)});function M(){l.value&&(l.value=!1,ot(()=>{c.action&&e("action",c.action)}))}const P=()=>{t.closeOnClickModal&&L(c.distinguishCancelAndClose?"close":"cancel")},T=j4(P),I=U=>{var Y;if(c.inputType!=="textarea"&&!((Y=k.value)!=null&&Y.isComposing))return U.preventDefault(),L("confirm")},L=U=>{var Y;t.boxType==="prompt"&&U==="confirm"&&!R()||(c.action=U,c.beforeClose?(Y=c.beforeClose)==null||Y.call(c,U,c,M):M())},R=()=>{if(t.boxType==="prompt"){const U=c.inputPattern;if(U&&!U.test(c.inputValue||""))return c.editorErrorMessage=c.inputErrorMessage||r("el.messagebox.error"),c.validateError=!0,!1;const Y=c.inputValidator;if(et(Y)){const z=Y(c.inputValue);if(z===!1)return c.editorErrorMessage=c.inputErrorMessage||r("el.messagebox.error"),c.validateError=!0,!1;if(Ke(z))return c.editorErrorMessage=z,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},V=()=>{var Y;const U=(Y=k.value)==null?void 0:Y.$refs;return(U==null?void 0:U.input)??(U==null?void 0:U.textarea)},H=()=>{L("close")},F=()=>{t.closeOnPressEscape&&H()};return t.lockScroll&&D4(l,{ns:s}),{...go(c),ns:s,overlayEvent:T,visible:l,hasMessage:p,typeClass:u,contentId:d,inputId:h,btnSize:o,iconComponent:f,confirmButtonClasses:A,rootRef:m,focusStartRef:w,headerRef:b,inputRef:k,isDragging:S,confirmRef:C,doClose:M,handleClose:H,onCloseRequested:F,handleWrapperClick:P,handleInputEnter:I,handleAction:L,t:r}}});const i0e=["aria-label","aria-describedby"],o0e=["aria-label"],r0e=["id"];function a0e(t,e,n,i,s,o){const r=B("el-icon"),a=B("el-input"),l=B("el-button"),c=B("el-focus-trap"),u=B("el-overlay");return v(),D(jo,{name:"fade-in-linear",onAfterLeave:e[11]||(e[11]=d=>t.$emit("vanish")),persisted:""},{default:y(()=>[Re(_(u,{"z-index":t.zIndex,"overlay-class":[t.ns.is("message-box"),t.modalClass],mask:t.modal},{default:y(()=>[g("div",{role:"dialog","aria-label":t.title,"aria-modal":"true","aria-describedby":t.showInput?void 0:t.contentId,class:q(`${t.ns.namespace.value}-overlay-message-box`),onClick:e[8]||(e[8]=(...d)=>t.overlayEvent.onClick&&t.overlayEvent.onClick(...d)),onMousedown:e[9]||(e[9]=(...d)=>t.overlayEvent.onMousedown&&t.overlayEvent.onMousedown(...d)),onMouseup:e[10]||(e[10]=(...d)=>t.overlayEvent.onMouseup&&t.overlayEvent.onMouseup(...d))},[_(c,{loop:"",trapped:t.visible,"focus-trap-el":t.rootRef,"focus-start-el":t.focusStartRef,onReleaseRequested:t.onCloseRequested},{default:y(()=>[g("div",{ref:"rootRef",class:q([t.ns.b(),t.customClass,t.ns.is("draggable",t.draggable),t.ns.is("dragging",t.isDragging),{[t.ns.m("center")]:t.center}]),style:Xe(t.customStyle),tabindex:"-1",onClick:e[7]||(e[7]=Me(()=>{},["stop"]))},[t.title!==null&&t.title!==void 0?(v(),$("div",{key:0,ref:"headerRef",class:q([t.ns.e("header"),{"show-close":t.showClose}])},[g("div",{class:q(t.ns.e("title"))},[t.iconComponent&&t.center?(v(),D(r,{key:0,class:q([t.ns.e("status"),t.typeClass])},{default:y(()=>[(v(),D(Ct(t.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),g("span",null,x(t.title),1)],2),t.showClose?(v(),$("button",{key:0,type:"button",class:q(t.ns.e("headerbtn")),"aria-label":t.t("el.messagebox.close"),onClick:e[0]||(e[0]=d=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel")),onKeydown:e[1]||(e[1]=ut(Me(d=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[_(r,{class:q(t.ns.e("close"))},{default:y(()=>[(v(),D(Ct(t.closeIcon||"close")))]),_:1},8,["class"])],42,o0e)):O("v-if",!0)],2)):O("v-if",!0),g("div",{id:t.contentId,class:q(t.ns.e("content"))},[g("div",{class:q(t.ns.e("container"))},[t.iconComponent&&!t.center&&t.hasMessage?(v(),D(r,{key:0,class:q([t.ns.e("status"),t.typeClass])},{default:y(()=>[(v(),D(Ct(t.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),t.hasMessage?(v(),$("div",{key:1,class:q(t.ns.e("message"))},[le(t.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(v(),D(Ct(t.showInput?"label":"p"),{key:1,for:t.showInput?t.inputId:void 0,innerHTML:t.message},null,8,["for","innerHTML"])):(v(),D(Ct(t.showInput?"label":"p"),{key:0,for:t.showInput?t.inputId:void 0,textContent:x(t.message)},null,8,["for","textContent"]))])],2)):O("v-if",!0)],2),Re(g("div",{class:q(t.ns.e("input"))},[_(a,{id:t.inputId,ref:"inputRef",modelValue:t.inputValue,"onUpdate:modelValue":e[2]||(e[2]=d=>t.inputValue=d),type:t.inputType,placeholder:t.inputPlaceholder,"aria-invalid":t.validateError,class:q({invalid:t.validateError}),onKeydown:ut(t.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),g("div",{class:q(t.ns.e("errormsg")),style:Xe({visibility:t.editorErrorMessage?"visible":"hidden"})},x(t.editorErrorMessage),7)],2),[[jt,t.showInput]])],10,r0e),g("div",{class:q(t.ns.e("btns"))},[t.showCancelButton?(v(),D(l,{key:0,type:t.cancelButtonType==="text"?"":t.cancelButtonType,text:t.cancelButtonType==="text",loading:t.cancelButtonLoading,"loading-icon":t.cancelButtonLoadingIcon,class:q([t.cancelButtonClass]),round:t.roundButton,size:t.btnSize,onClick:e[3]||(e[3]=d=>t.handleAction("cancel")),onKeydown:e[4]||(e[4]=ut(Me(d=>t.handleAction("cancel"),["prevent"]),["enter"]))},{default:y(()=>[N(x(t.cancelButtonText||t.t("el.messagebox.cancel")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","size"])):O("v-if",!0),Re(_(l,{ref:"confirmRef",type:t.confirmButtonType==="text"?"":t.confirmButtonType,text:t.confirmButtonType==="text",loading:t.confirmButtonLoading,"loading-icon":t.confirmButtonLoadingIcon,class:q([t.confirmButtonClasses]),round:t.roundButton,disabled:t.confirmButtonDisabled,size:t.btnSize,onClick:e[5]||(e[5]=d=>t.handleAction("confirm")),onKeydown:e[6]||(e[6]=ut(Me(d=>t.handleAction("confirm"),["prevent"]),["enter"]))},{default:y(()=>[N(x(t.confirmButtonText||t.t("el.messagebox.confirm")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","disabled","size"]),[[jt,t.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,i0e)]),_:3},8,["z-index","overlay-class","mask"]),[[jt,t.visible]])]),_:3})}var l0e=vi(s0e,[["render",a0e]]);const c1=new Map,c0e=t=>{let e=document.body;return t.appendTo&&(Ke(t.appendTo)&&(e=document.querySelector(t.appendTo)),Lo(t.appendTo)&&(e=t.appendTo),Lo(e)||(Tt("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),e=document.body)),e},u0e=(t,e,n=null)=>{const i=_(l0e,t,et(t.message)||is(t.message)?{default:et(t.message)?t.message:()=>t.message}:null);return i.appContext=n,Fc(i,e),c0e(t).appendChild(e.firstElementChild),i.component},d0e=()=>document.createElement("div"),h0e=(t,e)=>{const n=d0e();t.onVanish=()=>{Fc(null,n),c1.delete(s)},t.onAction=o=>{const r=c1.get(s);let a;t.showInput?a={value:s.inputValue,action:o}:a=o,t.callback?t.callback(a,i.proxy):o==="cancel"||o==="close"?t.distinguishCancelAndClose&&o!=="cancel"?r.reject("close"):r.reject("cancel"):r.resolve(a)};const i=u0e(t,n,e),s=i.proxy;for(const o in t)zt(t,o)&&!zt(s.$props,o)&&(o==="closeIcon"&&yt(t[o])?s[o]=Xs(t[o]):s[o]=t[o]);return s.visible=!0,s};function vp(t,e=null){if(!Jt)return Promise.reject();let n;return Ke(t)||is(t)?t={message:t}:n=t.callback,new Promise((i,s)=>{const o=h0e(t,e??vp._context);c1.set(o,{options:t,callback:n,resolve:i,reject:s})})}const f0e=["alert","confirm","prompt"],p0e={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};f0e.forEach(t=>{vp[t]=m0e(t)});function m0e(t){return(e,n,i,s)=>{let o="";return yt(n)?(i=n,o=""):sn(n)?o="":o=n,vp(Object.assign({title:o,message:e,type:"",...p0e[t]},i,{boxType:t}),s)}}vp.close=()=>{c1.forEach((t,e)=>{e.doClose()}),c1.clear()};vp._context=null;const Gl=vp;Gl.install=t=>{Gl._context=t._context,t.config.globalProperties.$msgbox=Gl,t.config.globalProperties.$messageBox=Gl,t.config.globalProperties.$alert=Gl.alert,t.config.globalProperties.$confirm=Gl.confirm,t.config.globalProperties.$prompt=Gl.prompt};const Gw=Gl,PF=["primary","success","info","warning","error"],g0e=Ge({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:ds},id:{type:String,default:""},message:{type:de([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:de(Function),default:()=>{}},onClose:{type:de(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:[...PF,""],default:""},zIndex:Number,closeIcon:{type:ds,default:Ho}}),v0e={destroy:()=>!0},_0e=["id"],y0e=["textContent"],b0e={key:0},w0e=["innerHTML"];var k0e=fe({name:"ElNotification",__name:"notification",props:g0e,emits:v0e,setup(t,{expose:e}){const n=t,{ns:i,zIndex:s}=h8("notification"),{nextZIndex:o,currentZIndex:r}=s,a=ee(!1);let l;const c=W(()=>{const k=n.type;return k&&jf[n.type]?i.m(k):""}),u=W(()=>n.type&&jf[n.type]||n.icon),d=W(()=>n.position.endsWith("right")?"right":"left"),h=W(()=>n.position.startsWith("top")?"top":"bottom"),f=W(()=>({[h.value]:`${n.offset}px`,zIndex:n.zIndex??r.value}));function p(){n.duration>0&&({stop:l}=Jk(()=>{a.value&&b()},n.duration))}function m(){l==null||l()}function b(){a.value=!1}function w(k){switch(ls(k)){case Ue.delete:case Ue.backspace:m();break;case Ue.esc:a.value&&b();break;default:p();break}}return Nt(()=>{p(),o(),a.value=!0}),Hn(document,"keydown",w),e({visible:a,close:b}),(k,C)=>(v(),D(jo,{name:E(i).b("fade"),onBeforeLeave:t.onClose,onAfterLeave:C[1]||(C[1]=A=>k.$emit("destroy")),persisted:""},{default:y(()=>[Re(g("div",{id:t.id,class:q([E(i).b(),t.customClass,d.value]),style:Xe(f.value),role:"alert",onMouseenter:m,onMouseleave:p,onClick:C[0]||(C[0]=(...A)=>t.onClick&&t.onClick(...A))},[u.value?(v(),D(E(we),{key:0,class:q([E(i).e("icon"),c.value])},{default:y(()=>[(v(),D(Ct(u.value)))]),_:1},8,["class"])):O("v-if",!0),g("div",{class:q(E(i).e("group"))},[g("h2",{class:q(E(i).e("title")),textContent:x(t.title)},null,10,y0e),Re(g("div",{class:q(E(i).e("content")),style:Xe(t.title?void 0:{margin:0})},[le(k.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(v(),$(J,{key:1},[O(" Caution here, message could've been compromised, never use user's input as message "),g("p",{innerHTML:t.message},null,8,w0e)],2112)):(v(),$("p",b0e,x(t.message),1))])],6),[[jt,t.message]]),t.showClose?(v(),D(E(we),{key:0,class:q(E(i).e("closeBtn")),onClick:Me(b,["stop"])},{default:y(()=>[(v(),D(Ct(t.closeIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],46,_0e),[[jt,a.value]])]),_:3},8,["name","onBeforeLeave"]))}}),C0e=k0e;const Gf={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},I0=16;let x0e=1;const Cd=function(t={},e){if(!Jt)return{close:()=>{}};(Ke(t)||is(t))&&(t={message:t});const n=t.position||"top-right";let i=t.offset||0;Gf[n].forEach(({vm:u})=>{var d;i+=(((d=u.el)==null?void 0:d.offsetHeight)||0)+I0}),i+=I0;const s=`notification_${x0e++}`,o=t.onClose,r={...t,offset:i,id:s,onClose:()=>{S0e(s,n,o)}};let a=document.body;Lo(t.appendTo)?a=t.appendTo:Ke(t.appendTo)&&(a=document.querySelector(t.appendTo)),Lo(a)||(Tt("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),a=document.body);const l=document.createElement("div"),c=_(C0e,r,et(r.message)?r.message:is(r.message)?()=>r.message:null);return c.appContext=sn(e)?Cd._context:e,c.props.onDestroy=()=>{Fc(null,l)},Fc(c,l),Gf[n].push({vm:c}),a.appendChild(l.firstElementChild),{close:()=>{c.component.exposed.visible.value=!1}}};PF.forEach(t=>{Cd[t]=(e={},n)=>((Ke(e)||is(e))&&(e={message:e}),Cd({...e,type:t},n))});function S0e(t,e,n){const i=Gf[e],s=i.findIndex(({vm:c})=>{var u;return((u=c.component)==null?void 0:u.props.id)===t});if(s===-1)return;const{vm:o}=i[s];if(!o)return;n==null||n(o);const r=o.el.offsetHeight,a=e.split("-")[0];i.splice(s,1);const l=i.length;if(!(l<1))for(let c=s;c<l;c++){const{el:u,component:d}=i[c].vm,h=Number.parseInt(u.style[a],10)-r-I0;d.props.offset=h}}function $0e(){for(const t of Object.values(Gf))t.forEach(({vm:e})=>{e.component.exposed.visible.value=!1})}function A0e(t="top-right"){var n,i,s,o;let e=((s=(i=(n=Gf[t][0])==null?void 0:n.vm.component)==null?void 0:i.props)==null?void 0:s.offset)||0;for(const{vm:r}of Gf[t])r.component.props.offset=e,e+=(((o=r.el)==null?void 0:o.offsetHeight)||0)+I0}Cd.closeAll=$0e;Cd.updateOffsets=A0e;Cd._context=null;const E0e=nae(Cd,"$notify"),M0e=Ge({trigger:Ec.trigger,triggerKeys:Ec.triggerKeys,placement:U_.placement,disabled:Ec.disabled,visible:zn.visible,transition:zn.transition,popperOptions:U_.popperOptions,tabindex:U_.tabindex,content:zn.content,popperStyle:zn.popperStyle,popperClass:zn.popperClass,enterable:{...zn.enterable,default:!0},effect:{...zn.effect,default:"light"},teleported:zn.teleported,appendTo:zn.appendTo,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}}),T0e={"update:visible":t=>Jn(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},P0e="onUpdate:visible";var I0e=fe({name:"ElPopover",__name:"popover",props:M0e,emits:T0e,setup(t,{expose:e,emit:n}){const i=t,s=n,o=W(()=>i[P0e]),r=Be("popover"),a=ee(),l=W(()=>{var w;return(w=E(a))==null?void 0:w.popperRef}),c=W(()=>[{width:pi(i.width)},i.popperStyle]),u=W(()=>[r.b(),i.popperClass,{[r.m("plain")]:!!i.content}]),d=W(()=>i.transition===`${r.namespace.value}-fade-in-linear`),h=()=>{var w;(w=a.value)==null||w.hide()},f=()=>{s("before-enter")},p=()=>{s("before-leave")},m=()=>{s("after-enter")},b=()=>{s("update:visible",!1),s("after-leave")};return e({popperRef:l,hide:h}),(w,k)=>(v(),D(E(Ss),Yt({ref_key:"tooltipRef",ref:a},w.$attrs,{trigger:t.trigger,"trigger-keys":t.triggerKeys,placement:t.placement,disabled:t.disabled,visible:t.visible,transition:t.transition,"popper-options":t.popperOptions,tabindex:t.tabindex,content:t.content,offset:t.offset,"show-after":t.showAfter,"hide-after":t.hideAfter,"auto-close":t.autoClose,"show-arrow":t.showArrow,"aria-label":t.title,effect:t.effect,enterable:t.enterable,"popper-class":u.value,"popper-style":c.value,teleported:t.teleported,"append-to":t.appendTo,persistent:t.persistent,"gpu-acceleration":d.value,"onUpdate:visible":o.value,onBeforeShow:f,onBeforeHide:p,onShow:m,onHide:b}),{content:y(()=>[t.title?(v(),$("div",{key:0,class:q(E(r).e("title")),role:"title"},x(t.title),3)):O("v-if",!0),le(w.$slots,"default",{hide:h},()=>[N(x(t.content),1)])]),default:y(()=>[w.$slots.reference?le(w.$slots,"reference",{key:0}):O("v-if",!0)]),_:3},16,["trigger","trigger-keys","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","append-to","persistent","gpu-acceleration","onUpdate:visible"]))}}),L0e=I0e;const qA=(t,e)=>{var i;const n=(i=e.arg||e.value)==null?void 0:i.popperRef;n&&(n.triggerRef=t)};var O0e={mounted(t,e){qA(t,e)},updated(t,e){qA(t,e)}};const D0e="popover",R0e=sae(O0e,D0e),Yo=Gt(L0e,{directive:R0e});var V0e=!1;/*!
78 + * pinia v2.3.1
79 + * (c) 2025 Eduardo San Martin Morote
80 + * @license MIT
81 + */let IF;const f2=t=>IF=t,LF=Symbol();function OC(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var lg;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(lg||(lg={}));function F0e(){const t=_b(!0),e=t.run(()=>ee({}));let n=[],i=[];const s=Xs({install(o){f2(s),s._a=o,o.provide(LF,s),o.config.globalProperties.$pinia=s,i.forEach(r=>n.push(r)),i=[]},use(o){return!this._a&&!V0e?i.push(o):n.push(o),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return s}const OF=()=>{};function GA(t,e,n,i=OF){t.push(e);const s=()=>{const o=t.indexOf(e);o>-1&&(t.splice(o,1),i())};return!n&&yb()&&bb(s),s}function dh(t,...e){t.slice().forEach(n=>{n(...e)})}const N0e=t=>t(),XA=Symbol(),Xw=Symbol();function DC(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,i)=>t.set(i,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const i=e[n],s=t[n];OC(s)&&OC(i)&&t.hasOwnProperty(n)&&!hn(i)&&!Br(i)?t[n]=DC(s,i):t[n]=i}return t}const B0e=Symbol();function z0e(t){return!OC(t)||!t.hasOwnProperty(B0e)}const{assign:Xl}=Object;function H0e(t){return!!(hn(t)&&t.effect)}function U0e(t,e,n,i){const{state:s,actions:o,getters:r}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=s?s():{});const u=go(n.state.value[t]);return Xl(u,o,Object.keys(r||{}).reduce((d,h)=>(d[h]=Xs(W(()=>{f2(n);const f=n._s.get(t);return r[h].call(f,f)})),d),{}))}return l=DF(t,c,e,n,i,!0),l}function DF(t,e,n={},i,s,o){let r;const a=Xl({actions:{}},n),l={deep:!0};let c,u,d=[],h=[],f;const p=i.state.value[t];!o&&!p&&(i.state.value[t]={});let m;function b(T){let I;c=u=!1,typeof T=="function"?(T(i.state.value[t]),I={type:lg.patchFunction,storeId:t,events:f}):(DC(i.state.value[t],T),I={type:lg.patchObject,payload:T,storeId:t,events:f});const L=m=Symbol();ot().then(()=>{m===L&&(c=!0)}),u=!0,dh(d,I,i.state.value[t])}const w=o?function(){const{state:I}=n,L=I?I():{};this.$patch(R=>{Xl(R,L)})}:OF;function k(){r.stop(),d=[],h=[],i._s.delete(t)}const C=(T,I="")=>{if(XA in T)return T[Xw]=I,T;const L=function(){f2(i);const R=Array.from(arguments),V=[],H=[];function F(z){V.push(z)}function U(z){H.push(z)}dh(h,{args:R,name:L[Xw],store:S,after:F,onError:U});let Y;try{Y=T.apply(this&&this.$id===t?this:S,R)}catch(z){throw dh(H,z),z}return Y instanceof Promise?Y.then(z=>(dh(V,z),z)).catch(z=>(dh(H,z),Promise.reject(z))):(dh(V,Y),Y)};return L[XA]=!0,L[Xw]=I,L},A={_p:i,$id:t,$onAction:GA.bind(null,h),$patch:b,$reset:w,$subscribe(T,I={}){const L=GA(d,T,I.detached,()=>R()),R=r.run(()=>Te(()=>i.state.value[t],V=>{(I.flush==="sync"?u:c)&&T({storeId:t,type:lg.direct,events:f},V)},Xl({},l,I)));return L},$dispose:k},S=In(A);i._s.set(t,S);const P=(i._a&&i._a.runWithContext||N0e)(()=>i._e.run(()=>(r=_b()).run(()=>e({action:C}))));for(const T in P){const I=P[T];if(hn(I)&&!H0e(I)||Br(I))o||(p&&z0e(I)&&(hn(I)?I.value=p[T]:DC(I,p[T])),i.state.value[t][T]=I);else if(typeof I=="function"){const L=C(I,T);P[T]=L,a.actions[T]=I}}return Xl(S,P),Xl(an(S),P),Object.defineProperty(S,"$state",{get:()=>i.state.value[t],set:T=>{b(I=>{Xl(I,T)})}}),i._p.forEach(T=>{Xl(S,r.run(()=>T({store:S,app:i._a,pinia:i,options:a})))}),p&&o&&n.hydrate&&n.hydrate(S.$state,p),c=!0,u=!0,S}/*! #__NO_SIDE_EFFECTS__ */function Q1(t,e,n){let i,s;const o=typeof e=="function";typeof t=="string"?(i=t,s=o?n:e):(s=t,i=t.id);function r(a,l){const c=hI();return a=a||(c?qe(LF,null):null),a&&f2(a),a=IF,a._s.has(i)||(o?DF(i,e,s,a):U0e(i,s,a)),a._s.get(i)}return r.$id=i,r}function j0e(t,e){return Array.isArray(e)?e.reduce((n,i)=>(n[i]=function(){return t(this.$pinia)[i]},n),{}):Object.keys(e).reduce((n,i)=>(n[i]=function(){const s=t(this.$pinia),o=e[i];return typeof o=="function"?o.call(this,s):s[o]},n),{})}function W0e(t,e){return Array.isArray(e)?e.reduce((n,i)=>(n[i]=function(...s){return t(this.$pinia)[i](...s)},n),{}):Object.keys(e).reduce((n,i)=>(n[i]=function(...s){return t(this.$pinia)[e[i]](...s)},n),{})}function Y0e(t){return typeof t=="object"&&t!==null}function KA(t,e){return t=Y0e(t)?t:Object.create(null),new Proxy(t,{get(n,i,s){return i==="key"?Reflect.get(n,i,s):Reflect.get(n,i,s)||Reflect.get(e,i,s)}})}function q0e(t,e){return e.reduce((n,i)=>n==null?void 0:n[i],t)}function G0e(t,e,n){return e.slice(0,-1).reduce((i,s)=>/^(__proto__)$/.test(s)?{}:i[s]=i[s]||{},t)[e[e.length-1]]=n,t}function X0e(t,e){return e.reduce((n,i)=>{const s=i.split(".");return G0e(n,s,q0e(t,s))},{})}function K0e(t,e){return n=>{var i;try{const{storage:s=localStorage,beforeRestore:o=void 0,afterRestore:r=void 0,serializer:a={serialize:JSON.stringify,deserialize:JSON.parse},key:l=e.$id,paths:c=null,debug:u=!1}=n;return{storage:s,beforeRestore:o,afterRestore:r,serializer:a,key:((i=t.key)!=null?i:d=>d)(typeof l=="string"?l:l(e.$id)),paths:c,debug:u}}catch(s){return n.debug&&console.error("[pinia-plugin-persistedstate]",s),null}}}function ZA(t,{storage:e,serializer:n,key:i,debug:s}){try{const o=e==null?void 0:e.getItem(i);o&&t.$patch(n==null?void 0:n.deserialize(o))}catch(o){s&&console.error("[pinia-plugin-persistedstate]",o)}}function JA(t,{storage:e,serializer:n,key:i,paths:s,debug:o}){try{const r=Array.isArray(s)?X0e(t,s):t;e.setItem(i,n.serialize(r))}catch(r){o&&console.error("[pinia-plugin-persistedstate]",r)}}function Z0e(t={}){return e=>{const{auto:n=!1}=t,{options:{persist:i=n},store:s,pinia:o}=e;if(!i)return;if(!(s.$id in o.state.value)){const a=o._s.get(s.$id.replace("__hot:",""));a&&Promise.resolve().then(()=>a.$persist());return}const r=(Array.isArray(i)?i.map(a=>KA(a,t)):[KA(i,t)]).map(K0e(t,s)).filter(Boolean);s.$persist=()=>{r.forEach(a=>{JA(s.$state,a)})},s.$hydrate=({runHooks:a=!0}={})=>{r.forEach(l=>{const{beforeRestore:c,afterRestore:u}=l;a&&(c==null||c(e)),ZA(s,l),a&&(u==null||u(e))})},r.forEach(a=>{const{beforeRestore:l,afterRestore:c}=a;l==null||l(e),ZA(s,a),c==null||c(e),s.$subscribe((u,d)=>{JA(d,a)},{detached:!0})})}}var J0e=Z0e();const ce=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},Q0e={name:"Drawer",emits:["update:modelValue"],props:{modelValue:{type:Boolean,required:!0},title:{type:String,default:""},size:{type:String,default:"40%"},direction:{type:String,default:"right",validator:t=>["left","right","top","bottom"].includes(t)},closeOnClickModal:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},destroyOnClose:{type:Boolean,default:!1},modal:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},withHeader:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},zIndex:{type:Number,default:null},id:{type:String,default:""},modalClass:{type:String,default:"fcom_common_dialog"},drawerClass:{type:String,default:"fcom_high_drawer"},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},hasCloseConfirmation:{type:Boolean,default:!1},closeConfirmationMessage:{type:String,default:""},confirmLeaveAction:{type:Function,default:null},cancelLeaveAction:{type:Function,default:null},beforeClose:{type:Function,default:null}},computed:{elDirection(){return{left:"ltr",right:"rtl",top:"ttb",bottom:"btt"}[this.direction]||"rtl"}},methods:{handleBeforeClose(t){const e=()=>{this.beforeClose?this.beforeClose(t):t()};if(this.hasCloseConfirmation){const n=this.closeConfirmationMessage||this.$t("Are you sure you want to close this?");this.$confirm(n,this.$t("Confirm"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.confirmLeaveAction&&this.confirmLeaveAction(),e()}).catch(()=>{this.cancelLeaveAction&&this.cancelLeaveAction()})}else e()}}},ebe=["id"];function tbe(t,e,n,i,s,o){const r=Fa;return v(),D(r,Yt({"model-value":n.modelValue,"onUpdate:modelValue":e[0]||(e[0]=a=>t.$emit("update:modelValue",a)),direction:o.elDirection,size:n.size,modal:n.modal,"modal-class":n.modalClass,class:n.drawerClass,"close-on-click-modal":n.closeOnClickModal,"append-to-body":n.appendToBody,"destroy-on-close":n.destroyOnClose,"show-close":n.showClose,"with-header":n.withHeader,"lock-scroll":n.lockScroll,"open-delay":n.openDelay,"close-delay":n.closeDelay},n.zIndex!==null?{"z-index":n.zIndex}:{},{id:n.id,"before-close":o.handleBeforeClose}),hs({default:y(()=>[g("div",{class:q(n.bodyClass)},[le(t.$slots,"default")],2)]),_:2},[n.withHeader?{name:"header",fn:y(({close:a,titleId:l,titleClass:c})=>[le(t.$slots,"header",{close:a,titleId:l,titleClass:c},()=>[n.title?(v(),$("h4",{key:0,id:l,class:q([c,n.headerClass]),style:{margin:"0"}},x(n.title),11,ebe)):O("",!0)])]),key:"0"}:void 0,t.$slots.footer?{name:"footer",fn:y(()=>[g("div",{class:q(n.footerClass)},[le(t.$slots,"footer")],2)]),key:"1"}:void 0]),1040,["model-value","direction","size","modal","modal-class","class","close-on-click-modal","append-to-body","destroy-on-close","show-close","with-header","lock-scroll","open-delay","close-delay","id","before-close"])}const nu=ce(Q0e,[["render",tbe]]);function nbe(t,e){for(var n=-1,i=t==null?0:t.length;++n<i&&e(t[n],n,t)!==!1;);return t}var sbe=nbe;function ibe(t){return function(e,n,i){for(var s=-1,o=Object(e),r=i(e),a=r.length;a--;){var l=r[t?a:++s];if(n(o[l],l,o)===!1)break}return e}}var obe=ibe,rbe=obe,abe=rbe(),lbe=abe;function cbe(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}var ube=cbe,dbe=typeof xs=="object"&&xs&&xs.Object===Object&&xs,RF=dbe,hbe=RF,fbe=typeof self=="object"&&self&&self.Object===Object&&self,pbe=hbe||fbe||Function("return this")(),Na=pbe,mbe=Na,gbe=mbe.Symbol,p2=gbe,QA=p2,VF=Object.prototype,vbe=VF.hasOwnProperty,_be=VF.toString,Qp=QA?QA.toStringTag:void 0;function ybe(t){var e=vbe.call(t,Qp),n=t[Qp];try{t[Qp]=void 0;var i=!0}catch{}var s=_be.call(t);return i&&(e?t[Qp]=n:delete t[Qp]),s}var bbe=ybe,wbe=Object.prototype,kbe=wbe.toString;function Cbe(t){return kbe.call(t)}var xbe=Cbe,eE=p2,Sbe=bbe,$be=xbe,Abe="[object Null]",Ebe="[object Undefined]",tE=eE?eE.toStringTag:void 0;function Mbe(t){return t==null?t===void 0?Ebe:Abe:tE&&tE in Object(t)?Sbe(t):$be(t)}var ev=Mbe;function Tbe(t){return t!=null&&typeof t=="object"}var tv=Tbe,Pbe=ev,Ibe=tv,Lbe="[object Arguments]";function Obe(t){return Ibe(t)&&Pbe(t)==Lbe}var Dbe=Obe,nE=Dbe,Rbe=tv,FF=Object.prototype,Vbe=FF.hasOwnProperty,Fbe=FF.propertyIsEnumerable,Nbe=nE(function(){return arguments}())?nE:function(t){return Rbe(t)&&Vbe.call(t,"callee")&&!Fbe.call(t,"callee")},R8=Nbe,Bbe=Array.isArray,Ba=Bbe,L0={exports:{}};function zbe(){return!1}var Hbe=zbe;L0.exports;(function(t,e){var n=Na,i=Hbe,s=e&&!e.nodeType&&e,o=s&&!0&&t&&!t.nodeType&&t,r=o&&o.exports===s,a=r?n.Buffer:void 0,l=a?a.isBuffer:void 0,c=l||i;t.exports=c})(L0,L0.exports);var V8=L0.exports,Ube=9007199254740991,jbe=/^(?:0|[1-9]\d*)$/;function Wbe(t,e){var n=typeof t;return e=e??Ube,!!e&&(n=="number"||n!="symbol"&&jbe.test(t))&&t>-1&&t%1==0&&t<e}var NF=Wbe,Ybe=9007199254740991;function qbe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Ybe}var F8=qbe,Gbe=ev,Xbe=F8,Kbe=tv,Zbe="[object Arguments]",Jbe="[object Array]",Qbe="[object Boolean]",e2e="[object Date]",t2e="[object Error]",n2e="[object Function]",s2e="[object Map]",i2e="[object Number]",o2e="[object Object]",r2e="[object RegExp]",a2e="[object Set]",l2e="[object String]",c2e="[object WeakMap]",u2e="[object ArrayBuffer]",d2e="[object DataView]",h2e="[object Float32Array]",f2e="[object Float64Array]",p2e="[object Int8Array]",m2e="[object Int16Array]",g2e="[object Int32Array]",v2e="[object Uint8Array]",_2e="[object Uint8ClampedArray]",y2e="[object Uint16Array]",b2e="[object Uint32Array]",ts={};ts[h2e]=ts[f2e]=ts[p2e]=ts[m2e]=ts[g2e]=ts[v2e]=ts[_2e]=ts[y2e]=ts[b2e]=!0;ts[Zbe]=ts[Jbe]=ts[u2e]=ts[Qbe]=ts[d2e]=ts[e2e]=ts[t2e]=ts[n2e]=ts[s2e]=ts[i2e]=ts[o2e]=ts[r2e]=ts[a2e]=ts[l2e]=ts[c2e]=!1;function w2e(t){return Kbe(t)&&Xbe(t.length)&&!!ts[Gbe(t)]}var k2e=w2e;function C2e(t){return function(e){return t(e)}}var x2e=C2e,O0={exports:{}};O0.exports;(function(t,e){var n=RF,i=e&&!e.nodeType&&e,s=i&&!0&&t&&!t.nodeType&&t,o=s&&s.exports===i,r=o&&n.process,a=function(){try{var l=s&&s.require&&s.require("util").types;return l||r&&r.binding&&r.binding("util")}catch{}}();t.exports=a})(O0,O0.exports);var S2e=O0.exports,$2e=k2e,A2e=x2e,sE=S2e,iE=sE&&sE.isTypedArray,E2e=iE?A2e(iE):$2e,N8=E2e,M2e=ube,T2e=R8,P2e=Ba,I2e=V8,L2e=NF,O2e=N8,D2e=Object.prototype,R2e=D2e.hasOwnProperty;function V2e(t,e){var n=P2e(t),i=!n&&T2e(t),s=!n&&!i&&I2e(t),o=!n&&!i&&!s&&O2e(t),r=n||i||s||o,a=r?M2e(t.length,String):[],l=a.length;for(var c in t)(e||R2e.call(t,c))&&!(r&&(c=="length"||s&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||L2e(c,l)))&&a.push(c);return a}var F2e=V2e,N2e=Object.prototype;function B2e(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||N2e;return t===n}var BF=B2e;function z2e(t,e){return function(n){return t(e(n))}}var H2e=z2e,U2e=H2e,j2e=U2e(Object.keys,Object),W2e=j2e,Y2e=BF,q2e=W2e,G2e=Object.prototype,X2e=G2e.hasOwnProperty;function K2e(t){if(!Y2e(t))return q2e(t);var e=[];for(var n in Object(t))X2e.call(t,n)&&n!="constructor"&&e.push(n);return e}var zF=K2e;function Z2e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var nv=Z2e,J2e=ev,Q2e=nv,ewe="[object AsyncFunction]",twe="[object Function]",nwe="[object GeneratorFunction]",swe="[object Proxy]";function iwe(t){if(!Q2e(t))return!1;var e=J2e(t);return e==twe||e==nwe||e==ewe||e==swe}var HF=iwe,owe=HF,rwe=F8;function awe(t){return t!=null&&rwe(t.length)&&!owe(t)}var B8=awe,lwe=F2e,cwe=zF,uwe=B8;function dwe(t){return uwe(t)?lwe(t):cwe(t)}var z8=dwe,hwe=lbe,fwe=z8;function pwe(t,e){return t&&hwe(t,e,fwe)}var mwe=pwe,gwe=B8;function vwe(t,e){return function(n,i){if(n==null)return n;if(!gwe(n))return t(n,i);for(var s=n.length,o=e?s:-1,r=Object(n);(e?o--:++o<s)&&i(r[o],o,r)!==!1;);return n}}var _we=vwe,ywe=mwe,bwe=_we,wwe=bwe(ywe),kwe=wwe;function Cwe(t){return t}var UF=Cwe,xwe=UF;function Swe(t){return typeof t=="function"?t:xwe}var $we=Swe,Awe=sbe,Ewe=kwe,Mwe=$we,Twe=Ba;function Pwe(t,e){var n=Twe(t)?Awe:Ewe;return n(t,Mwe(e))}var Iwe=Pwe,Lwe=Iwe;const Mc=_i(Lwe);function Bt(t){return window.fluentComAdmin.i18n[t]||t}const Owe={public:{label:Bt("Public"),description:Bt("__PUBLIC_SPACE_DESC"),space_description:Bt("__PIBLIC_SPACE_DESC_2")},private:{label:Bt("Private"),description:Bt("__PRIVATE_SPACE_DESC"),space_description:Bt("__PRIVATE_SPACE_DESC_2")},secret:{label:Bt("Secret"),description:Bt("Only invited members can view and post."),space_description:Bt("__SECRET_SPACE_DESC_2")}},Dwe={public:{label:Bt("Public"),description:Bt("Anyone can view and enroll the course for free")},private:{label:Bt("Private"),description:Bt("__PRIVATE_COURSE_DESC")},secret:{label:Bt("Secret"),description:Bt("Only invited students can view and enroll the course content.")}},Rwe={self_paced:{label:Bt("Self Paced"),description:Bt("__SELF_PAED_COURSE_DESC")},structured:{label:Bt("Structured"),description:Bt("__STRUCTURED_COURSE_DESC")},scheduled:{label:Bt("Scheduled"),description:Bt("Course starts on a specific date. Sections are dripped relative to that date.")}},Vwe={leader_board_module:{headerTitle:Bt("Leaderboard Settings"),headerDescription:Bt("Settings for Leaderboard & Gamification features"),featureImage:"leaderboard_module.png",bodyTitle:Bt("Get Leaderboard & Gamification Module"),bodyDescription:Bt("Unlock potential by creating new feeds and earning points for likes. Advance in rank based on your total points using this module")},emoji_module:{headerTitle:Bt("Emoji Module"),headerDescription:Bt("Settings for Emoji & Reaction features"),featureImage:"emoji_module.png",bodyTitle:Bt("Get Emoji & Reaction Module"),bodyDescription:Bt("Use emojis to add a personal touch and make your new article, post, or comment more expressive")},giphy_module:{headerTitle:Bt("Giphy Module"),headerDescription:Bt("Customize Your Giphy Module Settings"),featureImage:"giphy_module.png",bodyTitle:Bt("Get Giphy Module"),bodyDescription:Bt("Want to use awesome GIFs? Upgrade to Pro plan now and enjoy surfing on FluentCommunity")},user_badge_module:{headerTitle:Bt("User Badge Module"),headerDescription:Bt("Add a badge next to user profile name to highlight valued users"),featureImage:"badge_module.png",bodyTitle:Bt("Get User Badge Module"),bodyDescription:Bt("Show a customized badge on user profiles beside their names to easily recognize your admins or moderators, or to give appreciation to your power users.")},media_module:{headerTitle:Bt("Media Module"),headerDescription:Bt("Add a badge next to user profile name to highlight valued users"),featureImage:"media_module.png",bodyTitle:Bt("Get Media Module"),bodyDescription:Bt("Choose where to store your media files. Options include Local File System, Amazon S3, or Cloudflare R2 for storing and serving your media assets")},pwa_module:{headerTitle:Bt("Progressive Web App (PWA)"),headerDescription:Bt("Let members install your community as an app on their phone"),bodyTitle:Bt("Get Progressive Web App (PWA) Module"),bodyDescription:Bt("Turn your community into an installable mobile app with your own name, icon and colors, plus an Install App option right in the portal menu.")}},Mh=t=>{t=parseInt(t);const e=Object.values(window.fluentComAdmin.leaderboard_levels);if(!t)return e[0];for(let n=0;n<e.length;n++)if(t>=e[n].min_points&&t<=e[n].max_points)return e[n];return e[e-1]},Fwe={name:"ImageUploader",emits:["uploaded","completed","uploading"],data(){return{loading:!1}},props:{button_text:{type:String,default:""},remove_label:{type:String,default:""},additionalData:{type:Object,default:()=>({})},isMultiple:{type:Boolean,default:!1},can_remove:{type:Boolean,default:!1},confirm_remove:{type:Boolean,default:!1},isTextBtn:{type:Boolean,default:!0},removeIcon:{type:Boolean,default:!0},className:{type:String,default:"image-uploader"}},methods:{handleRemove(){if(!this.confirm_remove){this.$emit("uploaded","");return}this.$confirm(this.$t("Are you sure you want to remove this image?"),this.$t("Remove Image?"),{confirmButtonText:this.$t("Remove"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.$emit("uploaded","")})},handleSuccess(t){this.$emit("uploaded",t.media.url),this.$emit("completed",t),this.loading=!1},handleError(t){this.$handleError(JSON.parse(t.message)),this.$emit("completed",t),this.loading=!1},inProgress(t){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 Nwe(t,e,n,i,s,o){const r=ze,a=J1,l=B("CloseBold"),c=we,u=xt("loading");return v(),$(J,null,[_(a,{class:q(n.className),multiple:n.isMultiple,action:o.action_url,headers:o.headers,accept:"image/*",data:n.additionalData,"on-success":o.handleSuccess,"on-progress":o.inProgress,"on-error":o.handleError,"show-file-list":!1},{default:y(()=>[le(t.$slots,"trigger",{loading:s.loading},()=>[le(t.$slots,"default",{loading:s.loading},()=>[Re((v(),D(r,{disabled:s.loading,text:n.isTextBtn,class:"fcom_plain_button"},{default:y(()=>[N(x(n.button_text||t.$t("Upload Photo")),1)]),_:1},8,["disabled","text"])),[[u,s.loading]])])])]),_:3},8,["class","multiple","action","headers","data","on-success","on-progress","on-error"]),n.can_remove?(v(),D(r,{key:0,class:"remove_img",size:"small",type:"danger",plain:"",onClick:o.handleRemove,text:n.isTextBtn,"aria-label":n.remove_label||t.$t("Remove")},{default:y(()=>[le(t.$slots,"remove",{},()=>[n.removeIcon?(v(),D(c,{key:0},{default:y(()=>[_(l)]),_:1})):O("",!0),g("span",null,x(t.$t("Remove")),1)])]),_:3},8,["onClick","text","aria-label"])):O("",!0)],64)}const Ll=ce(Fwe,[["render",Nwe]]),Bwe={name:"SvgShapeGenerator",emits:["update"],data(){return{currentColor:"",selectedShape:"circle"}},computed:{svgShapes(){return{circle:`<svg class="fcom_shape fcom_shape_circle" viewBox="0 0 24 24" fill="${this.currentColor}" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><circle cx="12" cy="12" r="12"/></svg>`,square:`<svg class="fcom_shape fcom_shape_square" viewBox="0 0 24 24" fill="${this.currentColor}" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><rect x="0" y="0" width="24" height="24"/></svg>`,triangle:`<svg class="fcom_shape fcom_shape_triangle" viewBox="0 0 24 24" fill="${this.currentColor}" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M21 12L2 2v20z"/></svg>`,star:`<svg class="fcom_shape fcom_shape_star" viewBox="0 0 24 24" width="24" height="24"><polygon points="12,2.4 14.6,8.4 21.6,8.4 15.6,13.2 18,19.6 12,15.6 6,19.6 8.4,13.2 2.4,8.4 9.4,8.4" fill="${this.currentColor}"/></svg>`,heart:`<svg class="fcom_shape fcom_shape_heart" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" fill="${this.currentColor}"/></svg>`,diamond:`<svg class="fcom_shape fcom_shape_diamond" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><polygon points="12,2 22,12 12,22 2,12" fill="${this.currentColor}"/></svg>`}}},methods:{selectShape(t){this.selectedShape=t,this.$emit("update",this.svgShapes[t])},colorChanged(t){this.currentColor=t,this.$emit("update",this.svgShapes[this.selectedShape])}}},zwe={class:"fcom_svg_generator"},Hwe={class:"fcom_form_item"},Uwe={class:"fcom_form_item"},jwe=["innerHTML"];function Wwe(t,e,n,i,s,o){const r=eu,a=Qc,l=ws;return v(),$("div",zwe,[g("div",Hwe,[g("label",null,x(t.$t("Select Shape Color:")),1),_(r,{predefine:t.appVars.suggestedColors,modelValue:s.currentColor,"onUpdate:modelValue":e[0]||(e[0]=c=>s.currentColor=c),onActiveChange:o.colorChanged,size:"large","show-alpha":""},null,8,["predefine","modelValue","onActiveChange"])]),g("div",Uwe,[g("label",null,x(t.$t("Select Shape:")),1),_(l,{onChange:e[1]||(e[1]=c=>o.selectShape(s.selectedShape)),modelValue:s.selectedShape,"onUpdate:modelValue":e[2]||(e[2]=c=>s.selectedShape=c)},{default:y(()=>[(v(!0),$(J,null,ye(o.svgShapes,(c,u)=>(v(),D(a,{key:u,value:u},{default:y(()=>[g("div",{innerHTML:c},null,8,jwe)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])])}const Ywe=ce(Bwe,[["render",Wwe]]);var H8="emoji-mart";const qwe=JSON;var jF=typeof window<"u"&&"localStorage"in window;let RC,VC;function Gwe(t){t||(t={}),RC=t.getter,VC=t.setter}function Xwe(t){H8=t}function Kwe(t){for(let e in t){let n=t[e];WF(e,n)}}function WF(t,e){if(VC)VC(t,e);else{if(!jF)return;try{window.localStorage[`${H8}.${t}`]=qwe.stringify(e)}catch{}}}function Zwe(t){if(RC)return RC(t);if(!jF)return;try{var e=window.localStorage[`${H8}.${t}`]}catch{return}if(e)return JSON.parse(e)}const Xf={update:Kwe,set:WF,get:Zwe,setNamespace:Xwe,setHandlers:Gwe},Kw={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"},YF=t=>{const e=[];var n=(i,s)=>{i&&(Array.isArray(i)?i:[i]).forEach(o=>{(s?o.split(/[-|_|\s]+/):[o]).forEach(r=>{r=r.toLowerCase(),e.indexOf(r)==-1&&e.push(r)})})};return n(t.short_names,!0),n(t.name,!0),n(t.keywords,!1),n(t.emoticons,!1),e.join(",")};function qF(t){var e=Object.getOwnPropertyNames(t);for(let n of e){let i=t[n];t[n]=i&&typeof i=="object"?qF(i):i}return Object.freeze(t)}const Jwe=t=>{if(!t.compressed)return t;t.compressed=!1;for(let e in t.emojis){let n=t.emojis[e];for(let i in Kw)n[i]=n[Kw[i]],delete n[Kw[i]];n.short_names||(n.short_names=[]),n.short_names.unshift(e),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=YF(n)}return t=qF(t),t},Zw=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart","hankey"];let or,U8,FC={};function GF(){U8=!0,or=Xf.get("frequently")}function Qwe(t){U8||GF();var{id:e}=t;or||(or=FC),or[e]||(or[e]=0),or[e]+=1,Xf.set("last",e),Xf.set("frequently",or)}function e3e(t){if(U8||GF(),!or){FC={};const r=[];let a=Math.min(t,Zw.length);for(let l=0;l<a;l++)FC[Zw[l]]=parseInt((a-l)/4,10)+1,r.push(Zw[l]);return r}const e=t,n=[];for(let r in or)or.hasOwnProperty(r)&&n.push(r);const s=n.sort((r,a)=>or[r]-or[a]).reverse().slice(0,e),o=Xf.get("last");return o&&s.indexOf(o)==-1&&(s.pop(),s.push(o)),s}const NC={add:Qwe,get:e3e},t3e={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>'},n3e={props:{i18n:{type:Object,required:!0},color:{type:String},categories:{type:Array,required:!0},activeCategory:{type:Object,default(){return{}}}},emits:["click"],created(){this.svgs=t3e}},s3e={role:"tablist",class:"emoji-mart-anchors"},i3e=["aria-label","aria-selected","data-title","onClick"],o3e=["innerHTML"];function r3e(t,e,n,i,s,o){return v(),$("div",s3e,[(v(!0),$(J,null,ye(n.categories,r=>(v(),$("button",{role:"tab",type:"button","aria-label":r.name,"aria-selected":r.id==n.activeCategory.id,key:r.id,class:q({"emoji-mart-anchor":!0,"emoji-mart-anchor-selected":r.id==n.activeCategory.id}),style:Xe({color:r.id==n.activeCategory.id?n.color:""}),"data-title":n.i18n.categories[r.id],onClick:a=>t.$emit("click",r)},[g("div",{"aria-hidden":"true",innerHTML:t.svgs[r.id]},null,8,o3e),g("span",{"aria-hidden":"true",class:"emoji-mart-anchor-bar",style:Xe({backgroundColor:n.color})},null,4)],14,i3e))),128))])}const a3e=ce(n3e,[["render",r3e]]),l3e=String,c3e=l3e.fromCodePoint||function(){var e=16384,n=[],i,s,o=-1,r=arguments.length;if(!r)return"";for(var a="";++o<r;){var l=Number(arguments[o]);if(!isFinite(l)||l<0||l>1114111||Math.floor(l)!=l)throw RangeError("Invalid code point: "+l);l<=65535?n.push(l):(l-=65536,i=(l>>10)+55296,s=l%1024+56320,n.push(i,s)),(o+1===r||n.length>e)&&(a+=String.fromCharCode.apply(null,n),n.length=0)}return a};function u3e(t){var e=t.split("-"),n=e.map(i=>`0x${i}`);return c3e.apply(null,n)}function oE(t){return t.reduce((e,n)=>(e.indexOf(n)===-1&&e.push(n),e),[])}function d3e(t,e){const n=oE(t),i=oE(e);return n.filter(s=>i.indexOf(s)>=0)}function XF(t,e){var n={};for(let i in t){let s=t[i],o=s;e.hasOwnProperty(i)&&(o=e[i]),typeof o=="object"&&(o=XF(s,o)),n[i]=o}return n}function h3e(){if(typeof document>"u")return 0;const t=document.createElement("div");t.style.width="100px",t.style.height="100px",t.style.overflow="scroll",t.style.position="absolute",t.style.top="-9999px",document.body.appendChild(t);const e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e}const f3e=61,p3e=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/,rE=["1F3FA","1F3FB","1F3FC","1F3FD","1F3FE","1F3FF"];class m3e{constructor(e,{emojisToShowFilter:n,include:i,exclude:s,custom:o,recent:r,recentLength:a=20}={}){this._data=Jwe(e),this._emojisFilter=n||null,this._include=i||null,this._exclude=s||null,this._custom=o||[],this._recent=r||NC.get(a),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 e=this._data.categories;if(this._include&&(e=e.filter(n=>this._include.includes(n.id)),e=e.sort((n,i)=>{const s=this._include.indexOf(n.id),o=this._include.indexOf(i.id);return s<o?-1:s>o?1:0})),e.forEach(n=>{if(!this.isCategoryNeeded(n.id))return;let i={id:n.id,name:n.name,emojis:[]};n.emojis.forEach(s=>{let o=this.addEmoji(s);o&&i.emojis.push(o)}),i.emojis.length&&this._categories.push(i)}),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 i of this._customCategory.emojis)if(i.id===n){this._recentCategory.emojis.push(i);return}this.hasEmoji(n)&&this._recentCategory.emojis.push(this.emoji(n))}),this._recentCategory.emojis.length&&this._categories.unshift(this._recentCategory))}findEmoji(e,n){let i=e.match(p3e);if(i&&(e=i[1],i[2]&&(n=parseInt(i[2],10))),this._data.aliases.hasOwnProperty(e)&&(e=this._data.aliases[e]),this._emojis.hasOwnProperty(e)){let s=this._emojis[e];return n?s.getSkin(n):s}return this._nativeEmojis.hasOwnProperty(e)?this._nativeEmojis[e]:null}categories(){return this._categories}emoji(e){this._data.aliases.hasOwnProperty(e)&&(e=this._data.aliases[e]);let n=this._emojis[e];if(!n)throw new Error("Can not find emoji by id: "+e);return n}firstEmoji(){let e=this._emojis[Object.keys(this._emojis)[0]];if(!e)throw new Error("Can not get first emoji");return e}hasEmoji(e){return this._data.aliases.hasOwnProperty(e)&&(e=this._data.aliases[e]),!!this._emojis[e]}nativeEmoji(e){return this._nativeEmojis.hasOwnProperty(e)?this._nativeEmojis[e]:null}search(e,n){if(n||(n=75),!e.length)return null;if(e=="-"||e=="-1")return[this.emoji("-1")];let i=e.toLowerCase().split(/[\s|,|\-|_]+/),s=[];i.length>2&&(i=[i[0],i[1]]),s=i.map(r=>{let a=this._emojis,l=this._searchIndex,c=0;for(let u=0;u<r.length;u++){const d=r[u];if(c++,l[d]||(l[d]={}),l=l[d],!l.results){let h={};l.results=[],l.emojis={};for(let f in a){let p=a[f],m=p._data.search,b=r.substr(0,c),w=m.indexOf(b);if(w!=-1){let k=w+1;b==f&&(k=0),l.results.push(p),l.emojis[f]=p,h[f]=k}}l.results.sort((f,p)=>{var m=h[f.id],b=h[p.id];return m-b})}a=l.emojis}return l.results}).filter(r=>r);var o=null;return s.length>1?o=d3e.apply(null,s):s.length?o=s[0]:o=[],o&&o.length>n&&(o=o.slice(0,n)),o}addCustomEmoji(e){let n=Object.assign({},e,{id:e.short_names[0],custom:!0});n.search||(n.search=YF(n));let i=new D0(n);return this._emojis[i.id]=i,this._customCategory.emojis.push(i),i}addEmoji(e){let n=this._data.emojis[e];if(!this.isEmojiNeeded(n))return!1;let i=new D0(n);if(this._emojis[e]=i,i.native&&(this._nativeEmojis[i.native]=i),i._skins)for(let s in i._skins){let o=i._skins[s];o.native&&(this._nativeEmojis[o.native]=o)}return i.emoticons&&i.emoticons.forEach(s=>{this._emoticons[s]||(this._emoticons[s]=e)}),i}isCategoryNeeded(e){let n=this._include&&this._include.length?this._include.indexOf(e)>-1:!0,i=this._exclude&&this._exclude.length?this._exclude.indexOf(e)>-1:!1;return!(!n||i)}isEmojiNeeded(e){return this._emojisFilter?this._emojisFilter(e):!0}}class D0{constructor(e){if(this._data=Object.assign({},e),this._skins=null,this._data.skin_variations){this._skins=[];for(var n in rE){let i=rE[n],s=this._data.skin_variations[i],o=Object.assign({},e);for(let r in s)o[r]=s[r];delete o.skin_variations,o.skin_tone=parseInt(n)+1,this._skins.push(new D0(o))}}this._sanitized=g3e(this._data);for(let i in this._sanitized)this[i]=this._sanitized[i];this.short_names=this._data.short_names,this.short_name=this._data.short_names[0],Object.freeze(this)}getSkin(e){return e&&e!="native"&&this._skins?this._skins[e-1]:this}getPosition(){let e=f3e-1,n=+(100/e*this._data.sheet_x).toFixed(2),i=+(100/e*this._data.sheet_y).toFixed(2);return`${n}% ${i}%`}ariaLabel(){return[this.native].concat(this.short_names).filter(Boolean).join(", ")}}class KF{constructor(e,n,i,s,o,r,a){this._emoji=e,this._native=s,this._skin=n,this._set=i,this._fallback=o,this.canRender=this._canRender(),this.cssClass=this._cssClass(),this.cssStyle=this._cssStyle(a),this.content=this._content(),this.title=r===!0?e.short_name:null,this.ariaLabel=e.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(e){let n={};return this._isCustom()?n={backgroundImage:"url("+this.getEmoji()._data.imageUrl+")",backgroundSize:"100%",width:e+"px",height:e+"px"}:this._hasEmoji()&&!this._isNative()&&(n={backgroundPosition:this.getEmoji().getPosition()}),e&&(this._isNative()?n=Object.assign(n,{fontSize:Math.round(e*.95*10)/10+"px"}):n=Object.assign(n,{width:e+"px",height:e+"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 e=this.getEmoji()._data["has_img_"+this._set];return e===void 0?!0:e}_emojiType(){return this._isCustom()?"custom":this._isNative()?"native":this._hasEmoji()?"image":"fallback"}}function g3e(t){var{name:e,short_names:n,skin_tone:i,skin_variations:s,emoticons:o,unified:r,custom:a,imageUrl:l}=t,c=t.id||n[0],u=`:${c}:`;return a?{id:c,name:e,colons:u,emoticons:o,custom:a,imageUrl:l}:(i&&(u+=`:skin-tone-${i}:`),{id:c,name:e,colons:u,emoticons:o,unified:r.toLowerCase(),skin:i||(s?1:null),native:u3e(r)})}const v3e={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"}},_3e={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{}}}},y3e={props:{...v3e,data:{type:Object,required:!0}},emits:["click","mouseenter","mouseleave"],computed:{view(){return new KF(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 b3e(t,e,n,i,s,o){return o.view.canRender?(v(),D(Ct(t.tag),{key:0,title:o.view.title,"aria-label":o.view.ariaLabel,"data-title":o.title,class:"emoji-mart-emoji",onMouseenter:o.onMouseEnter,onMouseleave:o.onMouseLeave,onClick:o.onClick},{default:y(()=>[g("span",{class:q(o.view.cssClass),style:Xe(o.view.cssStyle)},x(o.view.content),7)]),_:1},40,["title","aria-label","data-title","onMouseenter","onMouseleave","onClick"])):O("",!0)}const ZF=ce(y3e,[["render",b3e]]),w3e={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(t){return!this.emojiProps.selectedEmoji||!this.emojiProps.selectedEmojiCategory?"":this.emojiProps.selectedEmoji.id==t.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(t=>{let e=t,n=new KF(t,this.emojiProps.skin,this.emojiProps.set,this.emojiProps.native,this.emojiProps.fallback,this.emojiProps.emojiTooltip,this.emojiProps.emojiSize);return{emojiObject:e,emojiView:n}})}},components:{Emoji:ZF}},k3e=["aria-label"],C3e={class:"emoji-mart-category-label"},x3e={class:"emoji-mart-category-label"},S3e=["aria-label","data-title","title","onMouseenter","onMouseleave","onClick"],$3e={key:0},A3e={class:"emoji-mart-no-results-label"};function E3e(t,e,n,i,s,o){const r=B("emoji");return o.isVisible&&(o.isSearch||o.hasResults)?(v(),$("section",{key:0,class:q({"emoji-mart-category":!0,"emoji-mart-no-results":!o.hasResults}),"aria-label":n.i18n.categories[n.id]},[g("div",C3e,[g("h3",x3e,x(n.i18n.categories[n.id]),1)]),(v(!0),$(J,null,ye(o.emojiObjects,({emojiObject:a,emojiView:l})=>(v(),$(J,null,[l.canRender?(v(),$("button",{"aria-label":l.ariaLabel,role:"option","aria-selected":"false","aria-posinset":"1","aria-setsize":"1812",type:"button","data-title":a.short_name,key:a.id,title:l.title,class:q(["emoji-mart-emoji",o.activeClass(a)]),onMouseenter:c=>n.emojiProps.onEnter(l.getEmoji()),onMouseleave:c=>n.emojiProps.onLeave(l.getEmoji()),onClick:c=>n.emojiProps.onClick(l.getEmoji())},[g("span",{class:q(l.cssClass),style:Xe(l.cssStyle)},x(l.content),7)],42,S3e)):O("",!0)],64))),256)),o.hasResults?O("",!0):(v(),$("div",$3e,[_(r,{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"]),g("div",A3e,x(n.i18n.notfound),1)]))],10,k3e)):O("",!0)}const M3e=ce(w3e,[["render",E3e]]),T3e={props:{skin:{type:Number,required:!0}},emits:["change"],data(){return{opened:!1}},methods:{onClick(t){this.opened&&t!=this.skin&&this.$emit("change",t),this.opened=!this.opened}}},P3e=["onClick"];function I3e(t,e,n,i,s,o){return v(),$("div",{class:q({"emoji-mart-skin-swatches":!0,"emoji-mart-skin-swatches-opened":s.opened})},[(v(),$(J,null,ye(6,r=>g("span",{key:r,class:q({"emoji-mart-skin-swatch":!0,"emoji-mart-skin-swatch-selected":n.skin==r})},[g("span",{class:q("emoji-mart-skin emoji-mart-skin-tone-"+r),onClick:a=>o.onClick(r)},null,10,P3e)],2)),64))],2)}const L3e=ce(T3e,[["render",I3e]]),O3e={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:ZF,Skins:L3e}},D3e={class:"emoji-mart-preview"},R3e={class:"emoji-mart-preview-emoji"},V3e={class:"emoji-mart-preview-data"},F3e={class:"emoji-mart-preview-name"},N3e={class:"emoji-mart-preview-shortnames"},B3e={class:"emoji-mart-preview-emoticons"},z3e={class:"emoji-mart-preview-emoji"},H3e={class:"emoji-mart-preview-data"},U3e={class:"emoji-mart-title-label"},j3e={key:0,class:"emoji-mart-preview-skins"};function W3e(t,e,n,i,s,o){const r=B("emoji"),a=B("skins");return v(),$("div",D3e,[n.emoji?(v(),$(J,{key:0},[g("div",R3e,[_(r,{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"])]),g("div",V3e,[g("div",F3e,x(n.emoji.name),1),g("div",N3e,[(v(!0),$(J,null,ye(o.emojiShortNames,l=>(v(),$("span",{key:l,class:"emoji-mart-preview-shortname"},":"+x(l)+":",1))),128))]),g("div",B3e,[(v(!0),$(J,null,ye(o.emojiEmoticons,l=>(v(),$("span",{key:l,class:"emoji-mart-preview-emoticon"},x(l),1))),128))])])],64)):(v(),$(J,{key:1},[g("div",z3e,[_(r,{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"])]),g("div",H3e,[g("span",U3e,x(n.title),1)]),n.showSkinTones?(v(),$("div",j3e,[_(a,{skin:n.skinProps.skin,onChange:e[0]||(e[0]=l=>n.onSkinChange(l))},null,8,["skin"])])):O("",!0)],64))])}const Y3e=ce(O3e,[["render",W3e]]),q3e={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 t=this.$el.querySelector("input");this.autoFocus&&t.focus()}},G3e={class:"emoji-mart-search"},X3e=["placeholder"];function K3e(t,e,n,i,s,o){return v(),$("div",G3e,[Re(g("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:[e[0]||(e[0]=ut(r=>t.$emit("arrowLeft",r),["left"])),e[1]||(e[1]=ut(()=>t.$emit("arrowRight"),["right"])),e[2]||(e[2]=ut(()=>t.$emit("arrowDown"),["down"])),e[3]||(e[3]=ut(r=>t.$emit("arrowUp",r),["up"])),e[4]||(e[4]=ut(()=>t.$emit("enter"),["enter"]))],"onUpdate:modelValue":e[5]||(e[5]=r=>s.value=r)},null,40,X3e),[[gd,s.value]]),e[6]||(e[6]=g("span",{class:"hidden",id:"emoji-picker-search-description"},"Use the left, right, up and down arrow keys to navigate the emoji search results.",-1))])}const Z3e=ce(q3e,[["render",K3e]]);var J3e=typeof window<"u";J3e&&function(){for(var t=0,e=["ms","moz","webkit","o"],n=0;n<e.length&&!window.requestAnimationFrame;++n)window.requestAnimationFrame=window[e[n]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[n]+"CancelAnimationFrame"]||window[e[n]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(i,s){var o=new Date().getTime(),r=Math.max(0,16-(o-t)),a=window.setTimeout(function(){i(o+r)},r);return t=o+r,a}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(i){clearTimeout(i)})}();class Q3e{constructor(e){this._vm=e,this._data=e.data,this._perLine=e.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 i=this.filteredCategories[0];for(let s=0,o=this.filteredCategories.length;s<o;s++){let r=this.filteredCategories[s],a=this._vm.getCategoryComponent(s);if(a&&a.$el.offsetTop-50>n)break;i=r}this.activeCategory=i}get allCategories(){return this._categories}get filteredCategories(){return this.searchEmojis?[{id:"search",name:"Search",emojis:this.searchEmojis}]:this._categories.filter(e=>e.emojis.length>0)}get previewEmojiCategory(){return this.previewEmojiCategoryIdx>=0?this.filteredCategories[this.previewEmojiCategoryIdx]:null}onAnchorClick(e){if(this.searchEmojis)return;let n=this.filteredCategories.indexOf(e),i=this._vm.getCategoryComponent(n),s=()=>{if(i){let o=i.$el.offsetTop;e.first&&(o=0),this._vm.$refs.scroll.scrollTop=o}};this._vm.infiniteScroll?s():this.activeCategory=this.filteredCategories[n]}onSearch(e){let n=this._data.search(e,this.maxSearchResults);this.searchEmojis=n,this.previewEmojiCategoryIdx=0,this.previewEmojiIdx=0,this.updatePreviewEmoji()}onEmojiEnter(e){this.previewEmoji=e,this.previewEmojiIdx=-1,this.previewEmojiCategoryIdx=-1}onEmojiLeave(e){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 e=this.filteredCategories[this.previewEmojiCategoryIdx].emojis.length;let n=this._perLine;this.previewEmojiIdx+n>e&&(n=e%this._perLine);for(let i=0;i<n;i++)this.onArrowRight();this.updatePreviewEmoji()}onArrowUp(){let e=this._perLine;this.previewEmojiIdx-e<0&&(this.previewEmojiCategoryIdx>0?e=this.filteredCategories[this.previewEmojiCategoryIdx-1].emojis.length%this._perLine:e=0);for(let n=0;n<e;n++)this.onArrowLeft();this.updatePreviewEmoji()}updatePreviewEmoji(){this.previewEmoji=this.filteredCategories[this.previewEmojiCategoryIdx].emojis[this.previewEmojiIdx],this._vm.$nextTick(()=>{const e=this._vm.$refs.scroll,n=e.querySelector(".emoji-mart-emoji-selected"),i=e.offsetTop-e.offsetHeight;n&&n.offsetTop+n.offsetHeight>i+e.scrollTop&&(e.scrollTop+=n.offsetHeight),n&&n.offsetTop<e.scrollTop&&(e.scrollTop-=n.offsetHeight)})}emojisLength(e){return e==-1?0:this.filteredCategories[e].emojis.length}}const eke={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"}},tke={props:{..._3e,data:{type:Object,required:!0}},emits:["select","skin-change"],data(){return{activeSkin:this.skin||Xf.get("skin")||this.defaultSkin,view:new Q3e(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+h3e()},filteredCategories(){return this.view.filteredCategories},mergedI18n(){return Object.freeze(XF(eke,this.i18n))},idleEmoji(){try{return this.data.emoji(this.emoji)}catch(t){return console.error("Default preview emoji `"+this.emoji+"` is not available, check the Picker `emoji` property"),console.error(t),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(t){this.view.onAnchorClick(t)},onSearch(t){this.view.onSearch(t)},onEmojiEnter(t){this.view.onEmojiEnter(t)},onEmojiLeave(t){this.view.onEmojiLeave(t)},onArrowLeft(t){const e=this.view.previewEmojiIdx;this.view.onArrowLeft(),t&&this.view.previewEmojiIdx!==e&&t.preventDefault()},onArrowRight(){this.view.onArrowRight()},onArrowDown(){this.view.onArrowDown()},onArrowUp(t){this.view.onArrowUp(),t.preventDefault()},onEnter(){this.view.previewEmoji&&(this.$emit("select",this.view.previewEmoji),NC.add(this.view.previewEmoji))},onEmojiClick(t){this.$emit("select",t),NC.add(t)},onTextSelect(t){t.stopPropagation()},onSkinChange(t){this.activeSkin=t,Xf.update({skin:t}),this.$emit("skin-change",t)},getCategoryComponent(t){let e=this.$refs["categories_"+t];return e&&"0"in e?e[0]:e}},components:{Anchors:a3e,Category:M3e,Preview:Y3e,Search:Z3e}},nke={key:0,class:"emoji-mart-bar emoji-mart-bar-anchors"},ske={id:"emoji-mart-list",ref:"scrollContent",role:"listbox","aria-expanded":"true"},ike={key:0,class:"emoji-mart-bar emoji-mart-bar-preview"};function oke(t,e,n,i,s,o){const r=B("anchors"),a=B("search"),l=B("category"),c=B("preview");return v(),$("section",{class:"emoji-mart emoji-mart-static",style:Xe(o.customStyles)},[t.showCategories?(v(),$("div",nke,[_(r,{data:n.data,i18n:o.mergedI18n,color:t.color,categories:s.view.allCategories,"active-category":s.view.activeCategory,onClick:o.onAnchorClick},null,8,["data","i18n","color","categories","active-category","onClick"])])):O("",!0),le(t.$slots,"searchTemplate",{data:n.data,i18n:t.i18n,autoFocus:t.autoFocus,onSearch:o.onSearch},()=>[t.showSearch?(v(),D(a,{key:0,ref:"search",data:n.data,i18n:o.mergedI18n,"auto-focus":t.autoFocus,"on-search":o.onSearch,onSearch:o.onSearch,onArrowLeft:o.onArrowLeft,onArrowRight:o.onArrowRight,onArrowDown:o.onArrowDown,onArrowUp:o.onArrowUp,onEnter:o.onEnter,onSelect:o.onTextSelect},null,8,["data","i18n","auto-focus","on-search","onSearch","onArrowLeft","onArrowRight","onArrowDown","onArrowUp","onEnter","onSelect"])):O("",!0)]),g("div",{role:"tabpanel",class:"emoji-mart-scroll",ref:"scroll",onScroll:e[0]||(e[0]=(...u)=>o.onScroll&&o.onScroll(...u))},[g("div",ske,[le(t.$slots,"customCategory"),(v(!0),$(J,null,ye(s.view.filteredCategories,(u,d)=>Re((v(),D(l,{ref_for:!0,ref:"categories_"+d,key:u.id,data:n.data,i18n:o.mergedI18n,id:u.id,name:u.name,emojis:u.emojis,"emoji-props":o.emojiProps},null,8,["data","i18n","id","name","emojis","emoji-props"])),[[jt,t.infiniteScroll||u==s.view.activeCategory]])),128))],512)],544),le(t.$slots,"previewTemplate",{data:n.data,title:t.title,emoji:s.view.previewEmoji,idleEmoji:o.idleEmoji,showSkinTones:t.showSkinTones,emojiProps:o.emojiProps,skinProps:o.skinProps,onSkinChange:o.onSkinChange},()=>[t.showPreview?(v(),$("div",ike,[_(c,{data:n.data,title:t.title,emoji:s.view.previewEmoji,"idle-emoji":o.idleEmoji,"show-skin-tones":t.showSkinTones,"emoji-props":o.emojiProps,"skin-props":o.skinProps,"on-skin-change":o.onSkinChange},null,8,["data","title","emoji","idle-emoji","show-skin-tones","emoji-props","skin-props","on-skin-change"])])):O("",!0)])],4)}const rke=ce(tke,[["render",oke]]),ake={name:"ActionPopover",emits:["show","hide"],props:{items:{type:Array,default:()=>[]},width:{type:[Number,String],default:150},placement:{type:String,default:"bottom",validator:t=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(t)},persistent:{type:Boolean,default:!1},teleported:{type:Boolean,default:!1}},data(){return{visible:!1}},watch:{visible(t){this.$emit(t?"show":"hide"),document[t?"addEventListener":"removeEventListener"]("click",this.onClickOutside,!0)}},methods:{toggle(){this.visible=!this.visible},hide(){this.visible=!1},onClickOutside(t){var n,i,s,o,r;const e=(i=(n=this.$refs.popoverRef)==null?void 0:n.popperRef)==null?void 0:i.contentRef;e!=null&&e.contains(t.target)||(s=this.$refs.triggerRef)!=null&&s.contains(t.target)||(r=(o=t.target).closest)!=null&&r.call(o,".el-popper")||this.hide()},handleAction(t){t.disabled||(this.hide(),t.action&&t.action())},focusFirstItem(){this.focusItem(0)},focusItem(t){var i;const e=this.$refs.menuItems;if(!Array.isArray(e)||!e.length)return;const n=e[(t+e.length)%e.length];(i=n==null?void 0:n.focus)==null||i.call(n)},hideAndFocusTrigger(){this.hide(),this.$nextTick(()=>{var n,i;const t=this.$refs.triggerRef,e=((n=t==null?void 0:t.querySelector)==null?void 0:n.call(t,"button, a, [tabindex]"))||t;(i=e==null?void 0:e.focus)==null||i.call(e)})}},beforeUnmount(){document.removeEventListener("click",this.onClickOutside,!0)}},lke=["aria-disabled","onClick","onKeydown"];function cke(t,e,n,i,s,o){const r=B("MoreFilled"),a=we,l=ze,c=Yo;return v(),D(c,{trigger:"manual",placement:n.placement,persistent:n.persistent,width:n.width,visible:s.visible,teleported:n.teleported,"popper-class":"fcom_menu_below_nav",onAfterEnter:o.focusFirstItem,ref:"popoverRef"},{reference:y(()=>[g("span",{ref:"triggerRef",class:"fcom_action_popover_trigger",onClick:e[0]||(e[0]=(...u)=>o.toggle&&o.toggle(...u))},[le(t.$slots,"trigger",{visible:s.visible},()=>[_(l,{"aria-label":t.$t("View actions"),"aria-haspopup":"menu","aria-expanded":s.visible,class:"fcom_action_popover_default_trigger_button",size:"small"},{default:y(()=>[_(a,null,{default:y(()=>[_(r)]),_:1})]),_:1},8,["aria-label","aria-expanded"])])],512)]),default:y(()=>[le(t.$slots,"default",{hide:o.hide},()=>[g("ul",{class:"actions_items",role:"menu","aria-orientation":"vertical",onKeydown:e[1]||(e[1]=ut(Me((...u)=>o.hideAndFocusTrigger&&o.hideAndFocusTrigger(...u),["prevent","stop"]),["esc"]))},[(v(!0),$(J,null,ye(n.items,(u,d)=>(v(),$("li",{key:d,ref_for:!0,ref:"menuItems",class:q(["fcom_action_popover_item",[u.type?"fcom_action_popover_item_"+u.type:"",{"is-disabled":u.disabled}]]),role:"menuitem","aria-disabled":u.disabled?"true":null,tabindex:"0",onClick:h=>o.handleAction(u),onKeydown:[ut(Me(h=>o.handleAction(u),["prevent"]),["enter"]),ut(Me(h=>o.handleAction(u),["prevent"]),["space"]),ut(Me(h=>o.focusItem(d+1),["prevent"]),["down"]),ut(Me(h=>o.focusItem(d-1),["prevent"]),["up"])]},x(u.label),43,lke))),128))],32)])]),_:3},8,["placement","persistent","width","visible","teleported","onAfterEnter"])}const aa=ce(ake,[["render",cke]]),uke={name:"SmilyIcon"},dke={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function hke(t,e,n,i,s,o){return v(),$("svg",dke,[...e[0]||(e[0]=[xr('<g><circle cx="9.99996" cy="10.0013" r="8.33333" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></circle><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><path fill-rule="evenodd" clip-rule="evenodd" d="M6.6741 7.5L6.66663 7.5Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M13.3333 7.5L13.3258 7.5Z" fill="currentColor"></path><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"></path></g>',1)])])}const fke=ce(uke,[["render",hke]]),pke={name:"EmojiPicker",components:{Picker:rke,ActionPopover:aa,SmilyIcon:fke},emits:["emoji-selected"],props:{close_on_select:{type:Boolean,default:!1}},data(){return{emojiIndex:null,emojiLoading:!1,errorMessage:"",isLoading:!1}},methods:{onEmojiSelect(t){this.$emit("emoji-selected",t.native),this.close_on_select&&this.closeAndRefocus()},closeAndRefocus(){var t;(t=this.$refs.fcom_emoji_popover)==null||t.hideAndFocusTrigger()},applyEmojiIndex(){this.emojiIndex=window.fcomEmojiIndex,this.emojiLoading=!1,this.focusSearchInput()},focusSearchInput(){this.$nextTick(()=>{var n,i,s,o;const t=document.activeElement,e=(n=this.$refs.emojiTrigger)==null?void 0:n.$el;t&&t!==document.body&&t!==e&&!t.closest(".ffcom_emoji")||(o=(s=(i=this.$refs.picker)==null?void 0:i.$el)==null?void 0:s.querySelector("input"))==null||o.focus()})},loadEmojiAssets(){if(this.isLoading)return;if(window.fcomEmojiIndex){this.applyEmojiIndex();return}this.isLoading=!0;let t=this.appVars.assets_url+"libs/static/tw_emojis.json";this.emojiLoading=!0,fetch(t).then(e=>e.json()).then(e=>{e?(window.fcomEmojiIndex=new m3e(e),this.applyEmojiIndex()):this.errorMessage=this.$t("Emoji loading failed")}).catch(()=>{this.errorMessage=this.$t("Emoji loading failed")}).finally(()=>{this.isLoading=!1})}}},mke={key:0,class:"emoji-mart emoji-mart-static",style:{width:"320px",padding:"10px 20px"}},gke={key:0},vke={style:{"text-align":"center","margin-bottom":"20px"}},_ke={key:1,class:"fcom_emoji_holder"};function yke(t,e,n,i,s,o){const r=B("SmilyIcon"),a=we,l=ze,c=Vt,u=B("Picker"),d=B("action-popover");return v(),D(d,{ref:"fcom_emoji_popover","close-on-click-outside":!0,placement:"bottom",persistent:!1,"trigger-interactive":!0,teleported:!0,width:350,onShow:o.loadEmojiAssets},{trigger:y(({visible:h})=>[_(l,{ref:"emojiTrigger","aria-label":t.$t("Pick Emoji"),"aria-haspopup":"dialog","aria-expanded":h?"true":"false",onKeydown:ut(f=>h&&o.closeAndRefocus(),["esc"]),text:""},{default:y(()=>[_(a,null,{default:y(()=>[_(r)]),_:1})]),_:1},8,["aria-label","aria-expanded","onKeydown"])]),default:y(()=>[g("div",{class:"ffcom_emoji",onKeydown:e[0]||(e[0]=ut(Me(h=>o.closeAndRefocus(),["prevent","stop"]),["esc"]))},[s.emojiLoading?(v(),$("div",mke,[s.errorMessage?(v(),$("div",gke,x(s.errorMessage),1)):(v(),$(J,{key:1},[g("div",vke,x(t.$t("Loading...")),1),_(c,{animated:!0,rows:3})],64))])):s.emojiIndex?(v(),$("div",_ke,[_(u,{title:t.$t("Pick Emoji"),i18n:{search:t.$t("Search"),notfound:t.$t("No Emoji Found"),categories:{search:t.$t("Search Results"),recent:t.$t("Frequently Used"),smileys:t.$t("Smileys & Emotion"),people:t.$t("People & Body"),nature:t.$t("Animals & Nature"),foods:t.$t("Food & Drink"),activity:t.$t("Activity"),places:t.$t("Travel & Places"),objects:t.$t("Objects"),symbols:t.$t("Symbols"),flags:t.$t("Flags"),custom:t.$t("Custom")}},color:"#66b1ff",showPreview:!1,ref:"picker",data:s.emojiIndex,set:"twitter",onSelect:o.onEmojiSelect,emojiSize:22,sheetSize:32,emojiTooltip:!1},null,8,["title","i18n","data","onSelect"])])):O("",!0)],32)]),_:1},8,["onShow"])}const JF=ce(pke,[["render",yke]]),bke={name:"LogoEmojiSelector",components:{EmojiPicker:JF,ImageUploader:Ll,SvgShapeGenerator:Ywe,ActionPopover:aa},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||"",selectedTab:"emoji"}},methods:{setData(t){t=="emoji"?(this.logo="",this.shape_svg=""):t=="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(t){this.logo=t,this.setData("logo")},handleShapeChanged(t){this.shape_svg=t,this.setData("shape_svg")}},computed:{currentMark(){return this.logo?`<img alt="" src="${this.logo}" style="width: 20px; height: 20px; aspect-ratio: 1/1;">`:this.emoji.trim()?`<span style="font-size: 20px">${this.emoji.trim()}</span>`:this.shape_svg?'<i class="fcom_shape el-icon">'+this.shape_svg+"</i>":this.fallback_mark}},mounted(){if(this.logo)this.selectedTab="logo";else if(this.emoji)this.selectedTab="emoji";else if(this.shape_svg){if(this.custom_svg&&!/fcom_shape/.test(this.shape_svg)){this.selectedTab="shape_svg";return}this.selectedTab="shape"}}},wke=["innerHTML"];function kke(t,e,n,i,s,o){const r=ze,a=B("EmojiPicker"),l=ht,c=h2,u=B("SvgShapeGenerator"),d=bo,h=B("ImageUploader"),f=d2,p=B("action-popover");return v(),D(p,{ref:"iconPicker","close-on-click-outside":!0,"trigger-interactive":!0,teleported:!0,width:t.modalWidth},{trigger:y(()=>[_(r,{"aria-label":t.$t("Pick Emoji"),style:{padding:"4px 16px",display:"flex","justify-content":"center","align-items":"center"}},{default:y(()=>[g("span",{class:"logo_emoji_holder",style:{cursor:"pointer"},innerHTML:o.currentMark||""},null,8,wke)]),_:1},8,["aria-label"])]),default:y(({hide:m})=>[g("div",null,[_(f,{modelValue:s.selectedTab,"onUpdate:modelValue":e[5]||(e[5]=b=>s.selectedTab=b),type:"border-card"},{default:y(()=>[_(c,{name:"emoji",label:t.$t("Emoji")},{default:y(()=>[_(l,{onChange:e[1]||(e[1]=b=>o.setData("emoji")),modelValue:s.emoji,"onUpdate:modelValue":e[2]||(e[2]=b=>s.emoji=b),placeholder:t.$t("Select or paste your emoji here"),style:{width:"100%"}},hs({_:2},[t.has_pro?{name:"append",fn:y(()=>[_(a,{close_on_select:!0,onEmojiSelected:e[0]||(e[0]=b=>{s.emoji=b,o.setData("emoji")})})]),key:"0"}:void 0]),1032,["modelValue","placeholder"])]),_:1},8,["label"]),_(c,{name:"shape",label:t.$t("Shape")},{default:y(()=>[_(u,{onUpdate:o.handleShapeChanged},null,8,["onUpdate"])]),_:1},8,["label"]),n.custom_svg?(v(),D(c,{key:0,name:"shape_svg",label:t.$t("Custom SVG")},{default:y(()=>[_(l,{rows:4,type:"textarea",onChange:e[3]||(e[3]=b=>o.setData("shape_svg")),modelValue:s.shape_svg,"onUpdate:modelValue":e[4]||(e[4]=b=>s.shape_svg=b),placeholder:t.$t("Paste your SVG here"),style:{width:"100%"}},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):O("",!0),_(c,{name:"logo",label:t.$t("Custom Image")},{default:y(()=>[s.logo?(v(),D(d,{key:0,alt:t.$t("Logo"),src:s.logo,style:{"max-width":"100px"}},null,8,["alt","src"])):O("",!0),_(h,{can_remove:!!s.logo,isTextBtn:!1,additionalData:{resize:!0,max_width:400},onUploaded:o.handleLogoPhotoUpload},null,8,["can_remove","onUploaded"])]),_:1},8,["label"])]),_:1},8,["modelValue"]),_(r,{onClick:b=>m(),type:"success",plain:"",class:"fcom_mt_20"},{default:y(()=>[N(x(t.$t("Close")),1)]),_:1},8,["onClick"])])]),_:1},8,["width"])}const sv=ce(bke,[["render",kke]]),Cke={name:"SlugInput",emits:["update:modelValue"],props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},is_inital_inactive:{type:Boolean,default:!1},edit_notice:{type:String,default:""},popMessage:{type:String,default:""},description:{type:String,default:""},prefix:{type:String,default:""}},watch:{modelValue(t){this.model=t}},data(){return{model:this.modelValue,showEdit:this.is_inital_inactive}},methods:{updateSlug(){this.model=this.model.replace(/\s/g,"-"),this.model=this.model.replace(/[^a-zA-Z0-9-_]/g,""),this.$emit("update:modelValue",this.model)},confirmEditInit(){this.$confirm(this.popMessage||this.$t("Are you sure you want to change the slug?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("No"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.showEdit=!1})}}},xke={key:0,class:"fcom_slug_input_info"},Ske=["innerHTML"],$ke={key:1,class:"fcom_help_text"};function Ake(t,e,n,i,s,o){const r=ze,a=ht;return v(),$(J,null,[_(a,{class:"fcom_slug_input",disabled:n.disabled,readonly:s.showEdit,modelValue:s.model,"onUpdate:modelValue":e[1]||(e[1]=l=>s.model=l),ref:"input",placeholder:n.placeholder,onInput:o.updateSlug},hs({_:2},[n.prefix?{name:"prepend",fn:y(()=>[g("span",null,x(n.prefix),1)]),key:"0"}:void 0,s.showEdit?{name:"append",fn:y(()=>[_(r,{onClick:e[0]||(e[0]=l=>o.confirmEditInit()),text:"",type:"info"},{default:y(()=>[N(x(t.$t("change")),1)]),_:1})]),key:"1"}:void 0]),1032,["disabled","readonly","modelValue","placeholder","onInput"]),!s.showEdit&&n.edit_notice?(v(),$("div",xke,[g("p",{innerHTML:n.edit_notice},null,8,Ske)])):O("",!0),n.description?(v(),$("div",$ke,[g("p",null,x(n.description),1)])):O("",!0)],64)}const Yd=ce(Cke,[["render",Ake]]),Eke={name:"ErrorAlerts",props:{errors:{type:Array,default:()=>[]},dismissable:{type:Boolean,default:!1}},data(){return{dismissed:!1}},watch:{errors(){this.dismissed=!1}}},Mke={class:"fcom_errors_alert_list"};function Tke(t,e,n,i,s,o){const r=oa;return n.errors.length&&!s.dismissed?(v(),D(r,{key:0,type:"warning",closable:n.dismissable,"show-icon":"",onClose:e[0]||(e[0]=a=>s.dismissed=!0)},{title:y(()=>[g("ul",Mke,[(v(!0),$(J,null,ye(n.errors,(a,l)=>(v(),$("li",{key:l},x(a),1))),128))])]),_:1},8,["closable"])):O("",!0)}const iv=ce(Eke,[["render",Tke]]),Pke={name:"TopicSelector",props:["modelValue","creatable","space_id"],emits:["update:modelValue"],components:{SlugInput:Yd,ActionPopover:aa,ErrorAlerts:iv},data(){return{topics:[],selected:this.modelValue,loading:!1,creatingTopic:!1,newTopicErrors:[],newTopic:{title:"OK"}}},computed:{maxTopicsPerSpace(){var t;return((t=this.appVars.topicsConfig)==null?void 0:t.max_topics_per_space)||20},isTopicLimitReached(){var t;return((t=this.selected)==null?void 0:t.length)>=this.maxTopicsPerSpace}},methods:{getTopicsPlaceholder(){return this.$_n("Choose a topic","Choose up to %s topics",this.maxTopicsPerSpace)},initCreatetopic(){this.newTopicErrors=[],this.newTopic={title:"",description:"",slug:""}},validateForm(){return this.newTopicErrors=[],(!this.newTopic.title||!this.newTopic.title.trim())&&this.newTopicErrors.push(this.$t("Topic title is required.")),this.newTopicErrors.length===0},fetchTopics(){this.loading=!0,this.$get("admin/topics",{optionsOnly:!0,space_id:this.space_id}).then(t=>{this.topics=t.topics}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},createTopic(t){if(!this.validateForm())return;this.creatingTopic=!0;let e={title:this.newTopic.title,description:this.newTopic.description,slug:this.newTopic.slug,is_inline:!0};this.$post("admin/topics",e).then(n=>{this.$notify.success(n.message),this.fetchTopics(),this.selected.push(n.topic.id),t()}).catch(n=>{this.$handleError(n)}).finally(()=>{this.creatingTopic=!1})}},watch:{selected(){this.$emit("update:modelValue",this.selected)}},mounted(){this.fetchTopics()}},Ike={class:"fcom_topic_selector"},Lke={key:0,class:"fcom_meta_text"};function Oke(t,e,n,i,s,o){const r=Zt,a=Wt,l=B("Plus"),c=we,u=ze,d=ht,h=tn,f=B("slug-input"),p=B("error-alerts"),m=nn,b=B("action-popover"),w=xt("loading");return v(),$("div",Ike,[Re((v(),D(a,{modelValue:s.selected,"onUpdate:modelValue":e[0]||(e[0]=k=>s.selected=k),"popper-class":"fcom_topics_from_settings",style:{width:"100%"},filterable:!0,multiple:!0,clearable:"","multiple-limit":o.maxTopicsPerSpace,placeholder:o.getTopicsPlaceholder()},{default:y(()=>[(v(!0),$(J,null,ye(s.topics,k=>(v(),D(r,{key:k.slug,label:k.title,value:k.id},{default:y(()=>[g("span",null,x(k.title),1),k.description?(v(),$("span",Lke,x(k.description),1)):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","multiple-limit","placeholder"])),[[w,s.loading]]),t.isAdmin()&&n.creatable?(v(),D(b,{key:0,placement:"left",width:400,onShow:o.initCreatetopic},{trigger:y(()=>[_(u,{disabled:o.isTopicLimitReached,class:"fcom_secondary_button"},{default:y(()=>[_(c,null,{default:y(()=>[_(l)]),_:1}),g("span",null,x(t.$t("New")),1)]),_:1},8,["disabled"])]),default:y(({hide:k})=>[_(m,{modelValue:s.newTopic,"onUpdate:modelValue":e[4]||(e[4]=C=>s.newTopic=C),"label-position":"top","require-asterisk-position":"right"},{default:y(()=>[_(h,{label:t.$t("Title"),required:""},{default:y(()=>[_(d,{modelValue:s.newTopic.title,"onUpdate:modelValue":e[1]||(e[1]=C=>s.newTopic.title=C),placeholder:t.$t("Title of the topic")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(h,{label:t.$t("Slug (optional)")},{default:y(()=>[_(f,{modelValue:s.newTopic.slug,"onUpdate:modelValue":e[2]||(e[2]=C=>s.newTopic.slug=C),placeholder:t.$t("Slug of the topic"),description:t.$t("No spaces or special characters allowed. Only letters, numbers, hyphens, and underscores.")},null,8,["modelValue","placeholder","description"])]),_:1},8,["label"]),_(h,{label:t.$t("Description (optional)")},{default:y(()=>[_(d,{modelValue:s.newTopic.description,"onUpdate:modelValue":e[3]||(e[3]=C=>s.newTopic.description=C),type:"textarea",rows:3,placeholder:t.$t("Description of the topic")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(p,{errors:s.newTopicErrors,style:{"margin-bottom":"16px"}},null,8,["errors"]),_(h,null,{default:y(()=>[_(u,{class:"fcom_primary_button",onClick:C=>o.createTopic(k),loading:s.creatingTopic},{default:y(()=>[N(x(t.$t("Create")),1)]),_:1},8,["onClick","loading"])]),_:2},1024)]),_:2},1032,["modelValue"])]),_:1},8,["onShow"])):O("",!0)])}const QF=ce(Pke,[["render",Oke]]),Dke={name:"ListViewIcon"},Rke={width:"160",height:"158",viewBox:"0 0 160 158",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Vke(t,e,n,i,s,o){return v(),$("svg",Rke,[...e[0]||(e[0]=[xr('<rect x="0.5" y="0.5" width="159" height="157" rx="5.5" fill="transparent"></rect><rect x="0.5" y="0.5" width="159" height="157" rx="5.5" stroke="var(--fcom-secondary-border)"></rect><rect x="12.5" y="12.5" width="135" height="27" rx="3.5" fill="transparent"></rect><rect x="12.5" y="12.5" width="135" height="27" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 26C20 21.5817 23.5817 18 28 18C32.4183 18 36 21.5817 36 26C36 30.4183 32.4183 34 28 34C23.5817 34 20 30.4183 20 26Z" fill="var(--fcom-secondary-border)"></path><g clip-path="url(#clip0_3601_59265)"><ellipse cx="27.9996" cy="33.6" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="24.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 26C44 24.3431 45.3431 23 47 23H137C138.657 23 140 24.3431 140 26C140 27.6569 138.657 29 137 29H47C45.3431 29 44 27.6569 44 26Z" fill="var(--fcom-secondary-border)"></path><rect x="12.5" y="48.5" width="135" height="27" rx="3.5" fill="transparent"></rect><rect x="12.5" y="48.5" width="135" height="27" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 62C20 57.5817 23.5817 54 28 54C32.4183 54 36 57.5817 36 62C36 66.4183 32.4183 70 28 70C23.5817 70 20 66.4183 20 62Z" fill="var(--fcom-secondary-border)"></path><g clip-path="url(#clip1_3601_59265)"><ellipse cx="27.9996" cy="69.6001" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="60.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 62C44 60.3431 45.3431 59 47 59H137C138.657 59 140 60.3431 140 62C140 63.6569 138.657 65 137 65H47C45.3431 65 44 63.6569 44 62Z" fill="var(--fcom-secondary-border)"></path><rect x="12.5" y="84.5" width="135" height="27" rx="3.5" fill="transparent"></rect><rect x="12.5" y="84.5" width="135" height="27" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 98C20 93.5817 23.5817 90 28 90C32.4183 90 36 93.5817 36 98C36 102.418 32.4183 106 28 106C23.5817 106 20 102.418 20 98Z" fill="var(--fcom-secondary-border)"></path><g clip-path="url(#clip2_3601_59265)"><ellipse cx="27.9996" cy="105.6" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="96.3999" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 98C44 96.3431 45.3431 95 47 95H137C138.657 95 140 96.3431 140 98C140 99.6569 138.657 101 137 101H47C45.3431 101 44 99.6569 44 98Z" fill="var(--fcom-secondary-border)"></path><rect x="12.5" y="120.5" width="135" height="27" rx="3.5" fill="transparent"></rect><rect x="12.5" y="120.5" width="135" height="27" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 134C20 129.582 23.5817 126 28 126C32.4183 126 36 129.582 36 134C36 138.418 32.4183 142 28 142C23.5817 142 20 138.418 20 134Z" fill="var(--fcom-secondary-border)"></path><g clip-path="url(#clip3_3601_59265)"><ellipse cx="27.9996" cy="141.6" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="132.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 134C44 132.343 45.3431 131 47 131H137C138.657 131 140 132.343 140 134C140 135.657 138.657 137 137 137H47C45.3431 137 44 135.657 44 134Z" fill="var(--fcom-secondary-border)"></path><defs><clipPath id="clip0_3601_59265"><rect x="20" y="18" width="16" height="16" rx="8" fill="transparent"></rect></clipPath><clipPath id="clip1_3601_59265"><rect x="20" y="54" width="16" height="16" rx="8" fill="transparent"></rect></clipPath><clipPath id="clip2_3601_59265"><rect x="20" y="90" width="16" height="16" rx="8" fill="transparent"></rect></clipPath><clipPath id="clip3_3601_59265"><rect x="20" y="126" width="16" height="16" rx="8" fill="transparent"></rect></clipPath></defs>',23)])])}const Fke=ce(Dke,[["render",Vke]]),Nke={name:"TimelineViewIcon"},Bke={width:"160",height:"158",viewBox:"0 0 160 158",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function zke(t,e,n,i,s,o){return v(),$("svg",Bke,[...e[0]||(e[0]=[xr('<rect x="0.5" y="0.5" width="159" height="157" rx="5.5" fill="transparent"></rect><rect x="0.5" y="0.5" width="159" height="157" rx="5.5" stroke="var(--fcom-secondary-border)"></rect><rect x="12.5" y="12.5" width="135" height="60" rx="3.5" fill="transparent"></rect><rect x="12.5" y="12.5" width="135" height="60" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 24C20 21.7909 21.7909 20 24 20H136C138.209 20 140 21.7909 140 24C140 26.2091 138.209 28 136 28H24C21.7909 28 20 26.2091 20 24Z" fill="var(--fcom-secondary-border)"></path><path d="M20 37C20 34.7909 21.7909 33 24 33H130.286C132.495 33 134.286 34.7909 134.286 37C134.286 39.2091 132.495 41 130.286 41H24C21.7909 41 20 39.2091 20 37Z" fill="var(--fcom-secondary-border)"></path><path d="M20 57C20 52.5817 23.5817 49 28 49C32.4183 49 36 52.5817 36 57C36 61.4183 32.4183 65 28 65C23.5817 65 20 61.4183 20 57Z" fill="var(--fcom-secondary-border)"></path><g clip-path="url(#clip0_3601_59186)"><ellipse cx="27.9996" cy="64.6001" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="55.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 53C44 51.3431 45.3431 50 47 50H81C82.6569 50 84 51.3431 84 53C84 54.6569 82.6569 56 81 56H47C45.3431 56 44 54.6569 44 53Z" fill="var(--fcom-secondary-border)"></path><path d="M44 62C44 60.8954 44.8954 60 46 60H66C67.1046 60 68 60.8954 68 62C68 63.1046 67.1046 64 66 64H46C44.8954 64 44 63.1046 44 62Z" fill="var(--fcom-secondary-border)"></path><rect x="12.5" y="85.5" width="135" height="60" rx="3.5" fill="transparent"></rect><rect x="12.5" y="85.5" width="135" height="60" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 97C20 94.7909 21.7909 93 24 93H136C138.209 93 140 94.7909 140 97C140 99.2091 138.209 101 136 101H24C21.7909 101 20 99.2091 20 97Z" fill="var(--fcom-secondary-border)"></path><path d="M20 110C20 107.791 21.7909 106 24 106H130.286C132.495 106 134.286 107.791 134.286 110C134.286 112.209 132.495 114 130.286 114H24C21.7909 114 20 112.209 20 110Z" fill="var(--fcom-secondary-border)"></path><path d="M20 130C20 125.582 23.5817 122 28 122C32.4183 122 36 125.582 36 130C36 134.418 32.4183 138 28 138C23.5817 138 20 134.418 20 130Z" fill="var(--fcom-secondary-border)"></path><g clip-path="url(#clip1_3601_59186)"><ellipse cx="27.9996" cy="137.6" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="128.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 126C44 124.343 45.3431 123 47 123H81C82.6569 123 84 124.343 84 126C84 127.657 82.6569 129 81 129H47C45.3431 129 44 127.657 44 126Z" fill="var(--fcom-secondary-border)"></path><path d="M44 135C44 133.895 44.8954 133 46 133H66C67.1046 133 68 133.895 68 135C68 136.105 67.1046 137 66 137H46C44.8954 137 44 136.105 44 135Z" fill="var(--fcom-secondary-border)"></path><defs><clipPath id="clip0_3601_59186"><rect x="20" y="49" width="16" height="16" rx="8" fill="transparent"></rect></clipPath><clipPath id="clip1_3601_59186"><rect x="20" y="122" width="16" height="16" rx="8" fill="transparent"></rect></clipPath></defs>',19)])])}const Hke=ce(Nke,[["render",zke]]),Uke={name:"SpaceGroupSelector",props:["modelValue","space_id"],emits:["update:modelValue"],data(){return{loading:!1,selected:this.modelValue,groups:[]}},watch:{selected(t){this.$emit("update:modelValue",t)}},methods:{getGroups(){this.loading=!0,this.$get("spaces/space_groups",{options_only:"yes",space_id:this.space_id}).then(t=>{this.groups=t.groups}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.getGroups()}};function jke(t,e,n,i,s,o){const r=Zt,a=Wt,l=xt("loading");return Re((v(),D(a,{placeholder:t.$t("Select Menu Group"),clearable:"",modelValue:s.selected,"onUpdate:modelValue":e[0]||(e[0]=c=>s.selected=c)},{default:y(()=>[(v(!0),$(J,null,ye(s.groups,c=>(v(),D(r,{key:c.id,value:c.id.toString(),label:c.title},null,8,["value","label"]))),128))]),_:1},8,["placeholder","modelValue"])),[[l,s.loading]])}const j8=ce(Uke,[["render",jke]]),Wke={name:"global_form_builder",props:{formData:{type:Object,required:!1,default(){return{}}},submitButtonText:{type:String,required:!1,default:"Save"},formFields:{type:Array,required:!0,default(){return[]}},disableSubmit:{type:Boolean,required:!1,default:!1}},methods:{handleSubmit(){this.$emit("submit",this.formData)}}},Yke={class:"fcom_form_builder"},qke=["innerHTML"],Gke={key:8},Xke={key:9,class:"fcom_help_text"},Kke=["innerHTML"];function Zke(t,e,n,i,s,o){const r=ht,a=Li,l=ws,c=Zt,u=Wt,d=qt,h=o2,f=Wd,p=eu,m=tn,b=ze,w=nn;return v(),$("div",Yke,[_(w,{"label-position":"top",model:n.formData,onSubmit:Me(t.doNothing,["prevent"])},{default:y(()=>[(v(!0),$(J,null,ye(n.formFields,(k,C)=>(v(),D(m,{key:t.index,label:k.label},hs({default:y(()=>[k.type=="text"?(v(),D(r,{key:0,modelValue:n.formData[C],"onUpdate:modelValue":A=>n.formData[C]=A,placeholder:k.placeholder,type:k.data_type||"text"},null,8,["modelValue","onUpdate:modelValue","placeholder","type"])):k.type=="radio"?(v(),D(l,{key:1,modelValue:n.formData[C],"onUpdate:modelValue":A=>n.formData[C]=A},{default:y(()=>[(v(!0),$(J,null,ye(k.options,(A,S)=>(v(),D(a,{key:S,value:A.value,label:A.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):k.type=="select"?(v(),D(u,{key:2,class:"fcom_select",multiple:k.is_multiple,clearable:"",filterable:"",modelValue:n.formData[C],"onUpdate:modelValue":A=>n.formData[C]=A,placeholder:k.placeholder},{default:y(()=>[(v(!0),$(J,null,ye(k.options,(A,S)=>(v(),D(c,{key:S,label:A.label,value:A.value},null,8,["label","value"]))),128))]),_:2},1032,["multiple","modelValue","onUpdate:modelValue","placeholder"])):k.type=="checkbox"?(v(),D(h,{key:3,modelValue:n.formData[C],"onUpdate:modelValue":A=>n.formData[C]=A},{default:y(()=>[(v(!0),$(J,null,ye(k.options,(A,S)=>(v(),D(d,{key:S,value:A.value,label:A.label,class:"fcom_checkbox"},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):k.type=="inline_checkbox"?(v(),D(d,{key:4,modelValue:n.formData[C],"onUpdate:modelValue":A=>n.formData[C]=A,"true-value":k.true_value||"yes","false-value":k.false_value||"no",class:"fcom_checkbox"},{default:y(()=>[N(x(k.checkbox_label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","true-value","false-value"])):k.type=="date"?(v(),D(f,{key:5,modelValue:n.formData[C],"onUpdate:modelValue":A=>n.formData[C]=A,type:k.data_type||"date","value-format":k.value_format||"YYYY-MM-DD",format:k.value_format||"YYYY-MM-DD",placeholder:k.placeholder},null,8,["modelValue","onUpdate:modelValue","type","value-format","format","placeholder"])):k.type=="color_picker"?(v(),D(p,{key:6,modelValue:n.formData[C],"onUpdate:modelValue":A=>n.formData[C]=A},null,8,["modelValue","onUpdate:modelValue"])):k.type=="raw_html"?(v(),$("div",{key:7,innerHTML:k.content},null,8,qke)):(v(),$("div",Gke,[g("pre",null,x(k),1)])),k.help_text?(v(),$("div",Xke,[g("p",{innerHTML:k.help_text},null,8,Kke)])):O("",!0)]),_:2},[k.label?{name:"label",fn:y(()=>[N(x(k.label),1)]),key:"0"}:void 0]),1032,["label"]))),128)),n.disableSubmit?O("",!0):(v(),D(m,{key:0},{default:y(()=>[_(b,{class:"fcom_primary_button",onClick:Me(o.handleSubmit,["prevent"])},{default:y(()=>[N(x(n.submitButtonText),1)]),_:1},8,["onClick"])]),_:1}))]),_:1},8,["model","onSubmit"])])}const eN=ce(Wke,[["render",Zke]]),Jke={name:"CardViewIcon"},Qke={xmlns:"http://www.w3.org/2000/svg",width:"160",height:"158",viewBox:"0 0 160 158",fill:"none"};function eCe(t,e,n,i,s,o){return v(),$("svg",Qke,[...e[0]||(e[0]=[xr('<rect x="0.5" y="0.5" width="159" height="157" rx="5.5" fill="transparent"></rect><rect x="0.5" y="0.5" width="159" height="157" rx="5.5" stroke="var(--fcom-secondary-border)"></rect><rect x="12.5" y="12.5" width="63" height="62" rx="3.5" fill="transparent"></rect><rect x="12.5" y="12.5" width="63" height="62" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 24.5714C20 22.0467 22.0467 20 24.5714 20H63.4286C65.9533 20 68 22.0467 68 24.5714V42.4286C68 44.9533 65.9533 47 63.4286 47H24.5714C22.0467 47 20 44.9533 20 42.4286V24.5714Z" fill="var(--fcom-primary-border)"></path><path d="M20 56C20 54.3431 21.3431 53 23 53H65C66.6569 53 68 54.3431 68 56C68 57.6569 66.6569 59 65 59H23C21.3431 59 20 57.6569 20 56Z" fill="var(--fcom-secondary-border)"></path><path d="M20 66C20 64.3431 21.3431 63 23 63H41C42.6569 63 44 64.3431 44 66C44 67.6569 42.6569 69 41 69H23C21.3431 69 20 67.6569 20 66Z" fill="var(--fcom-secondary-border)"></path><rect x="84.5" y="12.5" width="63" height="62" rx="3.5" fill="transparent"></rect><rect x="84.5" y="12.5" width="63" height="62" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M92 24.5714C92 22.0467 94.0467 20 96.5714 20H135.429C137.953 20 140 22.0467 140 24.5714V42.4286C140 44.9533 137.953 47 135.429 47H96.5714C94.0467 47 92 44.9533 92 42.4286V24.5714Z" fill="var(--fcom-primary-border)"></path><path d="M92 56C92 54.3431 93.3431 53 95 53H137C138.657 53 140 54.3431 140 56C140 57.6569 138.657 59 137 59H95C93.3431 59 92 57.6569 92 56Z" fill="var(--fcom-secondary-border)"></path><path d="M92 66C92 64.3431 93.3431 63 95 63H113C114.657 63 116 64.3431 116 66C116 67.6569 114.657 69 113 69H95C93.3431 69 92 67.6569 92 66Z" fill="var(--fcom-secondary-border)"></path><rect x="12.5" y="83.5" width="63" height="62" rx="3.5" fill="transparent"></rect><rect x="12.5" y="83.5" width="63" height="62" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 95.5714C20 93.0467 22.0467 91 24.5714 91H63.4286C65.9533 91 68 93.0467 68 95.5714V113.429C68 115.953 65.9533 118 63.4286 118H24.5714C22.0467 118 20 115.953 20 113.429V95.5714Z" fill="var(--fcom-primary-border)"></path><path d="M20 127C20 125.343 21.3431 124 23 124H65C66.6569 124 68 125.343 68 127C68 128.657 66.6569 130 65 130H23C21.3431 130 20 128.657 20 127Z" fill="var(--fcom-secondary-border)"></path><path d="M20 137C20 135.343 21.3431 134 23 134H41C42.6569 134 44 135.343 44 137C44 138.657 42.6569 140 41 140H23C21.3431 140 20 138.657 20 137Z" fill="var(--fcom-secondary-border)"></path><rect x="84.5" y="83.5" width="63" height="62" rx="3.5" fill="transparent"></rect><rect x="84.5" y="83.5" width="63" height="62" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M92 95.5714C92 93.0467 94.0467 91 96.5714 91H135.429C137.953 91 140 93.0467 140 95.5714V113.429C140 115.953 137.953 118 135.429 118H96.5714C94.0467 118 92 115.953 92 113.429V95.5714Z" fill="var(--fcom-primary-border)"></path><path d="M92 127C92 125.343 93.3431 124 95 124H137C138.657 124 140 125.343 140 127C140 128.657 138.657 130 137 130H95C93.3431 130 92 128.657 92 127Z" fill="var(--fcom-secondary-border)"></path><path d="M92 137C92 135.343 93.3431 134 95 134H113C114.657 134 116 135.343 116 137C116 138.657 114.657 140 113 140H95C93.3431 140 92 138.657 92 137Z" fill="var(--fcom-secondary-border)"></path>',22)])])}const tCe=ce(Jke,[["render",eCe]]),nCe={name:"CreateSpaceForm",emits:["completed"],components:{SpaceGroupSelector:j8,SlugInput:Yd,ImageUploader:Ll,LogoEmojiSelector:sv,TopicSelector:QF,ListViewIcon:Fke,TimelineViewIcon:Hke,FormBuilder:eN,ErrorAlerts:iv,CardViewIcon:tCe},props:{community:{required:!1,default:null},parent_id:{required:!1,default:null},savingCount:{required:!1,default:0},disable_redirect:{required:!1,default:!1}},data(){return{saving:!1,privacies:Owe,formErrors:[],form:{title:"",slug:"",privacy:"private",parent_id:"",description:"",settings:{custom_lock_screen:"no",restricted_post_only:"no",verified_post_only:"no",emoji:"🚀",shape_svg:"",can_request_join:"yes",layout_style:"timeline",disable_layout_style:"no",show_sidebar:"yes",members_page_status:"members_only",document_library:"no",document_access:"members_only",media_gallery:"no",media_access:"members_only",document_upload:"admin_only"},topic_ids:[]},dataLoaded:!1,showingSections:["basic"],postOrderOptions:this.appVars.post_order_by_options,commentOrderOptions:this.appVars.comment_order_by_options,metaSettings:null,fetchingMetaBoxes:!1}},watch:{savingCount(){this.submit()}},computed:{isDefaultLockscreen(){return this.form.settings.custom_lock_screen=="no"&&this.form.privacy=="private"}},methods:{goToCustomization(){this.validateForm()&&(this.showingSections=["customization"])},getValidationErrors(){var e,n;const t=[];return(!this.form.title||!this.form.title.trim())&&t.push(this.$t("Space title is required.")),((e=this.form.settings)==null?void 0:e.topic_required)==="yes"&&!((n=this.form.topic_ids)!=null&&n.length)&&t.push(this.$t("Please select at least one topic when members are required to select a topic.")),t},validateForm(){return this.formErrors=this.getValidationErrors(),this.formErrors.length===0},submit(){if(this.form.id){const i=this.getValidationErrors();if(i.length){this.$notify.error(i[0]);return}}else if(!this.validateForm())return;this.saving=!0;let t="spaces",e={space:this.form},n=this.$post;if(this.form.id&&(t+="/"+this.form.id+"/by-id",e={space_id:this.form.id,data:{slug:this.form.slug,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,this.metaSettings)){let i={};this.each(this.metaSettings,(s,o)=>{i[o]=s.settings}),e.meta_settings=i}n(t,e).then(i=>{if(this.$eventBus.emit("reloadMenu"),!this.form.id&&!this.disable_redirect){let s=this.$router.resolve({name:"space_feeds",params:{space:i.space.slug}}).href;window.location.href=s;return}this.$notify.success(i.message),this.$emit("completed",i.space),i.redirect_url&&!this.disable_redirect&&(window.location.href=i.redirect_url)}).catch(i=>{this.form.id||(this.showingSections=["basic"]),this.$handleError(i)}).finally(()=>{this.saving=!1})},handleCoverPhotoUpload(t){this.form.cover_photo=t},handleLogoPhotoUpload(t){this.form.logo=t},fetchMetaBoxes(){this.community.id&&(this.fetchingMetaBoxes=!0,this.$get("spaces/"+this.community.slug+"/meta-settings",{space_id:this.community.id}).then(t=>{this.metaSettings=t.meta_settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetchingMetaBoxes=!1}))}},mounted(){if(this.community&&this.community.id){this.community.chat_thread_id&&(this.community.group_chat_support="yes"),this.form=this.community;let t=[];this.community.topics&&this.each(this.community.topics,e=>{t.push(e.id)}),this.form.topic_ids=t,this.fetchMetaBoxes(this.community.id)}else this.parent_id?this.form.parent_id=this.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}},sCe={key:0},iCe={class:"fcom_form_section"},oCe={class:"fcom_help_text"},rCe={class:"fcom_form_section"},aCe={style:{"font-weight":"bold"}},lCe=["innerHTML"],cCe={key:0},uCe={class:"fcom_help_text"},dCe={key:0},hCe={key:1,class:"fcom_form_section"},fCe={class:"fcom_lined_checkboxes"},pCe={key:0,class:"fcom_pro_feature"},mCe={key:0,class:"fcom_feature_nested"},gCe={key:0,class:"fcom_pro_feature"},vCe={key:1,class:"fcom_feature_nested"},_Ce={class:"fcom_form_section"},yCe={class:"fcom_svg_radio_item"},bCe={class:"svg_radio_label"},wCe={class:"fcom_svg_radio_item"},kCe={class:"svg_radio_label"},CCe={class:"fcom_svg_radio_item"},xCe={class:"svg_radio_label"},SCe={class:"fcom_help_text"},$Ce={key:0},ACe={key:1},ECe={class:"fcom_form_section"},MCe={class:"fcom_help_text"},TCe=["href"],PCe={class:"fcom_image_uploader_wrapper"},ICe={class:"fcom_help_text"},LCe={class:"fcom_image_uploader_wrapper"},OCe={class:"fcom_help_text"},DCe={class:"fcom_space_form_bottom"},RCe={class:"fcom_space_form_bottom"},VCe={key:0},FCe={class:"fcom_form_section fcom_mt_20"};function NCe(t,e,n,i,s,o){const r=B("logo-emoji-selector"),a=ht,l=tn,c=B("SlugInput"),u=B("space-group-selector"),d=Zt,h=Wt,f=Li,p=ws,m=qt,b=B("TimelineViewIcon"),w=B("ListViewIcon"),k=B("CardViewIcon"),C=B("topic-selector"),A=bo,S=B("EditPen"),M=we,P=ze,T=B("Delete"),I=B("ImageUploader"),L=B("error-alerts"),R=nn,V=B("form-builder"),H=xt("loading");return v(),$("div",null,[_(R,{onSubmit:e[32]||(e[32]=Me(F=>t.doNothing(),["prevent"])),modelValue:s.form,"onUpdate:modelValue":e[33]||(e[33]=F=>s.form=F),"label-position":"top","require-asterisk-position":"right",class:"fcom_space_form"},{default:y(()=>[s.showingSections.indexOf("basic")!==-1?(v(),$(J,{key:0},[s.form.id?O("",!0):(v(),$("h4",sCe,x(t.$t("Basic Info")),1)),g("div",iCe,[g("h4",null,x(t.$t("General")),1),_(l,{label:t.$t("Space Title"),required:""},{default:y(()=>[_(a,{type:"text",placeholder:t.$t("Your Space Title"),modelValue:s.form.title,"onUpdate:modelValue":e[1]||(e[1]=F=>s.form.title=F)},{prepend:y(()=>{var F,U;return[s.dataLoaded?(v(),D(r,{key:0,custom_svg:!0,onUpdate:e[0]||(e[0]=Y=>{s.form.settings.emoji=Y.emoji,s.form.logo=Y.logo,s.form.settings.shape_svg=Y.shape_svg}),config:{logo:s.form.logo,emoji:((F=s.form.settings)==null?void 0:F.emoji)||"",shape_svg:((U=s.form.settings)==null?void 0:U.shape_svg)||""}},null,8,["config"])):O("",!0)]}),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),s.dataLoaded?(v(),D(l,{key:0,label:t.$t("Slug (optional)")},{default:y(()=>[_(c,{popMessage:t.$t("The URLs of this space posts will be changed to the new slug. If you have lots of contents in this space, you should not change it. Are you sure you want to change it?"),is_inital_inactive:!!s.form.id,modelValue:s.form.slug,"onUpdate:modelValue":e[2]||(e[2]=F=>s.form.slug=F),description:t.$t("No spaces or special characters allowed. Only letters, numbers, hyphens, and underscores."),placeholder:t.$t("Space Slug (no space or special chars)")},null,8,["popMessage","is_inital_inactive","modelValue","description","placeholder"])]),_:1},8,["label"])):O("",!0),_(l,{label:t.$t("Description")},{default:y(()=>[_(a,{type:"textarea",rows:3,placeholder:t.$t("Space Description"),modelValue:s.form.description,"onUpdate:modelValue":e[3]||(e[3]=F=>s.form.description=F)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),_(l,{label:t.$t("Menu Group")},{default:y(()=>[s.dataLoaded?(v(),D(u,{key:0,modelValue:s.form.parent_id,"onUpdate:modelValue":e[4]||(e[4]=F=>s.form.parent_id=F),space_id:s.form.id},null,8,["modelValue","space_id"])):O("",!0),g("div",oCe,[g("p",null,x(t.$t("Select a menu group to where this space will be added to the sidebar. If you do not select a menu group, it will be available on the all spaces page.")),1)])]),_:1},8,["label"])]),g("div",rCe,[g("h4",null,x(t.$t("Access Control")),1),_(l,{label:t.$t("Privacy")},{default:y(()=>[_(h,{"popper-class":"rich_select",modelValue:s.form.privacy,"onUpdate:modelValue":e[5]||(e[5]=F=>s.form.privacy=F),placeholder:t.$t("Select Privacy")},{default:y(()=>[(v(!0),$(J,null,ye(s.privacies,(F,U)=>(v(),D(d,{key:U,label:F.label,value:U},{default:y(()=>[g("span",aCe,x(t.$labelize(F.label)),1),g("p",{innerHTML:F.description},null,8,lCe)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),s.form.privacy=="private"?(v(),$(J,{key:0},[_(l,{label:t.$t("Lock Screen Type")},{default:y(()=>[_(p,{modelValue:s.form.settings.custom_lock_screen,"onUpdate:modelValue":e[6]||(e[6]=F=>s.form.settings.custom_lock_screen=F),class:""},{default:y(()=>[_(f,{value:"yes"},{default:y(()=>[N(x(t.$t("Custom Lock Screen")),1)]),_:1}),_(f,{value:"no"},{default:y(()=>[N(x(t.$t("Default Lock Screen")),1)]),_:1}),_(f,{disabled:!t.has_pro,value:"redirect"},{default:y(()=>[N(x(t.$t("Redirect to an URL"))+" ",1),t.has_pro?O("",!0):(v(),$("span",cCe,x(t.$t("Require Pro")),1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),s.form.settings.custom_lock_screen=="redirect"&&t.has_pro?(v(),D(l,{key:0,label:t.$t("Provide the Redirect URL")},{default:y(()=>[_(a,{modelValue:s.form.settings.onboard_redirect_url,"onUpdate:modelValue":e[7]||(e[7]=F=>s.form.settings.onboard_redirect_url=F),type:"text",placeholder:t.$t("Redirect URL for unenrolled users")},null,8,["modelValue","placeholder"]),g("div",uCe,[g("p",null,x(t.$t("This link will be used to redirect the non-members. This may be your sales page for this space")),1)])]),_:1},8,["label"])):O("",!0)],64)):O("",!0),o.isDefaultLockscreen?(v(),D(l,{key:1,style:{"margin-bottom":"0"}},{default:y(()=>[_(m,{"true-value":"yes","false-value":"no",modelValue:s.form.settings.can_request_join,"onUpdate:modelValue":e[8]||(e[8]=F=>s.form.settings.can_request_join=F),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Allow users to request to join this Space")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0),o.isDefaultLockscreen?(v(),D(l,{key:2},{default:y(()=>[_(m,{"true-value":"yes","false-value":"no",modelValue:s.form.settings.show_paywalls,"onUpdate:modelValue":e[9]||(e[9]=F=>s.form.settings.show_paywalls=F),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Show Paywalls in Default Lock Screen")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0),_(l,{label:t.$t("Who can view space members")},{default:y(()=>[_(h,{modelValue:s.form.settings.members_page_status,"onUpdate:modelValue":e[10]||(e[10]=F=>s.form.settings.members_page_status=F)},{default:y(()=>[_(d,{value:"members_only",label:t.$t("Members Only")},null,8,["label"]),_(d,{value:"admin_only",label:t.$t("Admin/Moderators Only")},null,8,["label"]),_(d,{value:"logged_in",label:t.$t("Any Logged in users")},null,8,["label"]),_(d,{value:"everybody",label:t.$t("Anyone")},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"])])],64)):O("",!0),s.showingSections.indexOf("customization")!==-1?(v(),$(J,{key:1},[s.form.id?O("",!0):(v(),$("h4",dCe,x(t.$t("Customization")),1)),s.form.settings?(v(),$("div",hCe,[g("h4",null,x(t.$t("Features Customizations")),1),_(l,null,{default:y(()=>[g("div",fCe,[_(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:s.form.settings.restricted_post_only,"onUpdate:modelValue":e[11]||(e[11]=F=>s.form.settings.restricted_post_only=F)},{default:y(()=>[N(x(t.$t("Only admin or moderators can create post")),1)]),_:1},8,["modelValue"]),_(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:s.form.settings.verified_post_only,"onUpdate:modelValue":e[12]||(e[12]=F=>s.form.settings.verified_post_only=F)},{default:y(()=>[N(x(t.$t("Only verified members can create posts (admins and moderators can always post)")),1)]),_:1},8,["modelValue"]),_(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:s.form.settings.hide_members_count,"onUpdate:modelValue":e[13]||(e[13]=F=>s.form.settings.hide_members_count=F)},{default:y(()=>[N(x(t.$t("Hide Members count from spaces page (when members page access unavailable)")),1)]),_:1},8,["modelValue"]),_(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:s.form.settings.show_sidebar,"onUpdate:modelValue":e[14]||(e[14]=F=>s.form.settings.show_sidebar=F)},{default:y(()=>[N(x(t.$t("Show Right Sidebar on Space")),1)]),_:1},8,["modelValue"]),_(m,{class:"fcom_checkbox",disabled:!t.has_pro,"true-value":"yes","false-value":"no",modelValue:s.form.settings.document_library,"onUpdate:modelValue":e[15]||(e[15]=F=>s.form.settings.document_library=F)},{default:y(()=>[N(x(t.$t("Enable File/Document Library for this space"))+" ",1),t.has_pro?O("",!0):(v(),$("span",pCe," ("+x(t.$t("Pro Feature"))+") ",1))]),_:1},8,["disabled","modelValue"]),s.form.settings.document_library=="yes"?(v(),$("div",mCe,[_(l,{label:t.$t("Document Library Access (View & Download)")},{default:y(()=>[_(p,{modelValue:s.form.settings.document_access,"onUpdate:modelValue":e[16]||(e[16]=F=>s.form.settings.document_access=F),class:"fcom_radio_group_inline"},{default:y(()=>[_(f,{value:"members_only"},{default:y(()=>[N(x(t.$t("Members of this space")),1)]),_:1}),_(f,{value:"logged_in"},{default:y(()=>[N(x(t.$t("Any Logged in users")),1)]),_:1}),_(f,{value:"everybody"},{default:y(()=>[N(x(t.$t("Public")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(l,{label:t.$t("Who can upload the documents?")},{default:y(()=>[_(p,{modelValue:s.form.settings.document_upload,"onUpdate:modelValue":e[17]||(e[17]=F=>s.form.settings.document_upload=F),class:"fcom_radio_group_inline"},{default:y(()=>[_(f,{value:"members_only"},{default:y(()=>[N(x(t.$t("Any Members")),1)]),_:1}),_(f,{value:"admin_only"},{default:y(()=>[N(x(t.$t("Admin/Moderators Only")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])])):O("",!0),_(m,{class:"fcom_checkbox",disabled:!t.has_pro,"true-value":"yes","false-value":"no",modelValue:s.form.settings.media_gallery,"onUpdate:modelValue":e[18]||(e[18]=F=>s.form.settings.media_gallery=F)},{default:y(()=>[N(x(t.$t("Enable Media Gallery for this space"))+" ",1),t.has_pro?O("",!0):(v(),$("span",gCe," ("+x(t.$t("Pro Feature"))+") ",1))]),_:1},8,["disabled","modelValue"]),t.has_pro&&s.form.settings.media_gallery=="yes"?(v(),$("div",vCe,[_(l,{label:t.$t("Media Gallery Access (View)")},{default:y(()=>[_(p,{modelValue:s.form.settings.media_access,"onUpdate:modelValue":e[19]||(e[19]=F=>s.form.settings.media_access=F),class:"fcom_radio_group_inline"},{default:y(()=>[_(f,{value:"members_only"},{default:y(()=>[N(x(t.$t("Members of this space")),1)]),_:1}),_(f,{value:"logged_in"},{default:y(()=>[N(x(t.$t("Any Logged in users")),1)]),_:1}),_(f,{value:"everybody"},{default:y(()=>[N(x(t.$t("Public")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])])):O("",!0)])]),_:1}),_(l,{label:t.$t("Default Post Sort By")},{default:y(()=>[_(h,{modelValue:s.form.settings.default_post_sort_by,"onUpdate:modelValue":e[20]||(e[20]=F=>s.form.settings.default_post_sort_by=F),clearable:"",class:"fcom_select",placeholder:t.$t("Latest Posts Sort")},{default:y(()=>[(v(!0),$(J,null,ye(s.postOrderOptions,(F,U)=>(v(),D(d,{key:U,value:U,label:F},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),_(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:s.form.settings.disable_post_sort_by,"onUpdate:modelValue":e[21]||(e[21]=F=>s.form.settings.disable_post_sort_by=F)},{default:y(()=>[N(x(t.$t("Disable Post Sort By Options")),1)]),_:1},8,["modelValue"]),_(l,{label:t.$t("Default Comment Sort By")},{default:y(()=>[_(h,{modelValue:s.form.settings.default_comment_sort_by,"onUpdate:modelValue":e[22]||(e[22]=F=>s.form.settings.default_comment_sort_by=F),clearable:"",class:"fcom_select",placeholder:t.$t("Latest Comments Sort")},{default:y(()=>[(v(!0),$(J,null,ye(s.commentOrderOptions,(F,U)=>(v(),D(d,{key:U,value:U,label:F},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])])):O("",!0),g("div",_Ce,[g("h4",null,x(t.$t("Layout")),1),_(l,{label:t.$t("Default Layout Styles"),class:"fcom_mb_10"},{default:y(()=>[_(p,{modelValue:s.form.settings.layout_style,"onUpdate:modelValue":e[23]||(e[23]=F=>s.form.settings.layout_style=F),class:"fcom_svg_radio_group"},{default:y(()=>[g("div",yCe,[_(f,{value:"timeline"},{default:y(()=>[_(b,{style:{width:"100px",height:"auto"}}),g("p",bCe,x(t.$t("Timeline")),1)]),_:1})]),g("div",wCe,[_(f,{value:"list"},{default:y(()=>[_(w,{style:{width:"100px",height:"auto"}}),g("p",kCe,x(t.$t("List")),1)]),_:1})]),g("div",CCe,[_(f,{value:"card"},{default:y(()=>[_(k,{style:{width:"100px",height:"auto"}}),g("p",xCe,x(t.$t("Card")),1)]),_:1})])]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(l,{style:{"margin-top":"0"}},{default:y(()=>[_(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:s.form.settings.disable_layout_style,"onUpdate:modelValue":e[24]||(e[24]=F=>s.form.settings.disable_layout_style=F)},{default:y(()=>[N(x(t.$t("Disable Layout Style Change Option")),1)]),_:1},8,["modelValue"]),g("div",SCe,[s.form.settings.disable_layout_style==="yes"?(v(),$("p",$Ce,x(t.$t("The selected layout will be applied for all members. They cannot switch to a different view.")),1)):(v(),$("p",ACe,x(t.$t("User can change the layout style to their own preference.")),1))])]),_:1})]),g("div",ECe,[g("h4",null,x(t.$t("Others")),1),t.has_pro&&s.dataLoaded?(v(),D(l,{key:0,label:t.$t("Topic navigation")},{default:y(()=>[_(C,{creatable:!0,space_id:s.form.id,modelValue:s.form.topic_ids,"onUpdate:modelValue":e[25]||(e[25]=F=>s.form.topic_ids=F)},null,8,["space_id","modelValue"]),g("div",MCe,[g("p",null,[N(x(t.$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),t.isAdmin()?(v(),$("a",{key:0,target:"_blank",rel:"noopener",href:t.$getRouteLink("admin/settings/topics-settings")},x(t.$t("Manage all topics.")),9,TCe)):O("",!0)])]),_(m,{"true-value":"yes","false-value":"no",modelValue:s.form.settings.topic_required,"onUpdate:modelValue":e[26]||(e[26]=F=>s.form.settings.topic_required=F),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Make members select a topic")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),t.appVars.has_chat?(v(),D(l,{key:1,label:t.$t("Space Chat")},{default:y(()=>[_(m,{"true-value":"yes","false-value":"no",modelValue:s.form.group_chat_support,"onUpdate:modelValue":e[27]||(e[27]=F=>s.form.group_chat_support=F),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Enable chat for this space's members")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),_(l,{label:t.$t("Thumbnail / Open Graph Image (Recommended Size: 1200 x 630)")},{default:y(()=>[s.form.settings.og_image?(v(),D(A,{key:0,alt:t.$t("Thumbnail / Open Graph Image"),src:s.form.settings.og_image,style:{"max-width":"100px",height:"auto"}},null,8,["alt","src"])):O("",!0),g("div",PCe,[_(I,{isTextBtn:!1,removeIcon:!0,can_remove:!!s.form.settings.og_image,confirm_remove:!0,additionalData:{resize:!1,disable_convert:"yes",max_width:1200,max_height:630},onUploaded:e[28]||(e[28]=F=>{s.form.settings.og_image=F})},hs({remove:y(()=>[_(M,null,{default:y(()=>[_(T)]),_:1})]),_:2},[s.form.settings.og_image?{name:"trigger",fn:y(()=>[_(P,{"aria-label":t.$t("Edit image"),class:"fcom_plain_button"},{default:y(()=>[_(M,null,{default:y(()=>[_(S)]),_:1})]),_:1},8,["aria-label"])]),key:"0"}:void 0]),1032,["can_remove"])]),g("div",ICe,[g("p",null,x(t.$t("Will be used on card preview and social sharing preview.")),1)])]),_:1},8,["label"]),_(l,{label:t.$t("Featured Image (Recommended size: 1600x500) - Optional")},{default:y(()=>[s.form.cover_photo?(v(),D(A,{key:0,src:s.form.cover_photo,alt:t.$t("Featured Image Preview"),style:{"max-width":"100px",height:"auto"}},null,8,["src","alt"])):O("",!0),g("div",LCe,[_(I,{isTextBtn:!1,removeIcon:!0,can_remove:!!s.form.cover_photo,confirm_remove:!0,additionalData:{resize:!0,max_width:1600},onUploaded:o.handleCoverPhotoUpload},hs({remove:y(()=>[_(M,null,{default:y(()=>[_(T)]),_:1})]),_:2},[s.form.cover_photo?{name:"trigger",fn:y(()=>[_(P,{class:"fcom_plain_button"},{default:y(()=>[_(M,null,{default:y(()=>[_(S)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove","onUploaded"])]),g("div",OCe,[g("p",null,x(t.$t("If you add this image, it will be shown on the space homepage")),1)])]),_:1},8,["label"]),_(L,{errors:s.formErrors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),s.form.id?O("",!0):(v(),D(l,{key:2,style:{"margin-top":"45px"}},{default:y(()=>[g("div",DCe,[s.showingSections.indexOf("basic")===-1?(v(),D(P,{key:0,class:"plain_button",text:"",onClick:e[29]||(e[29]=()=>{s.showingSections=["basic"]})},{default:y(()=>[g("span",null,x(t.$t("Go Back")),1)]),_:1})):O("",!0),Re((v(),D(P,{class:"fcom_primary_button",disabled:s.saving,onClick:e[30]||(e[30]=F=>o.submit())},{default:y(()=>[g("span",null,x(t.$t("Create")),1)]),_:1},8,["disabled"])),[[H,s.saving]])])]),_:1}))])],64)):(v(),$(J,{key:2},[_(L,{errors:s.formErrors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),_(l,null,{default:y(()=>[g("div",RCe,[e[34]||(e[34]=g("span",null,null,-1)),_(P,{onClick:e[31]||(e[31]=F=>o.goToCustomization()),class:"fcom_primary_button"},{default:y(()=>[g("span",null,x(t.$t("Next")),1)]),_:1})])]),_:1})],64))]),_:1},8,["modelValue"]),Re((v(),$("div",null,[s.metaSettings&&Object.keys(s.metaSettings).length>0?(v(),$("div",VCe,[(v(!0),$(J,null,ye(s.metaSettings,F=>(v(),$("div",FCe,[g("h4",null,x(F.section_title),1),_(V,{formData:F.settings,formFields:F.fields,disableSubmit:!0},null,8,["formData","formFields"])]))),256))])):O("",!0)])),[[H,s.fetchingMetaBoxes]])])}const W8=ce(nCe,[["render",NCe]]);var wo=(t=>(t.docTypeError="docTypeError",t.contextNotFound="contextNotFound",t.timerNotFound="timerNotFound",t.ctxCallOutOfScope="ctxCallOutOfScope",t.createNodeInParserFail="createNodeInParserFail",t.stackOverFlow="stackOverFlow",t.parserMatchError="parserMatchError",t.serializerMatchError="serializerMatchError",t.getAtomFromSchemaFail="getAtomFromSchemaFail",t.expectDomTypeError="expectDomTypeError",t.callCommandBeforeEditorView="callCommandBeforeEditorView",t.missingRootElement="missingRootElement",t.missingNodeInSchema="missingNodeInSchema",t.missingMarkInSchema="missingMarkInSchema",t.ctxNotBind="ctxNotBind",t.missingYjsDoc="missingYjsDoc",t))(wo||{});let qo=class extends Error{constructor(e,n){super(n),this.name="MilkdownError",this.code=e}};const BCe=(t,e)=>typeof e=="function"?"[Function]":e,Kf=t=>JSON.stringify(t,BCe);function zCe(t){return new qo(wo.docTypeError,`Doc type error, unsupported type: ${Kf(t)}`)}function HCe(t){return new qo(wo.contextNotFound,`Context "${t}" not found, do you forget to inject it?`)}function UCe(t){return new qo(wo.timerNotFound,`Timer "${t}" not found, do you forget to record it?`)}function Y8(){return new qo(wo.ctxCallOutOfScope,"Should not call a context out of the plugin.")}function jCe(...t){const e=t.reduce((n,i)=>{if(!i)return n;const s=o=>Array.isArray(o)?o.map(r=>s(r)).join(", "):o.toJSON?Kf(o.toJSON()):o.spec?Kf(o.spec):o.toString();return`${n}, ${s(i)}`},"Create prosemirror node from remark failed in parser");return new qo(wo.createNodeInParserFail,e)}function tN(){return new qo(wo.stackOverFlow,"Stack over flow, cannot pop on an empty stack.")}function WCe(t){return new qo(wo.parserMatchError,`Cannot match target parser for node: ${Kf(t)}.`)}function YCe(t){return new qo(wo.serializerMatchError,`Cannot match target serializer for node: ${Kf(t)}.`)}function qCe(t,e){return new qo(wo.getAtomFromSchemaFail,`Cannot get ${t}: ${e} from schema.`)}function la(t){return new qo(wo.expectDomTypeError,`Expect to be a dom, but get: ${Kf(t)}.`)}function GCe(){return new qo(wo.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 nN(t){return new qo(wo.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${t}" in schema.`)}function XCe(t){return new qo(wo.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${t}" in schema.`)}var sN=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},kt=(t,e,n)=>(sN(t,e,"read from private field"),n?n.call(t):e.get(t)),vs=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},xn=(t,e,n,i)=>(sN(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);let iN=class{constructor(){this.sliceMap=new Map,this.get=e=>{const n=typeof e=="string"?[...this.sliceMap.values()].find(i=>i.type.name===e):this.sliceMap.get(e.id);if(!n){const i=typeof e=="string"?e:e.name;throw HCe(i)}return n},this.remove=e=>{const n=typeof e=="string"?[...this.sliceMap.values()].find(i=>i.type.name===e):this.sliceMap.get(e.id);n&&this.sliceMap.delete(n.type.id)},this.has=e=>typeof e=="string"?[...this.sliceMap.values()].some(n=>n.type.name===e):this.sliceMap.has(e.id)}};var pa,Kl,lm;let KCe=class{constructor(e,n,i){vs(this,pa,void 0),vs(this,Kl,void 0),vs(this,lm,void 0),xn(this,pa,[]),xn(this,lm,()=>{kt(this,pa).forEach(s=>s(kt(this,Kl)))}),this.set=s=>{xn(this,Kl,s),kt(this,lm).call(this)},this.get=()=>kt(this,Kl),this.update=s=>{xn(this,Kl,s(kt(this,Kl))),kt(this,lm).call(this)},this.type=i,xn(this,Kl,n),e.set(i.id,this)}on(e){return kt(this,pa).push(e),()=>{xn(this,pa,kt(this,pa).filter(n=>n!==e))}}once(e){const n=this.on(i=>{e(i),n()});return n}off(e){xn(this,pa,kt(this,pa).filter(n=>n!==e))}offAll(){xn(this,pa,[])}};pa=new WeakMap,Kl=new WeakMap,lm=new WeakMap;let ZCe=class{constructor(e,n){this.id=Symbol(`Context-${n}`),this.name=n,this._defaultValue=e,this._typeInfo=()=>{throw Y8()}}create(e,n=this._defaultValue){return new KCe(e,n,this)}};const kn=(t,e)=>new ZCe(t,e);var W_,Y_,q_,Th,cm,xu,um,dm,hm;let JCe=class{constructor(e,n,i){vs(this,W_,void 0),vs(this,Y_,void 0),vs(this,q_,void 0),vs(this,Th,void 0),vs(this,cm,void 0),vs(this,xu,void 0),vs(this,um,void 0),vs(this,dm,void 0),vs(this,hm,void 0),xn(this,Th,new Set),xn(this,cm,new Set),xn(this,xu,new Map),xn(this,um,new Map),this.read=()=>({metadata:kt(this,W_),injectedSlices:[...kt(this,Th)].map(s=>({name:typeof s=="string"?s:s.name,value:kt(this,dm).call(this,s)})),consumedSlices:[...kt(this,cm)].map(s=>({name:typeof s=="string"?s:s.name,value:kt(this,dm).call(this,s)})),recordedTimers:[...kt(this,xu)].map(([s,{duration:o}])=>({name:s.name,duration:o,status:kt(this,hm).call(this,s)})),waitTimers:[...kt(this,um)].map(([s,{duration:o}])=>({name:s.name,duration:o,status:kt(this,hm).call(this,s)}))}),this.onRecord=s=>{kt(this,xu).set(s,{start:Date.now(),duration:0})},this.onClear=s=>{kt(this,xu).delete(s)},this.onDone=s=>{const o=kt(this,xu).get(s);o&&(o.duration=Date.now()-o.start)},this.onWait=(s,o)=>{const r=Date.now();o.finally(()=>{kt(this,um).set(s,{duration:Date.now()-r})})},this.onInject=s=>{kt(this,Th).add(s)},this.onRemove=s=>{kt(this,Th).delete(s)},this.onUse=s=>{kt(this,cm).add(s)},xn(this,dm,s=>kt(this,Y_).get(s).get()),xn(this,hm,s=>kt(this,q_).get(s).status),xn(this,Y_,e),xn(this,q_,n),xn(this,W_,i)}};W_=new WeakMap,Y_=new WeakMap,q_=new WeakMap,Th=new WeakMap,cm=new WeakMap,xu=new WeakMap,um=new WeakMap,dm=new WeakMap,hm=new WeakMap;var Zl,Jl,G_,Pr;const QCe=class oN{constructor(e,n,i){vs(this,Zl,void 0),vs(this,Jl,void 0),vs(this,G_,void 0),vs(this,Pr,void 0),this.produce=s=>s&&Object.keys(s).length?new oN(kt(this,Zl),kt(this,Jl),{...s}):this,this.inject=(s,o)=>{var r;const a=s.create(kt(this,Zl).sliceMap);return o!=null&&a.set(o),(r=kt(this,Pr))==null||r.onInject(s),this},this.remove=s=>{var o;return kt(this,Zl).remove(s),(o=kt(this,Pr))==null||o.onRemove(s),this},this.record=s=>{var o;return s.create(kt(this,Jl).store),(o=kt(this,Pr))==null||o.onRecord(s),this},this.clearTimer=s=>{var o;return kt(this,Jl).remove(s),(o=kt(this,Pr))==null||o.onClear(s),this},this.isInjected=s=>kt(this,Zl).has(s),this.isRecorded=s=>kt(this,Jl).has(s),this.use=s=>{var o;return(o=kt(this,Pr))==null||o.onUse(s),kt(this,Zl).get(s)},this.get=s=>this.use(s).get(),this.set=(s,o)=>this.use(s).set(o),this.update=(s,o)=>this.use(s).update(o),this.timer=s=>kt(this,Jl).get(s),this.done=s=>{var o;this.timer(s).done(),(o=kt(this,Pr))==null||o.onDone(s)},this.wait=s=>{var o;const r=this.timer(s).start();return(o=kt(this,Pr))==null||o.onWait(s,r),r},this.waitTimers=async s=>{await Promise.all(this.get(s).map(o=>this.wait(o)))},xn(this,Zl,e),xn(this,Jl,n),xn(this,G_,i),i&&xn(this,Pr,new JCe(e,n,i))}get meta(){return kt(this,G_)}get inspector(){return kt(this,Pr)}};Zl=new WeakMap,Jl=new WeakMap,G_=new WeakMap,Pr=new WeakMap;let exe=QCe,txe=class{constructor(){this.store=new Map,this.get=e=>{const n=this.store.get(e.id);if(!n)throw UCe(e.name);return n},this.remove=e=>{this.store.delete(e.id)},this.has=e=>this.store.has(e.id)}};var Ph,Su,fm,Ql,pm,X_;let nxe=class{constructor(e,n){vs(this,Ph,void 0),vs(this,Su,void 0),vs(this,fm,void 0),vs(this,Ql,void 0),vs(this,pm,void 0),vs(this,X_,void 0),xn(this,Ph,null),xn(this,Su,null),xn(this,Ql,"pending"),this.start=()=>(kt(this,Ph)??xn(this,Ph,new Promise((i,s)=>{xn(this,Su,o=>{o instanceof CustomEvent&&o.detail.id===kt(this,fm)&&(xn(this,Ql,"resolved"),kt(this,pm).call(this),o.stopImmediatePropagation(),i())}),kt(this,X_).call(this,()=>{kt(this,Ql)==="pending"&&xn(this,Ql,"rejected"),kt(this,pm).call(this),s(new Error(`Timing ${this.type.name} timeout.`))}),xn(this,Ql,"pending"),addEventListener(this.type.name,kt(this,Su))})),kt(this,Ph)),this.done=()=>{const i=new CustomEvent(this.type.name,{detail:{id:kt(this,fm)}});dispatchEvent(i)},xn(this,pm,()=>{kt(this,Su)&&removeEventListener(this.type.name,kt(this,Su))}),xn(this,X_,i=>{setTimeout(()=>{i()},this.type.timeout)}),xn(this,fm,Symbol(n.name)),this.type=n,e.set(n.id,this)}get status(){return kt(this,Ql)}};Ph=new WeakMap,Su=new WeakMap,fm=new WeakMap,Ql=new WeakMap,pm=new WeakMap,X_=new WeakMap;let sxe=class{constructor(e,n=3e3){this.create=i=>new nxe(i,this),this.id=Symbol(`Timer-${e}`),this.name=e,this.timeout=n}};const su=(t,e=3e3)=>new sxe(t,e);function ei(t){this.content=t}ei.prototype={constructor:ei,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var i=n&&n!=t?this.remove(n):this,s=i.find(t),o=i.content.slice();return s==-1?o.push(n||t,e):(o[s+1]=e,n&&(o[s]=n)),new ei(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new ei(n)},addToStart:function(t,e){return new ei([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new ei(n)},addBefore:function(t,e,n){var i=this.remove(e),s=i.content.slice(),o=i.find(t);return s.splice(o==-1?s.length:o,0,e,n),new ei(s)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=ei.from(t),t.size?new ei(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=ei.from(t),t.size?new ei(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=ei.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};ei.from=function(t){if(t instanceof ei)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new ei(e)};function rN(t,e,n){for(let i=0;;i++){if(i==t.childCount||i==e.childCount)return t.childCount==e.childCount?null:n;let s=t.child(i),o=e.child(i);if(s==o){n+=s.nodeSize;continue}if(!s.sameMarkup(o))return n;if(s.isText&&s.text!=o.text){for(let r=0;s.text[r]==o.text[r];r++)n++;return n}if(s.content.size||o.content.size){let r=rN(s.content,o.content,n+1);if(r!=null)return r}n+=s.nodeSize}}function aN(t,e,n,i){for(let s=t.childCount,o=e.childCount;;){if(s==0||o==0)return s==o?null:{a:n,b:i};let r=t.child(--s),a=e.child(--o),l=r.nodeSize;if(r==a){n-=l,i-=l;continue}if(!r.sameMarkup(a))return{a:n,b:i};if(r.isText&&r.text!=a.text){let c=0,u=Math.min(r.text.length,a.text.length);for(;c<u&&r.text[r.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,i--;return{a:n,b:i}}if(r.content.size||a.content.size){let c=aN(r.content,a.content,n-1,i-1);if(c)return c}n-=l,i-=l}}let st=class Fi{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let i=0;i<e.length;i++)this.size+=e[i].nodeSize}nodesBetween(e,n,i,s=0,o){for(let r=0,a=0;a<n;r++){let l=this.content[r],c=a+l.nodeSize;if(c>e&&i(l,s+a,o||null,r)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),i,s+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,i,s){let o="",r=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?s?typeof s=="function"?s(a):s:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&i&&(r?r=!1:o+=i),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,i=e.firstChild,s=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(i)&&(s[s.length-1]=n.withText(n.text+i.text),o=1);o<e.content.length;o++)s.push(e.content[o]);return new Fi(s,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let i=[],s=0;if(n>e)for(let o=0,r=0;r<n;o++){let a=this.content[o],l=r+a.nodeSize;l>e&&((r<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-r),Math.min(a.text.length,n-r)):a=a.cut(Math.max(0,e-r-1),Math.min(a.content.size,n-r-1))),i.push(a),s+=a.nodeSize),r=l}return new Fi(i,s)}cutByIndex(e,n){return e==n?Fi.empty:e==0&&n==this.content.length?this:new Fi(this.content.slice(e,n))}replaceChild(e,n){let i=this.content[e];if(i==n)return this;let s=this.content.slice(),o=this.size+n.nodeSize-i.nodeSize;return s[e]=n,new Fi(s,o)}addToStart(e){return new Fi([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Fi(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.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(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,i=0;n<this.content.length;n++){let s=this.content[n];e(s,i,n),i+=s.nodeSize}}findDiffStart(e,n=0){return rN(this,e,n)}findDiffEnd(e,n=this.size,i=e.size){return aN(this,e,n,i)}findIndex(e,n=-1){if(e==0)return u_(0,e);if(e==this.size)return u_(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let i=0,s=0;;i++){let o=this.child(i),r=s+o.nodeSize;if(r>=e)return r==e||n>0?u_(i+1,r):u_(i,s);s=r}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return Fi.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Fi(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Fi.empty;let n,i=0;for(let s=0;s<e.length;s++){let o=e[s];i+=o.nodeSize,s&&o.isText&&e[s-1].sameMarkup(o)?(n||(n=e.slice(0,s)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new Fi(n||e,i)}static from(e){if(!e)return Fi.empty;if(e instanceof Fi)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Fi([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};st.empty=new st([],0);const Jw={index:0,offset:0};function u_(t,e){return Jw.index=t,Jw.offset=e,Jw}function R0(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!R0(t[i],e[i]))return!1}else{for(let i in t)if(!(i in e)||!R0(t[i],e[i]))return!1;for(let i in e)if(!(i in t))return!1}return!0}let En=class BC{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,i=!1;for(let s=0;s<e.length;s++){let o=e[s];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,s));else{if(o.type.excludes(this.type))return e;!i&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,s)),n.push(this),i=!0),n&&n.push(o)}}return n||(n=e.slice()),i||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&R0(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let i=e.marks[n.type];if(!i)throw new RangeError(`There is no mark type ${n.type} in this schema`);let s=i.create(n.attrs);return i.checkAttrs(s.attrs),s}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let i=0;i<e.length;i++)if(!e[i].eq(n[i]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return BC.none;if(e instanceof BC)return[e];let n=e.slice();return n.sort((i,s)=>i.type.rank-s.type.rank),n}};En.none=[];class V0 extends Error{}class rt{constructor(e,n,i){this.content=e,this.openStart=n,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let i=cN(this.content,e+this.openStart,n);return i&&new rt(i,this.openStart,this.openEnd)}removeBetween(e,n){return new rt(lN(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return rt.empty;let i=n.openStart||0,s=n.openEnd||0;if(typeof i!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new rt(st.fromJSON(e,n.content),i,s)}static maxOpen(e,n=!0){let i=0,s=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)s++;return new rt(e,i,s)}}rt.empty=new rt(st.empty,0,0);function lN(t,e,n){let{index:i,offset:s}=t.findIndex(e),o=t.maybeChild(i),{index:r,offset:a}=t.findIndex(n);if(s==e||o.isText){if(a!=n&&!t.child(r).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(i!=r)throw new RangeError("Removing non-flat range");return t.replaceChild(i,o.copy(lN(o.content,e-s-1,n-s-1)))}function cN(t,e,n,i){let{index:s,offset:o}=t.findIndex(e),r=t.maybeChild(s);if(o==e||r.isText)return i&&!i.canReplace(s,s,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=cN(r.content,e-o-1,n);return a&&t.replaceChild(s,r.copy(a))}function ixe(t,e,n){if(n.openStart>t.depth)throw new V0("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new V0("Inconsistent open depths");return uN(t,e,n,0)}function uN(t,e,n,i){let s=t.index(i),o=t.node(i);if(s==e.index(i)&&i<t.depth-n.openStart){let r=uN(t,e,n,i+1);return o.copy(o.content.replaceChild(s,r))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==i&&e.depth==i){let r=t.parent,a=r.content;return sd(r,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:r,end:a}=oxe(n,t);return sd(o,hN(t,r,a,e,i))}else return sd(o,F0(t,e,i))}function dN(t,e){if(!e.type.compatibleContent(t.type))throw new V0("Cannot join "+e.type.name+" onto "+t.type.name)}function zC(t,e,n){let i=t.node(n);return dN(i,e.node(n)),i}function nd(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function cg(t,e,n,i){let s=(e||t).node(n),o=0,r=e?e.index(n):s.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(nd(t.nodeAfter,i),o++));for(let a=o;a<r;a++)nd(s.child(a),i);e&&e.depth==n&&e.textOffset&&nd(e.nodeBefore,i)}function sd(t,e){return t.type.checkContent(e),t.copy(e)}function hN(t,e,n,i,s){let o=t.depth>s&&zC(t,e,s+1),r=i.depth>s&&zC(n,i,s+1),a=[];return cg(null,t,s,a),o&&r&&e.index(s)==n.index(s)?(dN(o,r),nd(sd(o,hN(t,e,n,i,s+1)),a)):(o&&nd(sd(o,F0(t,e,s+1)),a),cg(e,n,s,a),r&&nd(sd(r,F0(n,i,s+1)),a)),cg(i,null,s,a),new st(a)}function F0(t,e,n){let i=[];if(cg(null,t,n,i),t.depth>n){let s=zC(t,e,n+1);nd(sd(s,F0(t,e,n+1)),i)}return cg(e,null,n,i),new st(i)}function oxe(t,e){let n=e.depth-t.openStart,s=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)s=e.node(o).copy(st.from(s));return{start:s.resolveNoCache(t.openStart+n),end:s.resolveNoCache(s.content.size-t.openEnd-n)}}class u1{constructor(e,n,i){this.pos=e,this.path=n,this.parentOffset=i,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let i=this.pos-this.path[this.path.length-1],s=e.child(n);return i?e.child(n).cut(i):s}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let i=this.path[n*3],s=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)s+=i.child(o).nodeSize;return s}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return En.none;if(this.textOffset)return e.child(n).marks;let i=e.maybeChild(n-1),s=e.maybeChild(n);if(!i){let a=i;i=s,s=a}let o=i.marks;for(var r=0;r<o.length;r++)o[r].type.spec.inclusive===!1&&(!s||!o[r].isInSet(s.marks))&&(o=o[r--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let i=n.marks,s=e.parent.maybeChild(e.index());for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let i=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);i>=0;i--)if(e.pos<=this.end(i)&&(!n||n(this.node(i))))return new fN(this,e,i);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let i=[],s=0,o=n;for(let r=e;;){let{index:a,offset:l}=r.content.findIndex(o),c=o-l;if(i.push(r,a,s+l),!c||(r=r.child(a),r.isText))break;o=c-1,s+=l+1}return new u1(n,i,o)}static resolveCached(e,n){let i=aE.get(e);if(i)for(let o=0;o<i.elts.length;o++){let r=i.elts[o];if(r.pos==n)return r}else aE.set(e,i=new rxe);let s=i.elts[i.i]=u1.resolve(e,n);return i.i=(i.i+1)%axe,s}}class rxe{constructor(){this.elts=[],this.i=0}}const axe=12,aE=new WeakMap;class fN{constructor(e,n,i){this.$from=e,this.$to=n,this.depth=i}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 lxe=Object.create(null);let Tc=class HC{constructor(e,n,i,s=En.none){this.type=e,this.attrs=n,this.marks=s,this.content=i||st.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,i,s=0){this.content.nodesBetween(e,n,i,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,i,s){return this.content.textBetween(e,n,i,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,i){return this.type==e&&R0(this.attrs,n||e.defaultAttrs||lxe)&&En.sameSet(this.marks,i||En.none)}copy(e=null){return e==this.content?this:new HC(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new HC(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,i=!1){if(e==n)return rt.empty;let s=this.resolve(e),o=this.resolve(n),r=i?0:s.sharedDepth(n),a=s.start(r),c=s.node(r).content.cut(s.pos-a,o.pos-a);return new rt(c,s.depth-r,o.depth-r)}replace(e,n,i){return ixe(this.resolve(e),this.resolve(n),i)}nodeAt(e){for(let n=this;;){let{index:i,offset:s}=n.content.findIndex(e);if(n=n.maybeChild(i),!n)return null;if(s==e||n.isText)return n;e-=s+1}}childAfter(e){let{index:n,offset:i}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:i}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:i}=this.content.findIndex(e);if(i<e)return{node:this.content.child(n),index:n,offset:i};let s=this.content.child(n-1);return{node:s,index:n-1,offset:i-s.nodeSize}}resolve(e){return u1.resolveCached(this,e)}resolveNoCache(e){return u1.resolve(this,e)}rangeHasMark(e,n,i){let s=!1;return n>e&&this.nodesBetween(e,n,o=>(i.isInSet(o.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),pN(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,i=st.empty,s=0,o=i.childCount){let r=this.contentMatchAt(e).matchFragment(i,s,o),a=r&&r.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=s;l<o;l++)if(!this.type.allowsMarks(i.child(l).marks))return!1;return!0}canReplaceWith(e,n,i,s){if(s&&!this.type.allowsMarks(s))return!1;let o=this.contentMatchAt(e).matchType(i),r=o&&o.matchFragment(this.content,n);return r?r.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=En.none;for(let n=0;n<this.marks.length;n++){let i=this.marks[n];i.type.checkAttrs(i.attrs),e=i.addToSet(e)}if(!En.sameSet(e,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 e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let i;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,i)}let s=st.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,s,i);return o.type.checkAttrs(o.attrs),o}};Tc.prototype.text=void 0;class N0 extends Tc{constructor(e,n,i,s){if(super(e,n,null,s),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):pN(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new N0(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new N0(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function pN(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class xd{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let i=new cxe(e,n);if(i.next==null)return xd.empty;let s=mN(i);i.next&&i.err("Unexpected trailing text");let o=gxe(mxe(s));return vxe(o,i),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,i=e.childCount){let s=this;for(let o=n;s&&o<i;o++)s=s.matchType(e.child(o).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let i=0;i<e.next.length;i++)if(this.next[n].type==e.next[i].type)return!0;return!1}fillBefore(e,n=!1,i=0){let s=[this];function o(r,a){let l=r.matchFragment(e,i);if(l&&(!n||l.validEnd))return st.from(a.map(c=>c.createAndFill()));for(let c=0;c<r.next.length;c++){let{type:u,next:d}=r.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let h=o(d,a.concat(u));if(h)return h}}return null}return o(this,[])}findWrapping(e){for(let i=0;i<this.wrapCache.length;i+=2)if(this.wrapCache[i]==e)return this.wrapCache[i+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),i=[{match:this,type:null,via:null}];for(;i.length;){let s=i.shift(),o=s.match;if(o.matchType(e)){let r=[];for(let a=s;a.type;a=a.via)r.push(a.type);return r.reverse()}for(let r=0;r<o.next.length;r++){let{type:a,next:l}=o.next[r];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!s.type||l.validEnd)&&(i.push({match:a.contentMatch,type:a,via:s}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(i){e.push(i);for(let s=0;s<i.next.length;s++)e.indexOf(i.next[s].next)==-1&&n(i.next[s].next)}return n(this),e.map((i,s)=>{let o=s+(i.validEnd?"*":" ")+" ";for(let r=0;r<i.next.length;r++)o+=(r?", ":"")+i.next[r].type.name+"->"+e.indexOf(i.next[r].next);return o}).join(`
82 +`)}}xd.empty=new xd(!0);class cxe{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function mN(t){let e=[];do e.push(uxe(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function uxe(t){let e=[];do e.push(dxe(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function dxe(t){let e=pxe(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=hxe(t,e);else break;return e}function lE(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function hxe(t,e){let n=lE(t),i=n;return t.eat(",")&&(t.next!="}"?i=lE(t):i=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:e}}function fxe(t,e){let n=t.nodeTypes,i=n[e];if(i)return[i];let s=[];for(let o in n){let r=n[o];r.groups.indexOf(e)>-1&&s.push(r)}return s.length==0&&t.err("No node type or group '"+e+"' found"),s}function pxe(t){if(t.eat("(")){let e=mN(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=fxe(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function mxe(t){let e=[[]];return s(o(t,0),n()),e;function n(){return e.push([])-1}function i(r,a,l){let c={term:l,to:a};return e[r].push(c),c}function s(r,a){r.forEach(l=>l.to=a)}function o(r,a){if(r.type=="choice")return r.exprs.reduce((l,c)=>l.concat(o(c,a)),[]);if(r.type=="seq")for(let l=0;;l++){let c=o(r.exprs[l],a);if(l==r.exprs.length-1)return c;s(c,a=n())}else if(r.type=="star"){let l=n();return i(a,l),s(o(r.expr,l),l),[i(l)]}else if(r.type=="plus"){let l=n();return s(o(r.expr,a),l),s(o(r.expr,l),l),[i(l)]}else{if(r.type=="opt")return[i(a)].concat(o(r.expr,a));if(r.type=="range"){let l=a;for(let c=0;c<r.min;c++){let u=n();s(o(r.expr,l),u),l=u}if(r.max==-1)s(o(r.expr,l),l);else for(let c=r.min;c<r.max;c++){let u=n();i(l,u),s(o(r.expr,l),u),l=u}return[i(l)]}else{if(r.type=="name")return[i(a,void 0,r.value)];throw new Error("Unknown expr type")}}}}function gN(t,e){return e-t}function cE(t,e){let n=[];return i(e),n.sort(gN);function i(s){let o=t[s];if(o.length==1&&!o[0].term)return i(o[0].to);n.push(s);for(let r=0;r<o.length;r++){let{term:a,to:l}=o[r];!a&&n.indexOf(l)==-1&&i(l)}}}function gxe(t){let e=Object.create(null);return n(cE(t,0));function n(i){let s=[];i.forEach(r=>{t[r].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<s.length;u++)s[u][0]==a&&(c=s[u][1]);cE(t,l).forEach(u=>{c||s.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[i.join(",")]=new xd(i.indexOf(t.length-1)>-1);for(let r=0;r<s.length;r++){let a=s[r][1].sort(gN);o.next.push({type:s[r][0],next:e[a.join(",")]||n(a)})}return o}}function vxe(t,e){for(let n=0,i=[t];n<i.length;n++){let s=i[n],o=!s.validEnd,r=[];for(let a=0;a<s.next.length;a++){let{type:l,next:c}=s.next[a];r.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),i.indexOf(c)==-1&&i.push(c)}o&&e.err("Only non-generatable nodes ("+r.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function vN(t){let e=Object.create(null);for(let n in t){let i=t[n];if(!i.hasDefault)return null;e[n]=i.default}return e}function _N(t,e){let n=Object.create(null);for(let i in t){let s=e&&e[i];if(s===void 0){let o=t[i];if(o.hasDefault)s=o.default;else throw new RangeError("No value supplied for attribute "+i)}n[i]=s}return n}function yN(t,e,n,i){for(let s in e)if(!(s in t))throw new RangeError(`Unsupported attribute ${s} for ${n} of type ${s}`);for(let s in t){let o=t[s];o.validate&&o.validate(e[s])}}function bN(t,e){let n=Object.create(null);if(e)for(let i in e)n[i]=new yxe(t,i,e[i]);return n}let B0=class wN{constructor(e,n,i){this.name=e,this.schema=n,this.spec=i,this.markSet=null,this.groups=i.group?i.group.split(" "):[],this.attrs=bN(e,i.attrs),this.defaultAttrs=vN(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(i.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==xd.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:_N(this.attrs,e)}create(e=null,n,i){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Tc(this,this.computeAttrs(e),st.from(n),En.setFrom(i))}createChecked(e=null,n,i){return n=st.from(n),this.checkContent(n),new Tc(this,this.computeAttrs(e),n,En.setFrom(i))}createAndFill(e=null,n,i){if(e=this.computeAttrs(e),n=st.from(n),n.size){let r=this.contentMatch.fillBefore(n);if(!r)return null;n=r.append(n)}let s=this.contentMatch.matchFragment(n),o=s&&s.fillBefore(st.empty,!0);return o?new Tc(this,e,n.append(o),En.setFrom(i)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let i=0;i<e.childCount;i++)if(!this.allowsMarks(e.child(i).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){yN(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let i=0;i<e.length;i++)this.allowsMarkType(e[i].type)?n&&n.push(e[i]):n||(n=e.slice(0,i));return n?n.length?n:En.none:e}static compile(e,n){let i=Object.create(null);e.forEach((o,r)=>i[o]=new wN(o,n,r));let s=n.spec.topNode||"doc";if(!i[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let o in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}};function _xe(t,e,n){let i=n.split("|");return s=>{let o=s===null?"null":typeof s;if(i.indexOf(o)<0)throw new RangeError(`Expected value of type ${i} for attribute ${e} on type ${t}, got ${o}`)}}class yxe{constructor(e,n,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?_xe(e,n,i.validate):i.validate}get isRequired(){return!this.hasDefault}}class m2{constructor(e,n,i,s){this.name=e,this.rank=n,this.schema=i,this.spec=s,this.attrs=bN(e,s.attrs),this.excluded=null;let o=vN(this.attrs);this.instance=o?new En(this,o):null}create(e=null){return!e&&this.instance?this.instance:new En(this,_N(this.attrs,e))}static compile(e,n){let i=Object.create(null),s=0;return e.forEach((o,r)=>i[o]=new m2(o,s++,n,r)),i}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){yN(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class bxe{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let s in e)n[s]=e[s];n.nodes=ei.from(e.nodes),n.marks=ei.from(e.marks||{}),this.nodes=B0.compile(this.spec.nodes,this),this.marks=m2.compile(this.spec.marks,this);let i=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let o=this.nodes[s],r=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=i[r]||(i[r]=xd.parse(r,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?uE(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let s in this.marks){let o=this.marks[s],r=o.spec.excludes;o.excluded=r==null?[o]:r==""?[]:uE(this,r.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,i,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof B0){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,i,s)}text(e,n){let i=this.nodes.text;return new N0(i,i.defaultAttrs,e,En.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return Tc.fromJSON(this,e)}markFromJSON(e){return En.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function uE(t,e){let n=[];for(let i=0;i<e.length;i++){let s=e[i],o=t.marks[s],r=o;if(o)n.push(o);else for(let a in t.marks){let l=t.marks[a];(s=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(s)>-1)&&n.push(r=l)}if(!r)throw new SyntaxError("Unknown mark type: '"+e[i]+"'")}return n}function wxe(t){return t.tag!=null}function kxe(t){return t.style!=null}let g2=class UC{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let i=this.matchedStyles=[];n.forEach(s=>{if(wxe(s))this.tags.push(s);else if(kxe(s)){let o=/[^=]*/.exec(s.style)[0];i.indexOf(o)<0&&i.push(o),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let o=e.nodes[s.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let i=new hE(this,n,!1);return i.addAll(e,En.none,n.from,n.to),i.finish()}parseSlice(e,n={}){let i=new hE(this,n,!0);return i.addAll(e,En.none,n.from,n.to),rt.maxOpen(i.finish())}matchTag(e,n,i){for(let s=i?this.tags.indexOf(i)+1:0;s<this.tags.length;s++){let o=this.tags[s];if(Sxe(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let r=o.getAttrs(e);if(r===!1)continue;o.attrs=r||void 0}return o}}}matchStyle(e,n,i,s){for(let o=s?this.styles.indexOf(s)+1:0;o<this.styles.length;o++){let r=this.styles[o],a=r.style;if(!(a.indexOf(e)!=0||r.context&&!i.matchesContext(r.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(r.getAttrs){let l=r.getAttrs(n);if(l===!1)continue;r.attrs=l||void 0}return r}}}static schemaRules(e){let n=[];function i(s){let o=s.priority==null?50:s.priority,r=0;for(;r<n.length;r++){let a=n[r];if((a.priority==null?50:a.priority)<o)break}n.splice(r,0,s)}for(let s in e.marks){let o=e.marks[s].spec.parseDOM;o&&o.forEach(r=>{i(r=fE(r)),r.mark||r.ignore||r.clearMark||(r.mark=s)})}for(let s in e.nodes){let o=e.nodes[s].spec.parseDOM;o&&o.forEach(r=>{i(r=fE(r)),r.node||r.ignore||r.mark||(r.node=s)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new UC(e,UC.schemaRules(e)))}};const kN={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},Cxe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},CN={ol:!0,ul:!0},z0=1,H0=2,ug=4;function dE(t,e,n){return e!=null?(e?z0:0)|(e==="full"?H0:0):t&&t.whitespace=="pre"?z0|H0:n&~ug}class d_{constructor(e,n,i,s,o,r){this.type=e,this.attrs=n,this.marks=i,this.solid=s,this.options=r,this.content=[],this.activeMarks=En.none,this.match=o||(r&ug?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(st.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let i=this.type.contentMatch,s;return(s=i.findWrapping(e.type))?(this.match=i,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&z0)){let i=this.content[this.content.length-1],s;if(i&&i.isText&&(s=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-s[0].length))}}let n=st.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(st.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!kN.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class hE{constructor(e,n,i){this.parser=e,this.options=n,this.isOpen=i,this.open=0;let s=n.topNode,o,r=dE(null,n.preserveWhitespace,0)|(i?ug:0);s?o=new d_(s.type,s.attrs,En.none,!0,n.topMatch||s.type.contentMatch,r):i?o=new d_(null,null,En.none,!0,null,r):o=new d_(e.schema.topNodeType,null,En.none,!0,null,r),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let i=e.nodeValue,s=this.top;if(s.options&H0||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(i)){if(s.options&z0)s.options&H0?i=i.replace(/\r\n?/g,`
83 +`):i=i.replace(/\r?\n|\r/g," ");else if(i=i.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(i)&&this.open==this.nodes.length-1){let o=s.content[s.content.length-1],r=e.previousSibling;(!o||r&&r.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(i=i.slice(1))}i&&this.insertNode(this.parser.schema.text(i),n),this.findInText(e)}else this.findInside(e)}addElement(e,n,i){let s=e.nodeName.toLowerCase(),o;CN.hasOwnProperty(s)&&this.parser.normalizeLists&&xxe(e);let r=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,i));if(r?r.ignore:Cxe.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!r||r.skip||r.closeParent){r&&r.closeParent?this.open=Math.max(0,this.open-1):r&&r.skip.nodeType&&(e=r.skip);let a,l=this.top,c=this.needsBlock;if(kN.hasOwnProperty(s))l.content.length&&l.content[0].isInline&&this.open&&(this.open--,l=this.top),a=!0,l.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);return}let u=r&&r.skip?n:this.readStyles(e,n);u&&this.addAll(e,u),a&&this.sync(l),this.needsBlock=c}else{let a=this.readStyles(e,n);a&&this.addElementByRule(e,r,a,r.consuming===!1?o:void 0)}}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
84 +`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(e,n){let i=e.style;if(i&&i.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let o=this.parser.matchedStyles[s],r=i.getPropertyValue(o);if(r)for(let a=void 0;;){let l=this.parser.matchStyle(o,r,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(c=>!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(e,n,i,s){let o,r;if(n.node)if(r=this.parser.schema.nodes[n.node],r.isLeaf)this.insertNode(r.create(n.attrs),i)||this.leafFallback(e,i);else{let l=this.enter(r,n.attrs||null,i,n.preserveWhitespace);l&&(o=!0,i=l)}else{let l=this.parser.schema.marks[n.mark];i=i.concat(l.create(n.attrs))}let a=this.top;if(r&&r.isLeaf)this.findInside(e);else if(s)this.addElement(e,i,s);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,i));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,i)}o&&this.sync(a)&&this.open--}addAll(e,n,i,s){let o=i||0;for(let r=i?e.childNodes[i]:e.firstChild,a=s==null?null:e.childNodes[s];r!=a;r=r.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(r,n);this.findAtPoint(e,o)}findPlace(e,n){let i,s;for(let o=this.open;o>=0;o--){let r=this.nodes[o],a=r.findWrapping(e);if(a&&(!i||i.length>a.length)&&(i=a,s=r,!a.length)||r.solid)break}if(!i)return null;this.sync(s);for(let o=0;o<i.length;o++)n=this.enterInner(i[o],null,n,!1);return n}insertNode(e,n){if(e.isInline&&this.needsBlock&&!this.top.type){let s=this.textblockFromContext();s&&(n=this.enterInner(s,null,n))}let i=this.findPlace(e,n);if(i){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(e.type));let o=En.none;for(let r of i.concat(e.marks))(s.type?s.type.allowsMarkType(r.type):pE(r.type,e.type))&&(o=r.addToSet(o));return s.content.push(e.mark(o)),!0}return!1}enter(e,n,i,s){let o=this.findPlace(e.create(n),i);return o&&(o=this.enterInner(e,n,i,!0,s)),o}enterInner(e,n,i,s=!1,o){this.closeExtra();let r=this.top;r.match=r.match&&r.match.matchType(e);let a=dE(e,o,r.options);r.options&ug&&r.content.length==0&&(a|=ug);let l=En.none;return i=i.filter(c=>(r.type?r.type.allowsMarkType(c.type):pE(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new d_(e,n,l,s,null,a)),this.open++,i}closeExtra(e=!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(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let n=this.open;n>=0;n--)if(this.nodes[n]==e)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let i=this.nodes[n].content;for(let s=i.length-1;s>=0;s--)e+=i[s].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let i=0;i<this.find.length;i++)this.find[i].node==e&&this.find[i].offset==n&&(this.find[i].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,i){if(e!=n&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&n.compareDocumentPosition(this.find[s].node)&(i?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),i=this.options.context,s=!this.isOpen&&(!i||i.parent.type==this.nodes[0].type),o=-(i?i.depth+1:0)+(s?0:1),r=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(r(a-1,l))return!0;return!1}else{let u=l>0||l==0&&s?this.nodes[l].type:i&&l>=o?i.node(l-o).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;l--}}return!0};return r(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let i=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let n in this.parser.schema.nodes){let i=this.parser.schema.nodes[n];if(i.isTextblock&&i.defaultAttrs)return i}}}function xxe(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let i=e.nodeType==1?e.nodeName.toLowerCase():null;i&&CN.hasOwnProperty(i)&&n?(n.appendChild(e),e=n):i=="li"?n=e:i&&(n=null)}}function Sxe(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function fE(t){let e={};for(let n in t)e[n]=t[n];return e}function pE(t,e){let n=e.schema.nodes;for(let i in n){let s=n[i];if(!s.allowsMarkType(t))continue;let o=[],r=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==e||o.indexOf(u)<0&&r(u))return!0}};if(r(s.contentMatch))return!0}}class iu{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},i){i||(i=Qw(n).createDocumentFragment());let s=i,o=[];return e.forEach(r=>{if(o.length||r.marks.length){let a=0,l=0;for(;a<o.length&&l<r.marks.length;){let c=r.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(o[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<o.length;)s=o.pop()[1];for(;l<r.marks.length;){let c=r.marks[l++],u=this.serializeMark(c,r.isInline,n);u&&(o.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(r,n))}),i}serializeNodeInner(e,n){let{dom:i,contentDOM:s}=K_(Qw(n),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,s)}return i}serializeNode(e,n={}){let i=this.serializeNodeInner(e,n);for(let s=e.marks.length-1;s>=0;s--){let o=this.serializeMark(e.marks[s],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(i),i=o.dom)}return i}serializeMark(e,n,i={}){let s=this.marks[e.type.name];return s&&K_(Qw(i),s(e,n),null,e.attrs)}static renderSpec(e,n,i=null,s){return K_(e,n,i,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new iu(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=mE(e.nodes);return n.text||(n.text=i=>i.text),n}static marksFromSchema(e){return mE(e.marks)}}function mE(t){let e={};for(let n in t){let i=t[n].spec.toDOM;i&&(e[n]=i)}return e}function Qw(t){return t.document||window.document}const gE=new WeakMap;function $xe(t){let e=gE.get(t);return e===void 0&&gE.set(t,e=Axe(t)),e}function Axe(t){let e=null;function n(i){if(i&&typeof i=="object")if(Array.isArray(i))if(typeof i[0]=="string")e||(e=[]),e.push(i);else for(let s=0;s<i.length;s++)n(i[s]);else for(let s in i)n(i[s])}return n(t),e}function K_(t,e,n,i){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],o;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(i&&(o=$xe(i))&&o.indexOf(e)>-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 r=s.indexOf(" ");r>0&&(n=s.slice(0,r),s=s.slice(r+1));let a,l=n?t.createElementNS(n,s):t.createElement(s),c=e[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 h=d.indexOf(" ");h>0?l.setAttributeNS(d.slice(0,h),d.slice(h+1),c[d]):l.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let h=e[d];if(h===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:p}=K_(t,h,n,i);if(l.appendChild(f),p){if(a)throw new RangeError("Multiple content holes");a=p}}}return{dom:l,contentDOM:a}}const Exe={};function q8(t,e){const n=e||Exe,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return xN(t,i,s)}function xN(t,e,n){if(Mxe(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return vE(t.children,e,n)}return Array.isArray(t)?vE(t,e,n):""}function vE(t,e,n){const i=[];let s=-1;for(;++s<t.length;)i[s]=xN(t[s],e,n);return i.join("")}function Mxe(t){return!!(t&&typeof t=="object")}const _E=document.createElement("i");function G8(t){const e="&"+t+";";_E.innerHTML=e;const n=_E.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function pr(t,e,n,i){const s=t.length;let o=0,r;if(e<0?e=-e>s?0:s+e:e=e>s?s:e,n=n>0?n:0,i.length<1e4)r=Array.from(i),r.unshift(e,n),t.splice(...r);else for(n&&t.splice(e,n);o<i.length;)r=i.slice(o,o+1e4),r.unshift(e,0),t.splice(...r),o+=1e4,e+=1e4}function rr(t,e){return t.length>0?(pr(t,t.length,0,e),t):e}const yE={}.hasOwnProperty;function SN(t){const e={};let n=-1;for(;++n<t.length;)Txe(e,t[n]);return e}function Txe(t,e){let n;for(n in e){const s=(yE.call(t,n)?t[n]:void 0)||(t[n]={}),o=e[n];let r;if(o)for(r in o){yE.call(s,r)||(s[r]=[]);const a=o[r];Pxe(s[r],Array.isArray(a)?a:a?[a]:[])}}}function Pxe(t,e){let n=-1;const i=[];for(;++n<e.length;)(e[n].add==="after"?t:i).push(e[n]);pr(t,0,0,i)}function $N(t,e){const n=Number.parseInt(t,e);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 Wr(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Hi=ou(/[A-Za-z]/),co=ou(/[\dA-Za-z]/),Ixe=ou(/[#-'*+\--9=?A-Z^-~]/);function U0(t){return t!==null&&(t<32||t===127)}const jC=ou(/\d/),Lxe=ou(/[\dA-Fa-f]/),Oxe=ou(/[!-/:-@[-`{-~]/);function Et(t){return t!==null&&t<-2}function jn(t){return t!==null&&(t<0||t===32)}function un(t){return t===-2||t===-1||t===32}const v2=ou(/\p{P}|\p{S}/u),Sd=ou(/\s/);function ou(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function _n(t,e,n,i){const s=i?i-1:Number.POSITIVE_INFINITY;let o=0;return r;function r(l){return un(l)?(t.enter(n),a(l)):e(l)}function a(l){return un(l)&&o++<s?(t.consume(l),a):(t.exit(n),e(l))}}const Dxe={tokenize:Rxe};function Rxe(t){const e=t.attempt(this.parser.constructs.contentInitial,i,s);let n;return e;function i(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),_n(t,e,"linePrefix")}function s(a){return t.enter("paragraph"),o(a)}function o(a){const l=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,r(a)}function r(a){if(a===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(a);return}return Et(a)?(t.consume(a),t.exit("chunkText"),o):(t.consume(a),r)}}const Vxe={tokenize:Fxe},bE={tokenize:Nxe};function Fxe(t){const e=this,n=[];let i=0,s,o,r;return a;function a(C){if(i<n.length){const A=n[i];return e.containerState=A[1],t.attempt(A[0].continuation,l,c)(C)}return c(C)}function l(C){if(i++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,s&&k();const A=e.events.length;let S=A,M;for(;S--;)if(e.events[S][0]==="exit"&&e.events[S][1].type==="chunkFlow"){M=e.events[S][1].end;break}w(i);let P=A;for(;P<e.events.length;)e.events[P][1].end=Object.assign({},M),P++;return pr(e.events,S+1,0,e.events.slice(A)),e.events.length=P,c(C)}return a(C)}function c(C){if(i===n.length){if(!s)return h(C);if(s.currentConstruct&&s.currentConstruct.concrete)return p(C);e.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(bE,u,d)(C)}function u(C){return s&&k(),w(i),h(C)}function d(C){return e.parser.lazy[e.now().line]=i!==n.length,r=e.now().offset,p(C)}function h(C){return e.containerState={},t.attempt(bE,f,p)(C)}function f(C){return i++,n.push([e.currentConstruct,e.containerState]),h(C)}function p(C){if(C===null){s&&k(),w(0),t.consume(C);return}return s=s||e.parser.flow(e.now()),t.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:s}),m(C)}function m(C){if(C===null){b(t.exit("chunkFlow"),!0),w(0),t.consume(C);return}return Et(C)?(t.consume(C),b(t.exit("chunkFlow")),i=0,e.interrupt=void 0,a):(t.consume(C),m)}function b(C,A){const S=e.sliceStream(C);if(A&&S.push(null),C.previous=o,o&&(o.next=C),o=C,s.defineSkip(C.start),s.write(S),e.parser.lazy[C.start.line]){let M=s.events.length;for(;M--;)if(s.events[M][1].start.offset<r&&(!s.events[M][1].end||s.events[M][1].end.offset>r))return;const P=e.events.length;let T=P,I,L;for(;T--;)if(e.events[T][0]==="exit"&&e.events[T][1].type==="chunkFlow"){if(I){L=e.events[T][1].end;break}I=!0}for(w(i),M=P;M<e.events.length;)e.events[M][1].end=Object.assign({},L),M++;pr(e.events,T+1,0,e.events.slice(P)),e.events.length=M}}function w(C){let A=n.length;for(;A-- >C;){const S=n[A];e.containerState=S[1],S[0].exit.call(e,t)}n.length=C}function k(){s.write([null]),o=void 0,s=void 0,e.containerState._closeFlow=void 0}}function Nxe(t,e,n){return _n(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function j0(t){if(t===null||jn(t)||Sd(t))return 1;if(v2(t))return 2}function _2(t,e,n){const i=[];let s=-1;for(;++s<t.length;){const o=t[s].resolveAll;o&&!i.includes(o)&&(e=o(e,n),i.push(o))}return e}const WC={name:"attention",tokenize:zxe,resolveAll:Bxe};function Bxe(t,e){let n=-1,i,s,o,r,a,l,c,u;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(i=n;i--;)if(t[i][0]==="exit"&&t[i][1].type==="attentionSequence"&&t[i][1]._open&&e.sliceSerialize(t[i][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[i][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[i][1].end.offset-t[i][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;l=t[i][1].end.offset-t[i][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const d=Object.assign({},t[i][1].end),h=Object.assign({},t[n][1].start);wE(d,-l),wE(h,l),r={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},t[i][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},t[n][1].start),end:h},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},t[i][1].end),end:Object.assign({},t[n][1].start)},s={type:l>1?"strong":"emphasis",start:Object.assign({},r.start),end:Object.assign({},a.end)},t[i][1].end=Object.assign({},r.start),t[n][1].start=Object.assign({},a.end),c=[],t[i][1].end.offset-t[i][1].start.offset&&(c=rr(c,[["enter",t[i][1],e],["exit",t[i][1],e]])),c=rr(c,[["enter",s,e],["enter",r,e],["exit",r,e],["enter",o,e]]),c=rr(c,_2(e.parser.constructs.insideSpan.null,t.slice(i+1,n),e)),c=rr(c,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",s,e]]),t[n][1].end.offset-t[n][1].start.offset?(u=2,c=rr(c,[["enter",t[n][1],e],["exit",t[n][1],e]])):u=0,pr(t,i-1,n-i+3,c),n=i+c.length-u-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function zxe(t,e){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,s=j0(i);let o;return r;function r(l){return o=l,t.enter("attentionSequence"),a(l)}function a(l){if(l===o)return t.consume(l),a;const c=t.exit("attentionSequence"),u=j0(l),d=!u||u===2&&s||n.includes(l),h=!s||s===2&&u||n.includes(i);return c._open=!!(o===42?d:d&&(s||!h)),c._close=!!(o===42?h:h&&(u||!d)),e(l)}}function wE(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const Hxe={name:"autolink",tokenize:Uxe};function Uxe(t,e,n){let i=0;return s;function s(f){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(f){return Hi(f)?(t.consume(f),r):f===64?n(f):c(f)}function r(f){return f===43||f===45||f===46||co(f)?(i=1,a(f)):c(f)}function a(f){return f===58?(t.consume(f),i=0,l):(f===43||f===45||f===46||co(f))&&i++<32?(t.consume(f),a):(i=0,c(f))}function l(f){return f===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.exit("autolink"),e):f===null||f===32||f===60||U0(f)?n(f):(t.consume(f),l)}function c(f){return f===64?(t.consume(f),u):Ixe(f)?(t.consume(f),c):n(f)}function u(f){return co(f)?d(f):n(f)}function d(f){return f===46?(t.consume(f),i=0,u):f===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.exit("autolink"),e):h(f)}function h(f){if((f===45||co(f))&&i++<63){const p=f===45?h:d;return t.consume(f),p}return n(f)}}const ov={tokenize:jxe,partial:!0};function jxe(t,e,n){return i;function i(o){return un(o)?_n(t,s,"linePrefix")(o):s(o)}function s(o){return o===null||Et(o)?e(o):n(o)}}const AN={name:"blockQuote",tokenize:Wxe,continuation:{tokenize:Yxe},exit:qxe};function Wxe(t,e,n){const i=this;return s;function s(r){if(r===62){const a=i.containerState;return a.open||(t.enter("blockQuote",{_container:!0}),a.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(r),t.exit("blockQuoteMarker"),o}return n(r)}function o(r){return un(r)?(t.enter("blockQuotePrefixWhitespace"),t.consume(r),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(r))}}function Yxe(t,e,n){const i=this;return s;function s(r){return un(r)?_n(t,o,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(r):o(r)}function o(r){return t.attempt(AN,e,n)(r)}}function qxe(t){t.exit("blockQuote")}const EN={name:"characterEscape",tokenize:Gxe};function Gxe(t,e,n){return i;function i(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),s}function s(o){return Oxe(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(o)}}const MN={name:"characterReference",tokenize:Xxe};function Xxe(t,e,n){const i=this;let s=0,o,r;return a;function a(d){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(d),t.exit("characterReferenceMarker"),l}function l(d){return d===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(d),t.exit("characterReferenceMarkerNumeric"),c):(t.enter("characterReferenceValue"),o=31,r=co,u(d))}function c(d){return d===88||d===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(d),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,r=Lxe,u):(t.enter("characterReferenceValue"),o=7,r=jC,u(d))}function u(d){if(d===59&&s){const h=t.exit("characterReferenceValue");return r===co&&!G8(i.sliceSerialize(h))?n(d):(t.enter("characterReferenceMarker"),t.consume(d),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return r(d)&&s++<o?(t.consume(d),u):n(d)}}const kE={tokenize:Zxe,partial:!0},CE={name:"codeFenced",tokenize:Kxe,concrete:!0};function Kxe(t,e,n){const i=this,s={tokenize:S,partial:!0};let o=0,r=0,a;return l;function l(M){return c(M)}function c(M){const P=i.events[i.events.length-1];return o=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,a=M,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),u(M)}function u(M){return M===a?(r++,t.consume(M),u):r<3?n(M):(t.exit("codeFencedFenceSequence"),un(M)?_n(t,d,"whitespace")(M):d(M))}function d(M){return M===null||Et(M)?(t.exit("codeFencedFence"),i.interrupt?e(M):t.check(kE,m,A)(M)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),h(M))}function h(M){return M===null||Et(M)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),d(M)):un(M)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),_n(t,f,"whitespace")(M)):M===96&&M===a?n(M):(t.consume(M),h)}function f(M){return M===null||Et(M)?d(M):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),p(M))}function p(M){return M===null||Et(M)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),d(M)):M===96&&M===a?n(M):(t.consume(M),p)}function m(M){return t.attempt(s,A,b)(M)}function b(M){return t.enter("lineEnding"),t.consume(M),t.exit("lineEnding"),w}function w(M){return o>0&&un(M)?_n(t,k,"linePrefix",o+1)(M):k(M)}function k(M){return M===null||Et(M)?t.check(kE,m,A)(M):(t.enter("codeFlowValue"),C(M))}function C(M){return M===null||Et(M)?(t.exit("codeFlowValue"),k(M)):(t.consume(M),C)}function A(M){return t.exit("codeFenced"),e(M)}function S(M,P,T){let I=0;return L;function L(U){return M.enter("lineEnding"),M.consume(U),M.exit("lineEnding"),R}function R(U){return M.enter("codeFencedFence"),un(U)?_n(M,V,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):V(U)}function V(U){return U===a?(M.enter("codeFencedFenceSequence"),H(U)):T(U)}function H(U){return U===a?(I++,M.consume(U),H):I>=r?(M.exit("codeFencedFenceSequence"),un(U)?_n(M,F,"whitespace")(U):F(U)):T(U)}function F(U){return U===null||Et(U)?(M.exit("codeFencedFence"),P(U)):T(U)}}}function Zxe(t,e,n){const i=this;return s;function s(r){return r===null?n(r):(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),o)}function o(r){return i.parser.lazy[i.now().line]?n(r):e(r)}}const e3={name:"codeIndented",tokenize:Qxe},Jxe={tokenize:e6e,partial:!0};function Qxe(t,e,n){const i=this;return s;function s(c){return t.enter("codeIndented"),_n(t,o,"linePrefix",4+1)(c)}function o(c){const u=i.events[i.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?r(c):n(c)}function r(c){return c===null?l(c):Et(c)?t.attempt(Jxe,r,l)(c):(t.enter("codeFlowValue"),a(c))}function a(c){return c===null||Et(c)?(t.exit("codeFlowValue"),r(c)):(t.consume(c),a)}function l(c){return t.exit("codeIndented"),e(c)}}function e6e(t,e,n){const i=this;return s;function s(r){return i.parser.lazy[i.now().line]?n(r):Et(r)?(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),s):_n(t,o,"linePrefix",4+1)(r)}function o(r){const a=i.events[i.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(r):Et(r)?s(r):n(r)}}const t6e={name:"codeText",tokenize:i6e,resolve:n6e,previous:s6e};function n6e(t){let e=t.length-4,n=3,i,s;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(i=n;++i<e;)if(t[i][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(i=n-1,e++;++i<=e;)s===void 0?i!==e&&t[i][1].type!=="lineEnding"&&(s=i):(i===e||t[i][1].type==="lineEnding")&&(t[s][1].type="codeTextData",i!==s+2&&(t[s][1].end=t[i-1][1].end,t.splice(s+2,i-s-2),e-=i-s-2,i=s+2),s=void 0);return t}function s6e(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function i6e(t,e,n){let i=0,s,o;return r;function r(d){return t.enter("codeText"),t.enter("codeTextSequence"),a(d)}function a(d){return d===96?(t.consume(d),i++,a):(t.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(t.enter("space"),t.consume(d),t.exit("space"),l):d===96?(o=t.enter("codeTextSequence"),s=0,u(d)):Et(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),l):(t.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||Et(d)?(t.exit("codeTextData"),l(d)):(t.consume(d),c)}function u(d){return d===96?(t.consume(d),s++,u):s===i?(t.exit("codeTextSequence"),t.exit("codeText"),e(d)):(o.type="codeTextData",c(d))}}class o6e{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(e,i):e>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(e,n,i){const s=n||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&em(this.left,i),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),em(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),em(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);em(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);em(this.left,n.reverse())}}}function em(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function TN(t){const e={};let n=-1,i,s,o,r,a,l,c;const u=new o6e(t);for(;++n<u.length;){for(;n in e;)n=e[n];if(i=u.get(n),n&&i[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=i[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(i[0]==="enter")i[1].contentType&&(Object.assign(e,r6e(u,n)),n=e[n],c=!0);else if(i[1]._container){for(o=n,s=void 0;o--&&(r=u.get(o),r[1].type==="lineEnding"||r[1].type==="lineEndingBlank");)r[0]==="enter"&&(s&&(u.get(s)[1].type="lineEndingBlank"),r[1].type="lineEnding",s=o);s&&(i[1].end=Object.assign({},u.get(s)[1].start),a=u.slice(s,n),a.unshift(i),u.splice(s,n-s+1,a))}}return pr(t,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function r6e(t,e){const n=t.get(e)[1],i=t.get(e)[2];let s=e-1;const o=[],r=n._tokenizer||i.parser[n.contentType](n.start),a=r.events,l=[],c={};let u,d,h=-1,f=n,p=0,m=0;const b=[m];for(;f;){for(;t.get(++s)[1]!==f;);o.push(s),f._tokenizer||(u=i.sliceStream(f),f.next||u.push(null),d&&r.defineSkip(f.start),f._isInFirstContentOfListItem&&(r._gfmTasklistFirstContentOfListItem=!0),r.write(u),f._isInFirstContentOfListItem&&(r._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(m=h+1,b.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(r.events=[],f?(f._tokenizer=void 0,f.previous=void 0):b.pop(),h=b.length;h--;){const w=a.slice(b[h],b[h+1]),k=o.pop();l.push([k,k+w.length-1]),t.splice(k,2,w)}for(l.reverse(),h=-1;++h<l.length;)c[p+l[h][0]]=p+l[h][1],p+=l[h][1]-l[h][0]-1;return c}const a6e={tokenize:u6e,resolve:c6e},l6e={tokenize:d6e,partial:!0};function c6e(t){return TN(t),t}function u6e(t,e){let n;return i;function i(a){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),s(a)}function s(a){return a===null?o(a):Et(a)?t.check(l6e,r,o)(a):(t.consume(a),s)}function o(a){return t.exit("chunkContent"),t.exit("content"),e(a)}function r(a){return t.consume(a),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function d6e(t,e,n){const i=this;return s;function s(r){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),_n(t,o,"linePrefix")}function o(r){if(r===null||Et(r))return n(r);const a=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(r):t.interrupt(i.parser.constructs.flow,n,e)(r)}}function PN(t,e,n,i,s,o,r,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(w){return w===60?(t.enter(i),t.enter(s),t.enter(o),t.consume(w),t.exit(o),h):w===null||w===32||w===41||U0(w)?n(w):(t.enter(i),t.enter(r),t.enter(a),t.enter("chunkString",{contentType:"string"}),m(w))}function h(w){return w===62?(t.enter(o),t.consume(w),t.exit(o),t.exit(s),t.exit(i),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),f(w))}function f(w){return w===62?(t.exit("chunkString"),t.exit(a),h(w)):w===null||w===60||Et(w)?n(w):(t.consume(w),w===92?p:f)}function p(w){return w===60||w===62||w===92?(t.consume(w),f):f(w)}function m(w){return!u&&(w===null||w===41||jn(w))?(t.exit("chunkString"),t.exit(a),t.exit(r),t.exit(i),e(w)):u<c&&w===40?(t.consume(w),u++,m):w===41?(t.consume(w),u--,m):w===null||w===32||w===40||U0(w)?n(w):(t.consume(w),w===92?b:m)}function b(w){return w===40||w===41||w===92?(t.consume(w),m):m(w)}}function IN(t,e,n,i,s,o){const r=this;let a=0,l;return c;function c(f){return t.enter(i),t.enter(s),t.consume(f),t.exit(s),t.enter(o),u}function u(f){return a>999||f===null||f===91||f===93&&!l||f===94&&!a&&"_hiddenFootnoteSupport"in r.parser.constructs?n(f):f===93?(t.exit(o),t.enter(s),t.consume(f),t.exit(s),t.exit(i),e):Et(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||Et(f)||a++>999?(t.exit("chunkString"),u(f)):(t.consume(f),l||(l=!un(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(t.consume(f),a++,d):d(f)}}function LN(t,e,n,i,s,o){let r;return a;function a(h){return h===34||h===39||h===40?(t.enter(i),t.enter(s),t.consume(h),t.exit(s),r=h===40?41:h,l):n(h)}function l(h){return h===r?(t.enter(s),t.consume(h),t.exit(s),t.exit(i),e):(t.enter(o),c(h))}function c(h){return h===r?(t.exit(o),l(r)):h===null?n(h):Et(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),_n(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===r||h===null||Et(h)?(t.exit("chunkString"),c(h)):(t.consume(h),h===92?d:u)}function d(h){return h===r||h===92?(t.consume(h),u):u(h)}}function dg(t,e){let n;return i;function i(s){return Et(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),n=!0,i):un(s)?_n(t,i,n?"linePrefix":"lineSuffix")(s):e(s)}}const h6e={name:"definition",tokenize:p6e},f6e={tokenize:m6e,partial:!0};function p6e(t,e,n){const i=this;let s;return o;function o(f){return t.enter("definition"),r(f)}function r(f){return IN.call(i,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return s=Wr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),f===58?(t.enter("definitionMarker"),t.consume(f),t.exit("definitionMarker"),l):n(f)}function l(f){return jn(f)?dg(t,c)(f):c(f)}function c(f){return PN(t,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return t.attempt(f6e,d,d)(f)}function d(f){return un(f)?_n(t,h,"whitespace")(f):h(f)}function h(f){return f===null||Et(f)?(t.exit("definition"),i.parser.defined.push(s),e(f)):n(f)}}function m6e(t,e,n){return i;function i(a){return jn(a)?dg(t,s)(a):n(a)}function s(a){return LN(t,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return un(a)?_n(t,r,"whitespace")(a):r(a)}function r(a){return a===null||Et(a)?e(a):n(a)}}const g6e={name:"hardBreakEscape",tokenize:v6e};function v6e(t,e,n){return i;function i(o){return t.enter("hardBreakEscape"),t.consume(o),s}function s(o){return Et(o)?(t.exit("hardBreakEscape"),e(o)):n(o)}}const _6e={name:"headingAtx",tokenize:b6e,resolve:y6e};function y6e(t,e){let n=t.length-2,i=3,s,o;return t[i][1].type==="whitespace"&&(i+=2),n-2>i&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&t[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(s={type:"atxHeadingText",start:t[i][1].start,end:t[n][1].end},o={type:"chunkText",start:t[i][1].start,end:t[n][1].end,contentType:"text"},pr(t,i,n-i+1,[["enter",s,e],["enter",o,e],["exit",o,e],["exit",s,e]])),t}function b6e(t,e,n){let i=0;return s;function s(u){return t.enter("atxHeading"),o(u)}function o(u){return t.enter("atxHeadingSequence"),r(u)}function r(u){return u===35&&i++<6?(t.consume(u),r):u===null||jn(u)?(t.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(t.enter("atxHeadingSequence"),l(u)):u===null||Et(u)?(t.exit("atxHeading"),e(u)):un(u)?_n(t,a,"whitespace")(u):(t.enter("atxHeadingText"),c(u))}function l(u){return u===35?(t.consume(u),l):(t.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||jn(u)?(t.exit("atxHeadingText"),a(u)):(t.consume(u),c)}}const w6e=["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"],xE=["pre","script","style","textarea"],k6e={name:"htmlFlow",tokenize:$6e,resolveTo:S6e,concrete:!0},C6e={tokenize:E6e,partial:!0},x6e={tokenize:A6e,partial:!0};function S6e(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function $6e(t,e,n){const i=this;let s,o,r,a,l;return c;function c(K){return u(K)}function u(K){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(K),d}function d(K){return K===33?(t.consume(K),h):K===47?(t.consume(K),o=!0,m):K===63?(t.consume(K),s=3,i.interrupt?e:G):Hi(K)?(t.consume(K),r=String.fromCharCode(K),b):n(K)}function h(K){return K===45?(t.consume(K),s=2,f):K===91?(t.consume(K),s=5,a=0,p):Hi(K)?(t.consume(K),s=4,i.interrupt?e:G):n(K)}function f(K){return K===45?(t.consume(K),i.interrupt?e:G):n(K)}function p(K){const ae="CDATA[";return K===ae.charCodeAt(a++)?(t.consume(K),a===ae.length?i.interrupt?e:V:p):n(K)}function m(K){return Hi(K)?(t.consume(K),r=String.fromCharCode(K),b):n(K)}function b(K){if(K===null||K===47||K===62||jn(K)){const ae=K===47,ge=r.toLowerCase();return!ae&&!o&&xE.includes(ge)?(s=1,i.interrupt?e(K):V(K)):w6e.includes(r.toLowerCase())?(s=6,ae?(t.consume(K),w):i.interrupt?e(K):V(K)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(K):o?k(K):C(K))}return K===45||co(K)?(t.consume(K),r+=String.fromCharCode(K),b):n(K)}function w(K){return K===62?(t.consume(K),i.interrupt?e:V):n(K)}function k(K){return un(K)?(t.consume(K),k):L(K)}function C(K){return K===47?(t.consume(K),L):K===58||K===95||Hi(K)?(t.consume(K),A):un(K)?(t.consume(K),C):L(K)}function A(K){return K===45||K===46||K===58||K===95||co(K)?(t.consume(K),A):S(K)}function S(K){return K===61?(t.consume(K),M):un(K)?(t.consume(K),S):C(K)}function M(K){return K===null||K===60||K===61||K===62||K===96?n(K):K===34||K===39?(t.consume(K),l=K,P):un(K)?(t.consume(K),M):T(K)}function P(K){return K===l?(t.consume(K),l=null,I):K===null||Et(K)?n(K):(t.consume(K),P)}function T(K){return K===null||K===34||K===39||K===47||K===60||K===61||K===62||K===96||jn(K)?S(K):(t.consume(K),T)}function I(K){return K===47||K===62||un(K)?C(K):n(K)}function L(K){return K===62?(t.consume(K),R):n(K)}function R(K){return K===null||Et(K)?V(K):un(K)?(t.consume(K),R):n(K)}function V(K){return K===45&&s===2?(t.consume(K),Y):K===60&&s===1?(t.consume(K),z):K===62&&s===4?(t.consume(K),Q):K===63&&s===3?(t.consume(K),G):K===93&&s===5?(t.consume(K),Z):Et(K)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(C6e,ne,H)(K)):K===null||Et(K)?(t.exit("htmlFlowData"),H(K)):(t.consume(K),V)}function H(K){return t.check(x6e,F,ne)(K)}function F(K){return t.enter("lineEnding"),t.consume(K),t.exit("lineEnding"),U}function U(K){return K===null||Et(K)?H(K):(t.enter("htmlFlowData"),V(K))}function Y(K){return K===45?(t.consume(K),G):V(K)}function z(K){return K===47?(t.consume(K),r="",X):V(K)}function X(K){if(K===62){const ae=r.toLowerCase();return xE.includes(ae)?(t.consume(K),Q):V(K)}return Hi(K)&&r.length<8?(t.consume(K),r+=String.fromCharCode(K),X):V(K)}function Z(K){return K===93?(t.consume(K),G):V(K)}function G(K){return K===62?(t.consume(K),Q):K===45&&s===2?(t.consume(K),G):V(K)}function Q(K){return K===null||Et(K)?(t.exit("htmlFlowData"),ne(K)):(t.consume(K),Q)}function ne(K){return t.exit("htmlFlow"),e(K)}}function A6e(t,e,n){const i=this;return s;function s(r){return Et(r)?(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),o):n(r)}function o(r){return i.parser.lazy[i.now().line]?n(r):e(r)}}function E6e(t,e,n){return i;function i(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(ov,e,n)}}const M6e={name:"htmlText",tokenize:T6e};function T6e(t,e,n){const i=this;let s,o,r;return a;function a(G){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(G),l}function l(G){return G===33?(t.consume(G),c):G===47?(t.consume(G),S):G===63?(t.consume(G),C):Hi(G)?(t.consume(G),T):n(G)}function c(G){return G===45?(t.consume(G),u):G===91?(t.consume(G),o=0,p):Hi(G)?(t.consume(G),k):n(G)}function u(G){return G===45?(t.consume(G),f):n(G)}function d(G){return G===null?n(G):G===45?(t.consume(G),h):Et(G)?(r=d,z(G)):(t.consume(G),d)}function h(G){return G===45?(t.consume(G),f):d(G)}function f(G){return G===62?Y(G):G===45?h(G):d(G)}function p(G){const Q="CDATA[";return G===Q.charCodeAt(o++)?(t.consume(G),o===Q.length?m:p):n(G)}function m(G){return G===null?n(G):G===93?(t.consume(G),b):Et(G)?(r=m,z(G)):(t.consume(G),m)}function b(G){return G===93?(t.consume(G),w):m(G)}function w(G){return G===62?Y(G):G===93?(t.consume(G),w):m(G)}function k(G){return G===null||G===62?Y(G):Et(G)?(r=k,z(G)):(t.consume(G),k)}function C(G){return G===null?n(G):G===63?(t.consume(G),A):Et(G)?(r=C,z(G)):(t.consume(G),C)}function A(G){return G===62?Y(G):C(G)}function S(G){return Hi(G)?(t.consume(G),M):n(G)}function M(G){return G===45||co(G)?(t.consume(G),M):P(G)}function P(G){return Et(G)?(r=P,z(G)):un(G)?(t.consume(G),P):Y(G)}function T(G){return G===45||co(G)?(t.consume(G),T):G===47||G===62||jn(G)?I(G):n(G)}function I(G){return G===47?(t.consume(G),Y):G===58||G===95||Hi(G)?(t.consume(G),L):Et(G)?(r=I,z(G)):un(G)?(t.consume(G),I):Y(G)}function L(G){return G===45||G===46||G===58||G===95||co(G)?(t.consume(G),L):R(G)}function R(G){return G===61?(t.consume(G),V):Et(G)?(r=R,z(G)):un(G)?(t.consume(G),R):I(G)}function V(G){return G===null||G===60||G===61||G===62||G===96?n(G):G===34||G===39?(t.consume(G),s=G,H):Et(G)?(r=V,z(G)):un(G)?(t.consume(G),V):(t.consume(G),F)}function H(G){return G===s?(t.consume(G),s=void 0,U):G===null?n(G):Et(G)?(r=H,z(G)):(t.consume(G),H)}function F(G){return G===null||G===34||G===39||G===60||G===61||G===96?n(G):G===47||G===62||jn(G)?I(G):(t.consume(G),F)}function U(G){return G===47||G===62||jn(G)?I(G):n(G)}function Y(G){return G===62?(t.consume(G),t.exit("htmlTextData"),t.exit("htmlText"),e):n(G)}function z(G){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(G),t.exit("lineEnding"),X}function X(G){return un(G)?_n(t,Z,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):Z(G)}function Z(G){return t.enter("htmlTextData"),r(G)}}const X8={name:"labelEnd",tokenize:R6e,resolveTo:D6e,resolveAll:O6e},P6e={tokenize:V6e},I6e={tokenize:F6e},L6e={tokenize:N6e};function O6e(t){let e=-1;for(;++e<t.length;){const n=t[e][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(t.splice(e+1,n.type==="labelImage"?4:2),n.type="data",e++)}return t}function D6e(t,e){let n=t.length,i=0,s,o,r,a;for(;n--;)if(s=t[n][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(r){if(t[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=n,s.type!=="labelLink")){i=2;break}}else s.type==="labelEnd"&&(r=n);const l={type:t[o][1].type==="labelLink"?"link":"image",start:Object.assign({},t[o][1].start),end:Object.assign({},t[t.length-1][1].end)},c={type:"label",start:Object.assign({},t[o][1].start),end:Object.assign({},t[r][1].end)},u={type:"labelText",start:Object.assign({},t[o+i+2][1].end),end:Object.assign({},t[r-2][1].start)};return a=[["enter",l,e],["enter",c,e]],a=rr(a,t.slice(o+1,o+i+3)),a=rr(a,[["enter",u,e]]),a=rr(a,_2(e.parser.constructs.insideSpan.null,t.slice(o+i+4,r-3),e)),a=rr(a,[["exit",u,e],t[r-2],t[r-1],["exit",c,e]]),a=rr(a,t.slice(r+1)),a=rr(a,[["exit",l,e]]),pr(t,o,t.length,a),t}function R6e(t,e,n){const i=this;let s=i.events.length,o,r;for(;s--;)if((i.events[s][1].type==="labelImage"||i.events[s][1].type==="labelLink")&&!i.events[s][1]._balanced){o=i.events[s][1];break}return a;function a(h){return o?o._inactive?d(h):(r=i.parser.defined.includes(Wr(i.sliceSerialize({start:o.end,end:i.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(h),t.exit("labelMarker"),t.exit("labelEnd"),l):n(h)}function l(h){return h===40?t.attempt(P6e,u,r?u:d)(h):h===91?t.attempt(I6e,u,r?c:d)(h):r?u(h):d(h)}function c(h){return t.attempt(L6e,u,d)(h)}function u(h){return e(h)}function d(h){return o._balanced=!0,n(h)}}function V6e(t,e,n){return i;function i(d){return t.enter("resource"),t.enter("resourceMarker"),t.consume(d),t.exit("resourceMarker"),s}function s(d){return jn(d)?dg(t,o)(d):o(d)}function o(d){return d===41?u(d):PN(t,r,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function r(d){return jn(d)?dg(t,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?LN(t,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return jn(d)?dg(t,u)(d):u(d)}function u(d){return d===41?(t.enter("resourceMarker"),t.consume(d),t.exit("resourceMarker"),t.exit("resource"),e):n(d)}}function F6e(t,e,n){const i=this;return s;function s(a){return IN.call(i,t,o,r,"reference","referenceMarker","referenceString")(a)}function o(a){return i.parser.defined.includes(Wr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function r(a){return n(a)}}function N6e(t,e,n){return i;function i(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),s}function s(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),e):n(o)}}const B6e={name:"labelStartImage",tokenize:z6e,resolveAll:X8.resolveAll};function z6e(t,e,n){const i=this;return s;function s(a){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(a),t.exit("labelImageMarker"),o}function o(a){return a===91?(t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelImage"),r):n(a)}function r(a){return a===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(a):e(a)}}const H6e={name:"labelStartLink",tokenize:U6e,resolveAll:X8.resolveAll};function U6e(t,e,n){const i=this;return s;function s(r){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(r),t.exit("labelMarker"),t.exit("labelLink"),o}function o(r){return r===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(r):e(r)}}const t3={name:"lineEnding",tokenize:j6e};function j6e(t,e){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),_n(t,e,"linePrefix")}}const Z_={name:"thematicBreak",tokenize:W6e};function W6e(t,e,n){let i=0,s;return o;function o(c){return t.enter("thematicBreak"),r(c)}function r(c){return s=c,a(c)}function a(c){return c===s?(t.enter("thematicBreakSequence"),l(c)):i>=3&&(c===null||Et(c))?(t.exit("thematicBreak"),e(c)):n(c)}function l(c){return c===s?(t.consume(c),i++,l):(t.exit("thematicBreakSequence"),un(c)?_n(t,a,"whitespace")(c):a(c))}}const so={name:"list",tokenize:G6e,continuation:{tokenize:X6e},exit:Z6e},Y6e={tokenize:J6e,partial:!0},q6e={tokenize:K6e,partial:!0};function G6e(t,e,n){const i=this,s=i.events[i.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,r=0;return a;function a(f){const p=i.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!i.containerState.marker||f===i.containerState.marker:jC(f)){if(i.containerState.type||(i.containerState.type=p,t.enter(p,{_container:!0})),p==="listUnordered")return t.enter("listItemPrefix"),f===42||f===45?t.check(Z_,n,c)(f):c(f);if(!i.interrupt||f===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(f)}return n(f)}function l(f){return jC(f)&&++r<10?(t.consume(f),l):(!i.interrupt||r<2)&&(i.containerState.marker?f===i.containerState.marker:f===41||f===46)?(t.exit("listItemValue"),c(f)):n(f)}function c(f){return t.enter("listItemMarker"),t.consume(f),t.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||f,t.check(ov,i.interrupt?n:u,t.attempt(Y6e,h,d))}function u(f){return i.containerState.initialBlankLine=!0,o++,h(f)}function d(f){return un(f)?(t.enter("listItemPrefixWhitespace"),t.consume(f),t.exit("listItemPrefixWhitespace"),h):n(f)}function h(f){return i.containerState.size=o+i.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(f)}}function X6e(t,e,n){const i=this;return i.containerState._closeFlow=void 0,t.check(ov,s,o);function s(a){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,_n(t,e,"listItemIndent",i.containerState.size+1)(a)}function o(a){return i.containerState.furtherBlankLines||!un(a)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,r(a)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(q6e,e,r)(a))}function r(a){return i.containerState._closeFlow=!0,i.interrupt=void 0,_n(t,t.attempt(so,e,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function K6e(t,e,n){const i=this;return _n(t,s,"listItemIndent",i.containerState.size+1);function s(o){const r=i.events[i.events.length-1];return r&&r[1].type==="listItemIndent"&&r[2].sliceSerialize(r[1],!0).length===i.containerState.size?e(o):n(o)}}function Z6e(t){t.exit(this.containerState.type)}function J6e(t,e,n){const i=this;return _n(t,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function s(o){const r=i.events[i.events.length-1];return!un(o)&&r&&r[1].type==="listItemPrefixWhitespace"?e(o):n(o)}}const SE={name:"setextUnderline",tokenize:e4e,resolveTo:Q6e};function Q6e(t,e){let n=t.length,i,s,o;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){i=n;break}t[n][1].type==="paragraph"&&(s=n)}else t[n][1].type==="content"&&t.splice(n,1),!o&&t[n][1].type==="definition"&&(o=n);const r={type:"setextHeading",start:Object.assign({},t[s][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[s][1].type="setextHeadingText",o?(t.splice(s,0,["enter",r,e]),t.splice(o+1,0,["exit",t[i][1],e]),t[i][1].end=Object.assign({},t[o][1].end)):t[i][1]=r,t.push(["exit",r,e]),t}function e4e(t,e,n){const i=this;let s;return o;function o(c){let u=i.events.length,d;for(;u--;)if(i.events[u][1].type!=="lineEnding"&&i.events[u][1].type!=="linePrefix"&&i.events[u][1].type!=="content"){d=i.events[u][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(t.enter("setextHeadingLine"),s=c,r(c)):n(c)}function r(c){return t.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===s?(t.consume(c),a):(t.exit("setextHeadingLineSequence"),un(c)?_n(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Et(c)?(t.exit("setextHeadingLine"),e(c)):n(c)}}const t4e={tokenize:n4e};function n4e(t){const e=this,n=t.attempt(ov,i,t.attempt(this.parser.constructs.flowInitial,s,_n(t,t.attempt(this.parser.constructs.flow,s,t.attempt(a6e,s)),"linePrefix")));return n;function i(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function s(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const s4e={resolveAll:DN()},i4e=ON("string"),o4e=ON("text");function ON(t){return{tokenize:e,resolveAll:DN(t==="text"?r4e:void 0)};function e(n){const i=this,s=this.parser.constructs[t],o=n.attempt(s,r,a);return r;function r(u){return c(u)?o(u):a(u)}function a(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),o(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=s[u];let h=-1;if(d)for(;++h<d.length;){const f=d[h];if(!f.previous||f.previous.call(i,i.previous))return!0}return!1}}}function DN(t){return e;function e(n,i){let s=-1,o;for(;++s<=n.length;)o===void 0?n[s]&&n[s][1].type==="data"&&(o=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==o+2&&(n[o][1].end=n[s-1][1].end,n.splice(o+2,s-o-2),s=o+2),o=void 0);return t?t(n,i):n}}function r4e(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const i=t[n-1][1],s=e.sliceStream(i);let o=s.length,r=-1,a=0,l;for(;o--;){const c=s[o];if(typeof c=="string"){for(r=c.length;c.charCodeAt(r-1)===32;)a++,r--;if(r)break;r=-1}else if(c===-2)l=!0,a++;else if(c!==-1){o++;break}}if(a){const c={type:n===t.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{line:i.end.line,column:i.end.column-a,offset:i.end.offset-a,_index:i.start._index+o,_bufferIndex:o?r:i.start._bufferIndex+r},end:Object.assign({},i.end)};i.end=Object.assign({},c.start),i.start.offset===i.end.offset?Object.assign(i,c):(t.splice(n,0,["enter",c,e],["exit",c,e]),n+=2)}n++}return t}function a4e(t,e,n){let i=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const s={},o=[];let r=[],a=[];const l={consume:k,enter:C,exit:A,attempt:P(S),check:P(M),interrupt:P(M,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:t,sliceStream:f,sliceSerialize:h,now:p,defineSkip:m,write:d};let u=e.tokenize.call(c,l);return e.resolveAll&&o.push(e),c;function d(R){return r=rr(r,R),b(),r[r.length-1]!==null?[]:(T(e,0),c.events=_2(o,c.events,c),c.events)}function h(R,V){return c4e(f(R),V)}function f(R){return l4e(r,R)}function p(){const{line:R,column:V,offset:H,_index:F,_bufferIndex:U}=i;return{line:R,column:V,offset:H,_index:F,_bufferIndex:U}}function m(R){s[R.line]=R.column,L()}function b(){let R;for(;i._index<r.length;){const V=r[i._index];if(typeof V=="string")for(R=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===R&&i._bufferIndex<V.length;)w(V.charCodeAt(i._bufferIndex));else w(V)}}function w(R){u=u(R)}function k(R){Et(R)?(i.line++,i.column=1,i.offset+=R===-3?2:1,L()):R!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===r[i._index].length&&(i._bufferIndex=-1,i._index++)),c.previous=R}function C(R,V){const H=V||{};return H.type=R,H.start=p(),c.events.push(["enter",H,c]),a.push(H),H}function A(R){const V=a.pop();return V.end=p(),c.events.push(["exit",V,c]),V}function S(R,V){T(R,V.from)}function M(R,V){V.restore()}function P(R,V){return H;function H(F,U,Y){let z,X,Z,G;return Array.isArray(F)?ne(F):"tokenize"in F?ne([F]):Q(F);function Q(Ce){return oe;function oe(pe){const ie=pe!==null&&Ce[pe],re=pe!==null&&Ce.null,ke=[...Array.isArray(ie)?ie:ie?[ie]:[],...Array.isArray(re)?re:re?[re]:[]];return ne(ke)(pe)}}function ne(Ce){return z=Ce,X=0,Ce.length===0?Y:K(Ce[X])}function K(Ce){return oe;function oe(pe){return G=I(),Z=Ce,Ce.partial||(c.currentConstruct=Ce),Ce.name&&c.parser.constructs.disable.null.includes(Ce.name)?ge():Ce.tokenize.call(V?Object.assign(Object.create(c),V):c,l,ae,ge)(pe)}}function ae(Ce){return R(Z,G),U}function ge(Ce){return G.restore(),++X<z.length?K(z[X]):Y}}}function T(R,V){R.resolveAll&&!o.includes(R)&&o.push(R),R.resolve&&pr(c.events,V,c.events.length-V,R.resolve(c.events.slice(V),c)),R.resolveTo&&(c.events=R.resolveTo(c.events,c))}function I(){const R=p(),V=c.previous,H=c.currentConstruct,F=c.events.length,U=Array.from(a);return{restore:Y,from:F};function Y(){i=R,c.previous=V,c.currentConstruct=H,c.events.length=F,a=U,L()}}function L(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function l4e(t,e){const n=e.start._index,i=e.start._bufferIndex,s=e.end._index,o=e.end._bufferIndex;let r;if(n===s)r=[t[n].slice(i,o)];else{if(r=t.slice(n,s),i>-1){const a=r[0];typeof a=="string"?r[0]=a.slice(i):r.shift()}o>0&&r.push(t[s].slice(0,o))}return r}function c4e(t,e){let n=-1;const i=[];let s;for(;++n<t.length;){const o=t[n];let r;if(typeof o=="string")r=o;else switch(o){case-5:{r="\r";break}case-4:{r=`
85 +`;break}case-3:{r=`\r
86 +`;break}case-2:{r=e?" ":" ";break}case-1:{if(!e&&s)continue;r=" ";break}default:r=String.fromCharCode(o)}s=o===-2,i.push(r)}return i.join("")}const u4e={42:so,43:so,45:so,48:so,49:so,50:so,51:so,52:so,53:so,54:so,55:so,56:so,57:so,62:AN},d4e={91:h6e},h4e={[-2]:e3,[-1]:e3,32:e3},f4e={35:_6e,42:Z_,45:[SE,Z_],60:k6e,61:SE,95:Z_,96:CE,126:CE},p4e={38:MN,92:EN},m4e={[-5]:t3,[-4]:t3,[-3]:t3,33:B6e,38:MN,42:WC,60:[Hxe,M6e],91:H6e,92:[g6e,EN],93:X8,95:WC,96:t6e},g4e={null:[WC,s4e]},v4e={null:[42,95]},_4e={null:[]},y4e=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:v4e,contentInitial:d4e,disable:_4e,document:u4e,flow:f4e,flowInitial:h4e,insideSpan:g4e,string:p4e,text:m4e},Symbol.toStringTag,{value:"Module"}));function b4e(t){const n=SN([y4e,...(t||{}).extensions||[]]),i={defined:[],lazy:{},constructs:n,content:s(Dxe),document:s(Vxe),flow:s(t4e),string:s(i4e),text:s(o4e)};return i;function s(o){return r;function r(a){return a4e(i,o,a)}}}function w4e(t){for(;!TN(t););return t}const $E=/[\0\t\n\r]/g;function k4e(){let t=1,e="",n=!0,i;return s;function s(o,r,a){const l=[];let c,u,d,h,f;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(r||void 0).decode(o)),d=0,e="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if($E.lastIndex=d,c=$E.exec(o),h=c&&c.index!==void 0?c.index:o.length,f=o.charCodeAt(h),!c){e=o.slice(d);break}if(f===10&&d===h&&i)l.push(-3),i=void 0;else switch(i&&(l.push(-5),i=void 0),d<h&&(l.push(o.slice(d,h)),t+=h-d),f){case 0:{l.push(65533),t++;break}case 9:{for(u=Math.ceil(t/4)*4,l.push(-2);t++<u;)l.push(-1);break}case 10:{l.push(-4),t=1;break}default:i=!0,t=1}d=h+1}return a&&(i&&l.push(-5),e&&l.push(e),l.push(null)),l}}const C4e=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function RN(t){return t.replace(C4e,x4e)}function x4e(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return $N(n.slice(o?2:1),o?16:10)}return G8(n)||t}function hg(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?AE(t.position):"start"in t||"end"in t?AE(t):"line"in t||"column"in t?YC(t):""}function YC(t){return EE(t&&t.line)+":"+EE(t&&t.column)}function AE(t){return YC(t&&t.start)+"-"+YC(t&&t.end)}function EE(t){return t&&typeof t=="number"?t:1}const VN={}.hasOwnProperty;function S4e(t,e,n){return typeof e!="string"&&(n=e,e=void 0),$4e(n)(w4e(b4e(n).document().write(k4e()(t,e,!0))))}function $4e(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(We),autolinkProtocol:I,autolinkEmail:I,atxHeading:o(me),blockQuote:o(re),characterEscape:I,characterReference:I,codeFenced:o(ke),codeFencedFenceInfo:r,codeFencedFenceMeta:r,codeIndented:o(ke,r),codeText:o(je,r),codeTextData:I,data:I,codeFlowValue:I,definition:o(te),definitionDestinationString:r,definitionLabelString:r,definitionTitleString:r,emphasis:o(se),hardBreakEscape:o($e),hardBreakTrailing:o($e),htmlFlow:o(Se,r),htmlFlowData:I,htmlText:o(Se,r),htmlTextData:I,image:o(Le),label:r,link:o(We),listItem:o(He),listItemValue:h,listOrdered:o(Fe,d),listUnordered:o(Fe),paragraph:o(Ae),reference:K,referenceString:r,resourceDestinationString:r,resourceTitleString:r,setextHeading:o(me),strong:o(Ze),thematicBreak:o(it)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:ie,autolinkProtocol:pe,blockQuote:l(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:Ce,characterReference:oe,codeFenced:l(b),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:L,codeIndented:l(w),codeText:l(U),codeTextData:L,data:L,definition:l(),definitionDestinationString:A,definitionLabelString:k,definitionTitleString:C,emphasis:l(),hardBreakEscape:l(V),hardBreakTrailing:l(V),htmlFlow:l(H),htmlFlowData:L,htmlText:l(F),htmlTextData:L,image:l(z),label:Z,labelText:X,lineEnding:R,link:l(Y),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ae,resourceDestinationString:G,resourceTitleString:Q,resource:ne,setextHeading:l(T),setextHeadingLineSequence:P,setextHeadingText:M,strong:l(),thematicBreak:l()}};FN(e,(t||{}).mdastExtensions||[]);const n={};return i;function i(be){let ve={type:"root",children:[]};const Pe={stack:[ve],tokenStack:[],config:e,enter:a,exit:c,buffer:r,resume:u,data:n},Ie=[];let _t=-1;for(;++_t<be.length;)if(be[_t][1].type==="listOrdered"||be[_t][1].type==="listUnordered")if(be[_t][0]==="enter")Ie.push(_t);else{const Lt=Ie.pop();_t=s(be,Lt,_t)}for(_t=-1;++_t<be.length;){const Lt=e[be[_t][0]];VN.call(Lt,be[_t][1].type)&&Lt[be[_t][1].type].call(Object.assign({sliceSerialize:be[_t][2].sliceSerialize},Pe),be[_t][1])}if(Pe.tokenStack.length>0){const Lt=Pe.tokenStack[Pe.tokenStack.length-1];(Lt[1]||ME).call(Pe,void 0,Lt[0])}for(ve.position={start:Ul(be.length>0?be[0][1].start:{line:1,column:1,offset:0}),end:Ul(be.length>0?be[be.length-2][1].end:{line:1,column:1,offset:0})},_t=-1;++_t<e.transforms.length;)ve=e.transforms[_t](ve)||ve;return ve}function s(be,ve,Pe){let Ie=ve-1,_t=-1,Lt=!1,Je,dt,mt,_e;for(;++Ie<=Pe;){const Oe=be[Ie];switch(Oe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Oe[0]==="enter"?_t++:_t--,_e=void 0;break}case"lineEndingBlank":{Oe[0]==="enter"&&(Je&&!_e&&!_t&&!mt&&(mt=Ie),_e=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:_e=void 0}if(!_t&&Oe[0]==="enter"&&Oe[1].type==="listItemPrefix"||_t===-1&&Oe[0]==="exit"&&(Oe[1].type==="listUnordered"||Oe[1].type==="listOrdered")){if(Je){let ue=Ie;for(dt=void 0;ue--;){const De=be[ue];if(De[1].type==="lineEnding"||De[1].type==="lineEndingBlank"){if(De[0]==="exit")continue;dt&&(be[dt][1].type="lineEndingBlank",Lt=!0),De[1].type="lineEnding",dt=ue}else if(!(De[1].type==="linePrefix"||De[1].type==="blockQuotePrefix"||De[1].type==="blockQuotePrefixWhitespace"||De[1].type==="blockQuoteMarker"||De[1].type==="listItemIndent"))break}mt&&(!dt||mt<dt)&&(Je._spread=!0),Je.end=Object.assign({},dt?be[dt][1].start:Oe[1].end),be.splice(dt||Ie,0,["exit",Je,Oe[2]]),Ie++,Pe++}if(Oe[1].type==="listItemPrefix"){const ue={type:"listItem",_spread:!1,start:Object.assign({},Oe[1].start),end:void 0};Je=ue,be.splice(Ie,0,["enter",ue,Oe[2]]),Ie++,Pe++,mt=void 0,_e=!0}}}return be[ve][1]._spread=Lt,Pe}function o(be,ve){return Pe;function Pe(Ie){a.call(this,be(Ie),Ie),ve&&ve.call(this,Ie)}}function r(){this.stack.push({type:"fragment",children:[]})}function a(be,ve,Pe){this.stack[this.stack.length-1].children.push(be),this.stack.push(be),this.tokenStack.push([ve,Pe]),be.position={start:Ul(ve.start),end:void 0}}function l(be){return ve;function ve(Pe){be&&be.call(this,Pe),c.call(this,Pe)}}function c(be,ve){const Pe=this.stack.pop(),Ie=this.tokenStack.pop();if(Ie)Ie[0].type!==be.type&&(ve?ve.call(this,be,Ie[0]):(Ie[1]||ME).call(this,be,Ie[0]));else throw new Error("Cannot close `"+be.type+"` ("+hg({start:be.start,end:be.end})+"): it’s not open");Pe.position.end=Ul(be.end)}function u(){return q8(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(be){if(this.data.expectingFirstListItemValue){const ve=this.stack[this.stack.length-2];ve.start=Number.parseInt(this.sliceSerialize(be),10),this.data.expectingFirstListItemValue=void 0}}function f(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.lang=be}function p(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.meta=be}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.value=be.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.value=be.replace(/(\r?\n|\r)$/g,"")}function k(be){const ve=this.resume(),Pe=this.stack[this.stack.length-1];Pe.label=ve,Pe.identifier=Wr(this.sliceSerialize(be)).toLowerCase()}function C(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.title=be}function A(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.url=be}function S(be){const ve=this.stack[this.stack.length-1];if(!ve.depth){const Pe=this.sliceSerialize(be).length;ve.depth=Pe}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function P(be){const ve=this.stack[this.stack.length-1];ve.depth=this.sliceSerialize(be).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function I(be){const Pe=this.stack[this.stack.length-1].children;let Ie=Pe[Pe.length-1];(!Ie||Ie.type!=="text")&&(Ie=Ye(),Ie.position={start:Ul(be.start),end:void 0},Pe.push(Ie)),this.stack.push(Ie)}function L(be){const ve=this.stack.pop();ve.value+=this.sliceSerialize(be),ve.position.end=Ul(be.end)}function R(be){const ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Pe=ve.children[ve.children.length-1];Pe.position.end=Ul(be.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(ve.type)&&(I.call(this,be),L.call(this,be))}function V(){this.data.atHardBreak=!0}function H(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.value=be}function F(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.value=be}function U(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.value=be}function Y(){const be=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";be.type+="Reference",be.referenceType=ve,delete be.url,delete be.title}else delete be.identifier,delete be.label;this.data.referenceType=void 0}function z(){const be=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";be.type+="Reference",be.referenceType=ve,delete be.url,delete be.title}else delete be.identifier,delete be.label;this.data.referenceType=void 0}function X(be){const ve=this.sliceSerialize(be),Pe=this.stack[this.stack.length-2];Pe.label=RN(ve),Pe.identifier=Wr(ve).toLowerCase()}function Z(){const be=this.stack[this.stack.length-1],ve=this.resume(),Pe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Pe.type==="link"){const Ie=be.children;Pe.children=Ie}else Pe.alt=ve}function G(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.url=be}function Q(){const be=this.resume(),ve=this.stack[this.stack.length-1];ve.title=be}function ne(){this.data.inReference=void 0}function K(){this.data.referenceType="collapsed"}function ae(be){const ve=this.resume(),Pe=this.stack[this.stack.length-1];Pe.label=ve,Pe.identifier=Wr(this.sliceSerialize(be)).toLowerCase(),this.data.referenceType="full"}function ge(be){this.data.characterReferenceType=be.type}function Ce(be){const ve=this.sliceSerialize(be),Pe=this.data.characterReferenceType;let Ie;Pe?(Ie=$N(ve,Pe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ie=G8(ve);const _t=this.stack[this.stack.length-1];_t.value+=Ie}function oe(be){const ve=this.stack.pop();ve.position.end=Ul(be.end)}function pe(be){L.call(this,be);const ve=this.stack[this.stack.length-1];ve.url=this.sliceSerialize(be)}function ie(be){L.call(this,be);const ve=this.stack[this.stack.length-1];ve.url="mailto:"+this.sliceSerialize(be)}function re(){return{type:"blockquote",children:[]}}function ke(){return{type:"code",lang:null,meta:null,value:""}}function je(){return{type:"inlineCode",value:""}}function te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function se(){return{type:"emphasis",children:[]}}function me(){return{type:"heading",depth:0,children:[]}}function $e(){return{type:"break"}}function Se(){return{type:"html",value:""}}function Le(){return{type:"image",title:null,url:"",alt:null}}function We(){return{type:"link",title:null,url:"",children:[]}}function Fe(be){return{type:"list",ordered:be.type==="listOrdered",start:null,spread:be._spread,children:[]}}function He(be){return{type:"listItem",spread:be._spread,checked:null,children:[]}}function Ae(){return{type:"paragraph",children:[]}}function Ze(){return{type:"strong",children:[]}}function Ye(){return{type:"text",value:""}}function it(){return{type:"thematicBreak"}}}function Ul(t){return{line:t.line,column:t.column,offset:t.offset}}function FN(t,e){let n=-1;for(;++n<e.length;){const i=e[n];Array.isArray(i)?FN(t,i):A4e(t,i)}}function A4e(t,e){let n;for(n in e)if(VN.call(e,n))switch(n){case"canContainEols":{const i=e[n];i&&t[n].push(...i);break}case"transforms":{const i=e[n];i&&t[n].push(...i);break}case"enter":case"exit":{const i=e[n];i&&Object.assign(t[n],i);break}}}function ME(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+hg({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+hg({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+hg({start:e.start,end:e.end})+") is still open")}function qC(t){const e=this;e.parser=n;function n(i){return S4e(i,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}const TE={}.hasOwnProperty;function E4e(t,e){const n=e||{};function i(s,...o){let r=i.invalid;const a=i.handlers;if(s&&TE.call(s,t)){const l=String(s[t]);r=TE.call(a,l)?a[l]:i.unknown}if(r)return r.call(this,s,...o)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}const M4e={}.hasOwnProperty;function NN(t,e){let n=-1,i;if(e.extensions)for(;++n<e.extensions.length;)NN(t,e.extensions[n]);for(i in e)if(M4e.call(e,i))switch(i){case"extensions":break;case"unsafe":{PE(t[i],e[i]);break}case"join":{PE(t[i],e[i]);break}case"handlers":{T4e(t[i],e[i]);break}default:t.options[i]=e[i]}return t}function PE(t,e){e&&t.push(...e)}function T4e(t,e){e&&Object.assign(t,e)}function P4e(t,e,n,i){const s=n.enter("blockquote"),o=n.createTracker(i);o.move("> "),o.shift(2);const r=n.indentLines(n.containerFlow(t,o.current()),I4e);return s(),r}function I4e(t,e,n){return">"+(n?"":" ")+t}function BN(t,e){return IE(t,e.inConstruct,!0)&&!IE(t,e.notInConstruct,!1)}function IE(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let i=-1;for(;++i<e.length;)if(t.includes(e[i]))return!0;return!1}function LE(t,e,n,i){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
87 +`&&BN(n.stack,n.unsafe[s]))return/[ \t]/.test(i.before)?"":" ";return`\\
88 +`}function L4e(t,e){const n=String(t);let i=n.indexOf(e),s=i,o=0,r=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===s?++o>r&&(r=o):o=1,s=i+e.length,i=n.indexOf(e,s);return r}function GC(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function O4e(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function D4e(t,e,n,i){const s=O4e(n),o=t.value||"",r=s==="`"?"GraveAccent":"Tilde";if(GC(t,n)){const d=n.enter("codeIndented"),h=n.indentLines(o,R4e);return d(),h}const a=n.createTracker(i),l=s.repeat(Math.max(L4e(o,s)+1,3)),c=n.enter("codeFenced");let u=a.move(l);if(t.lang){const d=n.enter(`codeFencedLang${r}`);u+=a.move(n.safe(t.lang,{before:u,after:" ",encode:["`"],...a.current()})),d()}if(t.lang&&t.meta){const d=n.enter(`codeFencedMeta${r}`);u+=a.move(" "),u+=a.move(n.safe(t.meta,{before:u,after:`
89 +`,encode:["`"],...a.current()})),d()}return u+=a.move(`
90 +`),o&&(u+=a.move(o+`
91 +`)),u+=a.move(l),c(),u}function R4e(t,e,n){return(n?"":" ")+t}function K8(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function V4e(t,e,n,i){const s=K8(n),o=s==='"'?"Quote":"Apostrophe",r=n.enter("definition");let a=n.enter("label");const l=n.createTracker(i);let c=l.move("[");return c+=l.move(n.safe(n.associationId(t),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(t.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(t.url,{before:c,after:t.title?" ":`
92 +`,...l.current()}))),a(),t.title&&(a=n.enter(`title${o}`),c+=l.move(" "+s),c+=l.move(n.safe(t.title,{before:c,after:s,...l.current()})),c+=l.move(s),a()),r(),c}function F4e(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}zN.peek=N4e;function zN(t,e,n,i){const s=F4e(n),o=n.enter("emphasis"),r=n.createTracker(i);let a=r.move(s);return a+=r.move(n.containerPhrasing(t,{before:a,after:s,...r.current()})),a+=r.move(s),o(),a}function N4e(t,e,n){return n.options.emphasis||"*"}const y2=function(t){if(t==null)return U4e;if(typeof t=="function")return b2(t);if(typeof t=="object")return Array.isArray(t)?B4e(t):z4e(t);if(typeof t=="string")return H4e(t);throw new Error("Expected function, string, or object as test")};function B4e(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=y2(t[n]);return b2(i);function i(...s){let o=-1;for(;++o<e.length;)if(e[o].apply(this,s))return!0;return!1}}function z4e(t){const e=t;return b2(n);function n(i){const s=i;let o;for(o in t)if(s[o]!==e[o])return!1;return!0}}function H4e(t){return b2(e);function e(n){return n&&n.type===t}}function b2(t){return e;function e(n,i,s){return!!(j4e(n)&&t.call(this,n,typeof i=="number"?i:void 0,s||void 0))}}function U4e(){return!0}function j4e(t){return t!==null&&typeof t=="object"&&"type"in t}const HN=[],W4e=!0,XC=!1,KC="skip";function UN(t,e,n,i){let s;typeof e=="function"&&typeof n!="function"?(i=n,n=e):s=e;const o=y2(s),r=i?-1:1;a(t,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=HN,p,m,b;if((!e||o(l,c,u[u.length-1]||void 0))&&(f=Y4e(n(l,u)),f[0]===XC))return f;if("children"in l&&l.children){const w=l;if(w.children&&f[0]!==KC)for(m=(i?w.children.length:-1)+r,b=u.concat(w);m>-1&&m<w.children.length;){const k=w.children[m];if(p=a(k,m,b)(),p[0]===XC)return p;m=typeof p[1]=="number"?p[1]:m+r}}return f}}}function Y4e(t){return Array.isArray(t)?t:typeof t=="number"?[W4e,t]:t==null?HN:[t]}function qd(t,e,n,i){let s,o,r;typeof e=="function"&&typeof n!="function"?(o=void 0,r=e,s=n):(o=e,r=n,s=i),UN(t,o,a,s);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return r(l,d,u)}}function jN(t,e){let n=!1;return qd(t,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,XC}),!!((!t.depth||t.depth<3)&&q8(t)&&(e.options.setext||n))}function q4e(t,e,n,i){const s=Math.max(Math.min(6,t.depth||1),1),o=n.createTracker(i);if(jN(t,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(t,{...o.current(),before:`
88 93 `,after:`
89 -`});return d(),c(),f+`
90 -`+(r===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
91 -`))+1))}const i="#".repeat(r),l=n.enter("headingAtx"),a=n.enter("phrasing");s.move(i+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
92 -`,...s.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?i+" "+u:i,n.options.closeAtx&&(u+=" "+i),a(),l(),u}WI.peek=obe;function WI(e){return e.value||""}function obe(){return"<"}KI.peek=rbe;function KI(e,t,n,o){const r=tC(n),s=r==='"'?"Quote":"Apostrophe",i=n.enter("image");let l=n.enter("label");const a=n.createTracker(o);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${s}`),u+=a.move(" "+r),u+=a.move(n.safe(e.title,{before:u,after:r,...a.current()})),u+=a.move(r),l()),u+=a.move(")"),i(),u}function rbe(){return"!"}qI.peek=sbe;function qI(e,t,n,o){const r=e.referenceType,s=n.enter("imageReference");let i=n.enter("label");const l=n.createTracker(o);let a=l.move("![");const u=n.safe(e.alt,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),i();const c=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return i(),n.stack=c,s(),r==="full"||!u||u!==d?a+=l.move(d+"]"):r==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function sbe(){return"!"}GI.peek=ibe;function GI(e,t,n){let o=e.value||"",r="`",s=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(o);)r+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++s<n.unsafe.length;){const i=n.unsafe[s],l=n.compilePattern(i);let a;if(i.atBreak)for(;a=l.exec(o);){let u=a.index;o.charCodeAt(u)===10&&o.charCodeAt(u-1)===13&&u--,o=o.slice(0,u)+" "+o.slice(a.index+1)}}return r+o+r}function ibe(){return"`"}function YI(e,t){const n=X3(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))}ZI.peek=lbe;function ZI(e,t,n,o){const r=tC(n),s=r==='"'?"Quote":"Apostrophe",i=n.createTracker(o);let l,a;if(YI(e,n)){const c=n.stack;n.stack=[],l=n.enter("autolink");let d=i.move("<");return d+=i.move(n.containerPhrasing(e,{before:d,after:">",...i.current()})),d+=i.move(">"),l(),n.stack=c,d}l=n.enter("link"),a=n.enter("label");let u=i.move("[");return u+=i.move(n.containerPhrasing(e,{before:u,after:"](",...i.current()})),u+=i.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=i.move("<"),u+=i.move(n.safe(e.url,{before:u,after:">",...i.current()})),u+=i.move(">")):(a=n.enter("destinationRaw"),u+=i.move(n.safe(e.url,{before:u,after:e.title?" ":")",...i.current()}))),a(),e.title&&(a=n.enter(`title${s}`),u+=i.move(" "+r),u+=i.move(n.safe(e.title,{before:u,after:r,...i.current()})),u+=i.move(r),a()),u+=i.move(")"),l(),u}function lbe(e,t,n){return YI(e,n)?"<":"["}JI.peek=abe;function JI(e,t,n,o){const r=e.referenceType,s=n.enter("linkReference");let i=n.enter("label");const l=n.createTracker(o);let a=l.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),i();const c=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return i(),n.stack=c,s(),r==="full"||!u||u!==d?a+=l.move(d+"]"):r==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function abe(){return"["}function nC(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 ube(e){const t=nC(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 cbe(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 XI(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 dbe(e,t,n,o){const r=n.enter("list"),s=n.bulletCurrent;let i=e.ordered?cbe(n):nC(n);const l=e.ordered?i==="."?")":".":ube(n);let a=t&&n.bulletLastUsed?i===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((i==="*"||i==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(a=!0),XI(n)===i&&c){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(i=l),n.bulletCurrent=i;const u=n.containerFlow(e,o);return n.bulletLastUsed=i,n.bulletCurrent=s,r(),u}function fbe(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 pbe(e,t,n,o){const r=fbe(n);let s=n.bulletCurrent||nC(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let i=s.length+1;(r==="tab"||r==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(i=Math.ceil(i/4)*4);const l=n.createTracker(o);l.move(s+" ".repeat(i-s.length)),l.shift(i);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),c);return a(),u;function c(d,f,p){return f?(p?"":" ".repeat(i))+d:(p?s:s+" ".repeat(i-s.length))+d}}function hbe(e,t,n,o){const r=n.enter("paragraph"),s=n.enter("phrasing"),i=n.containerPhrasing(e,o);return s(),r(),i}const mbe=nv(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function gbe(e,t,n,o){return(e.children.some(function(i){return mbe(i)})?n.containerPhrasing:n.containerFlow).call(n,e,o)}function vbe(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}QI.peek=ybe;function QI(e,t,n,o){const r=vbe(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 ybe(e,t,n){return n.options.strong||"*"}function _be(e,t,n,o){return n.safe(e.value,o)}function bbe(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 wbe(e,t,n){const o=(XI(n)+(n.options.ruleSpaces?" ":"")).repeat(bbe(n));return n.options.ruleSpaces?o.slice(0,-1):o}const oC={blockquote:B_e,break:CS,code:U_e,definition:K_e,emphasis:zI,hardBreak:CS,heading:nbe,html:WI,image:KI,imageReference:qI,inlineCode:GI,link:ZI,linkReference:JI,list:dbe,listItem:pbe,paragraph:hbe,root:gbe,strong:QI,text:_be,thematicBreak:wbe},Cbe=[kbe];function kbe(e,t,n,o){if(t.type==="code"&&Bb(t,o)&&(e.type==="list"||e.type===t.type&&Bb(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"&&UI(t,o))?void 0:n.spread?1:0}const fa=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],Sbe=[{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:fa},{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:fa},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
95 -*])`},{character:"*",inConstruct:"phrasing",notInConstruct:fa},{atBreak:!0,character:"+",after:`(?:[ \r
94 +`});return d(),u(),h+`
95 +`+(s===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
96 +`))+1))}const r="#".repeat(s),a=n.enter("headingAtx"),l=n.enter("phrasing");o.move(r+" ");let c=n.containerPhrasing(t,{before:"# ",after:`
97 +`,...o.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?r+" "+c:r,n.options.closeAtx&&(c+=" "+r),l(),a(),c}WN.peek=G4e;function WN(t){return t.value||""}function G4e(){return"<"}YN.peek=X4e;function YN(t,e,n,i){const s=K8(n),o=s==='"'?"Quote":"Apostrophe",r=n.enter("image");let a=n.enter("label");const l=n.createTracker(i);let c=l.move("![");return c+=l.move(n.safe(t.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(t.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(t.url,{before:c,after:t.title?" ":")",...l.current()}))),a(),t.title&&(a=n.enter(`title${o}`),c+=l.move(" "+s),c+=l.move(n.safe(t.title,{before:c,after:s,...l.current()})),c+=l.move(s),a()),c+=l.move(")"),r(),c}function X4e(){return"!"}qN.peek=K4e;function qN(t,e,n,i){const s=t.referenceType,o=n.enter("imageReference");let r=n.enter("label");const a=n.createTracker(i);let l=a.move("![");const c=n.safe(t.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),r();const u=n.stack;n.stack=[],r=n.enter("reference");const d=n.safe(n.associationId(t),{before:l,after:"]",...a.current()});return r(),n.stack=u,o(),s==="full"||!c||c!==d?l+=a.move(d+"]"):s==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function K4e(){return"!"}GN.peek=Z4e;function GN(t,e,n){let i=t.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(i);)s+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++o<n.unsafe.length;){const r=n.unsafe[o],a=n.compilePattern(r);let l;if(r.atBreak)for(;l=a.exec(i);){let c=l.index;i.charCodeAt(c)===10&&i.charCodeAt(c-1)===13&&c--,i=i.slice(0,c)+" "+i.slice(l.index+1)}}return s+i+s}function Z4e(){return"`"}function XN(t,e){const n=q8(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}KN.peek=J4e;function KN(t,e,n,i){const s=K8(n),o=s==='"'?"Quote":"Apostrophe",r=n.createTracker(i);let a,l;if(XN(t,n)){const u=n.stack;n.stack=[],a=n.enter("autolink");let d=r.move("<");return d+=r.move(n.containerPhrasing(t,{before:d,after:">",...r.current()})),d+=r.move(">"),a(),n.stack=u,d}a=n.enter("link"),l=n.enter("label");let c=r.move("[");return c+=r.move(n.containerPhrasing(t,{before:c,after:"](",...r.current()})),c+=r.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=n.enter("destinationLiteral"),c+=r.move("<"),c+=r.move(n.safe(t.url,{before:c,after:">",...r.current()})),c+=r.move(">")):(l=n.enter("destinationRaw"),c+=r.move(n.safe(t.url,{before:c,after:t.title?" ":")",...r.current()}))),l(),t.title&&(l=n.enter(`title${o}`),c+=r.move(" "+s),c+=r.move(n.safe(t.title,{before:c,after:s,...r.current()})),c+=r.move(s),l()),c+=r.move(")"),a(),c}function J4e(t,e,n){return XN(t,n)?"<":"["}ZN.peek=Q4e;function ZN(t,e,n,i){const s=t.referenceType,o=n.enter("linkReference");let r=n.enter("label");const a=n.createTracker(i);let l=a.move("[");const c=n.containerPhrasing(t,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),r();const u=n.stack;n.stack=[],r=n.enter("reference");const d=n.safe(n.associationId(t),{before:l,after:"]",...a.current()});return r(),n.stack=u,o(),s==="full"||!c||c!==d?l+=a.move(d+"]"):s==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function Q4e(){return"["}function Z8(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function e8e(t){const e=Z8(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function t8e(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function JN(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function n8e(t,e,n,i){const s=n.enter("list"),o=n.bulletCurrent;let r=t.ordered?t8e(n):Z8(n);const a=t.ordered?r==="."?")":".":e8e(n);let l=e&&n.bulletLastUsed?r===n.bulletLastUsed:!1;if(!t.ordered){const u=t.children?t.children[0]:void 0;if((r==="*"||r==="-")&&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&&(l=!0),JN(n)===r&&u){let d=-1;for(;++d<t.children.length;){const h=t.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(r=a),n.bulletCurrent=r;const c=n.containerFlow(t,i);return n.bulletLastUsed=r,n.bulletCurrent=o,s(),c}function s8e(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function i8e(t,e,n,i){const s=s8e(n);let o=n.bulletCurrent||Z8(n);e&&e.type==="list"&&e.ordered&&(o=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+o);let r=o.length+1;(s==="tab"||s==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(r=Math.ceil(r/4)*4);const a=n.createTracker(i);a.move(o+" ".repeat(r-o.length)),a.shift(r);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(t,a.current()),u);return l(),c;function u(d,h,f){return h?(f?"":" ".repeat(r))+d:(f?o:o+" ".repeat(r-o.length))+d}}function o8e(t,e,n,i){const s=n.enter("paragraph"),o=n.enter("phrasing"),r=n.containerPhrasing(t,i);return o(),s(),r}const r8e=y2(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function a8e(t,e,n,i){return(t.children.some(function(r){return r8e(r)})?n.containerPhrasing:n.containerFlow).call(n,t,i)}function l8e(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}QN.peek=c8e;function QN(t,e,n,i){const s=l8e(n),o=n.enter("strong"),r=n.createTracker(i);let a=r.move(s+s);return a+=r.move(n.containerPhrasing(t,{before:a,after:s,...r.current()})),a+=r.move(s+s),o(),a}function c8e(t,e,n){return n.options.strong||"*"}function u8e(t,e,n,i){return n.safe(t.value,i)}function d8e(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function h8e(t,e,n){const i=(JN(n)+(n.options.ruleSpaces?" ":"")).repeat(d8e(n));return n.options.ruleSpaces?i.slice(0,-1):i}const J8={blockquote:P4e,break:LE,code:D4e,definition:V4e,emphasis:zN,hardBreak:LE,heading:q4e,html:WN,image:YN,imageReference:qN,inlineCode:GN,link:KN,linkReference:ZN,list:n8e,listItem:i8e,paragraph:o8e,root:a8e,strong:QN,text:u8e,thematicBreak:h8e},f8e=[p8e];function p8e(t,e,n,i){if(e.type==="code"&&GC(e,i)&&(t.type==="list"||t.type===e.type&&GC(t,i)))return!1;if("spread"in n&&typeof n.spread=="boolean")return t.type==="paragraph"&&(t.type===e.type||e.type==="definition"||e.type==="heading"&&jN(e,i))?void 0:n.spread?1:0}const vu=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],m8e=[{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:`
98 +`,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:vu},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
99 +]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:vu},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
100 +*])`},{character:"*",inConstruct:"phrasing",notInConstruct:vu},{atBreak:!0,character:"+",after:`(?:[ \r
96 101 ])`},{atBreak:!0,character:"-",after:`(?:[ \r
97 102 -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
98 -]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:fa},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:fa},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:fa},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:fa},{atBreak:!0,character:"~"}];function $be(e){return e.label||!e.identifier?e.label||"":RI(e.identifier)}function Ebe(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 xbe(e,t,n){const o=t.indexStack,r=e.children||[],s=[];let i=-1,l=n.before;o.push(-1);let a=t.createTracker(n);for(;++i<r.length;){const u=r[i];let c;if(o[o.length-1]=i,i+1<r.length){let d=t.handle.handlers[r[i+1].type];d&&d.peek&&(d=d.peek),c=d?d(r[i+1],e,t,{before:"",after:"",...a.current()}).charAt(0):""}else c=n.after;s.length>0&&(l==="\r"||l===`
99 -`)&&u.type==="html"&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),l=" ",a=t.createTracker(n),a.move(s.join(""))),s.push(a.move(t.handle(u,e,t,{...a.current(),before:l,after:c}))),l=s[s.length-1].slice(-1)}return o.pop(),s.join("")}function Mbe(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:`
103 +]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:vu},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:vu},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:vu},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:vu},{atBreak:!0,character:"~"}];function g8e(t){return t.label||!t.identifier?t.label||"":RN(t.identifier)}function v8e(t){if(!t._compiled){const e=(t.atBreak?"[\\r\\n][\\t ]*":"")+(t.before?"(?:"+t.before+")":"");t._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(t.character)?"\\":"")+t.character+(t.after?"(?:"+t.after+")":""),"g")}return t._compiled}function _8e(t,e,n){const i=e.indexStack,s=t.children||[],o=[];let r=-1,a=n.before;i.push(-1);let l=e.createTracker(n);for(;++r<s.length;){const c=s[r];let u;if(i[i.length-1]=r,r+1<s.length){let d=e.handle.handlers[s[r+1].type];d&&d.peek&&(d=d.peek),u=d?d(s[r+1],t,e,{before:"",after:"",...l.current()}).charAt(0):""}else u=n.after;o.length>0&&(a==="\r"||a===`
104 +`)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=e.createTracker(n),l.move(o.join(""))),o.push(l.move(e.handle(c,t,e,{...l.current(),before:a,after:u}))),a=o[o.length-1].slice(-1)}return i.pop(),o.join("")}function y8e(t,e,n){const i=e.indexStack,s=t.children||[],o=e.createTracker(n),r=[];let a=-1;for(i.push(-1);++a<s.length;){const l=s[a];i[i.length-1]=a,r.push(o.move(e.handle(l,t,e,{before:`
100 105 `,after:`
101 -`,...s.current()}))),a.type!=="list"&&(t.bulletLastUsed=void 0),l<r.length-1&&i.push(s.move(Tbe(a,r[l+1],e,t)))}return o.pop(),i.join("")}function Tbe(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`
106 +`,...o.current()}))),l.type!=="list"&&(e.bulletLastUsed=void 0),a<s.length-1&&r.push(o.move(b8e(l,s[a+1],t,e)))}return i.pop(),r.join("")}function b8e(t,e,n,i){let s=i.join.length;for(;s--;){const o=i.join[s](t,e,n,i);if(o===!0||o===1)break;if(typeof o=="number")return`
107 +`.repeat(1+o);if(o===!1)return`
103 108
104 109 <!---->
105 110
106 111 `}return`
107 112
108 -`}const Obe=/\r?\n|\r/g;function Ibe(e,t){const n=[];let o=0,r=0,s;for(;s=Obe.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 Abe(e,t,n){const o=(n.before||"")+(t||"")+(n.after||""),r=[],s=[],i={};let l=-1;for(;++l<e.unsafe.length;){const c=e.unsafe[l];if(!BI(e.stack,c))continue;const d=e.compilePattern(c);let f;for(;f=d.exec(o);){const p="before"in c||!!c.atBreak,h="after"in c,m=f.index+(p?f[1].length:0);r.includes(m)?(i[m].before&&!p&&(i[m].before=!1),i[m].after&&!h&&(i[m].after=!1)):(r.push(m),i[m]={before:p,after:h})}}r.sort(Nbe);let a=n.before?n.before.length:0;const u=o.length-(n.after?n.after.length:0);for(l=-1;++l<r.length;){const c=r[l];c<a||c>=u||c+1<u&&r[l+1]===c+1&&i[c].after&&!i[c+1].before&&!i[c+1].after||r[l-1]===c-1&&i[c].before&&!i[c-1].before&&!i[c-1].after||(a!==c&&s.push(kS(o.slice(a,c),"\\")),a=c,/[!-/:-@[-`{-~]/.test(o.charAt(c))&&(!n.encode||!n.encode.includes(o.charAt(c)))?s.push("\\"):(s.push("&#x"+o.charCodeAt(c).toString(16).toUpperCase()+";"),a++))}return s.push(kS(o.slice(a,u),n.after)),s.join("")}function Nbe(e,t){return e-t}function kS(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 Pbe(e){const t=e||{},n=t.now||{};let o=t.lineShift||0,r=n.line||1,s=n.column||1;return{move:a,current:i,shift:l};function i(){return{now:{line:r,column:s},lineShift:o}}function l(u){o+=u}function a(u){const c=u||"",d=c.split(/\r?\n|\r/g),f=d[d.length-1];return r+=d.length-1,s=d.length===1?s+f.length:1+f.length+o,c}}function Lbe(e,t={}){const n={enter:r,indentLines:Ibe,associationId:$be,containerPhrasing:Vbe,containerFlow:Bbe,createTracker:Pbe,compilePattern:Ebe,safe:zbe,stack:[],unsafe:[...Sbe],join:[...Cbe],handlers:{...oC},options:{},indexStack:[],handle:void 0};VI(n,t),n.options.tightDefinitions&&n.join.push(Fbe),n.handle=D_e("type",{invalid:Rbe,unknown:Dbe,handlers:n.handlers});let o=n.handle(e,void 0,n,{before:`
113 +`}const w8e=/\r?\n|\r/g;function k8e(t,e){const n=[];let i=0,s=0,o;for(;o=w8e.exec(t);)r(t.slice(i,o.index)),n.push(o[0]),i=o.index+o[0].length,s++;return r(t.slice(i)),n.join("");function r(a){n.push(e(a,s,!a))}}function C8e(t,e,n){const i=(n.before||"")+(e||"")+(n.after||""),s=[],o=[],r={};let a=-1;for(;++a<t.unsafe.length;){const u=t.unsafe[a];if(!BN(t.stack,u))continue;const d=t.compilePattern(u);let h;for(;h=d.exec(i);){const f="before"in u||!!u.atBreak,p="after"in u,m=h.index+(f?h[1].length:0);s.includes(m)?(r[m].before&&!f&&(r[m].before=!1),r[m].after&&!p&&(r[m].after=!1)):(s.push(m),r[m]={before:f,after:p})}}s.sort(x8e);let l=n.before?n.before.length:0;const c=i.length-(n.after?n.after.length:0);for(a=-1;++a<s.length;){const u=s[a];u<l||u>=c||u+1<c&&s[a+1]===u+1&&r[u].after&&!r[u+1].before&&!r[u+1].after||s[a-1]===u-1&&r[u].before&&!r[u-1].before&&!r[u-1].after||(l!==u&&o.push(OE(i.slice(l,u),"\\")),l=u,/[!-/:-@[-`{-~]/.test(i.charAt(u))&&(!n.encode||!n.encode.includes(i.charAt(u)))?o.push("\\"):(o.push("&#x"+i.charCodeAt(u).toString(16).toUpperCase()+";"),l++))}return o.push(OE(i.slice(l,c),n.after)),o.join("")}function x8e(t,e){return t-e}function OE(t,e){const n=/\\(?=[!-/:-@[-`{-~])/g,i=[],s=[],o=t+e;let r=-1,a=0,l;for(;l=n.exec(o);)i.push(l.index);for(;++r<i.length;)a!==i[r]&&s.push(t.slice(a,i[r])),s.push("\\"),a=i[r];return s.push(t.slice(a)),s.join("")}function S8e(t){const e=t||{},n=e.now||{};let i=e.lineShift||0,s=n.line||1,o=n.column||1;return{move:l,current:r,shift:a};function r(){return{now:{line:s,column:o},lineShift:i}}function a(c){i+=c}function l(c){const u=c||"",d=u.split(/\r?\n|\r/g),h=d[d.length-1];return s+=d.length-1,o=d.length===1?o+h.length:1+h.length+i,u}}function $8e(t,e={}){const n={enter:s,indentLines:k8e,associationId:g8e,containerPhrasing:T8e,containerFlow:P8e,createTracker:S8e,compilePattern:v8e,safe:I8e,stack:[],unsafe:[...m8e],join:[...f8e],handlers:{...J8},options:{},indexStack:[],handle:void 0};NN(n,e),n.options.tightDefinitions&&n.join.push(M8e),n.handle=E4e("type",{invalid:A8e,unknown:E8e,handlers:n.handlers});let i=n.handle(t,void 0,n,{before:`
109 114 `,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 Rbe(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function Dbe(e){const t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function Fbe(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function Vbe(e,t){return xbe(e,this,t)}function Bbe(e,t){return Mbe(e,this,t)}function zbe(e,t){return Abe(this,e,t)}function Hb(e){const t=this;t.compiler=n;function n(o){return Lbe(o,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}function SS(e){if(e)throw e}var h1=Object.prototype.hasOwnProperty,eA=Object.prototype.toString,$S=Object.defineProperty,ES=Object.getOwnPropertyDescriptor,xS=function(t){return typeof Array.isArray=="function"?Array.isArray(t):eA.call(t)==="[object Array]"},MS=function(t){if(!t||eA.call(t)!=="[object Object]")return!1;var n=h1.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&h1.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!o)return!1;var r;for(r in t);return typeof r>"u"||h1.call(t,r)},TS=function(t,n){$S&&n.name==="__proto__"?$S(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},OS=function(t,n){if(n==="__proto__")if(h1.call(t,n)){if(ES)return ES(t,n).value}else return;return t[n]},jbe=function e(){var t,n,o,r,s,i,l=arguments[0],a=1,u=arguments.length,c=!1;for(typeof l=="boolean"&&(c=l,l=arguments[1]||{},a=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});a<u;++a)if(t=arguments[a],t!=null)for(n in t)o=OS(l,n),r=OS(t,n),l!==r&&(c&&r&&(MS(r)||(s=xS(r)))?(s?(s=!1,i=o&&xS(o)?o:[]):i=o&&MS(o)?o:{},TS(l,{name:n,newValue:e(c,i,r)})):typeof r<"u"&&TS(l,{name:n,newValue:r}));return l};const _y=_o(jbe);function Ub(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 Hbe(){const e=[],t={run:n,use:o};return t;function n(...r){let s=-1;const i=r.pop();if(typeof i!="function")throw new TypeError("Expected function as last argument, not "+i);l(null,...r);function l(a,...u){const c=e[++s];let d=-1;if(a){i(a);return}for(;++d<r.length;)(u[d]===null||u[d]===void 0)&&(u[d]=r[d]);r=u,c?Ube(c,l)(...u):i(null,...u)}}function o(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}}function Ube(e,t){let n;return o;function o(...i){const l=e.length>i.length;let a;l&&i.push(r);try{a=e.apply(this,i)}catch(u){const c=u;if(l&&n)throw c;return r(c)}l||(a&&a.then&&typeof a.then=="function"?a.then(s,r):a instanceof Error?r(a):s(a))}function r(i,...l){n||(n=!0,t(i,...l))}function s(i){r(null,i)}}class Qo extends Error{constructor(t,n,o){super(),typeof n=="string"&&(o=n,n=void 0);let r="",s={},i=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?r=t:!s.cause&&t&&(i=!0,r=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof o=="string"){const a=o.indexOf(":");a===-1?s.ruleId=o:(s.source=o.slice(0,a),s.ruleId=o.slice(a+1))}if(!s.place&&s.ancestors&&s.ancestors){const a=s.ancestors[s.ancestors.length-1];a&&(s.place=a.position)}const l=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=l?l.line:void 0,this.name=ep(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=i&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual,this.expected,this.note,this.url}}Qo.prototype.file="";Qo.prototype.name="";Qo.prototype.reason="";Qo.prototype.message="";Qo.prototype.stack="";Qo.prototype.column=void 0;Qo.prototype.line=void 0;Qo.prototype.ancestors=void 0;Qo.prototype.cause=void 0;Qo.prototype.fatal=void 0;Qo.prototype.place=void 0;Qo.prototype.ruleId=void 0;Qo.prototype.source=void 0;const Ls={basename:Wbe,dirname:Kbe,extname:qbe,join:Gbe,sep:"/"};function Wbe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Eh(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 Kbe(e){if(Eh(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 qbe(e){Eh(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 Gbe(...e){let t=-1,n;for(;++t<e.length;)Eh(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Ybe(n)}function Ybe(e){Eh(e);const t=e.codePointAt(0)===47;let n=Zbe(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Zbe(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 Eh(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Jbe={cwd:Xbe};function Xbe(){return"/"}function Wb(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Qbe(e){if(typeof e=="string")e=new URL(e);else if(!Wb(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 e2e(e)}function e2e(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 by=["history","path","basename","stem","extname","dirname"];class t2e{constructor(t){let n;t?Wb(t)?n={path:t}:typeof t=="string"||n2e(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Jbe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<by.length;){const s=by[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)by.includes(r)||(this[r]=n[r])}get basename(){return typeof this.path=="string"?Ls.basename(this.path):void 0}set basename(t){Cy(t,"basename"),wy(t,"basename"),this.path=Ls.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ls.dirname(this.path):void 0}set dirname(t){IS(this.basename,"dirname"),this.path=Ls.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ls.extname(this.path):void 0}set extname(t){if(wy(t,"extname"),IS(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=Ls.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Wb(t)&&(t=Qbe(t)),Cy(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ls.basename(this.path,this.extname):void 0}set stem(t){Cy(t,"stem"),wy(t,"stem"),this.path=Ls.join(this.dirname||"",t+(this.extname||""))}fail(t,n,o){const r=this.message(t,n,o);throw r.fatal=!0,r}info(t,n,o){const r=this.message(t,n,o);return r.fatal=void 0,r}message(t,n,o){const r=new Qo(t,n,o);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function wy(e,t){if(e&&e.includes(Ls.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ls.sep+"`")}function Cy(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function IS(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function n2e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const o2e=function(e){const o=this.constructor.prototype,r=o[e],s=function(){return r.apply(s,arguments)};return Object.setPrototypeOf(s,o),s},r2e={}.hasOwnProperty;class rC extends o2e{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=Hbe()}copy(){const t=new rC;let n=-1;for(;++n<this.attachers.length;){const o=this.attachers[n];t.use(...o)}return t.data(_y(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?($y("data",this.frozen),this.namespace[t]=n,this):r2e.call(this.namespace,t)&&this.namespace[t]||void 0:t?($y("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=Cm(t),o=this.parser||this.Parser;return ky("parse",o),o(String(n),n)}process(t,n){const o=this;return this.freeze(),ky("process",this.parser||this.Parser),Sy("process",this.compiler||this.Compiler),n?r(void 0,n):new Promise(r);function r(s,i){const l=Cm(t),a=o.parse(l);o.run(a,l,function(c,d,f){if(c||!d||!f)return u(c);const p=d,h=o.stringify(p,f);i2e(h)?f.value=h:f.result=h,u(c,f)});function u(c,d){c||!d?i(c):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,o;return this.freeze(),ky("processSync",this.parser||this.Parser),Sy("processSync",this.compiler||this.Compiler),this.process(t,r),NS("processSync","process",n),o;function r(s,i){n=!0,SS(s),o=i}}run(t,n,o){AS(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=Cm(n);r.run(t,a,u);function u(c,d,f){const p=d||t;c?l(c):i?i(p):o(void 0,p,f)}}}runSync(t,n){let o=!1,r;return this.run(t,n,s),NS("runSync","run",o),r;function s(i,l){SS(i),r=l,o=!0}}stringify(t,n){this.freeze();const o=Cm(n),r=this.compiler||this.Compiler;return Sy("stringify",r),AS(t),r(t,o)}use(t,...n){const o=this.attachers,r=this.namespace;if($y("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):i(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")a(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...d]=u;a(c,d)}else i(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function i(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(r.settings=_y(!0,r.settings,u.settings))}function l(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const d=u[c];s(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function a(u,c){let d=-1,f=-1;for(;++d<o.length;)if(o[d][0]===u){f=d;break}if(f===-1)o.push([u,...c]);else if(c.length>0){let[p,...h]=c;const m=o[f][1];Ub(m)&&Ub(p)&&(p=_y(!0,m,p)),o[f]=[u,p,...h]}}}}const Kb=new rC().freeze();function ky(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Sy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function $y(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 AS(e){if(!Ub(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function NS(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Cm(e){return s2e(e)?e:new t2e(e)}function s2e(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function i2e(e){return typeof e=="string"||l2e(e)}function l2e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var tA=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},It=(e,t,n)=>(tA(e,t,"read from private field"),n?n.call(e):t.get(e)),An=(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)=>(tA(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);let nA=class{},oA=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 tI();return t}}},a2e=class rA extends nA{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 rA(t,n,o)}};var Is,lf,m1,g1,v1,af,uf;const qb=class extends oA{constructor(t){super(),An(this,Is,void 0),An(this,lf,void 0),An(this,m1,void 0),An(this,g1,void 0),An(this,v1,void 0),An(this,af,void 0),An(this,uf,void 0),fn(this,Is,Yt.none),fn(this,lf,n=>n.isText),fn(this,m1,(n,o)=>{if(It(this,lf).call(this,n)&&It(this,lf).call(this,o)&&Yt.sameSet(n.marks,o.marks))return this.schema.text(n.text+o.text,n.marks)}),fn(this,g1,n=>{const o=Object.values({...this.schema.nodes,...this.schema.marks}).find(r=>r.spec.parseMarkdown.match(n));if(!o)throw eve(n);return o}),fn(this,v1,n=>{const o=It(this,g1).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(a2e.create(n,[],o)),this),fn(this,af,()=>{fn(this,Is,Yt.none);const n=this.close();return It(this,uf).call(this,n.type,n.attrs,n.content)}),this.closeNode=()=>(It(this,af).call(this),this),fn(this,uf,(n,o,r)=>{const s=n.createAndFill(o,r,It(this,Is));if(!s)throw Q0e(n,o,r);return this.push(s),s}),this.addNode=(n,o,r)=>(It(this,uf).call(this,n,o,r),this),this.openMark=(n,o)=>{const r=n.create(o);return fn(this,Is,r.addToSet(It(this,Is))),this},this.closeMark=n=>(fn(this,Is,n.removeFromSet(It(this,Is))),this),this.addText=n=>{const o=this.top();if(!o)throw tI();const r=o.pop(),s=this.schema.text(n,It(this,Is));if(!r)return o.push(s),this;const i=It(this,m1).call(this,r,s);return i?(o.push(i),this):(o.push(r,s),this)},this.build=()=>{let n;do n=It(this,af).call(this);while(this.size());return n},this.next=(n=[])=>([n].flat().forEach(o=>It(this,v1).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}};Is=new WeakMap,lf=new WeakMap,m1=new WeakMap,g1=new WeakMap,v1=new WeakMap,af=new WeakMap,uf=new WeakMap,qb.create=(e,t)=>{const n=new qb(e);return o=>(n.run(t,o),n.toDoc())};let u2e=qb;const Gb=class extends nA{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()}}};Gb.create=(e,t,n,o={})=>new Gb(e,t,n,o);let PS=Gb;const c2e=e=>Object.prototype.hasOwnProperty.call(e,"size");var hi,cf,y1,_1,df,b1,ff,w1,C1,Xu,wa,k1,pf;const Yb=class extends oA{constructor(t){super(),An(this,hi,void 0),An(this,cf,void 0),An(this,y1,void 0),An(this,_1,void 0),An(this,df,void 0),An(this,b1,void 0),An(this,ff,void 0),An(this,w1,void 0),An(this,C1,void 0),An(this,Xu,void 0),An(this,wa,void 0),An(this,k1,void 0),An(this,pf,void 0),fn(this,hi,Yt.none),fn(this,cf,n=>{const o=Object.values({...this.schema.nodes,...this.schema.marks}).find(r=>r.spec.toMarkdown.match(n));if(!o)throw tve(n.type);return o}),fn(this,y1,n=>It(this,cf).call(this,n).spec.toMarkdown.runner(this,n)),fn(this,_1,(n,o)=>It(this,cf).call(this,n).spec.toMarkdown.runner(this,n,o)),fn(this,df,n=>{const{marks:o}=n,r=s=>s.type.spec.priority??50;[...o].sort((s,i)=>r(s)-r(i)).every(s=>!It(this,_1).call(this,s,n))&&It(this,y1).call(this,n),o.forEach(s=>It(this,pf).call(this,s))}),fn(this,b1,(n,o)=>{var r;if(n.type===o||((r=n.children)==null?void 0:r.length)!==1)return n;const s=u=>{var c;if(u.type===o)return u;if(((c=u.children)==null?void 0:c.length)!==1)return null;const[d]=u.children;return d?s(d):null},i=s(n);if(!i)return n;const l=i.children?[...i.children]:void 0,a={...n,children:l};return a.children=l,i.children=[a],i}),fn(this,ff,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=It(this,b1).call(this,s,l.type);const{children:a,...u}=s,{children:c,...d}=l;if(s.type===l.type&&a&&c&&JSON.stringify(u)===JSON.stringify(d)){const f={...d,children:[...c,...a]};return r.slice(0,-1).concat(It(this,ff).call(this,f))}}return r.concat(s)},[])),n}),fn(this,w1,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(PS.create(n,void 0,o,r)),this),fn(this,C1,(n,o)=>{let r="",s="";const i=n.children;let l=-1,a=-1;const u=d=>{d&&d.forEach((f,p)=>{f.type==="text"&&f.value&&(l<0&&(l=p),a=p)})};if(i){u(i);const d=i==null?void 0:i[a],f=i==null?void 0:i[l];d&&d.value.endsWith(" ")&&(s=d.value.match(/ +$/)[0],d.value=d.value.trimEnd()),f&&f.value.startsWith(" ")&&(r=f.value.match(/^ +/)[0],f.value=f.value.trimStart())}r.length&&It(this,wa).call(this,"text",void 0,r);const c=o();return s.length&&It(this,wa).call(this,"text",void 0,s),c}),fn(this,Xu,(n=!1)=>{const o=this.close(),r=()=>It(this,wa).call(this,o.type,o.children,o.value,o.props);return n?It(this,C1).call(this,o,r):r()}),this.closeNode=()=>(It(this,Xu).call(this),this),fn(this,wa,(n,o,r,s)=>{const i=PS.create(n,o,r,s),l=It(this,ff).call(this,It(this,w1).call(this,i));return this.push(l),l}),this.addNode=(n,o,r,s)=>(It(this,wa).call(this,n,o,r,s),this),fn(this,k1,(n,o,r,s)=>n.isInSet(It(this,hi))?this:(fn(this,hi,n.addToSet(It(this,hi))),this.openNode(o,r,{...s,isMark:!0}))),fn(this,pf,n=>{n.isInSet(It(this,hi))&&(fn(this,hi,n.type.removeFromSet(It(this,hi))),It(this,Xu).call(this,!0))}),this.withMark=(n,o,r,s)=>(It(this,k1).call(this,n,o,r,s),this),this.closeMark=n=>(It(this,pf).call(this,n),this),this.build=()=>{let n=null;do n=It(this,Xu).call(this);while(this.size());return n},this.next=n=>c2e(n)?(n.forEach(o=>{It(this,df).call(this,o)}),this):(It(this,df).call(this,n),this),this.toString=n=>n.stringify(this.build()),this.run=n=>(this.next(n),this),this.schema=t}};hi=new WeakMap,cf=new WeakMap,y1=new WeakMap,_1=new WeakMap,df=new WeakMap,b1=new WeakMap,ff=new WeakMap,w1=new WeakMap,C1=new WeakMap,Xu=new WeakMap,wa=new WeakMap,k1=new WeakMap,pf=new WeakMap,Yb.create=(e,t)=>{const n=new Yb(e);return o=>(n.run(o),n.toString(t))};let d2e=Yb;const sA=65535,iA=Math.pow(2,16);function f2e(e,t){return e+t*iA}function LS(e){return e&sA}function p2e(e){return(e-(e&sA))/iA}const lA=1,aA=2,S1=4,uA=8;class Zb{constructor(t,n,o){this.pos=t,this.delInfo=n,this.recover=o}get deleted(){return(this.delInfo&uA)>0}get deletedBefore(){return(this.delInfo&(lA|S1))>0}get deletedAfter(){return(this.delInfo&(aA|S1))>0}get deletedAcross(){return(this.delInfo&S1)>0}}class cr{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&cr.empty)return cr.empty}recover(t){let n=0,o=LS(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+p2e(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,o){let r=0,s=this.inverted?2:1,i=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>t)break;let u=this.ranges[l+s],c=this.ranges[l+i],d=a+u;if(t<=d){let f=u?t==a?-1:t==d?1:n:n,p=a+r+(f<0?0:c);if(o)return p;let h=t==(n<0?a:d)?null:f2e(l/3,t-a),m=t==a?aA:t==d?lA:S1;return(n<0?t!=a:t!=d)&&(m|=uA),new Zb(p,m,h)}r+=c-u}return o?t+r:new Zb(t+r,0,null)}touches(t,n){let o=0,r=LS(n),s=this.inverted?2:1,i=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?o:0);if(a>t)break;let u=this.ranges[l+s],c=a+u;if(t<=c&&l==r*3)return!0;o+=this.ranges[l+i]-u}return!1}forEach(t){let n=this.inverted?2:1,o=this.inverted?1:2;for(let r=0,s=0;r<this.ranges.length;r+=3){let i=this.ranges[r],l=i-(this.inverted?s:0),a=i+(this.inverted?0:s),u=this.ranges[r+n],c=this.ranges[r+o];t(l,l+u,a,a+c),s+=c-u}}invert(){return new cr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?cr.empty:new cr(t<0?[0,-t,0]:[0,0,t])}}cr.empty=new cr([]);class Ec{constructor(t=[],n,o=0,r=t.length){this.maps=t,this.mirror=n,this.from=o,this.to=r}slice(t=0,n=this.maps.length){return new Ec(this.maps,this.mirror,t,n)}copy(){return new Ec(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,n){this.to=this.maps.push(t),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(t){for(let n=0,o=this.maps.length;n<t.maps.length;n++){let r=t.getMirror(n);this.appendMap(t.maps[n],r!=null&&r<n?o+r:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,o=this.maps.length+t.maps.length;n>=0;n--){let r=t.getMirror(n);this.appendMap(t.maps[n].invert(),r!=null&&r>n?o-r-1:void 0)}}invert(){let t=new Ec;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let o=this.from;o<this.to;o++)t=this.maps[o].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,o){let r=0;for(let s=this.from;s<this.to;s++){let i=this.maps[s],l=i.mapResult(t,n);if(l.recover!=null){let a=this.getMirror(s);if(a!=null&&a>s&&a<this.to){s=a,t=this.maps[a].recover(l.recover);continue}}r|=l.delInfo,t=l.pos}return o?t:new Zb(t,r,null)}}const Ey=Object.create(null);class bo{getMap(){return cr.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let o=Ey[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 Ey)throw new RangeError("Duplicate use of step JSON ID "+t);return Ey[t]=n,n.prototype.jsonID=t,n}}class Rn{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new Rn(t,null)}static fail(t){return new Rn(null,t)}static fromReplace(t,n,o,r){try{return Rn.ok(t.replace(n,o,r))}catch(s){if(s instanceof jg)return Rn.fail(s.message);throw s}}}function sC(e,t,n){let o=[];for(let r=0;r<e.childCount;r++){let s=e.child(r);s.content.size&&(s=s.copy(sC(s.content,t,s))),s.isInline&&(s=t(s,n,r)),o.push(s)}return Ue.fromArray(o)}class Si extends bo{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 Ye(sC(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 Rn.fromReplace(t,this.from,this.to,s)}invert(){return new zs(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 Si(n.pos,o.pos,this.mark)}merge(t){return t instanceof Si&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Si(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 Si(n.from,n.to,t.markFromJSON(n.mark))}}bo.jsonID("addMark",Si);class zs extends bo{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 Ye(sC(n.content,r=>r.mark(this.mark.removeFromSet(r.marks)),t),n.openStart,n.openEnd);return Rn.fromReplace(t,this.from,this.to,o)}invert(){return new Si(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 zs(n.pos,o.pos,this.mark)}merge(t){return t instanceof zs&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new zs(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 zs(n.from,n.to,t.markFromJSON(n.mark))}}bo.jsonID("removeMark",zs);class Ol extends bo{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Rn.fail("No node at mark step's position");let o=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Rn.fromReplace(t,this.pos,this.pos+1,new Ye(Ue.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 Ol(this.pos,n.marks[r]);return new Ol(this.pos,this.mark)}}return new cd(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Ol(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 Ol(n.pos,t.markFromJSON(n.mark))}}bo.jsonID("addNodeMark",Ol);class cd extends bo{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Rn.fail("No node at mark step's position");let o=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Rn.fromReplace(t,this.pos,this.pos+1,new Ye(Ue.from(o),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Ol(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new cd(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new cd(n.pos,t.markFromJSON(n.mark))}}bo.jsonID("removeNodeMark",cd);class eo extends bo{constructor(t,n,o,r=!1){super(),this.from=t,this.to=n,this.slice=o,this.structure=r}apply(t){return this.structure&&Jb(t,this.from,this.to)?Rn.fail("Structure replace would overwrite content"):Rn.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new cr([this.from,this.to-this.from,this.slice.size])}invert(t){return new eo(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 eo(n.pos,Math.max(n.pos,o.pos),this.slice)}merge(t){if(!(t instanceof eo)||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?Ye.empty:new Ye(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new eo(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?Ye.empty:new Ye(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new eo(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 eo(n.from,n.to,Ye.fromJSON(t,n.slice),!!n.structure)}}bo.jsonID("replace",eo);class vo extends bo{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&&(Jb(t,this.from,this.gapFrom)||Jb(t,this.gapTo,this.to)))return Rn.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Rn.fail("Gap is not a flat range");let o=this.slice.insertAt(this.insert,n.content);return o?Rn.fromReplace(t,this.from,this.to,o):Rn.fail("Content does not fit in gap")}getMap(){return new cr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new vo(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),o=t.mapResult(this.to,-1),r=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),s=this.to==this.gapTo?o.pos:t.map(this.gapTo,1);return n.deletedAcross&&o.deletedAcross||r<n.pos||s>o.pos?null:new vo(n.pos,o.pos,r,s,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new vo(n.from,n.to,n.gapFrom,n.gapTo,Ye.fromJSON(t,n.slice),n.insert,!!n.structure)}}bo.jsonID("replaceAround",vo);function Jb(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 h2e(e,t,n,o){let r=[],s=[],i,l;e.doc.nodesBetween(t,n,(a,u,c)=>{if(!a.isInline)return;let d=a.marks;if(!o.isInSet(d)&&c.type.allowsMarkType(o.type)){let f=Math.max(u,t),p=Math.min(u+a.nodeSize,n),h=o.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(h)||(i&&i.to==f&&i.mark.eq(d[m])?i.to=p:r.push(i=new zs(f,p,d[m])));l&&l.to==f?l.to=p:s.push(l=new Si(f,p,o))}}),r.forEach(a=>e.step(a)),s.forEach(a=>e.step(a))}function m2e(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 u=i.marks,c;for(;c=o.isInSet(u);)(a||(a=[])).push(c),u=c.removeFromSet(u)}else o?o.isInSet(i.marks)&&(a=[o]):a=i.marks;if(a&&a.length){let u=Math.min(l+i.nodeSize,n);for(let c=0;c<a.length;c++){let d=a[c],f;for(let p=0;p<r.length;p++){let h=r[p];h.step==s-1&&d.eq(r[p].style)&&(f=h)}f?(f.to=u,f.step=s):r.push({style:d,from:Math.max(l,t),to:u,step:s})}}}),r.forEach(i=>e.step(new zs(i.from,i.to,i.style)))}function cA(e,t,n,o=n.contentMatch,r=!0){let s=e.doc.nodeAt(t),i=[],l=t+1;for(let a=0;a<s.childCount;a++){let u=s.child(a),c=l+u.nodeSize,d=o.matchType(u.type);if(!d)i.push(new eo(l,c,Ye.empty));else{o=d;for(let f=0;f<u.marks.length;f++)n.allowsMarkType(u.marks[f].type)||e.step(new zs(l,c,u.marks[f]));if(r&&u.isText&&n.whitespace!="pre"){let f,p=/\r?\n|\r/g,h;for(;f=p.exec(u.text);)h||(h=new Ye(Ue.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),i.push(new eo(l+f.index,l+f.index+f[0].length,h))}}l=c}if(!o.validEnd){let a=o.fillBefore(Ue.empty,!0);e.replace(l,l,new Ye(a,0,0))}for(let a=i.length-1;a>=0;a--)e.step(i[a])}function g2e(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function rv(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||!g2e(r,s,i))break}return null}function v2e(e,t,n){let{$from:o,$to:r,depth:s}=t,i=o.before(s+1),l=r.after(s+1),a=i,u=l,c=Ue.empty,d=0;for(let h=s,m=!1;h>n;h--)m||o.index(h)>0?(m=!0,c=Ue.from(o.node(h).copy(c)),d++):a--;let f=Ue.empty,p=0;for(let h=s,m=!1;h>n;h--)m||r.after(h+1)<r.end(h)?(m=!0,f=Ue.from(r.node(h).copy(f)),p++):u++;e.step(new vo(a,u,i,l,new Ye(c.append(f),d,p),c.size-d,!0))}function iC(e,t,n=null,o=e){let r=y2e(e,t),s=r&&_2e(o,t);return s?r.map(RS).concat({type:t,attrs:n}).concat(s.map(RS)):null}function RS(e){return{type:e,attrs:null}}function y2e(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 _2e(e,t){let{parent:n,startIndex:o,endIndex:r}=e,s=n.child(o),i=t.contentMatch.findWrapping(s.type);if(!i)return null;let a=(i.length?i[i.length-1]:t).contentMatch;for(let u=o;a&&u<r;u++)a=a.matchType(n.child(u).type);return!a||!a.validEnd?null:i}function b2e(e,t,n){let o=Ue.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=Ue.from(n[i].type.create(n[i].attrs,o))}let r=t.start,s=t.end;e.step(new vo(r,s,r,s,new Ye(o,0,0),n.length,!0))}function w2e(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)&&S2e(e.doc,e.mapping.slice(s).map(l),o)){let u=null;if(o.schema.linebreakReplacement){let p=o.whitespace=="pre",h=!!o.contentMatch.matchType(o.schema.linebreakReplacement);p&&!h?u=!1:!p&&h&&(u=!0)}u===!1&&k2e(e,i,l,s),cA(e,e.mapping.slice(s).map(l,1),o,void 0,u===null);let c=e.mapping.slice(s),d=c.map(l,1),f=c.map(l+i.nodeSize,1);return e.step(new vo(d,f,d+1,f-1,new Ye(Ue.from(o.create(a,null,i.marks)),0,0),1,!0)),u===!0&&C2e(e,i,l,s),!1}})}function C2e(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 k2e(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 S2e(e,t,n){let o=e.resolve(t),r=o.index();return o.parent.canReplaceWith(r,r+1,n)}function $2e(e,t,n,o,r){let s=e.doc.nodeAt(t);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let i=n.create(o,null,r||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,i);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new vo(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new Ye(Ue.from(i),0,0),1,!0))}function tp(e,t,n=1,o){let r=e.resolve(t),s=r.depth-n,i=o&&o[o.length-1]||r.parent;if(s<0||r.parent.type.spec.isolating||!r.parent.canReplace(r.index(),r.parent.childCount)||!i.type.validContent(r.parent.content.cutByIndex(r.index(),r.parent.childCount)))return!1;for(let u=r.depth-1,c=n-2;u>s;u--,c--){let d=r.node(u),f=r.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),h=o&&o[c+1];h&&(p=p.replaceChild(0,h.type.create(h.attrs)));let m=o&&o[c]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(p))return!1}let l=r.indexAfter(s),a=o&&o[0];return r.node(s).canReplaceWith(l,l,a?a.type:r.node(s+1).type)}function E2e(e,t,n=1,o){let r=e.doc.resolve(t),s=Ue.empty,i=Ue.empty;for(let l=r.depth,a=r.depth-n,u=n-1;l>a;l--,u--){s=Ue.from(r.node(l).copy(s));let c=o&&o[u];i=Ue.from(c?c.type.create(c.attrs,i):r.node(l).copy(i))}e.step(new eo(t,t,new Ye(s.append(i),n,n),!0))}function sv(e,t){let n=e.resolve(t),o=n.index();return x2e(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(o,o+1)}function x2e(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function M2e(e,t,n){let o=new eo(t-n,t+n,Ye.empty,!0);e.step(o)}function T2e(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 O2e(e,t,n){let o=e.resolve(t);if(!n.content.size)return t;let r=n.content;for(let s=0;s<n.openStart;s++)r=r.firstChild.content;for(let s=1;s<=(n.openStart==0&&n.size?2:1);s++)for(let i=o.depth;i>=0;i--){let l=i==o.depth?0:o.pos<=(o.start(i+1)+o.end(i+1))/2?-1:1,a=o.index(i)+(l>0?1:0),u=o.node(i),c=!1;if(s==1)c=u.canReplace(a,a,r);else{let d=u.contentMatchAt(a).findWrapping(r.firstChild.type);c=d&&u.canReplaceWith(a,a,d[0])}if(c)return l==0?o.pos:l<0?o.before(i+1):o.after(i+1)}return null}function lC(e,t,n=t,o=Ye.empty){if(t==n&&!o.size)return null;let r=e.resolve(t),s=e.resolve(n);return dA(r,s,o)?new eo(t,n,o):new I2e(r,s,o).fit()}function dA(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class I2e{constructor(t,n,o){this.$from=t,this.$to=n,this.unplaced=o,this.frontier=[],this.placed=Ue.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=Ue.from(t.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,o=this.$from,r=this.close(t<0?this.$to:o.doc.resolve(t));if(!r)return null;let s=this.placed,i=o.depth,l=r.depth;for(;i&&l&&s.childCount==1;)s=s.firstChild.content,i--,l--;let a=new Ye(s,i,l);return t>-1?new vo(o.pos,t,this.$to.pos,this.$to.end(),a,n):a.size||o.pos!=this.$to.pos?new eo(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=xy(this.unplaced.content,o-1).firstChild,r=s.content):r=this.unplaced.content;let i=r.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:u}=this.frontier[l],c,d=null;if(n==1&&(i?u.matchType(i.type)||(d=u.fillBefore(Ue.from(i),!1)):s&&a.compatibleContent(s.type)))return{sliceDepth:o,frontierDepth:l,parent:s,inject:d};if(n==2&&i&&(c=u.findWrapping(i.type)))return{sliceDepth:o,frontierDepth:l,parent:s,wrap:c};if(s&&u.matchType(s.type))break}}}openMore(){let{content:t,openStart:n,openEnd:o}=this.unplaced,r=xy(t,n);return!r.childCount||r.firstChild.isLeaf?!1:(this.unplaced=new Ye(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=xy(t,n);if(r.childCount<=1&&n>0){let s=t.size-n<=n+r.size;this.unplaced=new Ye(hf(t,n-1,1),n-1,s?n-1:o)}else this.unplaced=new Ye(hf(t,n,1),n,o)}placeNodes({sliceDepth:t,frontierDepth:n,parent:o,inject:r,wrap:s}){for(;this.depth>n;)this.closeFrontierNode();if(s)for(let m=0;m<s.length;m++)this.openFrontierNode(s[m]);let i=this.unplaced,l=o?o.content:i.content,a=i.openStart-t,u=0,c=[],{match:d,type:f}=this.frontier[n];if(r){for(let m=0;m<r.childCount;m++)c.push(r.child(m));d=d.matchFragment(r)}let p=l.size+t-(i.content.size-i.openEnd);for(;u<l.childCount;){let m=l.child(u),y=d.matchType(m.type);if(!y)break;u++,(u>1||a==0||m.content.size)&&(d=y,c.push(fA(m.mark(f.allowedMarks(m.marks)),u==1?a:0,u==l.childCount?p:-1)))}let h=u==l.childCount;h||(p=-1),this.placed=mf(this.placed,n,Ue.from(c)),this.frontier[n].match=d,h&&p<0&&o&&o.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,y=l;m<p;m++){let v=y.lastChild;this.frontier.push({type:v.type,match:v.contentMatchAt(v.childCount)}),y=v.content}this.unplaced=h?t==0?Ye.empty:new Ye(hf(i.content,t-1,1),t-1,p<0?i.openEnd:t-1):new Ye(hf(i.content,t,u),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!My(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=My(t,n,r,o,s);if(i){for(let l=n-1;l>=0;l--){let{match:a,type:u}=this.frontier[l],c=My(t,l,u,a,!0);if(!c||c.childCount)continue e}return{depth:n,fit:i,move:s?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=mf(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=mf(this.placed,this.depth,Ue.from(t.create(n,o))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Ue.empty,!0);n.childCount&&(this.placed=mf(this.placed,this.frontier.length,n))}}function hf(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(hf(e.firstChild.content,t-1,n)))}function mf(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(mf(e.lastChild.content,t-1,n)))}function xy(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function fA(e,t,n){if(t<=0)return e;let o=e.content;return t>1&&(o=o.replaceChild(0,fA(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(Ue.empty,!0)))),e.copy(o)}function My(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&&!A2e(n,s.content,i)?l:null}function A2e(e,t,n){for(let o=n;o<t.childCount;o++)if(!e.allowsMarks(t.child(o).marks))return!0;return!1}function N2e(e){return e.spec.defining||e.spec.definingForContent}function P2e(e,t,n,o){if(!o.size)return e.deleteRange(t,n);let r=e.doc.resolve(t),s=e.doc.resolve(n);if(dA(r,s,o))return e.step(new eo(t,n,o));let i=hA(r,e.doc.resolve(n));i[i.length-1]==0&&i.pop();let l=-(r.depth+1);i.unshift(l);for(let f=r.depth,p=r.pos-1;f>0;f--,p--){let h=r.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;i.indexOf(f)>-1?l=f:r.before(f)==p&&i.splice(1,0,-f)}let a=i.indexOf(l),u=[],c=o.openStart;for(let f=o.content,p=0;;p++){let h=f.firstChild;if(u.push(h),p==o.openStart)break;f=h.content}for(let f=c-1;f>=0;f--){let p=u[f],h=N2e(p.type);if(h&&!p.sameMarkup(r.node(Math.abs(l)-1)))c=f;else if(h||!p.type.isTextblock)break}for(let f=o.openStart;f>=0;f--){let p=(f+c+1)%(o.openStart+1),h=u[p];if(h)for(let m=0;m<i.length;m++){let y=i[(m+a)%i.length],v=!0;y<0&&(v=!1,y=-y);let w=r.node(y-1),_=r.index(y-1);if(w.canReplaceWith(_,_,h.type,h.marks))return e.replace(r.before(y),v?s.after(y):n,new Ye(pA(o.content,0,o.openStart,p),p,o.openEnd))}}let d=e.steps.length;for(let f=i.length-1;f>=0&&(e.replace(t,n,o),!(e.steps.length>d));f--){let p=i[f];p<0||(t=r.before(p),n=s.after(p))}}function pA(e,t,n,o,r){if(t<n){let s=e.firstChild;e=e.replaceChild(0,s.copy(pA(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(Ue.empty,!0))}return e}function L2e(e,t,n,o){if(!o.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let r=T2e(e.doc,t,o.type);r!=null&&(t=n=r)}e.replaceRange(t,n,new Ye(Ue.from(o),0,0))}function R2e(e,t,n){let o=e.doc.resolve(t),r=e.doc.resolve(n),s=hA(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 hA(e,t){let n=[],o=Math.min(e.depth,t.depth);for(let r=o;r>=0;r--){let s=e.start(r);if(s<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(s==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==s-1)&&n.push(r)}return n}class xc extends bo{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 Rn.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 Rn.fromReplace(t,this.pos,this.pos+1,new Ye(Ue.from(r),0,n.isLeaf?0:1))}getMap(){return cr.empty}invert(t){return new xc(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new xc(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new xc(n.pos,n.attr,n.value)}}bo.jsonID("attr",xc);class zp extends bo{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 Rn.ok(o)}getMap(){return cr.empty}invert(t){return new zp(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 zp(n.attr,n.value)}}bo.jsonID("docAttr",zp);let dd=class extends Error{};dd=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};dd.prototype=Object.create(Error.prototype);dd.prototype.constructor=dd;dd.prototype.name="TransformError";class mA{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Ec}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new dd(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,o=Ye.empty){let r=lC(this.doc,t,n,o);return r&&this.step(r),this}replaceWith(t,n,o){return this.replace(t,n,new Ye(Ue.from(o),0,0))}delete(t,n){return this.replace(t,n,Ye.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,o){return P2e(this,t,n,o),this}replaceRangeWith(t,n,o){return L2e(this,t,n,o),this}deleteRange(t,n){return R2e(this,t,n),this}lift(t,n){return v2e(this,t,n),this}join(t,n=1){return M2e(this,t,n),this}wrap(t,n){return b2e(this,t,n),this}setBlockType(t,n=t,o,r=null){return w2e(this,t,n,o,r),this}setNodeMarkup(t,n,o=null,r){return $2e(this,t,n,o,r),this}setNodeAttribute(t,n,o){return this.step(new xc(t,n,o)),this}setDocAttribute(t,n){return this.step(new zp(t,n)),this}addNodeMark(t,n){return this.step(new Ol(t,n)),this}removeNodeMark(t,n){if(!(n instanceof Yt)){let o=this.doc.nodeAt(t);if(!o)throw new RangeError("No node at position "+t);if(n=n.isInSet(o.marks),!n)return this}return this.step(new cd(t,n)),this}split(t,n=1,o){return E2e(this,t,n,o),this}addMark(t,n,o){return h2e(this,t,n,o),this}removeMark(t,n,o){return m2e(this,t,n,o),this}clearIncompatible(t,n,o){return cA(this,t,n,o),this}}const Ty=Object.create(null);class bt{constructor(t,n,o){this.$anchor=t,this.$head=n,this.ranges=o||[new Yg(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=Ye.empty){let o=n.content.lastChild,r=null;for(let l=0;l<n.openEnd;l++)r=o,o=o.lastChild;let s=t.steps.length,i=this.ranges;for(let l=0;l<i.length;l++){let{$from:a,$to:u}=i[l],c=t.mapping.slice(s);t.replaceRange(c.map(a.pos),c.map(u.pos),l?Ye.empty:n),l==0&&VS(t,s,(o?o.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(t,n){let o=t.steps.length,r=this.ranges;for(let s=0;s<r.length;s++){let{$from:i,$to:l}=r[s],a=t.mapping.slice(o),u=a.map(i.pos),c=a.map(l.pos);s?t.deleteRange(u,c):(t.replaceRangeWith(u,c,n),VS(t,o,n.isInline?-1:1))}}static findFrom(t,n,o=!1){let r=t.parent.inlineContent?new ht(t):Qu(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?Qu(t.node(0),t.node(s),t.before(s+1),t.index(s),n,o):Qu(t.node(0),t.node(s),t.after(s+1),t.index(s)+1,n,o);if(i)return i}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new gr(t.node(0))}static atStart(t){return Qu(t,t,0,0,1)||new gr(t)}static atEnd(t){return Qu(t,t,t.content.size,t.childCount,-1)||new gr(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let o=Ty[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 Ty)throw new RangeError("Duplicate use of selection JSON ID "+t);return Ty[t]=n,n.prototype.jsonID=t,n}getBookmark(){return ht.between(this.$anchor,this.$head).getBookmark()}}bt.prototype.visible=!0;class Yg{constructor(t,n){this.$from=t,this.$to=n}}let DS=!1;function FS(e){!DS&&!e.parent.inlineContent&&(DS=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class ht extends bt{constructor(t,n=t){FS(t),FS(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let o=t.resolve(n.map(this.head));if(!o.parent.inlineContent)return bt.near(o);let r=t.resolve(n.map(this.anchor));return new ht(r.parent.inlineContent?r:o,o)}replace(t,n=Ye.empty){if(super.replace(t,n),n==Ye.empty){let o=this.$from.marksAcross(this.$to);o&&t.ensureMarks(o)}}eq(t){return t instanceof ht&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new iv(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ht(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,o=n){let r=t.resolve(n);return new this(r,o==n?r:t.resolve(o))}static between(t,n,o){let r=t.pos-n.pos;if((!o||r)&&(o=r>=0?1:-1),!n.parent.inlineContent){let s=bt.findFrom(n,o,!0)||bt.findFrom(n,-o,!0);if(s)n=s.$head;else return bt.near(n,o)}return t.parent.inlineContent||(r==0?t=n:(t=(bt.findFrom(t,-o,!0)||bt.findFrom(t,o,!0)).$anchor,t.pos<n.pos!=r<0&&(t=n))),new ht(t,n)}}bt.jsonID("text",ht);class iv{constructor(t,n){this.anchor=t,this.head=n}map(t){return new iv(t.map(this.anchor),t.map(this.head))}resolve(t){return ht.between(t.resolve(this.anchor),t.resolve(this.head))}}class mt extends bt{constructor(t){let n=t.nodeAfter,o=t.node(0).resolve(t.pos+n.nodeSize);super(t,o),this.node=n}map(t,n){let{deleted:o,pos:r}=n.mapResult(this.anchor),s=t.resolve(r);return o?bt.near(s):new mt(s)}content(){return new Ye(Ue.from(this.node),0,0)}eq(t){return t instanceof mt&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new aC(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new mt(t.resolve(n.anchor))}static create(t,n){return new mt(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}mt.prototype.visible=!1;bt.jsonID("node",mt);class aC{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:o}=t.mapResult(this.anchor);return n?new iv(o,o):new aC(o)}resolve(t){let n=t.resolve(this.anchor),o=n.nodeAfter;return o&&mt.isSelectable(o)?new mt(n):bt.near(n)}}class gr extends bt{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=Ye.empty){if(n==Ye.empty){t.delete(0,t.doc.content.size);let o=bt.atStart(t.doc);o.eq(t.selection)||t.setSelection(o)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new gr(t)}map(t){return new gr(t)}eq(t){return t instanceof gr}getBookmark(){return D2e}}bt.jsonID("all",gr);const D2e={map(){return this},resolve(e){return new gr(e)}};function Qu(e,t,n,o,r,s=!1){if(t.inlineContent)return ht.create(e,n);for(let i=o-(r>0?0:1);r>0?i<t.childCount:i>=0;i+=r){let l=t.child(i);if(l.isAtom){if(!s&&mt.isSelectable(l))return mt.create(e,n-(r<0?l.nodeSize:0))}else{let a=Qu(e,l,n+r,r<0?l.childCount:0,r,s);if(a)return a}n+=l.nodeSize*r}return null}function VS(e,t,n){let o=e.steps.length-1;if(o<t)return;let r=e.steps[o];if(!(r instanceof eo||r instanceof vo))return;let s=e.mapping.maps[o],i;s.forEach((l,a,u,c)=>{i==null&&(i=c)}),e.setSelection(bt.near(e.doc.resolve(i),n))}const BS=1,km=2,zS=4;class F2e extends mA{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|BS)&~km,this.storedMarks=null,this}get selectionSet(){return(this.updated&BS)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=km,this}ensureMarks(t){return Yt.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&km)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~km,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let o=this.selection;return n&&(t=t.mark(this.storedMarks||(o.empty?o.$from.marks():o.$from.marksAcross(o.$to)||Yt.none))),o.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,o){let r=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(o==null&&(o=n),o=o??n,!t)return this.deleteRange(n,o);let s=this.storedMarks;if(!s){let i=this.doc.resolve(n);s=o==n?i.marks():i.marksAcross(this.doc.resolve(o))}return this.replaceRangeWith(n,o,r.text(t,s)),this.selection.empty||this.setSelection(bt.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=zS,this}get scrolledIntoView(){return(this.updated&zS)>0}}function jS(e,t){return!t||!e?e:e.bind(t)}class gf{constructor(t,n,o){this.name=t,this.init=jS(n.init,o),this.apply=jS(n.apply,o)}}const V2e=[new gf("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new gf("selection",{init(e,t){return e.selection||bt.atStart(t.doc)},apply(e){return e.selection}}),new gf("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,o){return o.selection.$cursor?e.storedMarks:null}}),new gf("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class Oy{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=V2e.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 gf(o.key,o.spec.state,o))})}}class La{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let o=0;o<this.config.plugins.length;o++)if(o!=n){let r=this.config.plugins[o];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],o=this.applyInner(t),r=null;for(;;){let s=!1;for(let i=0;i<this.config.plugins.length;i++){let l=this.config.plugins[i];if(l.spec.appendTransaction){let a=r?r[i].n:0,u=r?r[i].state:this,c=a<n.length&&l.spec.appendTransaction.call(l,a?n.slice(a):n,u,o);if(c&&o.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",t),!r){r=[];for(let d=0;d<this.config.plugins.length;d++)r.push(d<i?{state:o,n:n.length}:{state:this,n:0})}n.push(c),o=o.applyInner(c),s=!0}r&&(r[i]={state:o,n:n.length})}}if(!s)return{state:o,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new La(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 F2e(this)}static create(t){let n=new Oy(t.doc?t.doc.type.schema:t.schema,t.plugins),o=new La(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 Oy(this.schema,t.plugins),o=n.fields,r=new La(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 Oy(t.schema,t.plugins),s=new La(r);return r.fields.forEach(i=>{if(i.name=="doc")s.doc=Ll.fromJSON(t.schema,n.doc);else if(i.name=="selection")s.selection=bt.fromJSON(s.doc,n.selection);else if(i.name=="storedMarks")n.storedMarks&&(s.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(o)for(let l in o){let a=o[l],u=a.spec.state;if(a.key==i.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){s[i.name]=u.fromJSON.call(a,t,n[l],s);return}}s[i.name]=i.init(t,s)}}),s}}function gA(e,t,n){for(let o in e){let r=e[o];r instanceof Function?r=r.bind(t):o=="handleDOMEvents"&&(r=gA(r,t,{})),n[o]=r}return n}class xn{constructor(t){this.spec=t,this.props={},t.props&&gA(t.props,this,this.props),this.key=t.key?t.key.key:vA("plugin")}getState(t){return t[this.key]}}const Iy=Object.create(null);function vA(e){return e in Iy?e+"$"+ ++Iy[e]:(Iy[e]=0,e+"$")}class wn{constructor(t="key"){this.key=vA(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}class Cr{constructor(t,n,o={}){this.match=t,this.match=t,this.handler=typeof n=="string"?B2e(n):n,this.undoable=o.undoable!==!1,this.inCode=o.inCode||!1}}function B2e(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 z2e=(e,t)=>{let n=e.plugins;for(let o=0;o<n.length;o++){let r=n[o],s;if(r.spec.isInputRules&&(s=r.getState(e))){if(t){let i=e.tr,l=s.transform;for(let a=l.steps.length-1;a>=0;a--)i.step(l.steps[a].invert(l.docs[a]));if(s.text){let a=i.doc.resolve(s.from).marks();i.replaceWith(s.from,s.to,e.schema.text(s.text,a))}else i.delete(s.from,s.to);t(i)}return!0}}return!1};new Cr(/--$/,"—");new Cr(/\.\.\.$/,"…");new Cr(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“");new Cr(/"$/,"”");new Cr(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘");new Cr(/'$/,"’");function uC(e,t,n=null,o){return new Cr(e,(r,s,i,l)=>{let a=n instanceof Function?n(s):n,u=r.tr.delete(i,l),c=u.doc.resolve(i),d=c.blockRange(),f=d&&iC(d,t,a);if(!f)return null;u.wrap(d,f);let p=u.doc.resolve(i-1).nodeBefore;return p&&p.type==t&&sv(u.doc,i-1)&&(!o||o(s,p))&&u.join(i-1),u})}function yA(e,t,n=null){return new Cr(e,(o,r,s,i)=>{let l=o.doc.resolve(s),a=n instanceof Function?n(r):n;return l.node(-1).canReplaceWith(l.index(-1),l.indexAfter(-1),t)?o.tr.delete(s,i).setBlockType(s,s,t,a):null})}const Wl=typeof navigator<"u"?navigator:null,HS=typeof document<"u"?document:null,oa=Wl&&Wl.userAgent||"",Xb=/Edge\/(\d+)/.exec(oa),_A=/MSIE \d/.exec(oa),Qb=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(oa),lv=!!(_A||Qb||Xb),j2e=_A?document.documentMode:Qb?+Qb[1]:Xb?+Xb[1]:0,bA=!lv&&/gecko\/(\d+)/i.test(oa),H2e=bA&&+(/Firefox\/(\d+)/.exec(oa)||[0,0])[1],e2=!lv&&/Chrome\/(\d+)/.exec(oa),U2e=!!e2,W2e=e2?+e2[1]:0,wA=!lv&&!!Wl&&/Apple Computer/.test(Wl.vendor),CA=wA&&(/Mobile\/\w+/.test(oa)||!!Wl&&Wl.maxTouchPoints>2),K2e=CA||(Wl?/Mac/.test(Wl.platform):!1),q2e=/Android \d/.test(oa),kA=!!HS&&"webkitFontSmoothing"in HS.documentElement.style,G2e=kA?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;var Sm=Object.freeze({__proto__:null,android:q2e,chrome:U2e,chrome_version:W2e,gecko:bA,gecko_version:H2e,ie:lv,ie_version:j2e,ios:CA,mac:K2e,safari:wA,webkit:kA,webkit_version:G2e});function Ay(e,t,n,o,r,s){if(e.composing)return!1;const i=e.state,l=i.doc.resolve(t);if(l.parent.type.spec.code)return!1;const a=l.parent.textBetween(Math.max(0,l.parentOffset-500),l.parentOffset,void 0,"")+o;for(let u=0;u<r.length;u++){const c=r[u].match.exec(a),d=c&&c[0]&&r[u].handler(i,c,t-(c[0].length-o.length),n);if(d)return e.dispatch(d.setMeta(s,{transform:d,from:t,to:n,text:o})),!0}return!1}const Y2e=new wn("MILKDOWN_CUSTOM_INPUTRULES");function Z2e({rules:e}){const t=new xn({key:Y2e,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 Ay(n,o,r,s,e,t)},handleDOMEvents:{compositionend:n=>(setTimeout(()=>{const{$cursor:o}=n.state.selection;o&&Ay(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?Ay(n,r.pos,r.pos,`
113 -`,e,t):!1}}});return t}function xh(e,t,n={}){return new Cr(e,(o,r,s,i)=>{var l,a,u,c;const{tr:d}=o,f=r.length;let p=r[f-1],h=r[0],m=[],y=i;const v={group:p,fullMatch:h,start:s,end:i},w=(l=n.updateCaptured)==null?void 0:l.call(n,v);if(Object.assign(v,w),{group:p,fullMatch:h,start:s,end:i}=v,h===null||(p==null?void 0:p.trim())==="")return null;if(p){const _=h.search(/\S/),S=s+h.indexOf(p),x=S+p.length;m=(a=d.storedMarks)!=null?a:[],x<i&&d.delete(x,i),S>s&&d.delete(s+_,S),y=s+_+p.length;const E=(u=n.getAttr)==null?void 0:u.call(n,r);d.addMark(s,y,t.create(E)),d.setStoredMarks(m),(c=n.beforeDispatch)==null||c.call(n,{match:r,start:s,end:i,tr:d})}return d})}var J2e=Object.defineProperty,X2e=Object.defineProperties,Q2e=Object.getOwnPropertyDescriptors,US=Object.getOwnPropertySymbols,ewe=Object.prototype.hasOwnProperty,twe=Object.prototype.propertyIsEnumerable,WS=(e,t,n)=>t in e?J2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nwe=(e,t)=>{for(var n in t||(t={}))ewe.call(t,n)&&WS(e,n,t[n]);if(US)for(var n of US(t))twe.call(t,n)&&WS(e,n,t[n]);return e},owe=(e,t)=>X2e(e,Q2e(t));function KS(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function av(e,t,n){const r=e.state.doc.content.size,s=KS(t,0,r),i=KS(n,0,r),l=e.coordsAtPos(s),a=e.coordsAtPos(i,-1),u=Math.min(l.top,a.top),c=Math.max(l.bottom,a.bottom),d=Math.min(l.left,a.left),f=Math.max(l.right,a.right),p=f-d,h=c-u,v={top:u,bottom:c,left:d,right:f,width:p,height:h,x:d,y:u};return owe(nwe({},v),{toJSON:()=>v})}function uv(e){return Object.assign(Object.create(e),e).setTime(Date.now())}function rwe(e,t){return Array.isArray(e)&&e.includes(t.type)||t.type===e}function cC(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 swe(e,t){return cC(n=>n.type===t)(e)}function iwe(e,t){const n=t.nodes[e];if(!n)throw nve("node",e);return n}function dC(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 lwe(e){return t=>dC(e)(t.$from)}function awe(e,t){if(!(e instanceof mt))return;const{node:n,$from:o}=e;if(rwe(t,n))return{node:n,pos:o.pos,start:o.start(o.depth),depth:o.depth}}const fC=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function uwe(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const SA=(e,t,n)=>{let o=uwe(e,n);if(!o)return!1;let r=EA(o);if(!r){let i=o.blockRange(),l=i&&rv(i);return l==null?!1:(t&&t(e.tr.lift(i,l).scrollIntoView()),!0)}let s=r.nodeBefore;if(MA(e,r,t,-1))return!0;if(o.parent.content.size==0&&(fd(s,"end")||mt.isSelectable(s)))for(let i=o.depth;;i--){let l=lC(e.doc,o.before(i),o.after(i),Ye.empty);if(l&&l.slice.size<l.to-l.from){if(t){let a=e.tr.step(l);a.setSelection(fd(s,"end")?bt.findFrom(a.doc.resolve(a.mapping.map(r.pos,-1)),-1):mt.create(a.doc,r.pos-s.nodeSize)),t(a.scrollIntoView())}return!0}if(i==1||o.node(i-1).childCount>1)break}return s.isAtom&&r.depth==o.depth-1?(t&&t(e.tr.delete(r.pos-s.nodeSize,r.pos).scrollIntoView()),!0):!1};function fd(e,t,n=!1){for(let o=e;o;o=t=="start"?o.firstChild:o.lastChild){if(o.isTextblock)return!0;if(n&&o.childCount!=1)return!1}return!1}const $A=(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=EA(o)}let i=s&&s.nodeBefore;return!i||!mt.isSelectable(i)?!1:(t&&t(e.tr.setSelection(mt.create(e.doc,s.pos-i.nodeSize)).scrollIntoView()),!0)};function EA(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 cwe(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const dwe=(e,t,n)=>{let o=cwe(e,n);if(!o)return!1;let r=xA(o);if(!r)return!1;let s=r.nodeAfter;if(MA(e,r,t,1))return!0;if(o.parent.content.size==0&&(fd(s,"start")||mt.isSelectable(s))){let i=lC(e.doc,o.before(),o.after(),Ye.empty);if(i&&i.slice.size<i.to-i.from){if(t){let l=e.tr.step(i);l.setSelection(fd(s,"start")?bt.findFrom(l.doc.resolve(l.mapping.map(r.pos)),1):mt.create(l.doc,l.mapping.map(r.pos))),t(l.scrollIntoView())}return!0}}return s.isAtom&&r.depth==o.depth-1?(t&&t(e.tr.delete(r.pos,r.pos+s.nodeSize).scrollIntoView()),!0):!1},fwe=(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=xA(o)}let i=s&&s.nodeAfter;return!i||!mt.isSelectable(i)?!1:(t&&t(e.tr.setSelection(mt.create(e.doc,s.pos)).scrollIntoView()),!0)};function xA(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 pwe=(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 pC(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 hwe=(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=pC(r.contentMatchAt(s));if(!i||!r.canReplaceWith(s,s,i))return!1;if(t){let l=n.after(),a=e.tr.replaceWith(l,l,i.createAndFill());a.setSelection(bt.near(a.doc.resolve(l),1)),t(a.scrollIntoView())}return!0},mwe=(e,t)=>{let n=e.selection,{$from:o,$to:r}=n;if(n instanceof gr||o.parent.inlineContent||r.parent.inlineContent)return!1;let s=pC(r.parent.contentMatchAt(r.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let i=(!o.parentOffset&&r.index()<r.parent.childCount?o:r).pos,l=e.tr.insert(i,s.createAndFill());l.setSelection(ht.create(l.doc,i+1)),t(l.scrollIntoView())}return!0},gwe=(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(tp(e.doc,s))return t&&t(e.tr.split(s).scrollIntoView()),!0}let o=n.blockRange(),r=o&&rv(o);return r==null?!1:(t&&t(e.tr.lift(o,r).scrollIntoView()),!0)};function vwe(e){return(t,n)=>{let{$from:o,$to:r}=t.selection;if(t.selection instanceof mt&&t.selection.node.isBlock)return!o.parentOffset||!tp(t.doc,o.pos)?!1:(n&&n(t.tr.split(o.pos).scrollIntoView()),!0);if(!o.parent.isBlock)return!1;if(n){let s=r.parentOffset==r.parent.content.size,i=t.tr;(t.selection instanceof ht||t.selection instanceof gr)&&i.deleteSelection();let l=o.depth==0?null:pC(o.node(-1).contentMatchAt(o.indexAfter(-1))),a=e&&e(r.parent,s,o),u=a?[a]:s&&l?[{type:l}]:void 0,c=tp(i.doc,i.mapping.map(o.pos),1,u);if(!u&&!c&&tp(i.doc,i.mapping.map(o.pos),1,l?[{type:l}]:void 0)&&(l&&(u=[{type:l}]),c=!0),c&&(i.split(i.mapping.map(o.pos),1,u),!s&&!o.parentOffset&&o.parent.type!=l)){let d=i.mapping.map(o.before()),f=i.doc.resolve(d);l&&o.node(-1).canReplaceWith(f.index(),f.index()+1,l)&&i.setNodeMarkup(i.mapping.map(o.before()),l)}n(i.scrollIntoView())}return!0}}const ywe=vwe(),_we=(e,t)=>(t&&t(e.tr.setSelection(new gr(e.doc))),!0);function bwe(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||sv(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,o.type,o.contentMatchAt(o.childCount)).join(t.pos).scrollIntoView()),!0)}function MA(e,t,n,o){let r=t.nodeBefore,s=t.nodeAfter,i,l,a=r.type.spec.isolating||s.type.spec.isolating;if(!a&&bwe(e,t,n))return!0;let u=!a&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(i=(l=r.contentMatchAt(r.childCount)).findWrapping(s.type))&&l.matchType(i[0]||s.type).validEnd){if(n){let p=t.pos+s.nodeSize,h=Ue.empty;for(let v=i.length-1;v>=0;v--)h=Ue.from(i[v].create(null,h));h=Ue.from(r.copy(h));let m=e.tr.step(new vo(t.pos-1,p,t.pos,p,new Ye(h,1,0),i.length,!0)),y=p+2*i.length;sv(m.doc,y)&&m.join(y),n(m.scrollIntoView())}return!0}let c=s.type.spec.isolating||o>0&&a?null:bt.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),f=d&&rv(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(u&&fd(s,"start",!0)&&fd(r,"end")){let p=r,h=[];for(;h.push(p),!p.isTextblock;)p=p.lastChild;let m=s,y=1;for(;!m.isTextblock;m=m.firstChild)y++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(n){let v=Ue.empty;for(let _=h.length-1;_>=0;_--)v=Ue.from(h[_].copy(v));let w=e.tr.step(new vo(t.pos-h.length,t.pos+s.nodeSize,t.pos+y,t.pos+s.nodeSize-y,new Ye(v,h.length,0),0,!0));n(w.scrollIntoView())}return!0}}return!1}function TA(e){return function(t,n){let o=t.selection,r=e<0?o.$from:o.$to,s=r.depth;for(;r.node(s).isInline;){if(!s)return!1;s--}return r.node(s).isTextblock?(n&&n(t.tr.setSelection(ht.create(t.doc,e<0?r.start(s):r.end(s)))),!0):!1}}const wwe=TA(-1),Cwe=TA(1);function hC(e,t=null){return function(n,o){let{$from:r,$to:s}=n.selection,i=r.blockRange(s),l=i&&iC(i,e,t);return l?(o&&o(n.tr.wrap(i,l).scrollIntoView()),!0):!1}}function jp(e,t=null){return function(n,o){let r=!1;for(let s=0;s<n.selection.ranges.length&&!r;s++){let{$from:{pos:i},$to:{pos:l}}=n.selection.ranges[s];n.doc.nodesBetween(i,l,(a,u)=>{if(r)return!1;if(!(!a.isTextblock||a.hasMarkup(e,t)))if(a.type==e)r=!0;else{let c=n.doc.resolve(u),d=c.index();r=c.parent.canReplaceWith(d,d+1,e)}})}if(!r)return!1;if(o){let s=n.tr;for(let i=0;i<n.selection.ranges.length;i++){let{$from:{pos:l},$to:{pos:a}}=n.selection.ranges[i];s.setBlockType(l,a,e,t)}o(s.scrollIntoView())}return!0}}function kwe(e,t,n,o){for(let r=0;r<t.length;r++){let{$from:s,$to:i}=t[r],l=s.depth==0?e.inlineContent&&e.type.allowsMarkType(n):!1;if(e.nodesBetween(s.pos,i.pos,(a,u)=>{if(l||!o&&a.isAtom&&a.isInline&&u>=s.pos&&u+a.nodeSize<=i.pos)return!1;l=a.inlineContent&&a.type.allowsMarkType(n)}),l)return!0}return!1}function Swe(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 Yg(o,o.doc.resolve(i+1))),o=o.doc.resolve(i+1+s.content.size),!1}),o.pos<r.pos&&t.push(new Yg(o,r))}return t}function cv(e,t=null,n){let o=(n&&n.removeWhenPresent)!==!1,r=(n&&n.enterInlineAtoms)!==!1;return function(s,i){let{empty:l,$cursor:a,ranges:u}=s.selection;if(l&&!a||!kwe(s.doc,u,e,r))return!1;if(i)if(a)e.isInSet(s.storedMarks||a.marks())?i(s.tr.removeStoredMark(e)):i(s.tr.addStoredMark(e.create(t)));else{let c,d=s.tr;r||(u=Swe(u)),o?c=!u.some(f=>s.doc.rangeHasMark(f.$from.pos,f.$to.pos,e)):c=!u.every(f=>{let p=!1;return d.doc.nodesBetween(f.$from.pos,f.$to.pos,(h,m,y)=>{if(p)return!1;p=!e.isInSet(h.marks)&&!!y&&y.type.allowsMarkType(e)&&!(h.isText&&/^\s*$/.test(h.textBetween(Math.max(0,f.$from.pos-m),Math.min(h.nodeSize,f.$to.pos-m))))}),!p});for(let f=0;f<u.length;f++){let{$from:p,$to:h}=u[f];if(!c)d.removeMark(p.pos,h.pos,e);else{let m=p.pos,y=h.pos,v=p.nodeAfter,w=h.nodeBefore,_=v&&v.isText?/^\s*/.exec(v.text)[0].length:0,S=w&&w.isText?/\s*$/.exec(w.text)[0].length:0;m+_<y&&(m+=_,y-=S),d.addMark(m,y,e.create(t))}}i(d.scrollIntoView())}return!0}}function dv(...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 Ny=dv(fC,SA,$A),qS=dv(fC,dwe,fwe);const yi={Enter:dv(pwe,mwe,gwe,ywe),"Mod-Enter":hwe,Backspace:Ny,"Mod-Backspace":Ny,"Shift-Backspace":Ny,Delete:qS,"Mod-Delete":qS,"Mod-a":_we},OA={"Ctrl-h":yi.Backspace,"Alt-Backspace":yi["Mod-Backspace"],"Ctrl-d":yi.Delete,"Ctrl-Alt-Backspace":yi["Mod-Delete"],"Alt-Delete":yi["Mod-Delete"],"Alt-d":yi["Mod-Delete"],"Ctrl-a":wwe,"Ctrl-e":Cwe};for(let e in yi)OA[e]=yi[e];const $we=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,Ewe=$we?OA:yi;var Kl={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:'"'},xwe=typeof navigator<"u"&&/Mac/.test(navigator.platform),Mwe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var to=0;to<10;to++)Kl[48+to]=Kl[96+to]=String(to);for(var to=1;to<=24;to++)Kl[to+111]="F"+to;for(var to=65;to<=90;to++)Kl[to]=String.fromCharCode(to+32),Zg[to]=String.fromCharCode(to);for(var Py in Kl)Zg.hasOwnProperty(Py)||(Zg[Py]=Kl[Py]);function Twe(e){var t=xwe&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||Mwe&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Zg:Kl)[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 Owe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function Iwe(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))Owe?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 Awe(e){let t=Object.create(null);for(let n in e)t[Iwe(n)]=e[n];return t}function Ly(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 IA(e){return new xn({props:{handleKeyDown:AA(e)}})}function AA(e){let t=Awe(e);return function(n,o){let r=Twe(o),s,i=t[Ly(r,o)];if(i&&i(n.state,n.dispatch,n))return!0;if(r.length==1&&r!=" "){if(o.shiftKey){let l=t[Ly(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=Kl[o.keyCode])&&s!=r){let l=t[Ly(s,o)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}const no=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Hp=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let t2=null;const vi=function(e,t,n){let o=t2||(t2=document.createRange());return o.setEnd(e,n??e.nodeValue.length),o.setStart(e,t||0),o},Nwe=function(){t2=null},hu=function(e,t,n,o){return n&&(GS(e,t,n,o,-1)||GS(e,t,n,o,1))},Pwe=/^(img|br|input|textarea|hr)$/i;function GS(e,t,n,o,r){for(;;){if(e==n&&t==o)return!0;if(t==(r<0?0:Bs(e))){let s=e.parentNode;if(!s||s.nodeType!=1||Mh(e)||Pwe.test(e.nodeName)||e.contentEditable=="false")return!1;t=no(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?Bs(e):0}else return!1}}function Bs(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Lwe(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=Bs(e)}else if(e.parentNode&&!Mh(e))t=no(e),e=e.parentNode;else return null}}function Rwe(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!Mh(e))t=no(e)+1,e=e.parentNode;else return null}}function Dwe(e,t,n){for(let o=t==0,r=t==Bs(e);o||r;){if(e==n)return!0;let s=no(e);if(e=e.parentNode,!e)return!1;o=o&&s==0,r=r&&s==Bs(e)}}function Mh(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const fv=function(e){return e.focusNode&&hu(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function xa(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function Fwe(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function Vwe(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 Js=typeof navigator<"u"?navigator:null,YS=typeof document<"u"?document:null,ra=Js&&Js.userAgent||"",n2=/Edge\/(\d+)/.exec(ra),NA=/MSIE \d/.exec(ra),o2=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ra),Go=!!(NA||o2||n2),Rl=NA?document.documentMode:o2?+o2[1]:n2?+n2[1]:0,vs=!Go&&/gecko\/(\d+)/i.test(ra);vs&&+(/Firefox\/(\d+)/.exec(ra)||[0,0])[1];const r2=!Go&&/Chrome\/(\d+)/.exec(ra),mo=!!r2,PA=r2?+r2[1]:0,Io=!Go&&!!Js&&/Apple Computer/.test(Js.vendor),pd=Io&&(/Mobile\/\w+/.test(ra)||!!Js&&Js.maxTouchPoints>2),Er=pd||(Js?/Mac/.test(Js.platform):!1),Bwe=Js?/Win/.test(Js.platform):!1,rs=/Android \d/.test(ra),Th=!!YS&&"webkitFontSmoothing"in YS.documentElement.style,zwe=Th?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function jwe(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 di(e,t){return typeof e=="number"?e:e[t]}function Hwe(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 ZS(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=Hp(i)){if(i.nodeType!=1)continue;let l=i,a=l==s.body,u=a?jwe(s):Hwe(l),c=0,d=0;if(t.top<u.top+di(o,"top")?d=-(u.top-t.top+di(r,"top")):t.bottom>u.bottom-di(o,"bottom")&&(d=t.bottom-t.top>u.bottom-u.top?t.top+di(r,"top")-u.top:t.bottom-u.bottom+di(r,"bottom")),t.left<u.left+di(o,"left")?c=-(u.left-t.left+di(r,"left")):t.right>u.right-di(o,"right")&&(c=t.right-u.right+di(r,"right")),c||d)if(a)s.defaultView.scrollBy(c,d);else{let f=l.scrollLeft,p=l.scrollTop;d&&(l.scrollTop+=d),c&&(l.scrollLeft+=c);let h=l.scrollLeft-f,m=l.scrollTop-p;t={left:t.left-h,top:t.top-m,right:t.right-h,bottom:t.bottom-m}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(i).position))break}}function Uwe(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:LA(e.dom)}}function LA(e){let t=[],n=e.ownerDocument;for(let o=e;o&&(t.push({dom:o,top:o.scrollTop,left:o.scrollLeft}),e!=n);o=Hp(o));return t}function Wwe({refDOM:e,refTop:t,stack:n}){let o=e?e.getBoundingClientRect().top:0;RA(n,o==0?0:o-t)}function RA(e,t){for(let n=0;n<e.length;n++){let{dom:o,top:r,left:s}=e[n];o.scrollTop!=r+t&&(o.scrollTop=r+t),o.scrollLeft!=s&&(o.scrollLeft=s)}}let Ru=null;function Kwe(e){if(e.setActive)return e.setActive();if(Ru)return e.focus(Ru);let t=LA(e);e.focus(Ru==null?{get preventScroll(){return Ru={preventScroll:!0},!0}}:void 0),Ru||(Ru=!1,RA(t,0))}function DA(e,t){let n,o=2e8,r,s=0,i=t.top,l=t.top,a,u;for(let c=e.firstChild,d=0;c;c=c.nextSibling,d++){let f;if(c.nodeType==1)f=c.getClientRects();else if(c.nodeType==3)f=vi(c).getClientRects();else continue;for(let p=0;p<f.length;p++){let h=f[p];if(h.top<=i&&h.bottom>=l){i=Math.max(h.bottom,i),l=Math.min(h.top,l);let m=h.left>t.left?h.left-t.left:h.right<t.left?t.left-h.right:0;if(m<o){n=c,o=m,r=m&&n.nodeType==3?{left:h.right<t.left?h.right:h.left,top:t.top}:t,c.nodeType==1&&m&&(s=d+(t.left>=(h.left+h.right)/2?1:0));continue}}else h.top>t.top&&!a&&h.left<=t.left&&h.right>=t.left&&(a=c,u={left:Math.max(h.left,Math.min(h.right,t.left)),top:h.top});!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(s=d+1)}}return!n&&a&&(n=a,r=u,o=0),n&&n.nodeType==3?qwe(n,r):!n||o&&n.nodeType==1?{node:e,offset:s}:DA(n,r)}function qwe(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=ll(o,1);if(s.top!=s.bottom&&mC(t,s))return{node:e,offset:r+(t.left>=(s.left+s.right)/2?1:0)}}return{node:e,offset:0}}function mC(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Gwe(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function Ywe(e,t,n){let{node:o,offset:r}=DA(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 Zwe(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 FA(e,t,n){let o=e.childNodes.length;if(o&&n.top<n.bottom)for(let r=Math.max(0,Math.min(o-1,Math.floor(o*(t.top-n.top)/(n.bottom-n.top))-2)),s=r;;){let i=e.childNodes[s];if(i.nodeType==1){let l=i.getClientRects();for(let a=0;a<l.length;a++){let u=l[a];if(mC(t,u))return FA(i,t,u)}}if((s=(s+1)%o)==r)break}return e}function Jwe(e,t){let n=e.dom.ownerDocument,o,r=0,s=Vwe(n,t.left,t.top);s&&({node:o,offset:r}=s);let i=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),l;if(!i||!e.dom.contains(i.nodeType!=1?i.parentNode:i)){let u=e.dom.getBoundingClientRect();if(!mC(t,u)||(i=FA(e.dom,t,u),!i))return null}if(Io)for(let u=i;o&&u;u=Hp(u))u.draggable&&(o=void 0);if(i=Gwe(i,t),o){if(vs&&o.nodeType==1&&(r=Math.min(r,o.childNodes.length),r<o.childNodes.length)){let c=o.childNodes[r],d;c.nodeName=="IMG"&&(d=c.getBoundingClientRect()).right<=t.left&&d.bottom>t.top&&r++}let u;Th&&r&&o.nodeType==1&&(u=o.childNodes[r-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&r--,o==e.dom&&r==o.childNodes.length-1&&o.lastChild.nodeType==1&&t.top>o.lastChild.getBoundingClientRect().bottom?l=e.state.doc.content.size:(r==0||o.nodeType!=1||o.childNodes[r-1].nodeName!="BR")&&(l=Zwe(e,o,r,t))}l==null&&(l=Ywe(e,i,t));let a=e.docView.nearestDesc(i,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function JS(e){return e.top<e.bottom||e.left<e.right}function ll(e,t){let n=e.getClientRects();if(n.length){let o=n[t<0?0:n.length-1];if(JS(o))return o}return Array.prototype.find.call(n,JS)||e.getBoundingClientRect()}const Xwe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function VA(e,t,n){let{node:o,offset:r,atom:s}=e.docView.domFromPos(t,n<0?-1:1),i=Th||vs;if(o.nodeType==3)if(i&&(Xwe.test(o.nodeValue)||(n<0?!r:r==o.nodeValue.length))){let a=ll(vi(o,r,r),n);if(vs&&r&&/\s/.test(o.nodeValue[r-1])&&r<o.nodeValue.length){let u=ll(vi(o,r-1,r-1),-1);if(u.top==a.top){let c=ll(vi(o,r,r+1),-1);if(c.top!=a.top)return Gd(c,c.left<u.left)}}return a}else{let a=r,u=r,c=n<0?1:-1;return n<0&&!r?(u++,c=-1):n>=0&&r==o.nodeValue.length?(a--,c=1):n<0?a--:u++,Gd(ll(vi(o,a,u),c),c<0)}if(!e.state.doc.resolve(t-(s||0)).parent.inlineContent){if(s==null&&r&&(n<0||r==Bs(o))){let a=o.childNodes[r-1];if(a.nodeType==1)return Ry(a.getBoundingClientRect(),!1)}if(s==null&&r<Bs(o)){let a=o.childNodes[r];if(a.nodeType==1)return Ry(a.getBoundingClientRect(),!0)}return Ry(o.getBoundingClientRect(),n>=0)}if(s==null&&r&&(n<0||r==Bs(o))){let a=o.childNodes[r-1],u=a.nodeType==3?vi(a,Bs(a)-(i?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(u)return Gd(ll(u,1),!1)}if(s==null&&r<Bs(o)){let a=o.childNodes[r];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let u=a?a.nodeType==3?vi(a,0,i?0:1):a.nodeType==1?a:null:null;if(u)return Gd(ll(u,-1),!0)}return Gd(ll(o.nodeType==3?vi(o):o,-n),n>=0)}function Gd(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 Ry(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 BA(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 Qwe(e,t,n){let o=t.selection,r=n=="up"?o.$from:o.$to;return BA(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=VA(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=vi(l,0,l.nodeValue.length).getClientRects();else continue;for(let u=0;u<a.length;u++){let c=a[u];if(c.bottom>c.top+1&&(n=="up"?i.top-c.top>(c.bottom-i.top)*2:c.bottom-i.bottom>(i.bottom-c.top)*2))return!1}}return!0})}const e3e=/[\u0590-\u08ac]/;function t3e(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?!e3e.test(o.parent.textContent)||!l.modify?n=="left"||n=="backward"?s:i:BA(e,t,()=>{let{focusNode:a,focusOffset:u,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",n,"character");let p=o.depth?e.docView.domAfterPos(o.before()):e.dom,{focusNode:h,focusOffset:m}=e.domSelectionRange(),y=h&&!p.contains(h.nodeType==1?h:h.parentNode)||a==h&&u==m;try{l.collapse(c,d),a&&(a!=c||u!=d)&&l.extend&&l.extend(a,u)}catch{}return f!=null&&(l.caretBidiLevel=f),y}):o.pos==o.start()||o.pos==o.end()}let XS=null,QS=null,e9=!1;function n3e(e,t,n){return XS==t&&QS==n?e9:(XS=t,QS=n,e9=n=="up"||n=="down"?Qwe(e,t,n):t3e(e,t,n))}const Dr=0,t9=1,Ra=2,Xs=3;class Oh{constructor(t,n,o,r){this.parent=t,this.children=n,this.dom=o,this.contentDOM=r,this.dirty=Dr,o.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,o){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,o=this.posAtStart;;n++){let r=this.children[n];if(r==t)return o;o+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,n,o){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(o<0){let s,i;if(t==this.contentDOM)s=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;s=t.previousSibling}for(;s&&!((i=s.pmViewDesc)&&i.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(i)+i.size:this.posAtStart}else{let s,i;if(t==this.contentDOM)s=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;s=t.nextSibling}for(;s&&!((i=s.pmViewDesc)&&i.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(i):this.posAtEnd}let r;if(t==this.dom&&this.contentDOM)r=n>no(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 jA){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 zA&&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?no(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?no(s.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,o=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,s=-1;for(let i=o,l=0;;l++){let a=this.children[l],u=i+a.size;if(r==-1&&t<=u){let c=i+a.border;if(t>=c&&n<=u-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(t,n,c);t=i;for(let d=l;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){r=no(f.dom)+1;break}t-=f.size}r==-1&&(r=0)}if(r>-1&&(u>n||l==this.children.length-1)){n=u;for(let c=l+1;c<this.children.length;c++){let d=this.children[c];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){s=no(d.dom);break}n+=d.size}s==-1&&(s=this.contentDOM.childNodes.length);break}i=u}return{node:this.contentDOM,from:t,to:n,fromOffset:r,toOffset:s}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:o}=this.domFromPos(t,0);if(n.nodeType!=1||o==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[o]}setSelection(t,n,o,r=!1){let s=Math.min(t,n),i=Math.max(t,n);for(let f=0,p=0;f<this.children.length;f++){let h=this.children[f],m=p+h.size;if(s>p&&i<m)return h.setSelection(t-p-h.border,n-p-h.border,o,r);p=m}let l=this.domFromPos(t,t?-1:1),a=n==t?l:this.domFromPos(n,n?-1:1),u=o.getSelection(),c=!1;if((vs||Io)&&t==n){let{node:f,offset:p}=l;if(f.nodeType==3){if(c=!!(p&&f.nodeValue[p-1]==`
115 -`),c&&p==f.nodeValue.length)for(let h=f,m;h;h=h.parentNode){if(m=h.nextSibling){m.nodeName=="BR"&&(l=a={node:m.parentNode,offset:no(m)+1});break}let y=h.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let h=f.childNodes[p-1];c=h&&(h.nodeName=="BR"||h.contentEditable=="false")}}if(vs&&u.focusNode&&u.focusNode!=a.node&&u.focusNode.nodeType==1){let f=u.focusNode.childNodes[u.focusOffset];f&&f.contentEditable=="false"&&(r=!0)}if(!(r||c&&Io)&&hu(l.node,l.offset,u.anchorNode,u.anchorOffset)&&hu(a.node,a.offset,u.focusNode,u.focusOffset))return;let d=!1;if((u.extend||t==n)&&!c){u.collapse(l.node,l.offset);try{t!=n&&u.extend(a.node,a.offset),d=!0}catch{}}if(!d){if(t>n){let p=l;l=a,a=p}let f=document.createRange();f.setEnd(a.node,a.offset),f.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(f)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let o=0,r=0;r<this.children.length;r++){let s=this.children[r],i=o+s.size;if(o==i?t<=i&&n>=o:t<i&&n>o){let l=o+s.border,a=i-s.border;if(t>=l&&n<=a){this.dirty=t==o||n==i?Ra:t9,t==l&&n==a&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=Xs:s.markDirty(t-l,n-l);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?Ra:Xs}o=i}this.dirty=Ra}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let o=t==1?Ra:t9;n.dirty<o&&(n.dirty=o)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(t){return!1}}class zA extends Oh{constructor(t,n,o,r){let s,i=n.type.toDOM;if(typeof i=="function"&&(i=i(o,()=>{if(!s)return r;if(s.parent)return s.parent.posBeforeChild(s)})),!n.type.spec.raw){if(i.nodeType!=1){let l=document.createElement("span");l.appendChild(i),i=l}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(t,[],i,null),this.widget=n,this.widget=n,s=this}matchesWidget(t){return this.dirty==Dr&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class o3e extends Oh{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 mu extends Oh{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=ta.renderSpec(document,n.type.spec.toDOM(n,o),null,n.attrs)),new mu(t,n,i.dom,i.contentDOM||i.dom)}parseRule(){return this.dirty&Xs||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Xs&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Dr){let o=this.parent;for(;!o.node;)o=o.parent;o.dirty<this.dirty&&(o.dirty=this.dirty),this.dirty=Dr}}slice(t,n,o){let r=mu.create(this.parent,this.mark,!0,o),s=this.children,i=this.size;n<i&&(s=l2(s,n,i,o)),t>0&&(s=l2(s,0,t,o));for(let l=0;l<s.length;l++)s[l].parent=r;return r.children=s,r}}class Dl extends Oh{constructor(t,n,o,r,s,i,l,a,u){super(t,[],s,i),this.node=n,this.outerDeco=o,this.innerDeco=r,this.nodeDOM=l}static create(t,n,o,r,s,i){let l=s.nodeViews[n.type.name],a,u=l&&l(n,s,()=>{if(!a)return i;if(a.parent)return a.parent.posBeforeChild(a)},o,r),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=ta.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=WA(c,o,n),u?a=new r3e(t,n,o,r,c,d||null,f,u,s,i+1):n.isText?new pv(t,n,o,r,c,f,s):new Dl(t,n,o,r,c,d||null,f,s,i+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let o=this.children[n];if(this.dom.contains(o.dom.parentNode)){t.contentElement=o.dom.parentNode;break}}t.contentElement||(t.getContent=()=>Ue.empty)}return t}matchesNode(t,n,o){return this.dirty==Dr&&t.eq(this.node)&&i2(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 i3e(this,i&&i.node,t);u3e(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?a.syncToMarks(u.spec.marks,o,t):u.type.side>=0&&!d&&a.syncToMarks(c==this.node.childCount?Yt.none:this.node.child(c).marks,o,t),a.placeWidget(u,t,r)},(u,c,d,f)=>{a.syncToMarks(u.marks,o,t);let p;a.findNodeMatch(u,c,d,f)||l&&t.state.selection.from>r&&t.state.selection.to<r+u.nodeSize&&(p=a.findIndexWithChild(s.node))>-1&&a.updateNodeAt(u,c,d,p,t)||a.updateNextNode(u,c,d,t,f,r)||a.addNode(u,c,d,t,r),r+=u.nodeSize}),a.syncToMarks([],o,t),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==Ra)&&(i&&this.protectLocalComposition(t,i),HA(this.contentDOM,this.children,t),pd&&c3e(this.dom))}localCompositionInfo(t,n){let{from:o,to:r}=t.state.selection;if(!(t.state.selection instanceof ht)||o<n||r>n+this.node.content.size)return null;let s=t.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let i=s.nodeValue,l=d3e(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 o3e(this,s,n,r);t.input.compositionNodes.push(i),this.children=l2(this.children,o,o+r.length,t,i)}update(t,n,o,r){return this.dirty==Xs||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,o,r),!0)}updateInner(t,n,o,r){this.updateOuterDeco(n),this.node=t,this.innerDeco=o,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=Dr}updateOuterDeco(t){if(i2(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,o=this.dom;this.dom=UA(this.dom,this.nodeDOM,s2(this.outerDeco,this.node,n),s2(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 n9(e,t,n,o,r){WA(o,t,e);let s=new Dl(void 0,e,t,n,o,o,o,r,0);return s.contentDOM&&s.updateChildren(r,0),s}class pv extends Dl{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==Xs||this.dirty!=Dr&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Dr||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=Dr,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,o){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,o)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,o){let r=this.node.cut(t,n),s=document.createTextNode(r.text);return new pv(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=Xs)}get domAtom(){return!1}isText(t){return this.node.text==t}}class jA extends Oh{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Dr&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class r3e extends Dl{constructor(t,n,o,r,s,i,l,a,u,c){super(t,n,o,r,s,i,l,u,c),this.spec=a}update(t,n,o,r){if(this.dirty==Xs)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 HA(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=o9(o),r=!0;o=o.nextSibling}else r=!0,e.insertBefore(l,o);if(i instanceof mu){let a=o?o.previousSibling:e.lastChild;HA(i.contentDOM,i.children,n),o=a?a.nextSibling:e.firstChild}}for(;o;)o=o9(o),r=!0;r&&n.trackWrites==e&&(n.trackWrites=null)}const np=function(e){e&&(this.nodeName=e)};np.prototype=Object.create(null);const Da=[new np];function s2(e,t,n){if(e.length==0)return Da;let o=n?Da[0]:new np,r=[o];for(let s=0;s<e.length;s++){let i=e[s].type.attrs;if(i){i.nodeName&&r.push(o=new np(i.nodeName));for(let l in i){let a=i[l];a!=null&&(n&&r.length==1&&r.push(o=new np(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 UA(e,t,n,o){if(n==Da&&o==Da)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=Da[0]),r=a}s3e(r,l||Da[0],i)}return r}function s3e(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 WA(e,t,n){return UA(e,e,Da,s2(t,n,e.nodeType!=1))}function i2(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 o9(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class i3e{constructor(t,n,o){this.lock=n,this.view=o,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=l3e(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let o=t;o<n;o++)this.top.children[o].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,o){let r=0,s=this.stack.length>>1,i=Math.min(s,t.length);for(;r<i&&(r==s-1?this.top:this.stack[r+1<<1]).matchesMark(t[r])&&t[r].type.spec.spanning!==!1;)r++;for(;r<s;)this.destroyRest(),this.top.dirty=Dr,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<t.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let a=this.index;a<Math.min(this.index+3,this.top.children.length);a++){let u=this.top.children[a];if(u.matchesMark(t[s])&&!this.isLocked(u.dom)){l=a;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=mu.create(this.top,t[s],n,o);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,s++}}findNodeMatch(t,n,o,r){let s=-1,i;if(r>=this.preMatch.index&&(i=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&i.matchesNode(t,n,o))s=this.top.children.indexOf(i,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l<a;l++){let u=this.top.children[l];if(u.matchesNode(t,n,o)&&!this.preMatch.matched.has(u)){s=l;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(t,n,o,r,s){let i=this.top.children[r];return i.dirty==Xs&&i.dom==i.contentDOM&&(i.dirty=Ra),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 Dl){let u=this.preMatch.matched.get(a);if(u!=null&&u!=s)return!1;let c=a.dom,d,f=this.isLocked(c)&&!(t.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==t.text&&a.dirty!=Xs&&i2(n,a.outerDeco));if(!f&&a.update(t,n,o,r))return this.destroyBetween(this.index,l),a.dom!=c&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(a,t,n,o,r,i)))return this.top.children[this.index]=d,d.contentDOM&&(d.dirty=Ra,d.updateChildren(r,i+1),d.dirty=Dr),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,o,r,s,i){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content))return null;let l=Dl.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=Dl.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 zA(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 mu;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof pv)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((Io||mo)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(t))this.index++;else{let o=document.createElement(t);t=="IMG"&&(o.className="ProseMirror-separator",o.alt=""),t=="BR"&&(o.className="ProseMirror-trailingBreak");let r=new jA(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 l3e(e,t){let n=t,o=n.children.length,r=e.childCount,s=new Map,i=[];e:for(;r>0;){let l;for(;;)if(o){let u=n.children[o-1];if(u instanceof mu)n=u,o=u.children.length;else{l=u,o--;break}}else{if(n==t)break e;o=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=e.child(r-1))break;--r,s.set(l,r),i.push(l)}}return{index:r,matched:s,matches:i.reverse()}}function a3e(e,t){return e.type.side-t.type.side}function u3e(e,t,n,o){let r=t.locals(e),s=0;if(r.length==0){for(let u=0;u<e.childCount;u++){let c=e.child(u);o(c,r,t.forChild(s,c),u),s+=c.nodeSize}return}let i=0,l=[],a=null;for(let u=0;;){let c,d;for(;i<r.length&&r[i].to==s;){let y=r[i++];y.widget&&(c?(d||(d=[c])).push(y):c=y)}if(c)if(d){d.sort(a3e);for(let y=0;y<d.length;y++)n(d[y],u,!!a)}else n(c,u,!!a);let f,p;if(a)p=-1,f=a,a=null;else if(u<e.childCount)p=u,f=e.child(u++);else break;for(let y=0;y<l.length;y++)l[y].to<=s&&l.splice(y--,1);for(;i<r.length&&r[i].from<=s&&r[i].to>s;)l.push(r[i++]);let h=s+f.nodeSize;if(f.isText){let y=h;i<r.length&&r[i].from<y&&(y=r[i].from);for(let v=0;v<l.length;v++)l[v].to<y&&(y=l[v].to);y<h&&(a=f.cut(y-s),f=f.cut(0,y-s),h=y,p=-1)}else for(;i<r.length&&r[i].to<h;)i++;let m=f.isInline&&!f.isLeaf?l.filter(y=>!y.inline):l.slice();o(f,m,t.forChild(s,f),p),s=h}}function c3e(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 d3e(e,t,n,o){for(let r=0,s=0;r<e.childCount&&s<=o;){let i=e.child(r++),l=s;if(s+=i.nodeSize,!i.isText)continue;let a=i.text;for(;r<e.childCount;){let u=e.child(r++);if(s+=u.nodeSize,!u.isText)break;a+=u.text}if(s>=n){if(s>=o&&a.slice(o-t.length-l,o-l)==t)return o-t.length;let u=l<o?a.lastIndexOf(t,o-l-1):-1;if(u>=0&&u+t.length+l>=n)return l+u;if(n==o&&a.length>=o+t.length-l&&a.slice(o-l,o-l+t.length)==t)return o}}return-1}function l2(e,t,n,o,r){let s=[];for(let i=0,l=0;i<e.length;i++){let a=e[i],u=l,c=l+=a.size;u>=n||c<=t?s.push(a):(u<t&&s.push(a.slice(0,t-u,o)),r&&(s.push(r),r=void 0),c>n&&s.push(a.slice(n-u,a.size,o)))}return s}function gC(e,t=null){let n=e.domSelectionRange(),o=e.state.doc;if(!n.focusNode)return null;let r=e.docView.nearestDesc(n.focusNode),s=r&&r.size==0,i=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(i<0)return null;let l=o.resolve(i),a,u;if(fv(n)){for(a=l;r&&!r.node;)r=r.parent;let c=r.node;if(r&&c.isAtom&&mt.isSelectable(c)&&r.parent&&!(c.isInline&&Dwe(n.focusNode,n.focusOffset,r.dom))){let d=r.posBefore;u=new mt(i==d?l:o.resolve(d))}}else{let c=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null;a=o.resolve(c)}if(!u){let c=t=="pointer"||e.state.selection.head<l.pos&&!s?1:-1;u=vC(e,a,l,c)}return u}function KA(e){return e.editable?e.hasFocus():GA(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Oi(e,t=!1){let n=e.state.selection;if(qA(e,n),!!KA(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&mo){let o=e.domSelectionRange(),r=e.domObserver.currentSelection;if(o.anchorNode&&r.anchorNode&&hu(o.anchorNode,o.anchorOffset,r.anchorNode,r.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)p3e(e);else{let{anchor:o,head:r}=n,s,i;r9&&!(n instanceof ht)&&(n.$from.parent.inlineContent||(s=s9(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(i=s9(e,n.to))),e.docView.setSelection(o,r,e.root,t),r9&&(s&&i9(s),i&&i9(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&f3e(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const r9=Io||mo&&PA<63;function s9(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(Io&&r&&r.contentEditable=="false")return Dy(r);if((!r||r.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(r)return Dy(r);if(s)return Dy(s)}}function Dy(e){return e.contentEditable="true",Io&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function i9(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function f3e(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(()=>{(!KA(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function p3e(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,no(o)+1):n.setStart(o,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!r&&!e.state.selection.visible&&Go&&Rl<=11&&(o.disabled=!0,o.disabled=!1)}function qA(e,t){if(t instanceof mt){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(l9(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else l9(e)}function l9(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function vC(e,t,n,o){return e.someProp("createSelectionBetween",r=>r(e,t,n))||ht.between(t,n,o)}function a9(e){return e.editable&&!e.hasFocus()?!1:GA(e)}function GA(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 h3e(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return hu(t.node,t.offset,n.anchorNode,n.anchorOffset)}function a2(e,t){let{$anchor:n,$head:o}=e.selection,r=t>0?n.max(o):n.min(o),s=r.parent.inlineContent?r.depth?e.doc.resolve(t>0?r.after():r.before()):null:r;return s&&bt.findFrom(s,t)}function _l(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function u9(e,t,n){let o=e.state.selection;if(o instanceof ht)if(n.indexOf("s")>-1){let{$head:r}=o,s=r.textOffset?null:t<0?r.nodeBefore:r.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let i=e.state.doc.resolve(r.pos+s.nodeSize*(t<0?-1:1));return _l(e,new ht(o.$anchor,i))}else if(o.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let r=a2(e.state,t);return r&&r instanceof mt?_l(e,r):!1}else if(!(Er&&n.indexOf("m")>-1)){let r=o.$head,s=r.textOffset?null:t<0?r.nodeBefore:r.nodeAfter,i;if(!s||s.isText)return!1;let l=t<0?r.pos-s.nodeSize:r.pos;return s.isAtom||(i=e.docView.descAt(l))&&!i.contentDOM?mt.isSelectable(s)?_l(e,new mt(t<0?e.state.doc.resolve(r.pos-s.nodeSize):r)):Th?_l(e,new ht(e.state.doc.resolve(t<0?l:l+s.nodeSize))):!1:!1}}else return!1;else{if(o instanceof mt&&o.node.isInline)return _l(e,new ht(t>0?o.$to:o.$from));{let r=a2(e.state,t);return r?_l(e,r):!1}}}function Jg(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function op(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Du(e,t){return t<0?m3e(e):g3e(e)}function m3e(e){let t=e.domSelectionRange(),n=t.focusNode,o=t.focusOffset;if(!n)return;let r,s,i=!1;for(vs&&n.nodeType==1&&o<Jg(n)&&op(n.childNodes[o],-1)&&(i=!0);;)if(o>0){if(n.nodeType!=1)break;{let l=n.childNodes[o-1];if(op(l,-1))r=n,s=--o;else if(l.nodeType==3)n=l,o=n.nodeValue.length;else break}}else{if(YA(n))break;{let l=n.previousSibling;for(;l&&op(l,-1);)r=n.parentNode,s=no(l),l=l.previousSibling;if(l)n=l,o=Jg(n);else{if(n=n.parentNode,n==e.dom)break;o=0}}}i?u2(e,n,o):r&&u2(e,r,s)}function g3e(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(op(l,1))s=n,i=++o;else break}else{if(YA(n))break;{let l=n.nextSibling;for(;l&&op(l,1);)s=l.parentNode,i=no(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&&u2(e,s,i)}function YA(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function v3e(e,t){for(;e&&t==e.childNodes.length&&!Mh(e);)t=no(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 y3e(e,t){for(;e&&!t&&!Mh(e);)t=no(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 u2(e,t,n){if(t.nodeType!=3){let s,i;(i=v3e(t,n))?(t=i,n=0):(s=y3e(t,n))&&(t=s,n=s.nodeValue.length)}let o=e.domSelection();if(!o)return;if(fv(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&&Oi(e)},50)}function c9(e,t){let n=e.state.doc.resolve(t);if(!(mo||Bwe)&&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 d9(e,t,n){let o=e.state.selection;if(o instanceof ht&&!o.empty||n.indexOf("s")>-1||Er&&n.indexOf("m")>-1)return!1;let{$from:r,$to:s}=o;if(!r.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let i=a2(e.state,t);if(i&&i instanceof mt)return _l(e,i)}if(!r.parent.inlineContent){let i=t<0?r:s,l=o instanceof gr?bt.near(i,t):bt.findFrom(i,t);return l?_l(e,l):!1}return!1}function f9(e,t){if(!(e.state.selection instanceof ht))return!0;let{$head:n,$anchor:o,empty:r}=e.state.selection;if(!n.sameParent(o))return!0;if(!r)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let s=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let i=e.state.tr;return t<0?i.delete(n.pos-s.nodeSize,n.pos):i.delete(n.pos,n.pos+s.nodeSize),e.dispatch(i),!0}return!1}function p9(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function _3e(e){if(!Io||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;p9(e,o,"true"),setTimeout(()=>p9(e,o,"false"),20)}return!1}function b3e(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function w3e(e,t){let n=t.keyCode,o=b3e(t);if(n==8||Er&&n==72&&o=="c")return f9(e,-1)||Du(e,-1);if(n==46&&!t.shiftKey||Er&&n==68&&o=="c")return f9(e,1)||Du(e,1);if(n==13||n==27)return!0;if(n==37||Er&&n==66&&o=="c"){let r=n==37?c9(e,e.state.selection.from)=="ltr"?-1:1:-1;return u9(e,r,o)||Du(e,r)}else if(n==39||Er&&n==70&&o=="c"){let r=n==39?c9(e,e.state.selection.from)=="ltr"?1:-1:1;return u9(e,r,o)||Du(e,r)}else{if(n==38||Er&&n==80&&o=="c")return d9(e,-1,o)||Du(e,-1);if(n==40||Er&&n==78&&o=="c")return _3e(e)||d9(e,1,o)||Du(e,1);if(o==(Er?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function ZA(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:o,openStart:r,openEnd:s}=t;for(;r>1&&s>1&&o.childCount==1&&o.firstChild.childCount==1;){r--,s--;let p=o.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),o=p.content}let i=e.someProp("clipboardSerializer")||ta.fromSchema(e.state.schema),l=nN(),a=l.createElement("div");a.appendChild(i.serializeFragment(o,{document:l}));let u=a.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=tN[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let h=l.createElement(c[p]);for(;a.firstChild;)h.appendChild(a.firstChild);a.appendChild(h),d++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${r} ${s}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,`
115 +`,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
116 +`),i;function s(o){return n.stack.push(o),r;function r(){n.stack.pop()}}}function A8e(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function E8e(t){const e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}function M8e(t,e){if(t.type==="definition"&&t.type===e.type)return 0}function T8e(t,e){return _8e(t,this,e)}function P8e(t,e){return y8e(t,this,e)}function I8e(t,e){return C8e(this,t,e)}function ZC(t){const e=this;e.compiler=n;function n(i){return $8e(i,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}}function DE(t){if(t)throw t}var J_=Object.prototype.hasOwnProperty,eB=Object.prototype.toString,RE=Object.defineProperty,VE=Object.getOwnPropertyDescriptor,FE=function(e){return typeof Array.isArray=="function"?Array.isArray(e):eB.call(e)==="[object Array]"},NE=function(e){if(!e||eB.call(e)!=="[object Object]")return!1;var n=J_.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&J_.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;var s;for(s in e);return typeof s>"u"||J_.call(e,s)},BE=function(e,n){RE&&n.name==="__proto__"?RE(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},zE=function(e,n){if(n==="__proto__")if(J_.call(e,n)){if(VE)return VE(e,n).value}else return;return e[n]},L8e=function t(){var e,n,i,s,o,r,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(e=arguments[l],e!=null)for(n in e)i=zE(a,n),s=zE(e,n),a!==s&&(u&&s&&(NE(s)||(o=FE(s)))?(o?(o=!1,r=i&&FE(i)?i:[]):r=i&&NE(i)?i:{},BE(a,{name:n,newValue:t(u,r,s)})):typeof s<"u"&&BE(a,{name:n,newValue:s}));return a};const n3=_i(L8e);function JC(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function O8e(){const t=[],e={run:n,use:i};return e;function n(...s){let o=-1;const r=s.pop();if(typeof r!="function")throw new TypeError("Expected function as last argument, not "+r);a(null,...s);function a(l,...c){const u=t[++o];let d=-1;if(l){r(l);return}for(;++d<s.length;)(c[d]===null||c[d]===void 0)&&(c[d]=s[d]);s=c,u?D8e(u,a)(...c):r(null,...c)}}function i(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),e}}function D8e(t,e){let n;return i;function i(...r){const a=t.length>r.length;let l;a&&r.push(s);try{l=t.apply(this,r)}catch(c){const u=c;if(a&&n)throw u;return s(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(o,s):l instanceof Error?s(l):o(l))}function s(r,...a){n||(n=!0,e(r,...a))}function o(r){s(null,r)}}class ko extends Error{constructor(e,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let s="",o={},r=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof e=="string"?s=e:!o.cause&&e&&(r=!0,s=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof i=="string"){const l=i.indexOf(":");l===-1?o.ruleId=i:(o.source=i.slice(0,l),o.ruleId=i.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=s,this.line=a?a.line:void 0,this.name=hg(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=r&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}ko.prototype.file="";ko.prototype.name="";ko.prototype.reason="";ko.prototype.message="";ko.prototype.stack="";ko.prototype.column=void 0;ko.prototype.line=void 0;ko.prototype.ancestors=void 0;ko.prototype.cause=void 0;ko.prototype.fatal=void 0;ko.prototype.place=void 0;ko.prototype.ruleId=void 0;ko.prototype.source=void 0;const ba={basename:R8e,dirname:V8e,extname:F8e,join:N8e,sep:"/"};function R8e(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');rv(t);let n=0,i=-1,s=t.length,o;if(e===void 0||e.length===0||e.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(o){n=s+1;break}}else i<0&&(o=!0,i=s+1);return i<0?"":t.slice(n,i)}if(e===t)return"";let r=-1,a=e.length-1;for(;s--;)if(t.codePointAt(s)===47){if(o){n=s+1;break}}else r<0&&(o=!0,r=s+1),a>-1&&(t.codePointAt(s)===e.codePointAt(a--)?a<0&&(i=s):(a=-1,i=r));return n===i?i=r:i<0&&(i=t.length),t.slice(n,i)}function V8e(t){if(rv(t),t.length===0)return".";let e=-1,n=t.length,i;for(;--n;)if(t.codePointAt(n)===47){if(i){e=n;break}}else i||(i=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function F8e(t){rv(t);let e=t.length,n=-1,i=0,s=-1,o=0,r;for(;e--;){const a=t.codePointAt(e);if(a===47){if(r){i=e+1;break}continue}n<0&&(r=!0,n=e+1),a===46?s<0?s=e:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||n<0||o===0||o===1&&s===n-1&&s===i+1?"":t.slice(s,n)}function N8e(...t){let e=-1,n;for(;++e<t.length;)rv(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":B8e(n)}function B8e(t){rv(t);const e=t.codePointAt(0)===47;let n=z8e(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function z8e(t,e){let n="",i=0,s=-1,o=0,r=-1,a,l;for(;++r<=t.length;){if(r<t.length)a=t.codePointAt(r);else{if(a===47)break;a=47}if(a===47){if(!(s===r-1||o===1))if(s!==r-1&&o===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",i=0):(n=n.slice(0,l),i=n.length-1-n.lastIndexOf("/")),s=r,o=0;continue}}else if(n.length>0){n="",i=0,s=r,o=0;continue}}e&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+t.slice(s+1,r):n=t.slice(s+1,r),i=r-s-1;s=r,o=0}else a===46&&o>-1?o++:o=-1}return n}function rv(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const H8e={cwd:U8e};function U8e(){return"/"}function QC(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function j8e(t){if(typeof t=="string")t=new URL(t);else if(!QC(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return W8e(t)}function W8e(t){if(t.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const i=e.codePointAt(n+2);if(i===70||i===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(e)}const s3=["history","path","basename","stem","extname","dirname"];class Y8e{constructor(e){let n;e?QC(e)?n={path:e}:typeof e=="string"||q8e(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":H8e.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<s3.length;){const o=s3[i];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let s;for(s in n)s3.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?ba.basename(this.path):void 0}set basename(e){o3(e,"basename"),i3(e,"basename"),this.path=ba.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?ba.dirname(this.path):void 0}set dirname(e){HE(this.basename,"dirname"),this.path=ba.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?ba.extname(this.path):void 0}set extname(e){if(i3(e,"extname"),HE(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ba.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){QC(e)&&(e=j8e(e)),o3(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?ba.basename(this.path,this.extname):void 0}set stem(e){o3(e,"stem"),i3(e,"stem"),this.path=ba.join(this.dirname||"",e+(this.extname||""))}fail(e,n,i){const s=this.message(e,n,i);throw s.fatal=!0,s}info(e,n,i){const s=this.message(e,n,i);return s.fatal=void 0,s}message(e,n,i){const s=new ko(e,n,i);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function i3(t,e){if(t&&t.includes(ba.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+ba.sep+"`")}function o3(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function HE(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function q8e(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const G8e=function(t){const i=this.constructor.prototype,s=i[t],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,i),o},X8e={}.hasOwnProperty;class Q8 extends G8e{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=O8e()}copy(){const e=new Q8;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];e.use(...i)}return e.data(n3(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(l3("data",this.frozen),this.namespace[e]=n,this):X8e.call(this.namespace,e)&&this.namespace[e]||void 0:e?(l3("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const s=n.call(e,...i);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=h_(e),i=this.parser||this.Parser;return r3("parse",i),i(String(n),n)}process(e,n){const i=this;return this.freeze(),r3("process",this.parser||this.Parser),a3("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(o,r){const a=h_(e),l=i.parse(a);i.run(l,a,function(u,d,h){if(u||!d||!h)return c(u);const f=d,p=i.stringify(f,h);Z8e(p)?h.value=p:h.result=p,c(u,h)});function c(u,d){u||!d?r(u):o?o(d):n(void 0,d)}}}processSync(e){let n=!1,i;return this.freeze(),r3("processSync",this.parser||this.Parser),a3("processSync",this.compiler||this.Compiler),this.process(e,s),jE("processSync","process",n),i;function s(o,r){n=!0,DE(o),i=r}}run(e,n,i){UE(e),this.freeze();const s=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?o(void 0,i):new Promise(o);function o(r,a){const l=h_(n);s.run(e,l,c);function c(u,d,h){const f=d||e;u?a(u):r?r(f):i(void 0,f,h)}}}runSync(e,n){let i=!1,s;return this.run(e,n,o),jE("runSync","run",i),s;function o(r,a){DE(r),s=a,i=!0}}stringify(e,n){this.freeze();const i=h_(n),s=this.compiler||this.Compiler;return a3("stringify",s),UE(e),s(e,i)}use(e,...n){const i=this.attachers,s=this.namespace;if(l3("use",this.frozen),e!=null)if(typeof e=="function")l(e,n);else if(typeof e=="object")Array.isArray(e)?a(e):r(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function o(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else r(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function r(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");a(c.plugins),c.settings&&(s.settings=n3(!0,s.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];o(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,h=-1;for(;++d<i.length;)if(i[d][0]===c){h=d;break}if(h===-1)i.push([c,...u]);else if(u.length>0){let[f,...p]=u;const m=i[h][1];JC(m)&&JC(f)&&(f=n3(!0,m,f)),i[h]=[c,f,...p]}}}}const ex=new Q8().freeze();function r3(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function a3(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function l3(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function UE(t){if(!JC(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function jE(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function h_(t){return K8e(t)?t:new Y8e(t)}function K8e(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function Z8e(t){return typeof t=="string"||J8e(t)}function J8e(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var tB=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},rn=(t,e,n)=>(tB(t,e,"read from private field"),n?n.call(t):e.get(t)),As=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},ns=(t,e,n,i)=>(tB(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);let nB=class{},sB=class{constructor(){this.elements=[],this.size=()=>this.elements.length,this.top=()=>this.elements.at(-1),this.push=e=>{var n;(n=this.top())==null||n.push(e)},this.open=e=>{this.elements.push(e)},this.close=()=>{const e=this.elements.pop();if(!e)throw tN();return e}}},Q8e=class iB extends nB{constructor(e,n,i){super(),this.type=e,this.content=n,this.attrs=i}push(e,...n){this.content.push(e,...n)}pop(){return this.content.pop()}static create(e,n,i){return new iB(e,n,i)}};var ma,mm,Q_,ey,ty,gm,vm;const tx=class extends sB{constructor(e){super(),As(this,ma,void 0),As(this,mm,void 0),As(this,Q_,void 0),As(this,ey,void 0),As(this,ty,void 0),As(this,gm,void 0),As(this,vm,void 0),ns(this,ma,En.none),ns(this,mm,n=>n.isText),ns(this,Q_,(n,i)=>{if(rn(this,mm).call(this,n)&&rn(this,mm).call(this,i)&&En.sameSet(n.marks,i.marks))return this.schema.text(n.text+i.text,n.marks)}),ns(this,ey,n=>{const i=Object.values({...this.schema.nodes,...this.schema.marks}).find(s=>s.spec.parseMarkdown.match(n));if(!i)throw WCe(n);return i}),ns(this,ty,n=>{const i=rn(this,ey).call(this,n);i.spec.parseMarkdown.runner(this,n,i)}),this.injectRoot=(n,i,s)=>(this.openNode(i,s),this.next(n.children),this),this.openNode=(n,i)=>(this.open(Q8e.create(n,[],i)),this),ns(this,gm,()=>{ns(this,ma,En.none);const n=this.close();return rn(this,vm).call(this,n.type,n.attrs,n.content)}),this.closeNode=()=>(rn(this,gm).call(this),this),ns(this,vm,(n,i,s)=>{const o=n.createAndFill(i,s,rn(this,ma));if(!o)throw jCe(n,i,s);return this.push(o),o}),this.addNode=(n,i,s)=>(rn(this,vm).call(this,n,i,s),this),this.openMark=(n,i)=>{const s=n.create(i);return ns(this,ma,s.addToSet(rn(this,ma))),this},this.closeMark=n=>(ns(this,ma,n.removeFromSet(rn(this,ma))),this),this.addText=n=>{const i=this.top();if(!i)throw tN();const s=i.pop(),o=this.schema.text(n,rn(this,ma));if(!s)return i.push(o),this;const r=rn(this,Q_).call(this,s,o);return r?(i.push(r),this):(i.push(s,o),this)},this.build=()=>{let n;do n=rn(this,gm).call(this);while(this.size());return n},this.next=(n=[])=>([n].flat().forEach(i=>rn(this,ty).call(this,i)),this),this.toDoc=()=>this.build(),this.run=(n,i)=>{const s=n.runSync(n.parse(i),i);return this.next(s),this},this.schema=e}};ma=new WeakMap,mm=new WeakMap,Q_=new WeakMap,ey=new WeakMap,ty=new WeakMap,gm=new WeakMap,vm=new WeakMap,tx.create=(t,e)=>{const n=new tx(t);return i=>(n.run(e,i),n.toDoc())};let e5e=tx;const nx=class extends nB{constructor(e,n,i,s={}){super(),this.type=e,this.children=n,this.value=i,this.props=s,this.push=(o,...r)=>{this.children||(this.children=[]),this.children.push(o,...r)},this.pop=()=>{var o;return(o=this.children)==null?void 0:o.pop()}}};nx.create=(t,e,n,i={})=>new nx(t,e,n,i);let WE=nx;const t5e=t=>Object.prototype.hasOwnProperty.call(t,"size");var Ga,_m,ny,sy,ym,iy,bm,oy,ry,Ih,$u,ay,wm;const sx=class extends sB{constructor(e){super(),As(this,Ga,void 0),As(this,_m,void 0),As(this,ny,void 0),As(this,sy,void 0),As(this,ym,void 0),As(this,iy,void 0),As(this,bm,void 0),As(this,oy,void 0),As(this,ry,void 0),As(this,Ih,void 0),As(this,$u,void 0),As(this,ay,void 0),As(this,wm,void 0),ns(this,Ga,En.none),ns(this,_m,n=>{const i=Object.values({...this.schema.nodes,...this.schema.marks}).find(s=>s.spec.toMarkdown.match(n));if(!i)throw YCe(n.type);return i}),ns(this,ny,n=>rn(this,_m).call(this,n).spec.toMarkdown.runner(this,n)),ns(this,sy,(n,i)=>rn(this,_m).call(this,n).spec.toMarkdown.runner(this,n,i)),ns(this,ym,n=>{const{marks:i}=n,s=o=>o.type.spec.priority??50;[...i].sort((o,r)=>s(o)-s(r)).every(o=>!rn(this,sy).call(this,o,n))&&rn(this,ny).call(this,n),i.forEach(o=>rn(this,wm).call(this,o))}),ns(this,iy,(n,i)=>{var s;if(n.type===i||((s=n.children)==null?void 0:s.length)!==1)return n;const o=c=>{var u;if(c.type===i)return c;if(((u=c.children)==null?void 0:u.length)!==1)return null;const[d]=c.children;return d?o(d):null},r=o(n);if(!r)return n;const a=r.children?[...r.children]:void 0,l={...n,children:a};return l.children=a,r.children=[l],r}),ns(this,bm,n=>{const{children:i}=n;return i&&(n.children=i.reduce((s,o,r)=>{if(r===0)return[o];const a=s.at(-1);if(a&&a.isMark&&o.isMark){o=rn(this,iy).call(this,o,a.type);const{children:l,...c}=o,{children:u,...d}=a;if(o.type===a.type&&l&&u&&JSON.stringify(c)===JSON.stringify(d)){const h={...d,children:[...u,...l]};return s.slice(0,-1).concat(rn(this,bm).call(this,h))}}return s.concat(o)},[])),n}),ns(this,oy,n=>{const i={...n.props,type:n.type};return n.children&&(i.children=n.children),n.value&&(i.value=n.value),i}),this.openNode=(n,i,s)=>(this.open(WE.create(n,void 0,i,s)),this),ns(this,ry,(n,i)=>{let s="",o="";const r=n.children;let a=-1,l=-1;const c=d=>{d&&d.forEach((h,f)=>{h.type==="text"&&h.value&&(a<0&&(a=f),l=f)})};if(r){c(r);const d=r==null?void 0:r[l],h=r==null?void 0:r[a];d&&d.value.endsWith(" ")&&(o=d.value.match(/ +$/)[0],d.value=d.value.trimEnd()),h&&h.value.startsWith(" ")&&(s=h.value.match(/^ +/)[0],h.value=h.value.trimStart())}s.length&&rn(this,$u).call(this,"text",void 0,s);const u=i();return o.length&&rn(this,$u).call(this,"text",void 0,o),u}),ns(this,Ih,(n=!1)=>{const i=this.close(),s=()=>rn(this,$u).call(this,i.type,i.children,i.value,i.props);return n?rn(this,ry).call(this,i,s):s()}),this.closeNode=()=>(rn(this,Ih).call(this),this),ns(this,$u,(n,i,s,o)=>{const r=WE.create(n,i,s,o),a=rn(this,bm).call(this,rn(this,oy).call(this,r));return this.push(a),a}),this.addNode=(n,i,s,o)=>(rn(this,$u).call(this,n,i,s,o),this),ns(this,ay,(n,i,s,o)=>n.isInSet(rn(this,Ga))?this:(ns(this,Ga,n.addToSet(rn(this,Ga))),this.openNode(i,s,{...o,isMark:!0}))),ns(this,wm,n=>{n.isInSet(rn(this,Ga))&&(ns(this,Ga,n.type.removeFromSet(rn(this,Ga))),rn(this,Ih).call(this,!0))}),this.withMark=(n,i,s,o)=>(rn(this,ay).call(this,n,i,s,o),this),this.closeMark=n=>(rn(this,wm).call(this,n),this),this.build=()=>{let n=null;do n=rn(this,Ih).call(this);while(this.size());return n},this.next=n=>t5e(n)?(n.forEach(i=>{rn(this,ym).call(this,i)}),this):(rn(this,ym).call(this,n),this),this.toString=n=>n.stringify(this.build()),this.run=n=>(this.next(n),this),this.schema=e}};Ga=new WeakMap,_m=new WeakMap,ny=new WeakMap,sy=new WeakMap,ym=new WeakMap,iy=new WeakMap,bm=new WeakMap,oy=new WeakMap,ry=new WeakMap,Ih=new WeakMap,$u=new WeakMap,ay=new WeakMap,wm=new WeakMap,sx.create=(t,e)=>{const n=new sx(t);return i=>(n.run(i),n.toString(e))};let n5e=sx;const oB=65535,rB=Math.pow(2,16);function s5e(t,e){return t+e*rB}function YE(t){return t&oB}function i5e(t){return(t-(t&oB))/rB}const aB=1,lB=2,ly=4,cB=8;class ix{constructor(e,n,i){this.pos=e,this.delInfo=n,this.recover=i}get deleted(){return(this.delInfo&cB)>0}get deletedBefore(){return(this.delInfo&(aB|ly))>0}get deletedAfter(){return(this.delInfo&(lB|ly))>0}get deletedAcross(){return(this.delInfo&ly)>0}}class Po{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Po.empty)return Po.empty}recover(e){let n=0,i=YE(e);if(!this.inverted)for(let s=0;s<i;s++)n+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[i*3]+n+i5e(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,i){let s=0,o=this.inverted?2:1,r=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?s:0);if(l>e)break;let c=this.ranges[a+o],u=this.ranges[a+r],d=l+c;if(e<=d){let h=c?e==l?-1:e==d?1:n:n,f=l+s+(h<0?0:u);if(i)return f;let p=e==(n<0?l:d)?null:s5e(a/3,e-l),m=e==l?lB:e==d?aB:ly;return(n<0?e!=l:e!=d)&&(m|=cB),new ix(f,m,p)}s+=u-c}return i?e+s:new ix(e+s,0,null)}touches(e,n){let i=0,s=YE(n),o=this.inverted?2:1,r=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let c=this.ranges[a+o],u=l+c;if(e<=u&&a==s*3)return!0;i+=this.ranges[a+r]-c}return!1}forEach(e){let n=this.inverted?2:1,i=this.inverted?1:2;for(let s=0,o=0;s<this.ranges.length;s+=3){let r=this.ranges[s],a=r-(this.inverted?o:0),l=r+(this.inverted?0:o),c=this.ranges[s+n],u=this.ranges[s+i];e(a,a+c,l,l+u),o+=u-c}}invert(){return new Po(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Po.empty:new Po(e<0?[0,-e,0]:[0,0,e])}}Po.empty=new Po([]);class df{constructor(e=[],n,i=0,s=e.length){this.maps=e,this.mirror=n,this.from=i,this.to=s}slice(e=0,n=this.maps.length){return new df(this.maps,this.mirror,e,n)}copy(){return new df(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,n){this.to=this.maps.push(e),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(e){for(let n=0,i=this.maps.length;n<e.maps.length;n++){let s=e.getMirror(n);this.appendMap(e.maps[n],s!=null&&s<n?i+s:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,i=this.maps.length+e.maps.length;n>=0;n--){let s=e.getMirror(n);this.appendMap(e.maps[n].invert(),s!=null&&s>n?i-s-1:void 0)}}invert(){let e=new df;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let i=this.from;i<this.to;i++)e=this.maps[i].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,i){let s=0;for(let o=this.from;o<this.to;o++){let r=this.maps[o],a=r.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,e=this.maps[l].recover(a.recover);continue}}s|=a.delInfo,e=a.pos}return i?e:new ix(e,s,null)}}const c3=Object.create(null);class Oi{getMap(){return Po.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let i=c3[n.stepType];if(!i)throw new RangeError(`No step type ${n.stepType} defined`);return i.fromJSON(e,n)}static jsonID(e,n){if(e in c3)throw new RangeError("Duplicate use of step JSON ID "+e);return c3[e]=n,n.prototype.jsonID=e,n}}class Is{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Is(e,null)}static fail(e){return new Is(null,e)}static fromReplace(e,n,i,s){try{return Is.ok(e.replace(n,i,s))}catch(o){if(o instanceof V0)return Is.fail(o.message);throw o}}}function e5(t,e,n){let i=[];for(let s=0;s<t.childCount;s++){let o=t.child(s);o.content.size&&(o=o.copy(e5(o.content,e,o))),o.isInline&&(o=e(o,n,s)),i.push(o)}return st.fromArray(i)}class al extends Oi{constructor(e,n,i){super(),this.from=e,this.to=n,this.mark=i}apply(e){let n=e.slice(this.from,this.to),i=e.resolve(this.from),s=i.node(i.sharedDepth(this.to)),o=new rt(e5(n.content,(r,a)=>!r.isAtom||!a.type.allowsMarkType(this.mark.type)?r:r.mark(this.mark.addToSet(r.marks)),s),n.openStart,n.openEnd);return Is.fromReplace(e,this.from,this.to,o)}invert(){return new Sa(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),i=e.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new al(n.pos,i.pos,this.mark)}merge(e){return e instanceof al&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new al(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new al(n.from,n.to,e.markFromJSON(n.mark))}}Oi.jsonID("addMark",al);class Sa extends Oi{constructor(e,n,i){super(),this.from=e,this.to=n,this.mark=i}apply(e){let n=e.slice(this.from,this.to),i=new rt(e5(n.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),n.openStart,n.openEnd);return Is.fromReplace(e,this.from,this.to,i)}invert(){return new al(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),i=e.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new Sa(n.pos,i.pos,this.mark)}merge(e){return e instanceof Sa&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Sa(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Sa(n.from,n.to,e.markFromJSON(n.mark))}}Oi.jsonID("removeMark",Sa);class xc extends Oi{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Is.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Is.fromReplace(e,this.pos,this.pos+1,new rt(st.from(i),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let i=this.mark.addToSet(n.marks);if(i.length==n.marks.length){for(let s=0;s<n.marks.length;s++)if(!n.marks[s].isInSet(i))return new xc(this.pos,n.marks[s]);return new xc(this.pos,this.mark)}}return new Zf(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new xc(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new xc(n.pos,e.markFromJSON(n.mark))}}Oi.jsonID("addNodeMark",xc);class Zf extends Oi{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Is.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Is.fromReplace(e,this.pos,this.pos+1,new rt(st.from(i),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new xc(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Zf(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Zf(n.pos,e.markFromJSON(n.mark))}}Oi.jsonID("removeNodeMark",Zf);class si extends Oi{constructor(e,n,i,s=!1){super(),this.from=e,this.to=n,this.slice=i,this.structure=s}apply(e){return this.structure&&ox(e,this.from,this.to)?Is.fail("Structure replace would overwrite content"):Is.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Po([this.from,this.to-this.from,this.slice.size])}invert(e){return new si(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),i=e.mapResult(this.to,-1);return n.deletedAcross&&i.deletedAcross?null:new si(n.pos,Math.max(n.pos,i.pos),this.slice)}merge(e){if(!(e instanceof si)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?rt.empty:new rt(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new si(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?rt.empty:new rt(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new si(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new si(n.from,n.to,rt.fromJSON(e,n.slice),!!n.structure)}}Oi.jsonID("replace",si);class Pi extends Oi{constructor(e,n,i,s,o,r,a=!1){super(),this.from=e,this.to=n,this.gapFrom=i,this.gapTo=s,this.slice=o,this.insert=r,this.structure=a}apply(e){if(this.structure&&(ox(e,this.from,this.gapFrom)||ox(e,this.gapTo,this.to)))return Is.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Is.fail("Gap is not a flat range");let i=this.slice.insertAt(this.insert,n.content);return i?Is.fromReplace(e,this.from,this.to,i):Is.fail("Content does not fit in gap")}getMap(){return new Po([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new Pi(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),i=e.mapResult(this.to,-1),s=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?i.pos:e.map(this.gapTo,1);return n.deletedAcross&&i.deletedAcross||s<n.pos||o>i.pos?null:new Pi(n.pos,i.pos,s,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,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 Pi(n.from,n.to,n.gapFrom,n.gapTo,rt.fromJSON(e,n.slice),n.insert,!!n.structure)}}Oi.jsonID("replaceAround",Pi);function ox(t,e,n){let i=t.resolve(e),s=n-e,o=i.depth;for(;s>0&&o>0&&i.indexAfter(o)==i.node(o).childCount;)o--,s--;if(s>0){let r=i.node(o).maybeChild(i.indexAfter(o));for(;s>0;){if(!r||r.isLeaf)return!0;r=r.firstChild,s--}}return!1}function o5e(t,e,n,i){let s=[],o=[],r,a;t.doc.nodesBetween(e,n,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!i.isInSet(d)&&u.type.allowsMarkType(i.type)){let h=Math.max(c,e),f=Math.min(c+l.nodeSize,n),p=i.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(p)||(r&&r.to==h&&r.mark.eq(d[m])?r.to=f:s.push(r=new Sa(h,f,d[m])));a&&a.to==h?a.to=f:o.push(a=new al(h,f,i))}}),s.forEach(l=>t.step(l)),o.forEach(l=>t.step(l))}function r5e(t,e,n,i){let s=[],o=0;t.doc.nodesBetween(e,n,(r,a)=>{if(!r.isInline)return;o++;let l=null;if(i instanceof m2){let c=r.marks,u;for(;u=i.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else i?i.isInSet(r.marks)&&(l=[i]):l=r.marks;if(l&&l.length){let c=Math.min(a+r.nodeSize,n);for(let u=0;u<l.length;u++){let d=l[u],h;for(let f=0;f<s.length;f++){let p=s[f];p.step==o-1&&d.eq(s[f].style)&&(h=p)}h?(h.to=c,h.step=o):s.push({style:d,from:Math.max(a,e),to:c,step:o})}}}),s.forEach(r=>t.step(new Sa(r.from,r.to,r.style)))}function uB(t,e,n,i=n.contentMatch,s=!0){let o=t.doc.nodeAt(e),r=[],a=e+1;for(let l=0;l<o.childCount;l++){let c=o.child(l),u=a+c.nodeSize,d=i.matchType(c.type);if(!d)r.push(new si(a,u,rt.empty));else{i=d;for(let h=0;h<c.marks.length;h++)n.allowsMarkType(c.marks[h].type)||t.step(new Sa(a,u,c.marks[h]));if(s&&c.isText&&n.whitespace!="pre"){let h,f=/\r?\n|\r/g,p;for(;h=f.exec(c.text);)p||(p=new rt(st.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),r.push(new si(a+h.index,a+h.index+h[0].length,p))}}a=u}if(!i.validEnd){let l=i.fillBefore(st.empty,!0);t.replace(a,a,new rt(l,0,0))}for(let l=r.length-1;l>=0;l--)t.step(r[l])}function a5e(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function w2(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let i=t.depth;;--i){let s=t.$from.node(i),o=t.$from.index(i),r=t.$to.indexAfter(i);if(i<t.depth&&s.canReplace(o,r,n))return i;if(i==0||s.type.spec.isolating||!a5e(s,o,r))break}return null}function l5e(t,e,n){let{$from:i,$to:s,depth:o}=e,r=i.before(o+1),a=s.after(o+1),l=r,c=a,u=st.empty,d=0;for(let p=o,m=!1;p>n;p--)m||i.index(p)>0?(m=!0,u=st.from(i.node(p).copy(u)),d++):l--;let h=st.empty,f=0;for(let p=o,m=!1;p>n;p--)m||s.after(p+1)<s.end(p)?(m=!0,h=st.from(s.node(p).copy(h)),f++):c++;t.step(new Pi(l,c,r,a,new rt(u.append(h),d,f),u.size-d,!0))}function t5(t,e,n=null,i=t){let s=c5e(t,e),o=s&&u5e(i,e);return o?s.map(qE).concat({type:e,attrs:n}).concat(o.map(qE)):null}function qE(t){return{type:t,attrs:null}}function c5e(t,e){let{parent:n,startIndex:i,endIndex:s}=t,o=n.contentMatchAt(i).findWrapping(e);if(!o)return null;let r=o.length?o[0]:e;return n.canReplaceWith(i,s,r)?o:null}function u5e(t,e){let{parent:n,startIndex:i,endIndex:s}=t,o=n.child(i),r=e.contentMatch.findWrapping(o.type);if(!r)return null;let l=(r.length?r[r.length-1]:e).contentMatch;for(let c=i;l&&c<s;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:r}function d5e(t,e,n){let i=st.empty;for(let r=n.length-1;r>=0;r--){if(i.size){let a=n[r].type.contentMatch.matchFragment(i);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=st.from(n[r].type.create(n[r].attrs,i))}let s=e.start,o=e.end;t.step(new Pi(s,o,s,o,new rt(i,0,0),n.length,!0))}function h5e(t,e,n,i,s){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=t.steps.length;t.doc.nodesBetween(e,n,(r,a)=>{let l=typeof s=="function"?s(r):s;if(r.isTextblock&&!r.hasMarkup(i,l)&&m5e(t.doc,t.mapping.slice(o).map(a),i)){let c=null;if(i.schema.linebreakReplacement){let f=i.whitespace=="pre",p=!!i.contentMatch.matchType(i.schema.linebreakReplacement);f&&!p?c=!1:!f&&p&&(c=!0)}c===!1&&p5e(t,r,a,o),uB(t,t.mapping.slice(o).map(a,1),i,void 0,c===null);let u=t.mapping.slice(o),d=u.map(a,1),h=u.map(a+r.nodeSize,1);return t.step(new Pi(d,h,d+1,h-1,new rt(st.from(i.create(l,null,r.marks)),0,0),1,!0)),c===!0&&f5e(t,r,a,o),!1}})}function f5e(t,e,n,i){e.forEach((s,o)=>{if(s.isText){let r,a=/\r?\n|\r/g;for(;r=a.exec(s.text);){let l=t.mapping.slice(i).map(n+1+o+r.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function p5e(t,e,n,i){e.forEach((s,o)=>{if(s.type==s.type.schema.linebreakReplacement){let r=t.mapping.slice(i).map(n+1+o);t.replaceWith(r,r+1,e.type.schema.text(`
117 +`))}})}function m5e(t,e,n){let i=t.resolve(e),s=i.index();return i.parent.canReplaceWith(s,s+1,n)}function g5e(t,e,n,i,s){let o=t.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let r=n.create(i,null,s||o.marks);if(o.isLeaf)return t.replaceWith(e,e+o.nodeSize,r);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new Pi(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new rt(st.from(r),0,0),1,!0))}function fg(t,e,n=1,i){let s=t.resolve(e),o=s.depth-n,r=i&&i[i.length-1]||s.parent;if(o<0||s.parent.type.spec.isolating||!s.parent.canReplace(s.index(),s.parent.childCount)||!r.type.validContent(s.parent.content.cutByIndex(s.index(),s.parent.childCount)))return!1;for(let c=s.depth-1,u=n-2;c>o;c--,u--){let d=s.node(c),h=s.index(c);if(d.type.spec.isolating)return!1;let f=d.content.cutByIndex(h,d.childCount),p=i&&i[u+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let m=i&&i[u]||d;if(!d.canReplace(h+1,d.childCount)||!m.type.validContent(f))return!1}let a=s.indexAfter(o),l=i&&i[0];return s.node(o).canReplaceWith(a,a,l?l.type:s.node(o+1).type)}function v5e(t,e,n=1,i){let s=t.doc.resolve(e),o=st.empty,r=st.empty;for(let a=s.depth,l=s.depth-n,c=n-1;a>l;a--,c--){o=st.from(s.node(a).copy(o));let u=i&&i[c];r=st.from(u?u.type.create(u.attrs,r):s.node(a).copy(r))}t.step(new si(e,e,new rt(o.append(r),n,n),!0))}function k2(t,e){let n=t.resolve(e),i=n.index();return _5e(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(i,i+1)}function _5e(t,e){return!!(t&&e&&!t.isLeaf&&t.canAppend(e))}function y5e(t,e,n){let i=new si(e-n,e+n,rt.empty,!0);t.step(i)}function b5e(t,e,n){let i=t.resolve(e);if(i.parent.canReplaceWith(i.index(),i.index(),n))return e;if(i.parentOffset==0)for(let s=i.depth-1;s>=0;s--){let o=i.index(s);if(i.node(s).canReplaceWith(o,o,n))return i.before(s+1);if(o>0)return null}if(i.parentOffset==i.parent.content.size)for(let s=i.depth-1;s>=0;s--){let o=i.indexAfter(s);if(i.node(s).canReplaceWith(o,o,n))return i.after(s+1);if(o<i.node(s).childCount)return null}return null}function w5e(t,e,n){let i=t.resolve(e);if(!n.content.size)return e;let s=n.content;for(let o=0;o<n.openStart;o++)s=s.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let r=i.depth;r>=0;r--){let a=r==i.depth?0:i.pos<=(i.start(r+1)+i.end(r+1))/2?-1:1,l=i.index(r)+(a>0?1:0),c=i.node(r),u=!1;if(o==1)u=c.canReplace(l,l,s);else{let d=c.contentMatchAt(l).findWrapping(s.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return a==0?i.pos:a<0?i.before(r+1):i.after(r+1)}return null}function n5(t,e,n=e,i=rt.empty){if(e==n&&!i.size)return null;let s=t.resolve(e),o=t.resolve(n);return dB(s,o,i)?new si(e,n,i):new k5e(s,o,i).fit()}function dB(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class k5e{constructor(e,n,i){this.$from=e,this.$to=n,this.unplaced=i,this.frontier=[],this.placed=st.empty;for(let s=0;s<=e.depth;s++){let o=e.node(s);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(s))})}for(let s=e.depth;s>0;s--)this.placed=st.from(e.node(s).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,i=this.$from,s=this.close(e<0?this.$to:i.doc.resolve(e));if(!s)return null;let o=this.placed,r=i.depth,a=s.depth;for(;r&&a&&o.childCount==1;)o=o.firstChild.content,r--,a--;let l=new rt(o,r,a);return e>-1?new Pi(i.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||i.pos!=this.$to.pos?new si(i.pos,s.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,i=0,s=this.unplaced.openEnd;i<e;i++){let o=n.firstChild;if(n.childCount>1&&(s=0),o.type.spec.isolating&&s<=i){e=i;break}n=o.content}for(let n=1;n<=2;n++)for(let i=n==1?e:this.unplaced.openStart;i>=0;i--){let s,o=null;i?(o=u3(this.unplaced.content,i-1).firstChild,s=o.content):s=this.unplaced.content;let r=s.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,d=null;if(n==1&&(r?c.matchType(r.type)||(d=c.fillBefore(st.from(r),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:i,frontierDepth:a,parent:o,inject:d};if(n==2&&r&&(u=c.findWrapping(r.type)))return{sliceDepth:i,frontierDepth:a,parent:o,wrap:u};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:n,openEnd:i}=this.unplaced,s=u3(e,n);return!s.childCount||s.firstChild.isLeaf?!1:(this.unplaced=new rt(e,n+1,Math.max(i,s.size+n>=e.size-i?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:i}=this.unplaced,s=u3(e,n);if(s.childCount<=1&&n>0){let o=e.size-n<=n+s.size;this.unplaced=new rt(km(e,n-1,1),n-1,o?n-1:i)}else this.unplaced=new rt(km(e,n,1),n,i)}placeNodes({sliceDepth:e,frontierDepth:n,parent:i,inject:s,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let m=0;m<o.length;m++)this.openFrontierNode(o[m]);let r=this.unplaced,a=i?i.content:r.content,l=r.openStart-e,c=0,u=[],{match:d,type:h}=this.frontier[n];if(s){for(let m=0;m<s.childCount;m++)u.push(s.child(m));d=d.matchFragment(s)}let f=a.size+e-(r.content.size-r.openEnd);for(;c<a.childCount;){let m=a.child(c),b=d.matchType(m.type);if(!b)break;c++,(c>1||l==0||m.content.size)&&(d=b,u.push(hB(m.mark(h.allowedMarks(m.marks)),c==1?l:0,c==a.childCount?f:-1)))}let p=c==a.childCount;p||(f=-1),this.placed=Cm(this.placed,n,st.from(u)),this.frontier[n].match=d,p&&f<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,b=a;m<f;m++){let w=b.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),b=w.content}this.unplaced=p?e==0?rt.empty:new rt(km(r.content,e-1,1),e-1,f<0?r.openEnd:e-1):new rt(km(r.content,e,c),r.openStart,r.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!d3(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:i}=this.$to,s=this.$to.after(i);for(;i>1&&s==this.$to.end(--i);)++s;return s}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:i,type:s}=this.frontier[n],o=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),r=d3(e,n,s,i,o);if(r){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=d3(e,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:r,move:o?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Cm(this.placed,n.depth,n.fit)),e=n.move;for(let i=n.depth+1;i<=e.depth;i++){let s=e.node(i),o=s.type.contentMatch.fillBefore(s.content,!0,e.index(i));this.openFrontierNode(s.type,s.attrs,o)}return e}openFrontierNode(e,n=null,i){let s=this.frontier[this.depth];s.match=s.match.matchType(e),this.placed=Cm(this.placed,this.depth,st.from(e.create(n,i))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(st.empty,!0);n.childCount&&(this.placed=Cm(this.placed,this.frontier.length,n))}}function km(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(km(t.firstChild.content,e-1,n)))}function Cm(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Cm(t.lastChild.content,e-1,n)))}function u3(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function hB(t,e,n){if(e<=0)return t;let i=t.content;return e>1&&(i=i.replaceChild(0,hB(i.firstChild,e-1,i.childCount==1?n-1:0))),e>0&&(i=t.type.contentMatch.fillBefore(i).append(i),n<=0&&(i=i.append(t.type.contentMatch.matchFragment(i).fillBefore(st.empty,!0)))),t.copy(i)}function d3(t,e,n,i,s){let o=t.node(e),r=s?t.indexAfter(e):t.index(e);if(r==o.childCount&&!n.compatibleContent(o.type))return null;let a=i.fillBefore(o.content,!0,r);return a&&!C5e(n,o.content,r)?a:null}function C5e(t,e,n){for(let i=n;i<e.childCount;i++)if(!t.allowsMarks(e.child(i).marks))return!0;return!1}function x5e(t){return t.spec.defining||t.spec.definingForContent}function S5e(t,e,n,i){if(!i.size)return t.deleteRange(e,n);let s=t.doc.resolve(e),o=t.doc.resolve(n);if(dB(s,o,i))return t.step(new si(e,n,i));let r=pB(s,t.doc.resolve(n));r[r.length-1]==0&&r.pop();let a=-(s.depth+1);r.unshift(a);for(let h=s.depth,f=s.pos-1;h>0;h--,f--){let p=s.node(h).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;r.indexOf(h)>-1?a=h:s.before(h)==f&&r.splice(1,0,-h)}let l=r.indexOf(a),c=[],u=i.openStart;for(let h=i.content,f=0;;f++){let p=h.firstChild;if(c.push(p),f==i.openStart)break;h=p.content}for(let h=u-1;h>=0;h--){let f=c[h],p=x5e(f.type);if(p&&!f.sameMarkup(s.node(Math.abs(a)-1)))u=h;else if(p||!f.type.isTextblock)break}for(let h=i.openStart;h>=0;h--){let f=(h+u+1)%(i.openStart+1),p=c[f];if(p)for(let m=0;m<r.length;m++){let b=r[(m+l)%r.length],w=!0;b<0&&(w=!1,b=-b);let k=s.node(b-1),C=s.index(b-1);if(k.canReplaceWith(C,C,p.type,p.marks))return t.replace(s.before(b),w?o.after(b):n,new rt(fB(i.content,0,i.openStart,f),f,i.openEnd))}}let d=t.steps.length;for(let h=r.length-1;h>=0&&(t.replace(e,n,i),!(t.steps.length>d));h--){let f=r[h];f<0||(e=s.before(f),n=o.after(f))}}function fB(t,e,n,i,s){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(fB(o.content,e+1,n,i,o)))}if(e>i){let o=s.contentMatchAt(0),r=o.fillBefore(t).append(t);t=r.append(o.matchFragment(r).fillBefore(st.empty,!0))}return t}function $5e(t,e,n,i){if(!i.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let s=b5e(t.doc,e,i.type);s!=null&&(e=n=s)}t.replaceRange(e,n,new rt(st.from(i),0,0))}function A5e(t,e,n){let i=t.doc.resolve(e),s=t.doc.resolve(n),o=pB(i,s);for(let r=0;r<o.length;r++){let a=o[r],l=r==o.length-1;if(l&&a==0||i.node(a).type.contentMatch.validEnd)return t.delete(i.start(a),s.end(a));if(a>0&&(l||i.node(a-1).canReplace(i.index(a-1),s.indexAfter(a-1))))return t.delete(i.before(a),s.after(a))}for(let r=1;r<=i.depth&&r<=s.depth;r++)if(e-i.start(r)==i.depth-r&&n>i.end(r)&&s.end(r)-n!=s.depth-r)return t.delete(i.before(r),n);t.delete(e,n)}function pB(t,e){let n=[],i=Math.min(t.depth,e.depth);for(let s=i;s>=0;s--){let o=t.start(s);if(o<t.pos-(t.depth-s)||e.end(s)>e.pos+(e.depth-s)||t.node(s).type.spec.isolating||e.node(s).type.spec.isolating)break;(o==e.start(s)||s==t.depth&&s==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&s&&e.start(s-1)==o-1)&&n.push(s)}return n}class hf extends Oi{constructor(e,n,i){super(),this.pos=e,this.attr=n,this.value=i}apply(e){let n=e.nodeAt(this.pos);if(!n)return Is.fail("No node at attribute step's position");let i=Object.create(null);for(let o in n.attrs)i[o]=n.attrs[o];i[this.attr]=this.value;let s=n.type.create(i,null,n.marks);return Is.fromReplace(e,this.pos,this.pos+1,new rt(st.from(s),0,n.isLeaf?0:1))}getMap(){return Po.empty}invert(e){return new hf(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new hf(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new hf(n.pos,n.attr,n.value)}}Oi.jsonID("attr",hf);class d1 extends Oi{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let s in e.attrs)n[s]=e.attrs[s];n[this.attr]=this.value;let i=e.type.create(n,e.content,e.marks);return Is.ok(i)}getMap(){return Po.empty}invert(e){return new d1(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new d1(n.attr,n.value)}}Oi.jsonID("docAttr",d1);let Jf=class extends Error{};Jf=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};Jf.prototype=Object.create(Error.prototype);Jf.prototype.constructor=Jf;Jf.prototype.name="TransformError";class mB{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new df}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Jf(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,i=rt.empty){let s=n5(this.doc,e,n,i);return s&&this.step(s),this}replaceWith(e,n,i){return this.replace(e,n,new rt(st.from(i),0,0))}delete(e,n){return this.replace(e,n,rt.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,i){return S5e(this,e,n,i),this}replaceRangeWith(e,n,i){return $5e(this,e,n,i),this}deleteRange(e,n){return A5e(this,e,n),this}lift(e,n){return l5e(this,e,n),this}join(e,n=1){return y5e(this,e,n),this}wrap(e,n){return d5e(this,e,n),this}setBlockType(e,n=e,i,s=null){return h5e(this,e,n,i,s),this}setNodeMarkup(e,n,i=null,s){return g5e(this,e,n,i,s),this}setNodeAttribute(e,n,i){return this.step(new hf(e,n,i)),this}setDocAttribute(e,n){return this.step(new d1(e,n)),this}addNodeMark(e,n){return this.step(new xc(e,n)),this}removeNodeMark(e,n){if(!(n instanceof En)){let i=this.doc.nodeAt(e);if(!i)throw new RangeError("No node at position "+e);if(n=n.isInSet(i.marks),!n)return this}return this.step(new Zf(e,n)),this}split(e,n=1,i){return v5e(this,e,n,i),this}addMark(e,n,i){return o5e(this,e,n,i),this}removeMark(e,n,i){return r5e(this,e,n,i),this}clearIncompatible(e,n,i){return uB(this,e,n,i),this}}const h3=Object.create(null);class Ut{constructor(e,n,i){this.$anchor=e,this.$head=n,this.ranges=i||[new W0(e.min(n),e.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 e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=rt.empty){let i=n.content.lastChild,s=null;for(let a=0;a<n.openEnd;a++)s=i,i=i.lastChild;let o=e.steps.length,r=this.ranges;for(let a=0;a<r.length;a++){let{$from:l,$to:c}=r[a],u=e.mapping.slice(o);e.replaceRange(u.map(l.pos),u.map(c.pos),a?rt.empty:n),a==0&&KE(e,o,(i?i.isInline:s&&s.isTextblock)?-1:1)}}replaceWith(e,n){let i=e.steps.length,s=this.ranges;for(let o=0;o<s.length;o++){let{$from:r,$to:a}=s[o],l=e.mapping.slice(i),c=l.map(r.pos),u=l.map(a.pos);o?e.deleteRange(c,u):(e.replaceRangeWith(c,u,n),KE(e,i,n.isInline?-1:1))}}static findFrom(e,n,i=!1){let s=e.parent.inlineContent?new Ot(e):Lh(e.node(0),e.parent,e.pos,e.index(),n,i);if(s)return s;for(let o=e.depth-1;o>=0;o--){let r=n<0?Lh(e.node(0),e.node(o),e.before(o+1),e.index(o),n,i):Lh(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,n,i);if(r)return r}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Bo(e.node(0))}static atStart(e){return Lh(e,e,0,0,1)||new Bo(e)}static atEnd(e){return Lh(e,e,e.content.size,e.childCount,-1)||new Bo(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=h3[n.type];if(!i)throw new RangeError(`No selection type ${n.type} defined`);return i.fromJSON(e,n)}static jsonID(e,n){if(e in h3)throw new RangeError("Duplicate use of selection JSON ID "+e);return h3[e]=n,n.prototype.jsonID=e,n}getBookmark(){return Ot.between(this.$anchor,this.$head).getBookmark()}}Ut.prototype.visible=!0;class W0{constructor(e,n){this.$from=e,this.$to=n}}let GE=!1;function XE(t){!GE&&!t.parent.inlineContent&&(GE=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Ot extends Ut{constructor(e,n=e){XE(e),XE(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let i=e.resolve(n.map(this.head));if(!i.parent.inlineContent)return Ut.near(i);let s=e.resolve(n.map(this.anchor));return new Ot(s.parent.inlineContent?s:i,i)}replace(e,n=rt.empty){if(super.replace(e,n),n==rt.empty){let i=this.$from.marksAcross(this.$to);i&&e.ensureMarks(i)}}eq(e){return e instanceof Ot&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new C2(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ot(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,i=n){let s=e.resolve(n);return new this(s,i==n?s:e.resolve(i))}static between(e,n,i){let s=e.pos-n.pos;if((!i||s)&&(i=s>=0?1:-1),!n.parent.inlineContent){let o=Ut.findFrom(n,i,!0)||Ut.findFrom(n,-i,!0);if(o)n=o.$head;else return Ut.near(n,i)}return e.parent.inlineContent||(s==0?e=n:(e=(Ut.findFrom(e,-i,!0)||Ut.findFrom(e,i,!0)).$anchor,e.pos<n.pos!=s<0&&(e=n))),new Ot(e,n)}}Ut.jsonID("text",Ot);class C2{constructor(e,n){this.anchor=e,this.head=n}map(e){return new C2(e.map(this.anchor),e.map(this.head))}resolve(e){return Ot.between(e.resolve(this.anchor),e.resolve(this.head))}}class Rt extends Ut{constructor(e){let n=e.nodeAfter,i=e.node(0).resolve(e.pos+n.nodeSize);super(e,i),this.node=n}map(e,n){let{deleted:i,pos:s}=n.mapResult(this.anchor),o=e.resolve(s);return i?Ut.near(o):new Rt(o)}content(){return new rt(st.from(this.node),0,0)}eq(e){return e instanceof Rt&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new s5(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Rt(e.resolve(n.anchor))}static create(e,n){return new Rt(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Rt.prototype.visible=!1;Ut.jsonID("node",Rt);class s5{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:i}=e.mapResult(this.anchor);return n?new C2(i,i):new s5(i)}resolve(e){let n=e.resolve(this.anchor),i=n.nodeAfter;return i&&Rt.isSelectable(i)?new Rt(n):Ut.near(n)}}class Bo extends Ut{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=rt.empty){if(n==rt.empty){e.delete(0,e.doc.content.size);let i=Ut.atStart(e.doc);i.eq(e.selection)||e.setSelection(i)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Bo(e)}map(e){return new Bo(e)}eq(e){return e instanceof Bo}getBookmark(){return E5e}}Ut.jsonID("all",Bo);const E5e={map(){return this},resolve(t){return new Bo(t)}};function Lh(t,e,n,i,s,o=!1){if(e.inlineContent)return Ot.create(t,n);for(let r=i-(s>0?0:1);s>0?r<e.childCount:r>=0;r+=s){let a=e.child(r);if(a.isAtom){if(!o&&Rt.isSelectable(a))return Rt.create(t,n-(s<0?a.nodeSize:0))}else{let l=Lh(t,a,n+s,s<0?a.childCount:0,s,o);if(l)return l}n+=a.nodeSize*s}return null}function KE(t,e,n){let i=t.steps.length-1;if(i<e)return;let s=t.steps[i];if(!(s instanceof si||s instanceof Pi))return;let o=t.mapping.maps[i],r;o.forEach((a,l,c,u)=>{r==null&&(r=u)}),t.setSelection(Ut.near(t.doc.resolve(r),n))}const ZE=1,f_=2,JE=4;class M5e extends mB{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|ZE)&~f_,this.storedMarks=null,this}get selectionSet(){return(this.updated&ZE)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=f_,this}ensureMarks(e){return En.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&f_)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~f_,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let i=this.selection;return n&&(e=e.mark(this.storedMarks||(i.empty?i.$from.marks():i.$from.marksAcross(i.$to)||En.none))),i.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,i){let s=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(s.text(e),!0):this.deleteSelection();{if(i==null&&(i=n),i=i??n,!e)return this.deleteRange(n,i);let o=this.storedMarks;if(!o){let r=this.doc.resolve(n);o=i==n?r.marks():r.marksAcross(this.doc.resolve(i))}return this.replaceRangeWith(n,i,s.text(e,o)),this.selection.empty||this.setSelection(Ut.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=JE,this}get scrolledIntoView(){return(this.updated&JE)>0}}function QE(t,e){return!e||!t?t:t.bind(e)}class xm{constructor(e,n,i){this.name=e,this.init=QE(n.init,i),this.apply=QE(n.apply,i)}}const T5e=[new xm("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new xm("selection",{init(t,e){return t.selection||Ut.atStart(e.doc)},apply(t){return t.selection}}),new xm("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,i){return i.selection.$cursor?t.storedMarks:null}}),new xm("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class f3{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=T5e.slice(),n&&n.forEach(i=>{if(this.pluginsByKey[i.key])throw new RangeError("Adding different instances of a keyed plugin ("+i.key+")");this.plugins.push(i),this.pluginsByKey[i.key]=i,i.spec.state&&this.fields.push(new xm(i.key,i.spec.state,i))})}}class zu{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let i=0;i<this.config.plugins.length;i++)if(i!=n){let s=this.config.plugins[i];if(s.spec.filterTransaction&&!s.spec.filterTransaction.call(s,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],i=this.applyInner(e),s=null;for(;;){let o=!1;for(let r=0;r<this.config.plugins.length;r++){let a=this.config.plugins[r];if(a.spec.appendTransaction){let l=s?s[r].n:0,c=s?s[r].state:this,u=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,c,i);if(u&&i.filterTransaction(u,r)){if(u.setMeta("appendedTransaction",e),!s){s=[];for(let d=0;d<this.config.plugins.length;d++)s.push(d<r?{state:i,n:n.length}:{state:this,n:0})}n.push(u),i=i.applyInner(u),o=!0}s&&(s[r]={state:i,n:n.length})}}if(!o)return{state:i,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new zu(this.config),i=this.config.fields;for(let s=0;s<i.length;s++){let o=i[s];n[o.name]=o.apply(e,this[o.name],this,n)}return n}get tr(){return new M5e(this)}static create(e){let n=new f3(e.doc?e.doc.type.schema:e.schema,e.plugins),i=new zu(n);for(let s=0;s<n.fields.length;s++)i[n.fields[s].name]=n.fields[s].init(e,i);return i}reconfigure(e){let n=new f3(this.schema,e.plugins),i=n.fields,s=new zu(n);for(let o=0;o<i.length;o++){let r=i[o].name;s[r]=this.hasOwnProperty(r)?this[r]:i[o].init(e,s)}return s}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(i=>i.toJSON())),e&&typeof e=="object")for(let i in e){if(i=="doc"||i=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let s=e[i],o=s.spec.state;o&&o.toJSON&&(n[i]=o.toJSON.call(s,this[s.key]))}return n}static fromJSON(e,n,i){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let s=new f3(e.schema,e.plugins),o=new zu(s);return s.fields.forEach(r=>{if(r.name=="doc")o.doc=Tc.fromJSON(e.schema,n.doc);else if(r.name=="selection")o.selection=Ut.fromJSON(o.doc,n.selection);else if(r.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(i)for(let a in i){let l=i[a],c=l.spec.state;if(l.key==r.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){o[r.name]=c.fromJSON.call(l,e,n[a],o);return}}o[r.name]=r.init(e,o)}}),o}}function gB(t,e,n){for(let i in t){let s=t[i];s instanceof Function?s=s.bind(e):i=="handleDOMEvents"&&(s=gB(s,e,{})),n[i]=s}return n}class rs{constructor(e){this.spec=e,this.props={},e.props&&gB(e.props,this,this.props),this.key=e.key?e.key.key:vB("plugin")}getState(e){return e[this.key]}}const p3=Object.create(null);function vB(t){return t in p3?t+"$"+ ++p3[t]:(p3[t]=0,t+"$")}class ps{constructor(e="key"){this.key=vB(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}class Go{constructor(e,n,i={}){this.match=e,this.match=e,this.handler=typeof n=="string"?P5e(n):n,this.undoable=i.undoable!==!1,this.inCode=i.inCode||!1}}function P5e(t){return function(e,n,i,s){let o=t;if(n[1]){let r=n[0].lastIndexOf(n[1]);o+=n[0].slice(r+n[1].length),i+=r;let a=i-s;a>0&&(o=n[0].slice(r-a,r)+o,i=s)}return e.tr.insertText(o,i,s)}}const I5e=(t,e)=>{let n=t.plugins;for(let i=0;i<n.length;i++){let s=n[i],o;if(s.spec.isInputRules&&(o=s.getState(t))){if(e){let r=t.tr,a=o.transform;for(let l=a.steps.length-1;l>=0;l--)r.step(a.steps[l].invert(a.docs[l]));if(o.text){let l=r.doc.resolve(o.from).marks();r.replaceWith(o.from,o.to,t.schema.text(o.text,l))}else r.delete(o.from,o.to);e(r)}return!0}}return!1};new Go(/--$/,"—");new Go(/\.\.\.$/,"…");new Go(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“");new Go(/"$/,"”");new Go(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘");new Go(/'$/,"’");function i5(t,e,n=null,i){return new Go(t,(s,o,r,a)=>{let l=n instanceof Function?n(o):n,c=s.tr.delete(r,a),u=c.doc.resolve(r),d=u.blockRange(),h=d&&t5(d,e,l);if(!h)return null;c.wrap(d,h);let f=c.doc.resolve(r-1).nodeBefore;return f&&f.type==e&&k2(c.doc,r-1)&&(!i||i(o,f))&&c.join(r-1),c})}function _B(t,e,n=null){return new Go(t,(i,s,o,r)=>{let a=i.doc.resolve(o),l=n instanceof Function?n(s):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),e)?i.tr.delete(o,r).setBlockType(o,o,e,l):null})}const Uc=typeof navigator<"u"?navigator:null,eM=typeof document<"u"?document:null,ru=Uc&&Uc.userAgent||"",rx=/Edge\/(\d+)/.exec(ru),yB=/MSIE \d/.exec(ru),ax=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ru),x2=!!(yB||ax||rx),L5e=yB?document.documentMode:ax?+ax[1]:rx?+rx[1]:0,bB=!x2&&/gecko\/(\d+)/i.test(ru),O5e=bB&&+(/Firefox\/(\d+)/.exec(ru)||[0,0])[1],lx=!x2&&/Chrome\/(\d+)/.exec(ru),D5e=!!lx,R5e=lx?+lx[1]:0,wB=!x2&&!!Uc&&/Apple Computer/.test(Uc.vendor),kB=wB&&(/Mobile\/\w+/.test(ru)||!!Uc&&Uc.maxTouchPoints>2),V5e=kB||(Uc?/Mac/.test(Uc.platform):!1),F5e=/Android \d/.test(ru),CB=!!eM&&"webkitFontSmoothing"in eM.documentElement.style,N5e=CB?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;var p_=Object.freeze({__proto__:null,android:F5e,chrome:D5e,chrome_version:R5e,gecko:bB,gecko_version:O5e,ie:x2,ie_version:L5e,ios:kB,mac:V5e,safari:wB,webkit:CB,webkit_version:N5e});function m3(t,e,n,i,s,o){if(t.composing)return!1;const r=t.state,a=r.doc.resolve(e);if(a.parent.type.spec.code)return!1;const l=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,void 0,"")+i;for(let c=0;c<s.length;c++){const u=s[c].match.exec(l),d=u&&u[0]&&s[c].handler(r,u,e-(u[0].length-i.length),n);if(d)return t.dispatch(d.setMeta(o,{transform:d,from:e,to:n,text:i})),!0}return!1}const B5e=new ps("MILKDOWN_CUSTOM_INPUTRULES");function z5e({rules:t}){const e=new rs({key:B5e,isInputRules:!0,state:{init(){return null},apply(n,i){const s=n.getMeta(this);return s||(n.selectionSet||n.docChanged?null:i)}},props:{handleTextInput(n,i,s,o){return m3(n,i,s,o,t,e)},handleDOMEvents:{compositionend:n=>(setTimeout(()=>{const{$cursor:i}=n.state.selection;i&&m3(n,i.pos,i.pos,"",t,e)}),!1)},handleKeyDown(n,i){if(i.key!=="Enter")return!1;const{$cursor:s}=n.state.selection;return s?m3(n,s.pos,s.pos,`
118 +`,t,e):!1}}});return e}function av(t,e,n={}){return new Go(t,(i,s,o,r)=>{var a,l,c,u;const{tr:d}=i,h=s.length;let f=s[h-1],p=s[0],m=[],b=r;const w={group:f,fullMatch:p,start:o,end:r},k=(a=n.updateCaptured)==null?void 0:a.call(n,w);if(Object.assign(w,k),{group:f,fullMatch:p,start:o,end:r}=w,p===null||(f==null?void 0:f.trim())==="")return null;if(f){const C=p.search(/\S/),A=o+p.indexOf(f),S=A+f.length;m=(l=d.storedMarks)!=null?l:[],S<r&&d.delete(S,r),A>o&&d.delete(o+C,A),b=o+C+f.length;const M=(c=n.getAttr)==null?void 0:c.call(n,s);d.addMark(o,b,e.create(M)),d.setStoredMarks(m),(u=n.beforeDispatch)==null||u.call(n,{match:s,start:o,end:r,tr:d})}return d})}var H5e=Object.defineProperty,U5e=Object.defineProperties,j5e=Object.getOwnPropertyDescriptors,tM=Object.getOwnPropertySymbols,W5e=Object.prototype.hasOwnProperty,Y5e=Object.prototype.propertyIsEnumerable,nM=(t,e,n)=>e in t?H5e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,q5e=(t,e)=>{for(var n in e||(e={}))W5e.call(e,n)&&nM(t,n,e[n]);if(tM)for(var n of tM(e))Y5e.call(e,n)&&nM(t,n,e[n]);return t},G5e=(t,e)=>U5e(t,j5e(e));function sM(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function S2(t,e,n){const s=t.state.doc.content.size,o=sM(e,0,s),r=sM(n,0,s),a=t.coordsAtPos(o),l=t.coordsAtPos(r,-1),c=Math.min(a.top,l.top),u=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),h=Math.max(a.right,l.right),f=h-d,p=u-c,w={top:c,bottom:u,left:d,right:h,width:f,height:p,x:d,y:c};return G5e(q5e({},w),{toJSON:()=>w})}function $2(t){return Object.assign(Object.create(t),t).setTime(Date.now())}function X5e(t,e){return Array.isArray(t)&&t.includes(e.type)||e.type===t}function o5(t){return e=>{for(let n=e.depth;n>0;n-=1){const i=e.node(n);if(t(i)){const s=e.before(n),o=e.after(n);return{from:s,to:o,node:i}}}}}function K5e(t,e){return o5(n=>n.type===e)(t)}function Z5e(t,e){const n=e.nodes[t];if(!n)throw qCe("node",t);return n}function r5(t){return e=>{for(let n=e.depth;n>0;n--){const i=e.node(n);if(t(i))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:i}}}}function J5e(t){return e=>r5(t)(e.$from)}function Q5e(t,e){if(!(t instanceof Rt))return;const{node:n,$from:i}=t;if(X5e(e,n))return{node:n,pos:i.pos,start:i.start(i.depth),depth:i.depth}}const a5=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function eSe(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const xB=(t,e,n)=>{let i=eSe(t,n);if(!i)return!1;let s=$B(i);if(!s){let r=i.blockRange(),a=r&&w2(r);return a==null?!1:(e&&e(t.tr.lift(r,a).scrollIntoView()),!0)}let o=s.nodeBefore;if(EB(t,s,e,-1))return!0;if(i.parent.content.size==0&&(Qf(o,"end")||Rt.isSelectable(o)))for(let r=i.depth;;r--){let a=n5(t.doc,i.before(r),i.after(r),rt.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(Qf(o,"end")?Ut.findFrom(l.doc.resolve(l.mapping.map(s.pos,-1)),-1):Rt.create(l.doc,s.pos-o.nodeSize)),e(l.scrollIntoView())}return!0}if(r==1||i.node(r-1).childCount>1)break}return o.isAtom&&s.depth==i.depth-1?(e&&e(t.tr.delete(s.pos-o.nodeSize,s.pos).scrollIntoView()),!0):!1};function Qf(t,e,n=!1){for(let i=t;i;i=e=="start"?i.firstChild:i.lastChild){if(i.isTextblock)return!0;if(n&&i.childCount!=1)return!1}return!1}const SB=(t,e,n)=>{let{$head:i,empty:s}=t.selection,o=i;if(!s)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):i.parentOffset>0)return!1;o=$B(i)}let r=o&&o.nodeBefore;return!r||!Rt.isSelectable(r)?!1:(e&&e(t.tr.setSelection(Rt.create(t.doc,o.pos-r.nodeSize)).scrollIntoView()),!0)};function $B(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function tSe(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const nSe=(t,e,n)=>{let i=tSe(t,n);if(!i)return!1;let s=AB(i);if(!s)return!1;let o=s.nodeAfter;if(EB(t,s,e,1))return!0;if(i.parent.content.size==0&&(Qf(o,"start")||Rt.isSelectable(o))){let r=n5(t.doc,i.before(),i.after(),rt.empty);if(r&&r.slice.size<r.to-r.from){if(e){let a=t.tr.step(r);a.setSelection(Qf(o,"start")?Ut.findFrom(a.doc.resolve(a.mapping.map(s.pos)),1):Rt.create(a.doc,a.mapping.map(s.pos))),e(a.scrollIntoView())}return!0}}return o.isAtom&&s.depth==i.depth-1?(e&&e(t.tr.delete(s.pos,s.pos+o.nodeSize).scrollIntoView()),!0):!1},sSe=(t,e,n)=>{let{$head:i,empty:s}=t.selection,o=i;if(!s)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):i.parentOffset<i.parent.content.size)return!1;o=AB(i)}let r=o&&o.nodeAfter;return!r||!Rt.isSelectable(r)?!1:(e&&e(t.tr.setSelection(Rt.create(t.doc,o.pos)).scrollIntoView()),!0)};function AB(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const iSe=(t,e)=>{let{$head:n,$anchor:i}=t.selection;return!n.parent.type.spec.code||!n.sameParent(i)?!1:(e&&e(t.tr.insertText(`
119 +`).scrollIntoView()),!0)};function l5(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const oSe=(t,e)=>{let{$head:n,$anchor:i}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(i))return!1;let s=n.node(-1),o=n.indexAfter(-1),r=l5(s.contentMatchAt(o));if(!r||!s.canReplaceWith(o,o,r))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,r.createAndFill());l.setSelection(Ut.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},rSe=(t,e)=>{let n=t.selection,{$from:i,$to:s}=n;if(n instanceof Bo||i.parent.inlineContent||s.parent.inlineContent)return!1;let o=l5(s.parent.contentMatchAt(s.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let r=(!i.parentOffset&&s.index()<s.parent.childCount?i:s).pos,a=t.tr.insert(r,o.createAndFill());a.setSelection(Ot.create(a.doc,r+1)),e(a.scrollIntoView())}return!0},aSe=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(fg(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let i=n.blockRange(),s=i&&w2(i);return s==null?!1:(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)};function lSe(t){return(e,n)=>{let{$from:i,$to:s}=e.selection;if(e.selection instanceof Rt&&e.selection.node.isBlock)return!i.parentOffset||!fg(e.doc,i.pos)?!1:(n&&n(e.tr.split(i.pos).scrollIntoView()),!0);if(!i.parent.isBlock)return!1;if(n){let o=s.parentOffset==s.parent.content.size,r=e.tr;(e.selection instanceof Ot||e.selection instanceof Bo)&&r.deleteSelection();let a=i.depth==0?null:l5(i.node(-1).contentMatchAt(i.indexAfter(-1))),l=t&&t(s.parent,o,i),c=l?[l]:o&&a?[{type:a}]:void 0,u=fg(r.doc,r.mapping.map(i.pos),1,c);if(!c&&!u&&fg(r.doc,r.mapping.map(i.pos),1,a?[{type:a}]:void 0)&&(a&&(c=[{type:a}]),u=!0),u&&(r.split(r.mapping.map(i.pos),1,c),!o&&!i.parentOffset&&i.parent.type!=a)){let d=r.mapping.map(i.before()),h=r.doc.resolve(d);a&&i.node(-1).canReplaceWith(h.index(),h.index()+1,a)&&r.setNodeMarkup(r.mapping.map(i.before()),a)}n(r.scrollIntoView())}return!0}}const cSe=lSe(),uSe=(t,e)=>(e&&e(t.tr.setSelection(new Bo(t.doc))),!0);function dSe(t,e,n){let i=e.nodeBefore,s=e.nodeAfter,o=e.index();return!i||!s||!i.type.compatibleContent(s.type)?!1:!i.content.size&&e.parent.canReplace(o-1,o)?(n&&n(t.tr.delete(e.pos-i.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(s.isTextblock||k2(t.doc,e.pos))?!1:(n&&n(t.tr.clearIncompatible(e.pos,i.type,i.contentMatchAt(i.childCount)).join(e.pos).scrollIntoView()),!0)}function EB(t,e,n,i){let s=e.nodeBefore,o=e.nodeAfter,r,a,l=s.type.spec.isolating||o.type.spec.isolating;if(!l&&dSe(t,e,n))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(r=(a=s.contentMatchAt(s.childCount)).findWrapping(o.type))&&a.matchType(r[0]||o.type).validEnd){if(n){let f=e.pos+o.nodeSize,p=st.empty;for(let w=r.length-1;w>=0;w--)p=st.from(r[w].create(null,p));p=st.from(s.copy(p));let m=t.tr.step(new Pi(e.pos-1,f,e.pos,f,new rt(p,1,0),r.length,!0)),b=f+2*r.length;k2(m.doc,b)&&m.join(b),n(m.scrollIntoView())}return!0}let u=o.type.spec.isolating||i>0&&l?null:Ut.findFrom(e,1),d=u&&u.$from.blockRange(u.$to),h=d&&w2(d);if(h!=null&&h>=e.depth)return n&&n(t.tr.lift(d,h).scrollIntoView()),!0;if(c&&Qf(o,"start",!0)&&Qf(s,"end")){let f=s,p=[];for(;p.push(f),!f.isTextblock;)f=f.lastChild;let m=o,b=1;for(;!m.isTextblock;m=m.firstChild)b++;if(f.canReplace(f.childCount,f.childCount,m.content)){if(n){let w=st.empty;for(let C=p.length-1;C>=0;C--)w=st.from(p[C].copy(w));let k=t.tr.step(new Pi(e.pos-p.length,e.pos+o.nodeSize,e.pos+b,e.pos+o.nodeSize-b,new rt(w,p.length,0),0,!0));n(k.scrollIntoView())}return!0}}return!1}function MB(t){return function(e,n){let i=e.selection,s=t<0?i.$from:i.$to,o=s.depth;for(;s.node(o).isInline;){if(!o)return!1;o--}return s.node(o).isTextblock?(n&&n(e.tr.setSelection(Ot.create(e.doc,t<0?s.start(o):s.end(o)))),!0):!1}}const hSe=MB(-1),fSe=MB(1);function c5(t,e=null){return function(n,i){let{$from:s,$to:o}=n.selection,r=s.blockRange(o),a=r&&t5(r,t,e);return a?(i&&i(n.tr.wrap(r,a).scrollIntoView()),!0):!1}}function h1(t,e=null){return function(n,i){let s=!1;for(let o=0;o<n.selection.ranges.length&&!s;o++){let{$from:{pos:r},$to:{pos:a}}=n.selection.ranges[o];n.doc.nodesBetween(r,a,(l,c)=>{if(s)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)s=!0;else{let u=n.doc.resolve(c),d=u.index();s=u.parent.canReplaceWith(d,d+1,t)}})}if(!s)return!1;if(i){let o=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[r];o.setBlockType(a,l,t,e)}i(o.scrollIntoView())}return!0}}function pSe(t,e,n,i){for(let s=0;s<e.length;s++){let{$from:o,$to:r}=e[s],a=o.depth==0?t.inlineContent&&t.type.allowsMarkType(n):!1;if(t.nodesBetween(o.pos,r.pos,(l,c)=>{if(a||!i&&l.isAtom&&l.isInline&&c>=o.pos&&c+l.nodeSize<=r.pos)return!1;a=l.inlineContent&&l.type.allowsMarkType(n)}),a)return!0}return!1}function mSe(t){let e=[];for(let n=0;n<t.length;n++){let{$from:i,$to:s}=t[n];i.doc.nodesBetween(i.pos,s.pos,(o,r)=>{if(o.isAtom&&o.content.size&&o.isInline&&r>=i.pos&&r+o.nodeSize<=s.pos)return r+1>i.pos&&e.push(new W0(i,i.doc.resolve(r+1))),i=i.doc.resolve(r+1+o.content.size),!1}),i.pos<s.pos&&e.push(new W0(i,s))}return e}function A2(t,e=null,n){let i=(n&&n.removeWhenPresent)!==!1,s=(n&&n.enterInlineAtoms)!==!1;return function(o,r){let{empty:a,$cursor:l,ranges:c}=o.selection;if(a&&!l||!pSe(o.doc,c,t,s))return!1;if(r)if(l)t.isInSet(o.storedMarks||l.marks())?r(o.tr.removeStoredMark(t)):r(o.tr.addStoredMark(t.create(e)));else{let u,d=o.tr;s||(c=mSe(c)),i?u=!c.some(h=>o.doc.rangeHasMark(h.$from.pos,h.$to.pos,t)):u=!c.every(h=>{let f=!1;return d.doc.nodesBetween(h.$from.pos,h.$to.pos,(p,m,b)=>{if(f)return!1;f=!t.isInSet(p.marks)&&!!b&&b.type.allowsMarkType(t)&&!(p.isText&&/^\s*$/.test(p.textBetween(Math.max(0,h.$from.pos-m),Math.min(p.nodeSize,h.$to.pos-m))))}),!f});for(let h=0;h<c.length;h++){let{$from:f,$to:p}=c[h];if(!u)d.removeMark(f.pos,p.pos,t);else{let m=f.pos,b=p.pos,w=f.nodeAfter,k=p.nodeBefore,C=w&&w.isText?/^\s*/.exec(w.text)[0].length:0,A=k&&k.isText?/\s*$/.exec(k.text)[0].length:0;m+C<b&&(m+=C,b-=A),d.addMark(m,b,t.create(e))}}r(d.scrollIntoView())}return!0}}function E2(...t){return function(e,n,i){for(let s=0;s<t.length;s++)if(t[s](e,n,i))return!0;return!1}}let g3=E2(a5,xB,SB),iM=E2(a5,nSe,sSe);const Qa={Enter:E2(iSe,rSe,aSe,cSe),"Mod-Enter":oSe,Backspace:g3,"Mod-Backspace":g3,"Shift-Backspace":g3,Delete:iM,"Mod-Delete":iM,"Mod-a":uSe},TB={"Ctrl-h":Qa.Backspace,"Alt-Backspace":Qa["Mod-Backspace"],"Ctrl-d":Qa.Delete,"Ctrl-Alt-Backspace":Qa["Mod-Delete"],"Alt-Delete":Qa["Mod-Delete"],"Alt-d":Qa["Mod-Delete"],"Ctrl-a":hSe,"Ctrl-e":fSe};for(let t in Qa)TB[t]=Qa[t];const gSe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,vSe=gSe?TB:Qa;var jc={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:"'"},Y0={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},_Se=typeof navigator<"u"&&/Mac/.test(navigator.platform),ySe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ii=0;ii<10;ii++)jc[48+ii]=jc[96+ii]=String(ii);for(var ii=1;ii<=24;ii++)jc[ii+111]="F"+ii;for(var ii=65;ii<=90;ii++)jc[ii]=String.fromCharCode(ii+32),Y0[ii]=String.fromCharCode(ii);for(var v3 in jc)Y0.hasOwnProperty(v3)||(Y0[v3]=jc[v3]);function bSe(t){var e=_Se&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||ySe&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Y0:jc)[t.keyCode]||t.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 wSe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function kSe(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let i,s,o,r;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))r=!0;else if(/^a(lt)?$/i.test(l))i=!0;else if(/^(c|ctrl|control)$/i.test(l))s=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))wSe?r=!0:s=!0;else throw new Error("Unrecognized modifier name: "+l)}return i&&(n="Alt-"+n),s&&(n="Ctrl-"+n),r&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function CSe(t){let e=Object.create(null);for(let n in t)e[kSe(n)]=t[n];return e}function _3(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function PB(t){return new rs({props:{handleKeyDown:IB(t)}})}function IB(t){let e=CSe(t);return function(n,i){let s=bSe(i),o,r=e[_3(s,i)];if(r&&r(n.state,n.dispatch,n))return!0;if(s.length==1&&s!=" "){if(i.shiftKey){let a=e[_3(s,i,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((i.shiftKey||i.altKey||i.metaKey||s.charCodeAt(0)>127)&&(o=jc[i.keyCode])&&o!=s){let a=e[_3(o,i)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const oi=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},f1=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let cx=null;const Za=function(t,e,n){let i=cx||(cx=document.createRange());return i.setEnd(t,n??t.nodeValue.length),i.setStart(t,e||0),i},xSe=function(){cx=null},$d=function(t,e,n,i){return n&&(oM(t,e,n,i,-1)||oM(t,e,n,i,1))},SSe=/^(img|br|input|textarea|hr)$/i;function oM(t,e,n,i,s){for(;;){if(t==n&&e==i)return!0;if(e==(s<0?0:ar(t))){let o=t.parentNode;if(!o||o.nodeType!=1||lv(t)||SSe.test(t.nodeName)||t.contentEditable=="false")return!1;e=oi(t)+(s<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(s<0?-1:0)],t.contentEditable=="false")return!1;e=s<0?ar(t):0}else return!1}}function ar(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function $Se(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=ar(t)}else if(t.parentNode&&!lv(t))e=oi(t),t=t.parentNode;else return null}}function ASe(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!lv(t))e=oi(t)+1,t=t.parentNode;else return null}}function ESe(t,e,n){for(let i=e==0,s=e==ar(t);i||s;){if(t==n)return!0;let o=oi(t);if(t=t.parentNode,!t)return!1;i=i&&o==0,s=s&&o==ar(t)}}function lv(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const M2=function(t){return t.focusNode&&$d(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Ou(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function MSe(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function TSe(t,e,n){if(t.caretPositionFromPoint)try{let i=t.caretPositionFromPoint(e,n);if(i)return{node:i.offsetNode,offset:Math.min(ar(i.offsetNode),i.offset)}}catch{}if(t.caretRangeFromPoint){let i=t.caretRangeFromPoint(e,n);if(i)return{node:i.startContainer,offset:Math.min(ar(i.startContainer),i.startOffset)}}}const Da=typeof navigator<"u"?navigator:null,rM=typeof document<"u"?document:null,au=Da&&Da.userAgent||"",ux=/Edge\/(\d+)/.exec(au),LB=/MSIE \d/.exec(au),dx=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(au),po=!!(LB||dx||ux),Pc=LB?document.documentMode:dx?+dx[1]:ux?+ux[1]:0,ea=!po&&/gecko\/(\d+)/i.test(au);ea&&+(/Firefox\/(\d+)/.exec(au)||[0,0])[1];const hx=!po&&/Chrome\/(\d+)/.exec(au),Mi=!!hx,OB=hx?+hx[1]:0,Gi=!po&&!!Da&&/Apple Computer/.test(Da.vendor),ep=Gi&&(/Mobile\/\w+/.test(au)||!!Da&&Da.maxTouchPoints>2),nr=ep||(Da?/Mac/.test(Da.platform):!1),PSe=Da?/Win/.test(Da.platform):!1,Lr=/Android \d/.test(au),cv=!!rM&&"webkitFontSmoothing"in rM.documentElement.style,ISe=cv?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function LSe(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Ya(t,e){return typeof t=="number"?t:t[e]}function OSe(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,i=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*i}}function aM(t,e,n){let i=t.someProp("scrollThreshold")||0,s=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let r=n||t.dom;r;r=f1(r)){if(r.nodeType!=1)continue;let a=r,l=a==o.body,c=l?LSe(o):OSe(a),u=0,d=0;if(e.top<c.top+Ya(i,"top")?d=-(c.top-e.top+Ya(s,"top")):e.bottom>c.bottom-Ya(i,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+Ya(s,"top")-c.top:e.bottom-c.bottom+Ya(s,"bottom")),e.left<c.left+Ya(i,"left")?u=-(c.left-e.left+Ya(s,"left")):e.right>c.right-Ya(i,"right")&&(u=e.right-c.right+Ya(s,"right")),u||d)if(l)o.defaultView.scrollBy(u,d);else{let h=a.scrollLeft,f=a.scrollTop;d&&(a.scrollTop+=d),u&&(a.scrollLeft+=u);let p=a.scrollLeft-h,m=a.scrollTop-f;e={left:e.left-p,top:e.top-m,right:e.right-p,bottom:e.bottom-m}}if(l||/^(fixed|sticky)$/.test(getComputedStyle(r).position))break}}function DSe(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),i,s;for(let o=(e.left+e.right)/2,r=n+1;r<Math.min(innerHeight,e.bottom);r+=5){let a=t.root.elementFromPoint(o,r);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){i=a,s=l.top;break}}return{refDOM:i,refTop:s,stack:DB(t.dom)}}function DB(t){let e=[],n=t.ownerDocument;for(let i=t;i&&(e.push({dom:i,top:i.scrollTop,left:i.scrollLeft}),t!=n);i=f1(i));return e}function RSe({refDOM:t,refTop:e,stack:n}){let i=t?t.getBoundingClientRect().top:0;RB(n,i==0?0:i-e)}function RB(t,e){for(let n=0;n<t.length;n++){let{dom:i,top:s,left:o}=t[n];i.scrollTop!=s+e&&(i.scrollTop=s+e),i.scrollLeft!=o&&(i.scrollLeft=o)}}let hh=null;function VSe(t){if(t.setActive)return t.setActive();if(hh)return t.focus(hh);let e=DB(t);t.focus(hh==null?{get preventScroll(){return hh={preventScroll:!0},!0}}:void 0),hh||(hh=!1,RB(e,0))}function VB(t,e){let n,i=2e8,s,o=0,r=e.top,a=e.top,l,c;for(let u=t.firstChild,d=0;u;u=u.nextSibling,d++){let h;if(u.nodeType==1)h=u.getClientRects();else if(u.nodeType==3)h=Za(u).getClientRects();else continue;for(let f=0;f<h.length;f++){let p=h[f];if(p.top<=r&&p.bottom>=a){r=Math.max(p.bottom,r),a=Math.min(p.top,a);let m=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(m<i){n=u,i=m,s=m&&n.nodeType==3?{left:p.right<e.left?p.right:p.left,top:e.top}:e,u.nodeType==1&&m&&(o=d+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!l&&p.left<=e.left&&p.right>=e.left&&(l=u,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!n&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(o=d+1)}}return!n&&l&&(n=l,s=c,i=0),n&&n.nodeType==3?FSe(n,s):!n||i&&n.nodeType==1?{node:t,offset:o}:VB(n,s)}function FSe(t,e){let n=t.nodeValue.length,i=document.createRange();for(let s=0;s<n;s++){i.setEnd(t,s+1),i.setStart(t,s);let o=ec(i,1);if(o.top!=o.bottom&&u5(e,o))return{node:t,offset:s+(e.left>=(o.left+o.right)/2?1:0)}}return{node:t,offset:0}}function u5(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function NSe(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function BSe(t,e,n){let{node:i,offset:s}=VB(e,n),o=-1;if(i.nodeType==1&&!i.firstChild){let r=i.getBoundingClientRect();o=r.left!=r.right&&n.left>(r.left+r.right)/2?1:-1}return t.docView.posFromDOM(i,s,o)}function zSe(t,e,n,i){let s=-1;for(let o=e,r=!1;o!=t.dom;){let a=t.docView.nearestDesc(o,!0);if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)){let l=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&(!r&&l.left>i.left||l.top>i.top?s=a.posBefore:(!r&&l.right<i.left||l.bottom<i.top)&&(s=a.posAfter),r=!0),!a.contentDOM&&s<0&&!a.node.isText)return(a.node.isBlock?i.top<(l.top+l.bottom)/2:i.left<(l.left+l.right)/2)?a.posBefore:a.posAfter}o=a.dom.parentNode}return s>-1?s:t.docView.posFromDOM(e,n,-1)}function FB(t,e,n){let i=t.childNodes.length;if(i&&n.top<n.bottom)for(let s=Math.max(0,Math.min(i-1,Math.floor(i*(e.top-n.top)/(n.bottom-n.top))-2)),o=s;;){let r=t.childNodes[o];if(r.nodeType==1){let a=r.getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(u5(e,c))return FB(r,e,c)}}if((o=(o+1)%i)==s)break}return t}function HSe(t,e){let n=t.dom.ownerDocument,i,s=0,o=TSe(n,e.left,e.top);o&&({node:i,offset:s}=o);let r=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),a;if(!r||!t.dom.contains(r.nodeType!=1?r.parentNode:r)){let c=t.dom.getBoundingClientRect();if(!u5(e,c)||(r=FB(t.dom,e,c),!r))return null}if(Gi)for(let c=r;i&&c;c=f1(c))c.draggable&&(i=void 0);if(r=NSe(r,e),i){if(ea&&i.nodeType==1&&(s=Math.min(s,i.childNodes.length),s<i.childNodes.length)){let u=i.childNodes[s],d;u.nodeName=="IMG"&&(d=u.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&s++}let c;cv&&s&&i.nodeType==1&&(c=i.childNodes[s-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&s--,i==t.dom&&s==i.childNodes.length-1&&i.lastChild.nodeType==1&&e.top>i.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(s==0||i.nodeType!=1||i.childNodes[s-1].nodeName!="BR")&&(a=zSe(t,i,s,e))}a==null&&(a=BSe(t,r,e));let l=t.docView.nearestDesc(r,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function lM(t){return t.top<t.bottom||t.left<t.right}function ec(t,e){let n=t.getClientRects();if(n.length){let i=n[e<0?0:n.length-1];if(lM(i))return i}return Array.prototype.find.call(n,lM)||t.getBoundingClientRect()}const USe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function NB(t,e,n){let{node:i,offset:s,atom:o}=t.docView.domFromPos(e,n<0?-1:1),r=cv||ea;if(i.nodeType==3)if(r&&(USe.test(i.nodeValue)||(n<0?!s:s==i.nodeValue.length))){let l=ec(Za(i,s,s),n);if(ea&&s&&/\s/.test(i.nodeValue[s-1])&&s<i.nodeValue.length){let c=ec(Za(i,s-1,s-1),-1);if(c.top==l.top){let u=ec(Za(i,s,s+1),-1);if(u.top!=l.top)return tm(u,u.left<c.left)}}return l}else{let l=s,c=s,u=n<0?1:-1;return n<0&&!s?(c++,u=-1):n>=0&&s==i.nodeValue.length?(l--,u=1):n<0?l--:c++,tm(ec(Za(i,l,c),u),u<0)}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&s&&(n<0||s==ar(i))){let l=i.childNodes[s-1];if(l.nodeType==1)return y3(l.getBoundingClientRect(),!1)}if(o==null&&s<ar(i)){let l=i.childNodes[s];if(l.nodeType==1)return y3(l.getBoundingClientRect(),!0)}return y3(i.getBoundingClientRect(),n>=0)}if(o==null&&s&&(n<0||s==ar(i))){let l=i.childNodes[s-1],c=l.nodeType==3?Za(l,ar(l)-(r?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return tm(ec(c,1),!1)}if(o==null&&s<ar(i)){let l=i.childNodes[s];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?Za(l,0,r?0:1):l.nodeType==1?l:null:null;if(c)return tm(ec(c,-1),!0)}return tm(ec(i.nodeType==3?Za(i):i,-n),n>=0)}function tm(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function y3(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function BB(t,e,n){let i=t.state,s=t.root.activeElement;i!=e&&t.updateState(e),s!=t.dom&&t.focus();try{return n()}finally{i!=e&&t.updateState(i),s!=t.dom&&s&&s.focus()}}function jSe(t,e,n){let i=e.selection,s=n=="up"?i.$from:i.$to;return BB(t,e,()=>{let{node:o}=t.docView.domFromPos(s.pos,n=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(o,!0);if(!a)break;if(a.node.isBlock){o=a.contentDOM||a.dom;break}o=a.dom.parentNode}let r=NB(t,s.pos,1);for(let a=o.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=Za(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let u=l[c];if(u.bottom>u.top+1&&(n=="up"?r.top-u.top>(u.bottom-r.top)*2:u.bottom-r.bottom>(r.bottom-u.top)*2))return!1}}return!0})}const WSe=/[\u0590-\u08ac]/;function YSe(t,e,n){let{$head:i}=e.selection;if(!i.parent.isTextblock)return!1;let s=i.parentOffset,o=!s,r=s==i.parent.content.size,a=t.domSelection();return a?!WSe.test(i.parent.textContent)||!a.modify?n=="left"||n=="backward"?o:r:BB(t,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=t.domSelectionRange(),h=a.caretBidiLevel;a.modify("move",n,"character");let f=i.depth?t.docView.domAfterPos(i.before()):t.dom,{focusNode:p,focusOffset:m}=t.domSelectionRange(),b=p&&!f.contains(p.nodeType==1?p:p.parentNode)||l==p&&c==m;try{a.collapse(u,d),l&&(l!=u||c!=d)&&a.extend&&a.extend(l,c)}catch{}return h!=null&&(a.caretBidiLevel=h),b}):i.pos==i.start()||i.pos==i.end()}let cM=null,uM=null,dM=!1;function qSe(t,e,n){return cM==e&&uM==n?dM:(cM=e,uM=n,dM=n=="up"||n=="down"?jSe(t,e,n):YSe(t,e,n))}const mr=0,hM=1,Hu=2,Ra=3;class uv{constructor(e,n,i,s){this.parent=e,this.children=n,this.dom=i,this.contentDOM=s,this.dirty=mr,i.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,i){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,i=this.posAtStart;;n++){let s=this.children[n];if(s==e)return i;i+=s.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(e,n,i){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(i<0){let o,r;if(e==this.contentDOM)o=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&!((r=o.pmViewDesc)&&r.parent==this);)o=o.previousSibling;return o?this.posBeforeChild(r)+r.size:this.posAtStart}else{let o,r;if(e==this.contentDOM)o=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&!((r=o.pmViewDesc)&&r.parent==this);)o=o.nextSibling;return o?this.posBeforeChild(r):this.posAtEnd}let s;if(e==this.dom&&this.contentDOM)s=n>oi(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let o=e;;o=o.parentNode){if(o==this.dom){s=!1;break}if(o.previousSibling)break}if(s==null&&n==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){s=!0;break}if(o.nextSibling)break}}return s??i>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let i=!0,s=e;s;s=s.parentNode){let o=this.getDesc(s),r;if(o&&(!n||o.node))if(i&&(r=o.nodeDOM)&&!(r.nodeType==1?r.contains(e.nodeType==1?e:e.parentNode):r==e))i=!1;else return o}}getDesc(e){let n=e.pmViewDesc;for(let i=n;i;i=i.parent)if(i==this)return n}posFromDOM(e,n,i){for(let s=e;s;s=s.parentNode){let o=this.getDesc(s);if(o)return o.localPosFromDOM(e,n,i)}return-1}descAt(e){for(let n=0,i=0;n<this.children.length;n++){let s=this.children[n],o=i+s.size;if(i==e&&o!=i){for(;!s.border&&s.children.length;)s=s.children[0];return s}if(e<o)return s.descAt(e-i-s.border);i=o}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let i=0,s=0;for(let o=0;i<this.children.length;i++){let r=this.children[i],a=o+r.size;if(a>e||r instanceof HB){s=e-o;break}o=a}if(s)return this.children[i].domFromPos(s-this.children[i].border,n);for(let o;i&&!(o=this.children[i-1]).size&&o instanceof zB&&o.side>=0;i--);if(n<=0){let o,r=!0;for(;o=i?this.children[i-1]:null,!(!o||o.dom.parentNode==this.contentDOM);i--,r=!1);return o&&n&&r&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?oi(o.dom)+1:0}}else{let o,r=!0;for(;o=i<this.children.length?this.children[i]:null,!(!o||o.dom.parentNode==this.contentDOM);i++,r=!1);return o&&r&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?oi(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,i=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let s=-1,o=-1;for(let r=i,a=0;;a++){let l=this.children[a],c=r+l.size;if(s==-1&&e<=c){let u=r+l.border;if(e>=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,u);e=r;for(let d=a;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){s=oi(h.dom)+1;break}e-=h.size}s==-1&&(s=0)}if(s>-1&&(c>n||a==this.children.length-1)){n=c;for(let u=a+1;u<this.children.length;u++){let d=this.children[u];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){o=oi(d.dom);break}n+=d.size}o==-1&&(o=this.contentDOM.childNodes.length);break}r=c}return{node:this.contentDOM,from:e,to:n,fromOffset:s,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:i}=this.domFromPos(e,0);if(n.nodeType!=1||i==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[i]}setSelection(e,n,i,s=!1){let o=Math.min(e,n),r=Math.max(e,n);for(let h=0,f=0;h<this.children.length;h++){let p=this.children[h],m=f+p.size;if(o>f&&r<m)return p.setSelection(e-f-p.border,n-f-p.border,i,s);f=m}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),c=i.getSelection(),u=!1;if((ea||Gi)&&e==n){let{node:h,offset:f}=a;if(h.nodeType==3){if(u=!!(f&&h.nodeValue[f-1]==`
120 +`),u&&f==h.nodeValue.length)for(let p=h,m;p;p=p.parentNode){if(m=p.nextSibling){m.nodeName=="BR"&&(a=l={node:m.parentNode,offset:oi(m)+1});break}let b=p.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{let p=h.childNodes[f-1];u=p&&(p.nodeName=="BR"||p.contentEditable=="false")}}if(ea&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let h=c.focusNode.childNodes[c.focusOffset];h&&h.contentEditable=="false"&&(s=!0)}if(!(s||u&&Gi)&&$d(a.node,a.offset,c.anchorNode,c.anchorOffset)&&$d(l.node,l.offset,c.focusNode,c.focusOffset))return;let d=!1;if((c.extend||e==n)&&!u){c.collapse(a.node,a.offset);try{e!=n&&c.extend(l.node,l.offset),d=!0}catch{}}if(!d){if(e>n){let f=a;a=l,l=f}let h=document.createRange();h.setEnd(l.node,l.offset),h.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let i=0,s=0;s<this.children.length;s++){let o=this.children[s],r=i+o.size;if(i==r?e<=r&&n>=i:e<r&&n>i){let a=i+o.border,l=r-o.border;if(e>=a&&n<=l){this.dirty=e==i||n==r?Hu:hM,e==a&&n==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=Ra:o.markDirty(e-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?Hu:Ra}i=r}this.dirty=Hu}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let i=e==1?Hu:hM;n.dirty<i&&(n.dirty=i)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class zB extends uv{constructor(e,n,i,s){let o,r=n.type.toDOM;if(typeof r=="function"&&(r=r(i,()=>{if(!o)return s;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(r.nodeType!=1){let a=document.createElement("span");a.appendChild(r),r=a}r.contentEditable="false",r.classList.add("ProseMirror-widget")}super(e,[],r,null),this.widget=n,this.widget=n,o=this}matchesWidget(e){return this.dirty==mr&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class GSe extends uv{constructor(e,n,i,s){super(e,[],n,null),this.textDOM=i,this.text=s}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Ad extends uv{constructor(e,n,i,s){super(e,[],i,s),this.mark=n}static create(e,n,i,s){let o=s.nodeViews[n.type.name],r=o&&o(n,s,i);return(!r||!r.dom)&&(r=iu.renderSpec(document,n.type.spec.toDOM(n,i),null,n.attrs)),new Ad(e,n,r.dom,r.contentDOM||r.dom)}parseRule(){return this.dirty&Ra||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Ra&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=mr){let i=this.parent;for(;!i.node;)i=i.parent;i.dirty<this.dirty&&(i.dirty=this.dirty),this.dirty=mr}}slice(e,n,i){let s=Ad.create(this.parent,this.mark,!0,i),o=this.children,r=this.size;n<r&&(o=mx(o,n,r,i)),e>0&&(o=mx(o,0,e,i));for(let a=0;a<o.length;a++)o[a].parent=s;return s.children=o,s}}class Ic extends uv{constructor(e,n,i,s,o,r,a,l,c){super(e,[],o,r),this.node=n,this.outerDeco=i,this.innerDeco=s,this.nodeDOM=a}static create(e,n,i,s,o,r){let a=o.nodeViews[n.type.name],l,c=a&&a(n,o,()=>{if(!l)return r;if(l.parent)return l.parent.posBeforeChild(l)},i,s),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}=iu.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 h=u;return u=WB(u,i,n),c?l=new XSe(e,n,i,s,u,d||null,h,c,o,r+1):n.isText?new T2(e,n,i,s,u,h,o):new Ic(e,n,i,s,u,d||null,h,o,r+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let i=this.children[n];if(this.dom.contains(i.dom.parentNode)){e.contentElement=i.dom.parentNode;break}}e.contentElement||(e.getContent=()=>st.empty)}return e}matchesNode(e,n,i){return this.dirty==mr&&e.eq(this.node)&&px(n,this.outerDeco)&&i.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let i=this.node.inlineContent,s=n,o=e.composing?this.localCompositionInfo(e,n):null,r=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new ZSe(this,r&&r.node,e);e9e(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,i,e):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?En.none:this.node.child(u).marks,i,e),l.placeWidget(c,e,s)},(c,u,d,h)=>{l.syncToMarks(c.marks,i,e);let f;l.findNodeMatch(c,u,d,h)||a&&e.state.selection.from>s&&e.state.selection.to<s+c.nodeSize&&(f=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(c,u,d,f,e)||l.updateNextNode(c,u,d,e,h,s)||l.addNode(c,u,d,e,s),s+=c.nodeSize}),l.syncToMarks([],i,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Hu)&&(r&&this.protectLocalComposition(e,r),UB(this.contentDOM,this.children,e),ep&&t9e(this.dom))}localCompositionInfo(e,n){let{from:i,to:s}=e.state.selection;if(!(e.state.selection instanceof Ot)||i<n||s>n+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let r=o.nodeValue,a=n9e(this.node.content,r,i-n,s-n);return a<0?null:{node:o,pos:a,text:r}}else return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:i,text:s}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let r=new GSe(this,o,n,s);e.input.compositionNodes.push(r),this.children=mx(this.children,i,i+s.length,e,r)}update(e,n,i,s){return this.dirty==Ra||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,i,s),!0)}updateInner(e,n,i,s){this.updateOuterDeco(n),this.node=e,this.innerDeco=i,this.contentDOM&&this.updateChildren(s,this.posAtStart),this.dirty=mr}updateOuterDeco(e){if(px(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,i=this.dom;this.dom=jB(this.dom,this.nodeDOM,fx(this.outerDeco,this.node,n),fx(e,this.node,n)),this.dom!=i&&(i.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function fM(t,e,n,i,s){WB(i,e,t);let o=new Ic(void 0,t,e,n,i,i,i,s,0);return o.contentDOM&&o.updateChildren(s,0),o}class T2 extends Ic{constructor(e,n,i,s,o,r,a){super(e,n,i,s,o,null,r,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,i,s){return this.dirty==Ra||this.dirty!=mr&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=mr||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,s.trackWrites==this.nodeDOM&&(s.trackWrites=null)),this.node=e,this.dirty=mr,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,i){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,i)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,i){let s=this.node.cut(e,n),o=document.createTextNode(s.text);return new T2(this.parent,s,this.outerDeco,this.innerDeco,o,o,i)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Ra)}get domAtom(){return!1}isText(e){return this.node.text==e}}class HB extends uv{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==mr&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class XSe extends Ic{constructor(e,n,i,s,o,r,a,l,c,u){super(e,n,i,s,o,r,a,c,u),this.spec=l}update(e,n,i,s){if(this.dirty==Ra)return!1;if(this.spec.update){let o=this.spec.update(e,n,i);return o&&this.updateInner(e,n,i,s),o}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,i,s)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,i,s){this.spec.setSelection?this.spec.setSelection(e,n,i):super.setSelection(e,n,i,s)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function UB(t,e,n){let i=t.firstChild,s=!1;for(let o=0;o<e.length;o++){let r=e[o],a=r.dom;if(a.parentNode==t){for(;a!=i;)i=pM(i),s=!0;i=i.nextSibling}else s=!0,t.insertBefore(a,i);if(r instanceof Ad){let l=i?i.previousSibling:t.lastChild;UB(r.contentDOM,r.children,n),i=l?l.nextSibling:t.firstChild}}for(;i;)i=pM(i),s=!0;s&&n.trackWrites==t&&(n.trackWrites=null)}const pg=function(t){t&&(this.nodeName=t)};pg.prototype=Object.create(null);const Uu=[new pg];function fx(t,e,n){if(t.length==0)return Uu;let i=n?Uu[0]:new pg,s=[i];for(let o=0;o<t.length;o++){let r=t[o].type.attrs;if(r){r.nodeName&&s.push(i=new pg(r.nodeName));for(let a in r){let l=r[a];l!=null&&(n&&s.length==1&&s.push(i=new pg(e.isInline?"span":"div")),a=="class"?i.class=(i.class?i.class+" ":"")+l:a=="style"?i.style=(i.style?i.style+";":"")+l:a!="nodeName"&&(i[a]=l))}}}return s}function jB(t,e,n,i){if(n==Uu&&i==Uu)return e;let s=e;for(let o=0;o<i.length;o++){let r=i[o],a=n[o];if(o){let l;a&&a.nodeName==r.nodeName&&s!=t&&(l=s.parentNode)&&l.nodeName.toLowerCase()==r.nodeName||(l=document.createElement(r.nodeName),l.pmIsDeco=!0,l.appendChild(s),a=Uu[0]),s=l}KSe(s,a||Uu[0],r)}return s}function KSe(t,e,n){for(let i in e)i!="class"&&i!="style"&&i!="nodeName"&&!(i in n)&&t.removeAttribute(i);for(let i in n)i!="class"&&i!="style"&&i!="nodeName"&&n[i]!=e[i]&&t.setAttribute(i,n[i]);if(e.class!=n.class){let i=e.class?e.class.split(" ").filter(Boolean):[],s=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<i.length;o++)s.indexOf(i[o])==-1&&t.classList.remove(i[o]);for(let o=0;o<s.length;o++)i.indexOf(s[o])==-1&&t.classList.add(s[o]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let i=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,s;for(;s=i.exec(e.style);)t.style.removeProperty(s[1])}n.style&&(t.style.cssText+=n.style)}}function WB(t,e,n){return jB(t,t,Uu,fx(e,n,t.nodeType!=1))}function px(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function pM(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class ZSe{constructor(e,n,i){this.lock=n,this.view=i,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=JSe(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let i=e;i<n;i++)this.top.children[i].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,i){let s=0,o=this.stack.length>>1,r=Math.min(o,e.length);for(;s<r&&(s==o-1?this.top:this.stack[s+1<<1]).matchesMark(e[s])&&e[s].type.spec.spanning!==!1;)s++;for(;s<o;)this.destroyRest(),this.top.dirty=mr,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let a=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let c=this.top.children[l];if(c.matchesMark(e[o])&&!this.isLocked(c.dom)){a=l;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=Ad.create(this.top,e[o],n,i);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}findNodeMatch(e,n,i,s){let o=-1,r;if(s>=this.preMatch.index&&(r=this.preMatch.matches[s-this.preMatch.index]).parent==this.top&&r.matchesNode(e,n,i))o=this.top.children.indexOf(r,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let c=this.top.children[a];if(c.matchesNode(e,n,i)&&!this.preMatch.matched.has(c)){o=a;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,n,i,s,o){let r=this.top.children[s];return r.dirty==Ra&&r.dom==r.contentDOM&&(r.dirty=Hu),r.update(e,n,i,o)?(this.destroyBetween(this.index,s),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let i=e.pmViewDesc;if(i){for(let s=this.index;s<this.top.children.length;s++)if(this.top.children[s]==i)return s}return-1}e=n}}updateNextNode(e,n,i,s,o,r){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof Ic){let c=this.preMatch.matched.get(l);if(c!=null&&c!=o)return!1;let u=l.dom,d,h=this.isLocked(u)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=Ra&&px(n,l.outerDeco));if(!h&&l.update(e,n,i,s))return this.destroyBetween(this.index,a),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!h&&(d=this.recreateWrapper(l,e,n,i,s,r)))return this.top.children[this.index]=d,d.contentDOM&&(d.dirty=Hu,d.updateChildren(s,r+1),d.dirty=mr),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,i,s,o,r){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content))return null;let a=Ic.create(this.top,n,i,s,o,r);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,i,s,o){let r=Ic.create(this.top,e,n,i,s,o);r.contentDOM&&r.updateChildren(s,o+1),this.top.children.splice(this.index++,0,r),this.changed=!0}placeWidget(e,n,i){let s=this.index<this.top.children.length?this.top.children[this.index]:null;if(s&&s.matchesWidget(e)&&(e==s.widget||!s.widget.type.toDOM.parentNode))this.index++;else{let o=new zB(this.top,e,n,i);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof Ad;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof T2)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Gi||Mi)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let i=document.createElement(e);e=="IMG"&&(i.className="ProseMirror-separator",i.alt=""),e=="BR"&&(i.className="ProseMirror-trailingBreak");let s=new HB(this.top,[],i,null);n!=this.top?n.children.push(s):n.children.splice(this.index++,0,s),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function JSe(t,e){let n=e,i=n.children.length,s=t.childCount,o=new Map,r=[];e:for(;s>0;){let a;for(;;)if(i){let c=n.children[i-1];if(c instanceof Ad)n=c,i=c.children.length;else{a=c,i--;break}}else{if(n==e)break e;i=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(s-1))break;--s,o.set(a,s),r.push(a)}}return{index:s,matched:o,matches:r.reverse()}}function QSe(t,e){return t.type.side-e.type.side}function e9e(t,e,n,i){let s=e.locals(t),o=0;if(s.length==0){for(let c=0;c<t.childCount;c++){let u=t.child(c);i(u,s,e.forChild(o,u),c),o+=u.nodeSize}return}let r=0,a=[],l=null;for(let c=0;;){let u,d;for(;r<s.length&&s[r].to==o;){let b=s[r++];b.widget&&(u?(d||(d=[u])).push(b):u=b)}if(u)if(d){d.sort(QSe);for(let b=0;b<d.length;b++)n(d[b],c,!!l)}else n(u,c,!!l);let h,f;if(l)f=-1,h=l,l=null;else if(c<t.childCount)f=c,h=t.child(c++);else break;for(let b=0;b<a.length;b++)a[b].to<=o&&a.splice(b--,1);for(;r<s.length&&s[r].from<=o&&s[r].to>o;)a.push(s[r++]);let p=o+h.nodeSize;if(h.isText){let b=p;r<s.length&&s[r].from<b&&(b=s[r].from);for(let w=0;w<a.length;w++)a[w].to<b&&(b=a[w].to);b<p&&(l=h.cut(b-o),h=h.cut(0,b-o),p=b,f=-1)}else for(;r<s.length&&s[r].to<p;)r++;let m=h.isInline&&!h.isLeaf?a.filter(b=>!b.inline):a.slice();i(h,m,e.forChild(o,h),f),o=p}}function t9e(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function n9e(t,e,n,i){for(let s=0,o=0;s<t.childCount&&o<=i;){let r=t.child(s++),a=o;if(o+=r.nodeSize,!r.isText)continue;let l=r.text;for(;s<t.childCount;){let c=t.child(s++);if(o+=c.nodeSize,!c.isText)break;l+=c.text}if(o>=n){if(o>=i&&l.slice(i-e.length-a,i-a)==e)return i-e.length;let c=a<i?l.lastIndexOf(e,i-a-1):-1;if(c>=0&&c+e.length+a>=n)return a+c;if(n==i&&l.length>=i+e.length-a&&l.slice(i-a,i-a+e.length)==e)return i}}return-1}function mx(t,e,n,i,s){let o=[];for(let r=0,a=0;r<t.length;r++){let l=t[r],c=a,u=a+=l.size;c>=n||u<=e?o.push(l):(c<e&&o.push(l.slice(0,e-c,i)),s&&(o.push(s),s=void 0),u>n&&o.push(l.slice(n-c,l.size,i)))}return o}function d5(t,e=null){let n=t.domSelectionRange(),i=t.state.doc;if(!n.focusNode)return null;let s=t.docView.nearestDesc(n.focusNode),o=s&&s.size==0,r=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(r<0)return null;let a=i.resolve(r),l,c;if(M2(n)){for(l=a;s&&!s.node;)s=s.parent;let u=s.node;if(s&&u.isAtom&&Rt.isSelectable(u)&&s.parent&&!(u.isInline&&ESe(n.focusNode,n.focusOffset,s.dom))){let d=s.posBefore;c=new Rt(r==d?a:i.resolve(d))}}else{let u=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(u<0)return null;l=i.resolve(u)}if(!c){let u=e=="pointer"||t.state.selection.head<a.pos&&!o?1:-1;c=h5(t,l,a,u)}return c}function YB(t){return t.editable?t.hasFocus():GB(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function ml(t,e=!1){let n=t.state.selection;if(qB(t,n),!!YB(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&Mi){let i=t.domSelectionRange(),s=t.domObserver.currentSelection;if(i.anchorNode&&s.anchorNode&&$d(i.anchorNode,i.anchorOffset,s.anchorNode,s.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)i9e(t);else{let{anchor:i,head:s}=n,o,r;mM&&!(n instanceof Ot)&&(n.$from.parent.inlineContent||(o=gM(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(r=gM(t,n.to))),t.docView.setSelection(i,s,t.root,e),mM&&(o&&vM(o),r&&vM(r)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&s9e(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const mM=Gi||Mi&&OB<63;function gM(t,e){let{node:n,offset:i}=t.docView.domFromPos(e,0),s=i<n.childNodes.length?n.childNodes[i]:null,o=i?n.childNodes[i-1]:null;if(Gi&&s&&s.contentEditable=="false")return b3(s);if((!s||s.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(s)return b3(s);if(o)return b3(o)}}function b3(t){return t.contentEditable="true",Gi&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function vM(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function s9e(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),i=n.anchorNode,s=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=i||n.anchorOffset!=s)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!YB(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function i9e(t){let e=t.domSelection(),n=document.createRange();if(!e)return;let i=t.cursorWrapper.dom,s=i.nodeName=="IMG";s?n.setStart(i.parentNode,oi(i)+1):n.setStart(i,0),n.collapse(!0),e.removeAllRanges(),e.addRange(n),!s&&!t.state.selection.visible&&po&&Pc<=11&&(i.disabled=!0,i.disabled=!1)}function qB(t,e){if(e instanceof Rt){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(_M(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else _M(t)}function _M(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function h5(t,e,n,i){return t.someProp("createSelectionBetween",s=>s(t,e,n))||Ot.between(e,n,i)}function yM(t){return t.editable&&!t.hasFocus()?!1:GB(t)}function GB(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function o9e(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return $d(e.node,e.offset,n.anchorNode,n.anchorOffset)}function gx(t,e){let{$anchor:n,$head:i}=t.selection,s=e>0?n.max(i):n.min(i),o=s.parent.inlineContent?s.depth?t.doc.resolve(e>0?s.after():s.before()):null:s;return o&&Ut.findFrom(o,e)}function hc(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function bM(t,e,n){let i=t.state.selection;if(i instanceof Ot)if(n.indexOf("s")>-1){let{$head:s}=i,o=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let r=t.state.doc.resolve(s.pos+o.nodeSize*(e<0?-1:1));return hc(t,new Ot(i.$anchor,r))}else if(i.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let s=gx(t.state,e);return s&&s instanceof Rt?hc(t,s):!1}else if(!(nr&&n.indexOf("m")>-1)){let s=i.$head,o=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter,r;if(!o||o.isText)return!1;let a=e<0?s.pos-o.nodeSize:s.pos;return o.isAtom||(r=t.docView.descAt(a))&&!r.contentDOM?Rt.isSelectable(o)?hc(t,new Rt(e<0?t.state.doc.resolve(s.pos-o.nodeSize):s)):cv?hc(t,new Ot(t.state.doc.resolve(e<0?a:a+o.nodeSize))):!1:!1}}else return!1;else{if(i instanceof Rt&&i.node.isInline)return hc(t,new Ot(e>0?i.$to:i.$from));{let s=gx(t.state,e);return s?hc(t,s):!1}}}function q0(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function mg(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function fh(t,e){return e<0?r9e(t):a9e(t)}function r9e(t){let e=t.domSelectionRange(),n=e.focusNode,i=e.focusOffset;if(!n)return;let s,o,r=!1;for(ea&&n.nodeType==1&&i<q0(n)&&mg(n.childNodes[i],-1)&&(r=!0);;)if(i>0){if(n.nodeType!=1)break;{let a=n.childNodes[i-1];if(mg(a,-1))s=n,o=--i;else if(a.nodeType==3)n=a,i=n.nodeValue.length;else break}}else{if(XB(n))break;{let a=n.previousSibling;for(;a&&mg(a,-1);)s=n.parentNode,o=oi(a),a=a.previousSibling;if(a)n=a,i=q0(n);else{if(n=n.parentNode,n==t.dom)break;i=0}}}r?vx(t,n,i):s&&vx(t,s,o)}function a9e(t){let e=t.domSelectionRange(),n=e.focusNode,i=e.focusOffset;if(!n)return;let s=q0(n),o,r;for(;;)if(i<s){if(n.nodeType!=1)break;let a=n.childNodes[i];if(mg(a,1))o=n,r=++i;else break}else{if(XB(n))break;{let a=n.nextSibling;for(;a&&mg(a,1);)o=a.parentNode,r=oi(a)+1,a=a.nextSibling;if(a)n=a,i=0,s=q0(n);else{if(n=n.parentNode,n==t.dom)break;i=s=0}}}o&&vx(t,o,r)}function XB(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function l9e(t,e){for(;t&&e==t.childNodes.length&&!lv(t);)e=oi(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function c9e(t,e){for(;t&&!e&&!lv(t);)e=oi(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function vx(t,e,n){if(e.nodeType!=3){let o,r;(r=l9e(e,n))?(e=r,n=0):(o=c9e(e,n))&&(e=o,n=o.nodeValue.length)}let i=t.domSelection();if(!i)return;if(M2(i)){let o=document.createRange();o.setEnd(e,n),o.setStart(e,n),i.removeAllRanges(),i.addRange(o)}else i.extend&&i.extend(e,n);t.domObserver.setCurSelection();let{state:s}=t;setTimeout(()=>{t.state==s&&ml(t)},50)}function wM(t,e){let n=t.state.doc.resolve(e);if(!(Mi||PSe)&&n.parent.inlineContent){let s=t.coordsAtPos(e);if(e>n.start()){let o=t.coordsAtPos(e-1),r=(o.top+o.bottom)/2;if(r>s.top&&r<s.bottom&&Math.abs(o.left-s.left)>1)return o.left<s.left?"ltr":"rtl"}if(e<n.end()){let o=t.coordsAtPos(e+1),r=(o.top+o.bottom)/2;if(r>s.top&&r<s.bottom&&Math.abs(o.left-s.left)>1)return o.left>s.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function kM(t,e,n){let i=t.state.selection;if(i instanceof Ot&&!i.empty||n.indexOf("s")>-1||nr&&n.indexOf("m")>-1)return!1;let{$from:s,$to:o}=i;if(!s.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let r=gx(t.state,e);if(r&&r instanceof Rt)return hc(t,r)}if(!s.parent.inlineContent){let r=e<0?s:o,a=i instanceof Bo?Ut.near(r,e):Ut.findFrom(r,e);return a?hc(t,a):!1}return!1}function CM(t,e){if(!(t.state.selection instanceof Ot))return!0;let{$head:n,$anchor:i,empty:s}=t.state.selection;if(!n.sameParent(i))return!0;if(!s)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let r=t.state.tr;return e<0?r.delete(n.pos-o.nodeSize,n.pos):r.delete(n.pos,n.pos+o.nodeSize),t.dispatch(r),!0}return!1}function xM(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function u9e(t){if(!Gi||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let i=e.firstChild;xM(t,i,"true"),setTimeout(()=>xM(t,i,"false"),20)}return!1}function d9e(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function h9e(t,e){let n=e.keyCode,i=d9e(e);if(n==8||nr&&n==72&&i=="c")return CM(t,-1)||fh(t,-1);if(n==46&&!e.shiftKey||nr&&n==68&&i=="c")return CM(t,1)||fh(t,1);if(n==13||n==27)return!0;if(n==37||nr&&n==66&&i=="c"){let s=n==37?wM(t,t.state.selection.from)=="ltr"?-1:1:-1;return bM(t,s,i)||fh(t,s)}else if(n==39||nr&&n==70&&i=="c"){let s=n==39?wM(t,t.state.selection.from)=="ltr"?1:-1:1;return bM(t,s,i)||fh(t,s)}else{if(n==38||nr&&n==80&&i=="c")return kM(t,-1,i)||fh(t,-1);if(n==40||nr&&n==78&&i=="c")return u9e(t)||kM(t,1,i)||fh(t,1);if(i==(nr?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function KB(t,e){t.someProp("transformCopied",f=>{e=f(e,t)});let n=[],{content:i,openStart:s,openEnd:o}=e;for(;s>1&&o>1&&i.childCount==1&&i.firstChild.childCount==1;){s--,o--;let f=i.firstChild;n.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),i=f.content}let r=t.someProp("clipboardSerializer")||iu.fromSchema(t.state.schema),a=nz(),l=a.createElement("div");l.appendChild(r.serializeFragment(i,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=tz[c.nodeName.toLowerCase()]);){for(let f=u.length-1;f>=0;f--){let p=a.createElement(u[f]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${s} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",f=>f(e,t))||e.content.textBetween(0,e.content.size,`
116 121
117 -`);return{dom:a,text:f,slice:t}}function JA(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 Ye(Ue.from(e.state.schema.text(t.replace(/\r\n?/g,`
118 -`))),0,0):Ye.empty;let d=e.someProp("clipboardTextParser",f=>f(t,r,o,e));if(d)l=d;else{let f=r.marks(),{schema:p}=e.state,h=ta.fromSchema(p);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let y=i.appendChild(document.createElement("p"));m&&y.appendChild(h.serializeNode(p.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),i=S3e(n),Th&&$3e(i);let u=i&&i.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=i.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;i=f}if(l||(l=(e.someProp("clipboardParser")||e.someProp("domParser")||fu.fromSchema(e.state.schema)).parseSlice(i,{preserveWhitespace:!!(a||c),context:r,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!C3e.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)l=E3e(h9(l,+c[1],+c[2]),c[4]);else if(l=Ye.maxOpen(k3e(l.content,r),!0),l.openStart||l.openEnd){let d=0,f=0;for(let p=l.content.firstChild;d<l.openStart&&!p.type.spec.isolating;d++,p=p.firstChild);for(let p=l.content.lastChild;f<l.openEnd&&!p.type.spec.isolating;f++,p=p.lastChild);l=h9(l,d,f)}return e.someProp("transformPasted",d=>{l=d(l,e)}),l}const C3e=/^(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 k3e(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.index(n)),s,i=[];if(e.forEach(l=>{if(!i)return;let a=r.findWrapping(l.type),u;if(!a)return i=null;if(u=i.length&&s.length&&QA(a,s,l,i[i.length-1],0))i[i.length-1]=u;else{i.length&&(i[i.length-1]=eN(i[i.length-1],s.length));let c=XA(l,a);i.push(c),r=r.matchType(c.type),s=a}}),i)return Ue.from(i)}return e}function XA(e,t,n=0){for(let o=t.length-1;o>=n;o--)e=t[o].create(null,Ue.from(e));return e}function QA(e,t,n,o,r){if(r<e.length&&r<t.length&&e[r]==t[r]){let s=QA(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(Ue.from(XA(n,e,r+1))))}}function eN(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,eN(e.lastChild,t-1)),o=e.contentMatchAt(e.childCount).fillBefore(Ue.empty,!0);return e.copy(n.append(o))}function c2(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=c2(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(Ue.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,i.copy(l))}function h9(e,t,n){return t<e.openStart&&(e=new Ye(c2(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Ye(c2(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const tN={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 m9=null;function nN(){return m9||(m9=document.implementation.createHTMLDocument("title"))}function S3e(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=nN().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e),r;if((r=o&&tN[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 $3e(e){let t=e.querySelectorAll(mo?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let o=t[n];o.childNodes.length==1&&o.textContent==" "&&o.parentNode&&o.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),o)}}function E3e(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=Ue.from(a.create(o[l+1],r)),s++,i++}return new Ye(r,s,i)}const Ao={},No={},x3e={touchstart:!0,touchmove:!0};class M3e{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 T3e(e){for(let t in Ao){let n=Ao[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=o=>{I3e(e,o)&&!yC(e,o)&&(e.editable||!(o.type in No))&&n(e,o)},x3e[t]?{passive:!0}:void 0)}Io&&e.dom.addEventListener("input",()=>null),d2(e)}function Il(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function O3e(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 d2(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=o=>yC(e,o))})}function yC(e,t){return e.someProp("handleDOMEvents",n=>{let o=n[t.type];return o?o(e,t)||t.defaultPrevented:!1})}function I3e(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 A3e(e,t){!yC(e,t)&&Ao[t.type]&&(e.editable||!(t.type in No))&&Ao[t.type](e,t)}No.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!rN(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(rs&&mo&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),pd&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let o=Date.now();e.input.lastIOSEnter=o,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==o&&(e.someProp("handleKeyDown",r=>r(e,xa(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",o=>o(e,n))||w3e(e,n)?n.preventDefault():Il(e,"key")};No.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};No.keypress=(e,t)=>{let n=t;if(rN(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Er&&n.metaKey)return;if(e.someProp("handleKeyPress",r=>r(e,n))){n.preventDefault();return}let o=e.state.selection;if(!(o instanceof ht)||!o.$from.sameParent(o.$to)){let r=String.fromCharCode(n.charCode);!/[\r\n]/.test(r)&&!e.someProp("handleTextInput",s=>s(e,o.$from.pos,o.$to.pos,r))&&e.dispatch(e.state.tr.insertText(r).scrollIntoView()),n.preventDefault()}};function hv(e){return{left:e.clientX,top:e.clientY}}function N3e(e,t){let n=t.x-e.clientX,o=t.y-e.clientY;return n*n+o*o<100}function _C(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 Mc(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 P3e(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),o=n.nodeAfter;return o&&o.isAtom&&mt.isSelectable(o)?(Mc(e,new mt(n),"pointer"),!0):!1}function L3e(e,t){if(t==-1)return!1;let n=e.state.selection,o,r;n instanceof mt&&(o=n.node);let s=e.state.doc.resolve(t);for(let i=s.depth+1;i>0;i--){let l=i>s.depth?s.nodeAfter:s.node(i);if(mt.isSelectable(l)){o&&n.$from.depth>0&&i>=n.$from.depth&&s.before(n.$from.depth+1)==n.$from.pos?r=s.before(n.$from.depth):r=s.before(i);break}}return r!=null?(Mc(e,mt.create(e.state.doc,r),"pointer"),!0):!1}function R3e(e,t,n,o,r){return _C(e,"handleClickOn",t,n,o)||e.someProp("handleClick",s=>s(e,t,o))||(r?L3e(e,n):P3e(e,n))}function D3e(e,t,n,o){return _C(e,"handleDoubleClickOn",t,n,o)||e.someProp("handleDoubleClick",r=>r(e,t,o))}function F3e(e,t,n,o){return _C(e,"handleTripleClickOn",t,n,o)||e.someProp("handleTripleClick",r=>r(e,t,o))||V3e(e,n,o)}function V3e(e,t,n){if(n.button!=0)return!1;let o=e.state.doc;if(t==-1)return o.inlineContent?(Mc(e,ht.create(o,0,o.content.size),"pointer"),!0):!1;let r=o.resolve(t);for(let s=r.depth+1;s>0;s--){let i=s>r.depth?r.nodeAfter:r.node(s),l=r.before(s);if(i.inlineContent)Mc(e,ht.create(o,l+1,l+1+i.content.size),"pointer");else if(mt.isSelectable(i))Mc(e,mt.create(o,l),"pointer");else continue;return!0}}function bC(e){return Xg(e)}const oN=Er?"metaKey":"ctrlKey";Ao.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let o=bC(e),r=Date.now(),s="singleClick";r-e.input.lastClick.time<500&&N3e(n,e.input.lastClick)&&!n[oN]&&(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(hv(n));i&&(s=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new B3e(e,i,n,!!o)):(s=="doubleClick"?D3e:F3e)(e,i.pos,i.inside,n)?n.preventDefault():Il(e,"pointer"))};class B3e{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[oN],this.allowDefault=o.shiftKey;let s,i;if(n.inside>-1)s=t.state.doc.nodeAt(n.inside),i=n.inside;else{let c=t.state.doc.resolve(n.pos);s=c.parent,i=c.depth?c.before():0}const l=r?null:o.target,a=l?t.docView.nearestDesc(l,!0):null;this.target=a&&a.dom.nodeType==1?a.dom:null;let{selection:u}=t.state;(o.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||u instanceof mt&&u.from<=i&&u.to>i)&&(this.mightDrag={node:s,pos:i,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&vs&&!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)),Il(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(()=>Oi(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(hv(t))),this.updateAllowDefault(t),this.allowDefault||!n?Il(this.view,"pointer"):R3e(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Io&&this.mightDrag&&!this.mightDrag.node.isAtom||mo&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Mc(this.view,bt.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):Il(this.view,"pointer")}move(t){this.updateAllowDefault(t),Il(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)}}Ao.touchstart=e=>{e.input.lastTouch=Date.now(),bC(e),Il(e,"pointer")};Ao.touchmove=e=>{e.input.lastTouch=Date.now(),Il(e,"pointer")};Ao.contextmenu=e=>bC(e);function rN(e,t){return e.composing?!0:Io&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const z3e=rs?5e3:-1;No.compositionstart=No.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof ht&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(o=>o.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),Xg(e,!0),e.markCursor=null;else if(Xg(e,!t.selection.empty),vs&&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}sN(e,z3e)};No.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++,sN(e,20))};function sN(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Xg(e),t))}function iN(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=H3e());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function j3e(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=Lwe(t.focusNode,t.focusOffset),o=Rwe(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 H3e(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Xg(e,t=!1){if(!(rs&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),iN(e),t||e.docView&&e.docView.dirty){let n=gC(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 U3e(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 Up=Go&&Rl<15||pd&&zwe<604;Ao.copy=No.cut=(e,t)=>{let n=t,o=e.state.selection,r=n.type=="cut";if(o.empty)return;let s=Up?null:n.clipboardData,i=o.content(),{dom:l,text:a}=ZA(e,i);s?(n.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",a)):U3e(e,l),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function W3e(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function K3e(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?Wp(e,o.value,null,r,t):Wp(e,o.textContent,o.innerHTML,r,t)},50)}function Wp(e,t,n,o,r){let s=JA(e,t,n,o,e.state.selection.$from);if(e.someProp("handlePaste",a=>a(e,r,s||Ye.empty)))return!0;if(!s)return!1;let i=W3e(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 lN(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," "):""}No.paste=(e,t)=>{let n=t;if(e.composing&&!rs)return;let o=Up?null:n.clipboardData,r=e.input.shiftKey&&e.input.lastKeyCode!=45;o&&Wp(e,lN(o),o.getData("text/html"),r,n)?n.preventDefault():K3e(e,n)};class aN{constructor(t,n,o){this.slice=t,this.move=n,this.node=o}}const uN=Er?"altKey":"ctrlKey";Ao.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(hv(n)),i;if(!(s&&s.pos>=r.from&&s.pos<=(r instanceof mt?r.to-1:r.to))){if(o&&o.mightDrag)i=mt.create(e.state.doc,o.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(i=mt.create(e.state.doc,d.posBefore))}}let l=(i||e.state.selection).content(),{dom:a,text:u,slice:c}=ZA(e,l);(!n.dataTransfer.files.length||!mo||PA>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Up?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",Up||n.dataTransfer.setData("text/plain",u),e.dragging=new aN(c,!n[uN],i)};Ao.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};No.dragover=No.dragenter=(e,t)=>t.preventDefault();No.drop=(e,t)=>{let n=t,o=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let r=e.posAtCoords(hv(n));if(!r)return;let s=e.state.doc.resolve(r.pos),i=o&&o.slice;i?e.someProp("transformPasted",h=>{i=h(i,e)}):i=JA(e,lN(n.dataTransfer),Up?null:n.dataTransfer.getData("text/html"),!1,s);let l=!!(o&&!n[uN]);if(e.someProp("handleDrop",h=>h(e,n,i||Ye.empty,l))){n.preventDefault();return}if(!i)return;n.preventDefault();let a=i?O2e(e.state.doc,s.pos,i):s.pos;a==null&&(a=s.pos);let u=e.state.tr;if(l){let{node:h}=o;h?h.replace(u):u.deleteSelection()}let c=u.mapping.map(a),d=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,f=u.doc;if(d?u.replaceRangeWith(c,c,i.content.firstChild):u.replaceRange(c,c,i),u.doc.eq(f))return;let p=u.doc.resolve(c);if(d&&mt.isSelectable(i.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(i.content.firstChild))u.setSelection(new mt(p));else{let h=u.mapping.map(a);u.mapping.maps[u.mapping.maps.length-1].forEach((m,y,v,w)=>h=w),u.setSelection(vC(e,p,u.doc.resolve(h)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))};Ao.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())&&Oi(e)},20))};Ao.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)};Ao.beforeinput=(e,t)=>{if(mo&&rs&&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,xa(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 No)Ao[e]=No[e];function Kp(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 Qg{constructor(t,n){this.toDOM=t,this.spec=n||Ga,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 zn(s-o,s-o,this)}valid(){return!0}eq(t){return this==t||t instanceof Qg&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Kp(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Fl{constructor(t,n){this.attrs=t,this.spec=n||Ga}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 zn(s,i,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof Fl&&Kp(this.attrs,t.attrs)&&Kp(this.spec,t.spec)}static is(t){return t.type instanceof Fl}destroy(){}}class wC{constructor(t,n){this.attrs=t,this.spec=n||Ga}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 zn(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 wC&&Kp(this.attrs,t.attrs)&&Kp(this.spec,t.spec)}destroy(){}}class zn{constructor(t,n,o){this.from=t,this.to=n,this.type=o}copy(t,n){return new zn(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 zn(t,t,new Qg(n,o))}static inline(t,n,o,r){return new zn(t,n,new Fl(o,r))}static node(t,n,o,r){return new zn(t,n,new wC(o,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Fl}get widget(){return this.type instanceof Qg}}const ec=[],Ga={};class an{constructor(t,n){this.local=t.length?t:ec,this.children=n.length?n:ec}static create(t,n){return n.length?e0(n,t,0,Ga):fo}find(t,n,o){let r=[];return this.findInner(t??0,n??1e9,r,0,o),r}findInner(t,n,o,r,s){for(let i=0;i<this.local.length;i++){let l=this.local[i];l.from<=n&&l.to>=t&&(!s||s(l.spec))&&o.push(l.copy(l.from+r,l.to+r))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<n&&this.children[i+1]>t){let l=this.children[i]+1;this.children[i+2].findInner(t-l,n-l,o,r+l,s)}}map(t,n,o){return this==fo||t.maps.length==0?this:this.mapInner(t,n,0,0,o||Ga)}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?q3e(this.children,i||[],t,n,o,r,s):i?new an(i.sort(Ya),ec):fo}add(t,n){return n.length?this==fo?an.create(t,n):this.addInner(t,n,0):this}addInner(t,n,o){let r,s=0;t.forEach((l,a)=>{let u=a+o,c;if(c=dN(n,l,u)){for(r||(r=this.children.slice());s<r.length&&r[s]<a;)s+=3;r[s]==a?r[s+2]=r[s+2].addInner(l,c,u+1):r.splice(s,0,a,a+l.nodeSize,e0(c,l,u+1,Ga)),s+=3}});let i=cN(s?fN(n):n,-o);for(let l=0;l<i.length;l++)i[l].type.valid(t,i[l])||i.splice(l--,1);return new an(i.length?this.local.concat(i).sort(Ya):this.local,r||this.children)}remove(t){return t.length==0||this==fo?this:this.removeInner(t,0)}removeInner(t,n){let o=this.children,r=this.local;for(let s=0;s<o.length;s+=3){let i,l=o[s]+n,a=o[s+1]+n;for(let c=0,d;c<t.length;c++)(d=t[c])&&d.from>l&&d.to<a&&(t[c]=null,(i||(i=[])).push(d));if(!i)continue;o==this.children&&(o=this.children.slice());let u=o[s+2].removeInner(i,l+1);u!=fo?o[s+2]=u:(o.splice(s,3),s-=3)}if(r.length){for(let s=0,i;s<t.length;s++)if(i=t[s])for(let l=0;l<r.length;l++)r[l].eq(i,n)&&(r==this.local&&(r=this.local.slice()),r.splice(l--,1))}return o==this.children&&r==this.local?this:r.length||o.length?new an(r,o):fo}forChild(t,n){if(this==fo)return this;if(n.isLeaf)return an.empty;let o,r;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=t){this.children[l]==t&&(o=this.children[l+2]);break}let s=t+1,i=s+n.content.size;for(let l=0;l<this.local.length;l++){let a=this.local[l];if(a.from<i&&a.to>s&&a.type instanceof Fl){let u=Math.max(s,a.from)-s,c=Math.min(i,a.to)-s;u<c&&(r||(r=[])).push(a.copy(u,c))}}if(r){let l=new an(r.sort(Ya),ec);return o?new Sl([l,o]):l}return o||fo}eq(t){if(this==t)return!0;if(!(t instanceof an)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return CC(this.localsInner(t))}localsInner(t){if(this==fo)return ec;if(t.inlineContent||!this.local.some(Fl.is))return this.local;let n=[];for(let o=0;o<this.local.length;o++)this.local[o].type instanceof Fl||n.push(this.local[o]);return n}forEachSet(t){t(this)}}an.empty=new an([],[]);an.removeOverlap=CC;const fo=an.empty;class Sl{constructor(t){this.members=t}map(t,n){const o=this.members.map(r=>r.map(t,n,Ga));return Sl.from(o)}forChild(t,n){if(n.isLeaf)return an.empty;let o=[];for(let r=0;r<this.members.length;r++){let s=this.members[r].forChild(t,n);s!=fo&&(s instanceof Sl?o=o.concat(s.members):o.push(s))}return Sl.from(o)}eq(t){if(!(t instanceof Sl)||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?CC(o?n:n.sort(Ya)):ec}static from(t){switch(t.length){case 0:return fo;case 1:return t[0];default:return new Sl(t.every(n=>n instanceof an)?t:t.reduce((n,o)=>n.concat(o instanceof an?o:o.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function q3e(e,t,n,o,r,s,i){let l=e.slice();for(let u=0,c=s;u<n.maps.length;u++){let d=0;n.maps[u].forEach((f,p,h,m)=>{let y=m-h-(p-f);for(let v=0;v<l.length;v+=3){let w=l[v+1];if(w<0||f>w+c-d)continue;let _=l[v]+c-d;p>=_?l[v+1]=f<=_?-2:-1:f>=c&&y&&(l[v]+=y,l[v+1]+=y)}d+=y}),c=n.maps[u].map(c,-1)}let a=!1;for(let u=0;u<l.length;u+=3)if(l[u+1]<0){if(l[u+1]==-2){a=!0,l[u+1]=-1;continue}let c=n.map(e[u]+s),d=c-r;if(d<0||d>=o.content.size){a=!0;continue}let f=n.map(e[u+1]+s,-1),p=f-r,{index:h,offset:m}=o.content.findIndex(d),y=o.maybeChild(h);if(y&&m==d&&m+y.nodeSize==p){let v=l[u+2].mapInner(n,y,c+1,e[u]+s+1,i);v!=fo?(l[u]=d,l[u+1]=p,l[u+2]=v):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=G3e(l,e,t,n,r,s,i),c=e0(u,o,0,i);t=c.local;for(let d=0;d<l.length;d+=3)l[d+1]<0&&(l.splice(d,3),d-=3);for(let d=0,f=0;d<c.children.length;d+=3){let p=c.children[d];for(;f<l.length&&l[f]<p;)f+=3;l.splice(f,0,c.children[d],c.children[d+1],c.children[d+2])}}return new an(t.sort(Ya),l)}function cN(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 zn(r.from+t,r.to+t,r.type))}return n}function G3e(e,t,n,o,r,s,i){function l(a,u){for(let c=0;c<a.local.length;c++){let d=a.local[c].map(o,r,u);d?n.push(d):i.onRemove&&i.onRemove(a.local[c].spec)}for(let c=0;c<a.children.length;c+=3)l(a.children[c+2],a.children[c]+u+1)}for(let a=0;a<e.length;a+=3)e[a+1]==-1&&l(e[a+2],t[a]+s+1);return n}function dN(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 fN(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function e0(e,t,n,o){let r=[],s=!1;t.forEach((l,a)=>{let u=dN(e,l,a+n);if(u){s=!0;let c=e0(u,l,n+a+1,o);c!=fo&&r.push(a,a+l.nodeSize,c)}});let i=cN(s?fN(e):e,-n).sort(Ya);for(let l=0;l<i.length;l++)i[l].type.valid(t,i[l])||(o.onRemove&&o.onRemove(i[l].spec),i.splice(l--,1));return i.length||r.length?new an(i,r):fo}function Ya(e,t){return e.from-t.from||e.to-t.to}function CC(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),g9(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),g9(t,r,o.copy(s.from,o.to)));break}}}return t}function g9(e,t,n){for(;t<e.length&&Ya(n,e[t])>0;)t++;e.splice(t,0,n)}function Fy(e){let t=[];return e.someProp("decorations",n=>{let o=n(e.state);o&&o!=fo&&t.push(o)}),e.cursorWrapper&&t.push(an.create(e.state.doc,[e.cursorWrapper.deco])),Sl.from(t)}const Y3e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Z3e=Go&&Rl<=11;class J3e{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 X3e{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new J3e,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(o=>{for(let r=0;r<o.length;r++)this.queue.push(o[r]);Go&&Rl<=11&&o.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),Z3e&&(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,Y3e)),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(a9(this.view)){if(this.suppressingSelectionUpdates)return Oi(this.view);if(Go&&Rl<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&hu(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=Hp(s))n.add(s);for(let s=t.anchorNode;s;s=Hp(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)&&a9(t)&&!this.ignoreSelectionChange(o),s=-1,i=-1,l=!1,a=[];if(t.editable)for(let c=0;c<n.length;c++){let d=this.registerMutation(n[c],a);d&&(s=s<0?d.from:Math.min(d.from,s),i=i<0?d.to:Math.max(d.to,i),d.typeOver&&(l=!0))}if(vs&&a.length){let c=a.filter(d=>d.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||tCe(t,d)!=p)&&f.remove()}}}let u=null;s<0&&r&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&fv(o)&&(u=gC(t))&&u.eq(bt.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,Oi(t),this.currentSelection.set(o),t.scrollToSelection()):(s>-1||r)&&(s>-1&&(t.docView.markDirty(s,i),Q3e(t)),this.handleDOMChange(s,i,l,a),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(o)||Oi(t),this.currentSelection.set(o))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let o=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(o==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!o||o.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;c<t.addedNodes.length;c++){let d=t.addedNodes[c];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(o.contentDOM&&o.contentDOM!=o.dom&&!o.contentDOM.contains(t.target))return{from:o.posBefore,to:o.posAfter};let r=t.previousSibling,s=t.nextSibling;if(Go&&Rl<=11&&t.addedNodes.length)for(let c=0;c<t.addedNodes.length;c++){let{previousSibling:d,nextSibling:f}=t.addedNodes[c];(!d||Array.prototype.indexOf.call(t.addedNodes,d)<0)&&(r=d),(!f||Array.prototype.indexOf.call(t.addedNodes,f)<0)&&(s=f)}let i=r&&r.parentNode==t.target?no(r)+1:0,l=o.localPosFromDOM(t.target,i,-1),a=s&&s.parentNode==t.target?no(s):t.target.childNodes.length,u=o.localPosFromDOM(t.target,a,1);return{from:l,to:u}}else return t.type=="attributes"?{from:o.posAtStart-o.border,to:o.posAtEnd+o.border}:(this.lastChangedTextNode=t.target,{from:o.posAtStart,to:o.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let v9=new WeakMap,y9=!1;function Q3e(e){if(!v9.has(e)&&(v9.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=vs,y9)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."),y9=!0}}function _9(e,t){let n=t.startContainer,o=t.startOffset,r=t.endContainer,s=t.endOffset,i=e.domAtPos(e.state.selection.anchor);return hu(i.node,i.offset,r,s)&&([n,o,r,s]=[r,s,n,o]),{anchorNode:n,anchorOffset:o,focusNode:r,focusOffset:s}}function eCe(e,t){if(t.getComposedRanges){let r=t.getComposedRanges(e.root)[0];if(r)return _9(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?_9(e,n):null}function tCe(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 nCe(e,t,n){let{node:o,fromOffset:r,toOffset:s,from:i,to:l}=e.docView.parseRange(t,n),a=e.domSelectionRange(),u,c=a.anchorNode;if(c&&e.dom.contains(c.nodeType==1?c:c.parentNode)&&(u=[{node:c,offset:a.anchorOffset}],fv(a)||u.push({node:a.focusNode,offset:a.focusOffset})),mo&&e.input.lastKeyCode===8)for(let y=s;y>r;y--){let v=o.childNodes[y-1],w=v.pmViewDesc;if(v.nodeName=="BR"&&!w){s=y;break}if(!w||w.size)break}let d=e.state.doc,f=e.someProp("domParser")||fu.fromSchema(e.state.schema),p=d.resolve(i),h=null,m=f.parse(o,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:r,to:s,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:oCe,context:p});if(u&&u[0].pos!=null){let y=u[0].pos,v=u[1]&&u[1].pos;v==null&&(v=y),h={anchor:y+i,head:v+i}}return{doc:m,sel:h,from:i,to:l}}function oCe(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Io&&/^(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||Io&&/^(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 rCe=/^(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 sCe(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,N=gC(e,P);if(N&&!e.state.selection.eq(N)){if(mo&&rs&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",B=>B(e,xa(13,"Enter"))))return;let F=e.state.tr.setSelection(N);P=="pointer"?F.setMeta("pointer",!0):P=="key"&&F.scrollIntoView(),s&&F.setMeta("composition",s),e.dispatch(F)}return}let i=e.state.doc.resolve(t),l=i.sharedDepth(n);t=i.before(l+1),n=e.state.doc.resolve(n).after(l+1);let a=e.state.selection,u=nCe(e,t,n),c=e.state.doc,d=c.slice(u.from,u.to),f,p;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,p="end"):(f=e.state.selection.from,p="start"),e.input.lastKeyCode=null;let h=aCe(d.content,u.doc.content,u.from,f,p);if((pd&&e.input.lastIOSEnter>Date.now()-225||rs)&&r.some(P=>P.nodeType==1&&!rCe.test(P.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",P=>P(e,xa(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!h)if(o&&a instanceof ht&&!a.empty&&a.$head.sameParent(a.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))h={start:a.from,endA:a.to,endB:a.to};else{if(u.sel){let P=b9(e,e.state.doc,u.sel);if(P&&!P.eq(e.state.selection)){let N=e.state.tr.setSelection(P);s&&N.setMeta("composition",s),e.dispatch(N)}}return}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&h.start==h.endB&&e.state.selection instanceof ht&&(h.start>e.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?h.start=e.state.selection.from:h.endA<e.state.selection.to&&h.endA>=e.state.selection.to-2&&e.state.selection.to<=u.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),Go&&Rl<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>u.from&&u.doc.textBetween(h.start-u.from-1,h.start-u.from+1)=="  "&&(h.start--,h.endA--,h.endB--);let m=u.doc.resolveNoCache(h.start-u.from),y=u.doc.resolveNoCache(h.endB-u.from),v=c.resolve(h.start),w=m.sameParent(y)&&m.parent.inlineContent&&v.end()>=h.endA,_;if((pd&&e.input.lastIOSEnter>Date.now()-225&&(!w||r.some(P=>P.nodeName=="DIV"||P.nodeName=="P"))||!w&&m.pos<u.doc.content.size&&!m.sameParent(y)&&(_=bt.findFrom(u.doc.resolve(m.pos+1),1,!0))&&_.head==y.pos)&&e.someProp("handleKeyDown",P=>P(e,xa(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>h.start&&lCe(c,h.start,h.endA,m,y)&&e.someProp("handleKeyDown",P=>P(e,xa(8,"Backspace")))){rs&&mo&&e.domObserver.suppressSelectionUpdates();return}mo&&rs&&h.endB==h.start&&(e.input.lastAndroidDelete=Date.now()),rs&&!w&&m.start()!=y.start()&&y.parentOffset==0&&m.depth==y.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==h.endA&&(h.endB-=2,y=u.doc.resolveNoCache(h.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(P){return P(e,xa(13,"Enter"))})},20));let S=h.start,x=h.endA,E,T,O;if(w){if(m.pos==y.pos)Go&&Rl<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Oi(e),20)),E=e.state.tr.delete(S,x),T=c.resolve(h.start).marksAcross(c.resolve(h.endA));else if(h.endA==h.endB&&(O=iCe(m.parent.content.cut(m.parentOffset,y.parentOffset),v.parent.content.cut(v.parentOffset,h.endA-v.start()))))E=e.state.tr,O.type=="add"?E.addMark(S,x,O.mark):E.removeMark(S,x,O.mark);else if(m.parent.child(m.index()).isText&&m.index()==y.index()-(y.textOffset?0:1)){let P=m.parent.textBetween(m.parentOffset,y.parentOffset);if(e.someProp("handleTextInput",N=>N(e,S,x,P)))return;E=e.state.tr.insertText(P,S,x)}}if(E||(E=e.state.tr.replace(S,x,u.doc.slice(h.start-u.from,h.endB-u.from))),u.sel){let P=b9(e,E.doc,u.sel);P&&!(mo&&rs&&e.composing&&P.empty&&(h.start!=h.endB||e.input.lastAndroidDelete<Date.now()-100)&&(P.head==S||P.head==E.mapping.map(x)-1)||Go&&P.empty&&P.head==S)&&E.setSelection(P)}T&&E.ensureMarks(T),s&&E.setMeta("composition",s),e.dispatch(E.scrollIntoView())}function b9(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:vC(e,t.resolve(n.anchor),t.resolve(n.head))}function iCe(e,t){let n=e.firstChild.marks,o=t.firstChild.marks,r=n,s=o,i,l,a;for(let c=0;c<o.length;c++)r=o[c].removeFromSet(r);for(let c=0;c<n.length;c++)s=n[c].removeFromSet(s);if(r.length==1&&s.length==0)l=r[0],i="add",a=c=>c.mark(l.addToSet(c.marks));else if(r.length==0&&s.length==1)l=s[0],i="remove",a=c=>c.mark(l.removeFromSet(c.marks));else return null;let u=[];for(let c=0;c<t.childCount;c++)u.push(a(t.child(c)));if(Ue.from(u).eq(e))return{mark:l,type:i}}function lCe(e,t,n,o,r){if(n-t<=r.pos-o.pos||Vy(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(Vy(s,!0,!0));return!i.parent.isTextblock||i.pos>n||Vy(i,!0,!1)<n?!1:o.parent.content.cut(o.parentOffset).eq(i.parent.content)}function Vy(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 aCe(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&&w9(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&&w9(e.textBetween(s-1,s+1))&&(s+=a?1:-1),i=s+(i-l),l=s}return{start:s,endA:i,endB:l}}function w9(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 uCe{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 M3e,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(E9),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=S9(this),k9(this),this.nodeViews=$9(this),this.docView=n9(this.state.doc,C9(this),Fy(this),this.dom,this),this.domObserver=new X3e(this,(o,r,s,i)=>sCe(this,o,r,s,i)),this.domObserver.start(),T3e(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&&d2(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(E9),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&&(iN(this),i=!0),this.state=t;let l=r.plugins!=t.plugins||this._props.plugins!=n.plugins;if(l||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=$9(this);dCe(p,this.nodeViews)&&(this.nodeViews=p,s=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&d2(this),this.editable=S9(this),k9(this);let a=Fy(this),u=C9(this),c=r.plugins!=t.plugins&&!r.doc.eq(t.doc)?"reset":t.scrollToSelection>r.scrollToSelection?"to selection":"preserve",d=s||!this.docView.matchesNode(t.doc,u,a);(d||!t.selection.eq(r.selection))&&(i=!0);let f=c=="preserve"&&i&&this.dom.style.overflowAnchor==null&&Uwe(this);if(i){this.domObserver.stop();let p=d&&(Go||mo)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&cCe(r.selection,t.selection);if(d){let h=mo?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=j3e(this)),(s||!this.docView.update(t.doc,u,a,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=n9(t.doc,u,a,this.dom,this)),h&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&h3e(this))?Oi(this,p):(qA(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),!((o=this.dragging)===null||o===void 0)&&o.node&&!r.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,r),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&Wwe(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof mt){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&ZS(this,n.getBoundingClientRect(),t)}else ZS(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 aN(t.slice,t.move,r<0?void 0:mt.create(this.state.doc,r))}someProp(t,n){let o=this._props&&this._props[t],r;if(o!=null&&(r=n?n(o):o))return r;for(let i=0;i<this.directPlugins.length;i++){let l=this.directPlugins[i].props[t];if(l!=null&&(r=n?n(l):l))return r}let s=this.state.plugins;if(s)for(let i=0;i<s.length;i++){let l=s[i].props[t];if(l!=null&&(r=n?n(l):l))return r}}hasFocus(){if(Go){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Kwe(this.dom),Oi(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 Jwe(this,t)}coordsAtPos(t,n=1){return VA(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 n3e(this,n||this.state,t)}pasteHTML(t,n){return Wp(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return Wp(this,t,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(O3e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Fy(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Nwe())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return A3e(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?Io&&this.root.nodeType===11&&Fwe(this.dom.ownerDocument)==this.dom&&eCe(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function C9(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"),[zn.node(0,e.state.doc.content.size,t)]}function k9(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:zn.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function S9(e){return!e.someProp("editable",t=>t(e.state)===!1)}function cCe(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 $9(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 dCe(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 E9(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 pN=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ct=(e,t,n)=>(pN(e,t,"read from private field"),n?n.call(e):t.get(e)),Zn=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},_n=(e,t,n,o)=>(pN(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);function sa(e,t){return e.meta={package:"@milkdown/core",group:"System",...t},e}const hN={strong:(e,t,n,o)=>{const r=e.marker||n.options.strong||"*",s=n.enter("strong"),i=n.createTracker(o);let l=i.move(r+r);return l+=i.move(n.containerPhrasing(e,{before:l,after:r,...i.current()})),l+=i.move(r+r),s(),l},emphasis:(e,t,n,o)=>{const r=e.marker||n.options.emphasis||"*",s=n.enter("emphasis"),i=n.createTracker(o);let l=i.move(r);return l+=i.move(n.containerPhrasing(e,{before:l,after:r,...i.current()})),l+=i.move(r),s(),l}},bn=jt({},"editorView"),vf=jt({},"editorState"),By=jt([],"initTimer"),x9=jt({},"editor"),qp=jt([],"inputRules"),ys=jt([],"prosePlugins"),Gp=jt([],"remarkPlugins"),f2=jt([],"nodeView"),p2=jt([],"markView"),Za=jt(Kb().use(Vb).use(Hb),"remark"),rp=jt({handlers:hN},"remarkStringifyOptions"),$1=ea("ConfigReady");function fCe(e){const t=n=>(n.record($1),async()=>(await e(n),n.done($1),()=>{n.clearTimer($1)}));return sa(t,{displayName:"Config"}),t}const Ja=ea("InitReady");function pCe(e){const t=n=>(n.inject(x9,e).inject(ys,[]).inject(Gp,[]).inject(qp,[]).inject(f2,[]).inject(p2,[]).inject(rp,{handlers:hN}).inject(Za,Kb().use(Vb).use(Hb)).inject(By,[$1]).record(Ja),async()=>{await n.waitTimers(By);const o=n.get(rp);return n.set(Za,Kb().use(Vb).use(Hb,o)),n.done(Ja),()=>{n.remove(x9).remove(ys).remove(Gp).remove(qp).remove(f2).remove(p2).remove(rp).remove(Za).remove(By).clearTimer(Ja)}});return sa(t,{displayName:"Init"}),t}const Us=ea("SchemaReady"),zy=jt([],"schemaTimer"),ds=jt({},"schema"),Tc=jt([],"nodes"),Oc=jt([],"marks");function M9(e){var t;return{...e,parseDOM:(t=e.parseDOM)==null?void 0:t.map(n=>({priority:e.priority,...n}))}}const mN=e=>(e.inject(ds,{}).inject(Tc,[]).inject(Oc,[]).inject(zy,[Ja]).record(Us),async()=>{await e.waitTimers(zy);const t=e.get(Za),n=e.get(Gp).reduce((i,l)=>i.use(l.plugin,l.options),t);e.set(Za,n);const o=Object.fromEntries(e.get(Tc).map(([i,l])=>[i,M9(l)])),r=Object.fromEntries(e.get(Oc).map(([i,l])=>[i,M9(l)])),s=new Tve({nodes:o,marks:r});return e.set(ds,s),e.done(Us),()=>{e.remove(ds).remove(Tc).remove(Oc).remove(zy).clearTimer(Us)}});sa(mN,{displayName:"Schema"});var tc,Ca;let gN=class{constructor(){Zn(this,tc,void 0),Zn(this,Ca,void 0),_n(this,tc,new rI),_n(this,Ca,null),this.setCtx=t=>{_n(this,Ca,t)}}get ctx(){return ct(this,Ca)}create(t,n){const o=t.create(ct(this,tc).sliceMap);return o.set(n),o}get(t){return ct(this,tc).get(t).get()}remove(t){return ct(this,tc).remove(t)}call(t,n){if(ct(this,Ca)==null)throw ove();const o=this.get(t)(n),r=ct(this,Ca).get(bn);return o(r.state,r.dispatch,r)}};tc=new WeakMap,Ca=new WeakMap;function hCe(e="cmdKey"){return jt(()=>()=>!1,e)}const Dt=jt(new gN,"commands"),jy=jt([Us],"commandsTimer"),sp=ea("CommandsReady"),vN=e=>{const t=new gN;return t.setCtx(e),e.inject(Dt,t).inject(jy,[Us]).record(sp),async()=>(await e.waitTimers(jy),e.done(sp),()=>{e.remove(Dt).remove(jy).clearTimer(sp)})};sa(vN,{displayName:"Commands"});const E1=ea("ParserReady"),yN=()=>{throw J3()},Ic=jt(yN,"parser"),Hy=jt([],"parserTimer"),_N=e=>(e.inject(Ic,yN).inject(Hy,[Us]).record(E1),async()=>{await e.waitTimers(Hy);const t=e.get(Za),n=e.get(ds);return e.set(Ic,u2e.create(n,t)),e.done(E1),()=>{e.remove(Ic).remove(Hy).clearTimer(E1)}});sa(_N,{displayName:"Parser"});const ip=ea("SerializerReady"),Uy=jt([],"serializerTimer"),bN=()=>{throw J3()},Ac=jt(bN,"serializer"),wN=e=>(e.inject(Ac,bN).inject(Uy,[Us]).record(ip),async()=>{await e.waitTimers(Uy);const t=e.get(Za),n=e.get(ds);return e.set(Ac,d2e.create(n,t)),e.done(ip),()=>{e.remove(Ac).remove(Uy).clearTimer(ip)}});sa(wN,{displayName:"Serializer"});const x1=jt("","defaultValue"),M1=jt(e=>e,"stateOptions"),Wy=jt([],"editorStateTimer"),T1=ea("EditorStateReady");function mCe(e,t,n){if(typeof e=="string")return t(e);if(e.type==="html")return fu.fromSchema(n).parse(e.dom);if(e.type==="json")return Ll.fromJSON(n,e.value);throw Z0e(e)}const gCe=new wn("MILKDOWN_STATE_TRACKER");function vCe(e){const t=dv(z2e,fC,SA,$A);return e.Backspace=t,e}const CN=e=>(e.inject(x1,"").inject(vf,{}).inject(M1,t=>t).inject(Wy,[E1,ip,sp]).record(T1),async()=>{await e.waitTimers(Wy);const t=e.get(ds),n=e.get(Ic),o=e.get(qp),r=e.get(M1),s=e.get(ys),i=e.get(x1),l=mCe(i,n,t),a=[...s,new xn({key:gCe,state:{init:()=>{},apply:(d,f,p,h)=>{e.set(vf,h)}}}),Z2e({rules:o}),IA(vCe(Ewe))];e.set(ys,a);const u=r({schema:t,doc:l,plugins:a}),c=La.create(u);return e.set(vf,c),e.done(T1),()=>{e.remove(x1).remove(vf).remove(M1).remove(Wy).clearTimer(T1)}});sa(CN,{displayName:"EditorState"});const O1=ea("EditorViewReady"),Ky=jt([],"editorViewTimer"),lp=jt({},"editorViewOptions"),I1=jt(null,"root"),h2=jt(null,"rootDOM"),m2=jt({},"rootAttrs");function yCe(e,t){const n=document.createElement("div");n.className="milkdown",e.appendChild(n),t.set(h2,n);const o=t.get(m2);return Object.entries(o).forEach(([r,s])=>n.setAttribute(r,s)),n}function _Ce(e){e.classList.add("editor"),e.setAttribute("role","textbox")}const bCe=new wn("MILKDOWN_VIEW_CLEAR"),kN=e=>(e.inject(I1,document.body).inject(bn,{}).inject(lp,{}).inject(h2,null).inject(m2,{}).inject(Ky,[T1]).record(O1),async()=>{await e.wait(Ja);const t=e.get(I1)||document.body,n=typeof t=="string"?document.querySelector(t):t;e.update(ys,a=>[new xn({key:bCe,view:u=>{const c=n?yCe(n,e):void 0;return(()=>{if(c&&n){const d=u.dom;n.replaceChild(c,d),c.appendChild(d)}})(),{destroy:()=>{c!=null&&c.parentNode&&(c==null||c.parentNode.replaceChild(u.dom,c)),c==null||c.remove()}}}}),...a]),await e.waitTimers(Ky);const o=e.get(vf),r=e.get(lp),s=Object.fromEntries(e.get(f2)),i=Object.fromEntries(e.get(p2)),l=new uCe(n,{state:o,nodeViews:s,markViews:i,...r});return _Ce(l.dom),e.set(bn,l),e.done(O1),()=>{l==null||l.destroy(),e.remove(I1).remove(bn).remove(lp).remove(h2).remove(m2).remove(Ky).clearTimer(O1)}});sa(kN,{displayName:"EditorView"});var nc,$r,al,yf,A1,N1,rr,ul,oc,P1,rc,_f,L1,ka,bf;const wCe=class SN{constructor(){Zn(this,nc,void 0),Zn(this,$r,void 0),Zn(this,al,void 0),Zn(this,yf,void 0),Zn(this,A1,void 0),Zn(this,N1,void 0),Zn(this,rr,void 0),Zn(this,ul,void 0),Zn(this,oc,void 0),Zn(this,P1,void 0),Zn(this,rc,void 0),Zn(this,_f,void 0),Zn(this,L1,void 0),Zn(this,ka,void 0),Zn(this,bf,void 0),_n(this,nc,!1),_n(this,$r,"Idle"),_n(this,al,[]),_n(this,yf,()=>{}),_n(this,A1,new rI),_n(this,N1,new cve),_n(this,rr,new Map),_n(this,ul,new Map),_n(this,oc,new uve(ct(this,A1),ct(this,N1))),_n(this,P1,()=>{const t=fCe(async o=>{await Promise.all(ct(this,al).map(r=>r(o)))}),n=[mN,_N,wN,vN,CN,kN,pCe(this),t];ct(this,rc).call(this,n,ct(this,ul))}),_n(this,rc,(t,n)=>{t.forEach(o=>{const r=ct(this,oc).produce(ct(this,nc)?o.meta:void 0),s=o(r);n.set(o,{ctx:r,handler:s,cleanup:void 0})})}),_n(this,_f,(t,n=!1)=>Promise.all([t].flat().map(o=>{const r=ct(this,rr).get(o),s=r==null?void 0:r.cleanup;return n?ct(this,rr).delete(o):ct(this,rr).set(o,{ctx:void 0,handler:void 0,cleanup:void 0}),typeof s=="function"?s():s}))),_n(this,L1,async()=>{await Promise.all([...ct(this,ul).entries()].map(([t,{cleanup:n}])=>typeof n=="function"?n():n)),ct(this,ul).clear()}),_n(this,ka,t=>{_n(this,$r,t),ct(this,yf).call(this,t)}),_n(this,bf,t=>[...t.entries()].map(async([n,o])=>{const{ctx:r,handler:s}=o;if(!s)return;const i=await s();t.set(n,{ctx:r,handler:s,cleanup:i})})),this.enableInspector=(t=!0)=>(_n(this,nc,t),this),this.onStatusChange=t=>(_n(this,yf,t),this),this.config=t=>(ct(this,al).push(t),this),this.removeConfig=t=>(_n(this,al,ct(this,al).filter(n=>n!==t)),this),this.use=t=>{const n=[t].flat();return n.flat().forEach(o=>{ct(this,rr).set(o,{ctx:void 0,handler:void 0,cleanup:void 0})}),ct(this,$r)==="Created"&&ct(this,rc).call(this,n,ct(this,rr)),this},this.remove=async t=>ct(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 ct(this,_f).call(this,[t].flat(),!0),this),this.create=async()=>ct(this,$r)==="OnCreate"?this:(ct(this,$r)==="Created"&&await this.destroy(),ct(this,ka).call(this,"OnCreate"),ct(this,P1).call(this),ct(this,rc).call(this,[...ct(this,rr).keys()],ct(this,rr)),await Promise.all([ct(this,bf).call(this,ct(this,ul)),ct(this,bf).call(this,ct(this,rr))].flat()),ct(this,ka).call(this,"Created"),this),this.destroy=async(t=!1)=>ct(this,$r)==="Destroyed"||ct(this,$r)==="OnDestroy"?this:ct(this,$r)==="OnCreate"?new Promise(n=>{setTimeout(()=>{n(this.destroy(t))},50)}):(t&&_n(this,al,[]),ct(this,ka).call(this,"OnDestroy"),await ct(this,_f).call(this,[...ct(this,rr).keys()],t),await ct(this,L1).call(this),ct(this,ka).call(this,"Destroyed"),this),this.action=t=>t(ct(this,oc)),this.inspect=()=>ct(this,nc)?[...ct(this,ul).values(),...ct(this,rr).values()].map(({ctx:t})=>{var n;return(n=t==null?void 0:t.inspector)==null?void 0:n.read()}).filter(t=>!!t):(console.warn("[Milkdown]: You are trying to collect inspection when inspector is disabled, please enable inspector by `editor.enableInspector()` first."),[])}static make(){return new SN}get ctx(){return ct(this,oc)}get status(){return ct(this,$r)}};nc=new WeakMap,$r=new WeakMap,al=new WeakMap,yf=new WeakMap,A1=new WeakMap,N1=new WeakMap,rr=new WeakMap,ul=new WeakMap,oc=new WeakMap,P1=new WeakMap,rc=new WeakMap,_f=new WeakMap,L1=new WeakMap,ka=new WeakMap,bf=new WeakMap;let CCe=wCe,kCe=e=>crypto.getRandomValues(new Uint8Array(e)),SCe=(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}}},$Ce=(e,t=21)=>SCe(e,t,kCe);$Ce("abcedfghicklmn",10);function Tt(e,t){const n=hCe(e),o=r=>async()=>{o.key=n,await r.wait(sp);const s=t(r);return r.get(Dt).create(n,s),o.run=i=>r.get(Dt).call(e,i),()=>{r.get(Dt).remove(n)}};return o}function er(e){const t=n=>async()=>{await n.wait(Us);const o=e(n);return n.update(qp,r=>[...r,o]),t.inputRule=o,()=>{n.update(qp,r=>r.filter(s=>s!==o))}};return t}function ECe(e,t){const n=o=>async()=>{const r=t(o);return o.update(Oc,s=>[...s.filter(i=>i[0]!==e),[e,r]]),n.id=e,n.schema=r,()=>{o.update(Oc,s=>s.filter(([i])=>i!==e))}};return n.type=o=>{const r=o.get(ds).marks[e];if(!r)throw rve(e);return r},n}function kC(e,t){const n=o=>async()=>{const r=t(o);return o.update(Tc,s=>[...s.filter(i=>i[0]!==e),[e,r]]),n.id=e,n.schema=r,()=>{o.update(Tc,s=>s.filter(([i])=>i!==e))}};return n.type=o=>{const r=o.get(ds).nodes[e];if(!r)throw nI(e);return r},n}function ao(e){let t;const n=o=>async()=>(await o.wait(Us),t=e(o),o.update(ys,r=>[...r,t]),()=>{o.update(ys,r=>r.filter(s=>s!==t))});return n.plugin=()=>t,n.key=()=>t.spec.key,n}function xCe(e){const t=n=>async()=>{await n.wait(Us);const o=e(n),r=IA(o);return n.update(ys,s=>[...s,r]),t.keymap=o,()=>{n.update(ys,s=>s.filter(i=>i!==r))}};return t}function In(e,t){const n=jt(e,t),o=r=>(r.inject(n),()=>()=>{r.remove(n)});return o.key=n,o}function Yn(e,t){const n=In(t,e),o=kC(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(Tc,u=>[...u.filter(c=>c[0]!==e),[e,a]]),r.schema=a},r}function Ih(e,t){const n=In(t,e),o=ECe(e,s=>s.get(n.key)(s)),r=[n,o];return r.id=o.id,r.mark=o,r.type=o.type,r.schema=o.schema,r.ctx=n,r.key=n.key,r.extendSchema=s=>i=>()=>{const l=i.get(n.key),a=s(l)(i);i.update(Oc,u=>[...u.filter(c=>c[0]!==e),[e,a]]),r.schema=a},r}function tr(e,t){const n=Object.fromEntries(Object.entries(t).map(([i,{shortcuts:l}])=>[i,l])),o=In(n,`${e}Keymap`),r=xCe(i=>{const l=i.get(o.key),a=Object.entries(t).flatMap(([u,{command:c}])=>[l[u]].flat().map(d=>[d,c(i)]));return Object.fromEntries(a)}),s=[o,r];return s.ctx=o,s.shortcuts=r,s.key=o.key,s.keymap=r.keymap,s}const $s=(e,t=()=>({}))=>In(t,`${e}Attr`),Ah=(e,t=()=>({}))=>In(t,`${e}Attr`);function Id(e,t,n){const o=In(n??{},e),r=i=>async()=>{await i.wait(Ja);const l={plugin:t(i),options:i.get(o.key)};return i.update(Gp,a=>[...a,l]),()=>{i.update(Gp,a=>a.filter(u=>u!==l))}},s=[o,r];return s.id=e,s.plugin=r,s.options=o,s}function MCe(){return e=>{const t=e.get(bn);return e.get(Ac)(t.state.doc)}}function TCe(e,t=!1){return n=>{const o=n.get(bn),r=n.get(Ic)(e);if(!r)return;if(!t){const{state:u}=o;return o.dispatch(u.tr.replace(0,u.doc.content.size,new Ye(r.content,0,0)))}const s=n.get(ds),i=n.get(M1),l=n.get(ys),a=La.create({schema:s,doc:r,plugins:l,...i});o.updateState(a)}}function mv(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const OCe=[["ß","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"]],ICe=(e,t)=>{for(const[n,o]of t)e=e.replace(new RegExp(mv(n),"g"),o);return e};function ACe(e,t){if(typeof e!="string")throw new TypeError(`Expected a string, got \`${typeof e}\``);t={customReplacements:[],...t};const n=new Map([...OCe,...t.customReplacements]);return e=e.normalize(),e=ICe(e,n),e=e.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),e}const NCe=[["&"," and "],["🦄"," unicorn "],["♥"," love "]],PCe=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"),LCe=(e,t)=>{const n=mv(t);return e.replace(new RegExp(`${n}{2,}`,"g"),t).replace(new RegExp(`^${n}|${n}$`,"g"),"")},RCe=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+=mv(n)}return new RegExp(`[^${t}]+`,"g")};function DCe(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([...NCe,...t.customReplacements]);e=ACe(e,{customReplacements:r}),t.decamelize&&(e=PCe(e));const s=RCe(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=LCe(e,t.separator)),n&&(e=`_${e}`),o&&(e=`${e}-`),e}function FCe(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=Ue.empty,f=r.index(-1)?1:r.index(-2)?2:3;for(let v=r.depth-f;v>=r.depth-3;v--)d=Ue.from(r.node(v).copy(d));let p=r.indexAfter(-1)<r.node(-2).childCount?1:r.indexAfter(-2)<r.node(-3).childCount?2:3;d=d.append(Ue.from(e.createAndFill()));let h=r.before(r.depth-(f-1)),m=n.tr.replace(h,r.after(-p),new Ye(d,4-f,0)),y=-1;m.doc.nodesBetween(h,m.doc.content.size,(v,w)=>{if(y>-1)return!1;v.isTextblock&&v.content.size==0&&(y=w+1)}),y>-1&&m.setSelection(bt.near(m.doc.resolve(y))),o(m.scrollIntoView())}return!0}let a=s.pos==r.end()?l.contentMatchAt(0).defaultType:null,u=n.tr.delete(r.pos,s.pos),c=a?[t?{type:e,attrs:t}:null,{type:a}]:void 0;return tp(u.doc,r.pos,2,c)?(o&&o(u.split(r.pos,2,c).scrollIntoView()),!0):!1}}function $N(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?VCe(t,n,e,s):BCe(t,n,s):!0:!1}}function VCe(e,t,n,o){let r=e.tr,s=o.end,i=o.$to.end(o.depth);s<i&&(r.step(new vo(s-1,i,s,i,new Ye(Ue.from(n.create(null,o.parent.copy())),1,0),1,!0)),o=new pI(r.doc.resolve(o.$from.pos),r.doc.resolve(i),o.depth));const l=rv(o);if(l==null)return!1;r.lift(o,l);let a=r.mapping.map(s,-1)-1;return sv(r.doc,a)&&r.join(a),t(r.scrollIntoView()),!0}function BCe(e,t,n){let o=e.tr,r=n.parent;for(let p=n.end,h=n.endIndex-1,m=n.startIndex;h>m;h--)p-=r.child(h).nodeSize,o.delete(p-1,p+1);let s=o.doc.resolve(n.start),i=s.nodeAfter;if(o.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,a=n.endIndex==r.childCount,u=s.node(-1),c=s.index(-1);if(!u.canReplace(c+(l?0:1),c+1,i.content.append(a?Ue.empty:Ue.from(r))))return!1;let d=s.pos,f=d+i.nodeSize;return o.step(new vo(d-(l?1:0),f+(a?1:0),d+1,f-1,new Ye((l?Ue.empty:Ue.from(r.copy(Ue.empty))).append(a?Ue.empty:Ue.from(r.copy(Ue.empty))),l?0:1,a?0:1),l?0:1)),t(o.scrollIntoView()),!0}function zCe(e){return function(t,n){let{$from:o,$to:r}=t.selection,s=o.blockRange(r,u=>u.childCount>0&&u.firstChild.type==e);if(!s)return!1;let i=s.startIndex;if(i==0)return!1;let l=s.parent,a=l.child(i-1);if(a.type!=e)return!1;if(n){let u=a.lastChild&&a.lastChild.type==l.type,c=Ue.from(u?e.create():null),d=new Ye(Ue.from(e.create(null,Ue.from(l.type.create(null,c)))),u?3:1,0),f=s.start,p=s.end;n(t.tr.step(new vo(f-(u?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}function jCe(e){const t=new Map;if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return Od(e,"definition",function(o){const r=T9(o.identifier);r&&!t.get(r)&&t.set(r,o)}),n;function n(o){const r=T9(o);return t.get(r)}}function T9(e){return String(e||"").toUpperCase()}function HCe(){return function(e){const t=jCe(e);Od(e,function(n,o,r){if(n.type==="definition"&&r!==void 0&&typeof o=="number")return r.children.splice(o,1),[jb,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},[jb,o]}})}}function EN(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(Ue.fromArray(o))}function ke(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-commonmark",...t}}),e}const SC=Ah("emphasis");ke(SC,{displayName:"Attr<emphasis>",group:"Emphasis"});const xu=Ih("emphasis",e=>({attrs:{marker:{default:e.get(rp).emphasis||"*"}},parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:t=>t==="italic"}],toDOM:t=>["em",e.get(SC.key)(t)],parseMarkdown:{match:t=>t.type==="emphasis",runner:(t,n,o)=>{t.openMark(o,{marker:n.marker}),t.next(n.children),t.closeMark(o)}},toMarkdown:{match:t=>t.type.name==="emphasis",runner:(t,n)=>{t.withMark(n,"emphasis",void 0,{marker:n.attrs.marker})}}}));ke(xu.mark,{displayName:"MarkSchema<emphasis>",group:"Emphasis"});ke(xu.ctx,{displayName:"MarkSchemaCtx<emphasis>",group:"Emphasis"});const gv=Tt("ToggleEmphasis",e=>()=>cv(xu.type(e)));ke(gv,{displayName:"Command<toggleEmphasisCommand>",group:"Emphasis"});const xN=er(e=>xh(/(?:^|[^*])\*([^*]+)\*$/,xu.type(e),{getAttr:()=>({marker:"*"}),updateCaptured:({fullMatch:t,start:n})=>t.startsWith("*")?{}:{fullMatch:t.slice(1),start:n+1}}));ke(xN,{displayName:"InputRule<emphasis>|Star",group:"Emphasis"});const MN=er(e=>xh(/(?:^|[^_])_([^_]+)_$/,xu.type(e),{getAttr:()=>({marker:"_"}),updateCaptured:({fullMatch:t,start:n})=>t.startsWith("_")?{}:{fullMatch:t.slice(1),start:n+1}}));ke(MN,{displayName:"InputRule<emphasis>|Underscore",group:"Emphasis"});const $C=tr("emphasisKeymap",{ToggleEmphasis:{shortcuts:"Mod-i",command:e=>{const t=e.get(Dt);return()=>t.call(gv.key)}}});ke($C.ctx,{displayName:"KeymapCtx<emphasis>",group:"Emphasis"});ke($C.shortcuts,{displayName:"Keymap<emphasis>",group:"Emphasis"});const EC=Ah("strong");ke(EC,{displayName:"Attr<strong>",group:"Strong"});const Ad=Ih("strong",e=>({attrs:{marker:{default:e.get(rp).strong||"*"}},parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-style",getAttrs:t=>t==="bold"}],toDOM:t=>["strong",e.get(EC.key)(t)],parseMarkdown:{match:t=>t.type==="strong",runner:(t,n,o)=>{t.openMark(o,{marker:n.marker}),t.next(n.children),t.closeMark(o)}},toMarkdown:{match:t=>t.type.name==="strong",runner:(t,n)=>{t.withMark(n,"strong",void 0,{marker:n.attrs.marker})}}}));ke(Ad.mark,{displayName:"MarkSchema<strong>",group:"Strong"});ke(Ad.ctx,{displayName:"MarkSchemaCtx<strong>",group:"Strong"});const vv=Tt("ToggleStrong",e=>()=>cv(Ad.type(e)));ke(vv,{displayName:"Command<toggleStrongCommand>",group:"Strong"});const TN=er(e=>xh(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,Ad.type(e),{getAttr:t=>({marker:t[0].startsWith("*")?"*":"_"})}));ke(TN,{displayName:"InputRule<strong>",group:"Strong"});const xC=tr("strongKeymap",{ToggleBold:{shortcuts:["Mod-b"],command:e=>{const t=e.get(Dt);return()=>t.call(vv.key)}}});ke(xC.ctx,{displayName:"KeymapCtx<strong>",group:"Strong"});ke(xC.shortcuts,{displayName:"Keymap<strong>",group:"Strong"});const MC=Ah("inlineCode");ke(MC,{displayName:"Attr<inlineCode>",group:"InlineCode"});const $i=Ih("inlineCode",e=>({priority:100,code:!0,inclusive:!1,parseDOM:[{tag:"code"}],toDOM:t=>["code",e.get(MC.key)(t)],parseMarkdown:{match:t=>t.type==="inlineCode",runner:(t,n,o)=>{t.openMark(o),t.addText(n.value),t.closeMark(o)}},toMarkdown:{match:t=>t.type.name==="inlineCode",runner:(t,n,o)=>{t.withMark(n,"inlineCode",o.text||"")}}}));ke($i.mark,{displayName:"MarkSchema<inlineCode>",group:"InlineCode"});ke($i.ctx,{displayName:"MarkSchemaCtx<inlineCode>",group:"InlineCode"});const yv=Tt("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,$i.type(e))?(n==null||n(r.removeMark(s,i,$i.type(e))),!0):(Object.keys(t.schema.marks).filter(l=>l!==$i.type.name).map(l=>t.schema.marks[l]).forEach(l=>{r.removeMark(s,i,l)}),n==null||n(r.addMark(s,i,$i.type(e).create())),!0)});ke(yv,{displayName:"Command<toggleInlineCodeCommand>",group:"InlineCode"});const ON=er(e=>xh(/(?:\`)([^\`]+)(?:\`)$/,$i.type(e)));ke(ON,{displayName:"InputRule<inlineCodeInputRule>",group:"InlineCode"});const TC=tr("inlineCodeKeymap",{ToggleInlineCode:{shortcuts:"Mod-e",command:e=>{const t=e.get(Dt);return()=>t.call(yv.key)}}});ke(TC.ctx,{displayName:"KeymapCtx<inlineCode>",group:"InlineCode"});ke(TC.shortcuts,{displayName:"Keymap<inlineCode>",group:"InlineCode"});const OC=Ah("link");ke(OC,{displayName:"Attr<link>",group:"Link"});const fs=Ih("link",e=>({attrs:{href:{},title:{default:null}},parseDOM:[{tag:"a[href]",getAttrs:t=>{if(!(t instanceof HTMLElement))throw ii(t);return{href:t.getAttribute("href"),title:t.getAttribute("title")}}}],toDOM:t=>["a",{...e.get(OC.key)(t),...t.attrs}],parseMarkdown:{match:t=>t.type==="link",runner:(t,n,o)=>{const r=n.url,s=n.title;t.openMark(o,{href:r,title:s}),t.next(n.children),t.closeMark(o)}},toMarkdown:{match:t=>t.type.name==="link",runner:(t,n)=>{t.withMark(n,"link",void 0,{title:n.attrs.title,url:n.attrs.href})}}}));ke(fs.mark,{displayName:"MarkSchema<link>",group:"Link"});const IN=Tt("ToggleLink",e=>(t={})=>cv(fs.type(e),t));ke(IN,{displayName:"Command<toggleLinkCommand>",group:"Link"});const AN=Tt("UpdateLink",e=>(t={})=>(n,o)=>{if(!o)return!1;let r,s=-1;const{selection:i}=n,{from:l,to:a}=i;if(n.doc.nodesBetween(l,l===a?a+1:a,(h,m)=>{if(fs.type(e).isInSet(h.marks))return r=h,s=m,!1}),!r)return!1;const u=r.marks.find(({type:h})=>h===fs.type(e));if(!u)return!1;const c=s,d=s+r.nodeSize,{tr:f}=n,p=fs.type(e).create({...u.attrs,...t});return p?(o(f.removeMark(c,d,u).addMark(c,d,p).setSelection(new ht(f.selection.$anchor)).scrollIntoView()),!0):!1});ke(AN,{displayName:"Command<updateLinkCommand>",group:"Link"});const NN=kC("doc",()=>({content:"block+",parseMarkdown:{match:({type:e})=>e==="root",runner:(e,t,n)=>{e.injectRoot(t,n)}},toMarkdown:{match:e=>e.type.name==="doc",runner:(e,t)=>{e.openNode("root"),e.next(t.content)}}}));ke(NN,{displayName:"NodeSchema<doc>",group:"Doc"});const IC=$s("paragraph");ke(IC,{displayName:"Attr<paragraph>",group:"Paragraph"});const ji=Yn("paragraph",e=>({content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:t=>["p",e.get(IC.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"),EN(t,n),t.closeNode()}}}));ke(ji.node,{displayName:"NodeSchema<paragraph>",group:"Paragraph"});ke(ji.ctx,{displayName:"NodeSchemaCtx<paragraph>",group:"Paragraph"});const AC=Tt("TurnIntoText",e=>()=>jp(ji.type(e)));ke(AC,{displayName:"Command<turnIntoTextCommand>",group:"Paragraph"});const NC=tr("paragraphKeymap",{TurnIntoText:{shortcuts:"Mod-Alt-0",command:e=>{const t=e.get(Dt);return()=>t.call(AC.key)}}});ke(NC.ctx,{displayName:"KeymapCtx<paragraph>",group:"Paragraph"});ke(NC.shortcuts,{displayName:"Keymap<paragraph>",group:"Paragraph"});const UCe=Array(6).fill(0).map((e,t)=>t+1);function WCe(e){return DCe(e.textContent)}const _v=In(WCe,"headingIdGenerator");ke(_v,{displayName:"Ctx<HeadingIdGenerator>",group:"Heading"});const PC=$s("heading");ke(PC,{displayName:"Attr<heading>",group:"Heading"});const Ws=Yn("heading",e=>{const t=e.get(_v.key);return{content:"inline*",group:"block",defining:!0,attrs:{id:{default:""},level:{default:1}},parseDOM:UCe.map(n=>({tag:`h${n}`,getAttrs:o=>{if(!(o instanceof HTMLElement))throw ii(o);return{level:n,id:o.id}}})),toDOM:n=>[`h${n.attrs.level}`,{...e.get(PC.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}),EN(n,o),n.closeNode()}}}});ke(Ws.node,{displayName:"NodeSchema<heading>",group:"Heading"});ke(Ws.ctx,{displayName:"NodeSchemaCtx<heading>",group:"Heading"});const PN=er(e=>yA(/^(?<hashes>#+)\s$/,Ws.type(e),t=>{var n,o;const r=((o=(n=t.groups)==null?void 0:n.hashes)==null?void 0:o.length)||0,s=e.get(bn),{$from:i}=s.state.selection,l=i.node();if(l.type.name==="heading"){let a=Number(l.attrs.level)+Number(r);return a>6&&(a=6),{level:a}}return{level:r}}));ke(PN,{displayName:"InputRule<wrapInHeadingInputRule>",group:"Heading"});const bl=Tt("WrapInHeading",e=>t=>(t??(t=1),t<1?jp(ji.type(e)):jp(Ws.type(e),{level:t})));ke(bl,{displayName:"Command<wrapInHeadingCommand>",group:"Heading"});const LC=Tt("DowngradeHeading",e=>()=>(t,n,o)=>{const{$from:r}=t.selection,s=r.node();if(s.type!==Ws.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):jp(ji.type(e))(t,n,o)});ke(LC,{displayName:"Command<downgradeHeadingCommand>",group:"Heading"});const RC=tr("headingKeymap",{TurnIntoH1:{shortcuts:"Mod-Alt-1",command:e=>{const t=e.get(Dt);return()=>t.call(bl.key,1)}},TurnIntoH2:{shortcuts:"Mod-Alt-2",command:e=>{const t=e.get(Dt);return()=>t.call(bl.key,2)}},TurnIntoH3:{shortcuts:"Mod-Alt-3",command:e=>{const t=e.get(Dt);return()=>t.call(bl.key,3)}},TurnIntoH4:{shortcuts:"Mod-Alt-4",command:e=>{const t=e.get(Dt);return()=>t.call(bl.key,4)}},TurnIntoH5:{shortcuts:"Mod-Alt-5",command:e=>{const t=e.get(Dt);return()=>t.call(bl.key,5)}},TurnIntoH6:{shortcuts:"Mod-Alt-6",command:e=>{const t=e.get(Dt);return()=>t.call(bl.key,6)}},DowngradeHeading:{shortcuts:["Delete","Backspace"],command:e=>{const t=e.get(Dt);return()=>t.call(LC.key)}}});ke(RC.ctx,{displayName:"KeymapCtx<heading>",group:"Heading"});ke(RC.shortcuts,{displayName:"Keymap<heading>",group:"Heading"});const DC=$s("blockquote");ke(DC,{displayName:"Attr<blockquote>",group:"Blockquote"});const Nd=Yn("blockquote",e=>({content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:t=>["blockquote",e.get(DC.key)(t),0],parseMarkdown:{match:({type:t})=>t==="blockquote",runner:(t,n,o)=>{t.openNode(o).next(n.children).closeNode()}},toMarkdown:{match:t=>t.type.name==="blockquote",runner:(t,n)=>{t.openNode("blockquote").next(n.content).closeNode()}}}));ke(Nd.node,{displayName:"NodeSchema<blockquote>",group:"Blockquote"});ke(Nd.ctx,{displayName:"NodeSchemaCtx<blockquote>",group:"Blockquote"});const LN=er(e=>uC(/^\s*>\s$/,Nd.type(e)));ke(LN,{displayName:"InputRule<wrapInBlockquoteInputRule>",group:"Blockquote"});const FC=Tt("WrapInBlockquote",e=>()=>hC(Nd.type(e)));ke(FC,{displayName:"Command<wrapInBlockquoteCommand>",group:"Blockquote"});const VC=tr("blockquoteKeymap",{WrapInBlockquote:{shortcuts:"Mod-Shift-b",command:e=>{const t=e.get(Dt);return()=>t.call(FC.key)}}});ke(VC.ctx,{displayName:"KeymapCtx<blockquote>",group:"Blockquote"});ke(VC.shortcuts,{displayName:"Keymap<blockquote>",group:"Blockquote"});const BC=$s("codeBlock",()=>({pre:{},code:{}}));ke(BC,{displayName:"Attr<codeBlock>",group:"CodeBlock"});const Pd=Yn("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 ii(t);return{language:t.dataset.language}}}],toDOM:t=>{const n=e.get(BC.key)(t);return["pre",{...n.pre,"data-language":t.attrs.language},["code",n.code,0]]},parseMarkdown:{match:({type:t})=>t==="code",runner:(t,n,o)=>{const r=n.lang,s=n.value;t.openNode(o,{language:r}),s&&t.addText(s),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="code_block",runner:(t,n)=>{var o;t.addNode("code",void 0,((o=n.content.firstChild)==null?void 0:o.text)||"",{lang:n.attrs.language})}}}));ke(Pd.node,{displayName:"NodeSchema<codeBlock>",group:"CodeBlock"});ke(Pd.ctx,{displayName:"NodeSchemaCtx<codeBlock>",group:"CodeBlock"});const RN=er(e=>yA(/^```(?<language>[a-z]*)?[\s\n]$/,Pd.type(e),t=>{var n;return{language:((n=t.groups)==null?void 0:n.language)??""}}));ke(RN,{displayName:"InputRule<createCodeBlockInputRule>",group:"CodeBlock"});const zC=Tt("CreateCodeBlock",e=>(t="")=>jp(Pd.type(e),{language:t}));ke(zC,{displayName:"Command<createCodeBlockCommand>",group:"CodeBlock"});const KCe=Tt("UpdateCodeBlockLanguage",()=>({pos:e,language:t}={pos:-1,language:""})=>(n,o)=>e>=0?(o==null||o(n.tr.setNodeAttribute(e,"language",t)),!0):!1);ke(KCe,{displayName:"Command<updateCodeBlockLanguageCommand>",group:"CodeBlock"});const jC=tr("codeBlockKeymap",{CreateCodeBlock:{shortcuts:"Mod-Alt-c",command:e=>{const t=e.get(Dt);return()=>t.call(zC.key)}}});ke(jC.ctx,{displayName:"KeymapCtx<codeBlock>",group:"CodeBlock"});ke(jC.shortcuts,{displayName:"Keymap<codeBlock>",group:"CodeBlock"});const HC=$s("image");ke(HC,{displayName:"Attr<image>",group:"Image"});const Ld=Yn("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 ii(t);return{src:t.getAttribute("src")||"",alt:t.getAttribute("alt")||"",title:t.getAttribute("title")||t.getAttribute("alt")||""}}}],toDOM:t=>["img",{...e.get(HC.key)(t),...t.attrs}],parseMarkdown:{match:({type:t})=>t==="image",runner:(t,n,o)=>{const r=n.url,s=n.alt,i=n.title;t.addNode(o,{src:r,alt:s,title:i})}},toMarkdown:{match:t=>t.type.name==="image",runner:(t,n)=>{t.addNode("image",void 0,void 0,{title:n.attrs.title,url:n.attrs.src,alt:n.attrs.alt})}}}));ke(Ld.node,{displayName:"NodeSchema<image>",group:"Image"});ke(Ld.ctx,{displayName:"NodeSchemaCtx<image>",group:"Image"});const DN=Tt("InsertImage",e=>(t={})=>(n,o)=>{if(!o)return!0;const{src:r="",alt:s="",title:i=""}=t,l=Ld.type(e).create({src:r,alt:s,title:i});return l&&o(n.tr.replaceSelectionWith(l).scrollIntoView()),!0});ke(DN,{displayName:"Command<insertImageCommand>",group:"Image"});const FN=Tt("UpdateImage",e=>(t={})=>(n,o)=>{const r=awe(n.selection,Ld.type(e));if(!r)return!1;const{node:s,pos:i}=r,l={...s.attrs},{src:a,alt:u,title:c}=t;return a!==void 0&&(l.src=a),u!==void 0&&(l.alt=u),c!==void 0&&(l.title=c),o==null||o(n.tr.setNodeMarkup(i,void 0,l).scrollIntoView()),!0});ke(FN,{displayName:"Command<updateImageCommand>",group:"Image"});const qCe=er(e=>new Cr(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/,(t,n,o,r)=>{const[s,i,l="",a]=n;return s?t.tr.replaceWith(o,r,Ld.type(e).create({src:l,alt:i,title:a})):null}));ke(qCe,{displayName:"InputRule<insertImageInputRule>",group:"Image"});const t0=$s("hardbreak",e=>({"data-type":"hardbreak","data-is-inline":e.attrs.isInline}));ke(t0,{displayName:"Attr<hardbreak>",group:"Hardbreak"});const Xa=Yn("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(t0.key)(t)," "]:["br",e.get(t0.key)(t)],parseMarkdown:{match:({type:t})=>t==="break",runner:(t,n,o)=>{var r;t.addNode(o,{isInline:!!((r=n.data)!=null&&r.isInline)})}},leafText:()=>`
119 -`,toMarkdown:{match:t=>t.type.name==="hardbreak",runner:(t,n)=>{n.attrs.isInline?t.addNode("text",void 0,`
120 -`):t.addNode("break")}}}));ke(Xa.node,{displayName:"NodeSchema<hardbreak>",group:"Hardbreak"});ke(Xa.ctx,{displayName:"NodeSchemaCtx<hardbreak>",group:"Hardbreak"});const UC=Tt("InsertHardbreak",e=>()=>(t,n)=>{var o;const{selection:r,tr:s}=t;if(!(r instanceof ht))return!1;if(r.empty){const i=r.$from.node();if(i.childCount>0&&((o=i.lastChild)==null?void 0:o.type.name)==="hardbreak")return n==null||n(s.replaceRangeWith(r.to-1,r.to,t.schema.node("paragraph")).setSelection(bt.near(s.doc.resolve(r.to))).scrollIntoView()),!0}return n==null||n(s.setMeta("hardbreak",!0).replaceSelectionWith(Xa.type(e).create()).scrollIntoView()),!0});ke(UC,{displayName:"Command<insertHardbreakCommand>",group:"Hardbreak"});const WC=tr("hardbreakKeymap",{InsertHardbreak:{shortcuts:"Shift-Enter",command:e=>{const t=e.get(Dt);return()=>t.call(UC.key)}}});ke(WC.ctx,{displayName:"KeymapCtx<hardbreak>",group:"Hardbreak"});ke(WC.shortcuts,{displayName:"Keymap<hardbreak>",group:"Hardbreak"});const KC=$s("hr");ke(KC,{displayName:"Attr<hr>",group:"Hr"});const Nh=Yn("hr",e=>({group:"block",parseDOM:[{tag:"hr"}],toDOM:t=>["hr",e.get(KC.key)(t)],parseMarkdown:{match:({type:t})=>t==="thematicBreak",runner:(t,n,o)=>{t.addNode(o)}},toMarkdown:{match:t=>t.type.name==="hr",runner:t=>{t.addNode("thematicBreak")}}}));ke(Nh.node,{displayName:"NodeSchema<hr>",group:"Hr"});ke(Nh.ctx,{displayName:"NodeSchemaCtx<hr>",group:"Hr"});const VN=er(e=>new Cr(/^(?:---|___\s|\*\*\*\s)$/,(t,n,o,r)=>{const{tr:s}=t;return n[0]&&s.replaceWith(o-1,r,Nh.type(e).create()),s}));ke(VN,{displayName:"InputRule<insertHrInputRule>",group:"Hr"});const BN=Tt("InsertHr",e=>()=>(t,n)=>{if(!n)return!0;const o=ji.node.type(e).create(),{tr:r,selection:s}=t,{from:i}=s,l=Nh.type(e).create();if(!l)return!0;const a=r.replaceSelectionWith(l).insert(i,o),u=bt.findFrom(a.doc.resolve(i),1,!0);return u&&n(a.setSelection(u).scrollIntoView()),!0});ke(BN,{displayName:"Command<insertHrCommand>",group:"Hr"});const qC=$s("bulletList");ke(qC,{displayName:"Attr<bulletList>",group:"BulletList"});const Mu=Yn("bullet_list",e=>({content:"listItem+",group:"block",attrs:{spread:{default:!1}},parseDOM:[{tag:"ul",getAttrs:t=>{if(!(t instanceof HTMLElement))throw ii(t);return{spread:t.dataset.spread}}}],toDOM:t=>["ul",{...e.get(qC.key)(t),"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:t,ordered:n})=>t==="list"&&!n,runner:(t,n,o)=>{const r=n.spread!=null?`${n.spread}`:"false";t.openNode(o,{spread:r}).next(n.children).closeNode()}},toMarkdown:{match:t=>t.type.name==="bullet_list",runner:(t,n)=>{t.openNode("list",void 0,{ordered:!1,spread:n.attrs.spread==="true"}).next(n.content).closeNode()}}}));ke(Mu.node,{displayName:"NodeSchema<bulletList>",group:"BulletList"});ke(Mu.ctx,{displayName:"NodeSchemaCtx<bulletList>",group:"BulletList"});const zN=er(e=>uC(/^\s*([-+*])\s$/,Mu.type(e)));ke(zN,{displayName:"InputRule<wrapInBulletListInputRule>",group:"BulletList"});const GC=Tt("WrapInBulletList",e=>()=>hC(Mu.type(e)));ke(GC,{displayName:"Command<wrapInBulletListCommand>",group:"BulletList"});const YC=tr("bulletListKeymap",{WrapInBulletList:{shortcuts:"Mod-Alt-8",command:e=>{const t=e.get(Dt);return()=>t.call(GC.key)}}});ke(YC.ctx,{displayName:"KeymapCtx<bulletListKeymap>",group:"BulletList"});ke(YC.shortcuts,{displayName:"Keymap<bulletListKeymap>",group:"BulletList"});const ZC=$s("orderedList");ke(ZC,{displayName:"Attr<orderedList>",group:"OrderedList"});const Tu=Yn("ordered_list",e=>({content:"listItem+",group:"block",attrs:{order:{default:1},spread:{default:!1}},parseDOM:[{tag:"ol",getAttrs:t=>{if(!(t instanceof HTMLElement))throw ii(t);return{spread:t.dataset.spread,order:t.hasAttribute("start")?Number(t.getAttribute("start")):1}}}],toDOM:t=>["ol",{...e.get(ZC.key)(t),...t.attrs.order===1?{}:t.attrs.order,"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:t,ordered:n})=>t==="list"&&!!n,runner:(t,n,o)=>{const r=n.spread!=null?`${n.spread}`:"true";t.openNode(o,{spread:r}).next(n.children).closeNode()}},toMarkdown:{match:t=>t.type.name==="ordered_list",runner:(t,n)=>{t.openNode("list",void 0,{ordered:!0,start:1,spread:n.attrs.spread==="true"}),t.next(n.content),t.closeNode()}}}));ke(Tu.node,{displayName:"NodeSchema<orderedList>",group:"OrderedList"});ke(Tu.ctx,{displayName:"NodeSchemaCtx<orderedList>",group:"OrderedList"});const jN=er(e=>uC(/^\s*(\d+)\.\s$/,Tu.type(e),t=>({order:Number(t[1])}),(t,n)=>n.childCount+n.attrs.order===Number(t[1])));ke(jN,{displayName:"InputRule<wrapInOrderedListInputRule>",group:"OrderedList"});const JC=Tt("WrapInOrderedList",e=>()=>hC(Tu.type(e)));ke(JC,{displayName:"Command<wrapInOrderedListCommand>",group:"OrderedList"});const XC=tr("orderedListKeymap",{WrapInOrderedList:{shortcuts:"Mod-Alt-7",command:e=>{const t=e.get(Dt);return()=>t.call(JC.key)}}});ke(XC.ctx,{displayName:"KeymapCtx<orderedList>",group:"OrderedList"});ke(XC.shortcuts,{displayName:"Keymap<orderedList>",group:"OrderedList"});const QC=$s("listItem");ke(QC,{displayName:"Attr<listItem>",group:"ListItem"});const Qs=Yn("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 ii(t);return{label:t.dataset.label,listType:t.dataset.listType,spread:t.dataset.spread}}}],toDOM:t=>["li",{...e.get(QC.key)(t),"data-label":t.attrs.label,"data-list-type":t.attrs.listType,"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:t})=>t==="listItem",runner:(t,n,o)=>{const r=n.label!=null?`${n.label}.`:"•",s=n.label!=null?"ordered":"bullet",i=n.spread!=null?`${n.spread}`:"true";t.openNode(o,{label:r,listType:s,spread:i}),t.next(n.children),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="list_item",runner:(t,n)=>{t.openNode("listItem",void 0,{spread:n.attrs.spread==="true"}),t.next(n.content),t.closeNode()}}}));ke(Qs.node,{displayName:"NodeSchema<listItem>",group:"ListItem"});ke(Qs.ctx,{displayName:"NodeSchemaCtx<listItem>",group:"ListItem"});const ek=Tt("SinkListItem",e=>()=>zCe(Qs.type(e)));ke(ek,{displayName:"Command<sinkListItemCommand>",group:"ListItem"});const tk=Tt("LiftListItem",e=>()=>$N(Qs.type(e)));ke(tk,{displayName:"Command<liftListItemCommand>",group:"ListItem"});const nk=Tt("SplitListItem",e=>()=>FCe(Qs.type(e)));ke(nk,{displayName:"Command<splitListItemCommand>",group:"ListItem"});function GCe(e){return(t,n,o)=>{const{selection:r}=t;if(!(r instanceof ht))return!1;const{empty:s,$from:i}=r;if(!s||i.parentOffset!==0)return!1;const l=i.node(-1);return l.type!==Qs.type(e)||l.firstChild!==i.node()||i.node(-2).childCount>1?!1:$N(Qs.type(e))(t,n,o)}}const ok=Tt("LiftFirstListItem",e=>()=>GCe(e));ke(ok,{displayName:"Command<liftFirstListItemCommand>",group:"ListItem"});const rk=tr("listItemKeymap",{NextListItem:{shortcuts:"Enter",command:e=>{const t=e.get(Dt);return()=>t.call(nk.key)}},SinkListItem:{shortcuts:["Tab","Mod-]"],command:e=>{const t=e.get(Dt);return()=>t.call(ek.key)}},LiftListItem:{shortcuts:["Shift-Tab","Mod-["],command:e=>{const t=e.get(Dt);return()=>t.call(tk.key)}},LiftFirstListItem:{shortcuts:["Backspace","Delete"],command:e=>{const t=e.get(Dt);return()=>t.call(ok.key)}}});ke(rk.ctx,{displayName:"KeymapCtx<listItem>",group:"ListItem"});ke(rk.shortcuts,{displayName:"Keymap<listItem>",group:"ListItem"});const HN=kC("text",()=>({group:"inline",parseMarkdown:{match:({type:e})=>e==="text",runner:(e,t)=>{e.addText(t.value)}},toMarkdown:{match:e=>e.type.name==="text",runner:(e,t)=>{e.addNode("text",void 0,t.text)}}}));ke(HN,{displayName:"NodeSchema<text>",group:"Text"});const sk=$s("html");ke(sk,{displayName:"Attr<html>",group:"Html"});const ik=Yn("html",e=>({atom:!0,group:"inline",inline:!0,attrs:{value:{default:""}},toDOM:t=>{const n=document.createElement("span"),o={...e.get(sk.key)(t),"data-value":t.attrs.value,"data-type":"html"};return n.textContent=t.attrs.value,["span",o,t.attrs.value]},parseDOM:[{tag:'span[data-type="html"]',getAttrs:t=>({value:t.dataset.value??""})}],parseMarkdown:{match:({type:t})=>t==="html",runner:(t,n,o)=>{t.addNode(o,{value:n.value})}},toMarkdown:{match:t=>t.type.name==="html",runner:(t,n)=>{t.addNode("html",void 0,n.attrs.value)}}}));ke(ik.node,{displayName:"NodeSchema<html>",group:"Html"});ke(ik.ctx,{displayName:"NodeSchemaCtx<html>",group:"Html"});const YCe=[NN,IC,ji,_v,PC,Ws,t0,Xa,DC,Nd,BC,Pd,KC,Nh,HC,Ld,qC,Mu,ZC,Tu,QC,Qs,SC,xu,EC,Ad,MC,$i,OC,fs,sk,ik,HN].flat(),ZCe=[LN,zN,jN,RN,VN,PN].flat(),JCe=[xN,MN,ON,TN],XCe=[AC,FC,bl,LC,zC,UC,BN,DN,FN,JC,GC,ek,nk,tk,ok,gv,yv,vv,IN,AN],QCe=[VC,jC,WC,RC,rk,XC,YC,NC,$C,TC,xC].flat(),lk=Id("remarkAddOrderInList",()=>()=>e=>{Od(e,"list",t=>{if(t.ordered){const n=t.start??1;t.children.forEach((o,r)=>{o.label=r+n})}})});ke(lk.plugin,{displayName:"Remark<remarkAddOrderInListPlugin>",group:"Remark"});ke(lk.options,{displayName:"RemarkConfig<remarkAddOrderInListPlugin>",group:"Remark"});const ak=Id("remarkLineBreak",()=>()=>e=>{const t=/[\t ]*(?:\r?\n|\r)/g;Od(e,"text",(n,o,r)=>{if(!n.value||typeof n.value!="string")return;const s=[];let i=0;t.lastIndex=0;let l=t.exec(n.value);for(;l;){const a=l.index;i!==a&&s.push({type:"text",value:n.value.slice(i,a)}),s.push({type:"break",data:{isInline:!0}}),i=a+l[0].length,l=t.exec(n.value)}if(s.length>0&&r&&typeof o=="number")return i<n.value.length&&s.push({type:"text",value:n.value.slice(i)}),r.children.splice(o,1,...s),o+s.length})});ke(ak.plugin,{displayName:"Remark<remarkLineBreak>",group:"Remark"});ke(ak.options,{displayName:"RemarkConfig<remarkLineBreak>",group:"Remark"});const uk=Id("remarkInlineLink",()=>HCe);ke(uk.plugin,{displayName:"Remark<remarkInlineLinkPlugin>",group:"Remark"});ke(uk.options,{displayName:"RemarkConfig<remarkInlineLinkPlugin>",group:"Remark"});const eke=e=>!!e.children,tke=e=>e.type==="html";function nke(e,t){return n(e,0,null)[0];function n(o,r,s){if(eke(o)){const i=[];for(let l=0,a=o.children.length;l<a;l++){const u=o.children[l];if(u){const c=n(u,l,o);if(c)for(let d=0,f=c.length;d<f;d++){const p=c[d];p&&i.push(p)}}}o.children=i}return t(o,r,s)}}const ck=Id("remarkHTMLTransformer",()=>()=>e=>{nke(e,(t,n,o)=>tke(t)?((o==null?void 0:o.type)==="root"&&(t.children=[{...t}],delete t.value,t.type="paragraph"),[t]):[t])});ke(ck.plugin,{displayName:"Remark<remarkHtmlTransformer>",group:"Remark"});ke(ck.options,{displayName:"RemarkConfig<remarkHtmlTransformer>",group:"Remark"});const dk=Id("remarkMarker",()=>()=>(e,t)=>{const n=o=>t.value.charAt(o.position.start.offset);Od(e,o=>["strong","emphasis"].includes(o.type),o=>{o.marker=n(o)})});ke(dk.plugin,{displayName:"Remark<remarkMarker>",group:"Remark"});ke(dk.options,{displayName:"RemarkConfig<remarkMarker>",group:"Remark"});const UN=ao(()=>{let e=!1;const t=new wn("MILKDOWN_INLINE_NODES_CURSOR"),n=new xn({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=zn.widget(r,s,{side:-1}),l=document.createElement("span"),a=zn.widget(r,l);return setTimeout(()=>{s.contentEditable="true",l.contentEditable="true"}),an.create(o.doc,[i,a])}return an.empty}}});return n});ke(UN,{displayName:"Prose<inlineNodesCursorPlugin>",group:"Prose"});const WN=ao(e=>new xn({key:new wn("MILKDOWN_HARDBREAK_MARKS"),appendTransaction:(t,n,o)=>{if(!t.length)return;const[r]=t;if(!r)return;const[s]=r.steps;if(r.getMeta("hardbreak")){if(!(s instanceof eo))return;const{from:i}=s;return o.tr.setNodeMarkup(i,Xa.type(e),void 0,[])}if(s instanceof Si){let i=o.tr;const{from:l,to:a}=s;return o.doc.nodesBetween(l,a,(u,c)=>{u.type===Xa.type(e)&&(i=i.setNodeMarkup(c,Xa.type(e),void 0,[]))}),i}}}));ke(WN,{displayName:"Prose<hardbreakClearMarkPlugin>",group:"Prose"});const fk=In(["table","code_block"],"hardbreakFilterNodes");ke(fk,{displayName:"Ctx<hardbreakFilterNodes>",group:"Prose"});const KN=ao(e=>{const t=e.get(fk.key);return new xn({key:new wn("MILKDOWN_HARDBREAK_FILTER"),filterTransaction:(n,o)=>{const r=n.getMeta("hardbreak"),[s]=n.steps;if(r&&s){const{from:i}=s,l=o.doc.resolve(i);let a=l.depth,u=!0;for(;a>0;)t.includes(l.node(a).type.name)&&(u=!1),a--;return u}return!0}})});ke(KN,{displayName:"Prose<hardbreakFilterPlugin>",group:"Prose"});const qN=ao(e=>{const t=new wn("MILKDOWN_HEADING_ID"),n=o=>{if(o.composing)return;const r=e.get(_v.key),s=o.state.tr.setMeta("addToHistory",!1);let i=!1;o.state.doc.descendants((l,a)=>{if(l.type===Ws.type(e)){if(l.textContent.trim().length===0)return;const u=l.attrs,c=r(l);u.id!==c&&(i=!0,s.setMeta(t,!0).setNodeMarkup(a,void 0,{...u,id:c}))}}),i&&o.dispatch(s)};return new xn({key:t,view:o=>(n(o),{update:(r,s)=>{r.state.doc.eq(s.doc)||n(r)}})})});ke(qN,{displayName:"Prose<syncHeadingIdPlugin>",group:"Prose"});const GN=ao(e=>{const t=n=>{if(n.composing||!n.editable)return;const o=Tu.type(e),r=Mu.type(e),s=Qs.type(e),i=n.state,l=(c,d)=>{let f=!1;const p=`${d+1}.`;return c.label!==p&&(c.label=p,f=!0),f};let a=i.tr,u=!1;i.doc.descendants((c,d,f,p)=>{if(c.type===r){const h=c.maybeChild(0);(h==null?void 0:h.type)===s&&h.attrs.listType==="ordered"&&(u=!0,a.setNodeMarkup(d,o,{spread:"true"}),c.descendants((m,y,v,w)=>{if(m.type===s){const _={...m.attrs};l(_,w)&&(a=a.setNodeMarkup(y,void 0,_))}return!1}))}else if(c.type===s&&(f==null?void 0:f.type)===o){const h={...c.attrs};let m=!1;h.listType!=="ordered"&&(h.listType="ordered",m=!0),f!=null&&f.maybeChild(0)&&(m=l(h,p)),m&&(a=a.setNodeMarkup(d,void 0,h),u=!0)}}),u&&n.dispatch(a.setMeta("addToHistory",!1))};return new xn({key:new wn("MILKDOWN_KEEP_LIST_ORDER"),view:n=>(t(n),{update:o=>{t(o)}})})});ke(GN,{displayName:"Prose<syncListOrderPlugin>",group:"Prose"});const oke=[WN,fk,KN,UN,lk,uk,ak,ck,dk,qN,GN].flat(),rke=[YCe,ZCe,JCe,XCe,QCe,oke].flat();var g2,v2;if(typeof WeakMap<"u"){let e=new WeakMap;g2=t=>e.get(t),v2=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;g2=o=>{for(let r=0;r<e.length;r+=2)if(e[r]==o)return e[r+1]},v2=(o,r)=>(n==10&&(n=0),e[n++]=o,e[n++]=r)}var Xt=class{constructor(e,t,n,o){this.width=e,this.height=t,this.map=n,this.problems=o}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const o=t%this.width,r=t/this.width|0;let s=o+1,i=r+1;for(let l=1;s<this.width&&this.map[t+l]==n;l++)s++;for(let l=1;i<this.height&&this.map[t+this.width*l]==n;l++)i++;return{left:o,top:r,right:s,bottom:i}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:o,right:r,top:s,bottom:i}=this.findCell(e);return t=="horiz"?(n<0?o==0:r==this.width)?null:this.map[s*this.width+(n<0?o-1:r)]:(n<0?s==0:i==this.height)?null:this.map[o+this.width*(n<0?s-1:i)]}rectBetween(e,t){const{left:n,right:o,top:r,bottom:s}=this.findCell(e),{left:i,right:l,top:a,bottom:u}=this.findCell(t);return{left:Math.min(n,i),top:Math.min(r,a),right:Math.max(o,l),bottom:Math.max(s,u)}}cellsInRect(e){const t=[],n={};for(let o=e.top;o<e.bottom;o++)for(let r=e.left;r<e.right;r++){const s=o*this.width+r,i=this.map[s];n[i]||(n[i]=!0,!(r==e.left&&r&&this.map[s-1]==i||o==e.top&&o&&this.map[s-this.width]==i)&&t.push(i))}return t}positionAt(e,t,n){for(let o=0,r=0;;o++){const s=r+n.child(o).nodeSize;if(o==e){let i=t+e*this.width;const l=(e+1)*this.width;for(;i<l&&this.map[i]<r;)i++;return i==l?s-1:this.map[i]}r=s}}static get(e){return g2(e)||v2(e,ske(e))}};function ske(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const t=ike(e),n=e.childCount,o=[];let r=0,s=null;const i=[];for(let u=0,c=t*n;u<c;u++)o[u]=0;for(let u=0,c=0;u<n;u++){const d=e.child(u);c++;for(let h=0;;h++){for(;r<o.length&&o[r]!=0;)r++;if(h==d.childCount)break;const m=d.child(h),{colspan:y,rowspan:v,colwidth:w}=m.attrs;for(let _=0;_<v;_++){if(_+u>=n){(s||(s=[])).push({type:"overlong_rowspan",pos:c,n:v-_});break}const S=r+_*t;for(let x=0;x<y;x++){o[S+x]==0?o[S+x]=c:(s||(s=[])).push({type:"collision",row:u,pos:c,n:y-x});const E=w&&w[x];if(E){const T=(S+x)%t*2,O=i[T];O==null||O!=E&&i[T+1]==1?(i[T]=E,i[T+1]=1):O==E&&i[T+1]++}}}r+=y,c+=m.nodeSize}const f=(u+1)*t;let p=0;for(;r<f;)o[r++]==0&&p++;p&&(s||(s=[])).push({type:"missing",row:u,n:p}),c++}const l=new Xt(t,n,o,s);let a=!1;for(let u=0;!a&&u<i.length;u+=2)i[u]!=null&&i[u+1]<n&&(a=!0);return a&&lke(l,i,e),l}function ike(e){let t=-1,n=!1;for(let o=0;o<e.childCount;o++){const r=e.child(o);let s=0;if(n)for(let i=0;i<o;i++){const l=e.child(i);for(let a=0;a<l.childCount;a++){const u=l.child(a);i+u.attrs.rowspan>o&&(s+=u.attrs.colspan)}}for(let i=0;i<r.childCount;i++){const l=r.child(i);s+=l.attrs.colspan,l.attrs.rowspan>1&&(n=!0)}t==-1?t=s:t!=s&&(t=Math.max(t,s))}return t}function lke(e,t,n){e.problems||(e.problems=[]);const o={};for(let r=0;r<e.map.length;r++){const s=e.map[r];if(o[s])continue;o[s]=!0;const i=n.nodeAt(s);if(!i)throw new RangeError(`No cell with offset ${s} found`);let l=null;const a=i.attrs;for(let u=0;u<a.colspan;u++){const c=(r+u)%e.width,d=t[c*2];d!=null&&(!a.colwidth||a.colwidth[u]!=d)&&((l||(l=ake(a)))[u]=d)}l&&e.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:l})}}function ake(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function O9(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 I9(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 uke(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=>O9(o,t)}],toDOM(o){return["td",I9(o,t),0]}},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:o=>O9(o,t)}],toDOM(o){return["th",I9(o,t),0]}}}}function Wr(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const o=e.nodes[n],r=o.spec.tableRole;r&&(t[r]=o)}}return t}var $l=new wn("selectingCells");function Ph(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 Yr(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 bv(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=Ph(t.$head)||cke(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function cke(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 y2(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function dke(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function pk(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function YN(e,t,n){const o=e.node(-1),r=Xt.get(o),s=e.start(-1),i=r.nextCell(e.pos-s,t,n);return i==null?null:e.node(0).resolve(s+i)}function gu(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 fke(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 pke(e,t,n){const o=Wr(t.type.schema).header_cell;for(let r=0;r<e.height;r++)if(t.nodeAt(e.map[n+r*e.width]).type!=o)return!1;return!0}var hn=class mi extends bt{constructor(t,n=t){const o=t.node(-1),r=Xt.get(o),s=t.start(-1),i=r.rectBetween(t.pos-s,n.pos-s),l=t.node(0),a=r.cellsInRect(i).filter(c=>c!=n.pos-s);a.unshift(n.pos-s);const u=a.map(c=>{const d=o.nodeAt(c);if(!d)throw RangeError(`No cell with offset ${c} found`);const f=s+c+1;return new Yg(l.resolve(f),l.resolve(f+d.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=t,this.$headCell=n}map(t,n){const o=t.resolve(n.map(this.$anchorCell.pos)),r=t.resolve(n.map(this.$headCell.pos));if(y2(o)&&y2(r)&&pk(o,r)){const s=this.$anchorCell.node(-1)!=o.node(-1);return s&&this.isRowSelection()?mi.rowSelection(o,r):s&&this.isColSelection()?mi.colSelection(o,r):new mi(o,r)}return ht.between(o,r)}content(){const t=this.$anchorCell.node(-1),n=Xt.get(t),o=this.$anchorCell.start(-1),r=n.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o),s={},i=[];for(let a=r.top;a<r.bottom;a++){const u=[];for(let c=a*n.width+r.left,d=r.left;d<r.right;d++,c++){const f=n.map[c];if(s[f])continue;s[f]=!0;const p=n.findCell(f);let h=t.nodeAt(f);if(!h)throw RangeError(`No cell with offset ${f} found`);const m=r.left-p.left,y=p.right-r.right;if(m>0||y>0){let v=h.attrs;if(m>0&&(v=gu(v,0,m)),y>0&&(v=gu(v,v.colspan-y,y)),p.left<r.left){if(h=h.type.createAndFill(v),!h)throw RangeError(`Could not create cell with attrs ${JSON.stringify(v)}`)}else h=h.type.create(v,h.content)}if(p.top<r.top||p.bottom>r.bottom){const v={...h.attrs,rowspan:Math.min(p.bottom,r.bottom)-Math.max(p.top,r.top)};p.top<r.top?h=h.type.createAndFill(v):h=h.type.create(v,h.content)}u.push(h)}i.push(t.child(a).copy(Ue.from(u)))}const l=this.isColSelection()&&this.isRowSelection()?t:i;return new Ye(Ue.from(l),1,1)}replace(t,n=Ye.empty){const o=t.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){const{$from:l,$to:a}=r[i],u=t.mapping.slice(o);t.replace(u.map(l.pos),u.map(a.pos),i?Ye.empty:n)}const s=bt.findFrom(t.doc.resolve(t.mapping.slice(o).map(this.to)),-1);s&&t.setSelection(s)}replaceWith(t,n){this.replace(t,new Ye(Ue.from(n),0,0))}forEachCell(t){const n=this.$anchorCell.node(-1),o=Xt.get(n),r=this.$anchorCell.start(-1),s=o.cellsInRect(o.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let i=0;i<s.length;i++)t(n.nodeAt(s[i]),r+s[i])}isColSelection(){const t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;const o=t+this.$anchorCell.nodeAfter.attrs.rowspan,r=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(o,r)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){const o=t.node(-1),r=Xt.get(o),s=t.start(-1),i=r.findCell(t.pos-s),l=r.findCell(n.pos-s),a=t.node(0);return i.top<=l.top?(i.top>0&&(t=a.resolve(s+r.map[i.left])),l.bottom<r.height&&(n=a.resolve(s+r.map[r.width*(r.height-1)+l.right-1]))):(l.top>0&&(n=a.resolve(s+r.map[l.left])),i.bottom<r.height&&(t=a.resolve(s+r.map[r.width*(r.height-1)+i.right-1]))),new mi(t,n)}isRowSelection(){const t=this.$anchorCell.node(-1),n=Xt.get(t),o=this.$anchorCell.start(-1),r=n.colCount(this.$anchorCell.pos-o),s=n.colCount(this.$headCell.pos-o);if(Math.min(r,s)>0)return!1;const i=r+this.$anchorCell.nodeAfter.attrs.colspan,l=s+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,l)==n.width}eq(t){return t instanceof mi&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const o=t.node(-1),r=Xt.get(o),s=t.start(-1),i=r.findCell(t.pos-s),l=r.findCell(n.pos-s),a=t.node(0);return i.left<=l.left?(i.left>0&&(t=a.resolve(s+r.map[i.top*r.width])),l.right<r.width&&(n=a.resolve(s+r.map[r.width*(l.top+1)-1]))):(l.left>0&&(n=a.resolve(s+r.map[l.top*r.width])),i.right<r.width&&(t=a.resolve(s+r.map[r.width*(i.top+1)-1]))),new mi(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new mi(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,o=n){return new mi(t.resolve(n),t.resolve(o))}getBookmark(){return new hke(this.$anchorCell.pos,this.$headCell.pos)}};hn.prototype.visible=!1;bt.jsonID("cell",hn);var hke=class ZN{constructor(t,n){this.anchor=t,this.head=n}map(t){return new ZN(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&&pk(n,o)?new hn(n,o):bt.near(o,1)}};function mke(e){if(!(e.selection instanceof hn))return null;const t=[];return e.selection.forEachCell((n,o)=>{t.push(zn.node(o,o+n.nodeSize,{class:"selectedCell"}))}),an.create(e.doc,t)}function gke({$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 vke({$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 yke(e,t,n){const o=(t||e).selection,r=(t||e).doc;let s,i;if(o instanceof mt&&(i=o.node.type.spec.tableRole)){if(i=="cell"||i=="header_cell")s=hn.create(r,o.from);else if(i=="row"){const l=r.resolve(o.from+1);s=hn.rowSelection(l,l)}else if(!n){const l=Xt.get(o.node),a=o.from+1,u=a+l.map[l.width*l.height-1];s=hn.create(r,a+1,u)}}else o instanceof ht&&gke(o)?s=ht.create(r,o.from):o instanceof ht&&vke(o)&&(s=ht.create(r,o.$from.start(),o.$from.end()));return s&&(t||(t=e.tr)).setSelection(s),t}var _ke=new wn("fix-tables");function JN(e,t,n,o){const r=e.childCount,s=t.childCount;e:for(let i=0,l=0;i<s;i++){const a=t.child(i);for(let u=l,c=Math.min(r,i+3);u<c;u++)if(e.child(u)==a){l=u+1,n+=a.nodeSize;continue e}o(a,n),l<r&&e.child(l).sameMarkup(a)?JN(e.child(l),a,n+1,o):a.nodesBetween(0,a.content.size,o,n+1),n+=a.nodeSize}}function bke(e,t){let n;const o=(r,s)=>{r.type.spec.tableRole=="table"&&(n=wke(e,r,s,n))};return t?t.doc!=e.doc&&JN(t.doc,e.doc,0,o):e.doc.descendants(o),n}function wke(e,t,n,o){const r=Xt.get(t);if(!r.problems)return o;o||(o=e.tr);const s=[];for(let a=0;a<r.height;a++)s.push(0);for(let a=0;a<r.problems.length;a++){const u=r.problems[a];if(u.type=="collision"){const c=t.nodeAt(u.pos);if(!c)continue;const d=c.attrs;for(let f=0;f<d.rowspan;f++)s[u.row+f]+=u.n;o.setNodeMarkup(o.mapping.map(n+1+u.pos),null,gu(d,d.colspan-u.n,u.n))}else if(u.type=="missing")s[u.row]+=u.n;else if(u.type=="overlong_rowspan"){const c=t.nodeAt(u.pos);if(!c)continue;o.setNodeMarkup(o.mapping.map(n+1+u.pos),null,{...c.attrs,rowspan:c.attrs.rowspan-u.n})}else if(u.type=="colwidth mismatch"){const c=t.nodeAt(u.pos);if(!c)continue;o.setNodeMarkup(o.mapping.map(n+1+u.pos),null,{...c.attrs,colwidth:u.colwidth})}}let i,l;for(let a=0;a<s.length;a++)s[a]&&(i==null&&(i=a),l=a);for(let a=0,u=n+1;a<r.height;a++){const c=t.child(a),d=u+c.nodeSize,f=s[a];if(f>0){let p="cell";c.firstChild&&(p=c.firstChild.type.spec.tableRole);const h=[];for(let y=0;y<f;y++){const v=Wr(e.schema)[p].createAndFill();v&&h.push(v)}const m=(a==0||i==a-1)&&l==a?u+1:d-1;o.insert(o.mapping.map(m),h)}u=d}return o.setMeta(_ke,{fixTables:!0})}function ia(e){const t=e.selection,n=bv(e),o=n.node(-1),r=n.start(-1),s=Xt.get(o);return{...t instanceof hn?s.rectBetween(t.$anchorCell.pos-r,t.$headCell.pos-r):s.findCell(n.pos-r),tableStart:r,map:s,table:o}}function XN(e,{map:t,tableStart:n,table:o},r){let s=r>0?-1:0;pke(t,o,r+s)&&(s=r==0||r==t.width?null:0);for(let i=0;i<t.height;i++){const l=i*t.width+r;if(r>0&&r<t.width&&t.map[l-1]==t.map[l]){const a=t.map[l],u=o.nodeAt(a);e.setNodeMarkup(e.mapping.map(n+a),null,fke(u.attrs,r-t.colCount(a))),i+=u.attrs.rowspan-1}else{const a=s==null?Wr(o.type.schema).cell:o.nodeAt(t.map[l+s]).type,u=t.positionAt(i,r,o);e.insert(e.mapping.map(n+u),a.createAndFill())}}return e}function Cke(e,t){if(!Yr(e))return!1;if(t){const n=ia(e);t(XN(e.tr,n,n.left))}return!0}function kke(e,t){if(!Yr(e))return!1;if(t){const n=ia(e);t(XN(e.tr,n,n.right))}return!0}function Ske(e,{map:t,table:n,tableStart:o},r){const s=e.mapping.maps.length;for(let i=0;i<t.height;){const l=i*t.width+r,a=t.map[l],u=n.nodeAt(a),c=u.attrs;if(r>0&&t.map[l-1]==a||r<t.width-1&&t.map[l+1]==a)e.setNodeMarkup(e.mapping.slice(s).map(o+a),null,gu(c,r-t.colCount(a)));else{const d=e.mapping.slice(s).map(o+a);e.delete(d,d+u.nodeSize)}i+=c.rowspan}}function $ke(e,t){if(!Yr(e))return!1;if(t){const n=ia(e),o=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let r=n.right-1;Ske(o,n,r),r!=n.left;r--){const s=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=Xt.get(s)}t(o)}return!0}function Eke(e,{map:t,table:n,tableStart:o},r){let s=0;for(let u=0;u<r;u++)s+=n.child(u).nodeSize;const i=s+n.child(r).nodeSize,l=e.mapping.maps.length;e.delete(s+o,i+o);const a=new Set;for(let u=0,c=r*t.width;u<t.width;u++,c++){const d=t.map[c];if(!a.has(d)){if(a.add(d),r>0&&d==t.map[c-t.width]){const f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(l).map(d+o),null,{...f,rowspan:f.rowspan-1}),u+=f.colspan-1}else if(r<t.height&&d==t.map[c+t.width]){const f=n.nodeAt(d),p=f.attrs,h=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),m=t.positionAt(r+1,u,n);e.insert(e.mapping.slice(l).map(o+m),h),u+=p.colspan-1}}}}function xke(e,t){if(!Yr(e))return!1;if(t){const n=ia(e),o=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let r=n.bottom-1;Eke(o,n,r),r!=n.top;r--){const s=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=Xt.get(n.table)}t(o)}return!0}function Mke(e,t){return function(n,o){if(!Yr(n))return!1;const r=bv(n);if(r.nodeAfter.attrs[e]===t)return!1;if(o){const s=n.tr;n.selection instanceof hn?n.selection.forEachCell((i,l)=>{i.attrs[e]!==t&&s.setNodeMarkup(l,null,{...i.attrs,[e]:t})}):s.setNodeMarkup(r.pos,null,{...r.nodeAfter.attrs,[e]:t}),o(s)}return!0}}function Tke(e){return function(t,n){if(!Yr(t))return!1;if(n){const o=Wr(t.schema),r=ia(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 A9(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 hk(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?Tke(e):function(n,o){if(!Yr(n))return!1;if(o){const r=Wr(n.schema),s=ia(n),i=n.tr,l=A9("row",s,r),a=A9("column",s,r),c=(e==="column"?l:e==="row"?a:!1)?1:0,d=e=="column"?{left:0,top:c,right:1,bottom:s.map.height}:e=="row"?{left:c,top:0,right:s.map.width,bottom:1}:s,f=e=="column"?a?r.cell:r.header_cell:e=="row"?l?r.cell:r.header_cell:r.cell;s.map.cellsInRect(d).forEach(p=>{const h=p+s.tableStart,m=i.doc.nodeAt(h);m&&i.setNodeMarkup(h,f,m.attrs)}),o(i)}return!0}}hk("row",{useDeprecatedLogic:!0});hk("column",{useDeprecatedLogic:!0});hk("cell",{useDeprecatedLogic:!0});function Oke(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 QN(e){return function(t,n){if(!Yr(t))return!1;const o=Oke(bv(t),e);if(o==null)return!1;if(n){const r=t.doc.resolve(o);n(t.tr.setSelection(ht.between(r,dke(r))).scrollIntoView())}return!0}}function Ike(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 $m(e,t){const n=e.selection;if(!(n instanceof hn))return!1;if(t){const o=e.tr,r=Wr(e.schema).cell.createAndFill().content;n.forEachCell((s,i)=>{s.content.eq(r)||o.replace(o.mapping.map(i+1),o.mapping.map(i+s.nodeSize-1),new Ye(r,0,0))}),o.docChanged&&t(o)}return!0}function Ake(e){if(!e.size)return null;let{content:t,openStart:n,openEnd:o}=e;for(;t.childCount==1&&(n>0&&o>0||t.child(0).type.spec.tableRole=="table");)n--,o--,t=t.child(0).content;const r=t.child(0),s=r.type.spec.tableRole,i=r.type.schema,l=[];if(s=="row")for(let a=0;a<t.childCount;a++){let u=t.child(a).content;const c=a?0:Math.max(0,n-1),d=a<t.childCount-1?0:Math.max(0,o-1);(c||d)&&(u=_2(Wr(i).row,new Ye(u,c,d)).content),l.push(u)}else if(s=="cell"||s=="header_cell")l.push(n||o?_2(Wr(i).row,new Ye(t,n,o)).content:t);else return null;return Nke(i,l)}function Nke(e,t){const n=[];for(let r=0;r<t.length;r++){const s=t[r];for(let i=s.childCount-1;i>=0;i--){const{rowspan:l,colspan:a}=s.child(i).attrs;for(let u=r;u<r+l;u++)n[u]=(n[u]||0)+a}}let o=0;for(let r=0;r<n.length;r++)o=Math.max(o,n[r]);for(let r=0;r<n.length;r++)if(r>=t.length&&t.push(Ue.empty),n[r]<o){const s=Wr(e).cell.createAndFill(),i=[];for(let l=n[r];l<o;l++)i.push(s);t[r]=t[r].append(Ue.from(i))}return{height:t.length,width:o,rows:t}}function _2(e,t){const n=e.createAndFill();return new mA(n).replace(0,n.content.size,t).doc}function Pke({width:e,height:t,rows:n},o,r){if(e!=o){const s=[],i=[];for(let l=0;l<n.length;l++){const a=n[l],u=[];for(let c=s[l]||0,d=0;c<o;d++){let f=a.child(d%a.childCount);c+f.attrs.colspan>o&&(f=f.type.createChecked(gu(f.attrs,f.attrs.colspan,c+f.attrs.colspan-o),f.content)),u.push(f),c+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)s[l+p]=(s[l+p]||0)+f.attrs.colspan}i.push(Ue.from(u))}n=i,e=o}if(t!=r){const s=[];for(let i=0,l=0;i<r;i++,l++){const a=[],u=n[l%t];for(let c=0;c<u.childCount;c++){let d=u.child(c);i+d.attrs.rowspan>r&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,r-d.attrs.rowspan)},d.content)),a.push(d)}s.push(Ue.from(a))}n=s,t=r}return{width:e,height:t,rows:n}}function Lke(e,t,n,o,r,s,i){const l=e.doc.type.schema,a=Wr(l);let u,c;if(r>t.width)for(let d=0,f=0;d<t.height;d++){const p=n.child(d);f+=p.nodeSize;const h=[];let m;p.lastChild==null||p.lastChild.type==a.cell?m=u||(u=a.cell.createAndFill()):m=c||(c=a.header_cell.createAndFill());for(let y=t.width;y<r;y++)h.push(m);e.insert(e.mapping.slice(i).map(f-1+o),h)}if(s>t.height){const d=[];for(let h=0,m=(t.height-1)*t.width;h<Math.max(t.width,r);h++){const y=h>=t.width?!1:n.nodeAt(t.map[m+h]).type==a.header_cell;d.push(y?c||(c=a.header_cell.createAndFill()):u||(u=a.cell.createAndFill()))}const f=a.row.create(null,Ue.from(d)),p=[];for(let h=t.height;h<s;h++)p.push(f);e.insert(e.mapping.slice(i).map(o+n.nodeSize-2),p)}return!!(u||c)}function N9(e,t,n,o,r,s,i,l){if(i==0||i==t.height)return!1;let a=!1;for(let u=r;u<s;u++){const c=i*t.width+u,d=t.map[c];if(t.map[c-t.width]==d){a=!0;const f=n.nodeAt(d),{top:p,left:h}=t.findCell(d);e.setNodeMarkup(e.mapping.slice(l).map(d+o),null,{...f.attrs,rowspan:i-p}),e.insert(e.mapping.slice(l).map(t.positionAt(i,h,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-i})),u+=f.attrs.colspan-1}}return a}function P9(e,t,n,o,r,s,i,l){if(i==0||i==t.width)return!1;let a=!1;for(let u=r;u<s;u++){const c=u*t.width+i,d=t.map[c];if(t.map[c-1]==d){a=!0;const f=n.nodeAt(d),p=t.colCount(d),h=e.mapping.slice(l).map(d+o);e.setNodeMarkup(h,null,gu(f.attrs,i-p,f.attrs.colspan-(i-p))),e.insert(h+f.nodeSize,f.type.createAndFill(gu(f.attrs,0,i-p))),u+=f.attrs.rowspan-1}}return a}function L9(e,t,n,o,r){let s=n?e.doc.nodeAt(n-1):e.doc;if(!s)throw new Error("No table found");let i=Xt.get(s);const{top:l,left:a}=o,u=a+r.width,c=l+r.height,d=e.tr;let f=0;function p(){if(s=n?d.doc.nodeAt(n-1):d.doc,!s)throw new Error("No table found");i=Xt.get(s),f=d.mapping.maps.length}Lke(d,i,s,n,u,c,f)&&p(),N9(d,i,s,n,a,u,l,f)&&p(),N9(d,i,s,n,a,u,c,f)&&p(),P9(d,i,s,n,l,c,a,f)&&p(),P9(d,i,s,n,l,c,u,f)&&p();for(let h=l;h<c;h++){const m=i.positionAt(h,a,s),y=i.positionAt(h,u,s);d.replace(d.mapping.slice(f).map(m+n),d.mapping.slice(f).map(y+n),new Ye(r.rows[h-l],0,0))}p(),d.setSelection(new hn(d.doc.resolve(n+i.positionAt(l,a,s)),d.doc.resolve(n+i.positionAt(c-1,u-1,s)))),t(d)}var Rke=AA({ArrowLeft:Em("horiz",-1),ArrowRight:Em("horiz",1),ArrowUp:Em("vert",-1),ArrowDown:Em("vert",1),"Shift-ArrowLeft":xm("horiz",-1),"Shift-ArrowRight":xm("horiz",1),"Shift-ArrowUp":xm("vert",-1),"Shift-ArrowDown":xm("vert",1),Backspace:$m,"Mod-Backspace":$m,Delete:$m,"Mod-Delete":$m});function R1(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function Em(e,t){return(n,o,r)=>{if(!r)return!1;const s=n.selection;if(s instanceof hn)return R1(n,o,bt.near(s.$headCell,t));if(e!="horiz"&&!s.empty)return!1;const i=eP(r,e,t);if(i==null)return!1;if(e=="horiz")return R1(n,o,bt.near(n.doc.resolve(s.head+t),t));{const l=n.doc.resolve(i),a=YN(l,e,t);let u;return a?u=bt.near(a,1):t<0?u=bt.near(n.doc.resolve(l.before(-1)),-1):u=bt.near(n.doc.resolve(l.after(-1)),1),R1(n,o,u)}}}function xm(e,t){return(n,o,r)=>{if(!r)return!1;const s=n.selection;let i;if(s instanceof hn)i=s;else{const a=eP(r,e,t);if(a==null)return!1;i=new hn(n.doc.resolve(a))}const l=YN(i.$headCell,e,t);return l?R1(n,o,new hn(i.$anchorCell,l)):!1}}function Dke(e,t){const n=e.state.doc,o=Ph(n.resolve(t));return o?(e.dispatch(e.state.tr.setSelection(new hn(o))),!0):!1}function Fke(e,t,n){if(!Yr(e.state))return!1;let o=Ake(n);const r=e.state.selection;if(r instanceof hn){o||(o={width:1,height:1,rows:[Ue.from(_2(Wr(e.state.schema).cell,n))]});const s=r.$anchorCell.node(-1),i=r.$anchorCell.start(-1),l=Xt.get(s).rectBetween(r.$anchorCell.pos-i,r.$headCell.pos-i);return o=Pke(o,l.right-l.left,l.bottom-l.top),L9(e.state,e.dispatch,i,l,o),!0}else if(o){const s=bv(e.state),i=s.start(-1);return L9(e.state,e.dispatch,i,Xt.get(s.node(-1)).findCell(s.pos-i),o),!0}else return!1}function Vke(e,t){var n;if(t.ctrlKey||t.metaKey)return;const o=R9(e,t.target);let r;if(t.shiftKey&&e.state.selection instanceof hn)s(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&o&&(r=Ph(e.state.selection.$anchor))!=null&&((n=qy(e,t))==null?void 0:n.pos)!=r.pos)s(r,t),t.preventDefault();else if(!o)return;function s(a,u){let c=qy(e,u);const d=$l.getState(e.state)==null;if(!c||!pk(a,c))if(d)c=a;else return;const f=new hn(a,c);if(d||!e.state.selection.eq(f)){const p=e.state.tr.setSelection(f);d&&p.setMeta($l,a.pos),e.dispatch(p)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",l),$l.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta($l,-1))}function l(a){const u=a,c=$l.getState(e.state);let d;if(c!=null)d=e.state.doc.resolve(c);else if(R9(e,u.target)!=o&&(d=qy(e,t),!d))return i();d&&s(d,u)}e.root.addEventListener("mouseup",i),e.root.addEventListener("dragstart",i),e.root.addEventListener("mousemove",l)}function eP(e,t,n){if(!(e.state.selection instanceof ht))return null;const{$head:o}=e.state.selection;for(let r=o.depth-1;r>=0;r--){const s=o.node(r);if((n<0?o.index(r):o.indexAfter(r))!=(n<0?0:s.childCount))return null;if(s.type.spec.tableRole=="cell"||s.type.spec.tableRole=="header_cell"){const l=o.before(r),a=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(a)?l:null}}return null}function R9(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function qy(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?Ph(e.state.doc.resolve(n.pos)):null}var Bke=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")),b2(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,b2(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function b2(e,t,n,o,r,s){var i;let l=0,a=!0,u=t.firstChild;const c=e.firstChild;if(c){for(let d=0,f=0;d<c.childCount;d++){const{colspan:p,colwidth:h}=c.child(d).attrs;for(let m=0;m<p;m++,f++){const y=r==f?s:h&&h[m],v=y?y+"px":"";l+=y||o,y||(a=!1),u?(u.style.width!=v&&(u.style.width=v),u=u.nextSibling):t.appendChild(document.createElement("col")).style.width=v}}for(;u;){const d=u.nextSibling;(i=u.parentNode)==null||i.removeChild(u),u=d}a?(n.style.width=l+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=l+"px")}}var Or=new wn("tableColumnResizing");function zke({handleWidth:e=5,cellMinWidth:t=25,View:n=Bke,lastColumnResizable:o=!0}={}){const r=new xn({key:Or,state:{init(s,i){var l,a;const u=(a=(l=r.spec)==null?void 0:l.props)==null?void 0:a.nodeViews,c=Wr(i.schema).table.name;return n&&u&&(u[c]=(d,f)=>new n(d,t,f)),new jke(-1,!1)},apply(s,i){return i.apply(s)}},props:{attributes:s=>{const i=Or.getState(s);return i&&i.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,i)=>{Hke(s,i,e,t,o)},mouseleave:s=>{Uke(s)},mousedown:(s,i)=>{Wke(s,i,t)}},decorations:s=>{const i=Or.getState(s);if(i&&i.activeHandle>-1)return Jke(s,i.activeHandle)},nodeViews:{}}});return r}var jke=class D1{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=this,o=t.getMeta(Or);if(o&&o.setHandle!=null)return new D1(o.setHandle,!1);if(o&&o.setDragging!==void 0)return new D1(n.activeHandle,o.setDragging);if(n.activeHandle>-1&&t.docChanged){let r=t.mapping.map(n.activeHandle,-1);return y2(t.doc.resolve(r))||(r=-1),new D1(r,n.dragging)}return n}};function Hke(e,t,n,o,r){const s=Or.getState(e.state);if(s&&!s.dragging){const i=qke(t.target);let l=-1;if(i){const{left:a,right:u}=i.getBoundingClientRect();t.clientX-a<=n?l=D9(e,t,"left",n):u-t.clientX<=n&&(l=D9(e,t,"right",n))}if(l!=s.activeHandle){if(!r&&l!==-1){const a=e.state.doc.resolve(l),u=a.node(-1),c=Xt.get(u),d=a.start(-1);if(c.colCount(a.pos-d)+a.nodeAfter.attrs.colspan-1==c.width-1)return}tP(e,l)}}}function Uke(e){const t=Or.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&tP(e,-1)}function Wke(e,t,n){var o;const r=(o=e.dom.ownerDocument.defaultView)!=null?o:window,s=Or.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const i=e.state.doc.nodeAt(s.activeHandle),l=Kke(e,s.activeHandle,i.attrs);e.dispatch(e.state.tr.setMeta(Or,{setDragging:{startX:t.clientX,startWidth:l}}));function a(c){r.removeEventListener("mouseup",a),r.removeEventListener("mousemove",u);const d=Or.getState(e.state);d!=null&&d.dragging&&(Gke(e,d.activeHandle,F9(d.dragging,c,n)),e.dispatch(e.state.tr.setMeta(Or,{setDragging:null})))}function u(c){if(!c.which)return a(c);const d=Or.getState(e.state);if(d&&d.dragging){const f=F9(d.dragging,c,n);Yke(e,d.activeHandle,f,n)}}return r.addEventListener("mouseup",a),r.addEventListener("mousemove",u),t.preventDefault(),!0}function Kke(e,t,{colspan:n,colwidth:o}){const r=o&&o[o.length-1];if(r)return r;const s=e.domAtPos(t);let l=s.node.childNodes[s.offset].offsetWidth,a=n;if(o)for(let u=0;u<n;u++)o[u]&&(l-=o[u],a--);return l/a}function qke(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function D9(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=Ph(e.state.doc.resolve(i));if(!l)return-1;if(n=="right")return l.pos;const a=Xt.get(l.node(-1)),u=l.start(-1),c=a.map.indexOf(l.pos-u);return c%a.width==0?-1:u+a.map[c-1]}function F9(e,t,n){const o=t.clientX-e.startX;return Math.max(n,e.startWidth+o)}function tP(e,t){e.dispatch(e.state.tr.setMeta(Or,{setHandle:t}))}function Gke(e,t,n){const o=e.state.doc.resolve(t),r=o.node(-1),s=Xt.get(r),i=o.start(-1),l=s.colCount(o.pos-i)+o.nodeAfter.attrs.colspan-1,a=e.state.tr;for(let u=0;u<s.height;u++){const c=u*s.width+l;if(u&&s.map[c]==s.map[c-s.width])continue;const d=s.map[c],f=r.nodeAt(d).attrs,p=f.colspan==1?0:l-s.colCount(d);if(f.colwidth&&f.colwidth[p]==n)continue;const h=f.colwidth?f.colwidth.slice():Zke(f.colspan);h[p]=n,a.setNodeMarkup(i+d,null,{...f,colwidth:h})}a.docChanged&&e.dispatch(a)}function Yke(e,t,n,o){const r=e.state.doc.resolve(t),s=r.node(-1),i=r.start(-1),l=Xt.get(s).colCount(r.pos-i)+r.nodeAfter.attrs.colspan-1;let a=e.domAtPos(r.start(-1)).node;for(;a&&a.nodeName!="TABLE";)a=a.parentNode;a&&b2(s,a.firstChild,a,o,l,n)}function Zke(e){return Array(e).fill(0)}function Jke(e,t){const n=[],o=e.doc.resolve(t),r=o.node(-1);if(!r)return an.empty;const s=Xt.get(r),i=o.start(-1),l=s.colCount(o.pos-i)+o.nodeAfter.attrs.colspan-1;for(let a=0;a<s.height;a++){const u=l+a*s.width;if((l==s.width-1||s.map[u]!=s.map[u+1])&&(a==0||s.map[u]!=s.map[u-s.width])){const c=s.map[u],d=i+c+r.nodeAt(c).nodeSize-1,f=document.createElement("div");f.className="column-resize-handle",n.push(zn.widget(d,f))}}return an.create(e.doc,n)}function Xke({allowTableNodeSelection:e=!1}={}){return new xn({key:$l,state:{init(){return null},apply(t,n){const o=t.getMeta($l);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:mke,handleDOMEvents:{mousedown:Vke},createSelectionBetween(t){return $l.getState(t.state)!=null?t.state.selection:null},handleTripleClick:Dke,handleKeyDown:Rke,handlePaste:Fke},appendTransaction(t,n,o){return yke(o,bke(o,n),e)}})}var n0=typeof navigator<"u"?navigator:null,mk=n0&&n0.userAgent||"",Qke=/Edge\/(\d+)/.exec(mk),e4e=/MSIE \d/.exec(mk),t4e=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(mk),n4e=!!(e4e||t4e||Qke),o4e=!n4e&&!!n0&&/Apple Computer/.test(n0.vendor),nP=new wn("safari-ime-span"),w2=!1,r4e={key:nP,props:{decorations:s4e,handleDOMEvents:{compositionstart:()=>{w2=!0},compositionend:()=>{w2=!1}}}};function s4e(e){const{$from:t,$to:n,to:o}=e.selection;if(w2&&t.sameParent(n)){const r=zn.widget(o,i4e,{ignoreSelection:!0,key:"safari-ime-span"});return an.create(e.doc,[r])}}function i4e(e){const t=e.dom.ownerDocument.createElement("span");return t.className="ProseMirror-safari-ime-span",t}var l4e=new xn(o4e?r4e:{key:nP});function V9(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 a4e(e,t,n){const r=nv((n||{}).ignore||[]),s=u4e(t);let i=-1;for(;++i<s.length;)HI(e,"text",l);function l(u,c){let d=-1,f;for(;++d<c.length;){const p=c[d],h=f?f.children:void 0;if(r(p,h?h.indexOf(p):void 0,f))return;f=p}if(f)return a(u,c)}function a(u,c){const d=c[c.length-1],f=s[i][0],p=s[i][1];let h=0;const y=d.children.indexOf(u);let v=!1,w=[];f.lastIndex=0;let _=f.exec(u.value);for(;_;){const S=_.index,x={index:_.index,input:_.input,stack:[...c,u]};let E=p(..._,x);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?f.lastIndex=S+1:(h!==S&&w.push({type:"text",value:u.value.slice(h,S)}),Array.isArray(E)?w.push(...E):E&&w.push(E),h=S+_[0].length,v=!0),!f.global)break;_=f.exec(u.value)}return v?(h<u.value.length&&w.push({type:"text",value:u.value.slice(h)}),d.children.splice(y,1,...w)):w=[u],y+w.length}}function u4e(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([c4e(r[0]),d4e(r[1])])}return t}function c4e(e){return typeof e=="string"?new RegExp(mv(e),"g"):e}function d4e(e){return typeof e=="function"?e:function(){return e}}const Gy="phrasing",Yy=["autolink","link","image","label"];function f4e(){return{transforms:[_4e],enter:{literalAutolink:h4e,literalAutolinkEmail:Zy,literalAutolinkHttp:Zy,literalAutolinkWww:Zy},exit:{literalAutolink:y4e,literalAutolinkEmail:v4e,literalAutolinkHttp:m4e,literalAutolinkWww:g4e}}}function p4e(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Gy,notInConstruct:Yy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Gy,notInConstruct:Yy},{character:":",before:"[ps]",after:"\\/",inConstruct:Gy,notInConstruct:Yy}]}}function h4e(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Zy(e){this.config.enter.autolinkProtocol.call(this,e)}function m4e(e){this.config.exit.autolinkProtocol.call(this,e)}function g4e(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 v4e(e){this.config.exit.autolinkEmail.call(this,e)}function y4e(e){this.exit(e)}function _4e(e){a4e(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,b4e],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),w4e]],{ignore:["link","linkReference"]})}function b4e(e,t,n,o,r){let s="";if(!oP(r)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!C4e(n)))return!1;const i=k4e(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 w4e(e,t,n,o){return!oP(o,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function C4e(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 k4e(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=V9(e,"(");let s=V9(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 oP(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||pu(n)||ev(n))&&(!t||n!==47)}rP.peek=P4e;function S4e(){return{enter:{gfmFootnoteDefinition:E4e,gfmFootnoteDefinitionLabelString:x4e,gfmFootnoteCall:O4e,gfmFootnoteCallString:I4e},exit:{gfmFootnoteDefinition:T4e,gfmFootnoteDefinitionLabelString:M4e,gfmFootnoteCall:N4e,gfmFootnoteCallString:A4e}}}function $4e(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:L4e,footnoteReference:rP}}}function E4e(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function x4e(){this.buffer()}function M4e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=cs(this.sliceSerialize(e)).toLowerCase()}function T4e(e){this.exit(e)}function O4e(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function I4e(){this.buffer()}function A4e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=cs(this.sliceSerialize(e)).toLowerCase()}function N4e(e){this.exit(e)}function rP(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 P4e(){return"["}function L4e(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()),R4e)),i(),s}function R4e(e,t,n){return t===0?e:(n?"":" ")+e}const D4e=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];sP.peek=j4e;function F4e(){return{canContainEols:["delete"],enter:{strikethrough:B4e},exit:{strikethrough:z4e}}}function V4e(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:D4e}],handlers:{delete:sP}}}function B4e(e){this.enter({type:"delete",children:[]},e)}function z4e(e){this.exit(e)}function sP(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 j4e(){return"~"}function H4e(e,t={}){const n=(t.align||[]).concat(),o=t.stringLength||W4e,r=[],s=[],i=[],l=[];let a=0,u=-1;for(;++u<e.length;){const h=[],m=[];let y=-1;for(e[u].length>a&&(a=e[u].length);++y<e[u].length;){const v=U4e(e[u][y]);if(t.alignDelimiters!==!1){const w=o(v);m[y]=w,(l[y]===void 0||w>l[y])&&(l[y]=w)}h.push(v)}s[u]=h,i[u]=m}let c=-1;if(typeof n=="object"&&"length"in n)for(;++c<a;)r[c]=B9(n[c]);else{const h=B9(n);for(;++c<a;)r[c]=h}c=-1;const d=[],f=[];for(;++c<a;){const h=r[c];let m="",y="";h===99?(m=":",y=":"):h===108?m=":":h===114&&(y=":");let v=t.alignDelimiters===!1?1:Math.max(1,l[c]-m.length-y.length);const w=m+"-".repeat(v)+y;t.alignDelimiters!==!1&&(v=m.length+v+y.length,v>l[c]&&(l[c]=v),f[c]=v),d[c]=w}s.splice(1,0,d),i.splice(1,0,f),u=-1;const p=[];for(;++u<s.length;){const h=s[u],m=i[u];c=-1;const y=[];for(;++c<a;){const v=h[c]||"";let w="",_="";if(t.alignDelimiters!==!1){const S=l[c]-(m[c]||0),x=r[c];x===114?w=" ".repeat(S):x===99?S%2?(w=" ".repeat(S/2+.5),_=" ".repeat(S/2-.5)):(w=" ".repeat(S/2),_=w):_=" ".repeat(S)}t.delimiterStart!==!1&&!c&&y.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&v==="")&&(t.delimiterStart!==!1||c)&&y.push(" "),t.alignDelimiters!==!1&&y.push(w),y.push(v),t.alignDelimiters!==!1&&y.push(_),t.padding!==!1&&y.push(" "),(t.delimiterEnd!==!1||c!==a-1)&&y.push("|")}p.push(t.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return p.join(`
121 -`)}function U4e(e){return e==null?"":String(e)}function W4e(e){return e.length}function B9(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 K4e(){return{enter:{table:q4e,tableData:z9,tableHeader:z9,tableRow:Y4e},exit:{codeText:Z4e,table:G4e,tableData:Jy,tableHeader:Jy,tableRow:Jy}}}function q4e(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 G4e(e){this.exit(e),this.data.inTable=void 0}function Y4e(e){this.enter({type:"tableRow",children:[]},e)}function Jy(e){this.exit(e)}function z9(e){this.enter({type:"tableCell",children:[]},e)}function Z4e(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,J4e));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function J4e(e,t){return t==="|"?t:e}function X4e(e){const t=e||{},n=t.tableCellPadding,o=t.tablePipeAlign,r=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
122 -`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:i,tableCell:a,tableRow:l}};function i(p,h,m,y){return u(c(p,m,y),p.align)}function l(p,h,m,y){const v=d(p,m,y),w=u([v]);return w.slice(0,w.indexOf(`
123 -`))}function a(p,h,m,y){const v=m.enter("tableCell"),w=m.enter("phrasing"),_=m.containerPhrasing(p,{...y,before:s,after:s});return w(),v(),_}function u(p,h){return H4e(p,{align:h,alignDelimiters:o,padding:n,stringLength:r})}function c(p,h,m){const y=p.children;let v=-1;const w=[],_=h.enter("table");for(;++v<y.length;)w[v]=d(y[v],h,m);return _(),w}function d(p,h,m){const y=p.children;let v=-1;const w=[],_=h.enter("tableRow");for(;++v<y.length;)w[v]=a(y[v],p,h,m);return _(),w}function f(p,h,m){let y=oC.inlineCode(p,h,m);return m.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function Q4e(){return{exit:{taskListCheckValueChecked:j9,taskListCheckValueUnchecked:j9,paragraph:t6e}}}function e6e(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:n6e}}}function j9(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function t6e(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 n6e(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=oC.listItem(e,t,n,{...o,...l.current()});return s&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),a;function u(c){return c+i}}function o6e(){return[f4e(),S4e(),F4e(),K4e(),Q4e()]}function r6e(e){return{extensions:[p4e(),$4e(),V4e(),X4e(e),e6e()]}}const s6e={tokenize:d6e,partial:!0},iP={tokenize:f6e,partial:!0},lP={tokenize:p6e,partial:!0},aP={tokenize:h6e,partial:!0},i6e={tokenize:m6e,partial:!0},uP={name:"wwwAutolink",tokenize:u6e,previous:dP},cP={name:"protocolAutolink",tokenize:c6e,previous:fP},Hi={name:"emailAutolink",tokenize:a6e,previous:pP},li={};function l6e(){return{text:li}}let pa=48;for(;pa<123;)li[pa]=Hi,pa++,pa===58?pa=65:pa===91&&(pa=97);li[43]=Hi;li[45]=Hi;li[46]=Hi;li[95]=Hi;li[72]=[Hi,cP];li[104]=[Hi,cP];li[87]=[Hi,uP];li[119]=[Hi,uP];function a6e(e,t,n){const o=this;let r,s;return i;function i(d){return!C2(d)||!pP.call(o,o.previous)||gk(o.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return C2(d)?(e.consume(d),l):d===64?(e.consume(d),a):n(d)}function a(d){return d===46?e.check(i6e,c,u)(d):d===45||d===95||Wo(d)?(s=!0,e.consume(d),a):c(d)}function u(d){return e.consume(d),r=!0,a}function c(d){return s&&r&&Eo(o.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function u6e(e,t,n){const o=this;return r;function r(i){return i!==87&&i!==119||!dP.call(o,o.previous)||gk(o.events)?n(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(s6e,e.attempt(iP,e.attempt(lP,s),n),n)(i))}function s(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}function c6e(e,t,n){const o=this;let r="",s=!1;return i;function i(d){return(d===72||d===104)&&fP.call(o,o.previous)&&!gk(o.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),r+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(Eo(d)&&r.length<5)return r+=String.fromCodePoint(d),e.consume(d),l;if(d===58){const f=r.toLowerCase();if(f==="http"||f==="https")return e.consume(d),a}return n(d)}function a(d){return d===47?(e.consume(d),s?u:(s=!0,a)):n(d)}function u(d){return d===null||qg(d)||nn(d)||pu(d)||ev(d)?n(d):e.attempt(iP,e.attempt(lP,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function d6e(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 f6e(e,t,n){let o,r,s;return i;function i(u){return u===46||u===95?e.check(aP,a,l)(u):u===null||nn(u)||pu(u)||u!==45&&ev(u)?a(u):(s=!0,e.consume(u),i)}function l(u){return u===95?o=!0:(r=o,o=void 0),e.consume(u),i}function a(u){return r||o||!s?n(u):t(u)}}function p6e(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(aP,t,s)(i):i===null||nn(i)||pu(i)?t(i):(e.consume(i),r)}function s(i){return i===41&&o++,e.consume(i),r}}function h6e(e,t,n){return o;function o(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),o):l===38?(e.consume(l),s):l===93?(e.consume(l),r):l===60||l===null||nn(l)||pu(l)?t(l):n(l)}function r(l){return l===null||l===40||l===91||nn(l)||pu(l)?t(l):o(l)}function s(l){return Eo(l)?i(l):n(l)}function i(l){return l===59?(e.consume(l),o):Eo(l)?(e.consume(l),i):n(l)}}function m6e(e,t,n){return o;function o(s){return e.consume(s),r}function r(s){return Wo(s)?n(s):t(s)}}function dP(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||nn(e)}function fP(e){return!Eo(e)}function pP(e){return!(e===47||C2(e))}function C2(e){return e===43||e===45||e===46||e===95||Wo(e)}function gk(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 g6e={tokenize:S6e,partial:!0};function v6e(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:w6e,continuation:{tokenize:C6e},exit:k6e}},text:{91:{name:"gfmFootnoteCall",tokenize:b6e},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:y6e,resolveTo:_6e}}}}function y6e(e,t,n){const o=this;let r=o.events.length;const s=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let i;for(;r--;){const a=o.events[r][1];if(a.type==="labelImage"){i=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return l;function l(a){if(!i||!i._balanced)return n(a);const u=cs(o.sliceSerialize({start:i.end,end:o.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function _6e(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 b6e(e,t,n){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let s=0,i;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),a}function a(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(s>999||d===93&&!i||d===null||d===91||nn(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return r.includes(cs(o.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return nn(d)||(i=!0),s++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),s++,u):u(d)}}function w6e(e,t,n){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let s,i=0,l;return a;function a(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(h)}function c(h){if(i>999||h===93&&!l||h===null||h===91||nn(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return s=cs(o.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return nn(h)||(l=!0),i++,e.consume(h),h===92?d:c}function d(h){return h===91||h===92||h===93?(e.consume(h),i++,c):c(h)}function f(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),r.includes(s)||r.push(s),Vt(e,p,"gfmFootnoteDefinitionWhitespace")):n(h)}function p(h){return t(h)}}function C6e(e,t,n){return e.check($h,t,e.attempt(g6e,t,n))}function k6e(e){e.exit("gfmFootnoteDefinition")}function S6e(e,t,n){const o=this;return Vt(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 $6e(e){let n=(e||{}).singleTilde;const o={name:"strikethrough",tokenize:s,resolveAll:r};return n==null&&(n=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function r(i,l){let a=-1;for(;++a<i.length;)if(i[a][0]==="enter"&&i[a][1].type==="strikethroughSequenceTemporary"&&i[a][1]._close){let u=a;for(;u--;)if(i[u][0]==="exit"&&i[u][1].type==="strikethroughSequenceTemporary"&&i[u][1]._open&&i[a][1].end.offset-i[a][1].start.offset===i[u][1].end.offset-i[u][1].start.offset){i[a][1].type="strikethroughSequence",i[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},i[u][1].start),end:Object.assign({},i[a][1].end)},d={type:"strikethroughText",start:Object.assign({},i[u][1].end),end:Object.assign({},i[a][1].start)},f=[["enter",c,l],["enter",i[u][1],l],["exit",i[u][1],l],["enter",d,l]],p=l.parser.constructs.insideSpan.null;p&&Rr(f,f.length,0,tv(p,i.slice(u+1,a),l)),Rr(f,f.length,0,[["exit",d,l],["enter",i[a][1],l],["exit",i[a][1],l],["exit",c,l]]),Rr(i,u-1,a-u+3,f),a=u+f.length-2;break}}for(a=-1;++a<i.length;)i[a][1].type==="strikethroughSequenceTemporary"&&(i[a][1].type="data");return i}function s(i,l,a){const u=this.previous,c=this.events;let d=0;return f;function f(h){return u===126&&c[c.length-1][1].type!=="characterEscape"?a(h):(i.enter("strikethroughSequenceTemporary"),p(h))}function p(h){const m=Gg(u);if(h===126)return d>1?a(h):(i.consume(h),d++,p);if(d<2&&!n)return a(h);const y=i.exit("strikethroughSequenceTemporary"),v=Gg(h);return y._open=!v||v===2&&!!m,y._close=!m||m===2&&!!v,l(h)}}}class E6e{constructor(){this.map=[]}add(t,n,o){x6e(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 x6e(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 M6e(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 T6e(){return{flow:{null:{name:"table",tokenize:O6e,resolveAll:I6e}}}}function O6e(e,t,n){const o=this;let r=0,s=0,i;return l;function l(N){let F=o.events.length-1;for(;F>-1;){const Z=o.events[F][1].type;if(Z==="lineEnding"||Z==="linePrefix")F--;else break}const B=F>-1?o.events[F][1].type:null,Y=B==="tableHead"||B==="tableRow"?E:a;return Y===E&&o.parser.lazy[o.now().line]?n(N):Y(N)}function a(N){return e.enter("tableHead"),e.enter("tableRow"),u(N)}function u(N){return N===124||(i=!0,s+=1),c(N)}function c(N){return N===null?n(N):dt(N)?s>1?(s=0,o.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),p):n(N):Nt(N)?Vt(e,c,"whitespace")(N):(s+=1,i&&(i=!1,r+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),i=!0,c):(e.enter("data"),d(N)))}function d(N){return N===null||N===124||nn(N)?(e.exit("data"),c(N)):(e.consume(N),N===92?f:d)}function f(N){return N===92||N===124?(e.consume(N),d):d(N)}function p(N){return o.interrupt=!1,o.parser.lazy[o.now().line]?n(N):(e.enter("tableDelimiterRow"),i=!1,Nt(N)?Vt(e,h,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):h(N))}function h(N){return N===45||N===58?y(N):N===124?(i=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),m):x(N)}function m(N){return Nt(N)?Vt(e,y,"whitespace")(N):y(N)}function y(N){return N===58?(s+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),v):N===45?(s+=1,v(N)):N===null||dt(N)?S(N):x(N)}function v(N){return N===45?(e.enter("tableDelimiterFiller"),w(N)):x(N)}function w(N){return N===45?(e.consume(N),w):N===58?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),_):(e.exit("tableDelimiterFiller"),_(N))}function _(N){return Nt(N)?Vt(e,S,"whitespace")(N):S(N)}function S(N){return N===124?h(N):N===null||dt(N)?!i||r!==s?x(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):x(N)}function x(N){return n(N)}function E(N){return e.enter("tableRow"),T(N)}function T(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),T):N===null||dt(N)?(e.exit("tableRow"),t(N)):Nt(N)?Vt(e,T,"whitespace")(N):(e.enter("data"),O(N))}function O(N){return N===null||N===124||nn(N)?(e.exit("data"),T(N)):(e.consume(N),N===92?P:O)}function P(N){return N===92||N===124?(e.consume(N),O):O(N)}}function I6e(e,t){let n=-1,o=!0,r=0,s=[0,0,0,0],i=[0,0,0,0],l=!1,a=0,u,c,d;const f=new E6e;for(;++n<e.length;){const p=e[n],h=p[1];p[0]==="enter"?h.type==="tableHead"?(l=!1,a!==0&&(H9(f,t,a,u,c),c=void 0,a=0),u={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(n,0,[["enter",u,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(o=!0,d=void 0,s=[0,0,0,0],i=[0,n+1,0,0],l&&(l=!1,c={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(n,0,[["enter",c,t]])),r=h.type==="tableDelimiterRow"?2:c?3:1):r&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(o=!1,i[2]===0&&(s[1]!==0&&(i[0]=i[1],d=Mm(f,t,s,r,void 0,d),s=[0,0,0,0]),i[2]=n)):h.type==="tableCellDivider"&&(o?o=!1:(s[1]!==0&&(i[0]=i[1],d=Mm(f,t,s,r,void 0,d)),s=i,i=[s[1],n,0,0])):h.type==="tableHead"?(l=!0,a=n):h.type==="tableRow"||h.type==="tableDelimiterRow"?(a=n,s[1]!==0?(i[0]=i[1],d=Mm(f,t,s,r,n,d)):i[1]!==0&&(d=Mm(f,t,i,r,n,d)),r=0):r&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(i[3]=n)}for(a!==0&&H9(f,t,a,u,c),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=M6e(t.events,n))}return e}function Mm(e,t,n,o,r,s){const i=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(s.end=Object.assign({},sc(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const a=sc(t.events,n[1]);if(s={type:i,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const u=sc(t.events,n[2]),c=sc(t.events,n[3]),d={type:l,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),o!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const h=n[2]+1,m=n[3]-n[2]-1;e.add(h,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return r!==void 0&&(s.end=Object.assign({},sc(t.events,r)),e.add(r,0,[["exit",s,t]]),s=void 0),s}function H9(e,t,n,o,r){const s=[],i=sc(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 sc(e,t){const n=e[t],o=n[0]==="enter"?"start":"end";return n[1][o]}const A6e={name:"tasklistCheck",tokenize:P6e};function N6e(){return{text:{91:A6e}}}function P6e(e,t,n){const o=this;return r;function r(a){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),s)}function s(a){return nn(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),i):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),i):n(a)}function i(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(a)}function l(a){return dt(a)?t(a):Nt(a)?e.check({tokenize:L6e},t,n)(a):n(a)}}function L6e(e,t,n){return Vt(e,o,"whitespace");function o(r){return r===null?n(r):t(r)}}function R6e(e){return $I([l6e(),v6e(),$6e(e),T6e(),N6e()])}const D6e={};function F6e(e){const t=this,n=e||D6e,o=t.data(),r=o.micromarkExtensions||(o.micromarkExtensions=[]),s=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),i=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);r.push(R6e(n)),s.push(o6e()),i.push(r6e(n))}function gt(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-gfm",...t}}),e}const vk=Ah("strike_through");gt(vk,{displayName:"Attr<strikethrough>",group:"Strikethrough"});const Rd=Ih("strike_through",e=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:t=>t==="line-through"}],toDOM:t=>["del",e.get(vk.key)(t)],parseMarkdown:{match:t=>t.type==="delete",runner:(t,n,o)=>{t.openMark(o),t.next(n.children),t.closeMark(o)}},toMarkdown:{match:t=>t.type.name==="strike_through",runner:(t,n)=>{t.withMark(n,"delete")}}}));gt(Rd.mark,{displayName:"MarkSchema<strikethrough>",group:"Strikethrough"});gt(Rd.ctx,{displayName:"MarkSchemaCtx<strikethrough>",group:"Strikethrough"});const wv=Tt("ToggleStrikeThrough",e=>()=>cv(Rd.type(e)));gt(wv,{displayName:"Command<ToggleStrikethrough>",group:"Strikethrough"});const hP=er(e=>xh(/~([^~]+)~$/,Rd.type(e)));gt(hP,{displayName:"InputRule<strikethrough>",group:"Strikethrough"});const yk=tr("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:e=>{const t=e.get(Dt);return()=>t.call(wv.key)}}});gt(yk.ctx,{displayName:"KeymapCtx<strikethrough>",group:"Strikethrough"});gt(yk.shortcuts,{displayName:"Keymap<strikethrough>",group:"Strikethrough"});const Lh=uke({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:e=>e.style.textAlign||"left",setDOMAttr:(e,t)=>{t.style=`text-align: ${e||"left"}`}}}}),Dd=Yn("table",()=>({...Lh.table,content:"table_header_row table_row+",disableDropCursor:!0,parseMarkdown:{match:e=>e.type==="table",runner:(e,t,n)=>{const o=t.align,r=t.children.map((s,i)=>({...s,align:o,isHeader:i===0}));e.openNode(n),e.next(r),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table",runner:(e,t)=>{var n;const o=(n=t.content.firstChild)==null?void 0:n.content;if(!o)return;const r=[];o.forEach(s=>{r.push(s.attrs.alignment)}),e.openNode("table",void 0,{align:r}),e.next(t.content),e.closeNode()}}}));gt(Dd.node,{displayName:"NodeSchema<table>",group:"Table"});gt(Dd.ctx,{displayName:"NodeSchemaCtx<table>",group:"Table"});const Cv=Yn("table_header_row",()=>({...Lh.table_row,disableDropCursor:!0,content:"(table_header)*",parseDOM:[{tag:"tr[data-is-header]"}],toDOM(){return["tr",{"data-is-header":!0},0]},parseMarkdown:{match:e=>!!(e.type==="tableRow"&&e.isHeader),runner:(e,t,n)=>{const o=t.align,r=t.children.map((s,i)=>({...s,align:o[i],isHeader:t.isHeader}));e.openNode(n),e.next(r),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_header_row",runner:(e,t)=>{e.openNode("tableRow",void 0,{isHeader:!0}),e.next(t.content),e.closeNode()}}}));gt(Cv.node,{displayName:"NodeSchema<tableHeaderRow>",group:"Table"});gt(Cv.ctx,{displayName:"NodeSchemaCtx<tableHeaderRow>",group:"Table"});const Rh=Yn("table_row",()=>({...Lh.table_row,disableDropCursor:!0,content:"(table_cell)*",parseMarkdown:{match:e=>e.type==="tableRow",runner:(e,t,n)=>{const o=t.align,r=t.children.map((s,i)=>({...s,align:o[i]}));e.openNode(n),e.next(r),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_row",runner:(e,t)=>{e.openNode("tableRow"),e.next(t.content),e.closeNode()}}}));gt(Rh.node,{displayName:"NodeSchema<tableRow>",group:"Table"});gt(Rh.ctx,{displayName:"NodeSchemaCtx<tableRow>",group:"Table"});const Dh=Yn("table_cell",()=>({...Lh.table_cell,disableDropCursor:!0,parseMarkdown:{match:e=>e.type==="tableCell"&&!e.isHeader,runner:(e,t,n)=>{const o=t.align;e.openNode(n,{alignment:o}).openNode(e.schema.nodes.paragraph).next(t.children).closeNode().closeNode()}},toMarkdown:{match:e=>e.type.name==="table_cell",runner:(e,t)=>{e.openNode("tableCell").next(t.content).closeNode()}}}));gt(Dh.node,{displayName:"NodeSchema<tableCell>",group:"Table"});gt(Dh.ctx,{displayName:"NodeSchemaCtx<tableCell>",group:"Table"});const kv=Yn("table_header",()=>({...Lh.table_header,disableDropCursor:!0,parseMarkdown:{match:e=>e.type==="tableCell"&&!!e.isHeader,runner:(e,t,n)=>{const o=t.align;e.openNode(n,{alignment:o}),e.openNode(e.schema.nodes.paragraph),e.next(t.children),e.closeNode(),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_header",runner:(e,t)=>{e.openNode("tableCell"),e.next(t.content),e.closeNode()}}}));gt(kv.node,{displayName:"NodeSchema<tableHeader>",group:"Table"});gt(kv.ctx,{displayName:"NodeSchemaCtx<tableHeader>",group:"Table"});function mP(e,t=3,n=3){const o=Array(n).fill(0).map(()=>Dh.type(e).createAndFill()),r=Array(n).fill(0).map(()=>kv.type(e).createAndFill()),s=Array(t).fill(0).map((i,l)=>l===0?Cv.type(e).create(null,r):Rh.type(e).create(null,o));return Dd.type(e).create(null,s)}function Fh(e){return dC(t=>t.type.spec.tableRole==="table")(e)}function ic(e,t){const n=Fh(t.$from);if(!n)return;const o=Xt.get(n.node);if(!(e<0||e>=o.width))return o.cellsInRect({left:e,right:e+1,top:0,bottom:o.height}).map(r=>{const s=n.node.nodeAt(r);if(!s)return;const i=r+n.start;return{pos:i,start:i+1,node:s}}).filter(r=>r!=null)}function lc(e,t){const n=Fh(t.$from);if(!n)return;const o=Xt.get(n.node);if(!(e<0||e>=o.height))return o.cellsInRect({left:0,right:o.width,top:e,bottom:e+1}).map(r=>{const s=n.node.nodeAt(r);if(!s)return;const i=r+n.start;return{pos:i,start:i+1,node:s}}).filter(r=>r!=null)}function V6e(e){const t=Fh(e.$from);if(!t)return;const n=Xt.get(t.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map(o=>{const r=t.node.nodeAt(o),s=o+t.start;return{pos:s,start:s+1,node:r}})}function B6e(e){const t=V6e(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 uv(e.setSelection(new hn(r,n)))}}return e}function gP(e,t,{map:n,tableStart:o,table:r},s){const i=Array(s).fill(0).reduce((a,u,c)=>a+r.child(c).nodeSize,o),l=Array(n.width).fill(0).map((a,u)=>{const c=r.nodeAt(n.map[u]);return Dh.type(e).createAndFill({alignment:c==null?void 0:c.attrs.alignment})});return t.insert(i,Rh.type(e).create(null,l)),t}function vP(e){return(t,n)=>o=>{n=n??o.selection.from;const r=o.doc.resolve(n),s=dC(a=>a.type.name==="table")(r),i=s?{node:s.node,from:s.start}:void 0,l=e==="row";if(i){const a=Xt.get(i.node);if(t>=0&&t<(l?a.height:a.width)){const u=a.positionAt(l?t:a.height-1,l?a.width-1:t,i.node),c=o.doc.resolve(i.from+u),d=l?hn.rowSelection:hn.colSelection,f=a.positionAt(l?t:0,l?0:t,i.node),p=o.doc.resolve(i.from+f);return uv(o.setSelection(d(c,p)))}}return o}}const z6e=vP("row"),j6e=vP("col");function U9(e){return e[0].map((t,n)=>e.map(o=>o[n]))}function yP(e,t){const n=[],o=Xt.get(e);for(let r=0;r<o.height;r++){const s=e.child(r),i=[];for(let l=0;l<o.width;l++){if(!t[r][l])continue;const a=o.map[r*o.width+l],u=t[r][l],c=e.nodeAt(a).type.createChecked(Object.assign({},u.attrs),u.content,u.marks);i.push(c)}n.push(s.type.createChecked(s.attrs,i,s.marks))}return e.type.createChecked(e.attrs,n,e.marks)}function _P(e){const t=Xt.get(e),n=[];for(let o=0;o<t.height;o++){const r=[],s={};for(let i=0;i<t.width;i++){const l=t.map[o*t.width+i],a=e.nodeAt(l),u=t.findCell(l);if(s[l]||u.top!==o){r.push(null);continue}s[l]=!0,r.push(a)}n.push(r)}return n}function bP(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 H6e(e,t,n,o){let r=U9(_P(e.node));return r=bP(r,t,n,o),r=U9(r),yP(e.node,r)}function U6e(e,t,n,o){let r=_P(e.node);return r=bP(r,t,n,o),yP(e.node,r)}function W9(e,t){let n=e,o=e;for(let c=e;c>=0;c--){const d=ic(c,t.selection);d&&d.forEach(f=>{const p=f.node.attrs.colspan+c-1;p>=n&&(n=c),p>o&&(o=p)})}for(let c=e;c<=o;c++){const d=ic(c,t.selection);d&&d.forEach(f=>{const p=f.node.attrs.colspan+c-1;f.node.attrs.colspan>1&&p>o&&(o=p)})}const r=[];for(let c=n;c<=o;c++){const d=ic(c,t.selection);d&&d.length&&r.push(c)}n=r[0],o=r[r.length-1];const s=ic(n,t.selection),i=lc(0,t.selection),l=t.doc.resolve(s[s.length-1].pos);let a;for(let c=o;c>=n;c--){const d=ic(c,t.selection);if(d&&d.length){for(let f=i.length-1;f>=0;f--)if(i[f].pos===d[0].pos){a=d[0];break}if(a)break}}const u=t.doc.resolve(a.pos);return{$anchor:l,$head:u,indexes:r}}function K9(e,t){let n=e,o=e;for(let c=e;c>=0;c--)lc(c,t.selection).forEach(d=>{const f=d.node.attrs.rowspan+c-1;f>=n&&(n=c),f>o&&(o=f)});for(let c=e;c<=o;c++)lc(c,t.selection).forEach(d=>{const f=d.node.attrs.rowspan+c-1;d.node.attrs.rowspan>1&&f>o&&(o=f)});const r=[];for(let c=n;c<=o;c++){const d=lc(c,t.selection);d&&d.length&&r.push(c)}n=r[0],o=r[r.length-1];const s=lc(n,t.selection),i=ic(0,t.selection),l=t.doc.resolve(s[s.length-1].pos);let a;for(let c=o;c>=n;c--){const d=lc(c,t.selection);if(d&&d.length){for(let f=i.length-1;f>=0;f--)if(i[f].pos===d[0].pos){a=d[0];break}if(a)break}}const u=t.doc.resolve(a.pos);return{$anchor:l,$head:u,indexes:r}}function W6e(e){const{tr:t,origin:n,target:o,select:r=!0,pos:s}=e,i=s!=null?t.doc.resolve(s):t.selection.$from,l=Fh(i);if(!l)return t;const{indexes:a}=W9(n,t),{indexes:u}=W9(o,t);if(a.includes(o))return t;const c=H6e(l,a,u,0),d=uv(t).replaceWith(l.pos,l.pos+l.node.nodeSize,c);if(!r)return d;const f=Xt.get(c),p=l.start,h=o,m=f.positionAt(f.height-1,h,c),y=d.doc.resolve(p+m),v=hn.colSelection,w=f.positionAt(0,h,c),_=d.doc.resolve(p+w);return d.setSelection(v(y,_))}function K6e(e){const{tr:t,origin:n,target:o,select:r=!0,pos:s}=e,i=s!=null?t.doc.resolve(s):t.selection.$from,l=Fh(i);if(!l)return t;const{indexes:a}=K9(n,t),{indexes:u}=K9(o,t);if(a.includes(o))return t;const c=U6e(l,a,u,0),d=uv(t).replaceWith(l.pos,l.pos+l.node.nodeSize,c);if(!r)return d;const f=Xt.get(c),p=l.start,h=o,m=f.positionAt(h,f.width-1,c),y=d.doc.resolve(p+m),v=hn.rowSelection,w=f.positionAt(h,0,c),_=d.doc.resolve(p+w);return d.setSelection(v(y,_))}const _k=Tt("GoToPrevTableCell",()=>()=>QN(-1));gt(_k,{displayName:"Command<goToPrevTableCellCommand>",group:"Table"});const bk=Tt("GoToNextTableCell",()=>()=>QN(1));gt(bk,{displayName:"Command<goToNextTableCellCommand>",group:"Table"});const wk=Tt("ExitTable",e=>()=>(t,n)=>{if(!Yr(t))return!1;const{$head:o}=t.selection,r=swe(o,Dd.type(e));if(!r)return!1;const{to:s}=r,i=t.tr.replaceWith(s,s,ji.type(e).createAndFill());return i.setSelection(bt.near(i.doc.resolve(s),1)).scrollIntoView(),n==null||n(i),!0});gt(wk,{displayName:"Command<breakTableCommand>",group:"Table"});const wP=Tt("InsertTable",e=>({row:t,col:n}={})=>(o,r)=>{const{selection:s,tr:i}=o,{from:l}=s,a=mP(e,t,n),u=i.replaceSelectionWith(a),c=bt.findFrom(u.doc.resolve(l),1,!0);return c&&u.setSelection(c),r==null||r(u),!0});gt(wP,{displayName:"Command<insertTableCommand>",group:"Table"});const CP=Tt("MoveRow",()=>({from:e,to:t,pos:n}={})=>(o,r)=>{const{tr:s}=o;return!!(r!=null&&r(K6e({tr:s,origin:e??0,target:t??0,pos:n,select:!0})))});gt(CP,{displayName:"Command<moveRowCommand>",group:"Table"});const kP=Tt("MoveCol",()=>({from:e,to:t,pos:n}={})=>(o,r)=>{const{tr:s}=o;return!!(r!=null&&r(W6e({tr:s,origin:e??0,target:t??0,pos:n,select:!0})))});gt(kP,{displayName:"Command<moveColCommand>",group:"Table"});const SP=Tt("SelectRow",()=>(e={index:0})=>(t,n)=>{const{tr:o}=t;return!!(n!=null&&n(z6e(e.index,e.pos)(o)))});gt(SP,{displayName:"Command<selectRowCommand>",group:"Table"});const $P=Tt("SelectCol",()=>(e={index:0})=>(t,n)=>{const{tr:o}=t;return!!(n!=null&&n(j6e(e.index,e.pos)(o)))});gt($P,{displayName:"Command<selectColCommand>",group:"Table"});const EP=Tt("SelectTable",()=>()=>(e,t)=>{const{tr:n}=e;return!!(t!=null&&t(B6e(n)))});gt(EP,{displayName:"Command<selectTableCommand>",group:"Table"});const xP=Tt("DeleteSelectedCells",()=>()=>(e,t)=>{const{selection:n}=e;if(!(n instanceof hn))return!1;const o=n.isRowSelection(),r=n.isColSelection();return o&&r?Ike(e,t):r?$ke(e,t):xke(e,t)});gt(xP,{displayName:"Command<deleteSelectedCellsCommand>",group:"Table"});const MP=Tt("AddColBefore",()=>()=>Cke);gt(MP,{displayName:"Command<addColBeforeCommand>",group:"Table"});const TP=Tt("AddColAfter",()=>()=>kke);gt(TP,{displayName:"Command<addColAfterCommand>",group:"Table"});const OP=Tt("AddRowBefore",e=>()=>(t,n)=>{if(!Yr(t))return!1;if(n){const o=ia(t);n(gP(e,t.tr,o,o.top))}return!0});gt(OP,{displayName:"Command<addRowBeforeCommand>",group:"Table"});const IP=Tt("AddRowAfter",e=>()=>(t,n)=>{if(!Yr(t))return!1;if(n){const o=ia(t);n(gP(e,t.tr,o,o.bottom))}return!0});gt(IP,{displayName:"Command<addRowAfterCommand>",group:"Table"});const AP=Tt("SetAlign",()=>(e="left")=>Mke("alignment",e));gt(AP,{displayName:"Command<setAlignCommand>",group:"Table"});const NP=er(e=>new Cr(/^\|(?<col>\d+)[xX](?<row>\d+)\|\s$/,(t,n,o,r)=>{var s,i;const l=t.doc.resolve(o);if(!l.node(-1).canReplaceWith(l.index(-1),l.indexAfter(-1),Dd.type(e)))return null;const a=mP(e,Number((s=n.groups)==null?void 0:s.row),Number((i=n.groups)==null?void 0:i.col)),u=t.tr.replaceRangeWith(o,r,a);return u.setSelection(ht.create(u.doc,o+3)).scrollIntoView()}));gt(NP,{displayName:"InputRule<insertTableInputRule>",group:"Table"});const Ck=tr("tableKeymap",{NextCell:{shortcuts:["Mod-]","Tab"],command:e=>{const t=e.get(Dt);return()=>t.call(bk.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:e=>{const t=e.get(Dt);return()=>t.call(_k.key)}},ExitTable:{shortcuts:["Mod-Enter"],command:e=>{const t=e.get(Dt);return()=>t.call(wk.key)}}});gt(Ck.ctx,{displayName:"KeymapCtx<table>",group:"Table"});gt(Ck.shortcuts,{displayName:"Keymap<table>",group:"Table"});const Xy="footnote_definition",q9="footnoteDefinition",kk=Yn("footnote_definition",()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:""}},parseDOM:[{tag:`dl[data-type="${Xy}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw ii(e);return{label:e.dataset.label}},contentElement:"dd"}],toDOM:e=>{const t=e.attrs.label;return["dl",{"data-label":t,"data-type":Xy},["dt",t],["dd",0]]},parseMarkdown:{match:({type:e})=>e===q9,runner:(e,t,n)=>{e.openNode(n,{label:t.label}).next(t.children).closeNode()}},toMarkdown:{match:e=>e.type.name===Xy,runner:(e,t)=>{e.openNode(q9,void 0,{label:t.attrs.label,identifier:t.attrs.label}).next(t.content).closeNode()}}}));gt(kk.ctx,{displayName:"NodeSchemaCtx<footnodeDef>",group:"footnote"});gt(kk.node,{displayName:"NodeSchema<footnodeDef>",group:"footnote"});const Qy="footnote_reference",Sk=Yn("footnote_reference",()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:""}},parseDOM:[{tag:`sup[data-type="${Qy}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw ii(e);return{label:e.dataset.label}}}],toDOM:e=>{const t=e.attrs.label;return["sup",{"data-label":t,"data-type":Qy},t]},parseMarkdown:{match:({type:e})=>e==="footnoteReference",runner:(e,t,n)=>{e.addNode(n,{label:t.label})}},toMarkdown:{match:e=>e.type.name===Qy,runner:(e,t)=>{e.addNode("footnoteReference",void 0,void 0,{label:t.attrs.label,identifier:t.attrs.label})}}}));gt(Sk.ctx,{displayName:"NodeSchemaCtx<footnodeRef>",group:"footnote"});gt(Sk.node,{displayName:"NodeSchema<footnodeRef>",group:"footnote"});const PP=Qs.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 ii(o);return{label:o.dataset.label,listType:o.dataset.listType,spread:o.dataset.spread,checked:o.dataset.checked?o.dataset.checked==="true":null}}},...(n==null?void 0:n.parseDOM)||[]],toDOM:o=>n.toDOM&&o.attrs.checked==null?n.toDOM(o):["li",{"data-item-type":"task","data-label":o.attrs.label,"data-list-type":o.attrs.listType,"data-spread":o.attrs.spread,"data-checked":o.attrs.checked},0],parseMarkdown:{match:({type:o})=>o==="listItem",runner:(o,r,s)=>{if(r.checked==null){n.parseMarkdown.runner(o,r,s);return}const i=r.label!=null?`${r.label}.`:"•",l=r.checked!=null?!!r.checked:null,a=r.label!=null?"ordered":"bullet",u=r.spread!=null?`${r.spread}`:"true";o.openNode(s,{label:i,listType:a,spread:u,checked:l}),o.next(r.children),o.closeNode()}},toMarkdown:{match:o=>o.type.name==="list_item",runner:(o,r)=>{if(r.attrs.checked==null){n.toMarkdown.runner(o,r);return}const s=r.attrs.label,i=r.attrs.listType,l=r.attrs.spread==="true",a=r.attrs.checked;o.openNode("listItem",void 0,{label:s,listType:i,spread:l,checked:a}),o.next(r.content),o.closeNode()}}}});gt(PP,{displayName:"NodeSchema<listItem>",group:"ListItem"});const LP=er(()=>new Cr(/^\[(?<checked>\s|x)\]\s$/,(e,t,n,o)=>{var r;const s=e.doc.resolve(n);let i=0,l=s.node(i);for(;l&&l.type.name!=="list_item";)i--,l=s.node(i);if(!l||l.attrs.checked!=null)return null;const a=((r=t.groups)==null?void 0:r.checked)==="x",u=s.before(i),c=e.tr;return c.deleteRange(n,o).setNodeMarkup(u,void 0,{...l.attrs,checked:a}),c}));gt(LP,{displayName:"InputRule<wrapInTaskListInputRule>",group:"ListItem"});const q6e=[yk,Ck].flat(),G6e=[NP,LP],Y6e=[hP],RP=ao(()=>l4e);gt(RP,{displayName:"Prose<autoInsertSpanPlugin>",group:"Prose"});const Z6e=ao(()=>zke({}));gt(Z6e,{displayName:"Prose<columnResizingPlugin>",group:"Prose"});const DP=ao(()=>Xke({allowTableNodeSelection:!0}));gt(DP,{displayName:"Prose<tableEditingPlugin>",group:"Prose"});const $k=Id("remarkGFM",()=>F6e);gt($k.plugin,{displayName:"Remark<remarkGFMPlugin>",group:"Remark"});gt($k.options,{displayName:"RemarkConfig<remarkGFMPlugin>",group:"Remark"});const J6e=new wn("MILKDOWN_KEEP_TABLE_ALIGN_PLUGIN");function X6e(e,t){let n=0;return t.forEach((o,r,s)=>{o===e&&(n=s)}),n}const FP=ao(()=>new xn({key:J6e,appendTransaction:(e,t,n)=>{let o;const r=(s,i)=>{if(o||(o=n.tr),s.type.name!=="table_cell")return;const l=n.doc.resolve(i),a=l.node(l.depth),u=l.node(l.depth-1).firstChild;if(!u)return;const c=X6e(s,a),d=u.maybeChild(c);if(!d)return;const f=d.attrs.alignment,p=s.attrs.alignment;f!==p&&o.setNodeMarkup(i,void 0,{...s.attrs,alignment:f})};return t.doc!==n.doc&&n.doc.descendants(r),o}}));gt(FP,{displayName:"Prose<keepTableAlignPlugin>",group:"Prose"});const Q6e=[FP,RP,$k,DP].flat(),e5e=[PP,Dd,Cv,Rh,kv,Dh,kk,Sk,vk,Rd].flat(),t5e=[bk,_k,wk,wP,CP,kP,SP,$P,EP,xP,OP,IP,MP,TP,AP,wv],n5e=[e5e,G6e,Y6e,q6e,t5e,Q6e].flat();var o0=200,qn=function(){};qn.prototype.append=function(t){return t.length?(t=qn.from(t),!this.length&&t||t.length<o0&&this.leafAppend(t)||this.length<o0&&t.leafPrepend(this)||this.appendInner(t)):this};qn.prototype.prepend=function(t){return t.length?qn.from(t).append(this):this};qn.prototype.appendInner=function(t){return new o5e(this,t)};qn.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?qn.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};qn.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};qn.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)};qn.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};qn.from=function(t){return t instanceof qn?t:t&&t.length?new VP(t):qn.empty};var VP=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<=o0)return new t(this.values.concat(r.flatten()))},t.prototype.leafPrepend=function(r){if(this.length+r.length<=o0)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}(qn);qn.empty=new VP([]);var o5e=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}(qn);const r5e=500;class is{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}let r,s;n&&(r=this.remapping(o,this.items.length),s=r.maps.length);let i=t.tr,l,a,u=[],c=[];return this.items.forEach((d,f)=>{if(!d.step){r||(r=this.remapping(o,f+1),s=r.maps.length),s--,c.push(d);return}if(r){c.push(new Rs(d.map));let p=d.step.map(r.slice(s)),h;p&&i.maybeStep(p).doc&&(h=i.mapping.maps[i.mapping.maps.length-1],u.push(new Rs(h,void 0,void 0,u.length+c.length))),s--,h&&r.appendMap(h,s)}else i.maybeStep(d.step);if(d.selection)return l=r?d.selection.map(r.slice(s)):d.selection,a=new is(this.items.slice(0,o).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:i,selection:l}}addTransform(t,n,o,r){let s=[],i=this.eventCount,l=this.items,a=!r&&l.length?l.get(l.length-1):null;for(let c=0;c<t.steps.length;c++){let d=t.steps[c].invert(t.docs[c]),f=new Rs(t.mapping.maps[c],d,n),p;(p=a&&a.merge(f))&&(f=p,c?s.pop():l=l.slice(0,l.length-1)),s.push(f),n&&(i++,n=void 0),r||(a=f)}let u=i-o.depth;return u>i5e&&(l=s5e(l,u),i-=u),new is(l.append(s),i)}remapping(t,n){let o=new Ec;return this.items.forEach((r,s)=>{let i=r.mirrorOffset!=null&&s-r.mirrorOffset>=t?o.maps.length-r.mirrorOffset:void 0;o.appendMap(r.map,i)},t,n),o}addMaps(t){return this.eventCount==0?this:new is(this.items.append(t.map(n=>new Rs(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let o=[],r=Math.max(0,this.items.length-n),s=t.mapping,i=t.steps.length,l=this.eventCount;this.items.forEach(f=>{f.selection&&l--},r);let a=n;this.items.forEach(f=>{let p=s.getMirror(--a);if(p==null)return;i=Math.min(i,p);let h=s.maps[p];if(f.step){let m=t.steps[p].invert(t.docs[p]),y=f.selection&&f.selection.map(s.slice(a+1,p));y&&l++,o.push(new Rs(h,m,y))}else o.push(new Rs(h))},r);let u=[];for(let f=n;f<i;f++)u.push(new Rs(s.maps[f]));let c=this.items.slice(0,r).append(u).append(o),d=new is(c,l);return d.emptyItemCount()>r5e&&(d=d.compress(this.items.length-o.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),o=n.maps.length,r=[],s=0;return this.items.forEach((i,l)=>{if(l>=t)r.push(i),i.selection&&s++;else if(i.step){let a=i.step.map(n.slice(o)),u=a&&a.getMap();if(o--,u&&n.appendMap(u,o),a){let c=i.selection&&i.selection.map(n.slice(o));c&&s++;let d=new Rs(u.invert(),a,c),f,p=r.length-1;(f=r.length&&r[p].merge(d))?r[p]=f:r.push(d)}}else i.map&&o--},this.items.length,0),new is(qn.from(r.reverse()),s)}}is.empty=new is(qn.empty,0);function s5e(e,t){let n;return e.forEach((o,r)=>{if(o.selection&&t--==0)return n=r,!1}),e.slice(n)}class Rs{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 Rs(n.getMap().invert(),n,this.selection)}}}class wl{constructor(t,n,o,r,s){this.done=t,this.undone=n,this.prevRanges=o,this.prevTime=r,this.prevComposition=s}}const i5e=20;function l5e(e,t,n,o){let r=n.getMeta(Qa),s;if(r)return r.historyState;n.getMeta(c5e)&&(e=new wl(e.done,e.undone,null,0,-1));let i=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(i&&i.getMeta(Qa))return i.getMeta(Qa).redo?new wl(e.done.addTransform(n,void 0,o,F1(t)),e.undone,G9(n.mapping.maps),e.prevTime,e.prevComposition):new wl(e.done,e.undone.addTransform(n,void 0,o,F1(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||!a5e(n,e.prevRanges)),u=i?e_(e.prevRanges,n.mapping):G9(n.mapping.maps);return new wl(e.done.addTransform(n,a?t.selection.getBookmark():void 0,o,F1(t)),is.empty,u,n.time,l??e.prevComposition)}else return(s=n.getMeta("rebased"))?new wl(e.done.rebased(n,s),e.undone.rebased(n,s),e_(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new wl(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),e_(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function a5e(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 G9(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 e_(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 u5e(e,t,n){let o=F1(t),r=Qa.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 wl(n?l:s.remaining,n?s.remaining:l,null,0,-1);return s.transform.setSelection(i).setMeta(Qa,{redo:n,historyState:a})}let t_=!1,Y9=null;function F1(e){let t=e.plugins;if(Y9!=t){t_=!1,Y9=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){t_=!0;break}}return t_}const Qa=new wn("history"),c5e=new wn("closeHistory");function d5e(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new xn({key:Qa,state:{init(){return new wl(is.empty,is.empty,null,0,-1)},apply(t,n,o){return l5e(n,o,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let o=n.inputType,r=o=="historyUndo"?zP:o=="historyRedo"?jP:null;return r?(n.preventDefault(),r(t.state,t.dispatch)):!1}}}})}function BP(e,t){return(n,o)=>{let r=Qa.getState(n);if(!r||(e?r.undone:r.done).eventCount==0)return!1;if(o){let s=u5e(r,n,e);s&&o(t?s.scrollIntoView():s)}return!0}}const zP=BP(!1,!0),jP=BP(!0,!0);function Fd(e,t){return Object.assign(e,{meta:{package:"@milkdown/plugin-history",...t}}),e}const Ek=Tt("Undo",()=>()=>zP);Fd(Ek,{displayName:"Command<undo>"});const xk=Tt("Redo",()=>()=>jP);Fd(xk,{displayName:"Command<redo>"});const Mk=In({},"historyProviderConfig");Fd(Mk,{displayName:"Ctx<historyProviderConfig>"});const HP=ao(e=>d5e(e.get(Mk.key)));Fd(HP,{displayName:"Ctx<historyProviderPlugin>"});const Tk=tr("historyKeymap",{Undo:{shortcuts:"Mod-z",command:e=>{const t=e.get(Dt);return()=>t.call(Ek.key)}},Redo:{shortcuts:["Mod-y","Shift-Mod-z"],command:e=>{const t=e.get(Dt);return()=>t.call(xk.key)}}});Fd(Tk.ctx,{displayName:"KeymapCtx<history>"});Fd(Tk.shortcuts,{displayName:"Keymap<history>"});const f5e=[Mk,HP,Tk,Ek,xk].flat();function k2(e){if(!e)return!1;if(Array.isArray(e))return e.length>1?!1:k2(e[0]);const t=e.content;return t?k2(t):e.type==="text"}function p5e(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 UP=ao(e=>{const t=e.get(ds);e.update(lp,o=>({...o,editable:o.editable??(()=>!0)}));const n=new wn("MILKDOWN_CLIPBOARD");return new xn({key:n,props:{handlePaste:(o,r)=>{var s,i;const l=e.get(Ic),a=(i=(s=o.props).editable)==null?void 0:i.call(s,o.state),{clipboardData:u}=r;if(!a||!u||o.state.selection.$from.node().type.spec.code)return!1;const c=u.getData("text/plain"),d=u.getData("vscode-editor-data");if(d){const v=JSON.parse(d),w=v==null?void 0:v.mode;if(c&&w){const{tr:_}=o.state,S=iwe("code_block",t);return _.replaceSelectionWith(S.create({language:w})).setSelection(ht.near(_.doc.resolve(Math.max(0,_.selection.from-2)))).insertText(c.replace(/\r\n?/g,`
124 -`)),o.dispatch(_),!0}}const f=u.getData("text/html");if(f.length===0&&c.length===0)return!1;const p=fu.fromSchema(t);let h;if(f.length===0){const v=l(c);if(!v||typeof v=="string")return!1;h=ta.fromSchema(t).serializeFragment(v.content)}else{const v=document.createElement("template");v.innerHTML=f,h=v.content.cloneNode(!0),v.remove()}const m=p.parseSlice(h),y=p5e(m);return y?(o.dispatch(o.state.tr.replaceSelectionWith(y,!0)),!0):(o.dispatch(o.state.tr.replaceSelection(m)),!0)},clipboardTextSerializer:o=>{const r=e.get(Ac);if(k2(o.content.toJSON()))return o.content.textBetween(0,o.content.size,`
122 +`);return{dom:l,text:h,slice:e}}function ZB(t,e,n,i,s){let o=s.parent.type.spec.code,r,a;if(!n&&!e)return null;let l=e&&(i||o||!n);if(l){if(t.someProp("transformPastedText",h=>{e=h(e,o||i,t)}),o)return e?new rt(st.from(t.state.schema.text(e.replace(/\r\n?/g,`
123 +`))),0,0):rt.empty;let d=t.someProp("clipboardTextParser",h=>h(e,s,i,t));if(d)a=d;else{let h=s.marks(),{schema:f}=t.state,p=iu.fromSchema(f);r=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let b=r.appendChild(document.createElement("p"));m&&b.appendChild(p.serializeNode(f.text(m,h)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),r=g9e(n),cv&&v9e(r);let c=r&&r.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 h=r.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;r=h}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||g2.fromSchema(t.state.schema)).parseSlice(r,{preserveWhitespace:!!(l||u),context:s,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!f9e.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)a=_9e(SM(a,+u[1],+u[2]),u[4]);else if(a=rt.maxOpen(p9e(a.content,s),!0),a.openStart||a.openEnd){let d=0,h=0;for(let f=a.content.firstChild;d<a.openStart&&!f.type.spec.isolating;d++,f=f.firstChild);for(let f=a.content.lastChild;h<a.openEnd&&!f.type.spec.isolating;h++,f=f.lastChild);a=SM(a,d,h)}return t.someProp("transformPasted",d=>{a=d(a,t)}),a}const f9e=/^(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 p9e(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let s=e.node(n).contentMatchAt(e.index(n)),o,r=[];if(t.forEach(a=>{if(!r)return;let l=s.findWrapping(a.type),c;if(!l)return r=null;if(c=r.length&&o.length&&QB(l,o,a,r[r.length-1],0))r[r.length-1]=c;else{r.length&&(r[r.length-1]=ez(r[r.length-1],o.length));let u=JB(a,l);r.push(u),s=s.matchType(u.type),o=l}}),r)return st.from(r)}return t}function JB(t,e,n=0){for(let i=e.length-1;i>=n;i--)t=e[i].create(null,st.from(t));return t}function QB(t,e,n,i,s){if(s<t.length&&s<e.length&&t[s]==e[s]){let o=QB(t,e,n,i.lastChild,s+1);if(o)return i.copy(i.content.replaceChild(i.childCount-1,o));if(i.contentMatchAt(i.childCount).matchType(s==t.length-1?n.type:t[s+1]))return i.copy(i.content.append(st.from(JB(n,t,s+1))))}}function ez(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,ez(t.lastChild,e-1)),i=t.contentMatchAt(t.childCount).fillBefore(st.empty,!0);return t.copy(n.append(i))}function _x(t,e,n,i,s,o){let r=e<0?t.firstChild:t.lastChild,a=r.content;return t.childCount>1&&(o=0),s<i-1&&(a=_x(a,e,n,i,s+1,o)),s>=n&&(a=e<0?r.contentMatchAt(0).fillBefore(a,o<=s).append(a):a.append(r.contentMatchAt(r.childCount).fillBefore(st.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,r.copy(a))}function SM(t,e,n){return e<t.openStart&&(t=new rt(_x(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new rt(_x(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const tz={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 $M=null;function nz(){return $M||($M=document.implementation.createHTMLDocument("title"))}function m9e(t){let e=window.trustedTypes;return e?e.createPolicy("detachedDocument",{createHTML:n=>n}).createHTML(t):t}function g9e(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=nz().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(t),s;if((s=i&&tz[i[1].toLowerCase()])&&(t=s.map(o=>"<"+o+">").join("")+t+s.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=m9e(t),s)for(let o=0;o<s.length;o++)n=n.querySelector(s[o])||n;return n}function v9e(t){let e=t.querySelectorAll(Mi?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let i=e[n];i.childNodes.length==1&&i.textContent==" "&&i.parentNode&&i.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),i)}}function _9e(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,i;try{i=JSON.parse(e)}catch{return t}let{content:s,openStart:o,openEnd:r}=t;for(let a=i.length-2;a>=0;a-=2){let l=n.nodes[i[a]];if(!l||l.hasRequiredAttrs())break;s=st.from(l.create(i[a+1],s)),o++,r++}return new rt(s,o,r)}const Xi={},Ki={},y9e={touchstart:!0,touchmove:!0};class b9e{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 w9e(t){for(let e in Xi){let n=Xi[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=i=>{C9e(t,i)&&!f5(t,i)&&(t.editable||!(i.type in Ki))&&n(t,i)},y9e[e]?{passive:!0}:void 0)}Gi&&t.dom.addEventListener("input",()=>null),yx(t)}function Sc(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function k9e(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function yx(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=i=>f5(t,i))})}function f5(t,e){return t.someProp("handleDOMEvents",n=>{let i=n[e.type];return i?i(t,e)||e.defaultPrevented:!1})}function C9e(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function x9e(t,e){!f5(t,e)&&Xi[e.type]&&(t.editable||!(e.type in Ki))&&Xi[e.type](t,e)}Ki.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!iz(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Lr&&Mi&&n.keyCode==13)))if(t.domObserver.selectionChanged(t.domSelectionRange())?t.domObserver.flush():n.keyCode!=229&&t.domObserver.forceFlush(),ep&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let i=Date.now();t.input.lastIOSEnter=i,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==i&&(t.someProp("handleKeyDown",s=>s(t,Ou(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",i=>i(t,n))||h9e(t,n)?n.preventDefault():Sc(t,"key")};Ki.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Ki.keypress=(t,e)=>{let n=e;if(iz(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||nr&&n.metaKey)return;if(t.someProp("handleKeyPress",s=>s(t,n))){n.preventDefault();return}let i=t.state.selection;if(!(i instanceof Ot)||!i.$from.sameParent(i.$to)){let s=String.fromCharCode(n.charCode);!/[\r\n]/.test(s)&&!t.someProp("handleTextInput",o=>o(t,i.$from.pos,i.$to.pos,s))&&t.dispatch(t.state.tr.insertText(s).scrollIntoView()),n.preventDefault()}};function P2(t){return{left:t.clientX,top:t.clientY}}function S9e(t,e){let n=e.x-t.clientX,i=e.y-t.clientY;return n*n+i*i<100}function p5(t,e,n,i,s){if(i==-1)return!1;let o=t.state.doc.resolve(i);for(let r=o.depth+1;r>0;r--)if(t.someProp(e,a=>r>o.depth?a(t,n,o.nodeAfter,o.before(r),s,!0):a(t,n,o.node(r),o.before(r),s,!1)))return!0;return!1}function ff(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let i=t.state.tr.setSelection(e);n=="pointer"&&i.setMeta("pointer",!0),t.dispatch(i)}function $9e(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),i=n.nodeAfter;return i&&i.isAtom&&Rt.isSelectable(i)?(ff(t,new Rt(n),"pointer"),!0):!1}function A9e(t,e){if(e==-1)return!1;let n=t.state.selection,i,s;n instanceof Rt&&(i=n.node);let o=t.state.doc.resolve(e);for(let r=o.depth+1;r>0;r--){let a=r>o.depth?o.nodeAfter:o.node(r);if(Rt.isSelectable(a)){i&&n.$from.depth>0&&r>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?s=o.before(n.$from.depth):s=o.before(r);break}}return s!=null?(ff(t,Rt.create(t.state.doc,s),"pointer"),!0):!1}function E9e(t,e,n,i,s){return p5(t,"handleClickOn",e,n,i)||t.someProp("handleClick",o=>o(t,e,i))||(s?A9e(t,n):$9e(t,n))}function M9e(t,e,n,i){return p5(t,"handleDoubleClickOn",e,n,i)||t.someProp("handleDoubleClick",s=>s(t,e,i))}function T9e(t,e,n,i){return p5(t,"handleTripleClickOn",e,n,i)||t.someProp("handleTripleClick",s=>s(t,e,i))||P9e(t,n,i)}function P9e(t,e,n){if(n.button!=0)return!1;let i=t.state.doc;if(e==-1)return i.inlineContent?(ff(t,Ot.create(i,0,i.content.size),"pointer"),!0):!1;let s=i.resolve(e);for(let o=s.depth+1;o>0;o--){let r=o>s.depth?s.nodeAfter:s.node(o),a=s.before(o);if(r.inlineContent)ff(t,Ot.create(i,a+1,a+1+r.content.size),"pointer");else if(Rt.isSelectable(r))ff(t,Rt.create(i,a),"pointer");else continue;return!0}}function m5(t){return G0(t)}const sz=nr?"metaKey":"ctrlKey";Xi.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let i=m5(t),s=Date.now(),o="singleClick";s-t.input.lastClick.time<500&&S9e(n,t.input.lastClick)&&!n[sz]&&(t.input.lastClick.type=="singleClick"?o="doubleClick":t.input.lastClick.type=="doubleClick"&&(o="tripleClick")),t.input.lastClick={time:s,x:n.clientX,y:n.clientY,type:o};let r=t.posAtCoords(P2(n));r&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new I9e(t,r,n,!!i)):(o=="doubleClick"?M9e:T9e)(t,r.pos,r.inside,n)?n.preventDefault():Sc(t,"pointer"))};class I9e{constructor(e,n,i,s){this.view=e,this.pos=n,this.event=i,this.flushed=s,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!i[sz],this.allowDefault=i.shiftKey;let o,r;if(n.inside>-1)o=e.state.doc.nodeAt(n.inside),r=n.inside;else{let u=e.state.doc.resolve(n.pos);o=u.parent,r=u.depth?u.before():0}const a=s?null:i.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:c}=e.state;(i.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||c instanceof Rt&&c.from<=r&&c.to>r)&&(this.mightDrag={node:o,pos:r,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&ea&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Sc(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>ml(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(P2(e))),this.updateAllowDefault(e),this.allowDefault||!n?Sc(this.view,"pointer"):E9e(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Gi&&this.mightDrag&&!this.mightDrag.node.isAtom||Mi&&!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)?(ff(this.view,Ut.near(this.view.state.doc.resolve(n.pos)),"pointer"),e.preventDefault()):Sc(this.view,"pointer")}move(e){this.updateAllowDefault(e),Sc(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Xi.touchstart=t=>{t.input.lastTouch=Date.now(),m5(t),Sc(t,"pointer")};Xi.touchmove=t=>{t.input.lastTouch=Date.now(),Sc(t,"pointer")};Xi.contextmenu=t=>m5(t);function iz(t,e){return t.composing?!0:Gi&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const L9e=Lr?5e3:-1;Ki.compositionstart=Ki.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof Ot&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(i=>i.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),G0(t,!0),t.markCursor=null;else if(G0(t,!e.selection.empty),ea&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let i=t.domSelectionRange();for(let s=i.focusNode,o=i.focusOffset;s&&s.nodeType==1&&o!=0;){let r=o<0?s.lastChild:s.childNodes[o-1];if(!r)break;if(r.nodeType==3){let a=t.domSelection();a&&a.collapse(r,r.nodeValue.length);break}else s=r,o=-1}}t.input.composing=!0}oz(t,L9e)};Ki.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,oz(t,20))};function oz(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>G0(t),e))}function rz(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=D9e());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function O9e(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=$Se(e.focusNode,e.focusOffset),i=ASe(e.focusNode,e.focusOffset);if(n&&i&&n!=i){let s=i.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(n==o||i==o)return o;if(!s||!s.isText(i.nodeValue))return i;if(t.input.compositionNode==i){let r=n.pmViewDesc;if(!(!r||!r.isText(n.nodeValue)))return i}}return n||i}function D9e(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function G0(t,e=!1){if(!(Lr&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),rz(t),e||t.docView&&t.docView.dirty){let n=d5(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!t.state.selection.empty?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function R9e(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),s=document.createRange();s.selectNodeContents(e),t.dom.blur(),i.removeAllRanges(),i.addRange(s),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const p1=po&&Pc<15||ep&&ISe<604;Xi.copy=Ki.cut=(t,e)=>{let n=e,i=t.state.selection,s=n.type=="cut";if(i.empty)return;let o=p1?null:n.clipboardData,r=i.content(),{dom:a,text:l}=KB(t,r);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):R9e(t,a),s&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function V9e(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function F9e(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,i=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus();let s=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),i.parentNode&&i.parentNode.removeChild(i),n?m1(t,i.value,null,s,e):m1(t,i.textContent,i.innerHTML,s,e)},50)}function m1(t,e,n,i,s){let o=ZB(t,e,n,i,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,s,o||rt.empty)))return!0;if(!o)return!1;let r=V9e(o),a=r?t.state.tr.replaceSelectionWith(r,i):t.state.tr.replaceSelection(o);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function az(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Ki.paste=(t,e)=>{let n=e;if(t.composing&&!Lr)return;let i=p1?null:n.clipboardData,s=t.input.shiftKey&&t.input.lastKeyCode!=45;i&&m1(t,az(i),i.getData("text/html"),s,n)?n.preventDefault():F9e(t,n)};class lz{constructor(e,n,i){this.slice=e,this.move=n,this.node=i}}const cz=nr?"altKey":"ctrlKey";Xi.dragstart=(t,e)=>{let n=e,i=t.input.mouseDown;if(i&&i.done(),!n.dataTransfer)return;let s=t.state.selection,o=s.empty?null:t.posAtCoords(P2(n)),r;if(!(o&&o.pos>=s.from&&o.pos<=(s instanceof Rt?s.to-1:s.to))){if(i&&i.mightDrag)r=Rt.create(t.state.doc,i.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=t.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=t.docView&&(r=Rt.create(t.state.doc,d.posBefore))}}let a=(r||t.state.selection).content(),{dom:l,text:c,slice:u}=KB(t,a);(!n.dataTransfer.files.length||!Mi||OB>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(p1?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",p1||n.dataTransfer.setData("text/plain",c),t.dragging=new lz(u,!n[cz],r)};Xi.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Ki.dragover=Ki.dragenter=(t,e)=>e.preventDefault();Ki.drop=(t,e)=>{let n=e,i=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let s=t.posAtCoords(P2(n));if(!s)return;let o=t.state.doc.resolve(s.pos),r=i&&i.slice;r?t.someProp("transformPasted",p=>{r=p(r,t)}):r=ZB(t,az(n.dataTransfer),p1?null:n.dataTransfer.getData("text/html"),!1,o);let a=!!(i&&!n[cz]);if(t.someProp("handleDrop",p=>p(t,n,r||rt.empty,a))){n.preventDefault();return}if(!r)return;n.preventDefault();let l=r?w5e(t.state.doc,o.pos,r):o.pos;l==null&&(l=o.pos);let c=t.state.tr;if(a){let{node:p}=i;p?p.replace(c):c.deleteSelection()}let u=c.mapping.map(l),d=r.openStart==0&&r.openEnd==0&&r.content.childCount==1,h=c.doc;if(d?c.replaceRangeWith(u,u,r.content.firstChild):c.replaceRange(u,u,r),c.doc.eq(h))return;let f=c.doc.resolve(u);if(d&&Rt.isSelectable(r.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(r.content.firstChild))c.setSelection(new Rt(f));else{let p=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,b,w,k)=>p=k),c.setSelection(h5(t,f,c.doc.resolve(p)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))};Xi.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&ml(t)},20))};Xi.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};Xi.beforeinput=(t,e)=>{if(Mi&&Lr&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:i}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=i||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",o=>o(t,Ou(8,"Backspace")))))return;let{$cursor:s}=t.state.selection;s&&s.pos>0&&t.dispatch(t.state.tr.delete(s.pos-1,s.pos).scrollIntoView())},50)}};for(let t in Ki)Xi[t]=Ki[t];function g1(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class X0{constructor(e,n){this.toDOM=e,this.spec=n||id,this.side=this.spec.side||0}map(e,n,i,s){let{pos:o,deleted:r}=e.mapResult(n.from+s,this.side<0?-1:1);return r?null:new Fs(o-i,o-i,this)}valid(){return!0}eq(e){return this==e||e instanceof X0&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&g1(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Lc{constructor(e,n){this.attrs=e,this.spec=n||id}map(e,n,i,s){let o=e.map(n.from+s,this.spec.inclusiveStart?-1:1)-i,r=e.map(n.to+s,this.spec.inclusiveEnd?1:-1)-i;return o>=r?null:new Fs(o,r,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Lc&&g1(this.attrs,e.attrs)&&g1(this.spec,e.spec)}static is(e){return e.type instanceof Lc}destroy(){}}class g5{constructor(e,n){this.attrs=e,this.spec=n||id}map(e,n,i,s){let o=e.mapResult(n.from+s,1);if(o.deleted)return null;let r=e.mapResult(n.to+s,-1);return r.deleted||r.pos<=o.pos?null:new Fs(o.pos-i,r.pos-i,this)}valid(e,n){let{index:i,offset:s}=e.content.findIndex(n.from),o;return s==n.from&&!(o=e.child(i)).isText&&s+o.nodeSize==n.to}eq(e){return this==e||e instanceof g5&&g1(this.attrs,e.attrs)&&g1(this.spec,e.spec)}destroy(){}}class Fs{constructor(e,n,i){this.from=e,this.to=n,this.type=i}copy(e,n){return new Fs(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,i){return this.type.map(e,this,n,i)}static widget(e,n,i){return new Fs(e,e,new X0(n,i))}static inline(e,n,i,s){return new Fs(e,n,new Lc(i,s))}static node(e,n,i,s){return new Fs(e,n,new g5(i,s))}get spec(){return this.type.spec}get inline(){return this.type instanceof Lc}get widget(){return this.type instanceof X0}}const Oh=[],id={};class Kn{constructor(e,n){this.local=e.length?e:Oh,this.children=n.length?n:Oh}static create(e,n){return n.length?K0(n,e,0,id):Si}find(e,n,i){let s=[];return this.findInner(e??0,n??1e9,s,0,i),s}findInner(e,n,i,s,o){for(let r=0;r<this.local.length;r++){let a=this.local[r];a.from<=n&&a.to>=e&&(!o||o(a.spec))&&i.push(a.copy(a.from+s,a.to+s))}for(let r=0;r<this.children.length;r+=3)if(this.children[r]<n&&this.children[r+1]>e){let a=this.children[r]+1;this.children[r+2].findInner(e-a,n-a,i,s+a,o)}}map(e,n,i){return this==Si||e.maps.length==0?this:this.mapInner(e,n,0,0,i||id)}mapInner(e,n,i,s,o){let r;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,i,s);l&&l.type.valid(n,l)?(r||(r=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?N9e(this.children,r||[],e,n,i,s,o):r?new Kn(r.sort(od),Oh):Si}add(e,n){return n.length?this==Si?Kn.create(e,n):this.addInner(e,n,0):this}addInner(e,n,i){let s,o=0;e.forEach((a,l)=>{let c=l+i,u;if(u=dz(n,a,c)){for(s||(s=this.children.slice());o<s.length&&s[o]<l;)o+=3;s[o]==l?s[o+2]=s[o+2].addInner(a,u,c+1):s.splice(o,0,l,l+a.nodeSize,K0(u,a,c+1,id)),o+=3}});let r=uz(o?hz(n):n,-i);for(let a=0;a<r.length;a++)r[a].type.valid(e,r[a])||r.splice(a--,1);return new Kn(r.length?this.local.concat(r).sort(od):this.local,s||this.children)}remove(e){return e.length==0||this==Si?this:this.removeInner(e,0)}removeInner(e,n){let i=this.children,s=this.local;for(let o=0;o<i.length;o+=3){let r,a=i[o]+n,l=i[o+1]+n;for(let u=0,d;u<e.length;u++)(d=e[u])&&d.from>a&&d.to<l&&(e[u]=null,(r||(r=[])).push(d));if(!r)continue;i==this.children&&(i=this.children.slice());let c=i[o+2].removeInner(r,a+1);c!=Si?i[o+2]=c:(i.splice(o,3),o-=3)}if(s.length){for(let o=0,r;o<e.length;o++)if(r=e[o])for(let a=0;a<s.length;a++)s[a].eq(r,n)&&(s==this.local&&(s=this.local.slice()),s.splice(a--,1))}return i==this.children&&s==this.local?this:s.length||i.length?new Kn(s,i):Si}forChild(e,n){if(this==Si)return this;if(n.isLeaf)return Kn.empty;let i,s;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(i=this.children[a+2]);break}let o=e+1,r=o+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<r&&l.to>o&&l.type instanceof Lc){let c=Math.max(o,l.from)-o,u=Math.min(r,l.to)-o;c<u&&(s||(s=[])).push(l.copy(c,u))}}if(s){let a=new Kn(s.sort(od),Oh);return i?new gc([a,i]):a}return i||Si}eq(e){if(this==e)return!0;if(!(e instanceof Kn)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return v5(this.localsInner(e))}localsInner(e){if(this==Si)return Oh;if(e.inlineContent||!this.local.some(Lc.is))return this.local;let n=[];for(let i=0;i<this.local.length;i++)this.local[i].type instanceof Lc||n.push(this.local[i]);return n}forEachSet(e){e(this)}}Kn.empty=new Kn([],[]);Kn.removeOverlap=v5;const Si=Kn.empty;class gc{constructor(e){this.members=e}map(e,n){const i=this.members.map(s=>s.map(e,n,id));return gc.from(i)}forChild(e,n){if(n.isLeaf)return Kn.empty;let i=[];for(let s=0;s<this.members.length;s++){let o=this.members[s].forChild(e,n);o!=Si&&(o instanceof gc?i=i.concat(o.members):i.push(o))}return gc.from(i)}eq(e){if(!(e instanceof gc)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,i=!0;for(let s=0;s<this.members.length;s++){let o=this.members[s].localsInner(e);if(o.length)if(!n)n=o;else{i&&(n=n.slice(),i=!1);for(let r=0;r<o.length;r++)n.push(o[r])}}return n?v5(i?n:n.sort(od)):Oh}static from(e){switch(e.length){case 0:return Si;case 1:return e[0];default:return new gc(e.every(n=>n instanceof Kn)?e:e.reduce((n,i)=>n.concat(i instanceof Kn?i:i.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function N9e(t,e,n,i,s,o,r){let a=t.slice();for(let c=0,u=o;c<n.maps.length;c++){let d=0;n.maps[c].forEach((h,f,p,m)=>{let b=m-p-(f-h);for(let w=0;w<a.length;w+=3){let k=a[w+1];if(k<0||h>k+u-d)continue;let C=a[w]+u-d;f>=C?a[w+1]=h<=C?-2:-1:h>=u&&b&&(a[w]+=b,a[w+1]+=b)}d+=b}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c<a.length;c+=3)if(a[c+1]<0){if(a[c+1]==-2){l=!0,a[c+1]=-1;continue}let u=n.map(t[c]+o),d=u-s;if(d<0||d>=i.content.size){l=!0;continue}let h=n.map(t[c+1]+o,-1),f=h-s,{index:p,offset:m}=i.content.findIndex(d),b=i.maybeChild(p);if(b&&m==d&&m+b.nodeSize==f){let w=a[c+2].mapInner(n,b,u+1,t[c]+o+1,r);w!=Si?(a[c]=d,a[c+1]=f,a[c+2]=w):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=B9e(a,t,e,n,s,o,r),u=K0(c,i,0,r);e=u.local;for(let d=0;d<a.length;d+=3)a[d+1]<0&&(a.splice(d,3),d-=3);for(let d=0,h=0;d<u.children.length;d+=3){let f=u.children[d];for(;h<a.length&&a[h]<f;)h+=3;a.splice(h,0,u.children[d],u.children[d+1],u.children[d+2])}}return new Kn(e.sort(od),a)}function uz(t,e){if(!e||!t.length)return t;let n=[];for(let i=0;i<t.length;i++){let s=t[i];n.push(new Fs(s.from+e,s.to+e,s.type))}return n}function B9e(t,e,n,i,s,o,r){function a(l,c){for(let u=0;u<l.local.length;u++){let d=l.local[u].map(i,s,c);d?n.push(d):r.onRemove&&r.onRemove(l.local[u].spec)}for(let u=0;u<l.children.length;u+=3)a(l.children[u+2],l.children[u]+c+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+o+1);return n}function dz(t,e,n){if(e.isLeaf)return null;let i=n+e.nodeSize,s=null;for(let o=0,r;o<t.length;o++)(r=t[o])&&r.from>n&&r.to<i&&((s||(s=[])).push(r),t[o]=null);return s}function hz(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function K0(t,e,n,i){let s=[],o=!1;e.forEach((a,l)=>{let c=dz(t,a,l+n);if(c){o=!0;let u=K0(c,a,n+l+1,i);u!=Si&&s.push(l,l+a.nodeSize,u)}});let r=uz(o?hz(t):t,-n).sort(od);for(let a=0;a<r.length;a++)r[a].type.valid(e,r[a])||(i.onRemove&&i.onRemove(r[a].spec),r.splice(a--,1));return r.length||s.length?new Kn(r,s):Si}function od(t,e){return t.from-e.from||t.to-e.to}function v5(t){let e=t;for(let n=0;n<e.length-1;n++){let i=e[n];if(i.from!=i.to)for(let s=n+1;s<e.length;s++){let o=e[s];if(o.from==i.from){o.to!=i.to&&(e==t&&(e=t.slice()),e[s]=o.copy(o.from,i.to),AM(e,s+1,o.copy(i.to,o.to)));continue}else{o.from<i.to&&(e==t&&(e=t.slice()),e[n]=i.copy(i.from,o.from),AM(e,s,i.copy(o.from,i.to)));break}}}return e}function AM(t,e,n){for(;e<t.length&&od(n,t[e])>0;)e++;t.splice(e,0,n)}function w3(t){let e=[];return t.someProp("decorations",n=>{let i=n(t.state);i&&i!=Si&&e.push(i)}),t.cursorWrapper&&e.push(Kn.create(t.state.doc,[t.cursorWrapper.deco])),gc.from(e)}const z9e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},H9e=po&&Pc<=11;class U9e{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class j9e{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new U9e,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(i=>{for(let s=0;s<i.length;s++)this.queue.push(i[s]);po&&Pc<=11&&i.some(s=>s.type=="childList"&&s.removedNodes.length||s.type=="characterData"&&s.oldValue.length>s.target.nodeValue.length)?this.flushSoon():this.flush()}),H9e&&(this.onCharData=i=>{this.queue.push({target:i.target,type:"characterData",oldValue:i.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,z9e)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[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(yM(this.view)){if(this.suppressingSelectionUpdates)return ml(this.view);if(po&&Pc<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&$d(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,i;for(let o=e.focusNode;o;o=f1(o))n.add(o);for(let o=e.anchorNode;o;o=f1(o))if(n.has(o)){i=o;break}let s=i&&this.view.docView.nearestDesc(i);if(s&&s.ignoreMutation({type:"selection",target:i.nodeType==3?i.parentNode:i}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}selectionChanged(e){return!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&yM(this.view)&&!this.ignoreSelectionChange(e)}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let i=e.domSelectionRange(),s=this.selectionChanged(i),o=-1,r=-1,a=!1,l=[];if(e.editable)for(let u=0;u<n.length;u++){let d=this.registerMutation(n[u],l);d&&(o=o<0?d.from:Math.min(d.from,o),r=r<0?d.to:Math.max(d.to,r),d.typeOver&&(a=!0))}if(ea&&l.length){let u=l.filter(d=>d.nodeName=="BR");if(u.length==2){let[d,h]=u;d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let h of u){let f=h.parentNode;f&&f.nodeName=="LI"&&(!d||q9e(e,d)!=f)&&h.remove()}}}let c=null;o<0&&s&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&M2(i)&&(c=d5(e))&&c.eq(Ut.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,ml(e),this.currentSelection.set(i),e.scrollToSelection()):(o>-1||s)&&(o>-1&&(e.docView.markDirty(o,r),W9e(e)),this.handleDOMChange(o,r,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(i)||ml(e),this.currentSelection.set(i))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let i=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(i==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!i||i.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++){let d=e.addedNodes[u];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(i.contentDOM&&i.contentDOM!=i.dom&&!i.contentDOM.contains(e.target))return{from:i.posBefore,to:i.posAfter};let s=e.previousSibling,o=e.nextSibling;if(po&&Pc<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:d,nextSibling:h}=e.addedNodes[u];(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(s=d),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(o=h)}let r=s&&s.parentNode==e.target?oi(s)+1:0,a=i.localPosFromDOM(e.target,r,-1),l=o&&o.parentNode==e.target?oi(o):e.target.childNodes.length,c=i.localPosFromDOM(e.target,l,1);return{from:a,to:c}}else return e.type=="attributes"?{from:i.posAtStart-i.border,to:i.posAtEnd+i.border}:(this.lastChangedTextNode=e.target,{from:i.posAtStart,to:i.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let EM=new WeakMap,MM=!1;function W9e(t){if(!EM.has(t)&&(EM.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=ea,MM)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."),MM=!0}}function TM(t,e){let n=e.startContainer,i=e.startOffset,s=e.endContainer,o=e.endOffset,r=t.domAtPos(t.state.selection.anchor);return $d(r.node,r.offset,s,o)&&([n,i,s,o]=[s,o,n,i]),{anchorNode:n,anchorOffset:i,focusNode:s,focusOffset:o}}function Y9e(t,e){if(e.getComposedRanges){let s=e.getComposedRanges(t.root)[0];if(s)return TM(t,s)}let n;function i(s){s.preventDefault(),s.stopImmediatePropagation(),n=s.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",i,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",i,!0),n?TM(t,n):null}function q9e(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let i=t.docView.nearestDesc(n,!0);if(i&&i.node.isBlock)return n}return null}function G9e(t,e,n){let{node:i,fromOffset:s,toOffset:o,from:r,to:a}=t.docView.parseRange(e,n),l=t.domSelectionRange(),c,u=l.anchorNode;if(u&&t.dom.contains(u.nodeType==1?u:u.parentNode)&&(c=[{node:u,offset:l.anchorOffset}],M2(l)||c.push({node:l.focusNode,offset:l.focusOffset})),Mi&&t.input.lastKeyCode===8)for(let b=o;b>s;b--){let w=i.childNodes[b-1],k=w.pmViewDesc;if(w.nodeName=="BR"&&!k){o=b;break}if(!k||k.size)break}let d=t.state.doc,h=t.someProp("domParser")||g2.fromSchema(t.state.schema),f=d.resolve(r),p=null,m=h.parse(i,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:s,to:o,preserveWhitespace:f.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:X9e,context:f});if(c&&c[0].pos!=null){let b=c[0].pos,w=c[1]&&c[1].pos;w==null&&(w=b),p={anchor:b+r,head:w+r}}return{doc:m,sel:p,from:r,to:a}}function X9e(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(Gi&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||Gi&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const K9e=/^(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 Z9e(t,e,n,i,s){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let I=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,L=d5(t,I);if(L&&!t.state.selection.eq(L)){if(Mi&&Lr&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",V=>V(t,Ou(13,"Enter"))))return;let R=t.state.tr.setSelection(L);I=="pointer"?R.setMeta("pointer",!0):I=="key"&&R.scrollIntoView(),o&&R.setMeta("composition",o),t.dispatch(R)}return}let r=t.state.doc.resolve(e),a=r.sharedDepth(n);e=r.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,c=G9e(t,e,n),u=t.state.doc,d=u.slice(c.from,c.to),h,f;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(h=t.state.selection.to,f="end"):(h=t.state.selection.from,f="start"),t.input.lastKeyCode=null;let p=e7e(d.content,c.doc.content,c.from,h,f);if(p&&t.input.domChangeCount++,(ep&&t.input.lastIOSEnter>Date.now()-225||Lr)&&s.some(I=>I.nodeType==1&&!K9e.test(I.nodeName))&&(!p||p.endA>=p.endB)&&t.someProp("handleKeyDown",I=>I(t,Ou(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!p)if(i&&l instanceof Ot&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let I=PM(t,t.state.doc,c.sel);if(I&&!I.eq(t.state.selection)){let L=t.state.tr.setSelection(I);o&&L.setMeta("composition",o),t.dispatch(L)}}return}t.state.selection.from<t.state.selection.to&&p.start==p.endB&&t.state.selection instanceof Ot&&(p.start>t.state.selection.from&&p.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?p.start=t.state.selection.from:p.endA<t.state.selection.to&&p.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(p.endB+=t.state.selection.to-p.endA,p.endA=t.state.selection.to)),po&&Pc<=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),b=c.doc.resolveNoCache(p.endB-c.from),w=u.resolve(p.start),k=m.sameParent(b)&&m.parent.inlineContent&&w.end()>=p.endA,C;if((ep&&t.input.lastIOSEnter>Date.now()-225&&(!k||s.some(I=>I.nodeName=="DIV"||I.nodeName=="P"))||!k&&m.pos<c.doc.content.size&&!m.sameParent(b)&&(C=Ut.findFrom(c.doc.resolve(m.pos+1),1,!0))&&C.head==b.pos)&&t.someProp("handleKeyDown",I=>I(t,Ou(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>p.start&&Q9e(u,p.start,p.endA,m,b)&&t.someProp("handleKeyDown",I=>I(t,Ou(8,"Backspace")))){Lr&&Mi&&t.domObserver.suppressSelectionUpdates();return}Mi&&Lr&&p.endB==p.start&&(t.input.lastAndroidDelete=Date.now()),Lr&&!k&&m.start()!=b.start()&&b.parentOffset==0&&m.depth==b.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,b=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(I){return I(t,Ou(13,"Enter"))})},20));let A=p.start,S=p.endA,M,P,T;if(k){if(m.pos==b.pos)po&&Pc<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>ml(t),20)),M=t.state.tr.delete(A,S),P=u.resolve(p.start).marksAcross(u.resolve(p.endA));else if(p.endA==p.endB&&(T=J9e(m.parent.content.cut(m.parentOffset,b.parentOffset),w.parent.content.cut(w.parentOffset,p.endA-w.start()))))M=t.state.tr,T.type=="add"?M.addMark(A,S,T.mark):M.removeMark(A,S,T.mark);else if(m.parent.child(m.index()).isText&&m.index()==b.index()-(b.textOffset?0:1)){let I=m.parent.textBetween(m.parentOffset,b.parentOffset);if(t.someProp("handleTextInput",L=>L(t,A,S,I)))return;M=t.state.tr.insertText(I,A,S)}}if(M||(M=t.state.tr.replace(A,S,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let I=PM(t,M.doc,c.sel);I&&!(Mi&&Lr&&t.composing&&I.empty&&(p.start!=p.endB||t.input.lastAndroidDelete<Date.now()-100)&&(I.head==A||I.head==M.mapping.map(S)-1)||po&&I.empty&&I.head==A)&&M.setSelection(I)}P&&M.ensureMarks(P),o&&M.setMeta("composition",o),t.dispatch(M.scrollIntoView())}function PM(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:h5(t,e.resolve(n.anchor),e.resolve(n.head))}function J9e(t,e){let n=t.firstChild.marks,i=e.firstChild.marks,s=n,o=i,r,a,l;for(let u=0;u<i.length;u++)s=i[u].removeFromSet(s);for(let u=0;u<n.length;u++)o=n[u].removeFromSet(o);if(s.length==1&&o.length==0)a=s[0],r="add",l=u=>u.mark(a.addToSet(u.marks));else if(s.length==0&&o.length==1)a=o[0],r="remove",l=u=>u.mark(a.removeFromSet(u.marks));else return null;let c=[];for(let u=0;u<e.childCount;u++)c.push(l(e.child(u)));if(st.from(c).eq(t))return{mark:a,type:r}}function Q9e(t,e,n,i,s){if(n-e<=s.pos-i.pos||k3(i,!0,!1)<s.pos)return!1;let o=t.resolve(e);if(!i.parent.isTextblock){let a=o.nodeAfter;return a!=null&&n==e+a.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let r=t.resolve(k3(o,!0,!0));return!r.parent.isTextblock||r.pos>n||k3(r,!0,!1)<n?!1:i.parent.content.cut(i.parentOffset).eq(r.parent.content)}function k3(t,e,n){let i=t.depth,s=e?t.end():t.pos;for(;i>0&&(e||t.indexAfter(i)==t.node(i).childCount);)i--,s++,e=!1;if(n){let o=t.node(i).maybeChild(t.indexAfter(i));for(;o&&!o.isLeaf;)o=o.firstChild,s++}return s}function e7e(t,e,n,i,s){let o=t.findDiffStart(e,n);if(o==null)return null;let{a:r,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if(s=="end"){let l=Math.max(0,o-Math.min(r,a));i-=r+l-o}if(r<o&&t.size<e.size){let l=i<=o&&i>=r?o-i:0;o-=l,o&&o<e.size&&IM(e.textBetween(o-1,o+1))&&(o+=l?1:-1),a=o+(a-r),r=o}else if(a<o){let l=i<=o&&i>=a?o-i:0;o-=l,o&&o<t.size&&IM(t.textBetween(o-1,o+1))&&(o+=l?1:-1),r=o+(r-a),a=o}return{start:o,endA:r,endB:a}}function IM(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class t7e{constructor(e,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 b9e,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(VM),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=DM(this),OM(this),this.nodeViews=RM(this),this.docView=fM(this.state.doc,LM(this),w3(this),this.dom,this),this.domObserver=new j9e(this,(i,s,o,r)=>Z9e(this,i,s,o,r)),this.domObserver.start(),w9e(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&yx(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(VM),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let i in this._props)n[i]=this._props[i];n.state=this.state;for(let i in e)n[i]=e[i];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var i;let s=this.state,o=!1,r=!1;e.storedMarks&&this.composing&&(rz(this),r=!0),this.state=e;let a=s.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let f=RM(this);s7e(f,this.nodeViews)&&(this.nodeViews=f,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&yx(this),this.editable=DM(this),OM(this);let l=w3(this),c=LM(this),u=s.plugins!=e.plugins&&!s.doc.eq(e.doc)?"reset":e.scrollToSelection>s.scrollToSelection?"to selection":"preserve",d=o||!this.docView.matchesNode(e.doc,c,l);(d||!e.selection.eq(s.selection))&&(r=!0);let h=u=="preserve"&&r&&this.dom.style.overflowAnchor==null&&DSe(this);if(r){this.domObserver.stop();let f=d&&(po||Mi)&&!this.composing&&!s.selection.empty&&!e.selection.empty&&n7e(s.selection,e.selection);if(d){let p=Mi?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=O9e(this)),(o||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=fM(e.doc,c,l,this.dom,this)),p&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&o9e(this))?ml(this,f):(qB(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(s),!((i=this.dragging)===null||i===void 0)&&i.node&&!s.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,s),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():h&&RSe(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Rt){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&aM(this,n.getBoundingClientRect(),e)}else aM(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let i=this.directPlugins[n];i.spec.view&&this.pluginViews.push(i.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let i=this.state.plugins[n];i.spec.view&&this.pluginViews.push(i.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let i=this.pluginViews[n];i.update&&i.update(this,e)}}updateDraggedNode(e,n){let i=e.node,s=-1;if(this.state.doc.nodeAt(i.from)==i.node)s=i.from;else{let o=i.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==i.node&&(s=o)}this.dragging=new lz(e.slice,e.move,s<0?void 0:Rt.create(this.state.doc,s))}someProp(e,n){let i=this._props&&this._props[e],s;if(i!=null&&(s=n?n(i):i))return s;for(let r=0;r<this.directPlugins.length;r++){let a=this.directPlugins[r].props[e];if(a!=null&&(s=n?n(a):a))return s}let o=this.state.plugins;if(o)for(let r=0;r<o.length;r++){let a=o[r].props[e];if(a!=null&&(s=n?n(a):a))return s}}hasFocus(){if(po){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&VSe(this.dom),ml(this),this.domObserver.start()}get root(){let e=this._root;if(e==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 e||document}updateRoot(){this._root=null}posAtCoords(e){return HSe(this,e)}coordsAtPos(e,n=1){return NB(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,i=-1){let s=this.docView.posFromDOM(e,n,i);if(s==null)throw new RangeError("DOM position not inside the editor");return s}endOfTextblock(e,n){return qSe(this,n||this.state,e)}pasteHTML(e,n){return m1(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return m1(this,e,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(k9e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],w3(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,xSe())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return x9e(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?Gi&&this.root.nodeType===11&&MSe(this.dom.ownerDocument)==this.dom&&Y9e(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function LM(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let i in n)i=="class"?e.class+=" "+n[i]:i=="style"?e.style=(e.style?e.style+";":"")+n[i]:!e[i]&&i!="contenteditable"&&i!="nodeName"&&(e[i]=String(n[i]))}),e.translate||(e.translate="no"),[Fs.node(0,t.state.doc.content.size,e)]}function OM(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Fs.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function DM(t){return!t.someProp("editable",e=>e(t.state)===!1)}function n7e(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function RM(t){let e=Object.create(null);function n(i){for(let s in i)Object.prototype.hasOwnProperty.call(e,s)||(e[s]=i[s])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function s7e(t,e){let n=0,i=0;for(let s in t){if(t[s]!=e[s])return!0;n++}for(let s in e)i++;return n!=i}function VM(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var fz=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},St=(t,e,n)=>(fz(t,e,"read from private field"),n?n.call(t):e.get(t)),Zs=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},fs=(t,e,n,i)=>(fz(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);function lu(t,e){return t.meta={package:"@milkdown/core",group:"System",...e},t}const pz={strong:(t,e,n,i)=>{const s=t.marker||n.options.strong||"*",o=n.enter("strong"),r=n.createTracker(i);let a=r.move(s+s);return a+=r.move(n.containerPhrasing(t,{before:a,after:s,...r.current()})),a+=r.move(s+s),o(),a},emphasis:(t,e,n,i)=>{const s=t.marker||n.options.emphasis||"*",o=n.enter("emphasis"),r=n.createTracker(i);let a=r.move(s);return a+=r.move(n.containerPhrasing(t,{before:a,after:s,...r.current()})),a+=r.move(s),o(),a}},Vn=kn({},"editorView"),Sm=kn({},"editorState"),C3=kn([],"initTimer"),FM=kn({},"editor"),v1=kn([],"inputRules"),ta=kn([],"prosePlugins"),_1=kn([],"remarkPlugins"),y1=kn([],"nodeView"),b1=kn([],"markView"),rd=kn(ex().use(qC).use(ZC),"remark"),gg=kn({handlers:pz},"remarkStringifyOptions"),cy=su("ConfigReady");function i7e(t){const e=n=>(n.record(cy),async()=>(await t(n),n.done(cy),()=>{n.clearTimer(cy)}));return lu(e,{displayName:"Config"}),e}const ad=su("InitReady");function o7e(t){const e=n=>(n.inject(FM,t).inject(ta,[]).inject(_1,[]).inject(v1,[]).inject(y1,[]).inject(b1,[]).inject(gg,{handlers:pz}).inject(rd,ex().use(qC).use(ZC)).inject(C3,[cy]).record(ad),async()=>{await n.waitTimers(C3);const i=n.get(gg);return n.set(rd,ex().use(qC).use(ZC,i)),n.done(ad),()=>{n.remove(FM).remove(ta).remove(_1).remove(v1).remove(y1).remove(b1).remove(gg).remove(rd).remove(C3).clearTimer(ad)}});return lu(e,{displayName:"Init"}),e}const Yr=su("SchemaReady"),x3=kn([],"schemaTimer"),qr=kn({},"schema"),pf=kn([],"nodes"),mf=kn([],"marks");function NM(t){var e;return{...t,parseDOM:(e=t.parseDOM)==null?void 0:e.map(n=>({priority:t.priority,...n}))}}const mz=t=>(t.inject(qr,{}).inject(pf,[]).inject(mf,[]).inject(x3,[ad]).record(Yr),async()=>{await t.waitTimers(x3);const e=t.get(rd),n=t.get(_1).reduce((r,a)=>r.use(a.plugin,a.options),e);t.set(rd,n);const i=Object.fromEntries(t.get(pf).map(([r,a])=>[r,NM(a)])),s=Object.fromEntries(t.get(mf).map(([r,a])=>[r,NM(a)])),o=new bxe({nodes:i,marks:s});return t.set(qr,o),t.done(Yr),()=>{t.remove(qr).remove(pf).remove(mf).remove(x3).clearTimer(Yr)}});lu(mz,{displayName:"Schema"});var Dh,Au;let gz=class{constructor(){Zs(this,Dh,void 0),Zs(this,Au,void 0),fs(this,Dh,new iN),fs(this,Au,null),this.setCtx=e=>{fs(this,Au,e)}}get ctx(){return St(this,Au)}create(e,n){const i=e.create(St(this,Dh).sliceMap);return i.set(n),i}get(e){return St(this,Dh).get(e).get()}remove(e){return St(this,Dh).remove(e)}call(e,n){if(St(this,Au)==null)throw GCe();const i=this.get(e)(n),s=St(this,Au).get(Vn);return i(s.state,s.dispatch,s)}};Dh=new WeakMap,Au=new WeakMap;function r7e(t="cmdKey"){return kn(()=>()=>!1,t)}const gn=kn(new gz,"commands"),S3=kn([Yr],"commandsTimer"),vg=su("CommandsReady"),vz=t=>{const e=new gz;return e.setCtx(t),t.inject(gn,e).inject(S3,[Yr]).record(vg),async()=>(await t.waitTimers(S3),t.done(vg),()=>{t.remove(gn).remove(S3).clearTimer(vg)})};lu(vz,{displayName:"Commands"});const uy=su("ParserReady"),_z=()=>{throw Y8()},gf=kn(_z,"parser"),$3=kn([],"parserTimer"),yz=t=>(t.inject(gf,_z).inject($3,[Yr]).record(uy),async()=>{await t.waitTimers($3);const e=t.get(rd),n=t.get(qr);return t.set(gf,e5e.create(n,e)),t.done(uy),()=>{t.remove(gf).remove($3).clearTimer(uy)}});lu(yz,{displayName:"Parser"});const _g=su("SerializerReady"),A3=kn([],"serializerTimer"),bz=()=>{throw Y8()},vf=kn(bz,"serializer"),wz=t=>(t.inject(vf,bz).inject(A3,[Yr]).record(_g),async()=>{await t.waitTimers(A3);const e=t.get(rd),n=t.get(qr);return t.set(vf,n5e.create(n,e)),t.done(_g),()=>{t.remove(vf).remove(A3).clearTimer(_g)}});lu(wz,{displayName:"Serializer"});const dy=kn("","defaultValue"),hy=kn(t=>t,"stateOptions"),E3=kn([],"editorStateTimer"),fy=su("EditorStateReady");function a7e(t,e,n){if(typeof t=="string")return e(t);if(t.type==="html")return g2.fromSchema(n).parse(t.dom);if(t.type==="json")return Tc.fromJSON(n,t.value);throw zCe(t)}const l7e=new ps("MILKDOWN_STATE_TRACKER");function c7e(t){const e=E2(I5e,a5,xB,SB);return t.Backspace=e,t}const kz=t=>(t.inject(dy,"").inject(Sm,{}).inject(hy,e=>e).inject(E3,[uy,_g,vg]).record(fy),async()=>{await t.waitTimers(E3);const e=t.get(qr),n=t.get(gf),i=t.get(v1),s=t.get(hy),o=t.get(ta),r=t.get(dy),a=a7e(r,n,e),l=[...o,new rs({key:l7e,state:{init:()=>{},apply:(d,h,f,p)=>{t.set(Sm,p)}}}),z5e({rules:i}),PB(c7e(vSe))];t.set(ta,l);const c=s({schema:e,doc:a,plugins:l}),u=zu.create(c);return t.set(Sm,u),t.done(fy),()=>{t.remove(dy).remove(Sm).remove(hy).remove(E3).clearTimer(fy)}});lu(kz,{displayName:"EditorState"});const py=su("EditorViewReady"),M3=kn([],"editorViewTimer"),yg=kn({},"editorViewOptions"),my=kn(null,"root"),bx=kn(null,"rootDOM"),wx=kn({},"rootAttrs");function u7e(t,e){const n=document.createElement("div");n.className="milkdown",t.appendChild(n),e.set(bx,n);const i=e.get(wx);return Object.entries(i).forEach(([s,o])=>n.setAttribute(s,o)),n}function d7e(t){t.classList.add("editor"),t.setAttribute("role","textbox")}const h7e=new ps("MILKDOWN_VIEW_CLEAR"),Cz=t=>(t.inject(my,document.body).inject(Vn,{}).inject(yg,{}).inject(bx,null).inject(wx,{}).inject(M3,[fy]).record(py),async()=>{await t.wait(ad);const e=t.get(my)||document.body,n=typeof e=="string"?document.querySelector(e):e;t.update(ta,l=>[new rs({key:h7e,view:c=>{const u=n?u7e(n,t):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()}}}}),...l]),await t.waitTimers(M3);const i=t.get(Sm),s=t.get(yg),o=Object.fromEntries(t.get(y1)),r=Object.fromEntries(t.get(b1)),a=new t7e(n,{state:i,nodeViews:o,markViews:r,...s});return d7e(a.dom),t.set(Vn,a),t.done(py),()=>{a==null||a.destroy(),t.remove(my).remove(Vn).remove(yg).remove(bx).remove(wx).remove(M3).clearTimer(py)}});lu(Cz,{displayName:"EditorView"});var Rh,er,tc,$m,gy,vy,Eo,nc,Vh,_y,Fh,Am,yy,Eu,Em;const f7e=class xz{constructor(){Zs(this,Rh,void 0),Zs(this,er,void 0),Zs(this,tc,void 0),Zs(this,$m,void 0),Zs(this,gy,void 0),Zs(this,vy,void 0),Zs(this,Eo,void 0),Zs(this,nc,void 0),Zs(this,Vh,void 0),Zs(this,_y,void 0),Zs(this,Fh,void 0),Zs(this,Am,void 0),Zs(this,yy,void 0),Zs(this,Eu,void 0),Zs(this,Em,void 0),fs(this,Rh,!1),fs(this,er,"Idle"),fs(this,tc,[]),fs(this,$m,()=>{}),fs(this,gy,new iN),fs(this,vy,new txe),fs(this,Eo,new Map),fs(this,nc,new Map),fs(this,Vh,new exe(St(this,gy),St(this,vy))),fs(this,_y,()=>{const e=i7e(async i=>{await Promise.all(St(this,tc).map(s=>s(i)))}),n=[mz,yz,wz,vz,kz,Cz,o7e(this),e];St(this,Fh).call(this,n,St(this,nc))}),fs(this,Fh,(e,n)=>{e.forEach(i=>{const s=St(this,Vh).produce(St(this,Rh)?i.meta:void 0),o=i(s);n.set(i,{ctx:s,handler:o,cleanup:void 0})})}),fs(this,Am,(e,n=!1)=>Promise.all([e].flat().map(i=>{const s=St(this,Eo).get(i),o=s==null?void 0:s.cleanup;return n?St(this,Eo).delete(i):St(this,Eo).set(i,{ctx:void 0,handler:void 0,cleanup:void 0}),typeof o=="function"?o():o}))),fs(this,yy,async()=>{await Promise.all([...St(this,nc).entries()].map(([e,{cleanup:n}])=>typeof n=="function"?n():n)),St(this,nc).clear()}),fs(this,Eu,e=>{fs(this,er,e),St(this,$m).call(this,e)}),fs(this,Em,e=>[...e.entries()].map(async([n,i])=>{const{ctx:s,handler:o}=i;if(!o)return;const r=await o();e.set(n,{ctx:s,handler:o,cleanup:r})})),this.enableInspector=(e=!0)=>(fs(this,Rh,e),this),this.onStatusChange=e=>(fs(this,$m,e),this),this.config=e=>(St(this,tc).push(e),this),this.removeConfig=e=>(fs(this,tc,St(this,tc).filter(n=>n!==e)),this),this.use=e=>{const n=[e].flat();return n.flat().forEach(i=>{St(this,Eo).set(i,{ctx:void 0,handler:void 0,cleanup:void 0})}),St(this,er)==="Created"&&St(this,Fh).call(this,n,St(this,Eo)),this},this.remove=async e=>St(this,er)==="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(e))},50)})):(await St(this,Am).call(this,[e].flat(),!0),this),this.create=async()=>St(this,er)==="OnCreate"?this:(St(this,er)==="Created"&&await this.destroy(),St(this,Eu).call(this,"OnCreate"),St(this,_y).call(this),St(this,Fh).call(this,[...St(this,Eo).keys()],St(this,Eo)),await Promise.all([St(this,Em).call(this,St(this,nc)),St(this,Em).call(this,St(this,Eo))].flat()),St(this,Eu).call(this,"Created"),this),this.destroy=async(e=!1)=>St(this,er)==="Destroyed"||St(this,er)==="OnDestroy"?this:St(this,er)==="OnCreate"?new Promise(n=>{setTimeout(()=>{n(this.destroy(e))},50)}):(e&&fs(this,tc,[]),St(this,Eu).call(this,"OnDestroy"),await St(this,Am).call(this,[...St(this,Eo).keys()],e),await St(this,yy).call(this),St(this,Eu).call(this,"Destroyed"),this),this.action=e=>e(St(this,Vh)),this.inspect=()=>St(this,Rh)?[...St(this,nc).values(),...St(this,Eo).values()].map(({ctx:e})=>{var n;return(n=e==null?void 0:e.inspector)==null?void 0:n.read()}).filter(e=>!!e):(console.warn("[Milkdown]: You are trying to collect inspection when inspector is disabled, please enable inspector by `editor.enableInspector()` first."),[])}static make(){return new xz}get ctx(){return St(this,Vh)}get status(){return St(this,er)}};Rh=new WeakMap,er=new WeakMap,tc=new WeakMap,$m=new WeakMap,gy=new WeakMap,vy=new WeakMap,Eo=new WeakMap,nc=new WeakMap,Vh=new WeakMap,_y=new WeakMap,Fh=new WeakMap,Am=new WeakMap,yy=new WeakMap,Eu=new WeakMap,Em=new WeakMap;let p7e=f7e,m7e=t=>crypto.getRandomValues(new Uint8Array(t)),g7e=(t,e,n)=>{let i=(2<<Math.log2(t.length-1))-1,s=-~(1.6*i*e/t.length);return(o=e)=>{let r="";for(;;){let a=n(s),l=s|0;for(;l--;)if(r+=t[a[l]&i]||"",r.length>=o)return r}}},v7e=(t,e=21)=>g7e(t,e|0,m7e);v7e("abcedfghicklmn",10);function on(t,e){const n=r7e(t),i=s=>async()=>{i.key=n,await s.wait(vg);const o=e(s);return s.get(gn).create(n,o),i.run=r=>s.get(gn).call(t,r),()=>{s.get(gn).remove(n)}};return i}function Co(t){const e=n=>async()=>{await n.wait(Yr);const i=t(n);return n.update(v1,s=>[...s,i]),e.inputRule=i,()=>{n.update(v1,s=>s.filter(o=>o!==i))}};return e}function _7e(t,e){const n=i=>async()=>{const s=e(i);return i.update(mf,o=>[...o.filter(r=>r[0]!==t),[t,s]]),n.id=t,n.schema=s,()=>{i.update(mf,o=>o.filter(([r])=>r!==t))}};return n.type=i=>{const s=i.get(qr).marks[t];if(!s)throw XCe(t);return s},n}function _5(t,e){const n=i=>async()=>{const s=e(i);return i.update(pf,o=>[...o.filter(r=>r[0]!==t),[t,s]]),n.id=t,n.schema=s,()=>{i.update(pf,o=>o.filter(([r])=>r!==t))}};return n.type=i=>{const s=i.get(qr).nodes[t];if(!s)throw nN(t);return s},n}function Ls(t){let e;const n=i=>async()=>(await i.wait(Yr),e=t(i),i.update(ta,s=>[...s,e]),()=>{i.update(ta,s=>s.filter(o=>o!==e))});return n.plugin=()=>e,n.key=()=>e.spec.key,n}function y7e(t){const e=n=>async()=>{await n.wait(Yr);const i=t(n),s=PB(i);return n.update(ta,o=>[...o,s]),e.keymap=i,()=>{n.update(ta,o=>o.filter(r=>r!==s))}};return e}function Sz(t,e){const n=i=>async()=>{await i.wait(Yr);const s=e(i);return t.type(i)instanceof B0?i.update(y1,o=>[...o,[t.id,s]]):i.update(b1,o=>[...o,[t.id,s]]),n.view=s,n.type=t,()=>{t.type(i)instanceof B0?i.update(y1,o=>o.filter(r=>r[0]!==t.id)):i.update(b1,o=>o.filter(r=>r[0]!==t.id))}};return n}function ms(t,e){const n=kn(t,e),i=s=>(s.inject(n),()=>()=>{s.remove(n)});return i.key=n,i}function Hs(t,e){const n=ms(e,t),i=_5(t,o=>o.get(n.key)(o)),s=[n,i];return s.id=i.id,s.node=i,s.type=o=>i.type(o),s.schema=i.schema,s.ctx=n,s.key=n.key,s.extendSchema=o=>r=>()=>{const a=r.get(n.key),l=o(a)(r);r.update(pf,c=>[...c.filter(u=>u[0]!==t),[t,l]]),s.schema=l},s}function dv(t,e){const n=ms(e,t),i=_7e(t,o=>o.get(n.key)(o)),s=[n,i];return s.id=i.id,s.mark=i,s.type=i.type,s.schema=i.schema,s.ctx=n,s.key=n.key,s.extendSchema=o=>r=>()=>{const a=r.get(n.key),l=o(a)(r);r.update(mf,c=>[...c.filter(u=>u[0]!==t),[t,l]]),s.schema=l},s}function xo(t,e){const n=Object.fromEntries(Object.entries(e).map(([r,{shortcuts:a}])=>[r,a])),i=ms(n,`${t}Keymap`),s=y7e(r=>{const a=r.get(i.key),l=Object.entries(e).flatMap(([c,{command:u}])=>[a[c]].flat().map(d=>[d,u(r)]));return Object.fromEntries(l)}),o=[i,s];return o.ctx=i,o.shortcuts=s,o.key=i.key,o.keymap=s.keymap,o}const ca=(t,e=()=>({}))=>ms(e,`${t}Attr`),hv=(t,e=()=>({}))=>ms(e,`${t}Attr`);function Gd(t,e,n){const i=ms(n??{},t),s=r=>async()=>{await r.wait(ad);const a={plugin:e(r),options:r.get(i.key)};return r.update(_1,l=>[...l,a]),()=>{r.update(_1,l=>l.filter(c=>c!==a))}},o=[i,s];return o.id=t,o.plugin=s,o.options=i,o}function b7e(){return t=>{const e=t.get(Vn);return t.get(vf)(e.state.doc)}}function w7e(t,e=!1){return n=>{const i=n.get(Vn),s=n.get(gf)(t);if(!s)return;if(!e){const{state:c}=i;return i.dispatch(c.tr.replace(0,c.doc.content.size,new rt(s.content,0,0)))}const o=n.get(qr),r=n.get(hy),a=n.get(ta),l=zu.create({schema:o,doc:s,plugins:a,...r});i.updateState(l)}}function I2(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const k7e=[["ß","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"]],C7e=(t,e)=>{for(const[n,i]of e)t=t.replace(new RegExp(I2(n),"g"),i);return t};function x7e(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={customReplacements:[],...e};const n=new Map([...k7e,...e.customReplacements]);return t=t.normalize(),t=C7e(t,n),t=t.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),t}const S7e=[["&"," and "],["🦄"," unicorn "],["♥"," love "]],$7e=t=>t.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"),A7e=(t,e)=>{const n=I2(e);return t.replace(new RegExp(`${n}{2,}`,"g"),e).replace(new RegExp(`^${n}|${n}$`,"g"),"")},E7e=t=>{let e="a-z\\d";if(e+=t.lowercase?"":"A-Z",t.preserveCharacters.length>0)for(const n of t.preserveCharacters){if(n===t.separator)throw new Error(`The separator character \`${t.separator}\` cannot be included in preserved characters: ${t.preserveCharacters}`);e+=I2(n)}return new RegExp(`[^${e}]+`,"g")};function M7e(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={separator:"-",lowercase:!0,decamelize:!0,customReplacements:[],preserveLeadingUnderscore:!1,preserveTrailingDash:!1,preserveCharacters:[],...e};const n=e.preserveLeadingUnderscore&&t.startsWith("_"),i=e.preserveTrailingDash&&t.endsWith("-"),s=new Map([...S7e,...e.customReplacements]);t=x7e(t,{customReplacements:s}),e.decamelize&&(t=$7e(t));const o=E7e(e);return e.lowercase&&(t=t.toLowerCase()),t=t.replace(/([a-zA-Z\d]+)'([ts])(\s|$)/g,"$1$2$3"),t=t.replace(o,e.separator),t=t.replace(/\\/g,""),e.separator&&(t=A7e(t,e.separator)),n&&(t=`_${t}`),i&&(t=`${t}-`),t}function T7e(t,e){return function(n,i){let{$from:s,$to:o,node:r}=n.selection;if(r&&r.isBlock||s.depth<2||!s.sameParent(o))return!1;let a=s.node(-1);if(a.type!=t)return!1;if(s.parent.content.size==0&&s.node(-1).childCount==s.indexAfter(-1)){if(s.depth==3||s.node(-3).type!=t||s.index(-2)!=s.node(-2).childCount-1)return!1;if(i){let d=st.empty,h=s.index(-1)?1:s.index(-2)?2:3;for(let w=s.depth-h;w>=s.depth-3;w--)d=st.from(s.node(w).copy(d));let f=s.indexAfter(-1)<s.node(-2).childCount?1:s.indexAfter(-2)<s.node(-3).childCount?2:3;d=d.append(st.from(t.createAndFill()));let p=s.before(s.depth-(h-1)),m=n.tr.replace(p,s.after(-f),new rt(d,4-h,0)),b=-1;m.doc.nodesBetween(p,m.doc.content.size,(w,k)=>{if(b>-1)return!1;w.isTextblock&&w.content.size==0&&(b=k+1)}),b>-1&&m.setSelection(Ut.near(m.doc.resolve(b))),i(m.scrollIntoView())}return!0}let l=o.pos==s.end()?a.contentMatchAt(0).defaultType:null,c=n.tr.delete(s.pos,o.pos),u=l?[e?{type:t,attrs:e}:null,{type:l}]:void 0;return fg(c.doc,s.pos,2,u)?(i&&i(c.split(s.pos,2,u).scrollIntoView()),!0):!1}}function $z(t){return function(e,n){let{$from:i,$to:s}=e.selection,o=i.blockRange(s,r=>r.childCount>0&&r.firstChild.type==t);return o?n?i.node(o.depth-1).type==t?P7e(e,n,t,o):I7e(e,n,o):!0:!1}}function P7e(t,e,n,i){let s=t.tr,o=i.end,r=i.$to.end(i.depth);o<r&&(s.step(new Pi(o-1,r,o,r,new rt(st.from(n.create(null,i.parent.copy())),1,0),1,!0)),i=new fN(s.doc.resolve(i.$from.pos),s.doc.resolve(r),i.depth));const a=w2(i);if(a==null)return!1;s.lift(i,a);let l=s.mapping.map(o,-1)-1;return k2(s.doc,l)&&s.join(l),e(s.scrollIntoView()),!0}function I7e(t,e,n){let i=t.tr,s=n.parent;for(let f=n.end,p=n.endIndex-1,m=n.startIndex;p>m;p--)f-=s.child(p).nodeSize,i.delete(f-1,f+1);let o=i.doc.resolve(n.start),r=o.nodeAfter;if(i.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==s.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,r.content.append(l?st.empty:st.from(s))))return!1;let d=o.pos,h=d+r.nodeSize;return i.step(new Pi(d-(a?1:0),h+(l?1:0),d+1,h-1,new rt((a?st.empty:st.from(s.copy(st.empty))).append(l?st.empty:st.from(s.copy(st.empty))),a?0:1,l?0:1),a?0:1)),e(i.scrollIntoView()),!0}function L7e(t){return function(e,n){let{$from:i,$to:s}=e.selection,o=i.blockRange(s,c=>c.childCount>0&&c.firstChild.type==t);if(!o)return!1;let r=o.startIndex;if(r==0)return!1;let a=o.parent,l=a.child(r-1);if(l.type!=t)return!1;if(n){let c=l.lastChild&&l.lastChild.type==a.type,u=st.from(c?t.create():null),d=new rt(st.from(t.create(null,st.from(a.type.create(null,u)))),c?3:1,0),h=o.start,f=o.end;n(e.tr.step(new Pi(h-(c?3:1),f,h,f,d,1,!0)).scrollIntoView())}return!0}}function O7e(t){const e=new Map;if(!t||!t.type)throw new Error("mdast-util-definitions expected node");return qd(t,"definition",function(i){const s=BM(i.identifier);s&&!e.get(s)&&e.set(s,i)}),n;function n(i){const s=BM(i);return e.get(s)}}function BM(t){return String(t||"").toUpperCase()}function D7e(){return function(t){const e=O7e(t);qd(t,function(n,i,s){if(n.type==="definition"&&s!==void 0&&typeof i=="number")return s.children.splice(i,1),[KC,i];if(n.type==="imageReference"||n.type==="linkReference"){const o=e(n.identifier);if(o&&s&&typeof i=="number")return s.children[i]=n.type==="imageReference"?{type:"image",url:o.url,title:o.title,alt:n.alt}:{type:"link",url:o.url,title:o.title,children:n.children},[KC,i]}})}}function Az(t,e){var n;if(!(e.childCount>=1&&((n=e.lastChild)==null?void 0:n.type.name)==="hardbreak")){t.next(e.content);return}const i=[];e.content.forEach((s,o,r)=>{r!==e.childCount-1&&i.push(s)}),t.next(st.fromArray(i))}function Ve(t,e){return Object.assign(t,{meta:{package:"@milkdown/preset-commonmark",...e}}),t}const y5=hv("emphasis");Ve(y5,{displayName:"Attr<emphasis>",group:"Emphasis"});const Xd=dv("emphasis",t=>({attrs:{marker:{default:t.get(gg).emphasis||"*"}},parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:e=>e==="italic"}],toDOM:e=>["em",t.get(y5.key)(e)],parseMarkdown:{match:e=>e.type==="emphasis",runner:(e,n,i)=>{e.openMark(i,{marker:n.marker}),e.next(n.children),e.closeMark(i)}},toMarkdown:{match:e=>e.type.name==="emphasis",runner:(e,n)=>{e.withMark(n,"emphasis",void 0,{marker:n.attrs.marker})}}}));Ve(Xd.mark,{displayName:"MarkSchema<emphasis>",group:"Emphasis"});Ve(Xd.ctx,{displayName:"MarkSchemaCtx<emphasis>",group:"Emphasis"});const L2=on("ToggleEmphasis",t=>()=>A2(Xd.type(t)));Ve(L2,{displayName:"Command<toggleEmphasisCommand>",group:"Emphasis"});const Ez=Co(t=>av(/(?:^|[^*])\*([^*]+)\*$/,Xd.type(t),{getAttr:()=>({marker:"*"}),updateCaptured:({fullMatch:e,start:n})=>e.startsWith("*")?{}:{fullMatch:e.slice(1),start:n+1}}));Ve(Ez,{displayName:"InputRule<emphasis>|Star",group:"Emphasis"});const Mz=Co(t=>av(/(?:^|[^_])_([^_]+)_$/,Xd.type(t),{getAttr:()=>({marker:"_"}),updateCaptured:({fullMatch:e,start:n})=>e.startsWith("_")?{}:{fullMatch:e.slice(1),start:n+1}}));Ve(Mz,{displayName:"InputRule<emphasis>|Underscore",group:"Emphasis"});const b5=xo("emphasisKeymap",{ToggleEmphasis:{shortcuts:"Mod-i",command:t=>{const e=t.get(gn);return()=>e.call(L2.key)}}});Ve(b5.ctx,{displayName:"KeymapCtx<emphasis>",group:"Emphasis"});Ve(b5.shortcuts,{displayName:"Keymap<emphasis>",group:"Emphasis"});const w5=hv("strong");Ve(w5,{displayName:"Attr<strong>",group:"Strong"});const _p=dv("strong",t=>({attrs:{marker:{default:t.get(gg).strong||"*"}},parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-style",getAttrs:e=>e==="bold"}],toDOM:e=>["strong",t.get(w5.key)(e)],parseMarkdown:{match:e=>e.type==="strong",runner:(e,n,i)=>{e.openMark(i,{marker:n.marker}),e.next(n.children),e.closeMark(i)}},toMarkdown:{match:e=>e.type.name==="strong",runner:(e,n)=>{e.withMark(n,"strong",void 0,{marker:n.attrs.marker})}}}));Ve(_p.mark,{displayName:"MarkSchema<strong>",group:"Strong"});Ve(_p.ctx,{displayName:"MarkSchemaCtx<strong>",group:"Strong"});const O2=on("ToggleStrong",t=>()=>A2(_p.type(t)));Ve(O2,{displayName:"Command<toggleStrongCommand>",group:"Strong"});const Tz=Co(t=>av(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,_p.type(t),{getAttr:e=>({marker:e[0].startsWith("*")?"*":"_"})}));Ve(Tz,{displayName:"InputRule<strong>",group:"Strong"});const k5=xo("strongKeymap",{ToggleBold:{shortcuts:["Mod-b"],command:t=>{const e=t.get(gn);return()=>e.call(O2.key)}}});Ve(k5.ctx,{displayName:"KeymapCtx<strong>",group:"Strong"});Ve(k5.shortcuts,{displayName:"Keymap<strong>",group:"Strong"});const C5=hv("inlineCode");Ve(C5,{displayName:"Attr<inlineCode>",group:"InlineCode"});const ll=dv("inlineCode",t=>({priority:100,code:!0,inclusive:!1,parseDOM:[{tag:"code"}],toDOM:e=>["code",t.get(C5.key)(e)],parseMarkdown:{match:e=>e.type==="inlineCode",runner:(e,n,i)=>{e.openMark(i),e.addText(n.value),e.closeMark(i)}},toMarkdown:{match:e=>e.type.name==="inlineCode",runner:(e,n,i)=>{e.withMark(n,"inlineCode",i.text||"")}}}));Ve(ll.mark,{displayName:"MarkSchema<inlineCode>",group:"InlineCode"});Ve(ll.ctx,{displayName:"MarkSchemaCtx<inlineCode>",group:"InlineCode"});const D2=on("ToggleInlineCode",t=>()=>(e,n)=>{const{selection:i,tr:s}=e;if(i.empty)return!1;const{from:o,to:r}=i;return e.doc.rangeHasMark(o,r,ll.type(t))?(n==null||n(s.removeMark(o,r,ll.type(t))),!0):(Object.keys(e.schema.marks).filter(a=>a!==ll.type.name).map(a=>e.schema.marks[a]).forEach(a=>{s.removeMark(o,r,a)}),n==null||n(s.addMark(o,r,ll.type(t).create())),!0)});Ve(D2,{displayName:"Command<toggleInlineCodeCommand>",group:"InlineCode"});const Pz=Co(t=>av(/(?:\`)([^\`]+)(?:\`)$/,ll.type(t)));Ve(Pz,{displayName:"InputRule<inlineCodeInputRule>",group:"InlineCode"});const x5=xo("inlineCodeKeymap",{ToggleInlineCode:{shortcuts:"Mod-e",command:t=>{const e=t.get(gn);return()=>e.call(D2.key)}}});Ve(x5.ctx,{displayName:"KeymapCtx<inlineCode>",group:"InlineCode"});Ve(x5.shortcuts,{displayName:"Keymap<inlineCode>",group:"InlineCode"});const S5=hv("link");Ve(S5,{displayName:"Attr<link>",group:"Link"});const Gr=dv("link",t=>({attrs:{href:{},title:{default:null}},parseDOM:[{tag:"a[href]",getAttrs:e=>{if(!(e instanceof HTMLElement))throw la(e);return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM:e=>["a",{...t.get(S5.key)(e),...e.attrs}],parseMarkdown:{match:e=>e.type==="link",runner:(e,n,i)=>{const s=n.url,o=n.title;e.openMark(i,{href:s,title:o}),e.next(n.children),e.closeMark(i)}},toMarkdown:{match:e=>e.type.name==="link",runner:(e,n)=>{e.withMark(n,"link",void 0,{title:n.attrs.title,url:n.attrs.href})}}}));Ve(Gr.mark,{displayName:"MarkSchema<link>",group:"Link"});const Iz=on("ToggleLink",t=>(e={})=>A2(Gr.type(t),e));Ve(Iz,{displayName:"Command<toggleLinkCommand>",group:"Link"});const Lz=on("UpdateLink",t=>(e={})=>(n,i)=>{if(!i)return!1;let s,o=-1;const{selection:r}=n,{from:a,to:l}=r;if(n.doc.nodesBetween(a,a===l?l+1:l,(p,m)=>{if(Gr.type(t).isInSet(p.marks))return s=p,o=m,!1}),!s)return!1;const c=s.marks.find(({type:p})=>p===Gr.type(t));if(!c)return!1;const u=o,d=o+s.nodeSize,{tr:h}=n,f=Gr.type(t).create({...c.attrs,...e});return f?(i(h.removeMark(u,d,c).addMark(u,d,f).setSelection(new Ot(h.selection.$anchor)).scrollIntoView()),!0):!1});Ve(Lz,{displayName:"Command<updateLinkCommand>",group:"Link"});const Oz=_5("doc",()=>({content:"block+",parseMarkdown:{match:({type:t})=>t==="root",runner:(t,e,n)=>{t.injectRoot(e,n)}},toMarkdown:{match:t=>t.type.name==="doc",runner:(t,e)=>{t.openNode("root"),t.next(e.content)}}}));Ve(Oz,{displayName:"NodeSchema<doc>",group:"Doc"});const $5=ca("paragraph");Ve($5,{displayName:"Attr<paragraph>",group:"Paragraph"});const Ol=Hs("paragraph",t=>({content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:e=>["p",t.get($5.key)(e),0],parseMarkdown:{match:e=>e.type==="paragraph",runner:(e,n,i)=>{e.openNode(i),n.children?e.next(n.children):e.addText(n.value||""),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="paragraph",runner:(e,n)=>{e.openNode("paragraph"),Az(e,n),e.closeNode()}}}));Ve(Ol.node,{displayName:"NodeSchema<paragraph>",group:"Paragraph"});Ve(Ol.ctx,{displayName:"NodeSchemaCtx<paragraph>",group:"Paragraph"});const A5=on("TurnIntoText",t=>()=>h1(Ol.type(t)));Ve(A5,{displayName:"Command<turnIntoTextCommand>",group:"Paragraph"});const E5=xo("paragraphKeymap",{TurnIntoText:{shortcuts:"Mod-Alt-0",command:t=>{const e=t.get(gn);return()=>e.call(A5.key)}}});Ve(E5.ctx,{displayName:"KeymapCtx<paragraph>",group:"Paragraph"});Ve(E5.shortcuts,{displayName:"Keymap<paragraph>",group:"Paragraph"});const R7e=Array(6).fill(0).map((t,e)=>e+1);function V7e(t){return M7e(t.textContent)}const R2=ms(V7e,"headingIdGenerator");Ve(R2,{displayName:"Ctx<HeadingIdGenerator>",group:"Heading"});const M5=ca("heading");Ve(M5,{displayName:"Attr<heading>",group:"Heading"});const Ea=Hs("heading",t=>{const e=t.get(R2.key);return{content:"inline*",group:"block",defining:!0,attrs:{id:{default:""},level:{default:1}},parseDOM:R7e.map(n=>({tag:`h${n}`,getAttrs:i=>{if(!(i instanceof HTMLElement))throw la(i);return{level:n,id:i.id}}})),toDOM:n=>[`h${n.attrs.level}`,{...t.get(M5.key)(n),id:n.attrs.id||e(n)},0],parseMarkdown:{match:({type:n})=>n==="heading",runner:(n,i,s)=>{const o=i.depth;n.openNode(s,{level:o}),n.next(i.children),n.closeNode()}},toMarkdown:{match:n=>n.type.name==="heading",runner:(n,i)=>{n.openNode("heading",void 0,{depth:i.attrs.level}),Az(n,i),n.closeNode()}}}});Ve(Ea.node,{displayName:"NodeSchema<heading>",group:"Heading"});Ve(Ea.ctx,{displayName:"NodeSchemaCtx<heading>",group:"Heading"});const Dz=Co(t=>_B(/^(?<hashes>#+)\s$/,Ea.type(t),e=>{var n,i;const s=((i=(n=e.groups)==null?void 0:n.hashes)==null?void 0:i.length)||0,o=t.get(Vn),{$from:r}=o.state.selection,a=r.node();if(a.type.name==="heading"){let l=Number(a.attrs.level)+Number(s);return l>6&&(l=6),{level:l}}return{level:s}}));Ve(Dz,{displayName:"InputRule<wrapInHeadingInputRule>",group:"Heading"});const fc=on("WrapInHeading",t=>e=>(e??(e=1),e<1?h1(Ol.type(t)):h1(Ea.type(t),{level:e})));Ve(fc,{displayName:"Command<wrapInHeadingCommand>",group:"Heading"});const T5=on("DowngradeHeading",t=>()=>(e,n,i)=>{const{$from:s}=e.selection,o=s.node();if(o.type!==Ea.type(t)||!e.selection.empty||s.parentOffset!==0)return!1;const r=o.attrs.level-1;return r?(n==null||n(e.tr.setNodeMarkup(e.selection.$from.before(),void 0,{...o.attrs,level:r})),!0):h1(Ol.type(t))(e,n,i)});Ve(T5,{displayName:"Command<downgradeHeadingCommand>",group:"Heading"});const P5=xo("headingKeymap",{TurnIntoH1:{shortcuts:"Mod-Alt-1",command:t=>{const e=t.get(gn);return()=>e.call(fc.key,1)}},TurnIntoH2:{shortcuts:"Mod-Alt-2",command:t=>{const e=t.get(gn);return()=>e.call(fc.key,2)}},TurnIntoH3:{shortcuts:"Mod-Alt-3",command:t=>{const e=t.get(gn);return()=>e.call(fc.key,3)}},TurnIntoH4:{shortcuts:"Mod-Alt-4",command:t=>{const e=t.get(gn);return()=>e.call(fc.key,4)}},TurnIntoH5:{shortcuts:"Mod-Alt-5",command:t=>{const e=t.get(gn);return()=>e.call(fc.key,5)}},TurnIntoH6:{shortcuts:"Mod-Alt-6",command:t=>{const e=t.get(gn);return()=>e.call(fc.key,6)}},DowngradeHeading:{shortcuts:["Delete","Backspace"],command:t=>{const e=t.get(gn);return()=>e.call(T5.key)}}});Ve(P5.ctx,{displayName:"KeymapCtx<heading>",group:"Heading"});Ve(P5.shortcuts,{displayName:"Keymap<heading>",group:"Heading"});const I5=ca("blockquote");Ve(I5,{displayName:"Attr<blockquote>",group:"Blockquote"});const yp=Hs("blockquote",t=>({content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:e=>["blockquote",t.get(I5.key)(e),0],parseMarkdown:{match:({type:e})=>e==="blockquote",runner:(e,n,i)=>{e.openNode(i).next(n.children).closeNode()}},toMarkdown:{match:e=>e.type.name==="blockquote",runner:(e,n)=>{e.openNode("blockquote").next(n.content).closeNode()}}}));Ve(yp.node,{displayName:"NodeSchema<blockquote>",group:"Blockquote"});Ve(yp.ctx,{displayName:"NodeSchemaCtx<blockquote>",group:"Blockquote"});const Rz=Co(t=>i5(/^\s*>\s$/,yp.type(t)));Ve(Rz,{displayName:"InputRule<wrapInBlockquoteInputRule>",group:"Blockquote"});const L5=on("WrapInBlockquote",t=>()=>c5(yp.type(t)));Ve(L5,{displayName:"Command<wrapInBlockquoteCommand>",group:"Blockquote"});const O5=xo("blockquoteKeymap",{WrapInBlockquote:{shortcuts:"Mod-Shift-b",command:t=>{const e=t.get(gn);return()=>e.call(L5.key)}}});Ve(O5.ctx,{displayName:"KeymapCtx<blockquote>",group:"Blockquote"});Ve(O5.shortcuts,{displayName:"Keymap<blockquote>",group:"Blockquote"});const D5=ca("codeBlock",()=>({pre:{},code:{}}));Ve(D5,{displayName:"Attr<codeBlock>",group:"CodeBlock"});const bp=Hs("code_block",t=>({content:"text*",group:"block",marks:"",defining:!0,code:!0,attrs:{language:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>{if(!(e instanceof HTMLElement))throw la(e);return{language:e.dataset.language}}}],toDOM:e=>{const n=t.get(D5.key)(e);return["pre",{...n.pre,"data-language":e.attrs.language},["code",n.code,0]]},parseMarkdown:{match:({type:e})=>e==="code",runner:(e,n,i)=>{const s=n.lang,o=n.value;e.openNode(i,{language:s}),o&&e.addText(o),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="code_block",runner:(e,n)=>{var i;e.addNode("code",void 0,((i=n.content.firstChild)==null?void 0:i.text)||"",{lang:n.attrs.language})}}}));Ve(bp.node,{displayName:"NodeSchema<codeBlock>",group:"CodeBlock"});Ve(bp.ctx,{displayName:"NodeSchemaCtx<codeBlock>",group:"CodeBlock"});const Vz=Co(t=>_B(/^```(?<language>[a-z]*)?[\s\n]$/,bp.type(t),e=>{var n;return{language:((n=e.groups)==null?void 0:n.language)??""}}));Ve(Vz,{displayName:"InputRule<createCodeBlockInputRule>",group:"CodeBlock"});const R5=on("CreateCodeBlock",t=>(e="")=>h1(bp.type(t),{language:e}));Ve(R5,{displayName:"Command<createCodeBlockCommand>",group:"CodeBlock"});const F7e=on("UpdateCodeBlockLanguage",()=>({pos:t,language:e}={pos:-1,language:""})=>(n,i)=>t>=0?(i==null||i(n.tr.setNodeAttribute(t,"language",e)),!0):!1);Ve(F7e,{displayName:"Command<updateCodeBlockLanguageCommand>",group:"CodeBlock"});const V5=xo("codeBlockKeymap",{CreateCodeBlock:{shortcuts:"Mod-Alt-c",command:t=>{const e=t.get(gn);return()=>e.call(R5.key)}}});Ve(V5.ctx,{displayName:"KeymapCtx<codeBlock>",group:"CodeBlock"});Ve(V5.shortcuts,{displayName:"Keymap<codeBlock>",group:"CodeBlock"});const F5=ca("image");Ve(F5,{displayName:"Attr<image>",group:"Image"});const Kd=Hs("image",t=>({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:e=>{if(!(e instanceof HTMLElement))throw la(e);return{src:e.getAttribute("src")||"",alt:e.getAttribute("alt")||"",title:e.getAttribute("title")||e.getAttribute("alt")||""}}}],toDOM:e=>["img",{...t.get(F5.key)(e),...e.attrs}],parseMarkdown:{match:({type:e})=>e==="image",runner:(e,n,i)=>{const s=n.url,o=n.alt,r=n.title;e.addNode(i,{src:s,alt:o,title:r})}},toMarkdown:{match:e=>e.type.name==="image",runner:(e,n)=>{e.addNode("image",void 0,void 0,{title:n.attrs.title,url:n.attrs.src,alt:n.attrs.alt})}}}));Ve(Kd.node,{displayName:"NodeSchema<image>",group:"Image"});Ve(Kd.ctx,{displayName:"NodeSchemaCtx<image>",group:"Image"});const Fz=on("InsertImage",t=>(e={})=>(n,i)=>{if(!i)return!0;const{src:s="",alt:o="",title:r=""}=e,a=Kd.type(t).create({src:s,alt:o,title:r});return a&&i(n.tr.replaceSelectionWith(a).scrollIntoView()),!0});Ve(Fz,{displayName:"Command<insertImageCommand>",group:"Image"});const Nz=on("UpdateImage",t=>(e={})=>(n,i)=>{const s=Q5e(n.selection,Kd.type(t));if(!s)return!1;const{node:o,pos:r}=s,a={...o.attrs},{src:l,alt:c,title:u}=e;return l!==void 0&&(a.src=l),c!==void 0&&(a.alt=c),u!==void 0&&(a.title=u),i==null||i(n.tr.setNodeMarkup(r,void 0,a).scrollIntoView()),!0});Ve(Nz,{displayName:"Command<updateImageCommand>",group:"Image"});const N7e=Co(t=>new Go(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/,(e,n,i,s)=>{const[o,r,a="",l]=n;return o?e.tr.replaceWith(i,s,Kd.type(t).create({src:a,alt:r,title:l})):null}));Ve(N7e,{displayName:"InputRule<insertImageInputRule>",group:"Image"});const Z0=ca("hardbreak",t=>({"data-type":"hardbreak","data-is-inline":t.attrs.isInline}));Ve(Z0,{displayName:"Attr<hardbreak>",group:"Hardbreak"});const ld=Hs("hardbreak",t=>({inline:!0,group:"inline",attrs:{isInline:{default:!1}},selectable:!1,parseDOM:[{tag:"br"},{tag:'span[data-type="hardbreak"]',getAttrs:()=>({isInline:!0})}],toDOM:e=>e.attrs.isInline?["span",t.get(Z0.key)(e)," "]:["br",t.get(Z0.key)(e)],parseMarkdown:{match:({type:e})=>e==="break",runner:(e,n,i)=>{var s;e.addNode(i,{isInline:!!((s=n.data)!=null&&s.isInline)})}},leafText:()=>`
124 +`,toMarkdown:{match:e=>e.type.name==="hardbreak",runner:(e,n)=>{n.attrs.isInline?e.addNode("text",void 0,`
125 +`):e.addNode("break")}}}));Ve(ld.node,{displayName:"NodeSchema<hardbreak>",group:"Hardbreak"});Ve(ld.ctx,{displayName:"NodeSchemaCtx<hardbreak>",group:"Hardbreak"});const N5=on("InsertHardbreak",t=>()=>(e,n)=>{var i;const{selection:s,tr:o}=e;if(!(s instanceof Ot))return!1;if(s.empty){const r=s.$from.node();if(r.childCount>0&&((i=r.lastChild)==null?void 0:i.type.name)==="hardbreak")return n==null||n(o.replaceRangeWith(s.to-1,s.to,e.schema.node("paragraph")).setSelection(Ut.near(o.doc.resolve(s.to))).scrollIntoView()),!0}return n==null||n(o.setMeta("hardbreak",!0).replaceSelectionWith(ld.type(t).create()).scrollIntoView()),!0});Ve(N5,{displayName:"Command<insertHardbreakCommand>",group:"Hardbreak"});const B5=xo("hardbreakKeymap",{InsertHardbreak:{shortcuts:"Shift-Enter",command:t=>{const e=t.get(gn);return()=>e.call(N5.key)}}});Ve(B5.ctx,{displayName:"KeymapCtx<hardbreak>",group:"Hardbreak"});Ve(B5.shortcuts,{displayName:"Keymap<hardbreak>",group:"Hardbreak"});const z5=ca("hr");Ve(z5,{displayName:"Attr<hr>",group:"Hr"});const wp=Hs("hr",t=>({group:"block",parseDOM:[{tag:"hr"}],toDOM:e=>["hr",t.get(z5.key)(e)],parseMarkdown:{match:({type:e})=>e==="thematicBreak",runner:(e,n,i)=>{e.addNode(i)}},toMarkdown:{match:e=>e.type.name==="hr",runner:e=>{e.addNode("thematicBreak")}}}));Ve(wp.node,{displayName:"NodeSchema<hr>",group:"Hr"});Ve(wp.ctx,{displayName:"NodeSchemaCtx<hr>",group:"Hr"});const Bz=Co(t=>new Go(/^(?:---|___\s|\*\*\*\s)$/,(e,n,i,s)=>{const{tr:o}=e;return n[0]&&o.replaceWith(i-1,s,wp.type(t).create()),o}));Ve(Bz,{displayName:"InputRule<insertHrInputRule>",group:"Hr"});const zz=on("InsertHr",t=>()=>(e,n)=>{if(!n)return!0;const i=Ol.node.type(t).create(),{tr:s,selection:o}=e,{from:r}=o,a=wp.type(t).create();if(!a)return!0;const l=s.replaceSelectionWith(a).insert(r,i),c=Ut.findFrom(l.doc.resolve(r),1,!0);return c&&n(l.setSelection(c).scrollIntoView()),!0});Ve(zz,{displayName:"Command<insertHrCommand>",group:"Hr"});const H5=ca("bulletList");Ve(H5,{displayName:"Attr<bulletList>",group:"BulletList"});const Zd=Hs("bullet_list",t=>({content:"listItem+",group:"block",attrs:{spread:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>{if(!(e instanceof HTMLElement))throw la(e);return{spread:e.dataset.spread}}}],toDOM:e=>["ul",{...t.get(H5.key)(e),"data-spread":e.attrs.spread},0],parseMarkdown:{match:({type:e,ordered:n})=>e==="list"&&!n,runner:(e,n,i)=>{const s=n.spread!=null?`${n.spread}`:"false";e.openNode(i,{spread:s}).next(n.children).closeNode()}},toMarkdown:{match:e=>e.type.name==="bullet_list",runner:(e,n)=>{e.openNode("list",void 0,{ordered:!1,spread:n.attrs.spread==="true"}).next(n.content).closeNode()}}}));Ve(Zd.node,{displayName:"NodeSchema<bulletList>",group:"BulletList"});Ve(Zd.ctx,{displayName:"NodeSchemaCtx<bulletList>",group:"BulletList"});const Hz=Co(t=>i5(/^\s*([-+*])\s$/,Zd.type(t)));Ve(Hz,{displayName:"InputRule<wrapInBulletListInputRule>",group:"BulletList"});const U5=on("WrapInBulletList",t=>()=>c5(Zd.type(t)));Ve(U5,{displayName:"Command<wrapInBulletListCommand>",group:"BulletList"});const j5=xo("bulletListKeymap",{WrapInBulletList:{shortcuts:"Mod-Alt-8",command:t=>{const e=t.get(gn);return()=>e.call(U5.key)}}});Ve(j5.ctx,{displayName:"KeymapCtx<bulletListKeymap>",group:"BulletList"});Ve(j5.shortcuts,{displayName:"Keymap<bulletListKeymap>",group:"BulletList"});const W5=ca("orderedList");Ve(W5,{displayName:"Attr<orderedList>",group:"OrderedList"});const Jd=Hs("ordered_list",t=>({content:"listItem+",group:"block",attrs:{order:{default:1},spread:{default:!1}},parseDOM:[{tag:"ol",getAttrs:e=>{if(!(e instanceof HTMLElement))throw la(e);return{spread:e.dataset.spread,order:e.hasAttribute("start")?Number(e.getAttribute("start")):1}}}],toDOM:e=>["ol",{...t.get(W5.key)(e),...e.attrs.order===1?{}:e.attrs.order,"data-spread":e.attrs.spread},0],parseMarkdown:{match:({type:e,ordered:n})=>e==="list"&&!!n,runner:(e,n,i)=>{const s=n.spread!=null?`${n.spread}`:"true";e.openNode(i,{spread:s}).next(n.children).closeNode()}},toMarkdown:{match:e=>e.type.name==="ordered_list",runner:(e,n)=>{e.openNode("list",void 0,{ordered:!0,start:1,spread:n.attrs.spread==="true"}),e.next(n.content),e.closeNode()}}}));Ve(Jd.node,{displayName:"NodeSchema<orderedList>",group:"OrderedList"});Ve(Jd.ctx,{displayName:"NodeSchemaCtx<orderedList>",group:"OrderedList"});const Uz=Co(t=>i5(/^\s*(\d+)\.\s$/,Jd.type(t),e=>({order:Number(e[1])}),(e,n)=>n.childCount+n.attrs.order===Number(e[1])));Ve(Uz,{displayName:"InputRule<wrapInOrderedListInputRule>",group:"OrderedList"});const Y5=on("WrapInOrderedList",t=>()=>c5(Jd.type(t)));Ve(Y5,{displayName:"Command<wrapInOrderedListCommand>",group:"OrderedList"});const q5=xo("orderedListKeymap",{WrapInOrderedList:{shortcuts:"Mod-Alt-7",command:t=>{const e=t.get(gn);return()=>e.call(Y5.key)}}});Ve(q5.ctx,{displayName:"KeymapCtx<orderedList>",group:"OrderedList"});Ve(q5.shortcuts,{displayName:"Keymap<orderedList>",group:"OrderedList"});const G5=ca("listItem");Ve(G5,{displayName:"Attr<listItem>",group:"ListItem"});const Va=Hs("list_item",t=>({group:"listItem",content:"(paragraph|blockquote) block*",attrs:{label:{default:"•"},listType:{default:"bullet"},spread:{default:"true"}},defining:!0,parseDOM:[{tag:"li",getAttrs:e=>{if(!(e instanceof HTMLElement))throw la(e);return{label:e.dataset.label,listType:e.dataset.listType,spread:e.dataset.spread}}}],toDOM:e=>["li",{...t.get(G5.key)(e),"data-label":e.attrs.label,"data-list-type":e.attrs.listType,"data-spread":e.attrs.spread},0],parseMarkdown:{match:({type:e})=>e==="listItem",runner:(e,n,i)=>{const s=n.label!=null?`${n.label}.`:"•",o=n.label!=null?"ordered":"bullet",r=n.spread!=null?`${n.spread}`:"true";e.openNode(i,{label:s,listType:o,spread:r}),e.next(n.children),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="list_item",runner:(e,n)=>{e.openNode("listItem",void 0,{spread:n.attrs.spread==="true"}),e.next(n.content),e.closeNode()}}}));Ve(Va.node,{displayName:"NodeSchema<listItem>",group:"ListItem"});Ve(Va.ctx,{displayName:"NodeSchemaCtx<listItem>",group:"ListItem"});const X5=on("SinkListItem",t=>()=>L7e(Va.type(t)));Ve(X5,{displayName:"Command<sinkListItemCommand>",group:"ListItem"});const K5=on("LiftListItem",t=>()=>$z(Va.type(t)));Ve(K5,{displayName:"Command<liftListItemCommand>",group:"ListItem"});const Z5=on("SplitListItem",t=>()=>T7e(Va.type(t)));Ve(Z5,{displayName:"Command<splitListItemCommand>",group:"ListItem"});function B7e(t){return(e,n,i)=>{const{selection:s}=e;if(!(s instanceof Ot))return!1;const{empty:o,$from:r}=s;if(!o||r.parentOffset!==0)return!1;const a=r.node(-1);return a.type!==Va.type(t)||a.firstChild!==r.node()||r.node(-2).childCount>1?!1:$z(Va.type(t))(e,n,i)}}const J5=on("LiftFirstListItem",t=>()=>B7e(t));Ve(J5,{displayName:"Command<liftFirstListItemCommand>",group:"ListItem"});const Q5=xo("listItemKeymap",{NextListItem:{shortcuts:"Enter",command:t=>{const e=t.get(gn);return()=>e.call(Z5.key)}},SinkListItem:{shortcuts:["Tab","Mod-]"],command:t=>{const e=t.get(gn);return()=>e.call(X5.key)}},LiftListItem:{shortcuts:["Shift-Tab","Mod-["],command:t=>{const e=t.get(gn);return()=>e.call(K5.key)}},LiftFirstListItem:{shortcuts:["Backspace","Delete"],command:t=>{const e=t.get(gn);return()=>e.call(J5.key)}}});Ve(Q5.ctx,{displayName:"KeymapCtx<listItem>",group:"ListItem"});Ve(Q5.shortcuts,{displayName:"Keymap<listItem>",group:"ListItem"});const jz=_5("text",()=>({group:"inline",parseMarkdown:{match:({type:t})=>t==="text",runner:(t,e)=>{t.addText(e.value)}},toMarkdown:{match:t=>t.type.name==="text",runner:(t,e)=>{t.addNode("text",void 0,e.text)}}}));Ve(jz,{displayName:"NodeSchema<text>",group:"Text"});const eS=ca("html");Ve(eS,{displayName:"Attr<html>",group:"Html"});const tS=Hs("html",t=>({atom:!0,group:"inline",inline:!0,attrs:{value:{default:""}},toDOM:e=>{const n=document.createElement("span"),i={...t.get(eS.key)(e),"data-value":e.attrs.value,"data-type":"html"};return n.textContent=e.attrs.value,["span",i,e.attrs.value]},parseDOM:[{tag:'span[data-type="html"]',getAttrs:e=>({value:e.dataset.value??""})}],parseMarkdown:{match:({type:e})=>e==="html",runner:(e,n,i)=>{e.addNode(i,{value:n.value})}},toMarkdown:{match:e=>e.type.name==="html",runner:(e,n)=>{e.addNode("html",void 0,n.attrs.value)}}}));Ve(tS.node,{displayName:"NodeSchema<html>",group:"Html"});Ve(tS.ctx,{displayName:"NodeSchemaCtx<html>",group:"Html"});const z7e=[Oz,$5,Ol,R2,M5,Ea,Z0,ld,I5,yp,D5,bp,z5,wp,F5,Kd,H5,Zd,W5,Jd,G5,Va,y5,Xd,w5,_p,C5,ll,S5,Gr,eS,tS,jz].flat(),H7e=[Rz,Hz,Uz,Vz,Bz,Dz].flat(),U7e=[Ez,Mz,Pz,Tz],j7e=[A5,L5,fc,T5,R5,N5,zz,Fz,Nz,Y5,U5,X5,Z5,K5,J5,L2,D2,O2,Iz,Lz],W7e=[O5,V5,B5,P5,Q5,q5,j5,E5,b5,x5,k5].flat(),nS=Gd("remarkAddOrderInList",()=>()=>t=>{qd(t,"list",e=>{if(e.ordered){const n=e.start??1;e.children.forEach((i,s)=>{i.label=s+n})}})});Ve(nS.plugin,{displayName:"Remark<remarkAddOrderInListPlugin>",group:"Remark"});Ve(nS.options,{displayName:"RemarkConfig<remarkAddOrderInListPlugin>",group:"Remark"});const sS=Gd("remarkLineBreak",()=>()=>t=>{const e=/[\t ]*(?:\r?\n|\r)/g;qd(t,"text",(n,i,s)=>{if(!n.value||typeof n.value!="string")return;const o=[];let r=0;e.lastIndex=0;let a=e.exec(n.value);for(;a;){const l=a.index;r!==l&&o.push({type:"text",value:n.value.slice(r,l)}),o.push({type:"break",data:{isInline:!0}}),r=l+a[0].length,a=e.exec(n.value)}if(o.length>0&&s&&typeof i=="number")return r<n.value.length&&o.push({type:"text",value:n.value.slice(r)}),s.children.splice(i,1,...o),i+o.length})});Ve(sS.plugin,{displayName:"Remark<remarkLineBreak>",group:"Remark"});Ve(sS.options,{displayName:"RemarkConfig<remarkLineBreak>",group:"Remark"});const iS=Gd("remarkInlineLink",()=>D7e);Ve(iS.plugin,{displayName:"Remark<remarkInlineLinkPlugin>",group:"Remark"});Ve(iS.options,{displayName:"RemarkConfig<remarkInlineLinkPlugin>",group:"Remark"});const Y7e=t=>!!t.children,q7e=t=>t.type==="html";function G7e(t,e){return n(t,0,null)[0];function n(i,s,o){if(Y7e(i)){const r=[];for(let a=0,l=i.children.length;a<l;a++){const c=i.children[a];if(c){const u=n(c,a,i);if(u)for(let d=0,h=u.length;d<h;d++){const f=u[d];f&&r.push(f)}}}i.children=r}return e(i,s,o)}}const oS=Gd("remarkHTMLTransformer",()=>()=>t=>{G7e(t,(e,n,i)=>q7e(e)?((i==null?void 0:i.type)==="root"&&(e.children=[{...e}],delete e.value,e.type="paragraph"),[e]):[e])});Ve(oS.plugin,{displayName:"Remark<remarkHtmlTransformer>",group:"Remark"});Ve(oS.options,{displayName:"RemarkConfig<remarkHtmlTransformer>",group:"Remark"});const rS=Gd("remarkMarker",()=>()=>(t,e)=>{const n=i=>e.value.charAt(i.position.start.offset);qd(t,i=>["strong","emphasis"].includes(i.type),i=>{i.marker=n(i)})});Ve(rS.plugin,{displayName:"Remark<remarkMarker>",group:"Remark"});Ve(rS.options,{displayName:"RemarkConfig<remarkMarker>",group:"Remark"});const Wz=Ls(()=>{let t=!1;const e=new ps("MILKDOWN_INLINE_NODES_CURSOR"),n=new rs({key:e,state:{init(){return!1},apply(i){if(!i.selection.empty)return!1;const s=i.selection.$from,o=s.nodeBefore,r=s.nodeAfter;return!!(o&&r&&o.isInline&&!o.isText&&r.isInline&&!r.isText)}},props:{handleDOMEvents:{compositionend:(i,s)=>t?(t=!1,requestAnimationFrame(()=>{if(n.getState(i.state)){const o=i.state.selection.from;s.preventDefault(),i.dispatch(i.state.tr.insertText(s.data||"",o))}}),!0):!1,compositionstart:i=>(n.getState(i.state)&&(t=!0),!1),beforeinput:(i,s)=>{if(n.getState(i.state)&&s instanceof InputEvent&&s.data&&!t){const o=i.state.selection.from;return s.preventDefault(),i.dispatch(i.state.tr.insertText(s.data||"",o)),!0}return!1}},decorations(i){if(n.getState(i)){const s=i.selection.$from.pos,o=document.createElement("span"),r=Fs.widget(s,o,{side:-1}),a=document.createElement("span"),l=Fs.widget(s,a);return setTimeout(()=>{o.contentEditable="true",a.contentEditable="true"}),Kn.create(i.doc,[r,l])}return Kn.empty}}});return n});Ve(Wz,{displayName:"Prose<inlineNodesCursorPlugin>",group:"Prose"});const Yz=Ls(t=>new rs({key:new ps("MILKDOWN_HARDBREAK_MARKS"),appendTransaction:(e,n,i)=>{if(!e.length)return;const[s]=e;if(!s)return;const[o]=s.steps;if(s.getMeta("hardbreak")){if(!(o instanceof si))return;const{from:r}=o;return i.tr.setNodeMarkup(r,ld.type(t),void 0,[])}if(o instanceof al){let r=i.tr;const{from:a,to:l}=o;return i.doc.nodesBetween(a,l,(c,u)=>{c.type===ld.type(t)&&(r=r.setNodeMarkup(u,ld.type(t),void 0,[]))}),r}}}));Ve(Yz,{displayName:"Prose<hardbreakClearMarkPlugin>",group:"Prose"});const aS=ms(["table","code_block"],"hardbreakFilterNodes");Ve(aS,{displayName:"Ctx<hardbreakFilterNodes>",group:"Prose"});const qz=Ls(t=>{const e=t.get(aS.key);return new rs({key:new ps("MILKDOWN_HARDBREAK_FILTER"),filterTransaction:(n,i)=>{const s=n.getMeta("hardbreak"),[o]=n.steps;if(s&&o){const{from:r}=o,a=i.doc.resolve(r);let l=a.depth,c=!0;for(;l>0;)e.includes(a.node(l).type.name)&&(c=!1),l--;return c}return!0}})});Ve(qz,{displayName:"Prose<hardbreakFilterPlugin>",group:"Prose"});const Gz=Ls(t=>{const e=new ps("MILKDOWN_HEADING_ID"),n=i=>{if(i.composing)return;const s=t.get(R2.key),o=i.state.tr.setMeta("addToHistory",!1);let r=!1;i.state.doc.descendants((a,l)=>{if(a.type===Ea.type(t)){if(a.textContent.trim().length===0)return;const c=a.attrs,u=s(a);c.id!==u&&(r=!0,o.setMeta(e,!0).setNodeMarkup(l,void 0,{...c,id:u}))}}),r&&i.dispatch(o)};return new rs({key:e,view:i=>(n(i),{update:(s,o)=>{s.state.doc.eq(o.doc)||n(s)}})})});Ve(Gz,{displayName:"Prose<syncHeadingIdPlugin>",group:"Prose"});const Xz=Ls(t=>{const e=n=>{if(n.composing||!n.editable)return;const i=Jd.type(t),s=Zd.type(t),o=Va.type(t),r=n.state,a=(u,d)=>{let h=!1;const f=`${d+1}.`;return u.label!==f&&(u.label=f,h=!0),h};let l=r.tr,c=!1;r.doc.descendants((u,d,h,f)=>{if(u.type===s){const p=u.maybeChild(0);(p==null?void 0:p.type)===o&&p.attrs.listType==="ordered"&&(c=!0,l.setNodeMarkup(d,i,{spread:"true"}),u.descendants((m,b,w,k)=>{if(m.type===o){const C={...m.attrs};a(C,k)&&(l=l.setNodeMarkup(b,void 0,C))}return!1}))}else if(u.type===o&&(h==null?void 0:h.type)===i){const p={...u.attrs};let m=!1;p.listType!=="ordered"&&(p.listType="ordered",m=!0),h!=null&&h.maybeChild(0)&&(m=a(p,f)),m&&(l=l.setNodeMarkup(d,void 0,p),c=!0)}}),c&&n.dispatch(l.setMeta("addToHistory",!1))};return new rs({key:new ps("MILKDOWN_KEEP_LIST_ORDER"),view:n=>(e(n),{update:i=>{e(i)}})})});Ve(Xz,{displayName:"Prose<syncListOrderPlugin>",group:"Prose"});const X7e=[Yz,aS,qz,Wz,nS,iS,sS,oS,rS,Gz,Xz].flat(),K7e=[z7e,H7e,U7e,j7e,W7e,X7e].flat();var kx,Cx;if(typeof WeakMap<"u"){let t=new WeakMap;kx=e=>t.get(e),Cx=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;kx=i=>{for(let s=0;s<t.length;s+=2)if(t[s]==i)return t[s+1]},Cx=(i,s)=>(n==10&&(n=0),t[n++]=i,t[n++]=s)}var Pn=class{constructor(t,e,n,i){this.width=t,this.height=e,this.map=n,this.problems=i}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const i=e%this.width,s=e/this.width|0;let o=i+1,r=s+1;for(let a=1;o<this.width&&this.map[e+a]==n;a++)o++;for(let a=1;r<this.height&&this.map[e+this.width*a]==n;a++)r++;return{left:i,top:s,right:o,bottom:r}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:i,right:s,top:o,bottom:r}=this.findCell(t);return e=="horiz"?(n<0?i==0:s==this.width)?null:this.map[o*this.width+(n<0?i-1:s)]:(n<0?o==0:r==this.height)?null:this.map[i+this.width*(n<0?o-1:r)]}rectBetween(t,e){const{left:n,right:i,top:s,bottom:o}=this.findCell(t),{left:r,right:a,top:l,bottom:c}=this.findCell(e);return{left:Math.min(n,r),top:Math.min(s,l),right:Math.max(i,a),bottom:Math.max(o,c)}}cellsInRect(t){const e=[],n={};for(let i=t.top;i<t.bottom;i++)for(let s=t.left;s<t.right;s++){const o=i*this.width+s,r=this.map[o];n[r]||(n[r]=!0,!(s==t.left&&s&&this.map[o-1]==r||i==t.top&&i&&this.map[o-this.width]==r)&&e.push(r))}return e}positionAt(t,e,n){for(let i=0,s=0;;i++){const o=s+n.child(i).nodeSize;if(i==t){let r=e+t*this.width;const a=(t+1)*this.width;for(;r<a&&this.map[r]<s;)r++;return r==a?o-1:this.map[r]}s=o}}static get(t){return kx(t)||Cx(t,Z7e(t))}};function Z7e(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=J7e(t),n=t.childCount,i=[];let s=0,o=null;const r=[];for(let c=0,u=e*n;c<u;c++)i[c]=0;for(let c=0,u=0;c<n;c++){const d=t.child(c);u++;for(let p=0;;p++){for(;s<i.length&&i[s]!=0;)s++;if(p==d.childCount)break;const m=d.child(p),{colspan:b,rowspan:w,colwidth:k}=m.attrs;for(let C=0;C<w;C++){if(C+c>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:w-C});break}const A=s+C*e;for(let S=0;S<b;S++){i[A+S]==0?i[A+S]=u:(o||(o=[])).push({type:"collision",row:c,pos:u,n:b-S});const M=k&&k[S];if(M){const P=(A+S)%e*2,T=r[P];T==null||T!=M&&r[P+1]==1?(r[P]=M,r[P+1]=1):T==M&&r[P+1]++}}}s+=b,u+=m.nodeSize}const h=(c+1)*e;let f=0;for(;s<h;)i[s++]==0&&f++;f&&(o||(o=[])).push({type:"missing",row:c,n:f}),u++}const a=new Pn(e,n,i,o);let l=!1;for(let c=0;!l&&c<r.length;c+=2)r[c]!=null&&r[c+1]<n&&(l=!0);return l&&Q7e(a,r,t),a}function J7e(t){let e=-1,n=!1;for(let i=0;i<t.childCount;i++){const s=t.child(i);let o=0;if(n)for(let r=0;r<i;r++){const a=t.child(r);for(let l=0;l<a.childCount;l++){const c=a.child(l);r+c.attrs.rowspan>i&&(o+=c.attrs.colspan)}}for(let r=0;r<s.childCount;r++){const a=s.child(r);o+=a.attrs.colspan,a.attrs.rowspan>1&&(n=!0)}e==-1?e=o:e!=o&&(e=Math.max(e,o))}return e}function Q7e(t,e,n){t.problems||(t.problems=[]);const i={};for(let s=0;s<t.map.length;s++){const o=t.map[s];if(i[o])continue;i[o]=!0;const r=n.nodeAt(o);if(!r)throw new RangeError(`No cell with offset ${o} found`);let a=null;const l=r.attrs;for(let c=0;c<l.colspan;c++){const u=(s+c)%t.width,d=e[u*2];d!=null&&(!l.colwidth||l.colwidth[c]!=d)&&((a||(a=e$e(l)))[c]=d)}a&&t.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}function e$e(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function zM(t,e){if(typeof t=="string")return{};const n=t.getAttribute("data-colwidth"),i=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map(r=>Number(r)):null,s=Number(t.getAttribute("colspan")||1),o={colspan:s,rowspan:Number(t.getAttribute("rowspan")||1),colwidth:i&&i.length==s?i:null};for(const r in e){const a=e[r].getFromDOM,l=a&&a(t);l!=null&&(o[r]=l)}return o}function HM(t,e){const n={};t.attrs.colspan!=1&&(n.colspan=t.attrs.colspan),t.attrs.rowspan!=1&&(n.rowspan=t.attrs.rowspan),t.attrs.colwidth&&(n["data-colwidth"]=t.attrs.colwidth.join(","));for(const i in e){const s=e[i].setDOMAttr;s&&s(t.attrs[i],n)}return n}function t$e(t){const e=t.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(const i in e)n[i]={default:e[i].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:t.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:t.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:i=>zM(i,e)}],toDOM(i){return["td",HM(i,e),0]}},table_header:{content:t.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:i=>zM(i,e)}],toDOM(i){return["th",HM(i,e),0]}}}}function Cr(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const i=t.nodes[n],s=i.spec.tableRole;s&&(e[s]=i)}}return e}var vc=new ps("selectingCells");function fv(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function Mr(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function V2(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=fv(e.$head)||n$e(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function n$e(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const i=e.type.spec.tableRole;if(i=="cell"||i=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const i=e.type.spec.tableRole;if(i=="cell"||i=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function xx(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function s$e(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function lS(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function Kz(t,e,n){const i=t.node(-1),s=Pn.get(i),o=t.start(-1),r=s.nextCell(t.pos-o,e,n);return r==null?null:t.node(0).resolve(o+r)}function Ed(t,e,n=1){const i={...t,colspan:t.colspan-n};return i.colwidth&&(i.colwidth=i.colwidth.slice(),i.colwidth.splice(e,n),i.colwidth.some(s=>s>0)||(i.colwidth=null)),i}function i$e(t,e,n=1){const i={...t,colspan:t.colspan+n};if(i.colwidth){i.colwidth=i.colwidth.slice();for(let s=0;s<n;s++)i.colwidth.splice(e,0,0)}return i}function o$e(t,e,n){const i=Cr(e.type.schema).header_cell;for(let s=0;s<t.height;s++)if(e.nodeAt(t.map[n+s*t.width]).type!=i)return!1;return!0}var as=class Xa extends Ut{constructor(e,n=e){const i=e.node(-1),s=Pn.get(i),o=e.start(-1),r=s.rectBetween(e.pos-o,n.pos-o),a=e.node(0),l=s.cellsInRect(r).filter(u=>u!=n.pos-o);l.unshift(n.pos-o);const c=l.map(u=>{const d=i.nodeAt(u);if(!d)throw RangeError(`No cell with offset ${u} found`);const h=o+u+1;return new W0(a.resolve(h),a.resolve(h+d.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=n}map(e,n){const i=e.resolve(n.map(this.$anchorCell.pos)),s=e.resolve(n.map(this.$headCell.pos));if(xx(i)&&xx(s)&&lS(i,s)){const o=this.$anchorCell.node(-1)!=i.node(-1);return o&&this.isRowSelection()?Xa.rowSelection(i,s):o&&this.isColSelection()?Xa.colSelection(i,s):new Xa(i,s)}return Ot.between(i,s)}content(){const e=this.$anchorCell.node(-1),n=Pn.get(e),i=this.$anchorCell.start(-1),s=n.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i),o={},r=[];for(let l=s.top;l<s.bottom;l++){const c=[];for(let u=l*n.width+s.left,d=s.left;d<s.right;d++,u++){const h=n.map[u];if(o[h])continue;o[h]=!0;const f=n.findCell(h);let p=e.nodeAt(h);if(!p)throw RangeError(`No cell with offset ${h} found`);const m=s.left-f.left,b=f.right-s.right;if(m>0||b>0){let w=p.attrs;if(m>0&&(w=Ed(w,0,m)),b>0&&(w=Ed(w,w.colspan-b,b)),f.left<s.left){if(p=p.type.createAndFill(w),!p)throw RangeError(`Could not create cell with attrs ${JSON.stringify(w)}`)}else p=p.type.create(w,p.content)}if(f.top<s.top||f.bottom>s.bottom){const w={...p.attrs,rowspan:Math.min(f.bottom,s.bottom)-Math.max(f.top,s.top)};f.top<s.top?p=p.type.createAndFill(w):p=p.type.create(w,p.content)}c.push(p)}r.push(e.child(l).copy(st.from(c)))}const a=this.isColSelection()&&this.isRowSelection()?e:r;return new rt(st.from(a),1,1)}replace(e,n=rt.empty){const i=e.steps.length,s=this.ranges;for(let r=0;r<s.length;r++){const{$from:a,$to:l}=s[r],c=e.mapping.slice(i);e.replace(c.map(a.pos),c.map(l.pos),r?rt.empty:n)}const o=Ut.findFrom(e.doc.resolve(e.mapping.slice(i).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,n){this.replace(e,new rt(st.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),i=Pn.get(n),s=this.$anchorCell.start(-1),o=i.cellsInRect(i.rectBetween(this.$anchorCell.pos-s,this.$headCell.pos-s));for(let r=0;r<o.length;r++)e(n.nodeAt(o[r]),s+o[r])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const i=e+this.$anchorCell.nodeAfter.attrs.rowspan,s=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(i,s)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const i=e.node(-1),s=Pn.get(i),o=e.start(-1),r=s.findCell(e.pos-o),a=s.findCell(n.pos-o),l=e.node(0);return r.top<=a.top?(r.top>0&&(e=l.resolve(o+s.map[r.left])),a.bottom<s.height&&(n=l.resolve(o+s.map[s.width*(s.height-1)+a.right-1]))):(a.top>0&&(n=l.resolve(o+s.map[a.left])),r.bottom<s.height&&(e=l.resolve(o+s.map[s.width*(s.height-1)+r.right-1]))),new Xa(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=Pn.get(e),i=this.$anchorCell.start(-1),s=n.colCount(this.$anchorCell.pos-i),o=n.colCount(this.$headCell.pos-i);if(Math.min(s,o)>0)return!1;const r=s+this.$anchorCell.nodeAfter.attrs.colspan,a=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(r,a)==n.width}eq(e){return e instanceof Xa&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const i=e.node(-1),s=Pn.get(i),o=e.start(-1),r=s.findCell(e.pos-o),a=s.findCell(n.pos-o),l=e.node(0);return r.left<=a.left?(r.left>0&&(e=l.resolve(o+s.map[r.top*s.width])),a.right<s.width&&(n=l.resolve(o+s.map[s.width*(a.top+1)-1]))):(a.left>0&&(n=l.resolve(o+s.map[a.top*s.width])),r.right<s.width&&(e=l.resolve(o+s.map[s.width*(r.top+1)-1]))),new Xa(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Xa(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,i=n){return new Xa(e.resolve(n),e.resolve(i))}getBookmark(){return new r$e(this.$anchorCell.pos,this.$headCell.pos)}};as.prototype.visible=!1;Ut.jsonID("cell",as);var r$e=class Zz{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Zz(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),i=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&i.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&i.index()<i.parent.childCount&&lS(n,i)?new as(n,i):Ut.near(i,1)}};function a$e(t){if(!(t.selection instanceof as))return null;const e=[];return t.selection.forEachCell((n,i)=>{e.push(Fs.node(i,i+n.nodeSize,{class:"selectedCell"}))}),Kn.create(t.doc,e)}function l$e({$from:t,$to:e}){if(t.pos==e.pos||t.pos<t.pos-6)return!1;let n=t.pos,i=e.pos,s=t.depth;for(;s>=0&&!(t.after(s+1)<t.end(s));s--,n++);for(let o=e.depth;o>=0&&!(e.before(o+1)>e.start(o));o--,i--);return n==i&&/row|table/.test(t.node(s).type.spec.tableRole)}function c$e({$from:t,$to:e}){let n,i;for(let s=t.depth;s>0;s--){const o=t.node(s);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){n=o;break}}for(let s=e.depth;s>0;s--){const o=e.node(s);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){i=o;break}}return n!==i&&e.parentOffset===0}function u$e(t,e,n){const i=(e||t).selection,s=(e||t).doc;let o,r;if(i instanceof Rt&&(r=i.node.type.spec.tableRole)){if(r=="cell"||r=="header_cell")o=as.create(s,i.from);else if(r=="row"){const a=s.resolve(i.from+1);o=as.rowSelection(a,a)}else if(!n){const a=Pn.get(i.node),l=i.from+1,c=l+a.map[a.width*a.height-1];o=as.create(s,l+1,c)}}else i instanceof Ot&&l$e(i)?o=Ot.create(s,i.from):i instanceof Ot&&c$e(i)&&(o=Ot.create(s,i.$from.start(),i.$from.end()));return o&&(e||(e=t.tr)).setSelection(o),e}var d$e=new ps("fix-tables");function Jz(t,e,n,i){const s=t.childCount,o=e.childCount;e:for(let r=0,a=0;r<o;r++){const l=e.child(r);for(let c=a,u=Math.min(s,r+3);c<u;c++)if(t.child(c)==l){a=c+1,n+=l.nodeSize;continue e}i(l,n),a<s&&t.child(a).sameMarkup(l)?Jz(t.child(a),l,n+1,i):l.nodesBetween(0,l.content.size,i,n+1),n+=l.nodeSize}}function h$e(t,e){let n;const i=(s,o)=>{s.type.spec.tableRole=="table"&&(n=f$e(t,s,o,n))};return e?e.doc!=t.doc&&Jz(e.doc,t.doc,0,i):t.doc.descendants(i),n}function f$e(t,e,n,i){const s=Pn.get(e);if(!s.problems)return i;i||(i=t.tr);const o=[];for(let l=0;l<s.height;l++)o.push(0);for(let l=0;l<s.problems.length;l++){const c=s.problems[l];if(c.type=="collision"){const u=e.nodeAt(c.pos);if(!u)continue;const d=u.attrs;for(let h=0;h<d.rowspan;h++)o[c.row+h]+=c.n;i.setNodeMarkup(i.mapping.map(n+1+c.pos),null,Ed(d,d.colspan-c.n,c.n))}else if(c.type=="missing")o[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const u=e.nodeAt(c.pos);if(!u)continue;i.setNodeMarkup(i.mapping.map(n+1+c.pos),null,{...u.attrs,rowspan:u.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const u=e.nodeAt(c.pos);if(!u)continue;i.setNodeMarkup(i.mapping.map(n+1+c.pos),null,{...u.attrs,colwidth:c.colwidth})}}let r,a;for(let l=0;l<o.length;l++)o[l]&&(r==null&&(r=l),a=l);for(let l=0,c=n+1;l<s.height;l++){const u=e.child(l),d=c+u.nodeSize,h=o[l];if(h>0){let f="cell";u.firstChild&&(f=u.firstChild.type.spec.tableRole);const p=[];for(let b=0;b<h;b++){const w=Cr(t.schema)[f].createAndFill();w&&p.push(w)}const m=(l==0||r==l-1)&&a==l?c+1:d-1;i.insert(i.mapping.map(m),p)}c=d}return i.setMeta(d$e,{fixTables:!0})}function cu(t){const e=t.selection,n=V2(t),i=n.node(-1),s=n.start(-1),o=Pn.get(i);return{...e instanceof as?o.rectBetween(e.$anchorCell.pos-s,e.$headCell.pos-s):o.findCell(n.pos-s),tableStart:s,map:o,table:i}}function Qz(t,{map:e,tableStart:n,table:i},s){let o=s>0?-1:0;o$e(e,i,s+o)&&(o=s==0||s==e.width?null:0);for(let r=0;r<e.height;r++){const a=r*e.width+s;if(s>0&&s<e.width&&e.map[a-1]==e.map[a]){const l=e.map[a],c=i.nodeAt(l);t.setNodeMarkup(t.mapping.map(n+l),null,i$e(c.attrs,s-e.colCount(l))),r+=c.attrs.rowspan-1}else{const l=o==null?Cr(i.type.schema).cell:i.nodeAt(e.map[a+o]).type,c=e.positionAt(r,s,i);t.insert(t.mapping.map(n+c),l.createAndFill())}}return t}function p$e(t,e){if(!Mr(t))return!1;if(e){const n=cu(t);e(Qz(t.tr,n,n.left))}return!0}function m$e(t,e){if(!Mr(t))return!1;if(e){const n=cu(t);e(Qz(t.tr,n,n.right))}return!0}function g$e(t,{map:e,table:n,tableStart:i},s){const o=t.mapping.maps.length;for(let r=0;r<e.height;){const a=r*e.width+s,l=e.map[a],c=n.nodeAt(l),u=c.attrs;if(s>0&&e.map[a-1]==l||s<e.width-1&&e.map[a+1]==l)t.setNodeMarkup(t.mapping.slice(o).map(i+l),null,Ed(u,s-e.colCount(l)));else{const d=t.mapping.slice(o).map(i+l);t.delete(d,d+c.nodeSize)}r+=u.rowspan}}function v$e(t,e){if(!Mr(t))return!1;if(e){const n=cu(t),i=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let s=n.right-1;g$e(i,n,s),s!=n.left;s--){const o=n.tableStart?i.doc.nodeAt(n.tableStart-1):i.doc;if(!o)throw RangeError("No table found");n.table=o,n.map=Pn.get(o)}e(i)}return!0}function _$e(t,{map:e,table:n,tableStart:i},s){let o=0;for(let c=0;c<s;c++)o+=n.child(c).nodeSize;const r=o+n.child(s).nodeSize,a=t.mapping.maps.length;t.delete(o+i,r+i);const l=new Set;for(let c=0,u=s*e.width;c<e.width;c++,u++){const d=e.map[u];if(!l.has(d)){if(l.add(d),s>0&&d==e.map[u-e.width]){const h=n.nodeAt(d).attrs;t.setNodeMarkup(t.mapping.slice(a).map(d+i),null,{...h,rowspan:h.rowspan-1}),c+=h.colspan-1}else if(s<e.height&&d==e.map[u+e.width]){const h=n.nodeAt(d),f=h.attrs,p=h.type.create({...f,rowspan:h.attrs.rowspan-1},h.content),m=e.positionAt(s+1,c,n);t.insert(t.mapping.slice(a).map(i+m),p),c+=f.colspan-1}}}}function y$e(t,e){if(!Mr(t))return!1;if(e){const n=cu(t),i=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let s=n.bottom-1;_$e(i,n,s),s!=n.top;s--){const o=n.tableStart?i.doc.nodeAt(n.tableStart-1):i.doc;if(!o)throw RangeError("No table found");n.table=o,n.map=Pn.get(n.table)}e(i)}return!0}function b$e(t,e){return function(n,i){if(!Mr(n))return!1;const s=V2(n);if(s.nodeAfter.attrs[t]===e)return!1;if(i){const o=n.tr;n.selection instanceof as?n.selection.forEachCell((r,a)=>{r.attrs[t]!==e&&o.setNodeMarkup(a,null,{...r.attrs,[t]:e})}):o.setNodeMarkup(s.pos,null,{...s.nodeAfter.attrs,[t]:e}),i(o)}return!0}}function w$e(t){return function(e,n){if(!Mr(e))return!1;if(n){const i=Cr(e.schema),s=cu(e),o=e.tr,r=s.map.cellsInRect(t=="column"?{left:s.left,top:0,right:s.right,bottom:s.map.height}:t=="row"?{left:0,top:s.top,right:s.map.width,bottom:s.bottom}:s),a=r.map(l=>s.table.nodeAt(l));for(let l=0;l<r.length;l++)a[l].type==i.header_cell&&o.setNodeMarkup(s.tableStart+r[l],i.cell,a[l].attrs);if(o.steps.length==0)for(let l=0;l<r.length;l++)o.setNodeMarkup(s.tableStart+r[l],i.header_cell,a[l].attrs);n(o)}return!0}}function UM(t,e,n){const i=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let s=0;s<i.length;s++){const o=e.table.nodeAt(i[s]);if(o&&o.type!==n.header_cell)return!1}return!0}function cS(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?w$e(t):function(n,i){if(!Mr(n))return!1;if(i){const s=Cr(n.schema),o=cu(n),r=n.tr,a=UM("row",o,s),l=UM("column",o,s),u=(t==="column"?a:t==="row"?l:!1)?1:0,d=t=="column"?{left:0,top:u,right:1,bottom:o.map.height}:t=="row"?{left:u,top:0,right:o.map.width,bottom:1}:o,h=t=="column"?l?s.cell:s.header_cell:t=="row"?a?s.cell:s.header_cell:s.cell;o.map.cellsInRect(d).forEach(f=>{const p=f+o.tableStart,m=r.doc.nodeAt(p);m&&r.setNodeMarkup(p,h,m.attrs)}),i(r)}return!0}}cS("row",{useDeprecatedLogic:!0});cS("column",{useDeprecatedLogic:!0});cS("cell",{useDeprecatedLogic:!0});function k$e(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let i=t.index(-1)-1,s=t.before();i>=0;i--){const o=t.node(-1).child(i),r=o.lastChild;if(r)return s-1-r.nodeSize;s-=o.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let i=t.indexAfter(-1),s=t.after();i<n.childCount;i++){const o=n.child(i);if(o.childCount)return s+1;s+=o.nodeSize}}return null}function eH(t){return function(e,n){if(!Mr(e))return!1;const i=k$e(V2(e),t);if(i==null)return!1;if(n){const s=e.doc.resolve(i);n(e.tr.setSelection(Ot.between(s,s$e(s))).scrollIntoView())}return!0}}function C$e(t,e){const n=t.selection.$anchor;for(let i=n.depth;i>0;i--)if(n.node(i).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(i),n.after(i)).scrollIntoView()),!0;return!1}function m_(t,e){const n=t.selection;if(!(n instanceof as))return!1;if(e){const i=t.tr,s=Cr(t.schema).cell.createAndFill().content;n.forEachCell((o,r)=>{o.content.eq(s)||i.replace(i.mapping.map(r+1),i.mapping.map(r+o.nodeSize-1),new rt(s,0,0))}),i.docChanged&&e(i)}return!0}function x$e(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:i}=t;for(;e.childCount==1&&(n>0&&i>0||e.child(0).type.spec.tableRole=="table");)n--,i--,e=e.child(0).content;const s=e.child(0),o=s.type.spec.tableRole,r=s.type.schema,a=[];if(o=="row")for(let l=0;l<e.childCount;l++){let c=e.child(l).content;const u=l?0:Math.max(0,n-1),d=l<e.childCount-1?0:Math.max(0,i-1);(u||d)&&(c=Sx(Cr(r).row,new rt(c,u,d)).content),a.push(c)}else if(o=="cell"||o=="header_cell")a.push(n||i?Sx(Cr(r).row,new rt(e,n,i)).content:e);else return null;return S$e(r,a)}function S$e(t,e){const n=[];for(let s=0;s<e.length;s++){const o=e[s];for(let r=o.childCount-1;r>=0;r--){const{rowspan:a,colspan:l}=o.child(r).attrs;for(let c=s;c<s+a;c++)n[c]=(n[c]||0)+l}}let i=0;for(let s=0;s<n.length;s++)i=Math.max(i,n[s]);for(let s=0;s<n.length;s++)if(s>=e.length&&e.push(st.empty),n[s]<i){const o=Cr(t).cell.createAndFill(),r=[];for(let a=n[s];a<i;a++)r.push(o);e[s]=e[s].append(st.from(r))}return{height:e.length,width:i,rows:e}}function Sx(t,e){const n=t.createAndFill();return new mB(n).replace(0,n.content.size,e).doc}function $$e({width:t,height:e,rows:n},i,s){if(t!=i){const o=[],r=[];for(let a=0;a<n.length;a++){const l=n[a],c=[];for(let u=o[a]||0,d=0;u<i;d++){let h=l.child(d%l.childCount);u+h.attrs.colspan>i&&(h=h.type.createChecked(Ed(h.attrs,h.attrs.colspan,u+h.attrs.colspan-i),h.content)),c.push(h),u+=h.attrs.colspan;for(let f=1;f<h.attrs.rowspan;f++)o[a+f]=(o[a+f]||0)+h.attrs.colspan}r.push(st.from(c))}n=r,t=i}if(e!=s){const o=[];for(let r=0,a=0;r<s;r++,a++){const l=[],c=n[a%e];for(let u=0;u<c.childCount;u++){let d=c.child(u);r+d.attrs.rowspan>s&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,s-d.attrs.rowspan)},d.content)),l.push(d)}o.push(st.from(l))}n=o,e=s}return{width:t,height:e,rows:n}}function A$e(t,e,n,i,s,o,r){const a=t.doc.type.schema,l=Cr(a);let c,u;if(s>e.width)for(let d=0,h=0;d<e.height;d++){const f=n.child(d);h+=f.nodeSize;const p=[];let m;f.lastChild==null||f.lastChild.type==l.cell?m=c||(c=l.cell.createAndFill()):m=u||(u=l.header_cell.createAndFill());for(let b=e.width;b<s;b++)p.push(m);t.insert(t.mapping.slice(r).map(h-1+i),p)}if(o>e.height){const d=[];for(let p=0,m=(e.height-1)*e.width;p<Math.max(e.width,s);p++){const b=p>=e.width?!1:n.nodeAt(e.map[m+p]).type==l.header_cell;d.push(b?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const h=l.row.create(null,st.from(d)),f=[];for(let p=e.height;p<o;p++)f.push(h);t.insert(t.mapping.slice(r).map(i+n.nodeSize-2),f)}return!!(c||u)}function jM(t,e,n,i,s,o,r,a){if(r==0||r==e.height)return!1;let l=!1;for(let c=s;c<o;c++){const u=r*e.width+c,d=e.map[u];if(e.map[u-e.width]==d){l=!0;const h=n.nodeAt(d),{top:f,left:p}=e.findCell(d);t.setNodeMarkup(t.mapping.slice(a).map(d+i),null,{...h.attrs,rowspan:r-f}),t.insert(t.mapping.slice(a).map(e.positionAt(r,p,n)),h.type.createAndFill({...h.attrs,rowspan:f+h.attrs.rowspan-r})),c+=h.attrs.colspan-1}}return l}function WM(t,e,n,i,s,o,r,a){if(r==0||r==e.width)return!1;let l=!1;for(let c=s;c<o;c++){const u=c*e.width+r,d=e.map[u];if(e.map[u-1]==d){l=!0;const h=n.nodeAt(d),f=e.colCount(d),p=t.mapping.slice(a).map(d+i);t.setNodeMarkup(p,null,Ed(h.attrs,r-f,h.attrs.colspan-(r-f))),t.insert(p+h.nodeSize,h.type.createAndFill(Ed(h.attrs,0,r-f))),c+=h.attrs.rowspan-1}}return l}function YM(t,e,n,i,s){let o=n?t.doc.nodeAt(n-1):t.doc;if(!o)throw new Error("No table found");let r=Pn.get(o);const{top:a,left:l}=i,c=l+s.width,u=a+s.height,d=t.tr;let h=0;function f(){if(o=n?d.doc.nodeAt(n-1):d.doc,!o)throw new Error("No table found");r=Pn.get(o),h=d.mapping.maps.length}A$e(d,r,o,n,c,u,h)&&f(),jM(d,r,o,n,l,c,a,h)&&f(),jM(d,r,o,n,l,c,u,h)&&f(),WM(d,r,o,n,a,u,l,h)&&f(),WM(d,r,o,n,a,u,c,h)&&f();for(let p=a;p<u;p++){const m=r.positionAt(p,l,o),b=r.positionAt(p,c,o);d.replace(d.mapping.slice(h).map(m+n),d.mapping.slice(h).map(b+n),new rt(s.rows[p-a],0,0))}f(),d.setSelection(new as(d.doc.resolve(n+r.positionAt(a,l,o)),d.doc.resolve(n+r.positionAt(u-1,c-1,o)))),e(d)}var E$e=IB({ArrowLeft:g_("horiz",-1),ArrowRight:g_("horiz",1),ArrowUp:g_("vert",-1),ArrowDown:g_("vert",1),"Shift-ArrowLeft":v_("horiz",-1),"Shift-ArrowRight":v_("horiz",1),"Shift-ArrowUp":v_("vert",-1),"Shift-ArrowDown":v_("vert",1),Backspace:m_,"Mod-Backspace":m_,Delete:m_,"Mod-Delete":m_});function by(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function g_(t,e){return(n,i,s)=>{if(!s)return!1;const o=n.selection;if(o instanceof as)return by(n,i,Ut.near(o.$headCell,e));if(t!="horiz"&&!o.empty)return!1;const r=tH(s,t,e);if(r==null)return!1;if(t=="horiz")return by(n,i,Ut.near(n.doc.resolve(o.head+e),e));{const a=n.doc.resolve(r),l=Kz(a,t,e);let c;return l?c=Ut.near(l,1):e<0?c=Ut.near(n.doc.resolve(a.before(-1)),-1):c=Ut.near(n.doc.resolve(a.after(-1)),1),by(n,i,c)}}}function v_(t,e){return(n,i,s)=>{if(!s)return!1;const o=n.selection;let r;if(o instanceof as)r=o;else{const l=tH(s,t,e);if(l==null)return!1;r=new as(n.doc.resolve(l))}const a=Kz(r.$headCell,t,e);return a?by(n,i,new as(r.$anchorCell,a)):!1}}function M$e(t,e){const n=t.state.doc,i=fv(n.resolve(e));return i?(t.dispatch(t.state.tr.setSelection(new as(i))),!0):!1}function T$e(t,e,n){if(!Mr(t.state))return!1;let i=x$e(n);const s=t.state.selection;if(s instanceof as){i||(i={width:1,height:1,rows:[st.from(Sx(Cr(t.state.schema).cell,n))]});const o=s.$anchorCell.node(-1),r=s.$anchorCell.start(-1),a=Pn.get(o).rectBetween(s.$anchorCell.pos-r,s.$headCell.pos-r);return i=$$e(i,a.right-a.left,a.bottom-a.top),YM(t.state,t.dispatch,r,a,i),!0}else if(i){const o=V2(t.state),r=o.start(-1);return YM(t.state,t.dispatch,r,Pn.get(o.node(-1)).findCell(o.pos-r),i),!0}else return!1}function P$e(t,e){var n;if(e.ctrlKey||e.metaKey)return;const i=qM(t,e.target);let s;if(e.shiftKey&&t.state.selection instanceof as)o(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&i&&(s=fv(t.state.selection.$anchor))!=null&&((n=T3(t,e))==null?void 0:n.pos)!=s.pos)o(s,e),e.preventDefault();else if(!i)return;function o(l,c){let u=T3(t,c);const d=vc.getState(t.state)==null;if(!u||!lS(l,u))if(d)u=l;else return;const h=new as(l,u);if(d||!t.state.selection.eq(h)){const f=t.state.tr.setSelection(h);d&&f.setMeta(vc,l.pos),t.dispatch(f)}}function r(){t.root.removeEventListener("mouseup",r),t.root.removeEventListener("dragstart",r),t.root.removeEventListener("mousemove",a),vc.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(vc,-1))}function a(l){const c=l,u=vc.getState(t.state);let d;if(u!=null)d=t.state.doc.resolve(u);else if(qM(t,c.target)!=i&&(d=T3(t,e),!d))return r();d&&o(d,c)}t.root.addEventListener("mouseup",r),t.root.addEventListener("dragstart",r),t.root.addEventListener("mousemove",a)}function tH(t,e,n){if(!(t.state.selection instanceof Ot))return null;const{$head:i}=t.state.selection;for(let s=i.depth-1;s>=0;s--){const o=i.node(s);if((n<0?i.index(s):i.indexAfter(s))!=(n<0?0:o.childCount))return null;if(o.type.spec.tableRole=="cell"||o.type.spec.tableRole=="header_cell"){const a=i.before(s),l=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(l)?a:null}}return null}function qM(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function T3(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?fv(t.state.doc.resolve(n.pos)):null}var I$e=class{constructor(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),$x(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,$x(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function $x(t,e,n,i,s,o){var r;let a=0,l=!0,c=e.firstChild;const u=t.firstChild;if(u){for(let d=0,h=0;d<u.childCount;d++){const{colspan:f,colwidth:p}=u.child(d).attrs;for(let m=0;m<f;m++,h++){const b=s==h?o:p&&p[m],w=b?b+"px":"";a+=b||i,b||(l=!1),c?(c.style.width!=w&&(c.style.width=w),c=c.nextSibling):e.appendChild(document.createElement("col")).style.width=w}}for(;c;){const d=c.nextSibling;(r=c.parentNode)==null||r.removeChild(c),c=d}l?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}}var lr=new ps("tableColumnResizing");function L$e({handleWidth:t=5,cellMinWidth:e=25,View:n=I$e,lastColumnResizable:i=!0}={}){const s=new rs({key:lr,state:{init(o,r){var a,l;const c=(l=(a=s.spec)==null?void 0:a.props)==null?void 0:l.nodeViews,u=Cr(r.schema).table.name;return n&&c&&(c[u]=(d,h)=>new n(d,e,h)),new O$e(-1,!1)},apply(o,r){return r.apply(o)}},props:{attributes:o=>{const r=lr.getState(o);return r&&r.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,r)=>{D$e(o,r,t,e,i)},mouseleave:o=>{R$e(o)},mousedown:(o,r)=>{V$e(o,r,e)}},decorations:o=>{const r=lr.getState(o);if(r&&r.activeHandle>-1)return U$e(o,r.activeHandle)},nodeViews:{}}});return s}var O$e=class wy{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,i=e.getMeta(lr);if(i&&i.setHandle!=null)return new wy(i.setHandle,!1);if(i&&i.setDragging!==void 0)return new wy(n.activeHandle,i.setDragging);if(n.activeHandle>-1&&e.docChanged){let s=e.mapping.map(n.activeHandle,-1);return xx(e.doc.resolve(s))||(s=-1),new wy(s,n.dragging)}return n}};function D$e(t,e,n,i,s){const o=lr.getState(t.state);if(o&&!o.dragging){const r=N$e(e.target);let a=-1;if(r){const{left:l,right:c}=r.getBoundingClientRect();e.clientX-l<=n?a=GM(t,e,"left",n):c-e.clientX<=n&&(a=GM(t,e,"right",n))}if(a!=o.activeHandle){if(!s&&a!==-1){const l=t.state.doc.resolve(a),c=l.node(-1),u=Pn.get(c),d=l.start(-1);if(u.colCount(l.pos-d)+l.nodeAfter.attrs.colspan-1==u.width-1)return}nH(t,a)}}}function R$e(t){const e=lr.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&nH(t,-1)}function V$e(t,e,n){var i;const s=(i=t.dom.ownerDocument.defaultView)!=null?i:window,o=lr.getState(t.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const r=t.state.doc.nodeAt(o.activeHandle),a=F$e(t,o.activeHandle,r.attrs);t.dispatch(t.state.tr.setMeta(lr,{setDragging:{startX:e.clientX,startWidth:a}}));function l(u){s.removeEventListener("mouseup",l),s.removeEventListener("mousemove",c);const d=lr.getState(t.state);d!=null&&d.dragging&&(B$e(t,d.activeHandle,XM(d.dragging,u,n)),t.dispatch(t.state.tr.setMeta(lr,{setDragging:null})))}function c(u){if(!u.which)return l(u);const d=lr.getState(t.state);if(d&&d.dragging){const h=XM(d.dragging,u,n);z$e(t,d.activeHandle,h,n)}}return s.addEventListener("mouseup",l),s.addEventListener("mousemove",c),e.preventDefault(),!0}function F$e(t,e,{colspan:n,colwidth:i}){const s=i&&i[i.length-1];if(s)return s;const o=t.domAtPos(e);let a=o.node.childNodes[o.offset].offsetWidth,l=n;if(i)for(let c=0;c<n;c++)i[c]&&(a-=i[c],l--);return a/l}function N$e(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function GM(t,e,n,i){const s=n=="right"?-i:i,o=t.posAtCoords({left:e.clientX+s,top:e.clientY});if(!o)return-1;const{pos:r}=o,a=fv(t.state.doc.resolve(r));if(!a)return-1;if(n=="right")return a.pos;const l=Pn.get(a.node(-1)),c=a.start(-1),u=l.map.indexOf(a.pos-c);return u%l.width==0?-1:c+l.map[u-1]}function XM(t,e,n){const i=e.clientX-t.startX;return Math.max(n,t.startWidth+i)}function nH(t,e){t.dispatch(t.state.tr.setMeta(lr,{setHandle:e}))}function B$e(t,e,n){const i=t.state.doc.resolve(e),s=i.node(-1),o=Pn.get(s),r=i.start(-1),a=o.colCount(i.pos-r)+i.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let c=0;c<o.height;c++){const u=c*o.width+a;if(c&&o.map[u]==o.map[u-o.width])continue;const d=o.map[u],h=s.nodeAt(d).attrs,f=h.colspan==1?0:a-o.colCount(d);if(h.colwidth&&h.colwidth[f]==n)continue;const p=h.colwidth?h.colwidth.slice():H$e(h.colspan);p[f]=n,l.setNodeMarkup(r+d,null,{...h,colwidth:p})}l.docChanged&&t.dispatch(l)}function z$e(t,e,n,i){const s=t.state.doc.resolve(e),o=s.node(-1),r=s.start(-1),a=Pn.get(o).colCount(s.pos-r)+s.nodeAfter.attrs.colspan-1;let l=t.domAtPos(s.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&$x(o,l.firstChild,l,i,a,n)}function H$e(t){return Array(t).fill(0)}function U$e(t,e){const n=[],i=t.doc.resolve(e),s=i.node(-1);if(!s)return Kn.empty;const o=Pn.get(s),r=i.start(-1),a=o.colCount(i.pos-r)+i.nodeAfter.attrs.colspan-1;for(let l=0;l<o.height;l++){const c=a+l*o.width;if((a==o.width-1||o.map[c]!=o.map[c+1])&&(l==0||o.map[c]!=o.map[c-o.width])){const u=o.map[c],d=r+u+s.nodeAt(u).nodeSize-1,h=document.createElement("div");h.className="column-resize-handle",n.push(Fs.widget(d,h))}}return Kn.create(t.doc,n)}function j$e({allowTableNodeSelection:t=!1}={}){return new rs({key:vc,state:{init(){return null},apply(e,n){const i=e.getMeta(vc);if(i!=null)return i==-1?null:i;if(n==null||!e.docChanged)return n;const{deleted:s,pos:o}=e.mapping.mapResult(n);return s?null:o}},props:{decorations:a$e,handleDOMEvents:{mousedown:P$e},createSelectionBetween(e){return vc.getState(e.state)!=null?e.state.selection:null},handleTripleClick:M$e,handleKeyDown:E$e,handlePaste:T$e},appendTransaction(e,n,i){return u$e(i,h$e(i,n),t)}})}var J0=typeof navigator<"u"?navigator:null,uS=J0&&J0.userAgent||"",W$e=/Edge\/(\d+)/.exec(uS),Y$e=/MSIE \d/.exec(uS),q$e=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(uS),G$e=!!(Y$e||q$e||W$e),X$e=!G$e&&!!J0&&/Apple Computer/.test(J0.vendor),sH=new ps("safari-ime-span"),Ax=!1,K$e={key:sH,props:{decorations:Z$e,handleDOMEvents:{compositionstart:()=>{Ax=!0},compositionend:()=>{Ax=!1}}}};function Z$e(t){const{$from:e,$to:n,to:i}=t.selection;if(Ax&&e.sameParent(n)){const s=Fs.widget(i,J$e,{ignoreSelection:!0,key:"safari-ime-span"});return Kn.create(t.doc,[s])}}function J$e(t){const e=t.dom.ownerDocument.createElement("span");return e.className="ProseMirror-safari-ime-span",e}var Q$e=new rs(X$e?K$e:{key:sH});function KM(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let i=0,s=n.indexOf(e);for(;s!==-1;)i++,s=n.indexOf(e,s+e.length);return i}function eAe(t,e,n){const s=y2((n||{}).ignore||[]),o=tAe(e);let r=-1;for(;++r<o.length;)UN(t,"text",a);function a(c,u){let d=-1,h;for(;++d<u.length;){const f=u[d],p=h?h.children:void 0;if(s(f,p?p.indexOf(f):void 0,h))return;h=f}if(h)return l(c,u)}function l(c,u){const d=u[u.length-1],h=o[r][0],f=o[r][1];let p=0;const b=d.children.indexOf(c);let w=!1,k=[];h.lastIndex=0;let C=h.exec(c.value);for(;C;){const A=C.index,S={index:C.index,input:C.input,stack:[...u,c]};let M=f(...C,S);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?h.lastIndex=A+1:(p!==A&&k.push({type:"text",value:c.value.slice(p,A)}),Array.isArray(M)?k.push(...M):M&&k.push(M),p=A+C[0].length,w=!0),!h.global)break;C=h.exec(c.value)}return w?(p<c.value.length&&k.push({type:"text",value:c.value.slice(p)}),d.children.splice(b,1,...k)):k=[c],b+k.length}}function tAe(t){const e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!t[0]||Array.isArray(t[0])?t:[t];let i=-1;for(;++i<n.length;){const s=n[i];e.push([nAe(s[0]),sAe(s[1])])}return e}function nAe(t){return typeof t=="string"?new RegExp(I2(t),"g"):t}function sAe(t){return typeof t=="function"?t:function(){return t}}const P3="phrasing",I3=["autolink","link","image","label"];function iAe(){return{transforms:[dAe],enter:{literalAutolink:rAe,literalAutolinkEmail:L3,literalAutolinkHttp:L3,literalAutolinkWww:L3},exit:{literalAutolink:uAe,literalAutolinkEmail:cAe,literalAutolinkHttp:aAe,literalAutolinkWww:lAe}}}function oAe(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:P3,notInConstruct:I3},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:P3,notInConstruct:I3},{character:":",before:"[ps]",after:"\\/",inConstruct:P3,notInConstruct:I3}]}}function rAe(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function L3(t){this.config.enter.autolinkProtocol.call(this,t)}function aAe(t){this.config.exit.autolinkProtocol.call(this,t)}function lAe(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function cAe(t){this.config.exit.autolinkEmail.call(this,t)}function uAe(t){this.exit(t)}function dAe(t){eAe(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,hAe],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,fAe]],{ignore:["link","linkReference"]})}function hAe(t,e,n,i,s){let o="";if(!iH(s)||(/^w/i.test(e)&&(n=e+n,e="",o="http://"),!pAe(n)))return!1;const r=mAe(n+i);if(!r[0])return!1;const a={type:"link",title:null,url:o+e+r[0],children:[{type:"text",value:e+r[0]}]};return r[1]?[a,{type:"text",value:r[1]}]:a}function fAe(t,e,n,i){return!iH(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function pAe(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function mAe(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],i=n.indexOf(")");const s=KM(t,"(");let o=KM(t,")");for(;i!==-1&&s>o;)t+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),o++;return[t,n]}function iH(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||Sd(n)||v2(n))&&(!e||n!==47)}oH.peek=$Ae;function gAe(){return{enter:{gfmFootnoteDefinition:_Ae,gfmFootnoteDefinitionLabelString:yAe,gfmFootnoteCall:kAe,gfmFootnoteCallString:CAe},exit:{gfmFootnoteDefinition:wAe,gfmFootnoteDefinitionLabelString:bAe,gfmFootnoteCall:SAe,gfmFootnoteCallString:xAe}}}function vAe(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:AAe,footnoteReference:oH}}}function _Ae(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function yAe(){this.buffer()}function bAe(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=Wr(this.sliceSerialize(t)).toLowerCase()}function wAe(t){this.exit(t)}function kAe(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function CAe(){this.buffer()}function xAe(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=Wr(this.sliceSerialize(t)).toLowerCase()}function SAe(t){this.exit(t)}function oH(t,e,n,i){const s=n.createTracker(i);let o=s.move("[^");const r=n.enter("footnoteReference"),a=n.enter("reference");return o+=s.move(n.safe(n.associationId(t),{...s.current(),before:o,after:"]"})),a(),r(),o+=s.move("]"),o}function $Ae(){return"["}function AAe(t,e,n,i){const s=n.createTracker(i);let o=s.move("[^");const r=n.enter("footnoteDefinition"),a=n.enter("label");return o+=s.move(n.safe(n.associationId(t),{...s.current(),before:o,after:"]"})),a(),o+=s.move("]:"+(t.children&&t.children.length>0?" ":"")),s.shift(4),o+=s.move(n.indentLines(n.containerFlow(t,s.current()),EAe)),r(),o}function EAe(t,e,n){return e===0?t:(n?"":" ")+t}const MAe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];rH.peek=OAe;function TAe(){return{canContainEols:["delete"],enter:{strikethrough:IAe},exit:{strikethrough:LAe}}}function PAe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:MAe}],handlers:{delete:rH}}}function IAe(t){this.enter({type:"delete",children:[]},t)}function LAe(t){this.exit(t)}function rH(t,e,n,i){const s=n.createTracker(i),o=n.enter("strikethrough");let r=s.move("~~");return r+=n.containerPhrasing(t,{...s.current(),before:r,after:"~"}),r+=s.move("~~"),o(),r}function OAe(){return"~"}function DAe(t,e={}){const n=(e.align||[]).concat(),i=e.stringLength||VAe,s=[],o=[],r=[],a=[];let l=0,c=-1;for(;++c<t.length;){const p=[],m=[];let b=-1;for(t[c].length>l&&(l=t[c].length);++b<t[c].length;){const w=RAe(t[c][b]);if(e.alignDelimiters!==!1){const k=i(w);m[b]=k,(a[b]===void 0||k>a[b])&&(a[b]=k)}p.push(w)}o[c]=p,r[c]=m}let u=-1;if(typeof n=="object"&&"length"in n)for(;++u<l;)s[u]=ZM(n[u]);else{const p=ZM(n);for(;++u<l;)s[u]=p}u=-1;const d=[],h=[];for(;++u<l;){const p=s[u];let m="",b="";p===99?(m=":",b=":"):p===108?m=":":p===114&&(b=":");let w=e.alignDelimiters===!1?1:Math.max(1,a[u]-m.length-b.length);const k=m+"-".repeat(w)+b;e.alignDelimiters!==!1&&(w=m.length+w+b.length,w>a[u]&&(a[u]=w),h[u]=w),d[u]=k}o.splice(1,0,d),r.splice(1,0,h),c=-1;const f=[];for(;++c<o.length;){const p=o[c],m=r[c];u=-1;const b=[];for(;++u<l;){const w=p[u]||"";let k="",C="";if(e.alignDelimiters!==!1){const A=a[u]-(m[u]||0),S=s[u];S===114?k=" ".repeat(A):S===99?A%2?(k=" ".repeat(A/2+.5),C=" ".repeat(A/2-.5)):(k=" ".repeat(A/2),C=k):C=" ".repeat(A)}e.delimiterStart!==!1&&!u&&b.push("|"),e.padding!==!1&&!(e.alignDelimiters===!1&&w==="")&&(e.delimiterStart!==!1||u)&&b.push(" "),e.alignDelimiters!==!1&&b.push(k),b.push(w),e.alignDelimiters!==!1&&b.push(C),e.padding!==!1&&b.push(" "),(e.delimiterEnd!==!1||u!==l-1)&&b.push("|")}f.push(e.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return f.join(`
126 +`)}function RAe(t){return t==null?"":String(t)}function VAe(t){return t.length}function ZM(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function FAe(){return{enter:{table:NAe,tableData:JM,tableHeader:JM,tableRow:zAe},exit:{codeText:HAe,table:BAe,tableData:O3,tableHeader:O3,tableRow:O3}}}function NAe(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function BAe(t){this.exit(t),this.data.inTable=void 0}function zAe(t){this.enter({type:"tableRow",children:[]},t)}function O3(t){this.exit(t)}function JM(t){this.enter({type:"tableCell",children:[]},t)}function HAe(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,UAe));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function UAe(t,e){return e==="|"?e:t}function jAe(t){const e=t||{},n=e.tableCellPadding,i=e.tablePipeAlign,s=e.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
127 +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:r,tableCell:l,tableRow:a}};function r(f,p,m,b){return c(u(f,m,b),f.align)}function a(f,p,m,b){const w=d(f,m,b),k=c([w]);return k.slice(0,k.indexOf(`
128 +`))}function l(f,p,m,b){const w=m.enter("tableCell"),k=m.enter("phrasing"),C=m.containerPhrasing(f,{...b,before:o,after:o});return k(),w(),C}function c(f,p){return DAe(f,{align:p,alignDelimiters:i,padding:n,stringLength:s})}function u(f,p,m){const b=f.children;let w=-1;const k=[],C=p.enter("table");for(;++w<b.length;)k[w]=d(b[w],p,m);return C(),k}function d(f,p,m){const b=f.children;let w=-1;const k=[],C=p.enter("tableRow");for(;++w<b.length;)k[w]=l(b[w],f,p,m);return C(),k}function h(f,p,m){let b=J8.inlineCode(f,p,m);return m.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function WAe(){return{exit:{taskListCheckValueChecked:QM,taskListCheckValueUnchecked:QM,paragraph:qAe}}}function YAe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:GAe}}}function QM(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function qAe(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const s=e.children;let o=-1,r;for(;++o<s.length;){const a=s[o];if(a.type==="paragraph"){r=a;break}}r===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(t)}function GAe(t,e,n,i){const s=t.children[0],o=typeof t.checked=="boolean"&&s&&s.type==="paragraph",r="["+(t.checked?"x":" ")+"] ",a=n.createTracker(i);o&&a.move(r);let l=J8.listItem(t,e,n,{...i,...a.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+r}}function XAe(){return[iAe(),gAe(),TAe(),FAe(),WAe()]}function KAe(t){return{extensions:[oAe(),vAe(),PAe(),jAe(t),YAe()]}}const ZAe={tokenize:sEe,partial:!0},aH={tokenize:iEe,partial:!0},lH={tokenize:oEe,partial:!0},cH={tokenize:rEe,partial:!0},JAe={tokenize:aEe,partial:!0},uH={name:"wwwAutolink",tokenize:tEe,previous:hH},dH={name:"protocolAutolink",tokenize:nEe,previous:fH},Dl={name:"emailAutolink",tokenize:eEe,previous:pH},za={};function QAe(){return{text:za}}let _u=48;for(;_u<123;)za[_u]=Dl,_u++,_u===58?_u=65:_u===91&&(_u=97);za[43]=Dl;za[45]=Dl;za[46]=Dl;za[95]=Dl;za[72]=[Dl,dH];za[104]=[Dl,dH];za[87]=[Dl,uH];za[119]=[Dl,uH];function eEe(t,e,n){const i=this;let s,o;return r;function r(d){return!Ex(d)||!pH.call(i,i.previous)||dS(i.events)?n(d):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(d))}function a(d){return Ex(d)?(t.consume(d),a):d===64?(t.consume(d),l):n(d)}function l(d){return d===46?t.check(JAe,u,c)(d):d===45||d===95||co(d)?(o=!0,t.consume(d),l):u(d)}function c(d){return t.consume(d),s=!0,l}function u(d){return o&&s&&Hi(i.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(d)):n(d)}}function tEe(t,e,n){const i=this;return s;function s(r){return r!==87&&r!==119||!hH.call(i,i.previous)||dS(i.events)?n(r):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(ZAe,t.attempt(aH,t.attempt(lH,o),n),n)(r))}function o(r){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(r)}}function nEe(t,e,n){const i=this;let s="",o=!1;return r;function r(d){return(d===72||d===104)&&fH.call(i,i.previous)&&!dS(i.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(d),t.consume(d),a):n(d)}function a(d){if(Hi(d)&&s.length<5)return s+=String.fromCodePoint(d),t.consume(d),a;if(d===58){const h=s.toLowerCase();if(h==="http"||h==="https")return t.consume(d),l}return n(d)}function l(d){return d===47?(t.consume(d),o?c:(o=!0,l)):n(d)}function c(d){return d===null||U0(d)||jn(d)||Sd(d)||v2(d)?n(d):t.attempt(aH,t.attempt(lH,u),n)(d)}function u(d){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(d)}}function sEe(t,e,n){let i=0;return s;function s(r){return(r===87||r===119)&&i<3?(i++,t.consume(r),s):r===46&&i===3?(t.consume(r),o):n(r)}function o(r){return r===null?n(r):e(r)}}function iEe(t,e,n){let i,s,o;return r;function r(c){return c===46||c===95?t.check(cH,l,a)(c):c===null||jn(c)||Sd(c)||c!==45&&v2(c)?l(c):(o=!0,t.consume(c),r)}function a(c){return c===95?i=!0:(s=i,i=void 0),t.consume(c),r}function l(c){return s||i||!o?n(c):e(c)}}function oEe(t,e){let n=0,i=0;return s;function s(r){return r===40?(n++,t.consume(r),s):r===41&&i<n?o(r):r===33||r===34||r===38||r===39||r===41||r===42||r===44||r===46||r===58||r===59||r===60||r===63||r===93||r===95||r===126?t.check(cH,e,o)(r):r===null||jn(r)||Sd(r)?e(r):(t.consume(r),s)}function o(r){return r===41&&i++,t.consume(r),s}}function rEe(t,e,n){return i;function i(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(t.consume(a),i):a===38?(t.consume(a),o):a===93?(t.consume(a),s):a===60||a===null||jn(a)||Sd(a)?e(a):n(a)}function s(a){return a===null||a===40||a===91||jn(a)||Sd(a)?e(a):i(a)}function o(a){return Hi(a)?r(a):n(a)}function r(a){return a===59?(t.consume(a),i):Hi(a)?(t.consume(a),r):n(a)}}function aEe(t,e,n){return i;function i(o){return t.consume(o),s}function s(o){return co(o)?n(o):e(o)}}function hH(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||jn(t)}function fH(t){return!Hi(t)}function pH(t){return!(t===47||Ex(t))}function Ex(t){return t===43||t===45||t===46||t===95||co(t)}function dS(t){let e=t.length,n=!1;for(;e--;){const i=t[e][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const lEe={tokenize:gEe,partial:!0};function cEe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:fEe,continuation:{tokenize:pEe},exit:mEe}},text:{91:{name:"gfmFootnoteCall",tokenize:hEe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:uEe,resolveTo:dEe}}}}function uEe(t,e,n){const i=this;let s=i.events.length;const o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let r;for(;s--;){const l=i.events[s][1];if(l.type==="labelImage"){r=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!r||!r._balanced)return n(l);const c=Wr(i.sliceSerialize({start:r.end,end:i.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?n(l):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(l),t.exit("gfmFootnoteCallLabelMarker"),e(l))}}function dEe(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},r={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[t[n+1],t[n+2],["enter",i,e],t[n+3],t[n+4],["enter",s,e],["exit",s,e],["enter",o,e],["enter",r,e],["exit",r,e],["exit",o,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(n,t.length-n+1,...a),t}function hEe(t,e,n){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o=0,r;return a;function a(d){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(t.enter("gfmFootnoteCallMarker"),t.consume(d),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",c)}function c(d){if(o>999||d===93&&!r||d===null||d===91||jn(d))return n(d);if(d===93){t.exit("chunkString");const h=t.exit("gfmFootnoteCallString");return s.includes(Wr(i.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(d)}return jn(d)||(r=!0),o++,t.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(t.consume(d),o++,c):c(d)}}function fEe(t,e,n){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o,r=0,a;return l;function l(p){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(p),t.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(p){return p===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(p),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",u):n(p)}function u(p){if(r>999||p===93&&!a||p===null||p===91||jn(p))return n(p);if(p===93){t.exit("chunkString");const m=t.exit("gfmFootnoteDefinitionLabelString");return o=Wr(i.sliceSerialize(m)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(p),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return jn(p)||(a=!0),r++,t.consume(p),p===92?d:u}function d(p){return p===91||p===92||p===93?(t.consume(p),r++,u):u(p)}function h(p){return p===58?(t.enter("definitionMarker"),t.consume(p),t.exit("definitionMarker"),s.includes(o)||s.push(o),_n(t,f,"gfmFootnoteDefinitionWhitespace")):n(p)}function f(p){return e(p)}}function pEe(t,e,n){return t.check(ov,e,t.attempt(lEe,e,n))}function mEe(t){t.exit("gfmFootnoteDefinition")}function gEe(t,e,n){const i=this;return _n(t,s,"gfmFootnoteDefinitionIndent",4+1);function s(o){const r=i.events[i.events.length-1];return r&&r[1].type==="gfmFootnoteDefinitionIndent"&&r[2].sliceSerialize(r[1],!0).length===4?e(o):n(o)}}function vEe(t){let n=(t||{}).singleTilde;const i={name:"strikethrough",tokenize:o,resolveAll:s};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function s(r,a){let l=-1;for(;++l<r.length;)if(r[l][0]==="enter"&&r[l][1].type==="strikethroughSequenceTemporary"&&r[l][1]._close){let c=l;for(;c--;)if(r[c][0]==="exit"&&r[c][1].type==="strikethroughSequenceTemporary"&&r[c][1]._open&&r[l][1].end.offset-r[l][1].start.offset===r[c][1].end.offset-r[c][1].start.offset){r[l][1].type="strikethroughSequence",r[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},r[c][1].start),end:Object.assign({},r[l][1].end)},d={type:"strikethroughText",start:Object.assign({},r[c][1].end),end:Object.assign({},r[l][1].start)},h=[["enter",u,a],["enter",r[c][1],a],["exit",r[c][1],a],["enter",d,a]],f=a.parser.constructs.insideSpan.null;f&&pr(h,h.length,0,_2(f,r.slice(c+1,l),a)),pr(h,h.length,0,[["exit",d,a],["enter",r[l][1],a],["exit",r[l][1],a],["exit",u,a]]),pr(r,c-1,l-c+3,h),l=c+h.length-2;break}}for(l=-1;++l<r.length;)r[l][1].type==="strikethroughSequenceTemporary"&&(r[l][1].type="data");return r}function o(r,a,l){const c=this.previous,u=this.events;let d=0;return h;function h(p){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(p):(r.enter("strikethroughSequenceTemporary"),f(p))}function f(p){const m=j0(c);if(p===126)return d>1?l(p):(r.consume(p),d++,f);if(d<2&&!n)return l(p);const b=r.exit("strikethroughSequenceTemporary"),w=j0(p);return b._open=!w||w===2&&!!m,b._close=!m||m===2&&!!w,a(p)}}}class _Ee{constructor(){this.map=[]}add(e,n,i){yEe(this,e,n,i)}consume(e){if(this.map.sort(function(o,r){return o[0]-r[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];i.push([...e]),e.length=0;let s=i.pop();for(;s;)e.push(...s),s=i.pop();this.map.length=0}}function yEe(t,e,n,i){let s=0;if(!(n===0&&i.length===0)){for(;s<t.map.length;){if(t.map[s][0]===e){t.map[s][1]+=n,t.map[s][2].push(...i);return}s+=1}t.map.push([e,n,i])}}function bEe(t,e){let n=!1;const i=[];for(;e<t.length;){const s=t[e];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&i.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const o=i.length-1;i[o]=i[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return i}function wEe(){return{flow:{null:{name:"table",tokenize:kEe,resolveAll:CEe}}}}function kEe(t,e,n){const i=this;let s=0,o=0,r;return a;function a(L){let R=i.events.length-1;for(;R>-1;){const F=i.events[R][1].type;if(F==="lineEnding"||F==="linePrefix")R--;else break}const V=R>-1?i.events[R][1].type:null,H=V==="tableHead"||V==="tableRow"?M:l;return H===M&&i.parser.lazy[i.now().line]?n(L):H(L)}function l(L){return t.enter("tableHead"),t.enter("tableRow"),c(L)}function c(L){return L===124||(r=!0,o+=1),u(L)}function u(L){return L===null?n(L):Et(L)?o>1?(o=0,i.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),f):n(L):un(L)?_n(t,u,"whitespace")(L):(o+=1,r&&(r=!1,s+=1),L===124?(t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),r=!0,u):(t.enter("data"),d(L)))}function d(L){return L===null||L===124||jn(L)?(t.exit("data"),u(L)):(t.consume(L),L===92?h:d)}function h(L){return L===92||L===124?(t.consume(L),d):d(L)}function f(L){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(L):(t.enter("tableDelimiterRow"),r=!1,un(L)?_n(t,p,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):p(L))}function p(L){return L===45||L===58?b(L):L===124?(r=!0,t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),m):S(L)}function m(L){return un(L)?_n(t,b,"whitespace")(L):b(L)}function b(L){return L===58?(o+=1,r=!0,t.enter("tableDelimiterMarker"),t.consume(L),t.exit("tableDelimiterMarker"),w):L===45?(o+=1,w(L)):L===null||Et(L)?A(L):S(L)}function w(L){return L===45?(t.enter("tableDelimiterFiller"),k(L)):S(L)}function k(L){return L===45?(t.consume(L),k):L===58?(r=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(L),t.exit("tableDelimiterMarker"),C):(t.exit("tableDelimiterFiller"),C(L))}function C(L){return un(L)?_n(t,A,"whitespace")(L):A(L)}function A(L){return L===124?p(L):L===null||Et(L)?!r||s!==o?S(L):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(L)):S(L)}function S(L){return n(L)}function M(L){return t.enter("tableRow"),P(L)}function P(L){return L===124?(t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),P):L===null||Et(L)?(t.exit("tableRow"),e(L)):un(L)?_n(t,P,"whitespace")(L):(t.enter("data"),T(L))}function T(L){return L===null||L===124||jn(L)?(t.exit("data"),P(L)):(t.consume(L),L===92?I:T)}function I(L){return L===92||L===124?(t.consume(L),T):T(L)}}function CEe(t,e){let n=-1,i=!0,s=0,o=[0,0,0,0],r=[0,0,0,0],a=!1,l=0,c,u,d;const h=new _Ee;for(;++n<t.length;){const f=t[n],p=f[1];f[0]==="enter"?p.type==="tableHead"?(a=!1,l!==0&&(eT(h,e,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",c,e]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(i=!0,d=void 0,o=[0,0,0,0],r=[0,n+1,0,0],a&&(a=!1,u={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",u,e]])),s=p.type==="tableDelimiterRow"?2:u?3:1):s&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(i=!1,r[2]===0&&(o[1]!==0&&(r[0]=r[1],d=__(h,e,o,s,void 0,d),o=[0,0,0,0]),r[2]=n)):p.type==="tableCellDivider"&&(i?i=!1:(o[1]!==0&&(r[0]=r[1],d=__(h,e,o,s,void 0,d)),o=r,r=[o[1],n,0,0])):p.type==="tableHead"?(a=!0,l=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(l=n,o[1]!==0?(r[0]=r[1],d=__(h,e,o,s,n,d)):r[1]!==0&&(d=__(h,e,r,s,n,d)),s=0):s&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(r[3]=n)}for(l!==0&&eT(h,e,l,c,u),h.consume(e.events),n=-1;++n<e.events.length;){const f=e.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=bEe(e.events,n))}return t}function __(t,e,n,i,s,o){const r=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Nh(e.events,n[0])),t.add(n[0],0,[["exit",o,e]]));const l=Nh(e.events,n[1]);if(o={type:r,start:Object.assign({},l),end:Object.assign({},l)},t.add(n[1],0,[["enter",o,e]]),n[2]!==0){const c=Nh(e.events,n[2]),u=Nh(e.events,n[3]),d={type:a,start:Object.assign({},c),end:Object.assign({},u)};if(t.add(n[2],0,[["enter",d,e]]),i!==2){const h=e.events[n[2]],f=e.events[n[3]];if(h[1].end=Object.assign({},f[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,m=n[3]-n[2]-1;t.add(p,m,[])}}t.add(n[3]+1,0,[["exit",d,e]])}return s!==void 0&&(o.end=Object.assign({},Nh(e.events,s)),t.add(s,0,[["exit",o,e]]),o=void 0),o}function eT(t,e,n,i,s){const o=[],r=Nh(e.events,n);s&&(s.end=Object.assign({},r),o.push(["exit",s,e])),i.end=Object.assign({},r),o.push(["exit",i,e]),t.add(n+1,0,o)}function Nh(t,e){const n=t[e],i=n[0]==="enter"?"start":"end";return n[1][i]}const xEe={name:"tasklistCheck",tokenize:$Ee};function SEe(){return{text:{91:xEe}}}function $Ee(t,e,n){const i=this;return s;function s(l){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),o)}function o(l){return jn(l)?(t.enter("taskListCheckValueUnchecked"),t.consume(l),t.exit("taskListCheckValueUnchecked"),r):l===88||l===120?(t.enter("taskListCheckValueChecked"),t.consume(l),t.exit("taskListCheckValueChecked"),r):n(l)}function r(l){return l===93?(t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),a):n(l)}function a(l){return Et(l)?e(l):un(l)?t.check({tokenize:AEe},e,n)(l):n(l)}}function AEe(t,e,n){return _n(t,i,"whitespace");function i(s){return s===null?n(s):e(s)}}function EEe(t){return SN([QAe(),cEe(),vEe(t),wEe(),SEe()])}const MEe={};function TEe(t){const e=this,n=t||MEe,i=e.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),o=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),r=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(EEe(n)),o.push(XAe()),r.push(KAe(n))}function Ft(t,e){return Object.assign(t,{meta:{package:"@milkdown/preset-gfm",...e}}),t}const hS=hv("strike_through");Ft(hS,{displayName:"Attr<strikethrough>",group:"Strikethrough"});const kp=dv("strike_through",t=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:e=>e==="line-through"}],toDOM:e=>["del",t.get(hS.key)(e)],parseMarkdown:{match:e=>e.type==="delete",runner:(e,n,i)=>{e.openMark(i),e.next(n.children),e.closeMark(i)}},toMarkdown:{match:e=>e.type.name==="strike_through",runner:(e,n)=>{e.withMark(n,"delete")}}}));Ft(kp.mark,{displayName:"MarkSchema<strikethrough>",group:"Strikethrough"});Ft(kp.ctx,{displayName:"MarkSchemaCtx<strikethrough>",group:"Strikethrough"});const F2=on("ToggleStrikeThrough",t=>()=>A2(kp.type(t)));Ft(F2,{displayName:"Command<ToggleStrikethrough>",group:"Strikethrough"});const mH=Co(t=>av(/~([^~]+)~$/,kp.type(t)));Ft(mH,{displayName:"InputRule<strikethrough>",group:"Strikethrough"});const fS=xo("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:t=>{const e=t.get(gn);return()=>e.call(F2.key)}}});Ft(fS.ctx,{displayName:"KeymapCtx<strikethrough>",group:"Strikethrough"});Ft(fS.shortcuts,{displayName:"Keymap<strikethrough>",group:"Strikethrough"});const pv=t$e({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:t=>t.style.textAlign||"left",setDOMAttr:(t,e)=>{e.style=`text-align: ${t||"left"}`}}}}),Cp=Hs("table",()=>({...pv.table,content:"table_header_row table_row+",disableDropCursor:!0,parseMarkdown:{match:t=>t.type==="table",runner:(t,e,n)=>{const i=e.align,s=e.children.map((o,r)=>({...o,align:i,isHeader:r===0}));t.openNode(n),t.next(s),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table",runner:(t,e)=>{var n;const i=(n=e.content.firstChild)==null?void 0:n.content;if(!i)return;const s=[];i.forEach(o=>{s.push(o.attrs.alignment)}),t.openNode("table",void 0,{align:s}),t.next(e.content),t.closeNode()}}}));Ft(Cp.node,{displayName:"NodeSchema<table>",group:"Table"});Ft(Cp.ctx,{displayName:"NodeSchemaCtx<table>",group:"Table"});const N2=Hs("table_header_row",()=>({...pv.table_row,disableDropCursor:!0,content:"(table_header)*",parseDOM:[{tag:"tr[data-is-header]"}],toDOM(){return["tr",{"data-is-header":!0},0]},parseMarkdown:{match:t=>!!(t.type==="tableRow"&&t.isHeader),runner:(t,e,n)=>{const i=e.align,s=e.children.map((o,r)=>({...o,align:i[r],isHeader:e.isHeader}));t.openNode(n),t.next(s),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table_header_row",runner:(t,e)=>{t.openNode("tableRow",void 0,{isHeader:!0}),t.next(e.content),t.closeNode()}}}));Ft(N2.node,{displayName:"NodeSchema<tableHeaderRow>",group:"Table"});Ft(N2.ctx,{displayName:"NodeSchemaCtx<tableHeaderRow>",group:"Table"});const mv=Hs("table_row",()=>({...pv.table_row,disableDropCursor:!0,content:"(table_cell)*",parseMarkdown:{match:t=>t.type==="tableRow",runner:(t,e,n)=>{const i=e.align,s=e.children.map((o,r)=>({...o,align:i[r]}));t.openNode(n),t.next(s),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table_row",runner:(t,e)=>{t.openNode("tableRow"),t.next(e.content),t.closeNode()}}}));Ft(mv.node,{displayName:"NodeSchema<tableRow>",group:"Table"});Ft(mv.ctx,{displayName:"NodeSchemaCtx<tableRow>",group:"Table"});const gv=Hs("table_cell",()=>({...pv.table_cell,disableDropCursor:!0,parseMarkdown:{match:t=>t.type==="tableCell"&&!t.isHeader,runner:(t,e,n)=>{const i=e.align;t.openNode(n,{alignment:i}).openNode(t.schema.nodes.paragraph).next(e.children).closeNode().closeNode()}},toMarkdown:{match:t=>t.type.name==="table_cell",runner:(t,e)=>{t.openNode("tableCell").next(e.content).closeNode()}}}));Ft(gv.node,{displayName:"NodeSchema<tableCell>",group:"Table"});Ft(gv.ctx,{displayName:"NodeSchemaCtx<tableCell>",group:"Table"});const B2=Hs("table_header",()=>({...pv.table_header,disableDropCursor:!0,parseMarkdown:{match:t=>t.type==="tableCell"&&!!t.isHeader,runner:(t,e,n)=>{const i=e.align;t.openNode(n,{alignment:i}),t.openNode(t.schema.nodes.paragraph),t.next(e.children),t.closeNode(),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table_header",runner:(t,e)=>{t.openNode("tableCell"),t.next(e.content),t.closeNode()}}}));Ft(B2.node,{displayName:"NodeSchema<tableHeader>",group:"Table"});Ft(B2.ctx,{displayName:"NodeSchemaCtx<tableHeader>",group:"Table"});function gH(t,e=3,n=3){const i=Array(n).fill(0).map(()=>gv.type(t).createAndFill()),s=Array(n).fill(0).map(()=>B2.type(t).createAndFill()),o=Array(e).fill(0).map((r,a)=>a===0?N2.type(t).create(null,s):mv.type(t).create(null,i));return Cp.type(t).create(null,o)}function vv(t){return r5(e=>e.type.spec.tableRole==="table")(t)}function Bh(t,e){const n=vv(e.$from);if(!n)return;const i=Pn.get(n.node);if(!(t<0||t>=i.width))return i.cellsInRect({left:t,right:t+1,top:0,bottom:i.height}).map(s=>{const o=n.node.nodeAt(s);if(!o)return;const r=s+n.start;return{pos:r,start:r+1,node:o}}).filter(s=>s!=null)}function zh(t,e){const n=vv(e.$from);if(!n)return;const i=Pn.get(n.node);if(!(t<0||t>=i.height))return i.cellsInRect({left:0,right:i.width,top:t,bottom:t+1}).map(s=>{const o=n.node.nodeAt(s);if(!o)return;const r=s+n.start;return{pos:r,start:r+1,node:o}}).filter(s=>s!=null)}function PEe(t){const e=vv(t.$from);if(!e)return;const n=Pn.get(e.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map(i=>{const s=e.node.nodeAt(i),o=i+e.start;return{pos:o,start:o+1,node:s}})}function IEe(t){const e=PEe(t.selection);if(e&&e[0]){const n=t.doc.resolve(e[0].pos),i=e[e.length-1];if(i){const s=t.doc.resolve(i.pos);return $2(t.setSelection(new as(s,n)))}}return t}function vH(t,e,{map:n,tableStart:i,table:s},o){const r=Array(o).fill(0).reduce((l,c,u)=>l+s.child(u).nodeSize,i),a=Array(n.width).fill(0).map((l,c)=>{const u=s.nodeAt(n.map[c]);return gv.type(t).createAndFill({alignment:u==null?void 0:u.attrs.alignment})});return e.insert(r,mv.type(t).create(null,a)),e}function _H(t){return(e,n)=>i=>{n=n??i.selection.from;const s=i.doc.resolve(n),o=r5(l=>l.type.name==="table")(s),r=o?{node:o.node,from:o.start}:void 0,a=t==="row";if(r){const l=Pn.get(r.node);if(e>=0&&e<(a?l.height:l.width)){const c=l.positionAt(a?e:l.height-1,a?l.width-1:e,r.node),u=i.doc.resolve(r.from+c),d=a?as.rowSelection:as.colSelection,h=l.positionAt(a?e:0,a?0:e,r.node),f=i.doc.resolve(r.from+h);return $2(i.setSelection(d(u,f)))}}return i}}const LEe=_H("row"),OEe=_H("col");function tT(t){return t[0].map((e,n)=>t.map(i=>i[n]))}function yH(t,e){const n=[],i=Pn.get(t);for(let s=0;s<i.height;s++){const o=t.child(s),r=[];for(let a=0;a<i.width;a++){if(!e[s][a])continue;const l=i.map[s*i.width+a],c=e[s][a],u=t.nodeAt(l).type.createChecked(Object.assign({},c.attrs),c.content,c.marks);r.push(u)}n.push(o.type.createChecked(o.attrs,r,o.marks))}return t.type.createChecked(t.attrs,n,t.marks)}function bH(t){const e=Pn.get(t),n=[];for(let i=0;i<e.height;i++){const s=[],o={};for(let r=0;r<e.width;r++){const a=e.map[i*e.width+r],l=t.nodeAt(a),c=e.findCell(a);if(o[a]||c.top!==i){s.push(null);continue}o[a]=!0,s.push(l)}n.push(s)}return n}function wH(t,e,n,i){const s=e[0]>n[0]?-1:1,o=t.splice(e[0],e.length),r=o.length%2===0?1:0;let a;return i===-1&&s===1?a=n[0]-1:i===1&&s===-1?a=n[n.length-1]-r+1:a=s===-1?n[0]:n[n.length-1]-r,t.splice(a,0,...o),t}function DEe(t,e,n,i){let s=tT(bH(t.node));return s=wH(s,e,n,i),s=tT(s),yH(t.node,s)}function REe(t,e,n,i){let s=bH(t.node);return s=wH(s,e,n,i),yH(t.node,s)}function nT(t,e){let n=t,i=t;for(let u=t;u>=0;u--){const d=Bh(u,e.selection);d&&d.forEach(h=>{const f=h.node.attrs.colspan+u-1;f>=n&&(n=u),f>i&&(i=f)})}for(let u=t;u<=i;u++){const d=Bh(u,e.selection);d&&d.forEach(h=>{const f=h.node.attrs.colspan+u-1;h.node.attrs.colspan>1&&f>i&&(i=f)})}const s=[];for(let u=n;u<=i;u++){const d=Bh(u,e.selection);d&&d.length&&s.push(u)}n=s[0],i=s[s.length-1];const o=Bh(n,e.selection),r=zh(0,e.selection),a=e.doc.resolve(o[o.length-1].pos);let l;for(let u=i;u>=n;u--){const d=Bh(u,e.selection);if(d&&d.length){for(let h=r.length-1;h>=0;h--)if(r[h].pos===d[0].pos){l=d[0];break}if(l)break}}const c=e.doc.resolve(l.pos);return{$anchor:a,$head:c,indexes:s}}function sT(t,e){let n=t,i=t;for(let u=t;u>=0;u--)zh(u,e.selection).forEach(d=>{const h=d.node.attrs.rowspan+u-1;h>=n&&(n=u),h>i&&(i=h)});for(let u=t;u<=i;u++)zh(u,e.selection).forEach(d=>{const h=d.node.attrs.rowspan+u-1;d.node.attrs.rowspan>1&&h>i&&(i=h)});const s=[];for(let u=n;u<=i;u++){const d=zh(u,e.selection);d&&d.length&&s.push(u)}n=s[0],i=s[s.length-1];const o=zh(n,e.selection),r=Bh(0,e.selection),a=e.doc.resolve(o[o.length-1].pos);let l;for(let u=i;u>=n;u--){const d=zh(u,e.selection);if(d&&d.length){for(let h=r.length-1;h>=0;h--)if(r[h].pos===d[0].pos){l=d[0];break}if(l)break}}const c=e.doc.resolve(l.pos);return{$anchor:a,$head:c,indexes:s}}function VEe(t){const{tr:e,origin:n,target:i,select:s=!0,pos:o}=t,r=o!=null?e.doc.resolve(o):e.selection.$from,a=vv(r);if(!a)return e;const{indexes:l}=nT(n,e),{indexes:c}=nT(i,e);if(l.includes(i))return e;const u=DEe(a,l,c,0),d=$2(e).replaceWith(a.pos,a.pos+a.node.nodeSize,u);if(!s)return d;const h=Pn.get(u),f=a.start,p=i,m=h.positionAt(h.height-1,p,u),b=d.doc.resolve(f+m),w=as.colSelection,k=h.positionAt(0,p,u),C=d.doc.resolve(f+k);return d.setSelection(w(b,C))}function FEe(t){const{tr:e,origin:n,target:i,select:s=!0,pos:o}=t,r=o!=null?e.doc.resolve(o):e.selection.$from,a=vv(r);if(!a)return e;const{indexes:l}=sT(n,e),{indexes:c}=sT(i,e);if(l.includes(i))return e;const u=REe(a,l,c,0),d=$2(e).replaceWith(a.pos,a.pos+a.node.nodeSize,u);if(!s)return d;const h=Pn.get(u),f=a.start,p=i,m=h.positionAt(p,h.width-1,u),b=d.doc.resolve(f+m),w=as.rowSelection,k=h.positionAt(p,0,u),C=d.doc.resolve(f+k);return d.setSelection(w(b,C))}const pS=on("GoToPrevTableCell",()=>()=>eH(-1));Ft(pS,{displayName:"Command<goToPrevTableCellCommand>",group:"Table"});const mS=on("GoToNextTableCell",()=>()=>eH(1));Ft(mS,{displayName:"Command<goToNextTableCellCommand>",group:"Table"});const gS=on("ExitTable",t=>()=>(e,n)=>{if(!Mr(e))return!1;const{$head:i}=e.selection,s=K5e(i,Cp.type(t));if(!s)return!1;const{to:o}=s,r=e.tr.replaceWith(o,o,Ol.type(t).createAndFill());return r.setSelection(Ut.near(r.doc.resolve(o),1)).scrollIntoView(),n==null||n(r),!0});Ft(gS,{displayName:"Command<breakTableCommand>",group:"Table"});const kH=on("InsertTable",t=>({row:e,col:n}={})=>(i,s)=>{const{selection:o,tr:r}=i,{from:a}=o,l=gH(t,e,n),c=r.replaceSelectionWith(l),u=Ut.findFrom(c.doc.resolve(a),1,!0);return u&&c.setSelection(u),s==null||s(c),!0});Ft(kH,{displayName:"Command<insertTableCommand>",group:"Table"});const CH=on("MoveRow",()=>({from:t,to:e,pos:n}={})=>(i,s)=>{const{tr:o}=i;return!!(s!=null&&s(FEe({tr:o,origin:t??0,target:e??0,pos:n,select:!0})))});Ft(CH,{displayName:"Command<moveRowCommand>",group:"Table"});const xH=on("MoveCol",()=>({from:t,to:e,pos:n}={})=>(i,s)=>{const{tr:o}=i;return!!(s!=null&&s(VEe({tr:o,origin:t??0,target:e??0,pos:n,select:!0})))});Ft(xH,{displayName:"Command<moveColCommand>",group:"Table"});const SH=on("SelectRow",()=>(t={index:0})=>(e,n)=>{const{tr:i}=e;return!!(n!=null&&n(LEe(t.index,t.pos)(i)))});Ft(SH,{displayName:"Command<selectRowCommand>",group:"Table"});const $H=on("SelectCol",()=>(t={index:0})=>(e,n)=>{const{tr:i}=e;return!!(n!=null&&n(OEe(t.index,t.pos)(i)))});Ft($H,{displayName:"Command<selectColCommand>",group:"Table"});const AH=on("SelectTable",()=>()=>(t,e)=>{const{tr:n}=t;return!!(e!=null&&e(IEe(n)))});Ft(AH,{displayName:"Command<selectTableCommand>",group:"Table"});const EH=on("DeleteSelectedCells",()=>()=>(t,e)=>{const{selection:n}=t;if(!(n instanceof as))return!1;const i=n.isRowSelection(),s=n.isColSelection();return i&&s?C$e(t,e):s?v$e(t,e):y$e(t,e)});Ft(EH,{displayName:"Command<deleteSelectedCellsCommand>",group:"Table"});const MH=on("AddColBefore",()=>()=>p$e);Ft(MH,{displayName:"Command<addColBeforeCommand>",group:"Table"});const TH=on("AddColAfter",()=>()=>m$e);Ft(TH,{displayName:"Command<addColAfterCommand>",group:"Table"});const PH=on("AddRowBefore",t=>()=>(e,n)=>{if(!Mr(e))return!1;if(n){const i=cu(e);n(vH(t,e.tr,i,i.top))}return!0});Ft(PH,{displayName:"Command<addRowBeforeCommand>",group:"Table"});const IH=on("AddRowAfter",t=>()=>(e,n)=>{if(!Mr(e))return!1;if(n){const i=cu(e);n(vH(t,e.tr,i,i.bottom))}return!0});Ft(IH,{displayName:"Command<addRowAfterCommand>",group:"Table"});const LH=on("SetAlign",()=>(t="left")=>b$e("alignment",t));Ft(LH,{displayName:"Command<setAlignCommand>",group:"Table"});const OH=Co(t=>new Go(/^\|(?<col>\d+)[xX](?<row>\d+)\|\s$/,(e,n,i,s)=>{var o,r;const a=e.doc.resolve(i);if(!a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),Cp.type(t)))return null;const l=gH(t,Number((o=n.groups)==null?void 0:o.row),Number((r=n.groups)==null?void 0:r.col)),c=e.tr.replaceRangeWith(i,s,l);return c.setSelection(Ot.create(c.doc,i+3)).scrollIntoView()}));Ft(OH,{displayName:"InputRule<insertTableInputRule>",group:"Table"});const vS=xo("tableKeymap",{NextCell:{shortcuts:["Mod-]","Tab"],command:t=>{const e=t.get(gn);return()=>e.call(mS.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:t=>{const e=t.get(gn);return()=>e.call(pS.key)}},ExitTable:{shortcuts:["Mod-Enter"],command:t=>{const e=t.get(gn);return()=>e.call(gS.key)}}});Ft(vS.ctx,{displayName:"KeymapCtx<table>",group:"Table"});Ft(vS.shortcuts,{displayName:"Keymap<table>",group:"Table"});const D3="footnote_definition",iT="footnoteDefinition",_S=Hs("footnote_definition",()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:""}},parseDOM:[{tag:`dl[data-type="${D3}"]`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw la(t);return{label:t.dataset.label}},contentElement:"dd"}],toDOM:t=>{const e=t.attrs.label;return["dl",{"data-label":e,"data-type":D3},["dt",e],["dd",0]]},parseMarkdown:{match:({type:t})=>t===iT,runner:(t,e,n)=>{t.openNode(n,{label:e.label}).next(e.children).closeNode()}},toMarkdown:{match:t=>t.type.name===D3,runner:(t,e)=>{t.openNode(iT,void 0,{label:e.attrs.label,identifier:e.attrs.label}).next(e.content).closeNode()}}}));Ft(_S.ctx,{displayName:"NodeSchemaCtx<footnodeDef>",group:"footnote"});Ft(_S.node,{displayName:"NodeSchema<footnodeDef>",group:"footnote"});const R3="footnote_reference",yS=Hs("footnote_reference",()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:""}},parseDOM:[{tag:`sup[data-type="${R3}"]`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw la(t);return{label:t.dataset.label}}}],toDOM:t=>{const e=t.attrs.label;return["sup",{"data-label":e,"data-type":R3},e]},parseMarkdown:{match:({type:t})=>t==="footnoteReference",runner:(t,e,n)=>{t.addNode(n,{label:e.label})}},toMarkdown:{match:t=>t.type.name===R3,runner:(t,e)=>{t.addNode("footnoteReference",void 0,void 0,{label:e.attrs.label,identifier:e.attrs.label})}}}));Ft(yS.ctx,{displayName:"NodeSchemaCtx<footnodeRef>",group:"footnote"});Ft(yS.node,{displayName:"NodeSchema<footnodeRef>",group:"footnote"});const DH=Va.extendSchema(t=>e=>{const n=t(e);return{...n,attrs:{...n.attrs,checked:{default:null}},parseDOM:[{tag:'li[data-item-type="task"]',getAttrs:i=>{if(!(i instanceof HTMLElement))throw la(i);return{label:i.dataset.label,listType:i.dataset.listType,spread:i.dataset.spread,checked:i.dataset.checked?i.dataset.checked==="true":null}}},...(n==null?void 0:n.parseDOM)||[]],toDOM:i=>n.toDOM&&i.attrs.checked==null?n.toDOM(i):["li",{"data-item-type":"task","data-label":i.attrs.label,"data-list-type":i.attrs.listType,"data-spread":i.attrs.spread,"data-checked":i.attrs.checked},0],parseMarkdown:{match:({type:i})=>i==="listItem",runner:(i,s,o)=>{if(s.checked==null){n.parseMarkdown.runner(i,s,o);return}const r=s.label!=null?`${s.label}.`:"•",a=s.checked!=null?!!s.checked:null,l=s.label!=null?"ordered":"bullet",c=s.spread!=null?`${s.spread}`:"true";i.openNode(o,{label:r,listType:l,spread:c,checked:a}),i.next(s.children),i.closeNode()}},toMarkdown:{match:i=>i.type.name==="list_item",runner:(i,s)=>{if(s.attrs.checked==null){n.toMarkdown.runner(i,s);return}const o=s.attrs.label,r=s.attrs.listType,a=s.attrs.spread==="true",l=s.attrs.checked;i.openNode("listItem",void 0,{label:o,listType:r,spread:a,checked:l}),i.next(s.content),i.closeNode()}}}});Ft(DH,{displayName:"NodeSchema<listItem>",group:"ListItem"});const RH=Co(()=>new Go(/^\[(?<checked>\s|x)\]\s$/,(t,e,n,i)=>{var s;const o=t.doc.resolve(n);let r=0,a=o.node(r);for(;a&&a.type.name!=="list_item";)r--,a=o.node(r);if(!a||a.attrs.checked!=null)return null;const l=((s=e.groups)==null?void 0:s.checked)==="x",c=o.before(r),u=t.tr;return u.deleteRange(n,i).setNodeMarkup(c,void 0,{...a.attrs,checked:l}),u}));Ft(RH,{displayName:"InputRule<wrapInTaskListInputRule>",group:"ListItem"});const NEe=[fS,vS].flat(),BEe=[OH,RH],zEe=[mH],VH=Ls(()=>Q$e);Ft(VH,{displayName:"Prose<autoInsertSpanPlugin>",group:"Prose"});const HEe=Ls(()=>L$e({}));Ft(HEe,{displayName:"Prose<columnResizingPlugin>",group:"Prose"});const FH=Ls(()=>j$e({allowTableNodeSelection:!0}));Ft(FH,{displayName:"Prose<tableEditingPlugin>",group:"Prose"});const bS=Gd("remarkGFM",()=>TEe);Ft(bS.plugin,{displayName:"Remark<remarkGFMPlugin>",group:"Remark"});Ft(bS.options,{displayName:"RemarkConfig<remarkGFMPlugin>",group:"Remark"});const UEe=new ps("MILKDOWN_KEEP_TABLE_ALIGN_PLUGIN");function jEe(t,e){let n=0;return e.forEach((i,s,o)=>{i===t&&(n=o)}),n}const NH=Ls(()=>new rs({key:UEe,appendTransaction:(t,e,n)=>{let i;const s=(o,r)=>{if(i||(i=n.tr),o.type.name!=="table_cell")return;const a=n.doc.resolve(r),l=a.node(a.depth),c=a.node(a.depth-1).firstChild;if(!c)return;const u=jEe(o,l),d=c.maybeChild(u);if(!d)return;const h=d.attrs.alignment,f=o.attrs.alignment;h!==f&&i.setNodeMarkup(r,void 0,{...o.attrs,alignment:h})};return e.doc!==n.doc&&n.doc.descendants(s),i}}));Ft(NH,{displayName:"Prose<keepTableAlignPlugin>",group:"Prose"});const WEe=[NH,VH,bS,FH].flat(),YEe=[DH,Cp,N2,mv,B2,gv,_S,yS,hS,kp].flat(),qEe=[mS,pS,gS,kH,CH,xH,SH,$H,AH,EH,PH,IH,MH,TH,LH,F2],GEe=[YEe,BEe,zEe,NEe,qEe,WEe].flat();var Q0=200,Gs=function(){};Gs.prototype.append=function(e){return e.length?(e=Gs.from(e),!this.length&&e||e.length<Q0&&this.leafAppend(e)||this.length<Q0&&e.leafPrepend(this)||this.appendInner(e)):this};Gs.prototype.prepend=function(e){return e.length?Gs.from(e).append(this):this};Gs.prototype.appendInner=function(e){return new XEe(this,e)};Gs.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Gs.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Gs.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Gs.prototype.forEach=function(e,n,i){n===void 0&&(n=0),i===void 0&&(i=this.length),n<=i?this.forEachInner(e,n,i,0):this.forEachInvertedInner(e,n,i,0)};Gs.prototype.map=function(e,n,i){n===void 0&&(n=0),i===void 0&&(i=this.length);var s=[];return this.forEach(function(o,r){return s.push(e(o,r))},n,i),s};Gs.from=function(e){return e instanceof Gs?e:e&&e.length?new BH(e):Gs.empty};var BH=function(t){function e(i){t.call(this),this.values=i}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(s,o){return s==0&&o==this.length?this:new e(this.values.slice(s,o))},e.prototype.getInner=function(s){return this.values[s]},e.prototype.forEachInner=function(s,o,r,a){for(var l=o;l<r;l++)if(s(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(s,o,r,a){for(var l=o-1;l>=r;l--)if(s(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(s){if(this.length+s.length<=Q0)return new e(this.values.concat(s.flatten()))},e.prototype.leafPrepend=function(s){if(this.length+s.length<=Q0)return new e(s.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Gs);Gs.empty=new BH([]);var XEe=function(t){function e(n,i){t.call(this),this.left=n,this.right=i,this.length=n.length+i.length,this.depth=Math.max(n.depth,i.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(i){return i<this.left.length?this.left.get(i):this.right.get(i-this.left.length)},e.prototype.forEachInner=function(i,s,o,r){var a=this.left.length;if(s<a&&this.left.forEachInner(i,s,Math.min(o,a),r)===!1||o>a&&this.right.forEachInner(i,Math.max(s-a,0),Math.min(this.length,o)-a,r+a)===!1)return!1},e.prototype.forEachInvertedInner=function(i,s,o,r){var a=this.left.length;if(s>a&&this.right.forEachInvertedInner(i,s-a,Math.max(o,a)-a,r+a)===!1||o<a&&this.left.forEachInvertedInner(i,Math.min(s,a),o,r)===!1)return!1},e.prototype.sliceInner=function(i,s){if(i==0&&s==this.length)return this;var o=this.left.length;return s<=o?this.left.slice(i,s):i>=o?this.right.slice(i-o,s-o):this.left.slice(i,o).append(this.right.slice(0,s-o))},e.prototype.leafAppend=function(i){var s=this.right.leafAppend(i);if(s)return new e(this.left,s)},e.prototype.leafPrepend=function(i){var s=this.left.leafPrepend(i);if(s)return new e(s,this.right)},e.prototype.appendInner=function(i){return this.left.depth>=Math.max(this.right.depth,i.depth)+1?new e(this.left,new e(this.right,i)):new e(this,i)},e}(Gs);const KEe=500;class Dr{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}let s,o;n&&(s=this.remapping(i,this.items.length),o=s.maps.length);let r=e.tr,a,l,c=[],u=[];return this.items.forEach((d,h)=>{if(!d.step){s||(s=this.remapping(i,h+1),o=s.maps.length),o--,u.push(d);return}if(s){u.push(new wa(d.map));let f=d.step.map(s.slice(o)),p;f&&r.maybeStep(f).doc&&(p=r.mapping.maps[r.mapping.maps.length-1],c.push(new wa(p,void 0,void 0,c.length+u.length))),o--,p&&s.appendMap(p,o)}else r.maybeStep(d.step);if(d.selection)return a=s?d.selection.map(s.slice(o)):d.selection,l=new Dr(this.items.slice(0,i).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:r,selection:a}}addTransform(e,n,i,s){let o=[],r=this.eventCount,a=this.items,l=!s&&a.length?a.get(a.length-1):null;for(let u=0;u<e.steps.length;u++){let d=e.steps[u].invert(e.docs[u]),h=new wa(e.mapping.maps[u],d,n),f;(f=l&&l.merge(h))&&(h=f,u?o.pop():a=a.slice(0,a.length-1)),o.push(h),n&&(r++,n=void 0),s||(l=h)}let c=r-i.depth;return c>JEe&&(a=ZEe(a,c),r-=c),new Dr(a.append(o),r)}remapping(e,n){let i=new df;return this.items.forEach((s,o)=>{let r=s.mirrorOffset!=null&&o-s.mirrorOffset>=e?i.maps.length-s.mirrorOffset:void 0;i.appendMap(s.map,r)},e,n),i}addMaps(e){return this.eventCount==0?this:new Dr(this.items.append(e.map(n=>new wa(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let i=[],s=Math.max(0,this.items.length-n),o=e.mapping,r=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},s);let l=n;this.items.forEach(h=>{let f=o.getMirror(--l);if(f==null)return;r=Math.min(r,f);let p=o.maps[f];if(h.step){let m=e.steps[f].invert(e.docs[f]),b=h.selection&&h.selection.map(o.slice(l+1,f));b&&a++,i.push(new wa(p,m,b))}else i.push(new wa(p))},s);let c=[];for(let h=n;h<r;h++)c.push(new wa(o.maps[h]));let u=this.items.slice(0,s).append(c).append(i),d=new Dr(u,a);return d.emptyItemCount()>KEe&&(d=d.compress(this.items.length-i.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),i=n.maps.length,s=[],o=0;return this.items.forEach((r,a)=>{if(a>=e)s.push(r),r.selection&&o++;else if(r.step){let l=r.step.map(n.slice(i)),c=l&&l.getMap();if(i--,c&&n.appendMap(c,i),l){let u=r.selection&&r.selection.map(n.slice(i));u&&o++;let d=new wa(c.invert(),l,u),h,f=s.length-1;(h=s.length&&s[f].merge(d))?s[f]=h:s.push(d)}}else r.map&&i--},this.items.length,0),new Dr(Gs.from(s.reverse()),o)}}Dr.empty=new Dr(Gs.empty,0);function ZEe(t,e){let n;return t.forEach((i,s)=>{if(i.selection&&e--==0)return n=s,!1}),t.slice(n)}class wa{constructor(e,n,i,s){this.map=e,this.step=n,this.selection=i,this.mirrorOffset=s}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new wa(n.getMap().invert(),n,this.selection)}}}class pc{constructor(e,n,i,s,o){this.done=e,this.undone=n,this.prevRanges=i,this.prevTime=s,this.prevComposition=o}}const JEe=20;function QEe(t,e,n,i){let s=n.getMeta(cd),o;if(s)return s.historyState;n.getMeta(nMe)&&(t=new pc(t.done,t.undone,null,0,-1));let r=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(r&&r.getMeta(cd))return r.getMeta(cd).redo?new pc(t.done.addTransform(n,void 0,i,ky(e)),t.undone,oT(n.mapping.maps),t.prevTime,t.prevComposition):new pc(t.done,t.undone.addTransform(n,void 0,i,ky(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(r&&r.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!r&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-i.newGroupDelay||!eMe(n,t.prevRanges)),c=r?V3(t.prevRanges,n.mapping):oT(n.mapping.maps);return new pc(t.done.addTransform(n,l?e.selection.getBookmark():void 0,i,ky(e)),Dr.empty,c,n.time,a??t.prevComposition)}else return(o=n.getMeta("rebased"))?new pc(t.done.rebased(n,o),t.undone.rebased(n,o),V3(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new pc(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),V3(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function eMe(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((i,s)=>{for(let o=0;o<e.length;o+=2)i<=e[o+1]&&s>=e[o]&&(n=!0)}),n}function oT(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((i,s,o,r)=>e.push(o,r));return e}function V3(t,e){if(!t)return null;let n=[];for(let i=0;i<t.length;i+=2){let s=e.map(t[i],1),o=e.map(t[i+1],-1);s<=o&&n.push(s,o)}return n}function tMe(t,e,n){let i=ky(e),s=cd.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,i);if(!o)return null;let r=o.selection.resolve(o.transform.doc),a=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),s,i),l=new pc(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(r).setMeta(cd,{redo:n,historyState:l})}let F3=!1,rT=null;function ky(t){let e=t.plugins;if(rT!=e){F3=!1,rT=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){F3=!0;break}}return F3}const cd=new ps("history"),nMe=new ps("closeHistory");function sMe(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new rs({key:cd,state:{init(){return new pc(Dr.empty,Dr.empty,null,0,-1)},apply(e,n,i){return QEe(n,i,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let i=n.inputType,s=i=="historyUndo"?HH:i=="historyRedo"?UH:null;return s?(n.preventDefault(),s(e.state,e.dispatch)):!1}}}})}function zH(t,e){return(n,i)=>{let s=cd.getState(n);if(!s||(t?s.undone:s.done).eventCount==0)return!1;if(i){let o=tMe(s,n,t);o&&i(e?o.scrollIntoView():o)}return!0}}const HH=zH(!1,!0),UH=zH(!0,!0);function xp(t,e){return Object.assign(t,{meta:{package:"@milkdown/plugin-history",...e}}),t}const wS=on("Undo",()=>()=>HH);xp(wS,{displayName:"Command<undo>"});const kS=on("Redo",()=>()=>UH);xp(kS,{displayName:"Command<redo>"});const CS=ms({},"historyProviderConfig");xp(CS,{displayName:"Ctx<historyProviderConfig>"});const jH=Ls(t=>sMe(t.get(CS.key)));xp(jH,{displayName:"Ctx<historyProviderPlugin>"});const xS=xo("historyKeymap",{Undo:{shortcuts:"Mod-z",command:t=>{const e=t.get(gn);return()=>e.call(wS.key)}},Redo:{shortcuts:["Mod-y","Shift-Mod-z"],command:t=>{const e=t.get(gn);return()=>e.call(kS.key)}}});xp(xS.ctx,{displayName:"KeymapCtx<history>"});xp(xS.shortcuts,{displayName:"Keymap<history>"});const iMe=[CS,jH,xS,wS,kS].flat();function Mx(t){if(!t)return!1;if(Array.isArray(t))return t.length>1?!1:Mx(t[0]);const e=t.content;return e?Mx(e):t.type==="text"}function oMe(t){if(t.content.childCount===1){const e=t.content.firstChild;if((e==null?void 0:e.type.name)==="text"&&e.marks.length===0)return e;if((e==null?void 0:e.type.name)==="paragraph"&&e.childCount===1){const n=e.firstChild;if((n==null?void 0:n.type.name)==="text"&&n.marks.length===0)return n}}return!1}const WH=Ls(t=>{const e=t.get(qr);t.update(yg,i=>({...i,editable:i.editable??(()=>!0)}));const n=new ps("MILKDOWN_CLIPBOARD");return new rs({key:n,props:{handlePaste:(i,s)=>{var o,r;const a=t.get(gf),l=(r=(o=i.props).editable)==null?void 0:r.call(o,i.state),{clipboardData:c}=s;if(!l||!c||i.state.selection.$from.node().type.spec.code)return!1;const u=c.getData("text/plain"),d=c.getData("vscode-editor-data");if(d){const w=JSON.parse(d),k=w==null?void 0:w.mode;if(u&&k){const{tr:C}=i.state,A=Z5e("code_block",e);return C.replaceSelectionWith(A.create({language:k})).setSelection(Ot.near(C.doc.resolve(Math.max(0,C.selection.from-2)))).insertText(u.replace(/\r\n?/g,`
129 +`)),i.dispatch(C),!0}}const h=c.getData("text/html");if(h.length===0&&u.length===0)return!1;const f=g2.fromSchema(e);let p;if(h.length===0){const w=a(u);if(!w||typeof w=="string")return!1;p=iu.fromSchema(e).serializeFragment(w.content)}else{const w=document.createElement("template");w.innerHTML=h,p=w.content.cloneNode(!0),w.remove()}const m=f.parseSlice(p),b=oMe(m);return b?(i.dispatch(i.state.tr.replaceSelectionWith(b,!0)),!0):(i.dispatch(i.state.tr.replaceSelection(m)),!0)},clipboardTextSerializer:i=>{const s=t.get(vf);if(Mx(i.content.toJSON()))return i.content.textBetween(0,i.content.size,`
125 130
126 -`);const s=t.topNodeType.createAndFill(void 0,o.content);return s?r(s):""}}})});UP.meta={displayName:"Prose<clipboard>",package:"@milkdown/plugin-clipboard"};const Ok=In({shouldAppend:e=>!(!e||["heading","paragraph"].includes(e.type.name)),getNode:e=>e.schema.nodes.paragraph.create()},"trailingConfig");Ok.meta={package:"@milkdown/plugin-trailing",displayName:"Ctx<trailingConfig>"};const WP=ao(e=>{const t=new wn("MILKDOWN_TRAILING"),{shouldAppend:n,getNode:o}=e.get(Ok.key),r=new xn({key:t,state:{init:(s,i)=>{const l=i.tr.doc.lastChild;return n(l,i)},apply:(s,i,l,a)=>{if(!s.docChanged)return i;const u=s.doc.lastChild;return n(u,a)}},appendTransaction:(s,i,l)=>{const{doc:a,tr:u}=l,c=o==null?void 0:o(l),d=r.getState(l),f=a.content.size;if(!(!d||!c))return u.insert(f,c)}});return r});WP.meta={package:"@milkdown/plugin-trailing",displayName:"Prose<trailing>"};const h5e=[Ok,WP];var KP=(e=>(e.CodeMirror="code-mirror",e.LinkTooltip="link-tooltip",e.Cursor="cursor",e.BlockEdit="block-edit",e.Toolbar="toolbar",e.Placeholder="placeholder",e))(KP||{});const m5e={cursor:!0,"link-tooltip":!0,"block-edit":!0,placeholder:!0,toolbar:!0,"code-mirror":!0};async function g5e(e,t,n){switch(e){case"link-tooltip":{const{defineFeature:o}=await Yd(()=>Promise.resolve().then(()=>ADe),void 0);return o(t,n)}case"block-edit":{const{defineFeature:o}=await Yd(()=>Promise.resolve().then(()=>gFe),void 0);return o(t,n)}case"placeholder":{const{defineFeature:o}=await Yd(()=>Promise.resolve().then(()=>bFe),void 0);return o(t,n)}case"toolbar":{const{defineFeature:o}=await Yd(()=>Promise.resolve().then(()=>kFe),void 0);return o(t,n)}}}const v5e=jt([],"FeaturesCtx");function y5e(e){return t=>{t.inject(v5e,e)}}var _5e="Expected a function",Z9=0/0,b5e="[object Symbol]",w5e=/^\s+|\s+$/g,C5e=/^[-+]0x[0-9a-f]+$/i,k5e=/^0b[01]+$/i,S5e=/^0o[0-7]+$/i,$5e=parseInt,E5e=typeof On=="object"&&On&&On.Object===Object&&On,x5e=typeof self=="object"&&self&&self.Object===Object&&self,M5e=E5e||x5e||Function("return this")(),T5e=Object.prototype,O5e=T5e.toString,I5e=Math.max,A5e=Math.min,n_=function(){return M5e.Date.now()};function N5e(e,t,n){var o,r,s,i,l,a,u=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(_5e);t=J9(t)||0,S2(n)&&(c=!!n.leading,d="maxWait"in n,s=d?I5e(J9(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function p(E){var T=o,O=r;return o=r=void 0,u=E,i=e.apply(O,T),i}function h(E){return u=E,l=setTimeout(v,t),c?p(E):i}function m(E){var T=E-a,O=E-u,P=t-T;return d?A5e(P,s-O):P}function y(E){var T=E-a,O=E-u;return a===void 0||T>=t||T<0||d&&O>=s}function v(){var E=n_();if(y(E))return w(E);l=setTimeout(v,m(E))}function w(E){return l=void 0,f&&o?p(E):(o=r=void 0,i)}function _(){l!==void 0&&clearTimeout(l),u=0,o=a=r=l=void 0}function S(){return l===void 0?i:w(n_())}function x(){var E=n_(),T=y(E);if(o=arguments,r=this,a=E,T){if(l===void 0)return h(a);if(d)return l=setTimeout(v,t),p(a)}return l===void 0&&(l=setTimeout(v,t)),i}return x.cancel=_,x.flush=S,x}function S2(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function P5e(e){return!!e&&typeof e=="object"}function L5e(e){return typeof e=="symbol"||P5e(e)&&O5e.call(e)==b5e}function J9(e){if(typeof e=="number")return e;if(L5e(e))return Z9;if(S2(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=S2(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(w5e,"");var n=k5e.test(e);return n||S5e.test(e)?$5e(e.slice(2),n?2:8):C5e.test(e)?Z9:+e}var R5e=N5e;const Sv=_o(R5e);let qP=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 $2=jt(new qP,"listener"),D5e=new wn("MILKDOWN_LISTENER"),GP=e=>(e.inject($2,new qP),async()=>{await e.wait(Ja);const t=e.get($2),{listeners:n}=t;n.beforeMount.forEach(l=>l(e)),await e.wait(ip);const o=e.get(Ac);let r=null,s=null;const i=new xn({key:D5e,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:Sv(()=>{const{doc:a}=l;if(n.updated.length>0&&r&&!r.eq(a)&&n.updated.forEach(u=>{u(e,a,r)}),n.markdownUpdated.length>0&&r&&!r.eq(a)){const u=o(a);n.markdownUpdated.forEach(c=>{c(e,u,s)}),s=u}r=a},200)()}});e.update(ys,l=>l.concat(i)),await e.wait(O1),n.mounted.forEach(l=>l(e))});GP.meta={package:"@milkdown/plugin-listener",displayName:"Listener"};function F5e(e){return new Promise(t=>{const n=new FileReader;n.addEventListener("load",()=>{t({alt:e.name,src:n.result})},!1),n.readAsDataURL(e)})}const V5e=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 nI("image");return(await Promise.all(n.map(r=>F5e(r)))).map(({alt:r,src:s})=>o.createAndFill({src:s,alt:r}))},Nc=In({uploader:V5e,enableHtmlFileUploader:!1,uploadWidgetFactory:(e,t)=>{const n=document.createElement("span");return n.textContent="Upload in progress...",zn.widget(e,n,t)}},"uploadConfig");Nc.meta={package:"@milkdown/plugin-upload",displayName:"Ctx<uploadConfig>"};const YP=ao(e=>{const t=new wn("MILKDOWN_UPLOAD"),n=(r,s)=>{var i;const l=t.getState(r);if(!l)return-1;const a=l.find(void 0,void 0,u=>u.id===s);return a.length?((i=a[0])==null?void 0:i.from)??-1:-1},o=(r,s,i)=>{var l;if(!i||i.length<=0)return!1;const a=Symbol("upload symbol"),u=e.get(ds),{tr:c}=r.state,d=s instanceof DragEvent?((l=r.posAtCoords({left:s.clientX,top:s.clientY}))==null?void 0:l.pos)??c.selection.from:c.selection.from;r.dispatch(c.setMeta(t,{add:{id:a,pos:d}}));const{uploader:f}=e.get(Nc.key);return f(i,u).then(p=>{const h=n(r.state,a);h<0||r.dispatch(r.state.tr.replaceWith(h,h,p).setMeta(t,{remove:{id:a}}))}).catch(p=>{console.error(p)}),!0};return new xn({key:t,state:{init(){return an.empty},apply(r,s){const i=s.map(r.mapping,r.doc),l=r.getMeta(this);if(!l)return i;if(l.add){const{uploadWidgetFactory:a}=e.get(Nc.key),u=a(l.add.pos,{id:l.add.id});return i.add(r.doc,[u])}if(l.remove){const a=i.find(void 0,void 0,u=>u.id===l.remove.id);return i.remove(a)}return i}},props:{decorations(r){return this.getState(r)},handlePaste:(r,s)=>{var i,l;const{enableHtmlFileUploader:a}=e.get(Nc.key);return!(s instanceof ClipboardEvent)||!a&&(i=s.clipboardData)!=null&&i.getData("text/html")?!1:o(r,s,(l=s.clipboardData)==null?void 0:l.files)},handleDrop:(r,s)=>{var i;return s instanceof DragEvent?o(r,s,(i=s.dataTransfer)==null?void 0:i.files):!1}}})});YP.meta={package:"@milkdown/plugin-upload",displayName:"Prose<upload>"};const B5e=[Nc,YP];var ZP=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ms=(e,t,n)=>(ZP(e,t,"read from private field"),n?n.call(e):t.get(e)),Tm=(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)},Om=(e,t,n,o)=>(ZP(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n),gi,wf,V1,B1;class JP{constructor({root:t,features:n={},featureConfigs:o={},defaultValue:r="",onUpdate:s=l=>{},handleCommonActions:i=(l,a)=>{}}){Tm(this,gi,void 0),Tm(this,wf,void 0),Tm(this,V1,void 0),Tm(this,B1,!0);const l=Object.entries({...m5e,...n}).filter(([,u])=>u).map(([u])=>u);Om(this,V1,(typeof t=="string"?document.querySelector(t):t)??document.body),Om(this,gi,CCe.make().config(y5e(l)).config(u=>{u.set(I1,Ms(this,V1)),u.set(x1,r),u.set(lp,{editable:()=>Ms(this,B1)})}).config(u=>{const c=async(d,f)=>await i("handleFileUpload",{ctx:u,files:d,schema:f});u.update(Nc.key,d=>({...d,uploader:c}))}).config(u=>{const c=u.get($2);c.markdownUpdated((d,f,p)=>{f!==p&&s(f)}),c.updated((d,f,p)=>{i("editor_updated",d)})}).use(rke).use(f5e).use(h5e).use(UP).use(GP).use(B5e).use(n5e));const a=[];l.forEach(u=>{const c=o[u];a.push(g5e(u,Ms(this,gi),c))}),Om(this,wf,Promise.all(a))}async create(){return await Ms(this,wf),Ms(this,gi).create()}async destroy(){return await Ms(this,wf),Ms(this,gi).destroy()}get editor(){return Ms(this,gi)}setReadonly(t){return Om(this,B1,!t),this}getMarkdown(){return Ms(this,gi).action(MCe())}getEditor(){return Ms(this,gi)}destroyEditor(){this.destroy()}}gi=new WeakMap;wf=new WeakMap;V1=new WeakMap;B1=new WeakMap;JP.Feature=KP;const z5e=Symbol("editorInfoCtxKey"),j5e=Q({name:"MilkdownProvider",setup:(e,{slots:t})=>{const n=K(null),o=K(void 0),r=K(void 0),s=K(!0);return wt(z5e,{loading:s,dom:n,editor:r,editorFactory:o}),()=>{var i;return k(fe,null,[(i=t.default)==null?void 0:i.call(t)])}}});var H5e=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},XP=(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)},E2=(e,t,n)=>(H5e(e,t,"access private method"),n),z1,x2;let U5e=class{constructor({node:t,view:n,getPos:o,decorations:r,innerDecorations:s,options:i}){XP(this,z1),this.selected=!1,this.selectNode=()=>{var l,a;this.selected=!0,(a=(l=this.options).selectNode)==null||a.call(l)},this.deselectNode=()=>{var l,a;this.selected=!1,(a=(l=this.options).deselectNode)==null||a.call(l)},this.shouldUpdate=l=>!(l.type!==this.node.type||l.sameMarkup(this.node)&&l.content.eq(this.node.content)),this.update=(l,a,u)=>{var c,d;const f=this.options.update;let p;return f&&(p=f(l,a,u)),typeof p!="boolean"&&(p=this.shouldUpdate(l)),this.node=l,this.decorations=a,this.innerDecorations=u,p&&((d=(c=this.options).onUpdate)==null||d.call(c)),p},this.shouldIgnoreMutation=l=>!this.dom||!this.contentDOM||this.node.isLeaf||this.node.isAtom?!0:l.type==="selection"?!1:this.contentDOM===l.target&&l.type==="attributes"?!0:!this.contentDOM.contains(l.target),this.ignoreMutation=l=>{if(!this.dom||!this.contentDOM)return!0;let a;const u=this.options.ignoreMutation;return u&&(a=u(l)),typeof a!="boolean"&&(a=this.shouldIgnoreMutation(l)),a},this.destroy=()=>{var l,a,u;(a=(l=this.options).destroy)==null||a.call(l),this.dom.remove(),(u=this.contentDOM)==null||u.remove()},this.setAttrs=l=>{const{dispatch:a,state:u}=this.view,c=this.getPos();if(typeof c=="number")return a(u.tr.setNodeMarkup(c,void 0,{...this.node.attrs,...l}))},this.node=t,this.view=n,this.getPos=o,this.decorations=r,this.innerDecorations=s,this.options=i,this.dom=this.createDOM(i.as),this.contentDOM=t.isLeaf?null:this.createContentDOM(i.contentAs),this.dom.setAttribute("data-node-view-root","true"),this.contentDOM&&(this.contentDOM.setAttribute("data-node-view-content","true"),this.contentDOM.style.whiteSpace="inherit"),this.setSelection=i.setSelection,this.stopEvent=i.stopEvent}createDOM(t){return E2(this,z1,x2).call(this,t)}createContentDOM(t){return E2(this,z1,x2).call(this,t)}get component(){return this.options.component}};z1=new WeakSet,x2=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 W5e=class{constructor(t){this.view=t.view,this.options=t.options}get component(){return this.options.component}get root(){var t,n;let o=(n=(t=this.options).root)==null?void 0:n.call(t,this.view.dom);return o||(o=this.view.dom.parentElement??document.body),o}update(t,n){var o,r;this.view=t,this.prevState=n,(r=(o=this.options).update)==null||r.call(o,t,n)}destroy(){var t,n;(n=(t=this.options).destroy)==null||n.call(t)}};var M2,QP;let K5e=class{constructor({pos:t,spec:n,options:o}){XP(this,M2),this.pos=t,this.options=o,this.spec=n,this.dom=E2(this,M2,QP).call(this,o.as),this.dom.setAttribute("data-widget-view-root","true")}bind(t,n){this.view=t,this.getPos=n}get component(){return this.options.component}};M2=new WeakSet,QP=function(e){return e instanceof HTMLElement?e:document.createElement(e)};let Ik=(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 q5e=Object.defineProperty,G5e=(e,t,n)=>t in e?q5e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nr=(e,t,n)=>(G5e(e,typeof t!="symbol"?t+"":t,n),n);const Y5e=Symbol("[ProsemirrorAdapter]nodeViewContext"),Z5e=Symbol("[ProsemirrorAdapter]useNodeViewFactory");let J5e=class extends U5e{constructor(){super(...arguments),Nr(this,"key",Ik()),Nr(this,"context",{contentRef:t=>{t&&t instanceof HTMLElement&&this.contentDOM&&t.firstChild!==this.contentDOM&&t.appendChild(this.contentDOM)},view:this.view,getPos:this.getPos,setAttrs:this.setAttrs,node:Tn(this.node),selected:Tn(this.selected),decorations:Tn(this.decorations),innerDecorations:Tn(this.innerDecorations)}),Nr(this,"updateContext",()=>{Object.entries({node:this.node,selected:this.selected,decorations:this.decorations,innerDecorations:this.innerDecorations}).forEach(([t,n])=>{const o=this.context[t];o.value!==n&&(o.value=n)})}),Nr(this,"render",()=>{const t=this.component;return Ii(Q({name:"ProsemirrorNodeView",setup:()=>(wt(Y5e,this.context),()=>k(_s,{key:this.key,to:this.dom},{default:()=>[k(t,null,null)]}))}))})}};const X5e=(e,t)=>n=>(o,r,s,i,l)=>{const a=new J5e({node:o,view:r,getPos:s,decorations:i,innerDecorations:l,options:{...n,onUpdate(){var u;(u=n.onUpdate)==null||u.call(n),a.updateContext()},selectNode(){var u;(u=n.selectNode)==null||u.call(n),a.updateContext()},deselectNode(){var u;(u=n.deselectNode)==null||u.call(n),a.updateContext()},destroy(){var u;(u=n.destroy)==null||u.call(n),t(a)}}});return e(a),a},Q5e=Symbol("[ProsemirrorAdapter]nodeViewContext"),e8e=Symbol("[ProsemirrorAdapter]usePluginViewFactory");let t8e=class extends W5e{constructor(){super(...arguments),Nr(this,"key",Ik()),Nr(this,"context",{view:Tn(this.view),prevState:Tn(this.prevState)}),Nr(this,"updateContext",()=>{Object.entries({view:this.view,prevState:this.prevState}).forEach(([t,n])=>{const o=this.context[t];if(t==="view"){const r=Object.assign(Object.create(Object.getPrototypeOf(n)),n);o.value=r;return}o.value=n})}),Nr(this,"render",()=>{const t=this.component;return Ii(Q({name:"ProsemirrorNodeView",setup:()=>(wt(Q5e,this.context),()=>k(_s,{key:this.key,to:this.root},{default:()=>[k(t,null,null)]}))}))})}};const n8e=(e,t)=>n=>o=>{const r=new t8e({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},o8e=()=>{const e=K({}),t=at(),n=Ii({});return yd(()=>{n.updater=()=>{t==null||t.update()}}),ti(()=>{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]}}},r8e=Symbol("[ProsemirrorAdapter]widgetViewContext"),s8e=Symbol("[ProsemirrorAdapter]useWidgetViewFactory");class i8e extends K5e{constructor(){super(...arguments),Nr(this,"key",Ik()),Nr(this,"context",{view:this.view,getPos:this.getPos,spec:this.spec}),Nr(this,"updateContext",()=>{Object.assign(this.context,{view:this.view,getPos:this.getPos,spec:this.spec})}),Nr(this,"render",()=>{const t=this.component;return Ii(Q({name:"ProsemirrorWidgetView",setup:()=>(wt(r8e,this.context),()=>k(_s,{key:this.key,to:this.dom},{default:()=>[k(t,null,null)]}))}))})}}const l8e=(e,t)=>n=>(o,r={})=>{const s=new i8e({pos:o,options:n}),i={...r,destroy:l=>{var a;(a=r.destroy)==null||a.call(r,l),t(s)}};return s.spec=i,zn.widget(o,(l,a)=>(s.bind(l,a),s.updateContext(),e(s),s.dom),i)},a8e=Q({name:"ProsemirrorAdapterProvider",setup:(e,{slots:t})=>{const{portals:n,renderVueRenderer:o,removeVueRenderer:r}=o8e(),s=X5e(o,r),i=n8e(o,r),l=l8e(o,r);return wt(Z5e,s),wt(e8e,i),wt(s8e,l),()=>{var a;return k(fe,null,[(a=t.default)==null?void 0:a.call(t),Object.values(n.value).map(u=>lt(u))])}}}),u8e={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:j5e,ProsemirrorAdapterProvider:a8e},data(){return{editor:null,currentContent:"",showMentionPop:!1,currentMentionSearch:"",mentionResults:[],justReplaced:!1,searchingMention:!1}},watch:{autofocus_changed(e){e&&this.focusOnEditor()}},methods:{updateContent(e){this.editor.action(t=>{const n=t.get(bn),{state:o}=n,{from:r}=o.selection,s=e,i=o.tr.insertText(s,r),l=r+s.length,a=i.setSelection(ht.create(i.doc,l));n.dispatch(a),n.focus()})},initEditor(){const e=this,t=new JP({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(bn),{state:o}=n,{selection:r}=o;if(!r)return;const i=o.doc.textBetween(0,r.to," ").match(/@([\w-_]+)$/);if(!i){this.showMentionPop=!1,this.currentMentionSearch="";return}let l=i[1];if(!l||l.length<3){if(this.defaultMentions&&this.defaultMentions.length){let a=l.toLowerCase(),u=this.defaultMentions.filter(c=>c.username.toLowerCase().includes(a)||c.display_name.toLowerCase().includes(a));u.length&&(this.currentMentionSearch=l,this.mentionResults=u,this.showMentionPop=!0)}return}if(this.currentMentionSearch&&(this.currentMentionSearch=l,this.searchingMention))return!1;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(TCe(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()}},c8e={style:{position:"relative"},class:"fcom_md_editor"},d8e={ref:"crepe_editor_vue",class:"crepe-editor feed_md_content fcom_md_seditor_wrapper"},f8e={class:"fcom_mention_pop_wrap"},p8e=b("span",{style:{}},null,-1),h8e={key:0},m8e={key:0},g8e=["onClick"],v8e=["src"],y8e={key:1},_8e={key:0};function b8e(e,t,n,o,r,s){const i=re("ProsemirrorAdapterProvider"),l=re("MilkdownProvider"),a=Po;return C(),M(fe,null,[k(l,null,{default:$(()=>[k(i,null,{default:$(()=>[b("div",c8e,[b("div",d8e,null,512)])]),_:1})]),_:1}),b("div",f8e,[k(a,{"popper-class":"fcom_mention_pop",ref:"mentionPopoverRef",placement:"bottom",visible:r.showMentionPop,width:300,persistent:!1},{reference:$(()=>[p8e]),default:$(()=>[r.justReplaced?W("",!0):(C(),M("div",h8e,[r.mentionResults.length?(C(),M("ul",m8e,[(C(!0),M(fe,null,nt(r.mentionResults,u=>(C(),M("li",{key:u.user_id,onClick:c=>s.addMention("@"+u.username)},[b("img",{alt:"",src:u.avatar},null,8,v8e),b("span",null,"@"+A(u.display_name)+" ("+A(u.username)+")",1)],8,g8e))),128))])):r.searchingMention?W("",!0):(C(),M("div",y8e,[b("p",null,[ne(A(e.$t("No results found. Please search by username"))+" ",1),e.isAdmin()&&n.hasEveyoneMention?(C(),M("span",_8e,A(e.$t("You can use @everyone to tag everyone.")),1)):W("",!0)])]))]))]),_:1},8,["visible"])])],64)}const eL=qe(u8e,[["render",b8e]]),w8e={name:"EmailNotification",components:{CrepeEditor:eL,Layout:ri,AppLayout:si},data(){return{loading:!1,saving:!1,email_settings:null}},methods:{getSettings(){this.loading=!0,this.$get("admin/email-settings").then(e=>{this.email_settings=e.email_settings}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},save(){this.saving=!0,this.$post("admin/email-settings",{email_settings:this.email_settings}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings(),this.changeTitle(this.$t("Email Notification Settings"))}},C8e={style:{"margin-bottom":"20px"},class:"settings_router"},k8e={key:0,class:"white_loaded"},S8e={key:1,class:"fhr_content_layout_body"},$8e={class:"setting_body"},E8e={style:{"font-size":"18px",margin:"0",padding:"0"}},x8e={style:{margin:"5px 0","font-size":"90%","line-height":"120%"}},M8e=b("hr",null,null,-1),T8e={class:"fcom_help_text"},O8e={class:"fcom_help_text"},I8e={class:"fcom_help_text"},A8e={class:"fcom_help_text"},N8e={class:"fcom_extra_editor"},P8e={class:"fcom_help_text"},L8e=["innerHTML"],R8e=b("hr",null,null,-1),D8e={class:"setting_body"},F8e={style:{"font-size":"18px",margin:"0",padding:"0"}},V8e={style:{margin:"5px 0","font-size":"90%","line-height":"120%"}},B8e=b("hr",null,null,-1),z8e={key:0,class:"fcom_help_text"},j8e={key:0,class:"fcom_help_text"},H8e={key:0,class:"fcom_help_text"},U8e={class:"fcom_help_text"},W8e={key:0,class:"fcom_help_text"},K8e={class:"fcom_meta_text"},q8e=b("hr",null,null,-1),G8e={class:"setting_body"},Y8e={key:2};function Z8e(e,t,n,o,r,s){const i=pt,l=lo,a=At,u=io,c=vh,d=gh,f=re("crepe-editor"),p=Hn,h=Ss,m=vr,y=AO,v=so,w=re("layout"),_=re("app-layout"),S=zt("loading");return C(),q(_,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:$(()=>[k(w,{wrapper_class:"no_bg_layout fcom_setting_route",title:e.$t("Email Settings")},{actions:$(()=>[He((C(),q(i,{class:"fcom_primary_button",onClick:s.save},{default:$(()=>[b("span",null,A(e.$t("Save Settings")),1)]),_:1},8,["onClick"])),[[S,r.saving]])]),default:$(()=>[b("div",C8e,[r.loading?(C(),M("div",k8e,[k(l,{rows:5,animated:!0})])):r.email_settings?(C(),M("div",S8e,[k(v,{onSubmit:t[12]||(t[12]=et(x=>e.doNothing(),["prevent"])),modelValue:r.email_settings,"onUpdate:modelValue":t[13]||(t[13]=x=>r.email_settings=x),"label-position":"top"},{default:$(()=>[b("div",$8e,[b("h3",E8e,A(e.$t("Mailing Settings")),1),b("p",x8e,A(e.$t("Set your from name, email and email footer. These configuration will be used to send any emails from FluentCommunity.")),1),M8e,k(d,{gutter:30},{default:$(()=>[k(c,{sm:24,md:12},{default:$(()=>[k(u,{label:e.$t("From Name")},{default:$(()=>[k(a,{placeholder:e.$t("Email from name"),modelValue:r.email_settings.send_from_name,"onUpdate:modelValue":t[0]||(t[0]=x=>r.email_settings.send_from_name=x)},null,8,["placeholder","modelValue"]),b("div",T8e,[b("p",null,A(e.$t("Name that will be used to send emails")),1)])]),_:1},8,["label"])]),_:1}),k(c,{sm:24,md:12},{default:$(()=>[k(u,{label:e.$t("From Email")},{default:$(()=>[k(a,{placeholder:e.$t("Valid Email address"),modelValue:r.email_settings.send_from_email,"onUpdate:modelValue":t[1]||(t[1]=x=>r.email_settings.send_from_email=x)},null,8,["placeholder","modelValue"]),b("div",O8e,[b("p",null,A(e.$t("Provide Valid Email Address email as per your domain/SMTP settings. This email will be used to send emails like notifications")),1)])]),_:1},8,["label"])]),_:1})]),_:1}),k(d,{gutter:30},{default:$(()=>[k(c,{sm:24,md:12},{default:$(()=>[k(u,{label:e.$t("Reply to name (Optional)")},{default:$(()=>[k(a,{placeholder:e.$t("Optional Reply to email"),modelValue:r.email_settings.reply_to_name,"onUpdate:modelValue":t[2]||(t[2]=x=>r.email_settings.reply_to_name=x)},null,8,["placeholder","modelValue"]),b("div",I8e,[b("p",null,A(e.$t("Name that will be used for replyTo attribute")),1)])]),_:1},8,["label"])]),_:1}),k(c,{sm:24,md:12},{default:$(()=>[k(u,{label:e.$t("Reply to email (optional)")},{default:$(()=>[k(a,{placeholder:e.$t("Optional email"),modelValue:r.email_settings.reply_to_email,"onUpdate:modelValue":t[3]||(t[3]=x=>r.email_settings.reply_to_email=x)},null,8,["placeholder","modelValue"]),b("div",A8e,[b("p",null,A(e.$t("If someone reply to your notification email, this is where you would like to recieve")),1)])]),_:1},8,["label"])]),_:1})]),_:1}),k(u,{label:e.$t("Email Footer")},{default:$(()=>[b("div",N8e,[k(f,{modelValue:r.email_settings.email_footer,"onUpdate:modelValue":t[4]||(t[4]=x=>r.email_settings.email_footer=x),height:200},null,8,["modelValue"])]),b("div",P8e,[b("p",null,A(e.$t("This email footer will be used to send all the emails sent from FleuntCommuntiy. It's highly recommended to use your business name and address in the footer for compliance.")),1),b("p",{innerHTML:e.$t("Use %1s tag to insert dynamic notification settings URL. Other Smartcode: %2s for Site Name with permalink","{{manage_email_notification_url|Manage Your Email Notifications Preference}}","{{site_name_with_url}}")},null,8,L8e)])]),_:1},8,["label"]),e.has_pro?(C(),q(u,{key:0},{default:$(()=>[k(p,{modelValue:r.email_settings.disable_powered_by,"onUpdate:modelValue":t[5]||(t[5]=x=>r.email_settings.disable_powered_by=x),"true-label":"yes","false-label":"no"},{default:$(()=>[ne(A(e.$t("Disable powered by FluentCommunity in the email footer")),1)]),_:1},8,["modelValue"])]),_:1})):W("",!0)]),R8e,b("div",D8e,[b("h3",F8e,A(e.$t("Email Notification Settings")),1),b("p",V8e,A(e.$t("This is the default settings that will be applied to all the community members. Individual members can over-write the settings for their own preference")),1),B8e,k(u,{label:e.$t("Email on new comment")},{default:$(()=>[k(p,{modelValue:r.email_settings.com_my_post_mail,"onUpdate:modelValue":t[6]||(t[6]=x=>r.email_settings.com_my_post_mail=x),"true-value":"yes","false-value":"no"},{default:$(()=>[ne(A(e.$t("Send email to author when a new comment added to a post")),1)]),_:1},8,["modelValue"]),r.email_settings.com_my_post_mail!="yes"?(C(),M("div",z8e,[b("p",null,A(e.$t("You should enable this. Currently disabled.")),1)])):W("",!0)]),_:1},8,["label"]),k(u,{label:e.$t("Email on comment reply")},{default:$(()=>[k(p,{modelValue:r.email_settings.reply_my_com_mail,"onUpdate:modelValue":t[7]||(t[7]=x=>r.email_settings.reply_my_com_mail=x),"true-value":"yes","false-value":"no"},{default:$(()=>[ne(A(e.$t("Email authors when someone reply to their comments")),1)]),_:1},8,["modelValue"]),r.email_settings.reply_my_com_mail!="yes"?(C(),M("div",j8e,[b("p",null,A(e.$t("You should enable this. Currently disabled.")),1)])):W("",!0)]),_:1},8,["label"]),k(u,{label:e.$t("Email on Tagging / Mentioning")},{default:$(()=>[k(p,{modelValue:r.email_settings.mention_mail,"onUpdate:modelValue":t[8]||(t[8]=x=>r.email_settings.mention_mail=x),"true-value":"yes","false-value":"no"},{default:$(()=>[ne(A(e.$t("Send email when an admin/moderator tag (@everyone) on a post or when tagging someone in a post or comment")),1)]),_:1},8,["modelValue"]),r.email_settings.mention_mail!="yes"?(C(),M("div",H8e,[b("p",null,A(e.$t("You should enable this. Currently disabled.")),1)])):W("",!0)]),_:1},8,["label"]),k(u,null,{default:$(()=>[k(p,{"true-value":"yes","false-value":"no",modelValue:r.email_settings.digest_email_status,"onUpdate:modelValue":t[9]||(t[9]=x=>r.email_settings.digest_email_status=x)},{default:$(()=>[ne(A(e.$t("Enable Weekly Digest Email for community members")),1)]),_:1},8,["modelValue"]),b("div",U8e,[b("p",null,A(e.$t("Members can enable/disable their own digest status")),1)])]),_:1}),k(d,{gutter:30},{default:$(()=>[k(c,{sm:24,md:12},{default:$(()=>[k(u,{label:e.$t("In which day, the digest email will be sent")},{default:$(()=>[k(m,{modelValue:r.email_settings.digest_mail_day,"onUpdate:modelValue":t[10]||(t[10]=x=>r.email_settings.digest_mail_day=x),placeholder:e.$t("Select Digest Email Day")},{default:$(()=>[k(h,{value:"mon",label:e.$t("Every Monday")},null,8,["label"]),k(h,{value:"tue",label:e.$t("Every Tuesday")},null,8,["label"]),k(h,{value:"wed",label:e.$t("Every Wednesday")},null,8,["label"]),k(h,{value:"thu",label:e.$t("Every Thursday")},null,8,["label"]),k(h,{value:"fri",label:e.$t("Every Friday")},null,8,["label"]),k(h,{value:"sat",label:e.$t("Every Saturday")},null,8,["label"]),k(h,{value:"sun",label:e.$t("Every Sunday")},null,8,["label"])]),_:1},8,["modelValue","placeholder"]),r.email_settings.digest_email_status=="yes"?(C(),M("div",W8e,[b("p",null,A(e.$t("Email will be sent if there has any unread notifications for the user from the last email sent")),1)])):W("",!0)]),_:1},8,["label"])]),_:1}),k(c,{sm:24,md:12},{default:$(()=>[k(u,{label:e.$t("Time to send the digest email")},{default:$(()=>[k(y,{step:"00:10",start:"00:10",end:"23:59",modelValue:r.email_settings.daily_digest_time,"onUpdate:modelValue":t[11]||(t[11]=x=>r.email_settings.daily_digest_time=x)},null,8,["modelValue"]),b("p",K8e,A(e.$t("Approximate time when the digest emails will start sending for the members")),1)]),_:1},8,["label"])]),_:1})]),_:1})]),q8e,b("div",G8e,[He((C(),q(i,{onClick:s.save,disabled:r.saving,class:"fcom_primary_button"},{default:$(()=>[ne(A(e.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[S,r.saving]])])]),_:1},8,["modelValue"])])):(C(),M("div",Y8e,[b("p",null,A(e.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const J8e=qe(w8e,[["render",Z8e]]),X8e={name:"CustomizationSettings",components:{Layout:ri,AppLayout:si},data(){return{loading:!1,saving:!1,settings:null}},methods:{getSettings(){this.loading=!0,this.$get("settings/customization-settings").then(e=>{this.settings=e.settings}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},save(){this.saving=!0,this.$post("settings/customization-settings",{settings:this.settings}).then(e=>{this.$notify.success(e.message),window.location.reload()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings(),this.changeTitle(this.$t("Customization Settings"))}},Q8e={class:"settings_router"},eSe={key:0,class:"white_loaded"},tSe={key:1,class:"fhr_content_layout_body"},nSe={class:"setting_body"},oSe={class:"fcom_input_wrap"},rSe={class:"fcom_input_wrap"},sSe={class:"fcom_input_wrap"},iSe={key:0,class:"fcom_input_wrap"},lSe=["innerHTML"],aSe={key:1,style:{cursor:"pointer","font-weight":"bold"}},uSe={class:"fcom_input_wrap"},cSe={style:{"font-weight":"bold"}},dSe={class:"fcom_help_text"},fSe={target:"_blank",rel:"noopener",href:"https://wpmanageninja.com/affiliate/"},pSe={class:"fcom_input_wrap"},hSe={class:"fcom_input_wrap"},mSe={class:"fcom_input_wrap"},gSe={key:0},vSe={class:"fcom_help_text"},ySe={class:"fcom_input_wrap"},_Se={class:"fcom_help_text"},bSe={style:{"margin-top":"50px"},class:"fcom_input_wrap"},wSe={key:2};function CSe(e,t,n,o,r,s){const i=pt,l=lo,a=xie,u=Hn,c=At,d=Po,f=U0,p=Eu,h=io,m=so,y=re("layout"),v=re("app-layout"),w=zt("loading");return C(),q(v,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:$(()=>[k(y,{wrapper_class:"no_bg_layout fcom_setting_route",title:e.$t("Customize your portal")},{actions:$(()=>[He((C(),q(i,{class:"fcom_primary_button",onClick:s.save},{default:$(()=>[b("span",null,A(e.$t("Save Settings")),1)]),_:1},8,["onClick"])),[[w,r.saving]])]),default:$(()=>[b("div",Q8e,[r.loading?(C(),M("div",eSe,[k(l,{rows:5,animated:!0})])):r.settings?(C(),M("div",tSe,[b("div",nSe,[b("p",null,A(e.$t("Customize the UI features of the portal.")),1),k(a),k(m,{onSubmit:t[10]||(t[10]=et(_=>e.doNothing(),["prevent"])),modelValue:r.settings,"onUpdate:modelValue":t[11]||(t[11]=_=>r.settings=_),"label-position":"top"},{default:$(()=>[b("div",oSe,[k(u,{"true-value":"yes","false-value":"no",modelValue:r.settings.dark_mode,"onUpdate:modelValue":t[0]||(t[0]=_=>r.settings.dark_mode=_)},{default:$(()=>[ne(A(e.$t("Enable Dark Mode")),1)]),_:1},8,["modelValue"]),b("p",null,A(e.$t("Enables switching between dark and light interface themes, accommodating different lighting conditions and user preferences.")),1)]),b("div",rSe,[k(u,{"true-value":"yes","false-value":"no",modelValue:r.settings.fixed_page_header,"onUpdate:modelValue":t[1]||(t[1]=_=>r.settings.fixed_page_header=_)},{default:$(()=>[ne(A(e.$t("Enable Sticky Page headers across portal")),1)]),_:1},8,["modelValue"]),b("p",null,A(e.$t("When enabled, the page header will remain visible at the top of the screen as users scroll down the page.")),1)]),b("div",sSe,[k(u,{"true-value":"yes","false-value":"no",modelValue:r.settings.feed_link_on_sidebar,"onUpdate:modelValue":t[2]||(t[2]=_=>r.settings.feed_link_on_sidebar=_)},{default:$(()=>[ne(A(e.$t("Show Default Feed link on left sidebar")),1)]),_:1},8,["modelValue"]),b("p",null,A(e.$t("Adds the default Feed link in the sidebar, providing an extra access point to the all feeds page")),1)]),e.has_pro?(C(),M("div",iSe,[k(u,{"true-value":"yes","false-value":"no",modelValue:r.settings.show_powered_by,"onUpdate:modelValue":t[3]||(t[3]=_=>r.settings.show_powered_by=_)},{default:$(()=>[ne(A(e.$t("Show powered by text")),1)]),_:1},8,["modelValue"]),b("p",null,[ne(A(e.$t("Displays a 'Powered by FluentCommunity' link, showing support for the platform and increasing its visibility."))+" ",1),k(d,{persistent:!1,placement:"bottom",width:400,trigger:"click"},{reference:$(()=>[r.settings.affiliate_id?(C(),M("span",aSe,A(e.$t("Affiliate ID: %s",r.settings.affiliate_id)),1)):(C(),M("span",{key:0,style:{cursor:"pointer"},innerHTML:e.$t("%1sClick here%2s to add affiliate ID","<b>","</b>")},null,8,lSe))]),default:$(()=>[b("div",uSe,[b("label",cSe,A(e.$t("Your affiliate ID")),1),k(c,{style:{margin:"20px 0"},placeholder:e.$t("Affiliate ID"),type:"number",modelValue:r.settings.affiliate_id,"onUpdate:modelValue":t[4]||(t[4]=_=>r.settings.affiliate_id=_)},null,8,["placeholder","modelValue"]),He((C(),q(i,{onClick:s.save,disabled:r.saving,class:"fcom_primary_button"},{default:$(()=>[ne(A(e.$t("Save")),1)]),_:1},8,["onClick","disabled"])),[[w,r.saving]])]),b("div",dSe,[b("p",null,[ne(A(e.$t("Don't have an affiliate account?"))+" ",1),b("a",fSe,A(e.$t("Click here"))+".",1)])])]),_:1})])])):W("",!0),b("div",pSe,[k(u,{"true-value":"yes","false-value":"no",modelValue:r.settings.icon_on_header_menu,"onUpdate:modelValue":t[5]||(t[5]=_=>r.settings.icon_on_header_menu=_)},{default:$(()=>[ne(A(e.$t("Show icon on header menu items")),1)]),_:1},8,["modelValue"]),b("p",null,A(e.$t("Adds icons next to text in header menu items, enhancing visual appeal and improving navigation clarity.")),1)]),W("",!0),b("div",hSe,[k(u,{"true-value":"yes","false-value":"no",modelValue:r.settings.a11y_enhancement_style,"onUpdate:modelValue":t[7]||(t[7]=_=>r.settings.a11y_enhancement_style=_)},{default:$(()=>[ne(A(e.$t("Use Enhanced Color Contrast for Accessibility (a11y)")),1)]),_:1},8,["modelValue"]),b("p",null,A(e.$t("If you enable this, FluentCommunity will use enhanced color contrasts for different UI")),1)]),b("div",mSe,[k(h,{label:e.$t("Rich Media Post Layout")},{default:$(()=>[k(p,{modelValue:r.settings.rich_post_layout,"onUpdate:modelValue":t[8]||(t[8]=_=>r.settings.rich_post_layout=_)},{default:$(()=>[k(f,{value:"classic"},{default:$(()=>[ne(A(e.$t("Classic")),1)]),_:1}),k(f,{disabled:!e.has_pro,value:"modern"},{default:$(()=>[ne(A(e.$t("Modern"))+" ",1),e.has_pro?W("",!0):(C(),M("span",gSe,"("+A(e.$t("Available on pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),b("div",vSe,[b("p",null,A(e.$t("Classic: Image/Video after the content. Modern: Image/Video at first")),1)])]),_:1},8,["label"])]),b("div",ySe,[k(h,{label:e.$t("Post Title Requirements")},{default:$(()=>[k(p,{modelValue:r.settings.post_title_pref,"onUpdate:modelValue":t[9]||(t[9]=_=>r.settings.post_title_pref=_)},{default:$(()=>[k(f,{value:"optional"},{default:$(()=>[ne(A(e.$t("Optional")),1)]),_:1}),k(f,{value:"required"},{default:$(()=>[ne(A(e.$t("Required")),1)]),_:1}),k(f,{value:"disabled"},{default:$(()=>[ne(A(e.$t("Disabled")),1)]),_:1})]),_:1},8,["modelValue"]),b("div",_Se,[b("p",null,A(e.$t("When creating a new post, check if the post title is required or not")),1)])]),_:1},8,["label"])]),b("div",bSe,[He((C(),q(i,{onClick:s.save,disabled:r.saving,class:"fcom_primary_button"},{default:$(()=>[ne(A(e.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[w,r.saving]])])]),_:1},8,["modelValue"])])])):(C(),M("div",wSe,[b("p",null,A(e.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const kSe=qe(X8e,[["render",CSe]]),SSe={name:"UpgradeToProModal",props:{showModal:{type:Boolean,default:!0},upgrade_module:{type:String,required:!0}},data(){return{openModal:this.showModal,upgradeModule:F1e[this.upgrade_module]||{}}},watch:{openModal:function(){this.$emit("closeModal")}}},$Se={class:"fcom_upgrade_header"},ESe={class:"dialog_body"},xSe={class:"fcom_upgrade_banner"},MSe=["href"],TSe={class:"fcom_upgrade_content"},OSe={class:"fcom_feature_image"},ISe=["src","alt"],ASe={class:"fcom_upgrade_body"},NSe={class:"fcom_upgrade_description"},PSe=["href"];function LSe(e,t,n,o,r,s){const i=Ql;return C(),q(i,{"modal-class":"fcom_upgrade_dialog","close-on-click-modal":!1,"append-to-body":!0,size:"50%",modelValue:r.openModal,"onUpdate:modelValue":t[0]||(t[0]=l=>r.openModal=l),direction:"rtl"},{header:$(()=>[b("div",$Se,[b("h4",null,A(r.upgradeModule.headerTitle),1),b("p",null,A(r.upgradeModule.headerDescription),1)])]),default:$(()=>[b("div",ESe,[b("div",xSe,[b("p",null," 🎉 "+A(e.$t("Discover exciting new features now!")),1),b("a",{href:e.appVars.upgrade_url,target:"_blank"},A(e.$t("Upgrade Now")),9,MSe)]),b("div",TSe,[b("div",OSe,[b("img",{src:e.appVars.assets_url+"images/upgrades/"+r.upgradeModule.featureImage,alt:r.upgradeModule.headerTitle},null,8,ISe)]),b("div",ASe,[b("h4",null,A(r.upgradeModule.bodyTitle),1),b("p",NSe,A(r.upgradeModule.bodyDescription),1),b("a",{class:"el-button fcom_primary_button",href:e.appVars.upgrade_url,target:"_blank"},A(e.$t("Upgrade to Pro")),9,PSe)])])])]),_:1},8,["modelValue"])}const $v=qe(SSe,[["render",LSe]]),RSe={name:"StorageSettings",props:["features"],components:{UpgradeToProModal:$v},data(){return{openUpgradeModal:!1,storageConfig:!1,showSettings:!1,fetching:!1,saving:!1,s3Locations:{}}},methods:{fetchSettings(){this.fetching=!0,this.$get("admin/storage-settings").then(e=>{this.storageConfig=e.config,this.s3Locations=e.s3_locations}).catch(e=>{this.$handleError(e)}).finally(()=>{this.fetching=!1})},openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.showSettings=!0},saveSettings(){this.saving=!0,this.$post("admin/storage-settings",{config:this.storageConfig}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},maybeResetConfig(){let e=this.storageConfig.driver;this.storageConfig={driver:e}}},mounted(){this.has_pro&&this.fetchSettings()}},DSe={class:"fcom_storage_settings"},FSe={class:"dialog_header"},VSe={class:"dialog_left"},BSe={key:0,class:"white_loaded"},zSe={key:1,class:"dialog_body"},jSe={key:0},HSe=b("p",null,[ne(" Please "),b("a",{target:"_blank",rel:"noopener",href:"https://github.com/WPManageNinja/fluent-community-docs/blob/master/configure-cloudflare-r2.md"},"Read the documentation first "),ne(" to configure Cloudflare R2. ")],-1),USe=b("hr",null,null,-1),WSe={class:"fcom_cloudflare_settings"},KSe=b("p",null,[ne(" Please "),b("a",{target:"_blank",rel:"noopener",href:"https://github.com/WPManageNinja/fluent-community-docs/blob/master/configure-amazon-s3.md"},"Read the documentation first "),ne(" to configure Amazon S3. ")],-1),qSe=b("hr",null,null,-1),GSe={class:"fcom_s3_settings"},YSe={key:2},ZSe={class:"dialog_footer"},JSe={key:2};function XSe(e,t,n,o,r,s){const i=pt,l=lo,a=L3,u=Eu,c=io,d=At,f=Ss,p=vr,h=so,m=yh,y=re("UpgradeToProModal"),v=zt("loading");return C(),M(fe,null,[b("div",DSe,[k(i,{class:"fcom_secondary_button",onClick:t[0]||(t[0]=w=>s.openSettings())},{default:$(()=>{var w;return[ne(A(e.$t("Configure"))+" ("+A((w=r.storageConfig)==null?void 0:w.driver)+") ",1)]}),_:1})]),k(m,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:e.dialogWidth,modelValue:r.showSettings,"onUpdate:modelValue":t[15]||(t[15]=w=>r.showSettings=w),direction:"rtl"},{header:$(({close:w})=>[b("div",FSe,[b("div",VSe,[b("div",null,[b("h4",null,A(e.$t("Configure Media Storage")),1)])])])]),default:$(()=>[r.fetching?(C(),M("div",BSe,[k(l,{rows:5,animated:!0})])):r.storageConfig?(C(),M("div",zSe,[r.storageConfig.is_defined?(C(),M("p",jSe,A(e.$t("__CLOUD_STORAGE_CONFIGURED")),1)):(C(),M(fe,{key:1},[k(h,{onSubmit:t[14]||(t[14]=et(w=>e.doNothing(),["prevent"])),"label-position":"top"},{default:$(()=>[k(c,{label:e.$t("Storage Location")},{default:$(()=>[k(u,{class:"fcom_radio_group",onChange:t[1]||(t[1]=w=>s.maybeResetConfig()),modelValue:r.storageConfig.driver,"onUpdate:modelValue":t[2]||(t[2]=w=>r.storageConfig.driver=w)},{default:$(()=>[k(a,{type:"primary",value:"local"},{default:$(()=>[ne(A(e.$t("Server Storage")),1)]),_:1}),k(a,{value:"cloudflare_r2"},{default:$(()=>[ne(A(e.$t("Cloudflare R2 (Recommended)")),1)]),_:1}),k(a,{value:"amazon_s3"},{default:$(()=>[ne(A(e.$t("Amazon S3")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),r.storageConfig.driver==="cloudflare_r2"?(C(),M(fe,{key:0},[HSe,USe,b("div",WSe,[k(c,{label:e.$t("Cloudflare Account ID")},{default:$(()=>[k(d,{placeholder:"eg: 1718cb5a51e65c8f19e8eec44a012hd32",modelValue:r.storageConfig.account_id,"onUpdate:modelValue":t[3]||(t[3]=w=>r.storageConfig.account_id=w)},null,8,["modelValue"])]),_:1},8,["label"]),k(c,{label:e.$t("Cloudflare Access Key")},{default:$(()=>[k(d,{type:"password",modelValue:r.storageConfig.access_key,"onUpdate:modelValue":t[4]||(t[4]=w=>r.storageConfig.access_key=w)},null,8,["modelValue"])]),_:1},8,["label"]),k(c,{label:e.$t("Cloudflare Secret Key")},{default:$(()=>[k(d,{type:"password",modelValue:r.storageConfig.secret_key,"onUpdate:modelValue":t[5]||(t[5]=w=>r.storageConfig.secret_key=w)},null,8,["modelValue"])]),_:1},8,["label"]),k(c,{label:e.$t("Cloudflare Bucket Name")},{default:$(()=>[k(d,{modelValue:r.storageConfig.bucket,"onUpdate:modelValue":t[6]||(t[6]=w=>r.storageConfig.bucket=w)},null,8,["modelValue"])]),_:1},8,["label"]),k(c,{label:e.$t("Cloudflare Bucket Public URL")},{default:$(()=>[k(d,{modelValue:r.storageConfig.public_url,"onUpdate:modelValue":t[7]||(t[7]=w=>r.storageConfig.public_url=w)},null,8,["modelValue"])]),_:1},8,["label"]),k(c,{label:e.$t("Bucket Sub-Folder (Optional)")},{default:$(()=>[k(d,{placeholder:e.$t("If you want to stores files a folder in the bucket"),modelValue:r.storageConfig.sub_folder,"onUpdate:modelValue":t[8]||(t[8]=w=>r.storageConfig.sub_folder=w)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])])],64)):r.storageConfig.driver==="amazon_s3"?(C(),M(fe,{key:1},[KSe,qSe,b("div",GSe,[k(c,{label:e.$t("Amazon S3 Access Key")},{default:$(()=>[k(d,{type:"password",modelValue:r.storageConfig.access_key,"onUpdate:modelValue":t[9]||(t[9]=w=>r.storageConfig.access_key=w)},null,8,["modelValue"])]),_:1},8,["label"]),k(c,{label:e.$t("Amazon S3 Secret Key")},{default:$(()=>[k(d,{type:"password",modelValue:r.storageConfig.secret_key,"onUpdate:modelValue":t[10]||(t[10]=w=>r.storageConfig.secret_key=w)},null,8,["modelValue"])]),_:1},8,["label"]),k(c,{label:e.$t("Amazon S3 Bucket Name")},{default:$(()=>[k(d,{modelValue:r.storageConfig.bucket,"onUpdate:modelValue":t[11]||(t[11]=w=>r.storageConfig.bucket=w)},null,8,["modelValue"])]),_:1},8,["label"]),k(c,{label:e.$t("Amazon S3 Location")},{default:$(()=>[k(p,{modelValue:r.storageConfig.s3_endpoint,"onUpdate:modelValue":t[12]||(t[12]=w=>r.storageConfig.s3_endpoint=w),placeholder:e.$t("Select S3 Location")},{default:$(()=>[(C(!0),M(fe,null,nt(r.s3Locations,(w,_)=>(C(),q(f,{label:w,value:_},null,8,["label","value"]))),256))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),k(c,{label:e.$t("Bucket Sub-Folder (Optional)")},{default:$(()=>[k(d,{placeholder:e.$t("If you want to stores files a folder in the bucket"),modelValue:r.storageConfig.sub_folder,"onUpdate:modelValue":t[13]||(t[13]=w=>r.storageConfig.sub_folder=w)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])])],64)):(C(),M("p",YSe,A(e.$t("Your files will be stored in the default Uploads folder")),1))]),_:1}),b("div",ZSe,[He((C(),q(i,{class:"fcom_primary_button",disabled:r.saving,onClick:s.saveSettings},{default:$(()=>[ne(A(e.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[v,r.saving]])])],64))])):(C(),M("div",JSe,[b("p",null,A(e.$t("Config could not be loaded")),1)]))]),_:1},8,["width","modelValue"]),r.openUpgradeModal?(C(),q(y,{key:0,showModal:r.openUpgradeModal,onCloseModal:t[16]||(t[16]=w=>r.openUpgradeModal=!1),upgrade_module:"media_module"},null,8,["showModal"])):W("",!0)],64)}const QSe=qe(RSe,[["render",XSe]]),e9e={name:"LeaderBoardConfig",props:["features"],emits:["saveSettings"],data(){return{levels:null,showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1}},components:{UpgradeToProModal:$v},methods:{openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.fetching=!0,this.$get("admin/leaderboards/levels").then(e=>{this.levels=e.levels}).catch(e=>{this.$handleError(e)}).finally(()=>{this.fetching=!1})},saveSettings(){let e=this.features.leader_board_module=="yes";this.$emit("saveSettings",!e),e&&this.saveLevelSettings()},saveLevelSettings(){this.saving=!0,this.$post("admin/leaderboards/levels",{levels:this.levels}).then(e=>{this.$notify.success(e.message),this.$emit("saveSettings",!0)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}}},t9e={class:"fcom_storage_settings"},n9e={key:0,class:"white_loaded"},o9e={key:1,class:"dialog_body"},r9e={class:"fcom_level_table"},s9e={class:"fcom_level_table_row fcom_header_row"},i9e=b("div",{class:"fcom_lavel_num"}," # ",-1),l9e={class:"fcom_lavel_desc"},a9e={class:"fcom_lavel_actions"},u9e={class:"fcom_lavel_num"},c9e={class:"fcom_lavel_desc"},d9e={class:"fcom_lavel_actions"},f9e={class:"dialog_footer"},p9e={key:2};function h9e(e,t,n,o,r,s){const i=pt,l=lo,a=Hn,u=io,c=At,d=so,f=Ql,p=re("UpgradeToProModal"),h=zt("loading");return C(),M(fe,null,[b("div",t9e,[k(i,{class:"fcom_secondary_button",onClick:t[0]||(t[0]=m=>s.openSettings())},{default:$(()=>[ne(A(e.$t("Settings")),1)]),_:1})]),k(f,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,size:e.dialogWidth,modelValue:r.showSettings,"onUpdate:modelValue":t[3]||(t[3]=m=>r.showSettings=m),direction:"rtl"},{header:$(({close:m})=>[b("h4",null,A(e.$t("Leaderboard / Gamification Settings")),1)]),default:$(()=>[r.fetching?(C(),M("div",n9e,[k(l,{rows:5,animated:!0})])):r.levels?(C(),M("div",o9e,[k(d,{onSubmit:t[2]||(t[2]=et(m=>e.doNothing(),["prevent"])),"label-position":"top"},{default:$(()=>[k(u,null,{default:$(()=>[k(a,{modelValue:n.features.leader_board_module,"onUpdate:modelValue":t[1]||(t[1]=m=>n.features.leader_board_module=m),"true-label":"yes","false-label":"no",label:e.$t("Enable Leaderboards Module")},null,8,["modelValue","label"])]),_:1}),n.features.leader_board_module==="yes"?(C(),M(fe,{key:0},[b("h5",null,A(e.$t("Leaderboard Levels")),1),b("div",r9e,[b("div",s9e,[i9e,b("div",l9e,A(e.$t("Title & Description")),1),b("div",a9e,A(e.$t("Minimum Points")),1)]),(C(!0),M(fe,null,nt(r.levels,(m,y,v)=>(C(),M("div",{class:"fcom_level_table_row",key:y},[b("div",u9e,A(v+1),1),b("div",c9e,[k(c,{class:"fcom_bold_input",type:"text",modelValue:m.title,"onUpdate:modelValue":w=>m.title=w,placeholder:e.$t("Level Title")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),k(c,{type:"text",modelValue:m.tagline,"onUpdate:modelValue":w=>m.tagline=w,placeholder:e.$t("Level Tagline")},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),b("div",d9e,[k(u,{label:""},{default:$(()=>[k(c,{min:0,max:999999999,disabled:y==="level_1",type:"number",modelValue:m.min_points,"onUpdate:modelValue":w=>m.min_points=w,placeholder:e.$t("Minimum Points")},null,8,["disabled","modelValue","onUpdate:modelValue","placeholder"])]),_:2},1024)])]))),128))])],64)):W("",!0)]),_:1}),b("div",f9e,[He((C(),q(i,{class:"fcom_primary_button",disabled:r.saving,onClick:s.saveSettings},{default:$(()=>[ne(A(e.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[h,r.saving]])])])):(C(),M("div",p9e,[b("p",null,A(e.$t("Config could not be loaded")),1)]))]),_:1},8,["size","modelValue"]),r.openUpgradeModal?(C(),q(p,{key:0,showModal:r.openUpgradeModal,onCloseModal:t[4]||(t[4]=m=>r.openUpgradeModal=!1),upgrade_module:"leader_board_module"},null,8,["showModal"])):W("",!0)],64)}const m9e=qe(e9e,[["render",h9e]]),g9e={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])}}},v9e={class:"fcom_svg_generator"},y9e={class:"fcom_form_item"},_9e={class:"fcom_form_item"},b9e=["innerHTML"];function w9e(e,t,n,o,r,s){const i=R3,l=L3,a=Eu;return C(),M("div",v9e,[b("div",y9e,[b("label",null,A(e.$t("Select Shape Color:")),1),k(i,{predefine:r.predefineColors,modelValue:r.currentColor,"onUpdate:modelValue":t[0]||(t[0]=u=>r.currentColor=u),onActiveChange:s.colorChanged,size:"large","show-alpha":""},null,8,["predefine","modelValue","onActiveChange"])]),b("div",_9e,[b("label",null,A(e.$t("Select Shape:")),1),k(a,{onChange:t[1]||(t[1]=u=>s.selectShape(r.selectedShape)),modelValue:r.selectedShape,"onUpdate:modelValue":t[2]||(t[2]=u=>r.selectedShape=u)},{default:$(()=>[(C(!0),M(fe,null,nt(s.svgShapes,(u,c)=>(C(),q(l,{key:c,value:c},{default:$(()=>[b("div",{innerHTML:u},null,8,b9e)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])])}const C9e=qe(g9e,[["render",w9e]]);var Ak="emoji-mart";const k9e=JSON;var tL=typeof window<"u"&&"localStorage"in window;let T2,O2;function S9e(e){e||(e={}),T2=e.getter,O2=e.setter}function $9e(e){Ak=e}function E9e(e){for(let t in e){let n=e[t];nL(t,n)}}function nL(e,t){if(O2)O2(e,t);else{if(!tL)return;try{window.localStorage[`${Ak}.${e}`]=k9e.stringify(t)}catch{}}}function x9e(e){if(T2)return T2(e);if(!tL)return;try{var t=window.localStorage[`${Ak}.${e}`]}catch{return}if(t)return JSON.parse(t)}const hd={update:E9e,set:nL,get:x9e,setNamespace:$9e,setHandlers:S9e},o_={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"},oL=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 rL(e){var t=Object.getOwnPropertyNames(e);for(let n of t){let o=e[n];e[n]=o&&typeof o=="object"?rL(o):o}return Object.freeze(e)}const M9e=e=>{if(!e.compressed)return e;e.compressed=!1;for(let t in e.emojis){let n=e.emojis[t];for(let o in o_)n[o]=n[o_[o]],delete n[o_[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=oL(n)}return e=rL(e),e},r_=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart","hankey"];let Mr,Nk,I2={};function sL(){Nk=!0,Mr=hd.get("frequently")}function T9e(e){Nk||sL();var{id:t}=e;Mr||(Mr=I2),Mr[t]||(Mr[t]=0),Mr[t]+=1,hd.set("last",t),hd.set("frequently",Mr)}function O9e(e){if(Nk||sL(),!Mr){I2={};const i=[];let l=Math.min(e,r_.length);for(let a=0;a<l;a++)I2[r_[a]]=parseInt((l-a)/4,10)+1,i.push(r_[a]);return i}const t=e,n=[];for(let i in Mr)Mr.hasOwnProperty(i)&&n.push(i);const r=n.sort((i,l)=>Mr[i]-Mr[l]).reverse().slice(0,t),s=hd.get("last");return s&&r.indexOf(s)==-1&&(r.pop(),r.push(s)),r}const A2={add:T9e,get:O9e},I9e={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>'},A9e={props:{i18n:{type:Object,required:!0},color:{type:String},categories:{type:Array,required:!0},activeCategory:{type:Object,default(){return{}}}},emits:["click"],created(){this.svgs=I9e}},N9e={role:"tablist",class:"emoji-mart-anchors"},P9e=["aria-label","aria-selected","data-title","onClick"],L9e=["innerHTML"];function R9e(e,t,n,o,r,s){return C(),M("div",N9e,[(C(!0),M(fe,null,nt(n.categories,i=>(C(),M("button",{role:"tab",type:"button","aria-label":i.name,"aria-selected":i.id==n.activeCategory.id,key:i.id,class:D({"emoji-mart-anchor":!0,"emoji-mart-anchor-selected":i.id==n.activeCategory.id}),style:Qe({color:i.id==n.activeCategory.id?n.color:""}),"data-title":n.i18n.categories[i.id],onClick:l=>e.$emit("click",i)},[b("div",{"aria-hidden":"true",innerHTML:e.svgs[i.id]},null,8,L9e),b("span",{"aria-hidden":"true",class:"emoji-mart-anchor-bar",style:Qe({backgroundColor:n.color})},null,4)],14,P9e))),128))])}const D9e=qe(A9e,[["render",R9e]]),F9e=String,V9e=F9e.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 B9e(e){var t=e.split("-"),n=t.map(o=>`0x${o}`);return V9e.apply(null,n)}function X9(e){return e.reduce((t,n)=>(t.indexOf(n)===-1&&t.push(n),t),[])}function z9e(e,t){const n=X9(e),o=X9(t);return n.filter(r=>o.indexOf(r)>=0)}function iL(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=iL(r,s)),n[o]=s}return n}function j9e(){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 H9e=61,U9e=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/,Q9=["1F3FA","1F3FB","1F3FC","1F3FD","1F3FE","1F3FF"];class W9e{constructor(t,{emojisToShowFilter:n,include:o,exclude:r,custom:s,recent:i,recentLength:l=20}={}){this._data=M9e(t),this._emojisFilter=n||null,this._include=o||null,this._exclude=r||null,this._custom=s||[],this._recent=i||A2.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(U9e);if(o&&(t=o[1],o[2]&&(n=parseInt(o[2],10))),this._data.aliases.hasOwnProperty(t)&&(t=this._data.aliases[t]),this._emojis.hasOwnProperty(t)){let r=this._emojis[t];return n?r.getSkin(n):r}return this._nativeEmojis.hasOwnProperty(t)?this._nativeEmojis[t]:null}categories(){return this._categories}emoji(t){this._data.aliases.hasOwnProperty(t)&&(t=this._data.aliases[t]);let n=this._emojis[t];if(!n)throw new Error("Can not find emoji by id: "+t);return n}firstEmoji(){let t=this._emojis[Object.keys(this._emojis)[0]];if(!t)throw new Error("Can not get first emoji");return t}hasEmoji(t){return this._data.aliases.hasOwnProperty(t)&&(t=this._data.aliases[t]),!!this._emojis[t]}nativeEmoji(t){return this._nativeEmojis.hasOwnProperty(t)?this._nativeEmojis[t]:null}search(t,n){if(n||(n=75),!t.length)return null;if(t=="-"||t=="-1")return[this.emoji("-1")];let o=t.toLowerCase().split(/[\s|,|\-|_]+/),r=[];o.length>2&&(o=[o[0],o[1]]),r=o.map(i=>{let l=this._emojis,a=this._searchIndex,u=0;for(let c=0;c<i.length;c++){const d=i[c];if(u++,a[d]||(a[d]={}),a=a[d],!a.results){let f={};a.results=[],a.emojis={};for(let p in l){let h=l[p],m=h._data.search,y=i.substr(0,u),v=m.indexOf(y);if(v!=-1){let w=v+1;y==p&&(w=0),a.results.push(h),a.emojis[p]=h,f[p]=w}}a.results.sort((p,h)=>{var m=f[p.id],y=f[h.id];return m-y})}l=a.emojis}return a.results}).filter(i=>i);var s=null;return r.length>1?s=z9e.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=oL(n));let o=new r0(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 r0(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 r0{constructor(t){if(this._data=Object.assign({},t),this._skins=null,this._data.skin_variations){this._skins=[];for(var n in Q9){let o=Q9[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 r0(s))}}this._sanitized=K9e(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=H9e-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 lL{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 K9e(e){var{name:t,short_names:n,skin_tone:o,skin_variations:r,emoticons:s,unified:i,custom:l,imageUrl:a}=e,u=e.id||n[0],c=`:${u}:`;return l?{id:u,name:t,colons:c,emoticons:s,custom:l,imageUrl:a}:(o&&(c+=`:skin-tone-${o}:`),{id:u,name:t,colons:c,emoticons:s,unified:i.toLowerCase(),skin:o||(r?1:null),native:B9e(i)})}const q9e={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"}},G9e={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{}}}},Y9e={props:{...q9e,data:{type:Object,required:!0}},emits:["click","mouseenter","mouseleave"],computed:{view(){return new lL(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 Z9e(e,t,n,o,r,s){return s.view.canRender?(C(),q(Lt(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:$(()=>[b("span",{class:D(s.view.cssClass),style:Qe(s.view.cssStyle)},A(s.view.content),7)]),_:1},40,["title","aria-label","data-title","onMouseenter","onMouseleave","onClick"])):W("",!0)}const aL=qe(Y9e,[["render",Z9e]]),J9e={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 lL(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:aL}},X9e=["aria-label"],Q9e={class:"emoji-mart-category-label"},e$e={class:"emoji-mart-category-label"},t$e=["aria-label","data-title","title","onMouseenter","onMouseleave","onClick"],n$e={key:0},o$e={class:"emoji-mart-no-results-label"};function r$e(e,t,n,o,r,s){const i=re("emoji");return s.isVisible&&(s.isSearch||s.hasResults)?(C(),M("section",{key:0,class:D({"emoji-mart-category":!0,"emoji-mart-no-results":!s.hasResults}),"aria-label":n.i18n.categories[n.id]},[b("div",Q9e,[b("h3",e$e,A(n.i18n.categories[n.id]),1)]),(C(!0),M(fe,null,nt(s.emojiObjects,({emojiObject:l,emojiView:a})=>(C(),M(fe,null,[a.canRender?(C(),M("button",{"aria-label":a.ariaLabel,role:"option","aria-selected":"false","aria-posinset":"1","aria-setsize":"1812",type:"button","data-title":l.short_name,key:l.id,title:a.title,class:D(["emoji-mart-emoji",s.activeClass(l)]),onMouseenter:u=>n.emojiProps.onEnter(a.getEmoji()),onMouseleave:u=>n.emojiProps.onLeave(a.getEmoji()),onClick:u=>n.emojiProps.onClick(a.getEmoji())},[b("span",{class:D(a.cssClass),style:Qe(a.cssStyle)},A(a.content),7)],42,t$e)):W("",!0)],64))),256)),s.hasResults?W("",!0):(C(),M("div",n$e,[k(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"]),b("div",o$e,A(n.i18n.notfound),1)]))],10,X9e)):W("",!0)}const s$e=qe(J9e,[["render",r$e]]),i$e={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}}},l$e=["onClick"];function a$e(e,t,n,o,r,s){return C(),M("div",{class:D({"emoji-mart-skin-swatches":!0,"emoji-mart-skin-swatches-opened":r.opened})},[(C(),M(fe,null,nt(6,i=>b("span",{key:i,class:D({"emoji-mart-skin-swatch":!0,"emoji-mart-skin-swatch-selected":n.skin==i})},[b("span",{class:D("emoji-mart-skin emoji-mart-skin-tone-"+i),onClick:l=>s.onClick(i)},null,10,l$e)],2)),64))],2)}const u$e=qe(i$e,[["render",a$e]]),c$e={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:aL,Skins:u$e}},d$e={class:"emoji-mart-preview"},f$e={class:"emoji-mart-preview-emoji"},p$e={class:"emoji-mart-preview-data"},h$e={class:"emoji-mart-preview-name"},m$e={class:"emoji-mart-preview-shortnames"},g$e={class:"emoji-mart-preview-emoticons"},v$e={class:"emoji-mart-preview-emoji"},y$e={class:"emoji-mart-preview-data"},_$e={class:"emoji-mart-title-label"},b$e={key:0,class:"emoji-mart-preview-skins"};function w$e(e,t,n,o,r,s){const i=re("emoji"),l=re("skins");return C(),M("div",d$e,[n.emoji?(C(),M(fe,{key:0},[b("div",f$e,[k(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"])]),b("div",p$e,[b("div",h$e,A(n.emoji.name),1),b("div",m$e,[(C(!0),M(fe,null,nt(s.emojiShortNames,a=>(C(),M("span",{key:a,class:"emoji-mart-preview-shortname"},":"+A(a)+":",1))),128))]),b("div",g$e,[(C(!0),M(fe,null,nt(s.emojiEmoticons,a=>(C(),M("span",{key:a,class:"emoji-mart-preview-emoticon"},A(a),1))),128))])])],64)):(C(),M(fe,{key:1},[b("div",v$e,[k(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"])]),b("div",y$e,[b("span",_$e,A(n.title),1)]),n.showSkinTones?(C(),M("div",b$e,[k(l,{skin:n.skinProps.skin,onChange:t[0]||(t[0]=a=>n.onSkinChange(a))},null,8,["skin"])])):W("",!0)],64))])}const C$e=qe(c$e,[["render",w$e]]),k$e={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()}},S$e={class:"emoji-mart-search"},$$e=["placeholder"],E$e=b("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 x$e(e,t,n,o,r,s){return C(),M("div",S$e,[He(b("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]=Pt(i=>e.$emit("arrowLeft",i),["left"])),t[1]||(t[1]=Pt(()=>e.$emit("arrowRight"),["right"])),t[2]||(t[2]=Pt(()=>e.$emit("arrowDown"),["down"])),t[3]||(t[3]=Pt(i=>e.$emit("arrowUp",i),["up"])),t[4]||(t[4]=Pt(()=>e.$emit("enter"),["enter"]))],"onUpdate:modelValue":t[5]||(t[5]=i=>r.value=i)},null,40,$$e),[[Bc,r.value]]),E$e])}const M$e=qe(k$e,[["render",x$e]]);var T$e=typeof window<"u";T$e&&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 O$e{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 I$e={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"}},A$e={props:{...G9e,data:{type:Object,required:!0}},emits:["select","skin-change"],data(){return{activeSkin:this.skin||hd.get("skin")||this.defaultSkin,view:new O$e(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+j9e()},filteredCategories(){return this.view.filteredCategories},mergedI18n(){return Object.freeze(iL(I$e,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),A2.add(this.view.previewEmoji))},onEmojiClick(e){this.$emit("select",e),A2.add(e)},onTextSelect(e){e.stopPropagation()},onSkinChange(e){this.activeSkin=e,hd.update({skin:e}),this.$emit("skin-change",e)},getCategoryComponent(e){let t=this.$refs["categories_"+e];return t&&"0"in t?t[0]:t}},components:{Anchors:D9e,Category:s$e,Preview:C$e,Search:M$e}},N$e={key:0,class:"emoji-mart-bar emoji-mart-bar-anchors"},P$e={id:"emoji-mart-list",ref:"scrollContent",role:"listbox","aria-expanded":"true"},L$e={key:0,class:"emoji-mart-bar emoji-mart-bar-preview"};function R$e(e,t,n,o,r,s){const i=re("anchors"),l=re("search"),a=re("category"),u=re("preview");return C(),M("section",{class:"emoji-mart emoji-mart-static",style:Qe(s.customStyles)},[e.showCategories?(C(),M("div",N$e,[k(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"])])):W("",!0),he(e.$slots,"searchTemplate",{data:n.data,i18n:e.i18n,autoFocus:e.autoFocus,onSearch:s.onSearch},()=>[e.showSearch?(C(),q(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"])):W("",!0)]),b("div",{role:"tabpanel",class:"emoji-mart-scroll",ref:"scroll",onScroll:t[0]||(t[0]=(...c)=>s.onScroll&&s.onScroll(...c))},[b("div",P$e,[he(e.$slots,"customCategory"),(C(!0),M(fe,null,nt(r.view.filteredCategories,(c,d)=>He((C(),q(a,{ref_for:!0,ref:"categories_"+d,key:c.id,data:n.data,i18n:s.mergedI18n,id:c.id,name:c.name,emojis:c.emojis,"emoji-props":s.emojiProps},null,8,["data","i18n","id","name","emojis","emoji-props"])),[[en,e.infiniteScroll||c==r.view.activeCategory]])),128))],512)],544),he(e.$slots,"previewTemplate",{data:n.data,title:e.title,emoji:r.view.previewEmoji,idleEmoji:s.idleEmoji,showSkinTones:e.showSkinTones,emojiProps:s.emojiProps,skinProps:s.skinProps,onSkinChange:s.onSkinChange},()=>[e.showPreview?(C(),M("div",L$e,[k(u,{data:n.data,title:e.title,emoji:r.view.previewEmoji,"idle-emoji":s.idleEmoji,"show-skin-tones":e.showSkinTones,"emoji-props":s.emojiProps,"skin-props":s.skinProps,"on-skin-change":s.onSkinChange},null,8,["data","title","emoji","idle-emoji","show-skin-tones","emoji-props","skin-props","on-skin-change"])])):W("",!0)])],4)}const D$e=qe(A$e,[["render",R$e]]),F$e={name:"EmojiPicker",components:{Picker:D$e},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 W9e(t),this.emojiIndex=window.fcomEmojiIndex,this.imojiLoading=!1):this.errorMessage="Emoji loading failed"}).catch(t=>{this.errorMessage="Emoji loading failed"}).finally(()=>{this.isLoading=!1})}}},V$e={style:{position:"relative"},ref:"container"},B$e=b("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[b("g",null,[b("circle",{cx:"9.99996",cy:"10.0013",r:"8.33333",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),b("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"}),b("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.6741 7.5L6.66663 7.5Z",fill:"currentColor"}),b("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.3333 7.5L13.3258 7.5Z",fill:"currentColor"}),b("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),z$e={key:0,class:"emoji-mart emoji-mart-static",style:{width:"320px",padding:"10px 20px"}},j$e={key:0},H$e={style:{"text-align":"center","margin-bottom":"20px"}},U$e={key:1,class:"fcom_emoji_holder"};function W$e(e,t,n,o,r,s){const i=Ne,l=pt,a=lo,u=re("Picker"),c=Po;return C(),M("div",V$e,[k(c,{placement:"bottom",width:320,trigger:"click",persistent:!1,ref:"fcom_emoji_popover",onShow:s.loadEmojiAssets,"popper-class":"fcom_emoji_popover ffcom_emoji"},{reference:$(()=>[k(l,{"aria-label":"Pick Imoji",text:""},{default:$(()=>[k(i,null,{default:$(()=>[B$e]),_:1})]),_:1})]),default:$(()=>[r.imojiLoading?(C(),M("div",z$e,[r.errorMessage?(C(),M("div",j$e,A(r.errorMessage),1)):(C(),M(fe,{key:1},[b("div",H$e,A(e.$t("Loading.....")),1),k(a,{animated:!0,rows:3})],64))])):r.emojiIndex?(C(),M("div",U$e,[k(u,{title:e.$t("Space Emoji"),color:"#66b1ff",showPreview:!1,ref:"picker",data:r.emojiIndex,set:"twitter",onSelect:s.onEmojiSelect,emojiSize:22,sheetSize:32,emojiTooltip:!1},null,8,["title","data","onSelect"])])):W("",!0)]),_:1},8,["onShow"])],512)}const uL=qe(F$e,[["render",W$e]]),K$e={name:"LogoEmojiSelector",components:{EmojiPicker:uL,ImageUploader:Md,SvgShapeGenerator:C9e},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")}},q$e=["innerHTML"];function G$e(e,t,n,o,r,s){const i=pt,l=re("EmojiPicker"),a=At,u=IO,c=re("SvgShapeGenerator"),d=Ed,f=re("ImageUploader"),p=OO,h=Po;return C(),q(h,{placement:"bottom",width:450,persistent:!1,style:{padding:"0"},visible:r.visible,ref:"logo_emoji_pop",class:"logo_emoji_pop"},{reference:$(()=>[k(i,{onClick:t[0]||(t[0]=m=>r.visible=!r.visible),text:""},{default:$(()=>[b("span",{class:"logo_emoji_holder",style:{cursor:"pointer"},innerHTML:s.currentMark||""},null,8,q$e)]),_:1})]),default:$(()=>[k(p,{modelValue:r.selectedTab,"onUpdate:modelValue":t[6]||(t[6]=m=>r.selectedTab=m),type:"border-card"},{default:$(()=>[k(u,{name:"emoji",label:e.$t("Emoji")},{default:$(()=>[k(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:$(()=>[k(l,{close_on_select:!0,onEmojiSelected:t[1]||(t[1]=m=>{r.emoji=m,s.setData("emoji")})})]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),k(u,{name:"shape",label:e.$t("Shape")},{default:$(()=>[k(c,{onUpdate:s.handleShapeChanged},null,8,["onUpdate"])]),_:1},8,["label"]),n.custom_svg?(C(),q(u,{key:0,name:"shape_svg",label:e.$t("Custom SVG")},{default:$(()=>[k(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"])):W("",!0),k(u,{name:"logo",label:e.$t("Custom Image")},{default:$(()=>[r.logo?(C(),q(d,{key:0,alt:e.$t("Logo"),src:r.logo,style:{"max-width":"100px"}},null,8,["alt","src"])):W("",!0),k(f,{additionalData:{resize:!0,max_width:400},onUploaded:s.handleLogoPhotoUpload},null,8,["onUploaded"])]),_:1},8,["label"])]),_:1},8,["modelValue"]),k(i,{onClick:t[7]||(t[7]=m=>{r.visible=!1}),type:"success",plain:"",style:{"margin-top":"20px"}},{default:$(()=>[ne(A(e.$t("Close")),1)]),_:1})]),_:1},8,["visible"])}const Ev=qe(K$e,[["render",G$e]]),Y$e={name:"UserBadgesConfig",components:{LogoEmojiSelector:Ev,UpgradeToProModal:$v},props:["features"],emits:["saveSettings"],data(){return{badges:null,showSettings:!1,fetching:!1,saving:!1,editingBadge:null,showEditBagdeModal:!1,openUpgradeModal:!1}},methods:{openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.fetching=!0,this.$get("admin/user-badges").then(e=>{this.badges=e.badges}).catch(e=>{this.$handleError(e)}).finally(()=>{this.fetching=!1})},saveSettings(){let e=this.features.user_badge=="yes";this.$emit("saveSettings",!e),e&&this.saveBadgeSettings()},saveBadgeSettings(){this.saving=!0,this.$post("admin/user-badges",{badges:this.badges}).then(e=>{this.$notify.success(e.message),this.$emit("saveSettings",!1);let t=e.badges;this.badges=Object.values(t),this.features.user_badge=="yes"?this.appVars.user_badges=t:this.appVars.user_badges=null}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},initAddNew(){this.badges.push({title:"",config:{emoji:"",shape_svg:"",logo:""},show_label:"yes",color:"",background_color:""}),this.editingBadge=this.badges[this.badges.length-1],this.showEditBagdeModal=!0},initEdit(e){this.editingBadge=e,this.showEditBagdeModal=!0},closeEdit(){this.showEditBagdeModal=!1,this.editingBadge=null,this.saveBadgeSettings()}}},cL=e=>(J$("data-v-45693b4b"),e=e(),X$(),e),Z$e={class:"fcom_storage_settings"},J$e={key:0,class:"white_loaded"},X$e={key:1},Q$e={class:"header_user_badge"},eEe={style:{"margin-bottom":"30px"},class:"fcom_user_badges fcom_manager_table"},tEe={class:"fcom_badge_preview"},nEe={class:"fcom_table_action_col",style:{display:"flex",gap:"10px"}},oEe=cL(()=>b("div",{class:"action_item clickable"},[b("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16",fill:"none"},[b("path",{d:"M12 3.66602L11.5868 10.3494C11.4813 12.057 11.4285 12.9108 11.0005 13.5246C10.7889 13.8281 10.5164 14.0842 10.2005 14.2767C9.56141 14.666 8.70599 14.666 6.99516 14.666C5.28208 14.666 4.42554 14.666 3.78604 14.276C3.46987 14.0831 3.19733 13.8266 2.98579 13.5226C2.55792 12.9077 2.5063 12.0528 2.40307 10.3428L2 3.66602",stroke:"currentColor","stroke-linecap":"round"}),b("path",{d:"M1 3.66634H13M9.70382 3.66634L9.2487 2.72749C8.94638 2.10385 8.79522 1.79202 8.53448 1.59755C8.47664 1.55441 8.4154 1.51604 8.35135 1.48281C8.06261 1.33301 7.71608 1.33301 7.02302 1.33301C6.31255 1.33301 5.95732 1.33301 5.66379 1.48909C5.59873 1.52368 5.53666 1.5636 5.4782 1.60845C5.21443 1.81081 5.06709 2.13404 4.7724 2.78051L4.36862 3.66634",stroke:"currentColor","stroke-linecap":"round"}),b("path",{d:"M5.33325 11L5.33325 7",stroke:"currentColor","stroke-linecap":"round"}),b("path",{d:"M8.66675 11L8.66675 7",stroke:"currentColor","stroke-linecap":"round"})])],-1)),rEe=["onClick"],sEe=cL(()=>b("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none"},[b("path",{d:"M0.666748 7.00033C0.666748 4.01476 0.666748 2.52198 1.59424 1.59449C2.52174 0.666992 4.01452 0.666992 7.00008 0.666992C9.98564 0.666992 11.4784 0.666992 12.4059 1.59449C13.3334 2.52198 13.3334 4.01476 13.3334 7.00033C13.3334 9.98589 13.3334 11.4787 12.4059 12.4062C11.4784 13.3337 9.98564 13.3337 7.00008 13.3337C4.01452 13.3337 2.52174 13.3337 1.59424 12.4062C0.666748 11.4787 0.666748 9.98589 0.666748 7.00033Z",stroke:"currentColor","stroke-linejoin":"round"}),b("path",{d:"M5.66675 9.33398C5.66675 9.88627 5.21903 10.334 4.66675 10.334C4.11446 10.334 3.66675 9.88627 3.66675 9.33398C3.66675 8.7817 4.11446 8.33398 4.66675 8.33398C5.21903 8.33398 5.66675 8.7817 5.66675 9.33398Z",stroke:"currentColor"}),b("path",{d:"M10.3335 4.66699C10.3335 4.11471 9.88578 3.66699 9.3335 3.66699C8.78121 3.66699 8.3335 4.11471 8.3335 4.66699C8.3335 5.21928 8.78121 5.66699 9.3335 5.66699C9.88578 5.66699 10.3335 5.21928 10.3335 4.66699Z",stroke:"currentColor"}),b("path",{d:"M4.66675 8.33366L4.66675 3.66699",stroke:"currentColor","stroke-linecap":"round"}),b("path",{d:"M9.3335 5.66732L9.3335 10.334",stroke:"currentColor","stroke-linecap":"round"})],-1)),iEe=[sEe],lEe={key:2};function aEe(e,t,n,o,r,s){const i=pt,l=lo,a=Hn,u=io,c=Y0,d=re("UserBadge"),f=G0,p=so,h=Ql,m=re("logo-emoji-selector"),y=At,v=R3,w=vh,_=gh,S=yh,x=re("UpgradeToProModal"),E=zt("loading");return C(),M(fe,null,[b("div",Z$e,[k(i,{class:"fcom_secondary_button",onClick:t[0]||(t[0]=T=>s.openSettings())},{default:$(()=>[ne(A(e.$t("Settings")),1)]),_:1})]),k(h,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,size:e.dialogWidth,modelValue:r.showSettings,"onUpdate:modelValue":t[4]||(t[4]=T=>r.showSettings=T),direction:"rtl"},{header:$(()=>[b("h4",null,A(e.$t("User Badge Settings")),1)]),default:$(()=>[r.fetching?(C(),M("div",J$e,[k(l,{rows:5,animated:!0})])):r.badges?(C(),M("div",X$e,[k(p,{onSubmit:t[3]||(t[3]=et(T=>e.doNothing(),["prevent"])),"label-position":"top"},{default:$(()=>[k(u,null,{default:$(()=>[k(a,{"true-label":"yes","false-label":"no",modelValue:n.features.user_badge,"onUpdate:modelValue":t[1]||(t[1]=T=>n.features.user_badge=T),label:e.$t("Enable User Badge Module"),size:"large"},null,8,["modelValue","label"])]),_:1}),n.features.user_badge==="yes"?(C(),M(fe,{key:0},[b("div",Q$e,[b("h3",null,A(e.$t("User Badges")),1),k(i,{class:"fcom_secondary_button",onClick:t[2]||(t[2]=T=>s.initAddNew()),size:"small"},{default:$(()=>[ne(A(e.$t("Add New")),1)]),_:1})]),b("div",eEe,[k(f,{stripe:"","empty-text":e.$t("No Badges has been configured"),data:r.badges},{default:$(()=>[k(c,{prop:"title",label:e.$t("Title"),width:"200px"},null,8,["label"]),k(c,{label:e.$t("Preview")},{default:$(T=>[b("div",tEe,[k(d,{is_preview:!0,badge:T.row},null,8,["badge"])])]),_:1},8,["label"]),k(c,{width:"150px",label:e.$t("Actions")},{default:$(T=>[b("div",nEe,[oEe,b("div",{onClick:O=>s.initEdit(T.row),class:"action_item clickable"},iEe,8,rEe)])]),_:1},8,["label"])]),_:1},8,["empty-text","data"])])],64)):W("",!0),k(u,null,{default:$(()=>[He((C(),q(i,{class:"fcom_primary_button",disabled:r.saving,onClick:s.saveSettings},{default:$(()=>[ne(A(e.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[E,r.saving]])]),_:1})]),_:1})])):(C(),M("div",lEe,[b("p",null,A(e.$t("Config could not be loaded")),1)]))]),_:1},8,["size","modelValue"]),k(S,{"append-to-body":!0,modelValue:r.showEditBagdeModal,"onUpdate:modelValue":t[14]||(t[14]=T=>r.showEditBagdeModal=T),title:e.$t("Edit Badge"),width:"30%"},{default:$(()=>[r.editingBadge?(C(),q(p,{key:0,onSubmit:t[13]||(t[13]=et(T=>e.doNothing(),["prevent"])),"label-position":"top"},{default:$(()=>[k(u,{label:e.$t("Title")},{default:$(()=>[k(y,{modelValue:r.editingBadge.title,"onUpdate:modelValue":t[6]||(t[6]=T=>r.editingBadge.title=T),placeholder:e.$t("Badge Title")},{prepend:$(()=>{var T,O;return[k(m,{fallback_mark:"",custom_svg:!0,onUpdate:t[5]||(t[5]=P=>{r.editingBadge.config.emoji=P.emoji,r.editingBadge.config.logo=P.logo,r.editingBadge.config.shape_svg=P.shape_svg}),config:{logo:r.editingBadge.config.logo,emoji:((T=r.editingBadge.config)==null?void 0:T.emoji)||"",shape_svg:(O=r.editingBadge.config)==null?void 0:O.shape_svg}},null,8,["config"])]}),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),k(u,null,{default:$(()=>[k(a,{modelValue:r.editingBadge.show_label,"onUpdate:modelValue":t[7]||(t[7]=T=>r.editingBadge.show_label=T),"true-value":"yes","false-value":"no"},{default:$(()=>[ne(A(e.$t("Show Label on Badge")),1)]),_:1},8,["modelValue"])]),_:1}),r.editingBadge.show_label=="yes"?(C(),M(fe,{key:0},[k(_,{gutter:20},{default:$(()=>[k(w,{span:12},{default:$(()=>[k(u,{label:e.$t("Color")},{default:$(()=>[k(v,{onActiveChange:t[8]||(t[8]=T=>{r.editingBadge.color=T}),modelValue:r.editingBadge.color,"onUpdate:modelValue":t[9]||(t[9]=T=>r.editingBadge.color=T)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),k(w,{span:12},{default:$(()=>[k(u,{label:e.$t("Background Color")},{default:$(()=>[k(v,{onActiveChange:t[10]||(t[10]=T=>{r.editingBadge.background_color=T}),modelValue:r.editingBadge.background_color,"onUpdate:modelValue":t[11]||(t[11]=T=>r.editingBadge.background_color=T)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1}),b("p",null,A(e.$t("For best UI, keep the colors empty")),1)],64)):W("",!0),k(u,null,{default:$(()=>[k(i,{class:"fcom_primary_button",onClick:t[12]||(t[12]=T=>s.closeEdit())},{default:$(()=>[ne(A(e.$t("Save")),1)]),_:1})]),_:1})]),_:1})):W("",!0)]),_:1},8,["modelValue","title"]),r.openUpgradeModal?(C(),q(x,{key:0,showModal:r.openUpgradeModal,onCloseModal:t[15]||(t[15]=T=>r.openUpgradeModal=!1),upgrade_module:"user_badge_module"},null,8,["showModal"])):W("",!0)],64)}const uEe=qe(Y$e,[["render",aEe],["__scopeId","data-v-45693b4b"]]),cEe={name:"Features",components:{UserBadgesConfig:uEe,LeaderBoardConfig:m9e,StorageSettings:QSe,Layout:ri,AppLayout:si,UpgradeToProModal:$v},data(){return{features:null,addOns:{},loading:!1,installing:!1,openGiphyUpgradeModal:!1,openEmojiUpgradeModal:!1}},methods:{saveFeatures(e=!0){if(this.features.giphy_module==="yes"&&QO(this.features.giphy_api_key)){this.$handleError("Giphy API Key is required");return}this.$post("settings/features",{features:this.features}).then(t=>{e&&(this.$notify.success(t.message||this.$t("Settings saved successfully")),location.reload())}).catch(t=>{this.$handleError(t)})},getFeatures(){this.loading=!0,this.$get("settings/features").then(e=>{this.features=e.features,this.addOns=e.addOns}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},installPlugin(e){this.installing=!0,this.$post("settings/install_plugin",{plugin:e}).then(t=>{t.is_installed?this.$notify.success(t.message):this.$notify.error(this.$t("Sorry, the selected plugins could not be installed")),this.getFeatures()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.installing=!1})}},mounted(){this.getFeatures(),this.changeTitle(this.$t("Features Settings"))}},dEe={class:"settings_router"},fEe={key:0,class:"white_loaded"},pEe=b("hr",null,null,-1),hEe={key:1,style:{"margin-bottom":"30px"}},mEe={class:"fhr_content_layout_body"},gEe={class:"setting_header"},vEe={class:"fcom_advancde_fetaures"},yEe={key:0,class:"setting_body"},_Ee={class:"setting_item"},bEe={class:"setting_field_placeholder"},wEe={class:"title"},CEe={class:"info"},kEe={class:"settings_field_data"},SEe={class:"align-right"},$Ee={class:"setting_item"},EEe={class:"setting_field_placeholder"},xEe={class:"title"},MEe={class:"info"},TEe={class:"settings_field_data"},OEe={class:"align-right"},IEe={class:"setting_item"},AEe={class:"setting_field_placeholder"},NEe={class:"title"},PEe={class:"info"},LEe={class:"settings_field_data"},REe={class:"align-right"},DEe={class:"fcom_module_popover_content"},FEe={class:"setting_item"},VEe={class:"setting_field_placeholder"},BEe={class:"title"},zEe={class:"info"},jEe={class:"settings_field_data"},HEe={class:"align-right"},UEe={key:0,class:"fcom_giphy_api",style:{"margin-bottom":"5px"}},WEe={class:"fcom_module_popover_content"},KEe={class:"setting_item"},qEe={class:"setting_field_placeholder"},GEe={class:"title"},YEe={class:"info"},ZEe={class:"settings_field_data"},JEe={class:"align-right"},XEe={class:"fcom_module_popover_content"},QEe={class:"setting_item"},e7e={class:"setting_field_placeholder"},t7e={class:"title"},n7e={class:"info"},o7e={class:"settings_field_data"},r7e={class:"align-right"},s7e={class:"fhr_content_layout_body"},i7e={class:"setting_header"},l7e={class:"fcom_advancde_fetaures"},a7e={key:0,class:"setting_body"},u7e={class:"setting_field_placeholder"},c7e={class:"title recommend_plugin",style:{display:"flex","align-items":"flex-start"}},d7e={class:"avatar",style:{"margin-right":"15px"}},f7e=["src"],p7e=["href"],h7e={class:"info"},m7e={class:"settings_field_data"},g7e={class:"align-right"},v7e=["href"];function y7e(e,t,n,o,r,s){const i=lo,l=mh,a=re("LeaderBoardConfig"),u=re("UserBadgesConfig"),c=Hn,d=pt,f=Po,p=At,h=re("UpgradeToProModal"),m=re("storage-settings"),y=re("layout"),v=re("app-layout");return C(),q(v,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:$(()=>[k(y,{wrapper_class:"no_bg_layout fcom_setting_route",title:e.$t("Advanced Features & Addons")},{default:$(()=>[b("div",dEe,[r.loading?(C(),M("div",fEe,[k(i,{rows:5,animated:!0}),pEe,k(i,{rows:7,animated:!0})])):(C(),M("div",hEe,[b("div",mEe,[b("div",gEe,[b("h2",null,A(e.$t("Advanced Features")),1)]),b("div",vEe,[r.features?(C(),M("div",yEe,[b("div",_Ee,[b("div",bEe,[b("div",wEe,[ne(A(e.$t("Leaderboards Module"))+" ",1),e.has_pro?(C(),M(fe,{key:0},[r.features.leader_board_module==="no"?(C(),q(l,{key:0,type:"info",size:"small"},{default:$(()=>[ne(A(e.$t("Disabled")),1)]),_:1})):r.features.leader_board_module==="yes"?(C(),q(l,{key:1,type:"success",size:"small",effect:"light"},{default:$(()=>[ne(A(e.$t("Enabled")),1)]),_:1})):W("",!0)],64)):W("",!0)]),b("div",CEe,A(e.$t("__LEADERBOARD_DESC")),1)]),b("div",kEe,[b("div",SEe,[k(a,{onSaveSettings:s.saveFeatures,features:r.features},null,8,["onSaveSettings","features"])])])]),b("div",$Ee,[b("div",EEe,[b("div",xEe,[ne(A(e.$t("User Badges"))+" ",1),e.has_pro?(C(),M(fe,{key:0},[r.features.user_badge==="no"?(C(),q(l,{key:0,type:"info",size:"small"},{default:$(()=>[ne(A(e.$t("Disabled")),1)]),_:1})):r.features.user_badge==="yes"?(C(),q(l,{key:1,type:"success",size:"small",effect:"light"},{default:$(()=>[ne(A(e.$t("Enabled")),1)]),_:1})):W("",!0)],64)):W("",!0)]),b("div",MEe,A(e.$t("__USER_BADGE_DESC")),1)]),b("div",TEe,[b("div",OEe,[k(u,{onSaveSettings:s.saveFeatures,features:r.features},null,8,["onSaveSettings","features"])])])]),b("div",IEe,[b("div",AEe,[b("div",NEe,[ne(A(e.$t("Course Module"))+" ",1),r.features.course_module==="no"?(C(),q(l,{key:0,type:"info",size:"small"},{default:$(()=>[ne(A(e.$t("Disabled")),1)]),_:1})):r.features.course_module==="yes"?(C(),q(l,{key:1,type:"success",size:"small",effect:"light"},{default:$(()=>[ne(A(e.$t("Enabled")),1)]),_:1})):W("",!0)]),b("div",PEe,A(e.$t("__COURSE_STRUCTURED_LESSONS")),1)]),b("div",LEe,[b("div",REe,[k(f,{persistent:!1,placement:"bottom",title:e.$t("Course Module Settings"),width:400,trigger:"click"},{reference:$(()=>[k(d,{size:"default",class:"fcom_secondary_button"},{default:$(()=>[ne(A(e.$t("Settings")),1)]),_:1})]),default:$(()=>[b("div",DEe,[k(c,{modelValue:r.features.course_module,"onUpdate:modelValue":t[0]||(t[0]=w=>r.features.course_module=w),"true-label":"yes","false-label":"no",label:e.$t("Enable Course Module"),size:"large"},null,8,["modelValue","label"]),k(d,{class:"fcom_primary_button",size:"default",onClick:s.saveFeatures},{default:$(()=>[ne(A(e.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])])])]),b("div",FEe,[b("div",VEe,[b("div",BEe,[ne(A(e.$t("Giphy Module"))+" ",1),e.has_pro?(C(),M(fe,{key:0},[r.features.giphy_module==="no"?(C(),q(l,{key:0,type:"info",size:"small",effect:"dark"},{default:$(()=>[ne(A(e.$t("Disabled")),1)]),_:1})):r.features.giphy_module==="yes"?(C(),q(l,{key:1,type:"success",size:"small",effect:"light"},{default:$(()=>[ne(A(e.$t("Enabled")),1)]),_:1})):W("",!0)],64)):W("",!0)]),b("div",zEe,A(e.$t("Unlock potential by using giphy when creating a new article , post or comment")),1)]),b("div",jEe,[b("div",HEe,[r.openGiphyUpgradeModal?W("",!0):(C(),q(f,{key:0,persistent:!1,placement:"bottom",title:e.$t("Giphy Module Settings"),width:400,trigger:"click"},{reference:$(()=>[k(d,{size:"default",class:"fcom_secondary_button",onClick:t[3]||(t[3]=w=>!e.has_pro&&(r.openGiphyUpgradeModal=!0))},{default:$(()=>[ne(A(e.$t("Settings")),1)]),_:1})]),default:$(()=>[r.features.giphy_module==="yes"?(C(),M("div",UEe,[k(p,{modelValue:r.features.giphy_api_key,"onUpdate:modelValue":t[1]||(t[1]=w=>r.features.giphy_api_key=w),placeholder:e.$t("Giphy API Key")},null,8,["modelValue","placeholder"])])):W("",!0),b("div",WEe,[k(c,{"true-value":"yes","false-value":"no",modelValue:r.features.giphy_module,"onUpdate:modelValue":t[2]||(t[2]=w=>r.features.giphy_module=w),label:e.$t("Enable Giphy Module"),size:"large"},null,8,["modelValue","label"]),k(d,{class:"fcom_primary_button",size:"default",onClick:s.saveFeatures},{default:$(()=>[ne(A(e.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])),r.openGiphyUpgradeModal?(C(),q(h,{key:1,showModal:r.openGiphyUpgradeModal,onCloseModal:t[4]||(t[4]=w=>r.openGiphyUpgradeModal=!1),upgrade_module:"giphy_module"},null,8,["showModal"])):W("",!0)])])]),b("div",KEe,[b("div",qEe,[b("div",GEe,[ne(A(e.$t("Emoji Module"))+" ",1),e.has_pro?(C(),M(fe,{key:0},[r.features.emoji_module==="no"?(C(),q(l,{key:0,type:"info",size:"small",effect:"dark"},{default:$(()=>[ne(A(e.$t("Disabled")),1)]),_:1})):r.features.emoji_module==="yes"?(C(),q(l,{key:1,type:"success",size:"small",effect:"light"},{default:$(()=>[ne(A(e.$t("Enabled")),1)]),_:1})):W("",!0)],64)):W("",!0)]),b("div",YEe,A(e.$t("__EMOJIS_DESC")),1)]),b("div",ZEe,[b("div",JEe,[r.openEmojiUpgradeModal?W("",!0):(C(),q(f,{key:0,persistent:!1,placement:"bottom",title:e.$t("Emoji Settings"),width:400,trigger:"click"},{reference:$(()=>[k(d,{size:"default",class:"fcom_secondary_button",onClick:t[6]||(t[6]=w=>!e.has_pro&&(r.openEmojiUpgradeModal=!0))},{default:$(()=>[ne(A(e.$t("Settings")),1)]),_:1})]),default:$(()=>[b("div",XEe,[k(c,{"true-value":"yes","false-value":"no",modelValue:r.features.emoji_module,"onUpdate:modelValue":t[5]||(t[5]=w=>r.features.emoji_module=w),label:e.$t("Enable Emoji"),size:"large"},null,8,["modelValue","label"]),k(d,{class:"fcom_primary_button",size:"default",onClick:s.saveFeatures},{default:$(()=>[ne(A(e.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])),r.openEmojiUpgradeModal?(C(),q(h,{key:1,showModal:r.openEmojiUpgradeModal,onCloseModal:t[7]||(t[7]=w=>r.openEmojiUpgradeModal=!1),upgrade_module:"emoji_module"},null,8,["showModal"])):W("",!0)])])]),b("div",QEe,[b("div",e7e,[b("div",t7e,[ne(A(e.$t("Media Module"))+" ",1),r.features.cloud_storage==="yes"?(C(),q(l,{key:0,type:"success",size:"small",effect:"light"},{default:$(()=>[ne(A(e.$t("Enabled")),1)]),_:1})):r.features.cloud_storage==="no"?(C(),q(l,{key:1,type:"info",size:"small"},{default:$(()=>[ne(A(e.$t("Local")),1)]),_:1})):W("",!0)]),b("div",n7e,A(e.$t("__CLOUD_STORAGE_DESC")),1)]),b("div",o7e,[b("div",r7e,[k(m,{features:r.features},null,8,["features"])])])])])):W("",!0)])])])),b("div",s7e,[b("div",i7e,[b("h2",null,A(e.$t("Recommended Plugins and Addons")),1)]),b("div",l7e,[r.features?(C(),M("div",a7e,[(C(!0),M(fe,null,nt(r.addOns,(w,_)=>(C(),M("div",{key:_,class:"setting_item"},[b("div",u7e,[b("div",c7e,[b("div",d7e,[b("img",{alt:"",src:w.logo,style:{width:"60px"}},null,8,f7e)]),b("div",null,[b("a",{target:"_blank",href:w.learn_more_url},A(w.title),9,p7e),w.is_installed?(C(),q(l,{key:0,type:"success",size:"small",effect:"light",style:{"margin-left":"8px"}},{default:$(()=>[ne(A(e.$t("Installed")),1)]),_:1})):W("",!0),b("div",h7e,A(w.description),1)])])]),b("div",m7e,[b("div",g7e,[w.is_installed?(C(),M("a",{key:1,href:w.settings_url,class:"el-button el-button--default fcom_secondary_button"},A(e.$t("View Settings")),9,v7e)):(C(),q(d,{key:0,class:"fcom_secondary_button",onClick:S=>s.installPlugin(_)},{default:$(()=>[ne(A(w.action_text),1)]),_:2},1032,["onClick"]))])])]))),128))])):W("",!0)])])])]),_:1},8,["title"])]),_:1})}const _7e=qe(cEe,[["render",y7e]]),b7e={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)}}},w7e={class:"drag-container"},C7e=["onDragstart","onDragover","onDrop"];function k7e(e,t,n,o,r,s){return C(),M("div",w7e,[k(w0,{name:"flip-list",tag:"div",class:"drag-group"},{default:$(()=>[(C(!0),M(fe,null,nt(n.items,(i,l)=>(C(),M("div",{key:i[n.rowKey],onDragstart:a=>s.dragStart(a,l),onDragend:t[0]||(t[0]=(...a)=>s.dragEnd&&s.dragEnd(...a)),onDragover:et(a=>s.dragOver(a,l),["prevent"]),onDrop:et(a=>s.dropEnd(a,l),["prevent"]),draggable:!0,class:D(["drag-item",`${n.itemClass} hello_${l}`,{dragging:r.draggingIndex===l}]),style:Qe(n.itemStyle)},[he(e.$slots,"item",{data:i,index:l},void 0,!0)],46,C7e))),128))]),_:3})])}const xv=qe(b7e,[["render",k7e],["__scopeId","data-v-51d9f44b"]]),S7e={name:"MenuGroupSettings",components:{FluentDnD:xv,LogoEmojiSelector:Ev},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()}}},$7e={key:0,class:"fcom_section_primary"},E7e={class:"fcom_section_primary_item"},x7e={class:"fcom_section_primary_item_title"},M7e={class:"fcom_heading_item"},T7e={class:"fcom_section_item_actions"},O7e={class:"fcom_section_items menu-items-container"},I7e={key:0,style:{padding:"1rem"}},A7e={class:"fcom_section_item_title"},N7e={class:"fcom_heading_item"},P7e=b("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1),L7e={key:0,class:"community_avatar"},R7e=["src"],D7e={key:1,class:"fcom_emoji"},F7e={key:2,class:"fcom_shape"},V7e=["innerHTML"],B7e={class:"fcom_section_item_actions"},z7e={key:0},j7e={key:1},H7e={key:0};function U7e(e,t,n,o,r,s){const i=pt,l=Ne,a=mh,u=re("FluentDnD"),c=re("logo-emoji-selector"),d=At,f=io,p=Hn,h=so,m=Ql;return C(),M(fe,null,[n.menuItems?(C(),M("div",$7e,[b("div",E7e,[b("div",x7e,[b("div",M7e,[he(e.$slots,"title",{},()=>[b("h4",null,A(n.title),1)])])]),b("div",T7e,[k(i,{class:"fcom_primary_button",onClick:t[0]||(t[0]=y=>s.initEditLink({enabled:"yes",new_tab:"yes"}))},{default:$(()=>[ne(A(e.$t("Add New Link")),1)]),_:1})])]),b("div",O7e,[n.menuItems.length?W("",!0):(C(),M("div",I7e,[b("p",null,A(e.$t("No link has been added for this section")),1)])),k(u,{items:n.menuItems,"row-key":"slug",onDrop:s.drop,"item-class":"fcom_section_item","item-style":"padding: 15px 15px 15px 35px"},{item:$(({data:y,index:v})=>[b("div",A7e,[b("p",N7e,[n.use_icon_selector?(C(),M(fe,{key:0},[P7e,y.icon_image?(C(),M("div",L7e,[k(l,null,{default:$(()=>[b("img",{alt:"",style:{"max-width":"16px","max-height":"16px"},src:y.icon_image},null,8,R7e)]),_:2},1024)])):y.emoji?(C(),M("span",D7e,A(y.emoji),1)):y.shape_svg?(C(),M("span",F7e,[k(l,{innerHTML:y.shape_svg},null,8,["innerHTML"])])):W("",!0)],64)):y.icon_svg?(C(),q(l,{key:1},{default:$(()=>[b("span",{innerHTML:y.icon_svg},null,8,V7e)]),_:2},1024)):W("",!0),b("span",null,A(y.title),1),y.is_unavailable=="yes"?(C(),q(a,{key:2,type:"danger"},{default:$(()=>[ne(A(e.$t("unavailable")),1)]),_:1})):y.enabled=="yes"?(C(),q(a,{key:3,type:"success"},{default:$(()=>[ne(A(e.$t("enabled")),1)]),_:1})):(C(),q(a,{key:4,type:"info"},{default:$(()=>[ne(A(e.$t("disabled")),1)]),_:1}))])]),b("div",B7e,[b("div",null,[k(i,{onClick:w=>s.initEditLink(y),size:"small"},{default:$(()=>[ne(A(e.$t("Edit")),1)]),_:2},1032,["onClick"]),y.is_system!="yes"?(C(),q(i,{key:0,onClick:w=>s.removeLink(v),type:"danger",plain:"",size:"small"},{default:$(()=>[ne(A(e.$t("Delete")),1)]),_:2},1032,["onClick"])):W("",!0)])])]),_:1},8,["items","onDrop"])])])):W("",!0),k(m,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body",class:"fcom_high_drawer","close-on-click-modal":!1,size:e.drawerWidth,modelValue:r.editLinkModal,"onUpdate:modelValue":t[9]||(t[9]=y=>r.editLinkModal=y),direction:"rtl"},{header:$(()=>[r.editLinkModal&&r.editLinkModal.slug?(C(),M("h4",z7e,A(e.$t("Edit Link")),1)):(C(),M("h4",j7e,A(e.$t("Add Custom Link")),1))]),default:$(()=>[r.editingItem?(C(),M("div",H7e,[k(h,{onSubmit:t[8]||(t[8]=et(y=>e.doNothing(),["prevent"])),"label-position":"top"},{default:$(()=>[k(f,{label:e.$t("Name of the Link")},{default:$(()=>[k(d,{placeholder:e.$t("Public Name of the item"),modelValue:r.editingItem.title,"onUpdate:modelValue":t[2]||(t[2]=y=>r.editingItem.title=y)},tu({_:2},[n.use_icon_selector&&r.editingItem.is_system!="yesw"?{name:"prepend",fn:$(()=>[k(c,{custom_svg:n.custom_svg,fallback_mark:"",onUpdate:t[1]||(t[1]=y=>{r.editingItem.emoji=y.emoji,r.editingItem.icon_image=y.logo,r.editingItem.shape_svg=y.shape_svg}),config:{logo:r.editingItem.icon_image,emoji:r.editingItem.emoji||"",shape_svg:r.editingItem.shape_svg||""}},null,8,["custom_svg","config"])]),key:"0"}:void 0]),1032,["placeholder","modelValue"])]),_:1},8,["label"]),k(f,{label:e.$t("URL")},{default:$(()=>[k(d,{disabled:r.editingItem.is_system,type:"url",placeholder:e.$t("Url of the item"),modelValue:r.editingItem.permalink,"onUpdate:modelValue":t[3]||(t[3]=y=>r.editingItem.permalink=y)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["label"]),n.has_svg?(C(),q(f,{key:0,label:e.$t("SVG Code for Icon (Simplified SVG Code) / Emoji")},{default:$(()=>[k(d,{placeholder:e.$t("SVG Code. No url please / You can use emoji"),type:"textarea",rows:3,modelValue:r.editingItem.icon_svg,"onUpdate:modelValue":t[4]||(t[4]=y=>r.editingItem.icon_svg=y)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])):W("",!0),n.has_enable_disable?(C(),q(f,{key:1},{default:$(()=>[k(p,{"true-value":"yes","false-value":"no",modelValue:r.editingItem.enabled,"onUpdate:modelValue":t[5]||(t[5]=y=>r.editingItem.enabled=y)},{default:$(()=>[ne(A(e.$t("Enable this link")),1)]),_:1},8,["modelValue"])]),_:1})):W("",!0),r.editingItem.is_system?W("",!0):(C(),q(f,{key:2},{default:$(()=>[k(p,{"true-value":"yes","false-value":"no",modelValue:r.editingItem.new_tab,"onUpdate:modelValue":t[6]||(t[6]=y=>r.editingItem.new_tab=y)},{default:$(()=>[ne(A(e.$t("Open this link on new tab")),1)]),_:1},8,["modelValue"])]),_:1})),k(f,null,{default:$(()=>[k(i,{class:"fcom_primary_button",onClick:t[7]||(t[7]=y=>s.createOrUpdateLink())},{default:$(()=>[ne(A(e.$t("Save")),1)]),_:1})]),_:1})]),_:1})])):W("",!0)]),_:1},8,["size","modelValue"])],64)}const dL=qe(S7e,[["render",U7e]]),W7e={name:"EditableContentInput",$emit:["update:modelValue"],props:{modelValue:{type:String,default:""},placeholder:{type:String,default:"Write something..."},wrapper_class:{type:String,default:""},show_button:{type:Boolean,default:!1}},computed:{listeners(){return{input:this.onInput}}},mounted(){this.$refs.editable.innerText=this.modelValue},methods:{onInput(e){let t=e.target.innerText,n=window.getSelection().getRangeAt(0).startOffset;t&&(t=t.replace(/<br>/g," "),t=t.replace(/<[^>]*>?/gm,""),t=t.replace(/&nbsp;/g,""),t=t.replace(/\n/g," ")),this.$refs.editable.focus(),this.$refs.editable.innerText=t,this.$emit("update:modelValue",t),this.$nextTick(()=>{this.$refs.editable.innerText=t,this.$refs.editable.focus();let o=document.createRange(),r=window.getSelection();o.selectNodeContents(this.$refs.editable);const s=Math.min(n,t.length);o.setStart(this.$refs.editable.childNodes[0]||this.$refs.editable,s),o.collapse(!0),r.removeAllRanges(),r.addRange(o)})},onClickInput(e){this.$refs.editable.innerText||(this.$refs.editable.focus(),window.getSelection().selectAllChildren(this.$refs.editable),window.getSelection().collapseToEnd())}}},K7e=["data-ph"];function q7e(e,t,n,o,r,s){return C(),M("div",un({class:[n.wrapper_class,"fcom_editable_input"],ref:"editable",onClick:t[0]||(t[0]=(...i)=>s.onClickInput&&s.onClickInput(...i)),contenteditable:"","data-ph":n.placeholder},vE(s.listeners,!0)),null,16,K7e)}const G7e=qe(W7e,[["render",q7e]]),Y7e={name:"MenuSettings",components:{EditableContentInput:G7e,MenuGroupSettings:dL,Layout:ri,AppLayout:si},data(){return{menuSettings:null,loading:!1,saving:!1}},methods:{fetchMenuItems(){this.loading=!0,this.$get("settings/menu-settings").then(e=>{this.menuSettings=e.menuSettings}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},saveMenuItems(){this.saving=!0,this.$post("settings/menu-settings",{menuSettings:this.menuSettings}).then(e=>{this.$notify.success(e.message),this.$eventBus.emit("reloadMenu")}).catch(e=>{this.$handleError(e),this.fetchMenuItems()}).finally(()=>{this.saving=!1})},addFooterGroup(){this.menuSettings.afterCommunityLinkGroups.push({title:"",items:[]})}},mounted(){this.fetchMenuItems()}},Z7e={class:"settings_router"},J7e={key:0},X7e={class:"fcom_card_sections"},Q7e={class:"fcom_card_sections"},exe={class:"fcom_card_sections"},txe={key:0,class:"fcom_card_sections"},nxe={class:"fcom_section_primary_item"},oxe={class:"fcom_section_primary_item_title"},rxe={class:"fcom_heading_item"},sxe={style:{"justify-content":"center"},class:"fcom_section_primary_item"},ixe={key:1,class:"white_loaded"};function lxe(e,t,n,o,r,s){const i=pt,l=re("menu-group-settings"),a=At,u=lo,c=re("layout"),d=re("app-layout");return C(),q(d,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:$(()=>[k(c,{wrapper_class:"no_bg_layout",title:e.$t("Menu Settings")},{actions:$(()=>[k(i,{class:"fcom_primary_button",disabled:r.saving||r.loading,onClick:s.saveMenuItems},{default:$(()=>[b("span",null,A(e.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),default:$(()=>[b("div",Z7e,[r.menuSettings?(C(),M("div",J7e,[b("div",X7e,[r.menuSettings.mainMenuItems?(C(),q(l,{key:0,custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:t[0]||(t[0]=f=>s.saveMenuItems()),title:e.$t("Primary Menu Items"),menuItems:r.menuSettings.mainMenuItems},null,8,["title","menuItems"])):W("",!0)]),b("div",Q7e,[r.menuSettings.profileDropdownItems?(C(),q(l,{key:0,custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:t[1]||(t[1]=f=>s.saveMenuItems()),title:e.$t("Profile Dropdown Items"),menuItems:r.menuSettings.profileDropdownItems},null,8,["title","menuItems"])):W("",!0)]),b("div",exe,[r.menuSettings.beforeCommunityMenuItems?(C(),q(l,{key:0,custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:t[2]||(t[2]=f=>s.saveMenuItems()),title:e.$t("Top Links (At Sidebar)"),menuItems:r.menuSettings.beforeCommunityMenuItems},null,8,["title","menuItems"])):W("",!0)]),r.menuSettings.afterCommunityLinkGroups?(C(),M("div",txe,[b("div",nxe,[b("div",oxe,[b("div",rxe,[b("h4",null,A(e.$t("Sidebar Bottom Link Groups")),1)])])]),(C(!0),M(fe,null,nt(r.menuSettings.afterCommunityLinkGroups,f=>(C(),M("div",null,[k(l,{custom_svg:!0,has_svg:!1,use_icon_selector:!0,onSave:t[3]||(t[3]=p=>s.saveMenuItems()),title:e.$t("Sidebar Bottom Link Groups"),menuItems:f.items},{title:$(()=>[k(a,{modelValue:f.title,"onUpdate:modelValue":p=>f.title=p,placeholder:e.$t("Group Title")},{append:$(()=>[k(i,{onClick:s.saveMenuItems,text:""},{default:$(()=>[ne(A(e.$t("save")),1)]),_:1},8,["onClick"])]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["title","menuItems"])]))),256)),b("div",sxe,[k(i,{onClick:t[4]||(t[4]=f=>s.addFooterGroup())},{default:$(()=>[ne(A(e.$t("Add Another Group")),1)]),_:1})])])):W("",!0)])):(C(),M("div",ixe,[k(u,{animated:!0,rows:10})]))])]),_:1},8,["title"])]),_:1})}const axe=qe(Y7e,[["render",lxe]]),uxe={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 cxe(e,t,n,o,r,s){const i=At;return C(),q(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 Pk=qe(uxe,[["render",cxe]]),dxe={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 fxe(e,t,n,o,r,s){const i=Ss,l=vr,a=zt("loading");return He((C(),q(l,{"multiple-limit":20,modelValue:r.selected,"onUpdate:modelValue":t[0]||(t[0]=u=>r.selected=u),multiple:!0,clearable:"",filterable:"",placeholder:e.$t("Choose up to 20 topics")},{default:$(()=>[(C(!0),M(fe,null,nt(r.topics,u=>(C(),q(i,{key:u.slug,label:u.title,value:u.id},{default:$(()=>[b("span",null,A(u.title),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])),[[a,r.loading]])}const fL=qe(dxe,[["render",fxe]]),pxe={name:"CreateSpaceForm",emits:["completed"],components:{SlugInput:Pk,ImageUploader:Md,LogoEmojiSelector:Ev,TopicSelector:fL},props:{community:{required:!1,default:null},parent_id:{required:!1,default:null},savingCount:{required:!1,default:0}},data(){return{saving:!1,privacies:L1e,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}},hxe={key:0},mxe={style:{"font-weight":"bold"}},gxe=["innerHTML"],vxe={key:0},yxe={class:"fcom_lined_checkboxes"},_xe={class:"fcom_help_text"},bxe={class:"fcom_help_text"},wxe=["href"],Cxe={class:"fcom_help_text"},kxe={class:"fcom_help_text"},Sxe={key:0},$xe={key:1},Exe={class:"fcom_space_form_bottom"};function xxe(e,t,n,o,r,s){const i=re("logo-emoji-selector"),l=At,a=io,u=re("SlugInput"),c=Ss,d=vr,f=U0,p=Eu,h=Hn,m=re("topic-selector"),y=Ed,v=re("ImageUploader"),w=pt,_=so,S=zt("loading");return C(),q(_,{onSubmit:t[17]||(t[17]=et(x=>e.doNothing(),["prevent"])),modelValue:r.form,"onUpdate:modelValue":t[18]||(t[18]=x=>r.form=x),"label-position":"top",class:"fcom_space_form"},{default:$(()=>[r.showingSections.indexOf("basic")!==-1?(C(),M(fe,{key:0},[r.form.id?W("",!0):(C(),M("h4",hxe,A(e.$t("Basic Info")),1)),k(a,{label:e.$t("Space Title")},{default:$(()=>[k(l,{type:"text",placeholder:e.$t("Your Space Title"),modelValue:r.form.title,"onUpdate:modelValue":t[1]||(t[1]=x=>r.form.title=x)},{prepend:$(()=>{var x,E;return[r.dataLoaded?(C(),q(i,{key:0,onUpdate:t[0]||(t[0]=T=>{r.form.settings.emoji=T.emoji,r.form.logo=T.logo,r.form.settings.shape_svg=T.shape_svg}),config:{logo:r.form.logo,emoji:((x=r.form.settings)==null?void 0:x.emoji)||"",shape_svg:(E=r.form.settings)==null?void 0:E.shape_svg}},null,8,["config"])):W("",!0)]}),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),k(a,{label:e.$t("Slug")},{default:$(()=>[k(u,{disabled:!!r.form.id,modelValue:r.form.slug,"onUpdate:modelValue":t[2]||(t[2]=x=>r.form.slug=x),placeholder:e.$t("Space Slug (no space or special chars)")},null,8,["disabled","modelValue","placeholder"])]),_:1},8,["label"]),k(a,{label:e.$t("Description")},{default:$(()=>[k(l,{type:"textarea",rows:3,placeholder:e.$t("Space Description"),modelValue:r.form.description,"onUpdate:modelValue":t[3]||(t[3]=x=>r.form.description=x)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),k(a,{label:e.$t("Privacy")},{default:$(()=>[k(d,{"popper-class":"rich_select",modelValue:r.form.privacy,"onUpdate:modelValue":t[4]||(t[4]=x=>r.form.privacy=x),placeholder:e.$t("Select Privacy")},{default:$(()=>[(C(!0),M(fe,null,nt(r.privacies,(x,E)=>(C(),q(c,{key:E,label:x.label,value:E},{default:$(()=>[b("span",mxe,A(e.$labelize(x.label)),1),b("p",{innerHTML:x.description},null,8,gxe)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),r.form.privacy=="private"?(C(),q(a,{key:1,label:e.$t("Lock Screen Type")},{default:$(()=>[k(p,{modelValue:r.form.settings.custom_lock_screen,"onUpdate:modelValue":t[5]||(t[5]=x=>r.form.settings.custom_lock_screen=x)},{default:$(()=>[k(f,{value:"yes"},{default:$(()=>[ne(A(e.$t("Custom Lock Screen")),1)]),_:1}),k(f,{value:"no"},{default:$(()=>[ne(A(e.$t("Default Lock Screen")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])):W("",!0),r.form.settings.custom_lock_screen=="no"?(C(),q(a,{key:2},{default:$(()=>[k(h,{"true-value":"yes","false-value":"no",modelValue:r.form.settings.can_request_join,"onUpdate:modelValue":t[6]||(t[6]=x=>r.form.settings.can_request_join=x)},{default:$(()=>[ne(A(e.$t("Allow users to request to join this Space")),1)]),_:1},8,["modelValue"])]),_:1})):W("",!0),k(a,{label:e.$t("Menu Group")},{default:$(()=>[k(d,{modelValue:r.form.parent_id,"onUpdate:modelValue":t[7]||(t[7]=x=>r.form.parent_id=x)},{default:$(()=>[(C(!0),M(fe,null,nt(e.appVars.space_groups,x=>(C(),q(c,{key:x.id,value:x.id.toString(),label:x.title},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"])],64)):W("",!0),r.showingSections.indexOf("customization")!==-1?(C(),M(fe,{key:1},[r.form.id?W("",!0):(C(),M("h4",vxe,A(e.$t("Customization")),1)),r.form.settings?(C(),q(a,{key:1,label:e.$t("Features Customizations")},{default:$(()=>[b("div",yxe,[k(h,{"true-value":"yes","false-value":"no",modelValue:r.form.settings.restricted_post_only,"onUpdate:modelValue":t[8]||(t[8]=x=>r.form.settings.restricted_post_only=x)},{default:$(()=>[ne(A(e.$t("Only admin or moderators can create post")),1)]),_:1},8,["modelValue"]),k(h,{"true-value":"yes","false-value":"no",modelValue:r.form.settings.show_sidebar,"onUpdate:modelValue":t[9]||(t[9]=x=>r.form.settings.show_sidebar=x)},{default:$(()=>[ne(A(e.$t("Show Right Sidebar on Space")),1)]),_:1},8,["modelValue"])])]),_:1},8,["label"])):W("",!0),k(a,{label:e.$t("Default layout styles")},{default:$(()=>[k(p,{modelValue:r.form.settings.layout_style,"onUpdate:modelValue":t[10]||(t[10]=x=>r.form.settings.layout_style=x)},{default:$(()=>[k(f,{value:"timeline"},{default:$(()=>[ne(A(e.$t("Timeline")),1)]),_:1}),k(f,{value:"list"},{default:$(()=>[ne(A(e.$t("List")),1)]),_:1})]),_:1},8,["modelValue"]),b("div",_xe,[b("p",null,A(e.$t("User can change the layout style for their own preference")),1)])]),_:1},8,["label"]),e.has_pro&&r.form.id?(C(),q(a,{key:2,label:e.$t("Topic navigation")},{default:$(()=>[k(m,{modelValue:r.form.topic_ids,"onUpdate:modelValue":t[11]||(t[11]=x=>r.form.topic_ids=x)},null,8,["modelValue"]),b("div",bxe,[b("p",null,[ne(A(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),b("a",{target:"_blank",rel:"noopener",href:e.$getRouteLink("admin/settings/topics-settings")},A(e.$t("Manage all topics.")),9,wxe)])])]),_:1},8,["label"])):W("",!0),e.appVars.has_chat?(C(),q(a,{key:3,label:e.$t("Group Chat?")},{default:$(()=>[k(h,{"true-value":"yes","false-value":"no",modelValue:r.form.group_chat_support,"onUpdate:modelValue":t[12]||(t[12]=x=>r.form.group_chat_support=x)},{default:$(()=>[ne(A(e.$t("Enable group chat for this space members")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):W("",!0),k(a,{label:e.$t("Thumbnail / Open Graph Image (Recommended Size: 1200 x 630)")},{default:$(()=>[r.form.settings.og_image?(C(),q(y,{key:0,alt:e.$t("Thumbnail / Open Graph Image"),src:r.form.settings.og_image,style:{"max-width":"100px"}},null,8,["alt","src"])):W("",!0),k(v,{isTextBtn:!1,can_remove:!!r.form.settings.og_image,additionalData:{resize:!0,max_width:1200,max_height:630},onUploaded:t[13]||(t[13]=x=>{r.form.settings.og_image=x})},null,8,["can_remove"]),b("div",Cxe,[b("p",null,A(e.$t("Will be used on card preview and social sharing preview.")),1)])]),_:1},8,["label"]),k(a,{label:e.$t("Featured Image (Recommended size: 1600x500) - Optional")},{default:$(()=>[r.form.cover_photo?(C(),q(y,{key:0,alt:e.$t("Featured Image Preview"),src:r.form.cover_photo,style:{"max-width":"100px"}},null,8,["alt","src"])):W("",!0),k(v,{isTextBtn:!1,can_remove:!!r.form.cover_photo,additionalData:{resize:!0,max_width:1600},onUploaded:s.handleCoverPhotoUpload},null,8,["can_remove","onUploaded"]),b("div",kxe,[b("p",null,A(e.$t("If you add this image, it will be shown on the space homepage")),1)])]),_:1},8,["label"]),k(a,{style:{"margin-top":"45px"}},{default:$(()=>[r.showingSections.indexOf("basic")===-1?(C(),q(w,{key:0,class:"plain_button",text:"",onClick:t[14]||(t[14]=()=>{r.showingSections=["basic"]})},{default:$(()=>[b("span",null,A(e.$t("Go Back")),1)]),_:1})):W("",!0),He((C(),q(w,{class:"fcom_primary_button",disabled:r.saving,onClick:t[15]||(t[15]=x=>s.submit())},{default:$(()=>[r.form.id?(C(),M("span",Sxe,A(e.$t("Update Info")),1)):(C(),M("span",$xe,A(e.$t("Create")),1))]),_:1},8,["disabled"])),[[S,r.saving]])]),_:1})],64)):(C(),q(a,{key:2},{default:$(()=>[b("div",Exe,[k(w,{onClick:t[16]||(t[16]=()=>{r.showingSections=["customization"]}),class:"fcom_primary_button"},{default:$(()=>[b("span",null,A(e.$t("Continue")),1)]),_:1})])]),_:1}))]),_:1},8,["modelValue"])}const Mxe=qe(pxe,[["render",xxe]]),Txe={name:"CreateGroupForm",emits:["completed"],components:{ImageUploader:Md},props:{group:{required:!1,default:{title:"",slug:"",description:"",settings:{always_show_spaces:"yes"}}}},data(){return{saving:!1,form:{}}},methods:{submit(){this.saving=!0;let e="spaces/space_groups",t={title:this.form.title,description:this.form.description,settings:this.form.settings,slug:this.form.slug},n=this.$post;this.form.id&&(e+="/"+this.form.id,n=this.$put),n(e,t).then(o=>{this.$eventBus.emit("reloadMenu"),this.form={},this.$notify.success(o.message),this.$emit("completed",o.group)}).catch(o=>{this.$handleError(o)}).finally(()=>{this.saving=!1})}},mounted(){this.group&&this.group.id?this.form=this.group:this.form={title:"",slug:"",description:"",settings:{always_show_spaces:"yes"}}}},Oxe=b("span",null,"#",-1),Ixe={key:0},Axe={key:1};function Nxe(e,t,n,o,r,s){const i=At,l=io,a=Hn,u=pt,c=so,d=zt("loading");return C(),q(c,{onSubmit:t[5]||(t[5]=et(f=>e.doNothing(),["prevent"])),modelValue:r.form,"onUpdate:modelValue":t[6]||(t[6]=f=>r.form=f),"label-position":"top"},{default:$(()=>[k(l,{label:e.$t("Group Title")},{default:$(()=>[k(i,{type:"text",placeholder:e.$t("Your Group Title"),modelValue:r.form.title,"onUpdate:modelValue":t[0]||(t[0]=f=>r.form.title=f)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),k(l,{label:e.$t("Slug")},{default:$(()=>[k(i,{disabled:!!r.form.id,type:"text",placeholder:e.$t("Group Slug (no space or special chars)"),modelValue:r.form.slug,"onUpdate:modelValue":t[1]||(t[1]=f=>r.form.slug=f)},{prefix:$(()=>[Oxe]),_:1},8,["disabled","placeholder","modelValue"])]),_:1},8,["label"]),k(l,{label:e.$t("Description")},{default:$(()=>[k(i,{type:"textarea",rows:3,placeholder:e.$t("Group Description"),modelValue:r.form.description,"onUpdate:modelValue":t[2]||(t[2]=f=>r.form.description=f)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),r.form.settings?(C(),q(l,{key:0,label:e.$t("Appearance")},{default:$(()=>[k(a,{"true-value":"yes","false-value":"no",modelValue:r.form.settings.always_show_spaces,"onUpdate:modelValue":t[3]||(t[3]=f=>r.form.settings.always_show_spaces=f)},{default:$(()=>[ne(A(e.$t("Show Spaces even if the user is not a member of any space")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):W("",!0),k(l,null,{default:$(()=>[He((C(),q(u,{class:"fcom_primary_button",disabled:r.saving,onClick:t[4]||(t[4]=f=>s.submit())},{default:$(()=>[r.form.id?(C(),M("span",Ixe,A(e.$t("Update Info")),1)):(C(),M("span",Axe,A(e.$t("Create")),1))]),_:1},8,["disabled"])),[[d,r.saving]])]),_:1})]),_:1},8,["modelValue"])}const Pxe=qe(Txe,[["render",Nxe]]),Lxe={name:"MoveGroupPopup",props:{groups:{type:Array,default:()=>[]},currentSpace:{type:[Array,Object],default:null},openedSpaceId:{type:[String,Number],default:null}},data(){var e;return{isVisible:!1,selectedGroupId:null,currentGroupId:(e=this.currentSpace)==null?void 0:e.parent_id,working:!1}},watch:{openedSpaceId(e){this.isVisible=e==this.currentSpace.id}},computed:{filteredGroups(){return this.groups.filter(e=>e.id!=this.currentGroupId)}},methods:{togglePopover(){this.$emit("togglePopover",this.currentSpace.id)},moveSpace(){this.working=!0,this.$patch("spaces/space_groups/move-space",{space_id:this.currentSpace.id,group_id:this.selectedGroupId}).then(e=>{this.$notify.success(e.message),this.$emit("moved")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})}}};function Rxe(e,t,n,o,r,s){const i=re("MoreFilled"),l=Ne,a=pt,u=Ss,c=vr,d=io,f=so,p=Po,h=zt("loading");return C(),q(p,{persistent:!1,placement:"bottom",width:350,visible:r.isVisible,onHide:t[2]||(t[2]=m=>r.isVisible=!1)},{reference:$(()=>[k(a,{"aria-label":e.$t("View actions"),onClick:s.togglePopover,class:"fcom_dot_menu edit_action",size:"small",text:""},{default:$(()=>[k(l,null,{default:$(()=>[k(i)]),_:1})]),_:1},8,["aria-label","onClick"])]),default:$(()=>[k(f,{onSubmit:t[1]||(t[1]=et(m=>e.doNothing(),["prevent"])),"label-position":"top"},{default:$(()=>[k(d,{label:e.$t("Select Group")},{default:$(()=>[k(c,{modelValue:r.selectedGroupId,"onUpdate:modelValue":t[0]||(t[0]=m=>r.selectedGroupId=m)},{default:$(()=>[(C(!0),M(fe,null,nt(s.filteredGroups,m=>(C(),q(u,{key:m.id,label:m.title,value:m.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),k(d,null,{default:$(()=>[He((C(),q(a,{disabled:!r.selectedGroupId||r.working,onClick:s.moveSpace,class:"fcom_primary_button"},{default:$(()=>[ne(A(e.$t("Move Space")),1)]),_:1},8,["disabled","onClick"])),[[h,r.working]])]),_:1})]),_:1})]),_:1},8,["visible"])}const Dxe=qe(Lxe,[["render",Rxe]]),Fxe={name:"AllCommunities",components:{FluentDnD:xv,CreateSpaceForm:Mxe,CreateGroupForm:Pxe,Layout:ri,AppLayout:si,MoveGroupPopup:Dxe},data(){return{groups:[],loading:!0,joining:!1,openedSpaceId:null,createSpaceModal:!1,createGroupModal:!1,editingGroup:null,draggingIndexGroup:null,draggingIndexSpace:null}},computed:{communityCounts(){return this.groups.reduce((e,t)=>{var n;return e+(((n=t.spaces)==null?void 0:n.length)||0)},0)}},methods:{handleTogglePopover(e){this.openedSpaceId=this.openedSpaceId==e?null:e},getGroups(){this.loading=!0,this.editingGroup=null,this.$get("spaces/space_groups").then(e=>{this.groups=e.groups;const t=[];this.groups.forEach(n=>{t.push({id:n.id,title:n.title})}),this.appVars.space_groups=t}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},initEditGroup(e){this.editingGroup=e,this.createGroupModal=!0},resetGroupsIndexes(){const e={};cu(this.groups,(t,n)=>{e[t.id]=n+1}),this.$patch("spaces/space_groups/re-index",{indexes:e}).catch(t=>{this.$handleError(t)}).finally(()=>{this.$eventBus.emit("reloadMenu")})},resetSpaceIndexes(e){this.$patch("spaces/space_groups/re-index-spaces",{indexes:e}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.$eventBus.emit("reloadMenu")})},removeGroup(e){if(e&&e.spaces.length){this.$messageBox({title:this.$t("Can not be deleted"),message:this.$t("You can not delete a group with spaces. Please move the spaces to a different group first."),type:"warning",confirmButtonText:this.$t("Got it!")});return}this.$confirm(this.$t("Are you sure you want to remove this group?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete this group"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.$del("spaces/space_groups/"+e.id).then(()=>{this.getGroups(),this.$eventBus.emit("reloadMenu")}).catch(t=>{this.$handleError(t)})})},getTypeTitle(e){return e=="community"?"space":e},dropGroup({index:e}){const t=this.groups.splice(e,1)[0];this.groups.splice(e,0,t),this.resetGroupsIndexes(),this.draggingIndexGroup=null},dropSpace({newItems:e,index:t}){const n=e[0].parent_id;let o=this.groups.find(i=>Number(i.id)===Number(n)).spaces||[];const r=o.splice(t,1)[0];o.splice(t,0,r);let s=[];cu(o,(i,l)=>{s.push(i.id)}),this.resetSpaceIndexes(s),this.draggingIndexSpace=null}},mounted(){this.getGroups()}},Vxe={class:"settings_router"},Bxe={class:"fcom_communities"},zxe={class:"fcom_card_sections"},jxe={class:"fcom_card_section_heading"},Hxe={class:"fcom_section_primary_item"},Uxe={class:"fcom_section_primary_item_title"},Wxe=b("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1),Kxe={class:"fcom_heading_item"},qxe={class:"fcom_section_item_actions"},Gxe={class:"fcom_section_items"},Yxe={class:"fcom_section_item_title"},Zxe=b("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1),Jxe={class:"fcom_heading_item"},Xxe={class:"fcom_section_item_actions"},Qxe=["href"];function eMe(e,t,n,o,r,s){const i=pt,l=lo,a=mh,u=re("MoveGroupPopup"),c=re("FluentDnD"),d=re("layout"),f=re("app-layout"),p=re("create-group-form"),h=Ql,m=zt("loading");return C(),M(fe,null,[k(f,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:$(()=>[k(d,{wrapper_class:"no_bg_layout",title:e.$t("All Space Groups")},{actions:$(()=>[k(i,{class:"fcom_primary_button",onClick:t[0]||(t[0]=y=>r.createGroupModal=!0)},{default:$(()=>[ne(A(e.$t("Create New Group")),1)]),_:1})]),default:$(()=>[b("div",Vxe,[He((C(),M("div",Bxe,[b("div",zxe,[He((C(),M("div",jxe,[b("h3",null,A(e.$_n("%d Group","%d Groups",r.groups.length))+" • "+A(e.$_n("%d Space","%d Spaces",s.communityCounts)),1)])),[[m,r.loading]]),r.loading?(C(),q(l,{key:0,animated:!0,row:5})):W("",!0),k(c,{items:r.groups,onDrop:s.dropGroup},{item:$(({data:y})=>[b("div",Hxe,[b("div",Uxe,[Wxe,b("div",Kxe,[b("h4",null,A(e.$t("Group:"))+" "+A(y.title),1)])]),b("div",qxe,[k(i,{class:"fcom_secondary_button",onClick:v=>s.initEditGroup(y)},{default:$(()=>[ne(A(e.$t("Edit Info")),1)]),_:2},1032,["onClick"]),k(i,{onClick:v=>s.removeGroup(y),type:"danger",plain:""},{default:$(()=>[ne(A(e.$t("Delete")),1)]),_:2},1032,["onClick"])])]),b("div",Gxe,[k(c,{items:y.spaces,"item-class":"fcom_section_item","item-style":"padding: 15px 15px 15px 35px",onDrop:s.dropSpace},{item:$(({data:v,index:w})=>[b("div",Yxe,[Zxe,b("p",Jxe,[ne(A(v.title)+" ",1),v.status!="published"?(C(),q(a,{key:0,type:"info"},{default:$(()=>[ne(A(e.$labelize(v.status)),1)]),_:2},1024)):W("",!0),k(a,null,{default:$(()=>[ne(A(s.getTypeTitle(v.type)),1)]),_:2},1024)])]),b("div",Xxe,[b("a",{class:"el-button el-button--small el-button--secondary",href:v.permalink},A(e.$t("View")),9,Qxe),k(u,{groups:r.groups,currentSpace:v,openedSpaceId:r.openedSpaceId,onTogglePopover:s.handleTogglePopover,onMoved:t[1]||(t[1]=_=>s.getGroups())},null,8,["groups","currentSpace","openedSpaceId","onTogglePopover"])])]),_:2},1032,["items","onDrop"])])]),_:1},8,["items","onDrop"])])])),[[m,r.loading]])])]),_:1},8,["title"])]),_:1}),k(h,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,size:e.dialogWidth,modelValue:r.createGroupModal,"onUpdate:modelValue":t[3]||(t[3]=y=>r.createGroupModal=y),direction:"rtl"},{header:$(()=>[b("h4",null,A(e.$t("Create a new Group")),1)]),default:$(()=>[r.createGroupModal?(C(),q(p,{key:0,group:r.editingGroup,onCompleted:t[2]||(t[2]=y=>{r.createGroupModal=!1,s.getGroups()})},null,8,["group"])):W("",!0)]),_:1},8,["size","modelValue"])],64)}const tMe=qe(Fxe,[["render",eMe]]),nMe={name:"CreateSpaceForm",components:{TopicSelector:fL,SlugInput:Pk,ImageUploader:Md,LogoEmojiSelector:Ev},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:R1e,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:D1e,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}},oMe={style:{"font-weight":"bold"}},rMe={style:{"font-weight":"bold"}},sMe={class:"fcom_help_text"},iMe=["href"],lMe={class:"fcom_help_text"},aMe={key:0},uMe={key:1},cMe={key:1},dMe=["href"];function fMe(e,t,n,o,r,s){const i=re("logo-emoji-selector"),l=At,a=io,u=re("SlugInput"),c=Ss,d=vr,f=U0,p=Eu,h=re("topic-selector"),m=Ed,y=re("ImageUploader"),v=pt,w=so,_=zt("loading");return e.hasFeature("has_course")?(C(),q(w,{key:0,onSubmit:t[11]||(t[11]=et(S=>e.doNothing(),["prevent"])),modelValue:r.form,"onUpdate:modelValue":t[12]||(t[12]=S=>r.form=S),"label-position":"top"},{default:$(()=>[k(a,{label:e.$t("Course Title")},{default:$(()=>[k(l,{type:"text",placeholder:e.$t("Your Course Title"),modelValue:r.form.title,"onUpdate:modelValue":t[1]||(t[1]=S=>r.form.title=S)},{prepend:$(()=>{var S,x;return[r.dataLoaded?(C(),q(i,{key:0,custom_svg:!0,onUpdate:t[0]||(t[0]=E=>{r.form.settings.emoji=E.emoji,r.form.logo=E.logo,r.form.settings.shape_svg=E.shape_svg}),config:{logo:r.form.logo,emoji:(S=r.form.settings)==null?void 0:S.emoji,shape_svg:((x=r.form.settings)==null?void 0:x.shape_svg)||""}},null,8,["config"])):W("",!0)]}),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),k(a,{label:e.$t("Slug")},{default:$(()=>[k(u,{disabled:!!r.form.id,modelValue:r.form.slug,"onUpdate:modelValue":t[2]||(t[2]=S=>r.form.slug=S),placeholder:e.$t("Course Slug (no space or special chars)")},null,8,["disabled","modelValue","placeholder"]),b("pre",null,A(r.form.slug),1)]),_:1},8,["label"]),k(a,{label:e.$t("Short Description")},{default:$(()=>[k(l,{type:"textarea",rows:3,placeholder:e.$t("Course Description"),modelValue:r.form.description,"onUpdate:modelValue":t[3]||(t[3]=S=>r.form.description=S)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),k(a,{label:e.$t("Privacy")},{default:$(()=>[k(d,{"popper-class":"rich_select",modelValue:r.form.privacy,"onUpdate:modelValue":t[4]||(t[4]=S=>r.form.privacy=S),placeholder:e.$t("Select Privacy")},{default:$(()=>[(C(!0),M(fe,null,nt(r.privacies,(S,x)=>(C(),q(c,{key:x,label:S.label,value:x},{default:$(()=>[b("span",oMe,A(S.label),1),b("p",null,A(S.description),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),r.form.privacy!="public"?(C(),q(a,{key:0,label:e.$t("Lock Screen Type")},{default:$(()=>[k(p,{modelValue:r.form.settings.custom_lock_screen,"onUpdate:modelValue":t[5]||(t[5]=S=>r.form.settings.custom_lock_screen=S)},{default:$(()=>[k(f,{value:"yes"},{default:$(()=>[ne(A(e.$t("Custom")),1)]),_:1}),k(f,{value:"no"},{default:$(()=>[ne(A(e.$t("Default")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])):W("",!0),k(a,{label:e.$t("Menu Group")},{default:$(()=>[k(d,{modelValue:r.form.parent_id,"onUpdate:modelValue":t[6]||(t[6]=S=>r.form.parent_id=S)},{default:$(()=>[(C(!0),M(fe,null,nt(e.appVars.space_groups,S=>(C(),q(c,{key:S.id,value:S.id.toString(),label:S.title},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),k(a,{label:e.$t("Enrollment Type")},{default:$(()=>[k(d,{"popper-class":"rich_select",modelValue:r.form.course_type,"onUpdate:modelValue":t[7]||(t[7]=S=>r.form.course_type=S),placeholder:e.$t("Select Type")},{default:$(()=>[(C(!0),M(fe,null,nt(r.courseTypes,(S,x)=>(C(),q(c,{key:x,label:S.label,value:x},{default:$(()=>[b("span",rMe,A(S.label),1),b("p",null,A(S.description),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),k(a,{label:e.$t("Status")},{default:$(()=>[k(p,{modelValue:r.form.status,"onUpdate:modelValue":t[8]||(t[8]=S=>r.form.status=S)},{default:$(()=>[k(f,{value:"published"},{default:$(()=>[ne(A(e.$t("Published")),1)]),_:1}),k(f,{value:"draft"},{default:$(()=>[ne(A(e.$t("Draft")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.has_pro&&r.form.id?(C(),q(a,{key:1,label:e.$t("Topic navigation")},{default:$(()=>[k(h,{modelValue:r.form.category_ids,"onUpdate:modelValue":t[9]||(t[9]=S=>r.form.category_ids=S)},null,8,["modelValue"]),b("div",sMe,[b("p",null,[ne(A(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),b("a",{target:"_blank",rel:"noopener",href:e.$getRouteLink("admin/settings/topics-settings")},A(e.$t("Manage all topics.")),9,iMe)])])]),_:1},8,["label"])):W("",!0),k(a,{label:e.$t("Thumbnail / Open Graph Image (Recommended Size: 1200 x 630)")},{default:$(()=>[r.form.cover_photo?(C(),q(m,{key:0,alt:e.$t("Cover Photo"),src:r.form.cover_photo,style:{"max-width":"100px"}},null,8,["alt","src"])):W("",!0),k(y,{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"]),b("div",lMe,[b("p",null,A(e.$t("Will be used on course card preview and social sharing preview.")),1)])]),_:1},8,["label"]),k(a,null,{default:$(()=>[He((C(),q(v,{class:"fcom_primary_button",disabled:r.saving,onClick:t[10]||(t[10]=S=>s.submit())},{default:$(()=>[r.form.id?(C(),M("span",aMe,A(e.$t("Update Info")),1)):(C(),M("span",uMe,A(e.$t("Create")),1))]),_:1},8,["disabled"])),[[_,r.saving]])]),_:1})]),_:1},8,["modelValue"])):(C(),M("div",cMe,[b("p",null,A(e.$t("Course Module is disabled. Please enable the course module first")),1),b("a",{class:"el-button el-button--default fcom_primary_button",href:e.$getRouteLink("admin/settings/features")},A(e.$t("Go to features settings")),9,dMe)]))}const pL=qe(nMe,[["render",fMe]]),pMe={name:"GroupIcon"},hMe={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},mMe=b("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),gMe=b("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),vMe=b("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),yMe=b("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),_Me=[mMe,gMe,vMe,yMe];function bMe(e,t,n,o,r,s){return C(),M("svg",hMe,_Me)}const wMe=qe(pMe,[["render",bMe]]),CMe={name:"ManageCourses",components:{CreateCourseForm:pL,AppLayout:si,Layout:ri,GroupIcon:wMe},data(){return{courses:[],loading:!0,pagination:{current_page:1,per_page:50,total:0},type:"all",newCourseModal:!1,is_admin:!1}},methods:{fetchCourses(){this.loading=!0,this.$get("admin/courses",{page:this.pagination.current_page,per_page:this.pagination.per_page,type:this.type}).then(e=>{this.courses=e.courses.data,this.is_admin=e.is_admin,this.pagination.total=e.courses.total}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},getExcerpt(e,t=200){if(!e)return"";let n=e.replace(/(<([^>]+)>)/ig,"");return n.length>t&&(n=n.substring(0,t)+"..."),n},navigateToEditLessons(e){this.$router.push({name:"edit_lessons",params:{course_id:e}})}},mounted(){this.fetchCourses()}},kMe={class:"fcom_courses"},SMe={class:"fcom_box_card_list"},$Me=["onClick"],EMe=["src"],xMe={key:1,class:"fcom_no_image"},MMe={class:"fcom_box_card_info"},TMe={class:"fcom_box_card_name"},OMe={class:"fcom_box_card_by"},IMe={class:"fcom_box_card_details"},AMe={class:"inline_details"},NMe=b("span",{class:"fcom_inline_separator"},null,-1),PMe={class:"inline_details"},LMe={key:0,class:"fcom_box_card_description"},RMe={class:"fcom_box_card_action"},DMe=["onClick"];function FMe(e,t,n,o,r,s){const i=pt,l=mh,a=re("router-link"),u=re("GroupIcon"),c=Ne,d=re("layout"),f=re("app-layout"),p=re("create-course-form"),h=Ql,m=zt("loading");return C(),M(fe,null,[k(f,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:$(()=>[k(d,{wrapper_class:"no_bg_layout",title:e.$t("Manage Courses")},{actions:$(()=>[k(i,{class:"fcom_primary_button",onClick:t[0]||(t[0]=y=>r.newCourseModal=!0)},{default:$(()=>[ne(A(e.$t("Add Course")),1)]),_:1})]),default:$(()=>[He((C(),M("div",kMe,[b("div",SMe,[(C(!0),M(fe,null,nt(r.courses,y=>(C(),M("div",{key:y.id,class:"fcom_each_box_card"},[b("div",{class:"fcom_box_card_avatar",onClick:v=>s.navigateToEditLessons(y.id)},[y.cover_photo?(C(),M("img",{key:0,src:y.cover_photo,alt:""},null,8,EMe)):(C(),M("div",xMe))],8,$Me),b("div",MMe,[b("div",TMe,[k(a,{class:"course_route",to:{name:"edit_lessons",params:{course_id:y.id}}},{default:$(()=>[ne(A(s.getExcerpt(y.title,20))+" ",1),y.status=="draft"?(C(),q(l,{key:0,type:"info"},{default:$(()=>[ne(A(y.status),1)]),_:2},1024)):W("",!0)]),_:2},1032,["to"]),b("span",OMe,A(e.$t("by %s",y==null?void 0:y.owner.display_name)),1)]),b("div",IMe,[b("div",AMe,[b("span",null,A(e.$_n("%d Section","%d Sections",y.sectionsCount)),1),NMe,b("span",null,A(e.$_n("%d Lesson","%d Lessons",y.lessonsCount)),1)]),b("div",PMe,[k(c,null,{default:$(()=>[k(u)]),_:1}),ne(" "+A(e.$_n("%d student","%d students",y.students_count||0)),1)])]),y.description?(C(),M("div",LMe,A(s.getExcerpt(y.description,40)),1)):W("",!0),b("div",RMe,[b("button",{class:"fcom_card_button",onClick:v=>s.navigateToEditLessons(y.id)},A(e.$t("Manage")),9,DMe)])])]))),128))])])),[[m,r.loading]])]),_:1},8,["title"])]),_:1}),k(h,{"close-on-click-modal":!1,"append-to-body":!0,size:e.drawerWidth,modelValue:r.newCourseModal,"onUpdate:modelValue":t[2]||(t[2]=y=>r.newCourseModal=y),direction:"rtl"},{header:$(()=>[b("h4",null,A(e.$t("Create a new course")),1)]),default:$(()=>[r.newCourseModal?(C(),q(p,{key:0,onCompleted:t[1]||(t[1]=y=>{r.newCourseModal=!1})})):W("",!0)]),_:1},8,["size","modelValue"])],64)}const VMe=qe(CMe,[["render",FMe]]),BMe={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 zMe(e,t,n,o,r,s){const i=Ed,l=pt,a=DO,u=re("CloseBold"),c=Ne;return C(),M(fe,null,[k(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:$(()=>[he(e.$slots,"trigger",{},()=>[he(e.$slots,"default",{},()=>[r.imageUrl?(C(),q(i,{key:0,alt:e.$t("Image Preview"),src:r.imageUrl},null,8,["alt","src"])):(C(),q(l,{key:1,class:"fcom_btn_upload",text:""},{default:$(()=>[ne(A(n.button_text),1)]),_:1}))])])]),_:3},8,["action","headers","multiple","data","on-success","on-error"]),r.imageUrl&&n.can_remove?(C(),q(l,{key:0,class:"fcom_bg_remove",text:"",size:"small",onClick:s.removeImage},{default:$(()=>[k(c,null,{default:$(()=>[k(u)]),_:1})]),_:1},8,["onClick"])):W("",!0)],64)}const jMe=qe(BMe,[["render",zMe]]),HMe={name:"LockscreenMeta",components:{BgImageUpload:jMe},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}}},UMe={key:0,class:"fcom_lockscreen_meta"},WMe={class:"fcom_meta_section lockscreen_meta"},KMe={class:"fcom_description"},qMe={class:"fcom_meta_section lockscreen_meta"},GMe={class:"fcom_meta_label"},YMe={class:"fcom_meta_content"},ZMe={class:"fcom_meta_block"},JMe={class:"fcom_block_label"},XMe={class:"fcom_meta_sorting"},QMe={class:"fcom_block_action"},eTe={key:1,class:"fcom_lockscreen_meta"},tTe={class:"fcom_edit_title"},nTe={class:"fcom_edit_content"},oTe={class:"fcom_color_input_wrap"},rTe={class:"fcom_color_input_wrap"},sTe={class:"fcom_color_input_wrap"},iTe={class:"fcom_color_input_wrap"},lTe={class:"fcom_color_input_wrap"},aTe={key:1,class:"fcom_description"};function uTe(e,t,n,o,r,s){const i=Ne,l=re("Top"),a=re("Bottom"),u=re("EditPen"),c=re("Hide"),d=re("View"),f=re("Back"),p=At,h=io,m=so,y=IO,v=re("BgImageUpload"),w=R3,_=OO;return r.editing?(C(),M("div",eTe,[b("div",tTe,[k(i,{onClick:s.backToFields},{default:$(()=>[k(f)]),_:1},8,["onClick"]),b("p",null,A(r.editingField.label),1)]),b("div",nTe,[r.editingField.type=="image"?(C(),q(_,{key:0,modelValue:r.editTab,"onUpdate:modelValue":t[17]||(t[17]=S=>r.editTab=S),class:"demo-tabs"},{default:$(()=>[k(y,{label:e.$t("Content"),name:"content"},{default:$(()=>[k(m,{onSubmit:t[4]||(t[4]=et(S=>e.doNothing(),["prevent"])),model:r.editingField,"label-position":"top",class:"form-container"},{default:$(()=>[k(h,{label:e.$t("Heading")},{default:$(()=>[k(p,{modelValue:r.editingField.heading,"onUpdate:modelValue":t[0]||(t[0]=S=>r.editingField.heading=S),class:"ttt",placeholder:e.$t("Heading")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),k(h,{label:e.$t("Description")},{default:$(()=>[k(p,{modelValue:r.editingField.description,"onUpdate:modelValue":t[1]||(t[1]=S=>r.editingField.description=S),type:"textarea",placeholder:e.$t("Description")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),k(h,{label:e.$t("Button Label")},{default:$(()=>[k(p,{modelValue:r.editingField.button_text,"onUpdate:modelValue":t[2]||(t[2]=S=>r.editingField.button_text=S),placeholder:e.$t("Button Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),k(h,{label:e.$t("Button Link")},{default:$(()=>[k(p,{modelValue:r.editingField.button_link,"onUpdate:modelValue":t[3]||(t[3]=S=>r.editingField.button_link=S)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["label"]),k(y,{label:e.$t("Design"),name:"design"},{default:$(()=>[k(m,{onSubmit:t[16]||(t[16]=et(S=>e.doNothing(),["prevent"])),model:r.editingField,"label-position":"top",class:"form-container"},{default:$(()=>[k(h,{label:e.$t("Background Image"),class:"fcom_bg_image"},{default:$(()=>[k(v,{modelValue:r.editingField.background_image,"onUpdate:modelValue":t[5]||(t[5]=S=>r.editingField.background_image=S),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"]),k(h,{label:e.$t("Overlay Color")},{default:$(()=>[b("div",oTe,[k(w,{modelValue:r.editingField.overlay_color,"onUpdate:modelValue":t[6]||(t[6]=S=>r.editingField.overlay_color=S)},null,8,["modelValue"]),k(p,{modelValue:r.editingField.overlay_color,"onUpdate:modelValue":t[7]||(t[7]=S=>r.editingField.overlay_color=S)},null,8,["modelValue"])])]),_:1},8,["label"]),k(h,{label:e.$t("Heading Color")},{default:$(()=>[b("div",rTe,[k(w,{modelValue:r.editingField.heading_color,"onUpdate:modelValue":t[8]||(t[8]=S=>r.editingField.heading_color=S)},null,8,["modelValue"]),k(p,{modelValue:r.editingField.heading_color,"onUpdate:modelValue":t[9]||(t[9]=S=>r.editingField.heading_color=S)},null,8,["modelValue"])])]),_:1},8,["label"]),k(h,{label:e.$t("Text Color")},{default:$(()=>[b("div",sTe,[k(w,{modelValue:r.editingField.text_color,"onUpdate:modelValue":t[10]||(t[10]=S=>r.editingField.text_color=S)},null,8,["modelValue"]),k(p,{modelValue:r.editingField.text_color,"onUpdate:modelValue":t[11]||(t[11]=S=>r.editingField.text_color=S)},null,8,["modelValue"])])]),_:1},8,["label"]),k(h,{label:e.$t("Button Label")},{default:$(()=>[b("div",iTe,[k(w,{modelValue:r.editingField.button_text_color,"onUpdate:modelValue":t[12]||(t[12]=S=>r.editingField.button_text_color=S)},null,8,["modelValue"]),k(p,{modelValue:r.editingField.button_text_color,"onUpdate:modelValue":t[13]||(t[13]=S=>r.editingField.button_text_color=S)},null,8,["modelValue"])])]),_:1},8,["label"]),k(h,{label:e.$t("Button Background")},{default:$(()=>[b("div",lTe,[k(w,{modelValue:r.editingField.button_color,"onUpdate:modelValue":t[14]||(t[14]=S=>r.editingField.button_color=S),"show-alpha":""},null,8,["modelValue"]),k(p,{modelValue:r.editingField.button_color,"onUpdate:modelValue":t[15]||(t[15]=S=>r.editingField.button_color=S)},null,8,["modelValue"])])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["label"])]),_:1},8,["modelValue"])):r.editingField.type=="block"?(C(),M("div",aTe,A(e.$t("Edit the field from block editor ")),1)):W("",!0)])])):(C(),M("div",UMe,[b("div",WMe,[b("div",KMe,[b("p",null,A(e.$t("This page is only visible to non-members viewing a private space.")),1)])]),b("div",qMe,[b("div",GMe,A(e.$t("Page Blocks")),1),b("div",YMe,[b("ul",ZMe,[(C(!0),M(fe,null,nt(s.lockscreenFields,(S,x)=>(C(),M("li",{class:D(["fcom_block_list",{block_hidden:S.hidden}])},[b("div",JMe,[k(i,{class:"fcom_el_icon"},{default:$(()=>[(C(),q(Lt(s.getFieldIcon(S))))]),_:2},1024),b("p",null,A(S.label),1)]),b("div",XMe,[k(i,{onClick:E=>s.moveUp(x)},{default:$(()=>[k(l)]),_:2},1032,["onClick"]),k(i,{onClick:E=>s.moveDown(x)},{default:$(()=>[k(a)]),_:2},1032,["onClick"])]),b("div",QMe,[k(i,{onClick:E=>s.updateField(S)},{default:$(()=>[k(u)]),_:2},1032,["onClick"]),S.hidden?(C(),q(i,{key:0,onClick:E=>s.toggleHidden(S)},{default:$(()=>[k(c)]),_:2},1032,["onClick"])):(C(),q(i,{key:1,onClick:E=>s.toggleHidden(S)},{default:$(()=>[k(d)]),_:2},1032,["onClick"]))])],2))),256))])])])]))}const cTe=qe(HMe,[["render",uTe]]),dTe={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)}},fTe={class:"fcom_block_editor"};function pTe(e,t,n,o,r,s){const i=lo;return C(),M("div",fTe,[He(b("div",null,[b("textarea",{ref:"block_editor",id:"fcom_block_editor",name:"block_editor"},A(r.html),513)],512),[[en,r.all_loaded]]),r.all_loaded?W("",!0):(C(),q(i,{key:0,class:"white_loaded",rows:7,animated:!0}))])}const hL=qe(dTe,[["render",pTe]]),hTe={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}}},mTe={key:0},gTe=["innerHTML"],vTe=["href"],yTe={key:0,class:"feed_media_image"},_Te=["src"],bTe={key:1,class:"feed_media_content"},wTe={class:"media_domain"},CTe={class:"feed_media_title"};function kTe(e,t,n,o,r,s){const i=lo,l=Ed;return C(),M("div",{class:D(["feed_media","feed_media_"+s.media.type])},[s.media.type=="oembed"||s.media.type=="iframe_html"?(C(),M(fe,{key:0},[s.media.content_type=="video"?(C(),M("div",mTe,[b("div",{class:"feed_media_ext_video",innerHTML:s.media.html},null,8,gTe)])):W("",!0)],64)):s.media.type=="image"||s.media.is_uploaded?(C(),M("div",{key:1,class:D(["feed_media_provider_"+s.media.provider,"feed_media_image feed_custom_uploaded"])},[k(l,{alt:"",style:Qe({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:D("fcom_media_provider_"+s.media.provider),fit:"scale-down"},{placeholder:$(()=>[k(i,{animated:!0})]),_:1},8,["style","src","previewSrcList","class"])],2)):(C(),M("a",{key:2,href:s.media.url,target:"_blank",rel:"noopener",class:"feed_media_link"},[s.media.image?(C(),M("div",yTe,[b("img",{alt:"",src:s.media.image},null,8,_Te)])):W("",!0),s.media.title?(C(),M("div",bTe,[b("div",wTe,A(s.getDomainName(s.media.url)),1),b("div",CTe,A(s.media.title),1),W("",!0)])):W("",!0)],8,vTe))],2)}const Mv=qe(hTe,[["render",kTe]]),STe={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:Mv},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()}},$Te={key:0},ETe={key:0,class:"fcom_media_editor_actions"},xTe={key:1,class:"fcom_media_editor fcom_media_embeder"},MTe={key:2,class:"fcom_course_media"};function TTe(e,t,n,o,r,s){const i=pt,l=L3,a=Eu,u=At,c=re("media-preview"),d=zt("loading");return r.appReady?He((C(),M("div",$Te,[n.has_iframe?(C(),M("div",ETe,[s.showPreview?(C(),q(i,{key:0,onClick:t[0]||(t[0]=f=>r.showInput=!0),type:"danger",size:"small",text:""},{default:$(()=>[ne(A(e.$t("Edit media")),1)]),_:1})):(C(),q(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:$(()=>[k(l,{label:e.$t("Oembed"),value:"oembed"},null,8,["label"]),k(l,{label:e.$t("Custom HTML Code"),value:"iframe_html"},null,8,["label"])]),_:1},8,["modelValue"]))])):W("",!0),s.showPreview?(C(),M("div",MTe,[k(c,{media_item:n.media},null,8,["media_item"])])):(C(),M("div",xTe,[n.media.type=="iframe_html"&&n.has_iframe?(C(),M(fe,{key:0},[b("h3",null,A(e.$t("Add Video from custom HTML Code")),1),k(u,{rows:5,modelValue:n.media.html,"onUpdate:modelValue":t[3]||(t[3]=f=>n.media.html=f),type:"textarea",placeholder:e.$t("Paste an iframe code")},null,8,["modelValue","placeholder"]),k(i,{style:{"margin-top":"20px"},onClick:t[4]||(t[4]=f=>r.showInput=!1),class:"fcom_secondary_button"},{default:$(()=>[ne(A(e.$t("Embed")),1)]),_:1})],64)):(C(),M(fe,{key:1},[b("h3",null,A(n.box_title||e.$t("Featured media")),1),b("p",null,A(n.box_description||e.$t("Embed from Vimeo, YouTube, Wistia and more")),1),k(u,{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:$(()=>[k(i,{onClick:s.fetchData,class:"fcom_primary_button"},{default:$(()=>[ne(A(e.$t("Embed")),1)]),_:1},8,["onClick"])]),_:1},8,["modelValue","placeholder"])],64))]))])),[[d,r.fetching]]):W("",!0)}const Lk=qe(STe,[["render",TTe]]),OTe={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)}}},ITe={class:"fcom_course_sections"},ATe={class:"fcom_course_intro"},NTe={class:"fcom_course_labels"},PTe={class:"fcom_course_info"},LTe=b("span",null," • ",-1),RTe={class:"fcom_card_sections"},DTe={class:"fcom_section_items"},FTe={key:0,class:"fcom_section_primary_item"},VTe={class:"fcom_section_primary_item_title"},BTe={class:"fcom_section_primary_item_actions"},zTe={class:"fcom_meta_text"},jTe={class:"fcom_section_item_title"},HTe={class:"fcom_heading_item clickable"};function UTe(e,t,n,o,r,s){const i=re("ArrowRight"),l=re("ArrowDown"),a=Ne,u=re("Lock");return C(),M("div",ITe,[b("div",ATe,[b("div",NTe,[b("h3",null,A(e.$t("Course content")),1),b("p",PTe,[ne(A(e.$t("%s topics",s.sectionsCount))+" ",1),LTe,ne(" "+A(e.$t("%s lessons",s.lessonsCount)),1)])])]),b("div",RTe,[b("div",DTe,[(C(!0),M(fe,null,nt(n.sections,c=>(C(),M("div",{key:c.id,class:"fcom_section_primary"},[c.lessons.length?(C(),M("div",FTe,[b("div",VTe,[k(a,{class:"clickable",onClick:d=>c.is_closed=!c.is_closed},{default:$(()=>[c.is_closed?(C(),q(i,{key:0})):(C(),q(l,{key:1}))]),_:2},1032,["onClick"]),b("h4",null,A(c.title),1)]),b("div",BTe,[b("span",zTe,A(e.$t("%d lessons",c.lessons.length)),1)])])):W("",!0),c.is_closed?W("",!0):(C(!0),M(fe,{key:1},nt(c.lessons,d=>(C(),M("div",{key:d.id,class:"fcom_section_item"},[b("div",jTe,[b("p",HTe,[k(a,null,{default:$(()=>[k(u)]),_:1}),ne(" "+A(d.title),1)])])]))),128))]))),128))])])])}const WTe=qe(OTe,[["render",UTe]]),KTe={name:"LockScreenEditor",props:["title","lockscreen","sections","saving","loading"],emits:["save","close"],components:{LessonEditor:WTe,MediaEmbeder:Lk,BlockEditor:hL,LockscreenMeta:cTe},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")}}},qTe={class:"fcom_editor_topbar"},GTe={class:"fcom_editor_content"},YTe={class:"fcom_item"},ZTe={class:"fcom_content"},JTe=["onInput"],XTe=["onInput"],QTe=["onInput"],eOe={key:1,class:"fcom_content_wrap"},tOe={key:0,id:"fcomBlockContent"},nOe=["onClick","innerHTML"],oOe={key:2,class:"fcom_content_wrap"};function rOe(e,t,n,o,r,s){const i=re("lockscreen-meta"),l=jT,a=re("Lock"),u=Ne,c=re("block-editor"),d=re("lesson-editor"),f=lo,p=ks,h=W0;return C(),M(fe,null,[k(l,{class:"fcol_full_editor_side lockscreen_editor",width:"250px"},{default:$(()=>[he(e.$slots,"before_meta"),k(i,{lockscreen:n.lockscreen,onEditField:s.updateEditField},null,8,["lockscreen","onEditField"])]),_:3}),k(h,{class:"fcom_full_editor_main lockscreen_editor"},{default:$(()=>[k(p,null,{default:$(()=>[b("div",qTe,[k(u,null,{default:$(()=>[k(a)]),_:1}),b("h3",null,A(n.title),1)]),b("div",GTe,[(C(!0),M(fe,null,nt(s.lockscreenFields,m=>{var y;return C(),M("div",YTe,[m.type=="image"?(C(),M("div",{key:0,class:"fcom_image_wrap",style:Qe(s.imageStyles(m))},[b("div",ZTe,[b("h2",{style:Qe(s.headingStyles(m)),contenteditable:"true",onInput:v=>s.updateHeading(v,m)},A(m.heading),45,JTe),b("p",{style:Qe(s.descriptionStyles(m)),contenteditable:"true",onInput:v=>s.updateDescription(v,m)},A(m.description),45,XTe),b("button",{class:"fcom_btn",style:Qe(s.buttonStyles(m)),contenteditable:"true",onInput:v=>s.updateButtonLabel(v,m)},A(m.button_text),45,QTe)])],4)):W("",!0),m.type=="block"?(C(),M("div",eOe,[((y=r.editingField)==null?void 0:y.type)=="block"?(C(),M("div",tOe,[k(c,{modelValue:m.content,"onUpdate:modelValue":v=>m.content=v},null,8,["modelValue","onUpdate:modelValue"])])):(C(),M("div",{key:1,onClick:v=>s.visibleBlock(m),innerHTML:m.content},null,8,nOe))])):W("",!0),m.type=="lesson"?(C(),M("div",oOe,[n.loading?(C(),q(f,{key:1,rows:5,animated:!0})):(C(),q(d,{key:0,sections:n.sections},null,8,["sections"]))])):W("",!0)])}),256))])]),_:1})]),_:1})],64)}const sOe=qe(KTe,[["render",rOe]]),iOe={name:"CourseLockscreen",props:["spaceProfile","savingCount"],emits:["close"],components:{LockScreenEditor:sOe},data(){return{saving:!1,loading:!1,sections:[],lockscreen:null}},watch:{savingCount(){this.saveChanges(!0)}},methods:{getSections(){this.loading=!0,this.$get("admin/courses/"+this.spaceProfile.id+"/sections",{conditions:["only_published"],with_lock_screen:!0}).then(e=>{this.sections=e.sections,this.lockscreen=e.lockscreen}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},saveChanges(e=!1){this.lockscreen&&(this.saving=!0,this.$put("admin/courses/"+this.spaceProfile.id+"/lockscreens",{lockscreen:this.lockscreen}).then(t=>{this.$notify.success(t.message),e&&this.$emit("close")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1}))}},mounted(){this.getSections()}},lOe={key:0,class:"fcom_lockscreen_meta"},aOe={class:"fcom_description"};function uOe(e,t,n,o,r,s){const i=re("lock-screen-editor");return r.lockscreen?(C(),q(i,{key:0,title:n.spaceProfile.title,lockscreen:r.lockscreen,sections:r.sections,saving:r.saving,loading:r.loading,onSave:s.saveChanges,onClose:t[0]||(t[0]=l=>e.$emit("close"))},{before_meta:$(()=>[n.spaceProfile.settings.custom_lock_screen!="yes"?(C(),M("div",lOe,[b("div",aOe,[b("p",null,A(e.$t("__LOCK_SCRREN_DESC")),1)])])):W("",!0)]),_:1},8,["title","lockscreen","sections","saving","loading","onSave"])):W("",!0)}const cOe=qe(iOe,[["render",uOe]]),dOe={name:"ManageSpaceLinks",components:{MenuGroupSettings:dL},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})}}},fOe={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},pOe={class:"fcom_card_sections"};function hOe(e,t,n,o,r,s){const i=re("menu-group-settings"),l=ks,a=W0;return C(),q(a,{class:"fcom_full_editor_main lockscreen_editor"},{default:$(()=>[k(l,null,{default:$(()=>[b("div",fOe,[b("div",pOe,[k(i,{custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:t[0]||(t[0]=u=>s.saveMenuItems()),title:e.$t("Manage Links"),menuItems:n.spaceProfile.settings.links},null,8,["title","menuItems"])])])]),_:1})]),_:1})}const mOe=qe(dOe,[["render",hOe]]),gOe={name:"SpaceCustomizer",props:["course"],emits:["close","completed"],components:{ManageSpaceLinks:mOe,CourseLockscreen:cOe,CreateCourseForm:pL},data(){return{saving:!1,currentTab:"general",savingCount:0}},methods:{saveChanges(){this.savingCount=this.savingCount+1}}},vOe={key:0,class:"fcom_full_editor"},yOe={class:"fcom_full_editor_header"},_Oe={class:"fcom_editor_menu object_menu"},bOe={class:"fcom_space_menu_ul"},wOe={class:"full_editor_actions"},COe={style:{"max-width":"600px",padding:"20px",margin:"0 auto"}};function kOe(e,t,n,o,r,s){const i=re("ArrowLeft"),l=Ne,a=pt,u=HT,c=re("create-course-form"),d=ks,f=W0,p=re("course-lockscreen"),h=re("manage-space-links"),m=zT,y=zt("loading");return n.course.id?(C(),M("div",vOe,[k(m,null,{default:$(()=>[k(u,{class:"fcom_full_editor_header_wrap"},{default:$(()=>[b("div",yOe,[b("div",{onClick:t[0]||(t[0]=v=>e.$emit("completed")),class:"fcom_back_header"},[k(l,null,{default:$(()=>[k(i)]),_:1}),ne(" "+A(n.course.title),1)]),b("div",_Oe,[b("ul",bOe,[b("li",{onClick:t[1]||(t[1]=v=>r.currentTab="general")},[b("a",{class:D({"router-link-exact-active":r.currentTab==="general"}),href:"#"},A(e.$t("General Settings")),3)]),n.course.privacy=="private"?(C(),M("li",{key:0,onClick:t[2]||(t[2]=v=>r.currentTab="lock_screen")},[b("a",{class:D({"router-link-exact-active":r.currentTab==="lock_screen"}),href:"#"},A(e.$t("Lock Screen")),3)])):W("",!0),b("li",{onClick:t[3]||(t[3]=v=>r.currentTab="manage_links")},[b("a",{class:D({"router-link-exact-active":r.currentTab==="manage_links"}),href:"#"},A(e.$t("Course Links")),3)])])]),b("div",wOe,[He((C(),q(a,{class:"fcom_primary_button",disabled:r.saving,onClick:s.saveChanges,bg:""},{default:$(()=>[ne(A(e.$t("Save Changes & Close")),1)]),_:1},8,["disabled","onClick"])),[[y,r.saving]])])])]),_:1}),k(m,{class:"fcom_full_editor_container"},{default:$(()=>[r.currentTab=="general"?(C(),q(f,{key:0,class:"fcom_full_editor_main lockscreen_editor"},{default:$(()=>[k(d,null,{default:$(()=>[b("div",COe,[k(c,{onClose:t[4]||(t[4]=v=>e.$emit("close")),savingCount:r.savingCount,course:n.course},null,8,["savingCount","course"])])]),_:1})]),_:1})):r.currentTab=="lock_screen"?(C(),q(p,{key:1,savingCount:r.savingCount,spaceProfile:n.course,onClose:t[5]||(t[5]=v=>e.$emit("close"))},null,8,["savingCount","spaceProfile"])):r.currentTab=="manage_links"?(C(),q(h,{key:2,savingCount:r.savingCount,onClose:t[6]||(t[6]=v=>e.$emit("close")),spaceProfile:n.course},null,8,["savingCount","spaceProfile"])):W("",!0)]),_:1})]),_:1})])):W("",!0)}const SOe=qe(gOe,[["render",kOe]]),$Oe={name:"EditCourseRoute",components:{CourseCustomizer:SOe,AppLayout:si,Layout:ri},props:["course_id"],data(){return{course:{},loading:!0,menuItems:[{name:"course_overview",route:"course_overview",title:this.$t("Overview")},{name:"lessons",route:"edit_lessons",title:this.$t("Lessons")},{name:"students",route:"course_students",title:this.$t("Students")}],customizeCourse:!1}},methods:{fetchCourse(){this.loading=!0,this.$get("admin/courses/"+this.course_id).then(e=>{this.course=e.course}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},initDeleteCourse(){this.$refs.course_actions.hide(),this.$confirm(this.$t("Are you sure you want to delete this course?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete the course"),cancelButtonText:this.$t("No"),type:"warning"}).then(()=>{this.$promt(this.$t("Please Type %s to confirm. Please note, all the lessons, topics, students progress will be deleted.",'"DELETE"'),this.$t("Delete Course"),{confirmButtonText:this.$t("Confirm Delete"),cancelButtonText:this.$t("Cancel")}).then(e=>{e.value==="DELETE"?this.deleteCourse():this.$notify.error(this.$t("The verification string does not match"))})})},deleteCourse(){this.loading=!0,this.$del("admin/courses/"+this.course.id).then(e=>{this.$notify.success(e.message),this.$router.push({name:"manage_courses"})}).catch(e=>{this.$handleError(e),this.loading=!1})},toViewCourse(){let e=this.$getRouteLink("course/:course_slug/lessons",{course_slug:this.course.slug});window.location.href=e}},mounted(){this.fetchCourse()}},EOe={class:"object_menu"},xOe={class:"fcom_space_menu_ul"},MOe={class:"actions_items"},TOe={key:0,class:"white_loaded"},OOe={key:2},IOe={key:0};function AOe(e,t,n,o,r,s){const i=ane,l=lne,a=re("router-link"),u=re("MoreFilled"),c=Ne,d=pt,f=Po,p=lo,h=re("router-view"),m=re("layout"),y=re("app-layout"),v=re("course-customizer");return C(),M(fe,null,[k(y,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:$(()=>[k(m,{wrapper_class:"no_bg_layout",title:e.$t("Courses")},{title:$(()=>[k(l,null,{default:$(()=>[k(i,{to:{name:"manage_courses"}},{default:$(()=>[ne(A(e.$t("Courses")),1)]),_:1}),r.course.id?(C(),q(i,{key:0},{default:$(()=>[ne(A(r.course.title)+" ",1),b("span",{class:"fcom_edit_course fcom_secondary_button clickable",onClick:t[0]||(t[0]=w=>{r.customizeCourse=!0})},A(e.$t("Edit")),1)]),_:1})):W("",!0)]),_:1})]),actions:$(()=>[b("div",EOe,[b("ul",xOe,[(C(!0),M(fe,null,nt(r.menuItems,w=>(C(),M("li",{key:w.name,class:D("course_inner_menu_"+w.name)},[k(a,{to:{name:w.route,params:{course_id:r.course.id}}},{default:$(()=>[ne(A(w.title),1)]),_:2},1032,["to"])],2))),128)),b("li",null,[k(f,{placement:"bottom",ref:"course_actions",persistent:!1,width:200,trigger:"click"},{reference:$(()=>[k(d,{"aria-label":e.$t("View actions"),class:"fcom_dot_menu",size:"small",text:""},{default:$(()=>[k(c,null,{default:$(()=>[k(u)]),_:1})]),_:1},8,["aria-label"])]),default:$(()=>[b("ul",MOe,[b("li",{onClick:t[1]||(t[1]=w=>s.toViewCourse())},A(e.$t("View Course")),1),b("li",{onClick:t[2]||(t[2]=()=>{e.$refs.course_actions.hide(),r.customizeCourse=!0})},A(e.$t("Edit Course")),1),b("li",{onClick:t[3]||(t[3]=(...w)=>s.initDeleteCourse&&s.initDeleteCourse(...w))},A(e.$t("Delete Course")),1)])]),_:1},512)])])])]),default:$(()=>[r.loading?(C(),M("div",TOe,[k(p,{loading:r.loading,animation:"pulse",row:"10"},null,8,["loading"])])):r.course.id?(C(),q(h,{key:1,course:r.course},null,8,["course"])):(C(),M("div",OOe,[b("h3",null,A(e.$t("Sorry, the course can not be loaded")),1)]))]),_:1},8,["title"])]),_:1}),r.customizeCourse&&r.course.id?(C(),M("div",IOe,[(C(),q(_s,{to:"body"},[k(v,{course:r.course,onClose:t[4]||(t[4]=w=>{r.customizeCourse=null,s.fetchCourse()}),onCompleted:t[5]||(t[5]=w=>{r.customizeCourse=null,s.fetchCourse()})},null,8,["course"])]))])):W("",!0)],64)}const NOe=qe($Oe,[["render",AOe]]),POe={name:"LengthInput",props:["modelValue"],data(){return{muinutes:0,seconds:0}},methods:{updateLength(){this.$emit("update:modelValue",parseInt(this.muinutes)*60+parseInt(this.seconds))}},mounted(){this.modelValue&&(this.muinutes=Math.floor(this.modelValue/60)||"",this.seconds=this.modelValue%60||"")}},LOe={class:"fcom_length_input"};function ROe(e,t,n,o,r,s){const i=At;return C(),M("div",LOe,[k(i,{type:"number",modelValue:r.muinutes,"onUpdate:modelValue":t[0]||(t[0]=l=>r.muinutes=l),onChange:s.updateLength,min:0,max:1444,size:"small"},{append:$(()=>[ne(A(e.$t("min")),1)]),_:1},8,["modelValue","onChange"]),k(i,{type:"number",modelValue:r.seconds,"onUpdate:modelValue":t[1]||(t[1]=l=>r.seconds=l),onChange:s.updateLength,min:0,max:59,size:"small"},{append:$(()=>[ne(A(e.$t("sec")),1)]),_:1},8,["modelValue","onChange"])])}const DOe=qe(POe,[["render",ROe]]),FOe={name:"CourseMeta",components:{LengthInput:DOe},props:["lesson"]},VOe={class:"fcom_course_meta"},BOe={class:"fcom_meta_section"},zOe={class:"fcom_meta_label"},jOe={class:"fcom_meta_content"},HOe={key:0,class:"fcom_meta_section"},UOe={class:"fcom_meta_label"},WOe={class:"fcom_meta_content"};function KOe(e,t,n,o,r,s){const i=Hn,l=re("length-input");return C(),M("div",VOe,[b("div",BOe,[b("div",zOe,A(e.$t("Features Settings")),1),b("div",jOe,[k(i,{modelValue:n.lesson.meta.enable_media,"onUpdate:modelValue":t[0]||(t[0]=a=>n.lesson.meta.enable_media=a),"true-value":"yes","false-value":"no"},{default:$(()=>[ne(A(e.$t("Enable Video Embed")),1)]),_:1},8,["modelValue"]),k(i,{modelValue:n.lesson.meta.enable_comments,"onUpdate:modelValue":t[1]||(t[1]=a=>n.lesson.meta.enable_comments=a),"true-value":"yes","false-value":"no"},{default:$(()=>[ne(A(e.$t("Enable Comments")),1)]),_:1},8,["modelValue"])])]),n.lesson.meta.enable_media=="yes"?(C(),M("div",HOe,[b("div",UOe,A(e.$t("Video length")),1),b("div",WOe,[k(l,{modelValue:n.lesson.meta.video_length,"onUpdate:modelValue":t[2]||(t[2]=a=>n.lesson.meta.video_length=a)},null,8,["modelValue"])])])):W("",!0)])}const qOe=qe(FOe,[["render",KOe]]),GOe={name:"LessonEditor",props:["lesson","section","course","editingIndex"],emits:["saved","close","changeLesson"],components:{BlockEditor:hL,MediaEmbeder:Lk,LessonMeta:qOe},data(){return{saving:!1}},methods:{saveData(){this.saving=!0,this.$put("admin/courses/"+this.lesson.space_id+"/lessons/"+this.lesson.id,{lesson:{id:this.lesson.id,parent_id:this.lesson.parent_id,space_id:this.lesson.space_id,title:this.lesson.title,message:this.lesson.message,meta:this.lesson.meta,status:this.lesson.status}}).then(e=>{this.$notify.success(e.message),this.$emit("saved",e.lesson)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){document.body.classList.add("fcom-no-scroll")},beforeUnmount(){document.body.classList.remove("fcom-no-scroll")}},YOe={class:"fcom_full_editor"},ZOe={class:"fcom_full_editor_header"},JOe={key:0},XOe={class:"full_editor_actions"},QOe={class:"fcom_editor_wrap"},eIe={style:{"margin-bottom":"10px"},class:"fcom_lesson_camp"},tIe={class:"fcom_lesson_nav"},nIe={class:"fcom_lesson_title"},oIe={class:"fcom_lesson_content"};function rIe(e,t,n,o,r,s){const i=re("ArrowLeft"),l=Ne,a=re("arrow-down"),u=pt,c=bh,d=wh,f=_h,p=HT,h=re("lesson-meta"),m=jT,y=re("ArrowRight"),v=At,w=re("media-embeder"),_=re("block-editor"),S=ks,x=W0,E=zT,T=zt("loading");return C(),M("div",YOe,[k(E,null,{default:$(()=>[k(p,{class:"fcom_full_editor_header_wrap"},{default:$(()=>[b("div",ZOe,[b("div",{onClick:t[0]||(t[0]=O=>e.$emit("close")),class:"fcom_back_header"},[k(l,null,{default:$(()=>[k(i)]),_:1}),ne(" "+A(e.$t("Back to Lessons"))+" ",1),n.course&&n.course.title?(C(),M("span",JOe,"("+A(n.course.title)+")",1)):W("",!0)]),b("div",XOe,[k(f,{onCommand:t[1]||(t[1]=O=>{n.lesson.status=O}),trigger:"click"},{dropdown:$(()=>[k(d,null,{default:$(()=>[k(c,{command:"draft"},{default:$(()=>[ne(A(e.$t("Draft")),1)]),_:1}),k(c,{command:"published"},{default:$(()=>[ne(A(e.$t("Published")),1)]),_:1})]),_:1})]),default:$(()=>[k(u,{type:n.lesson.status=="published"?"success":"info",bg:"",text:"",class:"el-dropdown-link"},{default:$(()=>[ne(A(e.$labelize(n.lesson.status))+" ",1),k(l,{class:"el-icon--right"},{default:$(()=>[k(a)]),_:1})]),_:1},8,["type"])]),_:1}),He((C(),q(u,{style:{"margin-left":"15px"},disabled:r.saving,onClick:s.saveData,class:"fcom_primary_button"},{default:$(()=>[ne(A(e.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[T,r.saving]])])])]),_:1}),k(E,{class:"fcom_full_editor_container"},{default:$(()=>[k(m,{class:"fcol_full_editor_side",width:"250px"},{default:$(()=>[k(h,{lesson:n.lesson},null,8,["lesson"])]),_:1}),k(x,{class:"fcom_full_editor_main"},{default:$(()=>[k(S,null,{default:$(()=>[b("div",QOe,[b("div",eIe,[b("div",null,A(e.$t("Lesson %1s of %2s - %3s",n.editingIndex+1,n.section.lessons.length,n.section.title)),1),b("div",tIe,[k(u,{onClick:t[2]||(t[2]=O=>e.$emit("changeLesson",n.editingIndex-1)),disabled:n.editingIndex===0,size:"small"},{default:$(()=>[k(l,null,{default:$(()=>[k(i)]),_:1})]),_:1},8,["disabled"]),k(u,{onClick:t[3]||(t[3]=O=>e.$emit("changeLesson",n.editingIndex+1)),disabled:n.editingIndex+1===n.section.lessons.length,size:"small"},{default:$(()=>[k(l,null,{default:$(()=>[k(y)]),_:1})]),_:1},8,["disabled"])])]),b("div",nIe,[k(v,{ref:"create_status",type:"text",class:"fcom_input_h1",modelValue:n.lesson.title,"onUpdate:modelValue":t[4]||(t[4]=O=>n.lesson.title=O),size:"large",placeholder:e.$t("Lesson Title")},null,8,["modelValue","placeholder"])]),n.lesson.meta.enable_media=="yes"?(C(),q(w,{key:0,style:{margin:"30px 0"},media:n.lesson.meta.media},null,8,["media"])):W("",!0),b("div",oIe,[k(_,{modelValue:n.lesson.message,"onUpdate:modelValue":t[5]||(t[5]=O=>n.lesson.message=O)},null,8,["modelValue"])])])]),_:1})]),_:1})]),_:1})]),_:1})])}const mL=qe(GOe,[["render",rIe]]),sIe={name:"LessonLine",emits:["showEditor","updated"],props:["lesson"],components:{LessonEditor:mL},data(){return{editing_title:!1,editingLesson:!1}},methods:{updateLessonStatus(e){if(this.lesson.status===e)return!1;this.lesson.status=e,this.$emit("updated",this.lesson,["status"])},updateLessonTitle(){this.editing_title=!1,this.$emit("updated",this.lesson,["title"])},showEditor(){this.editing_title=!0,this.$nextTick(()=>{this.$refs.lesson_title_edit.focus()})},handleLessonAction(e){e==="edit_title"?this.showEditor():e==="delete"?this.$emit("deleteLesson",this.lesson):e==="edit_lesson"&&this.$emit("showEditor",this.lesson)}}},iIe={key:0,class:"fcom_heading_item"},lIe={class:"fcom_section_item_actions"};function aIe(e,t,n,o,r,s){const i=pt,l=At,a=re("arrow-down"),u=Ne,c=bh,d=wh,f=_h,p=re("MoreFilled");return C(),M(fe,null,[b("div",{class:D([{fcom_title_editing:r.editing_title},"fcom_section_item_title fcom_title_editable"])},[he(e.$slots,"before_section_heading"),r.editing_title?(C(),q(l,{key:1,onKeydown:t[1]||(t[1]=Pt(h=>r.editing_title=!1,["esc"])),ref:"lesson_title_edit",onKeyup:Pt(s.updateLessonTitle,["enter"]),modelValue:n.lesson.title,"onUpdate:modelValue":t[2]||(t[2]=h=>n.lesson.title=h)},{append:$(()=>[k(i,{onClick:s.updateLessonTitle},{default:$(()=>[ne(A(e.$t("save")),1)]),_:1},8,["onClick"])]),_:1},8,["onKeyup","modelValue"])):(C(),M("p",iIe,[b("span",{onClick:t[0]||(t[0]=h=>e.$emit("showEditor",n.lesson))},A(n.lesson.title),1)]))],2),b("div",lIe,[k(i,{onClick:t[3]||(t[3]=h=>e.$emit("showEditor",n.lesson)),class:"fcom_show_hover",text:""},{default:$(()=>[ne(A(e.$t("Edit lesson")),1)]),_:1}),k(f,{onCommand:t[4]||(t[4]=h=>{s.updateLessonStatus(h)}),trigger:"click"},{dropdown:$(()=>[k(d,null,{default:$(()=>[k(c,{command:"draft"},{default:$(()=>[ne(A(e.$t("Draft")),1)]),_:1}),k(c,{command:"published"},{default:$(()=>[ne(A(e.$t("Published")),1)]),_:1})]),_:1})]),default:$(()=>[k(i,{class:D(["el-dropdown-link",`fcom_button_${n.lesson.status==="published"?"success":"info"}`]),bg:"",text:""},{default:$(()=>[ne(A(e.$labelize(n.lesson.status))+" ",1),k(u,{class:"el-icon--right"},{default:$(()=>[k(a)]),_:1})]),_:1},8,["class"])]),_:1}),k(f,{onCommand:s.handleLessonAction,trigger:"click"},{dropdown:$(()=>[k(d,null,{default:$(()=>[k(c,{command:"edit_lesson"},{default:$(()=>[ne(A(e.$t("Edit Lesson Content")),1)]),_:1}),k(c,{command:"edit_title"},{default:$(()=>[ne(A(e.$t("Edit Title")),1)]),_:1}),k(c,{command:"delete"},{default:$(()=>[ne(A(e.$t("Delete Lesson")),1)]),_:1})]),_:1})]),default:$(()=>[k(i,{"aria-label":e.$t("View actions"),size:"small",class:"fcom_dot_menu",text:""},{default:$(()=>[k(u,null,{default:$(()=>[k(p)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"])])],64)}const uIe=qe(sIe,[["render",aIe]]),cIe={name:"SectionScheduler",components:{CaretBottom:FY},props:["section","course"],data(){return{saving:!1,show:!1,time:"09:00",date:"",unlock_after:0}},methods:{saveSchedule(){let e=this.date+" "+this.time+":00";if(!dayjs(e).isValid()){this.$notify.error(this.$t("Please select a valid date and time"));return}this.section.scheduled_at=e,this.patchCourse({scheduled_at:e},()=>{this.show=!1})},saveUnlockDays(){this.patchCourse({reactions_count:this.unlock_after},()=>{this.section.reactions_count=this.unlock_after,this.show=!1})},patchCourse(e={},t=null){this.saving=!0,this.$patch("admin/courses/"+this.course.id+"/sections/"+this.section.id,e).then(n=>{this.$notify.success(this.$t("Schedule has been updated")),t&&t(n)}).catch(n=>{this.$handleError(n)}).finally(()=>{this.saving=!1})},initUnlockDay(){if(this.show){this.show=!1;return}this.unlock_after=parseInt(this.section.reactions_count),this.show=!0},initPicker(){if(this.show){this.show=!1;return}let e=this.section.scheduled_at;if(!e){this.show=!0;return}this.date=dayjs(e).format("YYYY-MM-DD"),this.time=dayjs(e).format("HH:mm"),this.show=!0}}},dIe={style:{"padding-left":"10px"},class:"fcom_section_scheduler"},fIe={class:"fcom_scheduler_form"},pIe={class:"fcom_input_group"},hIe={class:"el_inline_date_picker"},mIe={class:"fcom_input_group"},gIe={class:"fcom_input_group"},vIe={class:"fcom_scheduler_form"},yIe={class:"fcom_input_group"},_Ie={class:"fcom_label"},bIe={class:"fcom_input_group"};function wIe(e,t,n,o,r,s){const i=re("CaretBottom"),l=Ne,a=lie,u=AO,c=pt,d=Po,f=Gle,p=zt("loading");return C(),M("div",dIe,[n.course.settings.course_type=="scheduled"?(C(),q(d,{key:0,persistent:!1,placement:"bottom",width:400,visible:r.show},{reference:$(()=>[b("button",{onClick:t[0]||(t[0]=(...h)=>s.initPicker&&s.initPicker(...h)),class:"fcom_input_select_btn"},[b("span",null,A(n.section.scheduled_at?e.smartDate(n.section.scheduled_at,!0,!0):e.$t("Select drip date")),1),k(l,null,{default:$(()=>[k(i)]),_:1})])]),default:$(()=>[b("div",fIe,[b("div",pIe,[b("div",hIe,[k(a,{"value-format":"YYYY-MM-DD",format:"YYYY-MM-DD",teleported:!1,"popper-class":"el_inline_date_picker_box",modelValue:r.date,"onUpdate:modelValue":t[1]||(t[1]=h=>r.date=h)},null,8,["modelValue"])])]),b("div",mIe,[k(u,{modelValue:r.time,"onUpdate:modelValue":t[2]||(t[2]=h=>r.time=h),start:"00:00",end:"23:59",steps:15},null,8,["modelValue"])]),b("div",gIe,[He((C(),q(c,{disabled:r.saving,type:"success",onClick:s.saveSchedule},{default:$(()=>[ne(A(e.$t("Update Date")),1)]),_:1},8,["disabled","onClick"])),[[p,r.saving]])])])]),_:1},8,["visible"])):W("",!0),n.course.settings.course_type=="structured"?(C(),q(d,{key:1,persistent:!1,placement:"bottom",width:400,visible:r.show},{reference:$(()=>[b("button",{onClick:t[3]||(t[3]=(...h)=>s.initUnlockDay&&s.initUnlockDay(...h)),class:"fcom_input_select_btn"},[b("span",null,A(n.section.reactions_count?e.$t("after %d days of enrollment",n.section.reactions_count):e.$t("Immediately")),1),k(l,null,{default:$(()=>[k(i)]),_:1})])]),default:$(()=>[b("div",vIe,[b("div",yIe,[b("div",_Ie,A(e.$t("Unlock section after")),1),k(f,{modelValue:r.unlock_after,"onUpdate:modelValue":t[4]||(t[4]=h=>r.unlock_after=h),min:0,max:1e3,"controls-position":"right",precision:0},null,8,["modelValue"]),ne(" "+A(e.$t("Days")),1)]),b("div",bIe,[He((C(),q(c,{disabled:r.saving,type:"success",onClick:s.saveUnlockDays},{default:$(()=>[ne(A(e.$t("Update")),1)]),_:1},8,["disabled","onClick"])),[[p,r.saving]])])])]),_:1},8,["visible"])):W("",!0)])}const CIe=qe(cIe,[["render",wIe]]),kIe={name:"SectionPart",props:["section","course"],emits:["reload"],components:{LessonEditor:mL,LessonLine:uIe,SectionScheduler:CIe,FluentDnD:xv},data(){return{editing_title:!1,addingLesson:!1,newLesson:{title:""},working:!1,editingLesson:null,editingIndex:0}},computed:{hasSchedule(){return this.course.settings.course_type==="scheduled"||this.course.settings.course_type==="structured"}},methods:{updateLessonStatus(e,t){e.status=t},showTitleEditor(){this.editing_title=!0,this.$nextTick(()=>{this.$refs.fcom_section_title_editor.focus()})},patchSection(e){let t={};e.forEach(n=>{t[n]=this.section[n]}),this.editing_title=!1,this.$patch("admin/courses/"+this.course.id+"/sections/"+this.section.id,t).then(n=>{console.log(n)}).catch(n=>{this.$handleError(n)})},handleLessonUpdated(e,t){let n={};t.forEach(o=>{n[o]=e[o]}),this.editing_title=!1,this.$patch("admin/courses/"+this.course.id+"/lessons/"+e.id,n).then(o=>{this.$notify.success(o.message)}).catch(o=>{this.$handleError(o)})},addLesson(e,t=!1){e&&e.preventDefault(),this.addingLesson=!0,this.$post("admin/courses/"+this.course.id+"/lessons",{...this.newLesson,section_id:parseInt(this.section.id)}).then(n=>{this.section.lessons.push(n.lesson),this.$refs.add_lesson.hide(),this.newLesson.title="",t&&this.$nextTick(()=>{let o=this.section.lessons.length-1;this.editingLesson=this.section.lessons[o],this.editingIndex=o})}).catch(n=>{this.$handleError(n)}).finally(()=>{this.addingLesson=!1})},handleSectionAction(e){if(e=="edit_title"){this.showTitleEditor();return}e=="delete"&&this.$confirm(this.$t("Are you sure you want to delete this section? All the associate lessons and enrollment data will be deleted too."),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),type:"warning",title:this.$t("Are you sure?"),showInput:!0,dangerouslyUseHTMLString:!0,inputPlaceholder:this.$t("Type %s to confirm","DELETE"),inputValidator(t){return t.toLowerCase()==="delete"?!0:this.$t("You must type %s to confirm","DELETE")},inputErrorMessage:this.$t("You must type %s to confirm","DELETE")}).then(t=>{if(t.value!="DELETE"){this.$notify.error({title:"Error",message:this.$t("You must type %s to confirm","DELETE")});return}this.working=!0,this.$del("admin/courses/"+this.course.id+"/sections/"+this.section.id).then(n=>{this.$emit("reload")}).catch(n=>{this.$handleError(n)}).finally(()=>{this.working=!1})}).catch(()=>{})},handleDeleteLesson(e){this.$confirm(this.$t("Are you sure you want to delete this lesson? All the associate date will be deleted too."),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),type:"warning",title:this.$t("Are you sure?")}).then(()=>{this.working=!0,this.$del("admin/courses/"+this.course.id+"/lessons/"+e.id).then(t=>{this.$emit("reload")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1})}).catch(()=>{})},handleChangeLesson(e){this.editingLesson=null,this.editingIndex=0,this.$nextTick(()=>{this.editingLesson=this.section.lessons[e],this.editingIndex=e})},initLessonEditor(e,t){this.editingLesson=e,this.editingIndex=t},dropLesson({index:e}){const t=this.section.lessons.splice(e,1)[0];this.section.lessons.splice(e,0,t),this.resetLessonIndexes()},resetLessonIndexes(){const e={};cu(this.section.lessons,(t,n)=>{e[t.id]=n+1}),this.$patch("admin/courses/"+this.course.id+"/sections/"+this.section.id+"/indexes",{indexes:e}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)})}}},SIe={class:"fcom_section_primary"},$Ie={class:"fcom_section_primary_item"},EIe={key:0,class:"fcom_heading_item"},xIe={class:"fcom_section_config fcom_label_schedule"},MIe={class:"fcom_section_config fcom_label_email"},TIe={style:{"margin-left":"15px"}},OIe={class:"meta_line"},IIe={class:"fcom_section_primary_item_actions fcom_label_actions"},AIe={key:0,class:"fcom_section_items"},NIe=b("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1),PIe={key:0};function LIe(e,t,n,o,r,s){const i=pt,l=At,a=re("section-scheduler"),u=io,c=so,d=Po,f=re("MoreFilled"),p=Ne,h=bh,m=wh,y=_h,v=re("lesson-line"),w=re("FluentDnD"),_=re("LessonEditor"),S=zt("loading");return C(),M(fe,null,[He((C(),M("div",SIe,[b("div",$Ie,[b("div",{class:D(["fcom_section_primary_item_title fcom_title_editable fcom_label_lesson",{fcom_title_editing:r.editing_title}])},[he(e.$slots,"before_section_heading"),r.editing_title?(C(),q(l,{key:1,ref:"fcom_section_title_editor",onKeyup:t[2]||(t[2]=Pt(x=>s.patchSection(["title"]),["enter"])),modelValue:n.section.title,"onUpdate:modelValue":t[3]||(t[3]=x=>n.section.title=x)},{append:$(()=>[k(i,{onClick:t[1]||(t[1]=x=>s.patchSection(["title"]))},{default:$(()=>[ne(A(e.$t("save")),1)]),_:1})]),_:1},8,["modelValue"])):(C(),M("h4",EIe,[b("span",{onClick:t[0]||(t[0]=x=>r.editing_title=!0)},A(n.section.title),1)]))],2),s.hasSchedule?(C(),M(fe,{key:0},[b("div",xIe,[k(a,{section:n.section,course:n.course},null,8,["section","course"])]),b("div",MIe,[b("div",TIe,[b("span",OIe,A(e.$t("n/a")),1)])])],64)):W("",!0),b("div",IIe,[k(d,{persistent:!1,ref:"add_lesson",placement:"bottom",width:400,trigger:"click"},{reference:$(()=>[k(i,{class:"fcom_secondary_button"},{default:$(()=>[ne(A(e.$t("Add Lesson")),1)]),_:1})]),default:$(()=>[k(c,{onSubmit:[t[6]||(t[6]=et(x=>e.doNothing(),["prevent"])),s.addLesson],"label-position":"top"},{default:$(()=>[k(u,{label:e.$t("Lesson Title")},{default:$(()=>[k(l,{modelValue:r.newLesson.title,"onUpdate:modelValue":t[4]||(t[4]=x=>r.newLesson.title=x),placeholder:e.$t("Enter Lesson title")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),k(u,null,{default:$(()=>[He((C(),q(i,{disabled:r.addingLesson,class:"fcom_secondary_button",onClick:s.addLesson},{default:$(()=>[ne(A(e.$t("Add")),1)]),_:1},8,["disabled","onClick"])),[[S,r.addingLesson]]),He((C(),q(i,{disabled:r.addingLesson,class:"fcom_primary_button",onClick:t[5]||(t[5]=()=>{s.addLesson(!1,!0)})},{default:$(()=>[ne(A(e.$t("Add & Edit")),1)]),_:1},8,["disabled"])),[[S,r.addingLesson]])]),_:1})]),_:1},8,["onSubmit"])]),_:1},512),k(y,{onCommand:s.handleSectionAction,trigger:"click"},{dropdown:$(()=>[k(m,null,{default:$(()=>[k(h,{command:"edit_title"},{default:$(()=>[ne(A(e.$t("Edit Title")),1)]),_:1}),k(h,{command:"delete"},{default:$(()=>[ne(A(e.$t("Delete section")),1)]),_:1})]),_:1})]),default:$(()=>[k(i,{"aria-label":e.$t("View actions"),size:"small",class:"fcom_dot_menu",style:{"margin-left":"10px"},text:""},{default:$(()=>[k(p,null,{default:$(()=>[k(f)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"])])]),n.section.lessons.length?(C(),M("div",AIe,[k(w,{items:n.section.lessons,onDrop:s.dropLesson,"item-class":"fcom_section_item"},{item:$(({data:x})=>[(C(),q(v,{onDeleteLesson:s.handleDeleteLesson,onUpdated:s.handleLessonUpdated,key:x.id,onShowEditor:E=>s.initLessonEditor(x,e.lessonIndex),lesson:x},{before_section_heading:$(()=>[NIe]),_:2},1032,["onDeleteLesson","onUpdated","onShowEditor","lesson"]))]),_:1},8,["items","onDrop"])])):W("",!0)])),[[S,r.working]]),r.editingLesson?(C(),M("div",PIe,[(C(),q(_s,{to:"body"},[k(_,{course:n.course,onChangeLesson:s.handleChangeLesson,section:n.section,editingIndex:r.editingIndex,onClose:t[7]||(t[7]=x=>{r.editingLesson=null}),lesson:r.editingLesson},null,8,["course","onChangeLesson","section","editingIndex","lesson"])]))])):W("",!0)],64)}const RIe=qe(kIe,[["render",LIe]]),DIe={name:"EditLessons",props:["course"],components:{SectionPart:RIe,FluentDnD:xv},data(){return{sections:[],loading:!1,newSection:{title:""},addingSection:!1}},computed:{lessonsCount(){let e=0;return cu(this.sections,t=>{e+=t.lessons.length}),e}},methods:{fetchSections(){this.loading=!0,this.$get("admin/courses/"+this.course.id+"/sections").then(e=>{this.sections=e.sections}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},dropSection({indx:e}){const t=this.sections.splice(e,1)[0];this.sections.splice(e,0,t),this.resetSectionIndexes()},addSection(){this.addingSection=!0,this.$post("admin/courses/"+this.course.id+"/sections",this.newSection).then(e=>{this.sections.push(e.section),this.$refs.add_section.hide(),this.newSection.title=""}).catch(e=>{this.$handleError(e)}).finally(()=>{this.addingSection=!1})},resetSectionIndexes(){const e={};cu(this.sections,(t,n)=>{e[t.id]=n+1}),this.$patch("admin/courses/"+this.course.id+"/sections/indexes",{indexes:e}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)})}},mounted(){this.fetchSections()}},FIe={class:"fcom_course_lessons"},VIe={class:"fcom_settings_header"},BIe={class:"fcom_settings_header_meta"},zIe={class:"fcom_settings_header_meta_item"},jIe={class:"fcom_card_section_heading"},HIe={class:"fcom_section_labels"},UIe={class:"fcom_lebel fcom_label_lesson"},WIe={class:"fcom_lebel fcom_label_schedule"},KIe={class:"fcom_lebel fcom_label_email"},qIe=b("div",{class:"fcom_lebel fcom_label_actions"},null,-1),GIe=b("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1);function YIe(e,t,n,o,r,s){const i=pt,l=At,a=io,u=so,c=Po,d=lo,f=re("section-part"),p=re("FluentDnD"),h=zt("loading");return C(),M("div",FIe,[b("div",VIe,[b("div",null,[b("h2",null,A(e.$t("Lessons")),1),b("div",BIe,[b("div",zIe,[b("b",null,A(e.$t("Type:")),1),ne(" "+A(e.$labelize(n.course.settings.course_type))+" • ",1),b("b",null,A(e.$t("Status:")),1),ne(" "+A(e.$labelize(n.course.status))+" • ",1),b("b",null,A(e.$t("Visibility:")),1),ne(" "+A(e.$labelize(n.course.privacy)),1)])])])]),b("div",{class:D(["fcom_card_sections","fcom_course_type_"+n.course.settings.course_type])},[He((C(),M("div",jIe,[b("h3",null,A(e.$_n("%d Section","%d Sections",r.sections.length))+" • "+A(e.$_n("%d Lesson","%d Lessons",s.lessonsCount)),1),k(c,{persistent:!1,ref:"add_section",placement:"bottom",width:400,trigger:"click"},{reference:$(()=>[k(i,{class:"fcom_primary_button",bg:""},{default:$(()=>[ne(A(e.$t("+ Add Section")),1)]),_:1})]),default:$(()=>[k(u,{onSubmit:t[1]||(t[1]=et(m=>e.doNothing(),["prevent"])),"label-position":"top"},{default:$(()=>[k(a,{label:e.$t("Section Title")},{default:$(()=>[k(l,{onKeydown:Pt(et(s.addSection,["prevent"]),["enter"]),modelValue:r.newSection.title,"onUpdate:modelValue":t[0]||(t[0]=m=>r.newSection.title=m),placeholder:e.$t("Enter Section title")},null,8,["onKeydown","modelValue","placeholder"])]),_:1},8,["label"]),k(a,null,{default:$(()=>[He((C(),q(i,{disabled:r.addingSection,class:"fcom_primary_button",onClick:s.addSection},{default:$(()=>[ne(A(e.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[h,r.addingSection]])]),_:1})]),_:1})]),_:1},512)])),[[h,r.loading]]),r.loading?(C(),q(d,{key:0,animated:!0,rows:10})):W("",!0),b("div",HIe,[b("div",UIe,A(e.$t("Lesson name")),1),b("div",WIe,A(e.$t("Schedule")),1),b("div",KIe,A(e.$t("E-mail")),1),qIe]),k(p,{items:r.sections,onDrop:s.dropSection,"item-class":"fcom_section_item"},{item:$(({data:m})=>[k(f,{onReload:s.fetchSections,course:n.course,section:m},{before_section_heading:$(()=>[GIe]),_:2},1032,["onReload","course","section"])]),_:1},8,["items","onDrop"])],2)])}const ZIe=qe(DIe,[["render",YIe]]),JIe={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 XIe(e,t,n,o,r,s){const i=tue;return C(),q(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 gL=qe(JIe,[["render",XIe]]),QIe={name:"AddStudentForm",props:["course"],emits:["completed"],data(){return{users:[],loading:!1,saving:!1,userId:null}},methods:{fetchUsers(e=""){this.loading=!0,this.$get("admin/courses/users/search",{context:"add_member",search:e,course_id:this.course.id}).then(t=>{this.users=t.users.data}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},addStudent(){this.saving=!0,this.$post("admin/courses/"+this.course.id+"/students",{user_id:this.userId}).then(e=>{this.$notify.success(e.message),this.$emit("completed")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){this.fetchUsers()}},eAe={style:{float:"left"}},tAe={style:{float:"right",color:"#8492a6","font-size":"13px"}};function nAe(e,t,n,o,r,s){const i=Ss,l=vr,a=io,u=pt,c=so,d=zt("loading");return C(),q(c,{onSubmit:t[2]||(t[2]=et(f=>e.doNothing(),["prevent"])),"label-position":"top"},{default:$(()=>[k(a,{label:e.$t("User")},{default:$(()=>[k(l,{class:"rich_select",filterable:"",remote:"",loading:r.loading,"remote-method":s.fetchUsers,placeholder:e.$t("Select User"),modelValue:r.userId,"onUpdate:modelValue":t[0]||(t[0]=f=>r.userId=f)},{default:$(()=>[(C(!0),M(fe,null,nt(r.users,f=>(C(),q(i,{key:f.ID,label:f.display_name+" ("+f.ID+")",value:f.ID},{default:$(()=>[b("span",eAe,A(f.display_name),1),b("span",tAe,A(f.ID),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["loading","remote-method","placeholder","modelValue"])]),_:1},8,["label"]),he(e.$slots,"after_form",{},()=>[k(a,null,{default:$(()=>[He((C(),q(u,{class:"fcom_primary_button",disabled:r.saving,onClick:t[1]||(t[1]=f=>s.addStudent())},{default:$(()=>[ne(A(e.$t("Add Student")),1)]),_:1},8,["disabled"])),[[d,r.saving]])]),_:1})])]),_:3})}const oAe=qe(QIe,[["render",nAe]]),rAe={name:"CourseMembers",props:["course","course_id"],components:{UserRouteLink:X0,Pagination:gL,AddStudentForm:oAe},data(){return{students:[],search:"",loading:!0,working:!1,isAddStdOpen:!1,SearchIcon:Ii(XZ),pagination:{page:1,per_page:20,total:0}}},methods:{updateStudents(e){this.students=this.students.filter(t=>t.user_id!==e.user_id)},studentAdded(){this.isAddStdOpen=!1,this.fetchStudents()},toSearch(){this.pagination.page=1,this.fetchStudents()},removeStudentPrompt(e){this.$confirm(this.$t("Are you sure you want to remove this student from this course?"),this.$t("Remove Student?"),{confirmButtonText:this.$t("Remove"),cancelButtonText:this.$t("Cancel"),type:"error"}).then(()=>{this.removeStudent(e)})},removeStudent(e){this.$del("admin/courses/"+this.course.id+"/students/"+e.user_id).then(t=>{this.$notify.success(t.message),this.updateStudents(e)}).catch(t=>{this.$handleError(t)})},fetchStudents(){this.loading=!0,this.$get("admin/courses/"+this.course.id+"/students",{page:this.pagination.page,per_page:this.pagination.per_page,search:this.search}).then(e=>{this.students=e.students.data,this.pagination.total=e.students.total,window.scrollTo(0,0)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})}},mounted(){this.fetchStudents()}},sAe={class:"fcom_course_members"},iAe={class:"fcom_course_member_header"},lAe={class:"fcom_course_member_actions"},aAe={class:"table_user_card"},uAe={class:"card_avatar"},cAe={class:"card_info"},dAe={class:"card_name"},fAe={class:"meta_line"},pAe={class:"progress_wrap"};function hAe(e,t,n,o,r,s){const i=pt,l=At,a=re("UserAvatar"),u=re("UserRouteLink"),c=Y0,d=gO,f=re("MoreFilled"),p=Ne,h=bh,m=wh,y=_h,v=G0,w=re("pagination"),_=re("add-student-form"),S=Ql,x=zt("loading");return C(),M("div",sAe,[b("div",iAe,[b("h3",null,A(e.$t("Course Students")),1),b("div",lAe,[k(l,{onKeyup:t[1]||(t[1]=Pt(E=>s.toSearch(),["enter"])),modelValue:r.search,"onUpdate:modelValue":t[2]||(t[2]=E=>r.search=E),placeholder:e.$t("Search Members...")},{append:$(()=>[k(i,{onClick:t[0]||(t[0]=E=>s.toSearch()),text:"",icon:r.SearchIcon},null,8,["icon"])]),_:1},8,["modelValue","placeholder"]),k(i,{class:"fcom_primary_button el-button",onClick:t[3]||(t[3]=E=>r.isAddStdOpen=!0)},{default:$(()=>[ne(A(e.$t("Add Student")),1)]),_:1})])]),He((C(),q(v,{data:r.students,style:{width:"100%"}},{default:$(()=>[k(c,{prop:"ID",label:e.$t("Name"),"min-width":"200"},{default:$(E=>[b("div",aAe,[b("div",uAe,[k(a,{xprofile:E.row},null,8,["xprofile"])]),b("div",cAe,[b("div",dAe,[k(u,{show_badge:!0,xprofile:E.row},null,8,["xprofile"])]),b("div",fAe,A(e.getExcerpt(E.row.short_description,160)),1)])])]),_:1},8,["label"]),k(c,{width:"160",prop:"progress",label:e.$t("Progress")},{default:$(E=>[b("div",pAe,[k(d,{percentage:parseInt(E.row.progress)},null,8,["percentage"])])]),_:1},8,["label"]),k(c,{width:"160",label:e.$t("Start Date")},{default:$(E=>[ne(A(e.smartDate(E.row.space_pivot.created_at,!0)),1)]),_:1},8,["label"]),k(c,{width:"50"},{default:$(E=>[k(y,{trigger:"click"},{dropdown:$(()=>[k(m,null,{default:$(()=>[k(h,{onClick:T=>s.removeStudentPrompt(E.row)},{default:$(()=>[ne(A(e.$t("Remove")),1)]),_:2},1032,["onClick"])]),_:2},1024)]),default:$(()=>[k(i,{"aria-label":e.$t("View actions"),class:"fcom_dot_menu",size:"small",text:""},{default:$(()=>[k(p,null,{default:$(()=>[k(f)]),_:1})]),_:1},8,["aria-label"])]),_:2},1024)]),_:1})]),_:1},8,["data"])),[[x,r.loading]]),k(w,{hide_on_single:!0,onFetch:s.fetchStudents,pagination:r.pagination},null,8,["onFetch","pagination"]),k(S,{modelValue:r.isAddStdOpen,"onUpdate:modelValue":t[4]||(t[4]=E=>r.isAddStdOpen=E),"close-on-click-modal":!1,"append-to-body":!0,size:e.dialogWidth,direction:"rtl"},{header:$(()=>[b("h4",null,A(e.$t("Add Student")),1)]),default:$(()=>[k(_,{onCompleted:s.studentAdded,course:n.course},null,8,["onCompleted","course"])]),_:1},8,["modelValue","size"])])}const mAe=qe(rAe,[["render",hAe]]),gAe={name:"ChatIcon"},vAe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},yAe=b("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),_Ae=b("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),bAe=[yAe,_Ae];function wAe(e,t,n,o,r,s){return C(),M("svg",vAe,bAe)}const CAe=qe(gAe,[["render",wAe]]),kAe={name:"HeartIcon",props:{filled:{default:!1}}},SAe={key:0,viewBox:"0 0 24 24","aria-hidden":"true"},$Ae=b("g",null,[b("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),EAe=[$Ae],xAe={key:1,viewBox:"0 0 24 24","aria-hidden":"true"},MAe=b("g",null,[b("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),TAe=[MAe];function OAe(e,t,n,o,r,s){return n.filled?(C(),M("svg",SAe,EAe)):(C(),M("svg",xAe,TAe))}const vL=qe(kAe,[["render",OAe]]),IAe={name:"SurveyEditForm",props:["form"],emits:["cancel"],data(){return{}},methods:{addOption(){this.form.options.push({label:"",slug:""})},removeOption(e){this.form.options.splice(e,1)}}},AAe={class:"fcom_compose_app_form"},NAe={class:"fcom_app_header"},PAe={class:"fcom_app_options"},LAe={class:"fcom_app_pref"},RAe={class:"fcom_app_footer"};function DAe(e,t,n,o,r,s){const i=pt,l=At,a=re("Plus"),u=Ne,c=Hn;return C(),M("div",AAe,[b("div",NAe,[b("h5",null,A(e.$t("Poll Options")),1),b("div",null,[k(i,{onClick:t[0]||(t[0]=d=>e.$emit("cancel")),size:"small",text:""},{default:$(()=>[ne(A(e.$t("cancel")),1)]),_:1})])]),b("div",PAe,[(C(!0),M(fe,null,nt(n.form.options,(d,f)=>(C(),M("div",{class:"fcom_app_option",key:"option_"+f},[k(l,{modelValue:d.label,"onUpdate:modelValue":p=>d.label=p,type:"text",placeholder:e.$t("Your option text")},tu({_:2},[!d.slug&&f!==0?{name:"suffix",fn:$(()=>[k(i,{onClick:p=>s.removeOption(f),text:"",size:"small"},{default:$(()=>[ne("x")]),_:2},1032,["onClick"])]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","placeholder"])]))),128)),b("div",LAe,[k(i,{onClick:s.addOption,text:"",size:"small"},{default:$(()=>[k(u,null,{default:$(()=>[k(a)]),_:1}),b("span",null,A(e.$t("Add More")),1)]),_:1},8,["onClick"])])]),b("div",RAe,[b("h5",null,A(e.$t("Poll Settings")),1),k(c,{modelValue:n.form.type,"onUpdate:modelValue":t[1]||(t[1]=d=>n.form.type=d),"true-value":"multi-choice","false-value":"single_choice"},{default:$(()=>[ne(A(e.$t("Users can choose multiple options")),1)]),_:1},8,["modelValue"])])])}const FAe=qe(IAe,[["render",DAe]]),VAe={name:"GiphyIcon"},BAe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},zAe=DE('<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),jAe=[zAe];function HAe(e,t,n,o,r,s){return C(),M("svg",BAe,jAe)}const UAe=qe(VAe,[["render",HAe]]),WAe={name:"Giphy",components:{GiphyIcon:UAe},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:wpe(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()}}},KAe={class:"fcom_giphy_composer"},qAe={class:"search-container"},GAe=["onLoad","src","alt","onClick"],YAe={key:0,class:"img_loading"},ZAe={key:1,class:"no_result"},JAe=b("div",{class:"fcom_giphy_powered_by"},[b("span",{class:"powered_by"},"POWERED BY "),b("span",null,"GIPHY")],-1);function XAe(e,t,n,o,r,s){const i=At,l=vh,a=gh,u=re("GiphyIcon"),c=Ne,d=pt,f=Po,p=zt("loading");return C(),M("div",KAe,[k(f,{placement:"top-end",width:300,persistent:!1,trigger:"click","popper-class":"fcom_giphy_popover",ref:"popover"},{reference:$(()=>[k(d,{"aria-label":"Pick GIF",text:"",onClick:s.handleGiphyClick},{default:$(()=>[k(c,{class:D(["fcom_apps_icon"])},{default:$(()=>[k(u)]),_:1})]),_:1},8,["onClick"])]),default:$(()=>[He((C(),M("div",qAe,[k(i,{modelValue:r.searchQuery,"onUpdate:modelValue":t[0]||(t[0]=h=>r.searchQuery=h),placeholder:e.$t("Search Gifs"),onInput:s.handleSearch},null,8,["modelValue","placeholder","onInput"]),b("div",{class:"gif_container",onScroll:t[1]||(t[1]=(...h)=>s.handleScroll&&s.handleScroll(...h))},[r.gifs.length>0?(C(),q(a,{key:0,gutter:5},{default:$(()=>[(C(!0),M(fe,null,nt(r.gifs,h=>(C(),q(l,{span:12,key:h.id,class:"gif_item"},{default:$(()=>[b("img",{alt:"",onLoad:m=>h.loaded=!0,src:h.images.preview_gif.url,onClick:m=>s.selectGiphy(h)},null,40,GAe),h.loaded?W("",!0):(C(),M("p",YAe))]),_:2},1024))),128))]),_:1})):(C(),M("p",ZAe,A(e.$t("No results")),1))],32),JAe])),[[p,r.loading]])]),_:1},512)])}const QAe=qe(WAe,[["render",XAe]]),eNe={name:"VideoIcon"},tNe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},nNe=b("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),oNe=b("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),rNe=[nNe,oNe];function sNe(e,t,n,o,r,s){return C(),M("svg",tNe,rNe)}const iNe=qe(eNe,[["render",sNe]]),lNe={name:"VideoEmbeder",emits:["embeded"],components:{MediaEmbeder:Lk,VideoIcon:iNe},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"}}}},aNe={class:"fcom_video_embeder"};function uNe(e,t,n,o,r,s){const i=re("VideoIcon"),l=Ne,a=pt,u=re("media-embeder"),c=yh;return C(),M("div",aNe,[k(a,{"aria-label":"Add Video",text:"",onClick:s.show},{default:$(()=>[k(l,{class:D(["fcom_apps_icon"])},{default:$(()=>[k(i)]),_:1})]),_:1},8,["onClick"]),r.showVideoPop?(C(),q(c,{key:0,title:e.$t("Attach video"),modelValue:r.showVideoPop,"onUpdate:modelValue":t[0]||(t[0]=d=>r.showVideoPop=d),width:e.dialogWidth,style:{"max-width":"600px"},"append-to-body":!0},{default:$(()=>[k(u,{box_title:e.$t("Add Featured Video for this post"),has_iframe:!1,onEmbeded:s.embeded,media:r.media},null,8,["box_title","onEmbeded","media"])]),_:1},8,["title","modelValue","width"])):W("",!0)])}const cNe=qe(lNe,[["render",uNe]]),dNe=window.fluentComAdmin.auth,fNe={name:"FeedTextComposer",components:{MediaPreview:Mv,Giphy:QAe,ImageUploader:Md,SurveyEditForm:FAe,MarkdownEditor:eL,EmojiPicker:uL,VideoEmbeder:cNe},emits:["editorCreated"],props:{placeholder:{type:String,default(){return"What's happening, "+dNe.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()})}},pNe={class:"fcom_text_composer"},hNe={class:"fcom_editor status_text_input"},mNe={key:0,style:{position:"relative","text-align":"center"}},gNe={key:1,class:"fcom_media_items"},vNe={key:0,class:"fcom_media_images"},yNe=["src","alt"],_Ne={key:1},bNe={class:"fcom_media_images"},wNe=["src","alt"],CNe={key:2,class:"fcrom_media_images"},kNe=["src","alt"],SNe={key:3,class:"fcrom_media_images"},$Ne={class:"fcrom_media_image"},ENe=["src","alt"],xNe={class:"fcom_composer_footer"},MNe={class:"fcom_composer_apps"},TNe=b("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[b("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"}),b("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"}),b("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),ONe={key:0},INe=b("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[b("path",{d:"M1.66663 18.334H18.3333",stroke:"#525866","stroke-width":"1.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),b("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"}),b("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"}),b("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),ANe={class:"fcom_composer_actions"};function NNe(e,t,n,o,r,s){var y,v,w,_,S,x,E,T,O;const i=re("MarkdownEditor"),l=re("SurveyEditForm"),a=pt,u=re("media-preview"),c=Ne,d=re("image-uploader"),f=re("video-embeder"),p=re("EmojiPicker"),h=re("Giphy"),m=zt("loading");return C(),M(fe,null,[b("div",pNe,[b("div",hNe,[he(e.$slots,"before_input"),k(i,{ref:"markdownEditor",hasEveyoneMention:n.hasEveyoneMention,placeholder:n.placeholder,onEditorCreated:t[0]||(t[0]=()=>{e.$emit("editorCreated")}),autofocus:n.autofocus,onHandleMediaUpload:s.uploadImage,defaultMentions:n.defaultMentions,mentionQuery:n.mentionQuery,autofocus_changed:n.autofocus_changed,modelValue:n.content.message,"onUpdate:modelValue":t[1]||(t[1]=P=>n.content.message=P)},null,8,["hasEveyoneMention","placeholder","autofocus","onHandleMediaUpload","defaultMentions","mentionQuery","autofocus_changed","modelValue"]),he(e.$slots,"after_input")]),n.content.survey?(C(),q(l,{key:0,onCancel:t[2]||(t[2]=P=>n.content.survey=null),form:n.content.survey},null,8,["form"])):(C(),M(fe,{key:1},[(v=(y=n.content)==null?void 0:y.media)!=null&&v.type?(C(),M("div",mNe,[k(a,{onClick:t[3]||(t[3]=P=>{n.content.media=null}),text:"",type:"danger"},{default:$(()=>[ne(A(e.$t("Remove Media")),1)]),_:1}),k(u,{media_item:n.content.media},null,8,["media_item"])])):(w=n.content)!=null&&w.meta?(C(),M("div",gNe,[(S=(_=n.content.meta)==null?void 0:_.media_items)!=null&&S.length?(C(!0),M(fe,{key:0},nt(n.content.meta.media_items,(P,N)=>(C(),M("div",{key:N},[P.type=="image"?(C(),M("div",vNe,[b("img",{class:"fcom_media_image",src:P.url,alt:e.$t("Media image")},null,8,yNe),k(a,{class:"fcom_media_images_cross_button",link:"",onClick:F=>n.content.meta.media_items.splice(N,1)},{default:$(()=>[ne(" x ")]),_:2},1032,["onClick"])])):W("",!0)]))),128)):((E=(x=n.content.meta)==null?void 0:x.media_preview)==null?void 0:E.type)=="image"||(O=(T=n.content.meta)==null?void 0:T.media_preview)!=null&&O.image?(C(),M("div",_Ne,[b("div",bNe,[b("img",{class:"fcom_media_image",src:n.content.meta.media_preview.image,alt:e.$t("Media Preview image")},null,8,wNe),k(a,{class:"fcom_media_images_cross_button",link:"",onClick:t[4]||(t[4]=P=>n.content.meta.media_preview=null)},{default:$(()=>[ne(" x ")]),_:1})])])):W("",!0)])):n.content.media_images&&n.content.media_images.length?(C(),M("div",CNe,[(C(!0),M(fe,null,nt(n.content.media_images,(P,N)=>(C(),M("div",{class:"fcrom_media_image",key:N},[b("img",{src:P.url,alt:e.$t("Media image")},null,8,kNe),k(a,{link:"",onClick:F=>n.content.media_images.splice(N,1)},{default:$(()=>[ne(" x ")]),_:2},1032,["onClick"])]))),128))])):s.checkHasImageForCommentsEdit(n.content)?(C(),M("div",SNe,[b("div",$Ne,[b("img",{src:n.content.media.media_url,alt:e.$t("Media image")},null,8,ENe),k(a,{link:"",onClick:t[5]||(t[5]=P=>s.removeImageFromComments())},{default:$(()=>[ne(" x ")]),_:1})])])):W("",!0)],64))]),He((C(),M("div",xNe,[b("div",MNe,[s.hasActiveApp?W("",!0):(C(),M(fe,{key:0},[e.appVars.features.max_media_per_post?(C(),q(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:$(()=>[He((C(),q(a,{"aria-label":"Upload Media",text:""},{default:$(()=>[k(c,{class:"fcom_status_img_icon"},{default:$(()=>[TNe]),_:1}),r.uploading?(C(),M("span",ONe,A(e.$t("Uploading...")),1)):W("",!0)]),_:1})),[[m,r.uploading]])]),_:1},8,["isMultiple","onUploaded"])):W("",!0),n.videoApp&&e.hasFeature("video_embeder")?(C(),q(f,{key:1,onEmbeded:s.handleVideoAttachment},null,8,["onEmbeded"])):W("",!0),n.surveyApp&&e.hasFeature("has_survey_poll")?(C(),q(a,{key:2,"aria-label":"Create Poll",onClick:s.initSurveyForm,text:""},{default:$(()=>[k(c,{class:"fcom_apps_icon"},{default:$(()=>[INe]),_:1})]),_:1},8,["onClick"])):W("",!0),e.hasFeature("emoji_app")?(C(),q(p,{key:3,onEmojiSelected:s.insertEmoji},null,8,["onEmojiSelected"])):W("",!0),e.hasFeature("giphy_app")?(C(),q(h,{key:4,onSelectedGiphy:s.selectedGiphy},null,8,["onSelectedGiphy"])):W("",!0)],64))]),b("div",ANe,[he(e.$slots,"default")])])),[[m,r.uploading]])],64)}const yL=qe(fNe,[["render",NNe]]),PNe={name:"CommentReacts",components:{UserRouteLink:X0},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}))}}},LNe={style:{"margin-left":"5px"}},RNe={key:0},DNe={key:1},FNe={class:"fcom_user_lists"},VNe={key:2};function BNe(e,t,n,o,r,s){const i=lo,l=re("UserAvatar"),a=re("UserRouteLink"),u=ks,c=Po;return C(),q(c,{persistent:!1,placement:"bottom",title:e.$t("Likes"),width:200,trigger:"click",onShow:s.getReactions},{reference:$(()=>[b("span",LNe,A(n.comment.reactions_count),1)]),default:$(()=>[r.loading?(C(),M("div",RNe,[k(i,{animated:!0,rows:1})])):r.reactions?(C(),M("div",DNe,[k(u,{"max-height":"300px"},{default:$(()=>[b("ul",FNe,[(C(!0),M(fe,null,nt(r.reactions,d=>(C(),M("li",null,[d.xprofile?(C(),M(fe,{key:0},[k(l,{with_level:!1,xprofile:d.xprofile},null,8,["xprofile"]),k(a,{show_badge:!0,xprofile:d.xprofile},null,8,["xprofile"])],64)):W("",!0)]))),256))])]),_:1})])):(C(),M("div",VNe,[b("p",null,A(e.$t("Failed to load the list")),1)]))]),_:1},8,["title","onShow"])}const zNe=qe(PNe,[["render",BNe]]),jNe={name:"SingleComment",components:{FeedTextComposer:yL,MediaPreview:Mv},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()}}},HNe={key:0,class:"person_avatar"},UNe={class:"comment_wrap"},WNe={key:0,class:"comment_text"},KNe={class:"comment_text_head"},qNe={class:"comment_text_head_name"},GNe=["title"],YNe={style:{"margin-left":"auto"},class:"comment_actions"},ZNe={class:"actions_items"},JNe=["innerHTML"],XNe={key:0,class:"comment_text_media"},QNe={key:1,class:"comment_text"};function ePe(e,t,n,o,r,s){const i=re("UserAvatar"),l=re("UserRouteLink"),a=re("MoreFilled"),u=Ne,c=pt,d=Po,f=re("MediaPreview"),p=re("feed-text-composer"),h=zt("loading");return C(),M(fe,null,[n.comment.xprofile?(C(),M("div",HNe,[k(i,{with_level:!1,xprofile:n.comment.xprofile,is_rounded:!0},null,8,["xprofile"])])):W("",!0),He((C(),M("div",UNe,[r.isEdit?(C(),M("div",QNe,[k(p,{multipleMedia:!1,content:n.comment,autofocus:!0,onUpdated:t[5]||(t[5]=m=>r.isEdit=!1)},{default:$(()=>[b("div",null,[k(c,{onClick:t[3]||(t[3]=m=>r.isEdit=!1)},{default:$(()=>[ne(A(e.$t("Cancel")),1)]),_:1}),k(c,{type:"primary",onClick:t[4]||(t[4]=m=>s.updateComment(n.comment))},{default:$(()=>[ne(A(e.$t("Update")),1)]),_:1})])]),_:1},8,["content"])])):(C(),M("div",WNe,[b("div",KNe,[b("div",qNe,[k(l,{show_badge:!0,xprofile:n.comment.xprofile},null,8,["xprofile"])]),b("div",{title:n.comment.created_at,class:"comment_text_head_time"},A(e.humanDateDiff(n.comment.created_at)),9,GNe),b("div",YNe,[k(d,{persistent:!1,placement:"bottom",ref:"comment_actions",width:200,trigger:"click"},{reference:$(()=>[k(c,{"aria-label":e.$t("View comment actions"),class:"fcom_dot_menu",size:"small",text:""},{default:$(()=>[k(u,null,{default:$(()=>[k(a)]),_:1})]),_:1},8,["aria-label"])]),default:$(()=>[b("ul",ZNe,[b("li",{onClick:t[0]||(t[0]=m=>s.copyCommentLink(n.comment))},A(e.$t("Copy Link")),1),e.canEditComment(n.comment)?(C(),M("li",{key:0,onClick:t[1]||(t[1]=m=>s.editComment())},A(e.$t("Edit")),1)):W("",!0),e.canDeleteComment(n.comment)?(C(),M("li",{key:1,onClick:t[2]||(t[2]=m=>s.deleteComment())},A(e.$t("Delete")),1)):W("",!0)])]),_:1},512)])]),b("div",{class:"comment_text_body feed_md_content",innerHTML:s.renderedComment(n.comment.message_rendered)},null,8,JNe),n.comment.meta.media_preview?(C(),M("div",XNe,[k(f,{media_item:n.comment.meta.media_preview},null,8,["media_item"])])):W("",!0)])),he(e.$slots,"after_comment_text")])),[[h,r.working]])],64)}const tPe=qe(jNe,[["render",ePe]]),nPe={name:"IndividualCommentReply",components:{FeedTextComposer:yL,HeartIcon:vL,SingleComment:tPe,CommentReactions:zNe},props:["comment","comments"],data(){return{commenting:!0,replyingComment:{},newComment:{message:"",media_images:[]},saving:!1}},watch:{comment:{handler(){this.updateReplyingComment()},immediate:!0}},methods:{toggleCommentBox(){this.commenting=!this.commenting},toggleLike(e){this.$emit("toggleLike",e)},postComment(){if(!this.newComment.message){this.$notify({title:this.$t("Error"),message:this.$t("Please write a reply first"),type:"error"});return}this.saving=!0,this.$post("feeds/"+this.comment.post_id+"/comments",{comment:this.newComment.message,parent_id:this.comment.id,media_images:this.newComment.media_images}).then(e=>{this.comment.comments.push(e.comment),this.newComment={message:"",media_images:[]}}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},updateReplyingComment(){this.comment.parent_id&&this.comments?(this.replyingComment=this.comments.find(e=>e.id===parseInt(this.comment.parent_id))||this.comment,this.replyingComment.comments=this.comments.filter(e=>parseInt(e.parent_id)===this.replyingComment.id)):this.replyingComment=this.comment}},mounted(){this.updateReplyingComment()}},oPe={class:"fcom_course_comment each_comment"},rPe={key:0,class:"person_avatar"},sPe=["src","alt"],iPe={class:"comment_wrap"},lPe={class:"comment_text"},aPe={class:"comment_text_head"},uPe={class:"comment_text_head_name"},cPe={class:"comment_text_head_time"},dPe=["innerHTML"],fPe={class:"reply_box"},pPe={class:"fcom_comments_react"},hPe={class:"child_comments"},mPe=["id"],gPe={class:"reply_box"},vPe=["onClick"],yPe={class:"fcom_comments_react fcom_reaction_list"},_Pe={key:0,class:"child_reply_wrap"},bPe={class:"feed_commenting"},wPe={class:"person_avatar"},CPe=["src"],kPe={class:"feed_comment_input comment_text"};function SPe(e,t,n,o,r,s){const i=re("UserRouteLink"),l=re("HeartIcon"),a=Ne,u=re("CommentReactions"),c=re("single-comment"),d=pt,f=re("FeedTextComposer"),p=zt("loading");return C(),M("div",oPe,[r.replyingComment.xprofile?(C(),M("div",rPe,[b("img",{src:r.replyingComment.xprofile.avatar,alt:e.$t("avatar")},null,8,sPe)])):W("",!0),b("div",iPe,[b("div",lPe,[b("div",aPe,[b("div",uPe,[k(i,{xprofile:r.replyingComment.xprofile},null,8,["xprofile"])]),b("div",cPe,A(e.humanDateDiff(r.replyingComment.created_at)),1)]),b("div",{class:"comment_text_body",innerHTML:r.replyingComment.message_rendered},null,8,dPe)]),b("div",fPe,[b("span",{onClick:t[0]||(t[0]=(...h)=>s.toggleCommentBox&&s.toggleCommentBox(...h)),class:"reply_btn"},A(e.$t("Reply")),1),b("span",{style:{"margin-left":"14px"},class:D([{fcom_is_liked:r.replyingComment.liked},"reply_btn"])},[b("div",pPe,[k(a,{class:D({user_reacted:r.replyingComment.liked}),onClick:t[1]||(t[1]=h=>s.toggleLike(n.comment))},{default:$(()=>[k(l,{filled:r.replyingComment.liked},null,8,["filled"])]),_:1},8,["class"]),parseInt(r.replyingComment.reactions_count)?(C(),q(u,{key:0,comment:n.comment},null,8,["comment"])):W("",!0)])],2)]),b("div",hPe,[(C(!0),M(fe,null,nt(r.replyingComment.comments,(h,m)=>(C(),M("div",{id:"comment_"+h.id,class:"each_comment"},[k(c,{onDeleted:y=>e.handleCommentDelete(m),comment:h},{after_comment_text:$(()=>[b("div",gPe,[b("span",{onClick:y=>s.toggleCommentBox(h),class:"reply_btn"},A(e.$t("Reply")),9,vPe),b("span",{style:{"margin-left":"14px"},class:D([{fcom_is_liked:h.liked},"reply_btn"])},[b("div",yPe,[k(a,{class:D({user_reacted:h.liked}),onClick:y=>s.toggleLike(h)},{default:$(()=>[k(l,{filled:h.liked},null,8,["filled"])]),_:2},1032,["class","onClick"]),parseInt(h.reactions_count)?(C(),q(u,{key:0,comment:h},null,8,["comment"])):W("",!0)])],2)])]),_:2},1032,["onDeleted","comment"])],8,mPe))),256))]),r.commenting?(C(),M("div",_Pe,[b("div",bPe,[b("div",wPe,[b("img",{alt:"",src:e.auth.avatar},null,8,CPe)]),b("div",kPe,[k(f,{mentionQuery:{space_id:r.replyingComment.space_id},autofocus_changed:r.commenting,autofocus:r.commenting,disabled:r.saving,placeholder:e.$t("Write a reply"),content:r.newComment},{default:$(()=>[He((C(),q(d,{disabled:r.saving,class:"fcom_primary_button",onClick:t[2]||(t[2]=h=>s.postComment())},{default:$(()=>[ne(A(e.$t("Reply")),1)]),_:1},8,["disabled"])),[[p,r.saving]])]),_:1},8,["mentionQuery","autofocus_changed","autofocus","disabled","placeholder","content"])])])])):W("",!0)])])}const $Pe=qe(nPe,[["render",SPe]]),EPe={name:"CourseComments",props:["course"],components:{IndividualCommentReply:$Pe,Pagination:gL,ChatIcon:CAe,HeartIcon:vL},data(){return{comments:[],loading:!0,pagination:{page:1,per_page:10,total:0},working:!1,replyingComemnt:null,isReplying:!1}},methods:{fetchComments(){this.loading=!0,this.$get("admin/courses/"+this.course.id+"/comments",{page:this.pagination.page,per_page:this.pagination.per_page}).then(e=>{this.comments=e.comments.data,this.pagination.total=e.comments.total,window.scrollTo(0,0)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},toggleLike(e){const t=!e.liked;this.$post("feeds/"+e.post_id+"/comments/"+e.id+"/reactions",{state:t?1:0}).then(n=>{e.liked=n.liked,e.reactions_count=n.reactions_count}).catch(n=>{this.$handleError(n)})},deleteComment(e,t){this.$confirm(this.$t("Are you sure you want to delete this comment and 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})}},mounted(){this.fetchComments()}},xPe={key:0,class:"white_loaded"},MPe={class:"fcom_course_comments_header"},TPe={key:0},OPe={class:"course_comments feed_comments overview_comments"},IPe={key:0,class:"person_avatar"},APe={class:"comment_wrap"},NPe={class:"comment_text"},PPe={class:"comment_text_head"},LPe={class:"comment_text_head_name"},RPe={class:"comment_text_head_time"},DPe={class:"comment_actions"},FPe={class:"actions_items"},VPe=["onClick"],BPe={class:"comment_text_details"},zPe=["href"],jPe=["innerHTML"],HPe={class:"comment_text_actions"},UPe={key:0},WPe={key:1};function KPe(e,t,n,o,r,s){const i=lo,l=re("UserAvatar"),a=re("UserRouteLink"),u=re("MoreFilled"),c=Ne,d=pt,f=Po,p=re("ChatIcon"),h=re("HeartIcon"),m=re("pagination"),y=re("IndividualCommentReply"),v=Ql,w=zt("loading");return r.loading?(C(),M("div",xPe,[k(i,{row:5})])):(C(),M(fe,{key:1},[b("div",MPe,[r.pagination.total?(C(),M("h5",TPe,A(e.$t("Comments (%s)",r.pagination.total)),1)):W("",!0)]),b("div",OPe,[(C(!0),M(fe,null,nt(r.comments,(_,S)=>(C(),M("div",{key:_.id,class:"fcom_course_comment each_comment"},[_.xprofile?(C(),M("div",IPe,[k(l,{with_level:!1,xprofile:_.xprofile},null,8,["xprofile"])])):W("",!0),b("div",APe,[b("div",NPe,[b("div",PPe,[b("div",LPe,[k(a,{xprofile:_.xprofile},null,8,["xprofile"])]),b("div",RPe,A(e.humanDateDiff(_.created_at)),1),He((C(),M("div",DPe,[e.canDeleteComment(_)?(C(),q(f,{key:0,persistent:!1,placement:"bottom",width:200,trigger:"click"},{reference:$(()=>[k(d,{"aria-label":e.$t("View actions"),class:"fcom_dot_menu",text:""},{default:$(()=>[k(c,null,{default:$(()=>[k(u)]),_:1})]),_:1},8,["aria-label"])]),default:$(()=>[b("ul",FPe,[b("li",{onClick:x=>s.deleteComment(_,S)},"Delete",8,VPe)])]),_:2},1024)):W("",!0)])),[[w,r.working]])]),b("div",BPe,[b("a",{href:e.$getRouteLink("course/:course_slug/lessons/:lesson_slug/view?comment_id=:comment_id&show_comments=true",{course_slug:n.course.slug,lesson_slug:_.post.slug,comment_id:_.id})},[ne(A(e.$t("Commented in"))+" ",1),b("b",null,A(e.getExcerpt(_.post.title,60)),1)],8,zPe)]),b("div",{class:"comment_text_body",innerHTML:_.message_rendered},null,8,jPe),b("div",HPe,[k(d,{onClick:x=>s.initCommentReply(_),text:""},{default:$(()=>[k(c,null,{default:$(()=>[k(p)]),_:1}),b("span",null,A(e.$t("Reply")),1)]),_:2},1032,["onClick"]),k(d,{text:""},{default:$(()=>[k(c,{class:D({user_reacted:_.liked}),onClick:x=>s.toggleLike(_)},{default:$(()=>[k(h,{filled:_.liked},null,8,["filled"])]),_:2},1032,["class","onClick"]),b("span",null,A(_.reactions_count||""),1)]),_:2},1024)])])])]))),128)),r.pagination.total?W("",!0):(C(),M("div",UPe,[b("h5",null,A(e.$t("No comments from any lessons yet! Comments from all the lessons will be shown here")),1)]))]),k(m,{pagination:r.pagination,onFetch:s.fetchComments},null,8,["pagination","onFetch"]),k(v,{"append-to-body":!0,modelValue:r.isReplying,"onUpdate:modelValue":t[0]||(t[0]=_=>r.isReplying=_),size:e.dialogWidth},{header:$(()=>{var _;return[b("p",null,[ne(A(e.$t("Replying to"))+" ",1),b("b",null,A((_=r.replyingComemnt)==null?void 0:_.post.title),1)])]}),default:$(()=>[r.replyingComemnt?(C(),q(y,{key:0,comment:r.replyingComemnt,comments:r.comments,onToggleLike:s.toggleLike},null,8,["comment","comments","onToggleLike"])):(C(),M("h3",WPe,A(e.$t("Replying to Let's check this out! Let's do it Replying to Let's check this out! Let's do it")),1))]),_:1},8,["modelValue","size"])],64))}const qPe=qe(EPe,[["render",KPe]]),GPe={name:"CourseOverview",props:["course","course_id"],components:{CourseComments:qPe}},YPe={class:"fcom_cards fcom_cards_2"},ZPe={class:"fcom_card"},JPe={class:"fcom_card_body"},XPe={class:"fcom_card"},QPe={class:"fcom_card_body"};function eLe(e,t,n,o,r,s){const i=re("course-comments");return C(),M(fe,null,[b("div",YPe,[b("div",ZPe,[b("div",JPe,[b("p",null,A(e.$t("Students")),1),b("h3",null,A(n.course.students_count),1)])]),b("div",XPe,[b("div",QPe,[b("p",null,A(e.$t("Average completion rate")),1),b("h3",null,A(n.course.overAllProgress)+"%",1)])])]),k(i,{course:n.course},null,8,["course"])],64)}const tLe=qe(GPe,[["render",eLe]]),nLe={name:"SpaceIcon",props:["space_profile"]},oLe=["alt","src"],rLe={key:1,class:"fcom_emoji"},sLe={key:2,class:"fcom_shape"},iLe={key:3,class:"fcom_no_avatar"};function lLe(e,t,n,o,r,s){var l,a,u,c;const i=Ne;return n.space_profile.logo?(C(),M("img",{key:0,alt:e.$t("Space Logo"),src:n.space_profile.logo},null,8,oLe)):(l=n.space_profile.settings)!=null&&l.emoji?(C(),M("span",rLe,A((a=n.space_profile.settings)==null?void 0:a.emoji),1)):(u=n.space_profile.settings)!=null&&u.shape_svg?(C(),M("span",sLe,[k(i,{innerHTML:(c=n.space_profile.settings)==null?void 0:c.shape_svg},null,8,["innerHTML"])])):(C(),M("span",iLe))}const aLe=qe(nLe,[["render",lLe]]),uLe={name:"AllTopics",components:{SlugInput:Pk,SpaceIcon:aLe,Layout:ri,AppLayout:si},data(){return{topics:[],saving:!1,loading:!1,search:"",showModal:!1,editing_topic:{title:"",slug:"",space_ids:[],admin_only:"no"},all_spaces:[],formattedSpaceGroups:{}}},methods:{updateTopic(){this.saving=!0,this.$post("admin/topics",this.editing_topic).then(e=>{this.$notify.success(e.message),this.fetch(),this.showModal=!1}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},showForm(e){this.editing_topic=e||{title:"",slug:"",space_ids:[],admin_only:"no"},this.showModal=!0},fetch(){this.loading=!0,this.$get("admin/topics",{search:this.search}).then(e=>{this.topics=e.topics,this.all_spaces=e.all_spaces,this.formatSpaceGroups()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},removeTopic(e){this.$confirm(this.$t("Are you sure you want to remove this topic?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Remove"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.saving=!0,this.$del("admin/topics/"+e.id).then(t=>{this.$notify.success(t.message),this.fetch()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})})},formatSpaceGroups(){let e=this.all_spaces,t=this.appVars.space_groups,n=[],o=[];this.each(t,r=>{let s=e.filter(i=>{let l=i.parent_id==r.id;return l&&o.push(i.slug),l});s.length&&n.push({label:r.title,spaces:s})}),this.formattedSpaceGroups=n},formatTopics(e){let t=this.all_spaces,n=[];return e.forEach(o=>{let r=t.find(s=>s.id==o);r&&n.push(r.title)}),n.join(", ")}},mounted(){this.has_pro&&this.fetch(),this.changeTitle(this.$t("Topics Settings"))}},cLe=["href"],dLe={class:""},fLe={class:"fhr_content_layout_body"},pLe={key:0},hLe={style:{"margin-bottom":"10px"},class:"fcom_manager_actions"},mLe={class:"bulk_search"},gLe=b("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[b("path",{d:"M14.5833 14.584L18.3333 18.334",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),b("path",{d:"M16.6667 9.16699C16.6667 5.02486 13.3088 1.66699 9.16666 1.66699C5.02453 1.66699 1.66666 5.02486 1.66666 9.16699C1.66666 13.3091 5.02453 16.667 9.16666 16.667C13.3088 16.667 16.6667 13.3091 16.6667 9.16699Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})],-1),vLe={class:"fcom_table_action_col"},yLe={key:1,class:"setting_body",style:{"text-align":"center"}},_Le=b("p",null,"Create Post Topic and assign to your spaces. Then users can choose one or multiple topic for each post. This feature is available on the premium version of FluentCommunity. Please upgrade to pro",-1),bLe=["href"],wLe={class:"dialog_header"},CLe={class:"dialog_left"},kLe=b("div",{class:"header_icon"},[b("svg",{viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"},[b("path",{d:"M2.73552 11.6867C1.78253 12.7511 1.76203 14.3569 2.63665 15.4865C4.37226 17.7281 6.2719 19.6277 8.51351 21.3633C9.64313 22.238 11.2489 22.2175 12.3133 21.2645C15.203 18.6771 17.8494 15.9731 20.4033 13.0016C20.6558 12.7078 20.8137 12.3477 20.8492 11.9619C21.0059 10.2561 21.3279 5.34144 19.9932 4.00675C18.6586 2.67207 13.7439 2.99408 12.0381 3.15083C11.6523 3.18627 11.2922 3.34421 10.9984 3.59671C8.02692 6.15064 5.32291 8.797 2.73552 11.6867Z",stroke:"currentColor","stroke-width":"1.5"}),b("path",{opacity:"0.4",d:"M7.5 14.5L9.5 16.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),b("path",{d:"M18 6L22 2",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})])],-1),SLe={key:0,class:"dialog_body"},$Le={key:0,class:"fcom_space_title"},ELe={key:0},xLe={key:1},MLe={class:"fcom_help_text"};function TLe(e,t,n,o,r,s){const i=re("Plus"),l=Ne,a=pt,u=At,c=Y0,d=G0,f=re("layout"),p=re("app-layout"),h=io,m=re("slug-input"),y=re("SpaceIcon"),v=Ss,w=xae,_=vr,S=Hn,x=so,E=yh,T=zt("loading");return C(),M(fe,null,[k(p,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:$(()=>[k(f,{wrapper_class:"no_bg_layout fcom_setting_route",title:e.$t("Topics")},{actions:$(()=>[e.has_pro?(C(),q(a,{key:0,class:"fcom_primary_button",onClick:t[0]||(t[0]=O=>s.showForm(null))},{default:$(()=>[k(l,null,{default:$(()=>[k(i)]),_:1}),b("span",null,A(e.$t("New Topic")),1)]),_:1})):(C(),M("a",{key:1,target:"_blank",rel:"noopener",href:e.appVars.upgrade_url,class:"el-button el-button--danger"},A(e.$t("Upgrade to Pro")),9,cLe))]),default:$(()=>[b("div",dLe,[b("div",fLe,[e.has_pro?(C(),M("div",pLe,[b("p",null,A(e.$t("Categorize your content and allow members to filter posts with the topic navigation bar in spaces.")),1),b("div",hLe,[b("div",mLe,[k(u,{modelValue:r.search,"onUpdate:modelValue":t[1]||(t[1]=O=>r.search=O),onKeydown:Pt(s.fetch,["enter"]),placeholder:e.$t("Search"),class:"el-input-round"},{prefix:$(()=>[gLe]),_:1},8,["modelValue","onKeydown","placeholder"])])]),He((C(),q(d,{data:r.topics},{default:$(()=>[k(c,{label:e.$t("Title"),"min-width":"160"},{default:$(O=>[ne(A(O.row.title),1)]),_:1},8,["label"]),k(c,{label:e.$t("Spaces"),"min-width":"200"},{default:$(O=>[b("span",null,A(s.formatTopics(O.row.space_ids)),1)]),_:1},8,["label"]),k(c,{label:e.$t("Admin Only?"),width:"140"},{default:$(O=>[b("span",null,A(O.row.admin_only=="yes"?e.$t("Yes"):e.$t("No")),1)]),_:1},8,["label"]),k(c,{label:e.$t("Actions"),width:"180"},{default:$(O=>[b("div",vLe,[k(a,{onClick:P=>s.showForm(O.row),size:"small"},{default:$(()=>[ne(A(e.$t("Edit")),1)]),_:2},1032,["onClick"]),k(a,{onClick:P=>s.removeTopic(O.row),type:"danger",plain:"",size:"small"},{default:$(()=>[ne(A(e.$t("Remove")),1)]),_:2},1032,["onClick"])])]),_:1},8,["label"])]),_:1},8,["data"])),[[T,r.loading]])])):(C(),M("div",yLe,[_Le,b("a",{target:"_blank",rel:"noopener",href:e.appVars.upgrade_url,class:"el-button el-button--danger"},A(e.$t("Upgrade to Pro")),9,bLe)]))])])]),_:1},8,["title"])]),_:1}),k(E,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:e.dialogWidth,modelValue:r.showModal,"onUpdate:modelValue":t[8]||(t[8]=O=>r.showModal=O),direction:"rtl"},{header:$(({close:O})=>[b("div",wLe,[b("div",CLe,[kLe,b("div",null,[b("h4",null,A(e.$t(r.editing_topic.id?"Update Tipic":"Add Topic")),1)])])])]),default:$(()=>[r.showModal?(C(),M("div",SLe,[k(x,{onSubmit:t[6]||(t[6]=et(O=>e.doNothing(),["prevent"])),modelValue:r.editing_topic,"onUpdate:modelValue":t[7]||(t[7]=O=>r.editing_topic=O),"label-position":"top"},{default:$(()=>[k(h,{label:e.$t("Topic Title")},{default:$(()=>[k(u,{placeholder:e.$t("Title of your topic"),modelValue:r.editing_topic.title,"onUpdate:modelValue":t[2]||(t[2]=O=>r.editing_topic.title=O),type:"text"},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),k(h,{label:e.$t("Topic Slug")},{default:$(()=>[k(m,{disabled:!!r.editing_topic.id,modelValue:r.editing_topic.slug,"onUpdate:modelValue":t[3]||(t[3]=O=>r.editing_topic.slug=O),placeholder:e.$t("Slug of your topic")},null,8,["disabled","modelValue","placeholder"])]),_:1},8,["label"]),k(h,{label:e.$t("Space visibility")},{default:$(()=>[k(_,{modelValue:r.editing_topic.space_ids,"onUpdate:modelValue":t[4]||(t[4]=O=>r.editing_topic.space_ids=O),multiple:"",placeholder:e.$t("Select Spaces"),style:{width:"100%"}},{default:$(()=>[(C(!0),M(fe,null,nt(r.formattedSpaceGroups,O=>(C(),q(w,{key:O.label,label:O.label},{default:$(()=>[(C(!0),M(fe,null,nt(O.spaces,P=>(C(),q(v,{key:P.slug,label:P.title,value:P.id.toString()},{default:$(()=>[P.id?(C(),M("span",$Le,[k(y,{space_profile:P},null,8,["space_profile"]),b("span",null,[ne(A(e.getExcerpt(P.title,50))+" ",1),P.type=="course"?(C(),M("span",ELe," ("+A(e.$t("course"))+")",1)):W("",!0)])])):(C(),M("span",xLe,A(e.getExcerpt(P.title,50)),1))]),_:2},1032,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","placeholder"]),b("div",MLe,[b("p",null,A(e.$t("Select spaces where this topic will be visible.")),1)])]),_:1},8,["label"]),k(h,null,{default:$(()=>[k(S,{modelValue:r.editing_topic.admin_only,"onUpdate:modelValue":t[5]||(t[5]=O=>r.editing_topic.admin_only=O),"true-value":"yes","false-value":"no"},{default:$(()=>[ne(A(e.$t("Only admins and moderators can select this topic")),1)]),_:1},8,["modelValue"])]),_:1}),k(h,null,{default:$(()=>[He((C(),q(a,{type:"primary",onClick:s.updateTopic,disabled:r.saving},{default:$(()=>[ne(A(e.$t("Save")),1)]),_:1},8,["onClick","disabled"])),[[T,r.saving]])]),_:1})]),_:1},8,["modelValue"])])):W("",!0)]),_:1},8,["width","modelValue"])],64)}const OLe=qe(uLe,[["render",TLe]]),ILe=[{path:"/settings",component:kfe,meta:{active_menu:"settings"},children:[{name:"settings",path:"",component:dhe,meta:{active_menu:"settings"}},{name:"customization",path:"customization",component:kSe,meta:{active_menu:"settings"}},{name:"admin_moderators",path:"moderators",component:G0e,meta:{active_menu:"settings"}},{name:"email_notifications",path:"email-notifications",component:J8e,meta:{active_menu:"settings"}},{name:"features",path:"features",component:_7e,meta:{active_menu:"settings"}},{name:"menu_settings",path:"menu-settings",component:axe,meta:{active_menu:"settings"}},{path:"space_groups",name:"space_groups",component:tMe,meta:{active_menu:"settings"}},{path:"topics-settings",name:"all_topics",component:OLe,meta:{active_menu:"settings"}}]},{path:"/manage-courses",component:VMe,name:"manage_courses",meta:{active_menu:"manage_courses"}},{path:"/manage-courses/edit/:course_id",component:NOe,props:!0,meta:{active_menu:"manage_courses"},children:[{name:"edit_lessons",path:"lessons",component:ZIe,props:!0,meta:{active_menu:"manage_courses"}},{name:"course_students",path:"students",component:mAe,props:!0,meta:{active_menu:"manage_courses"}},{name:"course_overview",path:"overview",component:tLe,props:!0,meta:{active_menu:"manage_courses"}}]}],ALe={name:"VerifiedSign"},NLe={class:"fcom_verified"},PLe=b("svg",{viewBox:"0 0 22 22","aria-label":"Verified account",role:"img","data-testid":"icon-verified"},[b("g",null,[b("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),LLe=[PLe];function RLe(e,t,n,o,r,s){return C(),M("span",NLe,LLe)}const DLe=qe(ALe,[["render",RLe]]),FLe={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}}},VLe=["title"],BLe=["src"],zLe={key:1,class:"fcom_emoji"},jLe={key:2,class:"fcom_shape"},HLe={key:1};function ULe(e,t,n,o,r,s){const i=Ne;return s.renderingBadge?(C(),M("div",{key:0,class:D([{user_icon_only:s.renderingBadge.show_label!="yes"},"user_badge"])},[b("div",{style:Qe({backgroundColor:s.renderingBadge.background_color,color:s.renderingBadge.color,borderColor:s.renderingBadge.color}),title:s.renderingBadge.title,class:"user_badge_inner"},[s.renderingBadge.config?(C(),M(fe,{key:0},[s.renderingBadge.config.logo?(C(),M("img",{key:0,alt:"",src:s.renderingBadge.config.logo},null,8,BLe)):s.renderingBadge.config.emoji?(C(),M("span",zLe,A(s.renderingBadge.config.emoji),1)):s.renderingBadge.config.shape_svg?(C(),M("span",jLe,[k(i,{innerHTML:s.renderingBadge.config.shape_svg},null,8,["innerHTML"])])):W("",!0)],64)):W("",!0),s.renderingBadge.show_label=="yes"?(C(),M("span",HLe,A(s.renderingBadge.title),1)):W("",!0)],12,VLe)],2)):W("",!0)}const WLe=qe(FLe,[["render",ULe]]),KLe={name:"WelcomeBanner",components:{MediaPreview:Mv},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)}}},qLe={key:0,class:"fcom_welcome_box"},GLe={key:2,class:"fcom_welcome_title"},YLe=["innerHTML"],ZLe={key:4,class:"fcom_welcome_cta_buttons"},JLe=["href","target"];function XLe(e,t,n,o,r,s){const i=re("media-preview"),l=Ed,a=re("MoreFilled"),u=Ne,c=pt,d=bh,f=wh,p=_h;return r.config&&s.showBanner?(C(),M("div",qLe,[s.showMedia?(C(),q(i,{key:0,media_item:r.config.bannerVideo},null,8,["media_item"])):r.config.bannerImage?(C(),q(l,{key:1,class:"feed_media",alt:e.$t("Image Preview"),src:r.config.bannerImage},null,8,["alt","src"])):W("",!0),r.config.title?(C(),M("h2",GLe,A(r.config.title),1)):W("",!0),r.config.description_rendered?(C(),M("div",{key:3,class:"fcom_welcome_sub",innerHTML:r.config.description_rendered},null,8,YLe)):W("",!0),s.showCtaButtons?(C(),M("div",ZLe,[(C(!0),M(fe,null,nt(r.config.ctaButtons,h=>(C(),M(fe,null,[h.link&&h.label?(C(),M("a",{key:0,href:h.link,target:h.newTab=="yes"?"_blank":"_self",class:D({"el-button fcom_primary_button":h.type=="primary","el-button fcom_secondary_button":h.type=="secondary","el-button is-text":h.type=="text","el-link fcom_link_button":h.type=="link"})},A(h.label),11,JLe)):W("",!0)],64))),256))])):W("",!0),s.isRemovable?(C(),q(p,{key:5,trigger:"click",class:"fcom_welcome_close"},{dropdown:$(()=>[k(f,null,{default:$(()=>[k(d,{onClick:s.closeBanner},{default:$(()=>[ne(A(e.$t("Hide Banner")),1)]),_:1},8,["onClick"])]),_:1})]),default:$(()=>[k(c,{"aria-label":e.$t("Hide Banner"),class:"fcom_dot_menu",size:"small",text:""},{default:$(()=>[k(u,null,{default:$(()=>[k(a)]),_:1})]),_:1},8,["aria-label"])]),_:1})):W("",!0)])):W("",!0)}const QLe=qe(KLe,[["render",XLe]]);Yd(()=>Promise.resolve().then(()=>$Fe),void 0);const eRe=[BY,rZ,uZ,BZ,tJ,bZ,$Z,sJ,AY,RY,nM,eM,AZ,MY,xZ,N0,Qx,kZ,c3,js,oJ,au,Su,jY,Y_,lJ,dZ,vZ,WZ,EY,YY,RZ,u3,hZ,OY,XY,PZ,Xx,tM,l3];function ap(e){const t=[];if(typeof e=="object"&&e.join===void 0)for(const n in e)t.push(ap(e[n]));else if(typeof e=="object"&&e.join!==void 0)for(const n in e)t.push(ap(e[n]));else typeof e=="function"||typeof e=="string"&&t.push(e);return t.join("<br />")}const Wn=ww(bfe);Wn.use(Ode);Wn.config.globalProperties.appVars=window.fluentComAdmin;Wn.config.globalProperties.auth=window.fluentComAdmin.auth;Wn.config.globalProperties.has_pro=!!window.fluentComAdmin.pro;let N2="40%",P2="60%";window.innerWidth<600?(P2="95%",N2="90%"):window.innerWidth<800&&(P2="80%",N2="80%");eRe.forEach(e=>{Wn.component(e.name,e)});Wn.component("VerifiedSign",DLe);Wn.component("UserAvatar",eI);Wn.component("UserRouteLink",X0);Wn.component("WelcomeBanner",QLe);Wn.component("UserBadge",WLe);function e$(){Wn.use(window.FluentCommunityUtil.eventBus);const e=window.FluentCommunityUtil.Rest;Wn.mixin({data(){return{Storage:window.FluentCommunityUtil.Storage,is_rtl:!1,drawerWidth:N2,dialogWidth:P2,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=ap(r),s||(s="Something is wrong!"),typeof s!="string"&&(s=ap(s)),this.$notify({type:"error",title:"Error",message:s,dangerouslyUseHTMLString:!0})},convertToText:ap,$t(r){r=window.fluentComAdmin.i18n[r]||r;const s=Array.prototype.slice.call(arguments,1);if(s.length===0)return r;const i=/%(\d*)s|%d/g;let l=0;return r=r.replace(i,(a,u)=>{if(u){const c=parseInt(u,10)-1;return c<s.length?s[c]:a}else return l<s.length?s[l++]:a}),r},$_n(r,s,i){return i>1?this.$t(s,i):this.$t(r,i)},$labelize(r){return r?(r=r.charAt(0).toUpperCase()+r.slice(1),window.fluentComAdmin.i18n[r]?window.fluentComAdmin.i18n[r]:r.replace(/_/g," ").replace(/\b\w/g,s=>s.toUpperCase())):""},dayjs,relativeTimeFromUtc(r){return dayjs.utc(r).local().fromNow()},$storeLocalData(r,s){this.Storage.set(r,s)},$getLocalData(r,s=""){return this.Storage.get(r,s)},ucFirst(r){return r?r.charAt(0).toUpperCase()+r.slice(1):""},ucWords(r){return r?r.replace(/\b[a-z]/g,function(s){return s.toUpperCase()}):""},smartDate(r,s=!1,i=!1){if(!r)return"";let l="D MMM, YYYY";dayjs(r).isSame(new Date,"year")?(l="D MMM",s&&(Math.abs(dayjs(r).diff(new Date,"days"))<=5||i)&&(dayjs(r).minute()==0?l="D MMM, ha":l="D MMM, hh:mma")):s&&i&&(l="D MMM, YYYY, hh:mma");const a=dayjs(r);return a.isValid()?a.format(l):null},hasPermission(r){return this.appVars.permissions[r]},isAdmin(){return!!this.appVars.permissions.community_admin},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:cu,hasFeature(r){return this.appVars.features[r]},isCommunityModerator(){return window.fluentComAdmin.auth.community_roles.some(r=>r==="admin"||r==="moderator")},isSpaceModerator(r){var i,l;return["admin","moderator"].includes((l=(i=r.membership)==null?void 0:i.pivot)==null?void 0:l.role)},getCurrentAuthUrl(){let r=window.location.href,s=this.appVars.auth_url;return s=s.replace(/(\?|&)redirect_to=[^&]+/,""),s.indexOf("?")===-1?s+="?":s+="&",s+"redirect_to="+encodeURIComponent(r)},$formatNumber(r){return r&&r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},$getRouteLink(r,s={}){return cu(s,(i,l)=>{r=r.replace(":"+l,i)}),this.appVars.portal_url+r},isOnline(r){if(!r)return!1;const i=dayjs.utc(r,"YYYY-MM-DD HH:mm:ss").add(this.appVars.date_offset,"seconds").diff(dayjs.utc(),"minutes");return i<=5&&i>=0},doNothing(){console.log("OK")}},mounted(){window.fcom_mounted||(window.fcom_mounted=!0,this.isMobile&&dayjs.updateLocale("en",{relativeTime:{future:"in %s",past:"%s",s:"now",m:"1m",mm:"%dm",h:"1 h",hh:"%d h",d:"%dd",dd:"%dd",M:"1 mo",MM:"%d mo",y:"%d y",yy:"%d y"}}))}}),Wn.config.globalProperties.$notify=nfe,Wn.config.globalProperties.$confirm=fy.confirm,Wn.config.globalProperties.$promt=fy.prompt,Wn.config.globalProperties.$messageBox=fy,Wn.config.globalProperties.$gloablStorage={};const t=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_admin_routes",ILe);let n=null;window.fluentComAdmin.routing_system=="hash"?n=y6({routes:t,history:tj()}):n=y6({routes:t,history:ix(window.fluentComAdmin.portal_slug)});const o=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_admin_app",Wn);window.fluentFrameworkApp=o.use(n).mount("#fluent_com_portal"),window.fluentFrameworkAppRouter=n}window.FluentCommunityUtil?e$():document.addEventListener("fluentCommunityUtilReady",function(){e$()});var Fa,Pc;class tRe{constructor(t){xs(this,Fa,void 0);xs(this,Pc,new Set);Lo(this,Fa,t)}get current(){return kt(this,Fa)}set current(t){kt(this,Fa)!=t&&(Lo(this,Fa,t),kt(this,Pc).forEach(n=>n(t)))}on(t){return kt(this,Pc).add(t),()=>kt(this,Pc).delete(t)}}Fa=new WeakMap,Pc=new WeakMap;const _L=e=>new tRe(e),L2=Symbol.for("atomico.hooks");globalThis[L2]=globalThis[L2]||{};let md=globalThis[L2];const nRe=Symbol.for("Atomico.suspense"),bL=Symbol.for("Atomico.effect"),oRe=Symbol.for("Atomico.layoutEffect"),wL=Symbol.for("Atomico.insertionEffect"),Vh=(e,t,n)=>{const{i:o,hooks:r}=md.c,s=r[o]=r[o]||{};return s.value=e(s.value),s.effect=t,s.tag=n,md.c.i++,r[o].value},Rk=e=>Vh((t=_L(e))=>t),CL=()=>Vh((e=_L(md.c.host))=>e),kL=()=>md.c.update,rRe=(e,t,n=0)=>{let o={},r=!1;const s=()=>r,i=(u,c)=>{for(const d in o){const f=o[d];f.effect&&f.tag===u&&(f.value=f.effect(f.value,c))}};return{load:u=>{md.c={host:t,hooks:o,update:e,i:0,id:n};let c;try{r=!1,c=u()}catch(d){if(d!==nRe)throw d;r=!0}finally{md.c=null}return c},cleanEffects:u=>(i(wL,u),()=>(i(oRe,u),()=>{i(bL,u)})),isSuspense:s}},Bh=Symbol.for;function SL(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 Ci=e=>typeof e=="function",up=e=>typeof e=="object",{isArray:sRe}=Array,R2=(e,t)=>(t?e instanceof HTMLStyleElement:!0)&&"hydrate"in((e==null?void 0:e.dataset)||{});function $L(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 EL=(e,t,n)=>(e.addEventListener(t,n),()=>e.removeEventListener(t,n));let xL=class{constructor(t,n,o){this.message=n,this.target=t,this.value=o}};class iRe extends xL{}class lRe extends xL{}const s0="Custom",aRe=null,uRe={true:1,"":1,1:1};function cRe(e,t,n,o,r){const{type:s,reflect:i,event:l,value:a,attr:u=fRe(t)}=(n==null?void 0:n.name)!=s0&&up(n)&&n!=aRe?n:{type:n},c=(s==null?void 0:s.name)===s0&&s.map,d=a!=null?s==Function||!Ci(a)?()=>a:a:null;Object.defineProperty(e,t,{configurable:!0,set(f){const p=this[t];d&&s!=Boolean&&f==null&&(f=d());const{error:h,value:m}=(c?mRe:gRe)(s,f);if(h&&m!=null)throw new iRe(this,`The value defined for prop '${t}' must be of type '${s.name}'`,m);p!=m&&(this._props[t]=m??void 0,this.update(),l&&dRe(this,l),this.updated.then(()=>{i&&(this._ignoreAttr=u,pRe(this,s,u,this[t]),this._ignoreAttr=null)}))},get(){return this._props[t]}}),d&&(r[t]=d()),o[u]={prop:t,type:s}}const dRe=(e,{type:t,base:n=CustomEvent,...o})=>e.dispatchEvent(new n(t,o)),fRe=e=>e.replace(/([A-Z])/g,"-$1").toLowerCase(),pRe=(e,t,n,o)=>o==null||t==Boolean&&!o?e.removeAttribute(n):e.setAttribute(n,(t==null?void 0:t.name)===s0&&(t!=null&&t.serialize)?t==null?void 0:t.serialize(o):up(o)?JSON.stringify(o):t==Boolean?"":o),hRe=(e,t)=>e==Boolean?!!uRe[t]:e==Number?Number(t):e==String?t:e==Array||e==Object?JSON.parse(t):e.name==s0?t:new e(t),mRe=({map:e},t)=>{try{return{value:e(t),error:!1}}catch{return{value:t,error:!0}}},gRe=(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 vRe=0;const yRe=e=>{var n;const t=((n=(e==null?void 0:e.dataset)||{})==null?void 0:n.hydrate)||"";return t||"c"+vRe++},zh=(e,t=HTMLElement)=>{const n={},o={},r="prototype"in t&&t.prototype instanceof Element,s=r?t:"base"in t?t.base:HTMLElement,{props:i,styles:l}=r?e:t;class a extends s{constructor(){super(),this._setup(),this._render=()=>e({...this._props});for(const c in o)this[c]=o[c]}static get styles(){return[super.styles,l]}async _setup(){if(this._props)return;this._props={};let c,d;this.mounted=new Promise(y=>this.mount=()=>{y(),c!=this.parentNode&&(d!=c?this.unmounted.then(this.update):this.update()),c=this.parentNode}),this.unmounted=new Promise(y=>this.unmount=()=>{y(),(c!=this.parentNode||!this.isConnected)&&(f.cleanEffects(!0)()(),d=this.parentNode,c=null)}),this.symbolId=this.symbolId||Symbol(),this.symbolIdParent=Symbol();const f=rRe(()=>this.update(),this,yRe(this));let p,h=!0;const m=R2(this);this.update=()=>(p||(p=!0,this.updated=(this.updated||this.mounted).then(()=>{try{const y=f.load(this._render),v=f.cleanEffects();return y&&y.render(this,this.symbolId,m),p=!1,h&&!f.isSuspense()&&(h=!1,!m&&_Re(this)),v()}finally{p=!1}}).then(y=>{y&&y()})),this.updated),this.update()}connectedCallback(){this.mount(),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this.unmount()}attributeChangedCallback(c,d,f){if(n[c]){if(c===this._ignoreAttr||d===f)return;const{prop:p,type:h}=n[c];try{this[p]=hRe(h,f)}catch{throw new lRe(this,`The value defined as attr '${c}' cannot be parsed by type '${h.name}'`,f)}}else super.attributeChangedCallback(c,d,f)}static get props(){return{...super.props,...i}}static get observedAttributes(){const c=super.observedAttributes||[];for(const d in i)cRe(this.prototype,d,i[d],n,o);return Object.keys(n).concat(c)}}return a};function _Re(e){const{styles:t}=e.constructor,{shadowRoot:n}=e;if(n&&t.length){const o=[];$L(t,r=>{r&&(r instanceof Element?n.appendChild(r.cloneNode(!0)):o.push(r))}),o.length&&(n.adoptedStyleSheets=o)}}const ML=e=>(t,n)=>{Vh(([o,r]=[])=>((r||!r)&&(r&&SL(r,n)?o=o||!0:(Ci(o)&&o(),o=null)),[o,n]),([o,r],s)=>s?(Ci(o)&&o(),[]):[o||t(),r],e)},i0=ML(bL),bRe=ML(wL);class wRe 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 TL=e=>{const t=kL();return Vh((n=new wRe(e,(o,r,s)=>{o=Ci(o)?o(r[0]):o,o!==r[0]&&(r[0]=o,s||t())}))=>n)},D2=(e,t)=>{const[n]=Vh(([o,r,s=0]=[])=>((!r||r&&!SL(r,t))&&(o=e()),[o,t,s]));return n},Fu=(e,t)=>D2(()=>e,t),F2=Bh("atomico/options");globalThis[F2]=globalThis[F2]||{sheet:!!document.adoptedStyleSheets};const OL=globalThis[F2];new Promise(e=>{OL.ssr||(document.readyState==="loading"?EL(document,"DOMContentLoaded",e):e())});const CRe={checked:1,value:1,selected:1},kRe={list:1,type:1,size:1,form:1,width:1,height:1,src:1,href:1,slot:1},SRe={shadowDom:1,staticNode:1,cloneNode:1,children:1,key:1},j1={},V2=[];class B2 extends Text{}const $Re=Bh("atomico/id"),cp=Bh("atomico/type"),s_=Bh("atomico/ref"),IL=Bh("atomico/vnode"),ERe=()=>{};function xRe(e,t,n){return NL(this,e,t,n)}const AL=(e,t,...n)=>{const o=t||j1;let{children:r}=o;if(r=r??(n.length?n:V2),e===ERe)return r;const s=e?e instanceof Node?1:e.prototype instanceof HTMLElement&&2:0;if(s===!1&&e instanceof Function)return e(r!=V2?{children:r,...o}:o);const i=OL.render||xRe;return{[cp]:IL,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 NL(e,t,n=$Re,o,r){let s;if(t&&t[n]&&t[n].vnode==e||e[cp]!=IL)return t;(e||!t)&&(r=r||e.type=="svg",s=e.type!="host"&&(e.raw==1?(t&&e.clone?t[s_]:t)!=e.type:e.raw==2?!(t instanceof e.type):t?t[s_]||t.localName!=e.type:!t),s&&e.type!=null&&(e.raw==1&&e.clone?(o=!0,t=e.type.cloneNode(!0),t[s_]=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]:j1,{vnode:l=j1,cycle:a=0}=i;let{fragment:u,handlers:c}=i;const{children:d=V2,props:f=j1}=l;if(c=s?{}:c||{},e.static&&!s)return t;if(e.shadow&&!t.shadowRoot&&t.attachShadow({mode:"open",...e.shadow}),e.props!=f&&ORe(t,f,e.props,c,r),e.children!==d){const p=e.shadow?t.shadowRoot:t;u=TRe(e.children,u,p,n,!a&&o,r&&e.type=="foreignObject"?!1:r)}return t[n]={vnode:e,handlers:c,fragment:u,cycle:a+1},t}function MRe(e,t){const n=new B2(""),o=new B2("");let r;if(e[t?"prepend":"append"](n),t){let{lastElementChild:s}=e;for(;s;){const{previousElementSibling:i}=s;if(R2(s,!0)&&!R2(i,!0)){r=s;break}s=i}}return r?r.before(o):e.append(o),{markStart:n,markEnd:o}}function TRe(e,t,n,o,r,s){e=e==null?null:sRe(e)?e:[e];const i=t||MRe(n,r),{markStart:l,markEnd:a,keyes:u}=i;let c;const d=u&&new Set;let f=l;if(e&&$L(e,p=>{if(typeof p=="object"&&!p[cp])return;const h=p[cp]&&p.key,m=u&&h!=null&&u.get(h);f!=a&&f===m?d.delete(f):f=f==a?a:f.nextSibling;const y=u?m:f;let v=y;if(p[cp])v=NL(p,y,o,r,s);else{const w=p+"";!(v instanceof Text)||v instanceof B2?v=new Text(w):v.data!=w&&(v.data=w)}v!=f&&(u&&d.delete(v),!y||u?(n.insertBefore(v,f),u&&f!=a&&d.add(f)):y==a?n.insertBefore(v,a):(n.replaceChild(v,y),f=v)),h!=null&&(c=c||new Map,c.set(h,v))}),f=f==a?a:f.nextSibling,t&&f!=a)for(;f!=a;){const p=f;f=f.nextSibling,p.remove()}return d&&d.forEach(p=>p.remove()),i.keyes=c,i}function ORe(e,t,n,o,r){for(const s in t)!(s in n)&&t$(e,s,t[s],null,r,o);for(const s in n)t$(e,s,t[s],n[s],r,o)}function t$(e,t,n,o,r,s){if(t=t=="class"&&!r?"className":t,n=n??null,o=o??null,t in e&&CRe[t]&&(n=e[t]),!(o===n||SRe[t]||t[0]=="_"))if(e.localName==="slot"&&t==="assignNode"&&"assign"in e)e.assign(o);else if(t[0]=="o"&&t[1]=="n"&&(Ci(o)||Ci(n)))IRe(e,t.slice(2),o,s);else if(t=="ref")o&&(Ci(o)?o(e):o.current=e);else if(t=="style"){const{style:i}=e;n=n||"",o=o||"";const l=up(n),a=up(o);if(l)for(const u in n)if(a)!(u in o)&&n$(i,u,null);else break;if(a)for(const u in o){const c=o[u];l&&n[u]===c||n$(i,u,c)}else i.cssText=o}else{const i=t[0]=="$"?t.slice(1):t;i===t&&(!r&&!kRe[t]&&t in e||Ci(o)||Ci(n))?e[t]=o??"":o==null?e.removeAttribute(i):e.setAttribute(i,up(o)?JSON.stringify(o):o)}}function IRe(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 n$(e,t,n){let o="setProperty";n==null&&(o="removeProperty",n=null),~t.indexOf("-")?e[o](t,n):e[t]=n}const ARe=AL("host",{style:"display: contents"}),NRe="value",PRe=(e,t)=>{const n=CL(),o=Rk();bRe(()=>EL(n.current,"ConnectContext",r=>{r.composedPath().at(0)!==r.currentTarget&&e===r.detail.id&&(r.stopPropagation(),r.detail.connect(o))}),[e]),o.current=t},LRe=e=>{const t=zh(({value:n})=>(PRe(t,n),ARe),{props:{value:{type:Object,value:()=>e}}});return t[NRe]=e,t};LRe({dispatch(e,t){}});const RRe=0,Vu=1,Im=2,Am=3,o$=4,Cf=5,z2=6,PL=0,DRe=2,LL=3,RL=4,DL=Cf,FRe=z2,FL=(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===LL?o[0]=l:i===RL?o[1]=Object.assign(o[1]||{},l):i===DL?(o[1]=o[1]||{})[t[++s]]=l:i===FRe?o[1][t[++s]]+=l+"":i?(r=e.apply(l,FL(e,l,n,["",null])),o.push(r),l[0]?t[0]|=2:(t[s-2]=PL,t[s]=r)):o.push(l)}return o},VRe=function(e){let t=Vu,n="",o="",r=[0],s,i;const l=a=>{t===Vu&&(a||(n=n.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?r.push(PL,a,n):t===Am&&(a||n)?(r.push(LL,a,n),t=Im):t===Im&&n==="..."&&a?r.push(RL,a,0):t===Im&&n&&!a?r.push(DL,0,!0,n):t>=Cf&&((n||!a&&t===Cf)&&(r.push(t,0,n,i),t=z2),a&&(r.push(t,a,0,i),t=z2)),n=""};for(let a=0;a<e.length;a++){a&&(t===Vu&&l(),l(a));for(let u=0;u<e[a].length;u++)s=e[a][u],t===Vu?s==="<"?(l(),r=[r],t=Am):n+=s:t===o$?n==="--"&&s===">"?(t=Vu,n=""):n=s+n[0]:o?s===o?o="":n+=s:s==='"'||s==="'"?o=s:s===">"?(l(),t=Vu):t&&(s==="="?(t=Cf,i=n,n=""):s==="/"&&(t<Cf||e[a][u+1]===">")?(l(),t===Am&&(r=r[0]),t=r,(r=r[0]).push(DRe,0,t),t=RRe):s===" "||s===" "||s===`
127 -`||s==="\r"?(l(),t=Im):n+=s),t===Am&&n==="!--"&&(t=o$,r=r[0])}return l(),r},BRe=new Map;function $t(e){let t=BRe;return t=FL(AL,t.get(e)||(t.set(e,t=VRe(e)),t),arguments,[]),t.length>1?t:t[0]}var Dk=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Bu=(e,t,n)=>(Dk(e,t,"read from private field"),n?n.call(e):t.get(e)),zu=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},ju=(e,t,n,o)=>(Dk(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n),zRe=(e,t,n)=>(Dk(e,t,"access private method"),n),H1,U1,kf,Sf,W1,j2,VL;let Fk=class{constructor(t){zu(this,j2),zu(this,H1,void 0),zu(this,U1,void 0),zu(this,kf,void 0),zu(this,Sf,void 0),zu(this,W1,void 0),ju(this,kf,!1),this.onShow=()=>{},this.onHide=()=>{},ju(this,W1,(n,o)=>{var r;const{state:s,composing:i}=n,{selection:l,doc:a}=s,{ranges:u}=l,c=Math.min(...u.map(p=>p.$from.pos)),d=Math.max(...u.map(p=>p.$to.pos)),f=o&&o.doc.eq(a)&&o.selection.eq(l);if(Bu(this,kf)||((r=n.dom.parentElement)==null||r.appendChild(this.element),ju(this,kf,!0)),!(i||f)){if(!Bu(this,U1).call(this,n,o)){this.hide();return}tb({getBoundingClientRect:()=>av(n,c,d)},this.element,{placement:"top",middleware:[eb(),X_(Bu(this,Sf))]}).then(({x:p,y:h})=>{Object.assign(this.element.style,{left:`${p}px`,top:`${h}px`})}),this.show()}}),this.update=(n,o)=>{Sv(Bu(this,W1),Bu(this,H1))(n,o)},this.destroy=()=>{},this.show=n=>{this.element.dataset.show="true",n&&tb(n,this.element,{placement:"top",middleware:[eb(),X_(Bu(this,Sf))]}).then(({x:o,y:r})=>{Object.assign(this.element.style,{left:`${o}px`,top:`${r}px`})}),this.onShow()},this.hide=()=>{this.element.dataset.show!=="false"&&(this.element.dataset.show="false",this.onHide())},this.element=t.content,ju(this,H1,t.debounce??200),ju(this,U1,t.shouldShow??zRe(this,j2,VL)),ju(this,Sf,t.offset),this.element.dataset.show="false"}};H1=new WeakMap,U1=new WeakMap,kf=new WeakMap,Sf=new WeakMap,W1=new WeakMap,j2=new WeakSet,VL=function(e){const{doc:t,selection:n}=e.state,{empty:o,from:r,to:s}=n,i=!t.textBetween(r,s).length&&e.state.selection instanceof ht,l=this.element.contains(document.activeElement),a=!e.hasFocus()&&!l,u=!e.editable;return!(a||o||i||u)};function Vk(e){const t=In({},`${e}_TOOLTIP_SPEC`),n=ao(r=>{const s=r.get(t.key);return new xn({key:new wn(`${e}_TOOLTIP`),...s})}),o=[t,n];return o.key=t.key,o.pluginKey=n.key,t.meta={package:"@milkdown/plugin-tooltip",displayName:`Ctx<tooltipSpec>|${e}`},n.meta={package:"@milkdown/plugin-tooltip",displayName:`Prose<tooltip>|${e}`},o}function BL(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=BL(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function ac(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=BL(e))&&(o&&(o+=" "),o+=t);return o}var jRe=Object.defineProperty,r$=Object.getOwnPropertySymbols,HRe=Object.prototype.hasOwnProperty,URe=Object.prototype.propertyIsEnumerable,s$=(e,t,n)=>t in e?jRe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,WRe=(e,t)=>{for(var n in t||(t={}))HRe.call(t,n)&&s$(e,n,t[n]);if(r$)for(var n of r$(t))URe.call(t,n)&&s$(e,n,t[n]);return e};function Ou(e,t){return Object.assign(e,{meta:WRe({package:"@milkdown/components"},t)}),e}var KRe=Object.defineProperty,i$=Object.getOwnPropertySymbols,qRe=Object.prototype.hasOwnProperty,GRe=Object.prototype.propertyIsEnumerable,l$=(e,t,n)=>t in e?KRe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bk=(e,t)=>{for(var n in t||(t={}))qRe.call(t,n)&&l$(e,n,t[n]);if(i$)for(var n of i$(t))GRe.call(t,n)&&l$(e,n,t[n]);return e};const YRe={mode:"preview"},Ri=In(Bk({},YRe),"linkTooltipStateCtx");Ou(Ri,{displayName:"State<link-tooltip>",group:"LinkTooltip"});const ZRe={addLink:()=>{},editLink:()=>{},removeLink:()=>{}},gd=In(Bk({},ZRe),"linkTooltipAPICtx");Ou(Ri,{displayName:"API<link-tooltip>",group:"LinkTooltip"});const JRe={linkIcon:()=>"🔗",editButton:()=>"✎",removeButton:()=>"⌫",confirmButton:()=>$t`Confirm ⏎`,onCopyLink:()=>{},inputPlaceholder:"Paste link..."},Tv=In(Bk({},JRe),"linkTooltipConfigCtx");Ou(Ri,{displayName:"Config<link-tooltip>",group:"LinkTooltip"});const jh=Vk("LINK_PREVIEW");Ou(jh[0],{displayName:"PreviewTooltipSpec<link-tooltip>",group:"LinkTooltip"});Ou(jh[1],{displayName:"PreviewTooltipPlugin<link-tooltip>",group:"LinkTooltip"});const Ov=Vk("LINK_EDIT");Ou(Ov[0],{displayName:"EditTooltipSpec<link-tooltip>",group:"LinkTooltip"});Ou(Ov[1],{displayName:"EditTooltipPlugin<link-tooltip>",group:"LinkTooltip"});function XRe(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 QRe(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===fs.mark.type(e));if(!(!i||!jh.pluginKey()))return{show:!0,pos:r,node:s,mark:i}}function zL(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 jL=({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 $t`
131 +`);const o=e.topNodeType.createAndFill(void 0,i.content);return o?s(o):""}}})});WH.meta={displayName:"Prose<clipboard>",package:"@milkdown/plugin-clipboard"};const SS=ms({shouldAppend:t=>!(!t||["heading","paragraph"].includes(t.type.name)),getNode:t=>t.schema.nodes.paragraph.create()},"trailingConfig");SS.meta={package:"@milkdown/plugin-trailing",displayName:"Ctx<trailingConfig>"};const YH=Ls(t=>{const e=new ps("MILKDOWN_TRAILING"),{shouldAppend:n,getNode:i}=t.get(SS.key),s=new rs({key:e,state:{init:(o,r)=>{const a=r.tr.doc.lastChild;return n(a,r)},apply:(o,r,a,l)=>{if(!o.docChanged)return r;const c=o.doc.lastChild;return n(c,l)}},appendTransaction:(o,r,a)=>{const{doc:l,tr:c}=a,u=i==null?void 0:i(a),d=s.getState(a),h=l.content.size;if(!(!d||!u))return c.insert(h,u)}});return s});YH.meta={package:"@milkdown/plugin-trailing",displayName:"Prose<trailing>"};const rMe=[SS,YH];var qH=(t=>(t.CodeMirror="code-mirror",t.LinkTooltip="link-tooltip",t.Cursor="cursor",t.BlockEdit="block-edit",t.Toolbar="toolbar",t.Placeholder="placeholder",t.ImageBlock="image-block",t))(qH||{});const aMe={cursor:!0,"link-tooltip":!0,"block-edit":!0,placeholder:!0,toolbar:!0,"code-mirror":!0,"image-block":!0};async function lMe(t,e,n){switch(t){case"link-tooltip":{const{defineFeature:i}=await ti(()=>Promise.resolve().then(()=>eCt),void 0);return i(e,n)}case"block-edit":{const{defineFeature:i}=await ti(()=>Promise.resolve().then(()=>JCt),void 0);return i(e,n)}case"placeholder":{const{defineFeature:i}=await ti(()=>Promise.resolve().then(()=>nxt),void 0);return i(e,n)}case"toolbar":{const{defineFeature:i}=await ti(()=>Promise.resolve().then(()=>oxt),void 0);return i(e,n)}case"image-block":{const{defineFeature:i}=await ti(()=>Promise.resolve().then(()=>gxt),void 0);return i(e,n)}}}const cMe=kn([],"FeaturesCtx");function uMe(t){return e=>{e.inject(cMe,t)}}var dMe="Expected a function",aT=0/0,hMe="[object Symbol]",fMe=/^\s+|\s+$/g,pMe=/^[-+]0x[0-9a-f]+$/i,mMe=/^0b[01]+$/i,gMe=/^0o[0-7]+$/i,vMe=parseInt,_Me=typeof xs=="object"&&xs&&xs.Object===Object&&xs,yMe=typeof self=="object"&&self&&self.Object===Object&&self,bMe=_Me||yMe||Function("return this")(),wMe=Object.prototype,kMe=wMe.toString,CMe=Math.max,xMe=Math.min,N3=function(){return bMe.Date.now()};function SMe(t,e,n){var i,s,o,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(dMe);e=lT(e)||0,Tx(n)&&(u=!!n.leading,d="maxWait"in n,o=d?CMe(lT(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(M){var P=i,T=s;return i=s=void 0,c=M,r=t.apply(T,P),r}function p(M){return c=M,a=setTimeout(w,e),u?f(M):r}function m(M){var P=M-l,T=M-c,I=e-P;return d?xMe(I,o-T):I}function b(M){var P=M-l,T=M-c;return l===void 0||P>=e||P<0||d&&T>=o}function w(){var M=N3();if(b(M))return k(M);a=setTimeout(w,m(M))}function k(M){return a=void 0,h&&i?f(M):(i=s=void 0,r)}function C(){a!==void 0&&clearTimeout(a),c=0,i=l=s=a=void 0}function A(){return a===void 0?r:k(N3())}function S(){var M=N3(),P=b(M);if(i=arguments,s=this,l=M,P){if(a===void 0)return p(l);if(d)return a=setTimeout(w,e),f(l)}return a===void 0&&(a=setTimeout(w,e)),r}return S.cancel=C,S.flush=A,S}function Tx(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function $Me(t){return!!t&&typeof t=="object"}function AMe(t){return typeof t=="symbol"||$Me(t)&&kMe.call(t)==hMe}function lT(t){if(typeof t=="number")return t;if(AMe(t))return aT;if(Tx(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Tx(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(fMe,"");var n=mMe.test(t);return n||gMe.test(t)?vMe(t.slice(2),n?2:8):pMe.test(t)?aT:+t}var EMe=SMe;const z2=_i(EMe);let GH=class{constructor(){this.beforeMountedListeners=[],this.mountedListeners=[],this.updatedListeners=[],this.markdownUpdatedListeners=[],this.blurListeners=[],this.focusListeners=[],this.destroyListeners=[],this.beforeMount=e=>(this.beforeMountedListeners.push(e),this),this.mounted=e=>(this.mountedListeners.push(e),this),this.updated=e=>(this.updatedListeners.push(e),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(e){return this.markdownUpdatedListeners.push(e),this}blur(e){return this.blurListeners.push(e),this}focus(e){return this.focusListeners.push(e),this}destroy(e){return this.destroyListeners.push(e),this}};const Px=kn(new GH,"listener"),MMe=new ps("MILKDOWN_LISTENER"),XH=t=>(t.inject(Px,new GH),async()=>{await t.wait(ad);const e=t.get(Px),{listeners:n}=e;n.beforeMount.forEach(a=>a(t)),await t.wait(_g);const i=t.get(vf);let s=null,o=null;const r=new rs({key:MMe,view:()=>({destroy:()=>{n.destroy.forEach(a=>a(t))}}),props:{handleDOMEvents:{focus:()=>(n.focus.forEach(a=>a(t)),!1),blur:()=>(n.blur.forEach(a=>a(t)),!1)}},state:{init:(a,l)=>{s=l.doc,o=i(l.doc)},apply:a=>!a.docChanged||a.getMeta("addToHistory")===!1?void 0:z2(()=>{const{doc:l}=a;if(n.updated.length>0&&s&&!s.eq(l)&&n.updated.forEach(c=>{c(t,l,s)}),n.markdownUpdated.length>0&&s&&!s.eq(l)){const c=i(l);n.markdownUpdated.forEach(u=>{u(t,c,o)}),o=c}s=l},200)()}});t.update(ta,a=>a.concat(r)),await t.wait(py),n.mounted.forEach(a=>a(t))});XH.meta={package:"@milkdown/plugin-listener",displayName:"Listener"};function TMe(t){return new Promise(e=>{const n=new FileReader;n.addEventListener("load",()=>{e({alt:t.name,src:n.result})},!1),n.readAsDataURL(t)})}const PMe=async(t,e)=>{const n=[];for(let s=0;s<t.length;s++){const o=t.item(s);o&&o.type.includes("image")&&n.push(o)}const{image:i}=e.nodes;if(!i)throw nN("image");return(await Promise.all(n.map(s=>TMe(s)))).map(({alt:s,src:o})=>i.createAndFill({src:o,alt:s}))},_f=ms({uploader:PMe,enableHtmlFileUploader:!1,uploadWidgetFactory:(t,e)=>{const n=document.createElement("span");return n.textContent="Upload in progress...",Fs.widget(t,n,e)}},"uploadConfig");_f.meta={package:"@milkdown/plugin-upload",displayName:"Ctx<uploadConfig>"};const KH=Ls(t=>{const e=new ps("MILKDOWN_UPLOAD"),n=(s,o)=>{var r;const a=e.getState(s);if(!a)return-1;const l=a.find(void 0,void 0,c=>c.id===o);return l.length?((r=l[0])==null?void 0:r.from)??-1:-1},i=(s,o,r)=>{var a;if(!r||r.length<=0)return!1;const l=Symbol("upload symbol"),c=t.get(qr),{tr:u}=s.state,d=o instanceof DragEvent?((a=s.posAtCoords({left:o.clientX,top:o.clientY}))==null?void 0:a.pos)??u.selection.from:u.selection.from;s.dispatch(u.setMeta(e,{add:{id:l,pos:d}}));const{uploader:h}=t.get(_f.key);return h(r,c).then(f=>{const p=n(s.state,l);p<0||s.dispatch(s.state.tr.replaceWith(p,p,f).setMeta(e,{remove:{id:l}}))}).catch(f=>{console.error(f)}),!0};return new rs({key:e,state:{init(){return Kn.empty},apply(s,o){const r=o.map(s.mapping,s.doc),a=s.getMeta(this);if(!a)return r;if(a.add){const{uploadWidgetFactory:l}=t.get(_f.key),c=l(a.add.pos,{id:a.add.id});return r.add(s.doc,[c])}if(a.remove){const l=r.find(void 0,void 0,c=>c.id===a.remove.id);return r.remove(l)}return r}},props:{decorations(s){return this.getState(s)},handlePaste:(s,o)=>{var r,a;const{enableHtmlFileUploader:l}=t.get(_f.key);return!(o instanceof ClipboardEvent)||!l&&(r=o.clipboardData)!=null&&r.getData("text/html")?!1:i(s,o,(a=o.clipboardData)==null?void 0:a.files)},handleDrop:(s,o)=>{var r;return o instanceof DragEvent?i(s,o,(r=o.dataTransfer)==null?void 0:r.files):!1}}})});KH.meta={package:"@milkdown/plugin-upload",displayName:"Prose<upload>"};const IMe=[_f,KH];var $S=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Js=(t,e,n)=>($S(t,e,"read from private field"),n?n.call(t):e.get(t)),ph=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Mm=(t,e,n,i)=>($S(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),LMe=(t,e,n)=>($S(t,e,"access private method"),n),tr,Tm,bg,Cy,yf,Ix,ZH;class JH{constructor({root:e,features:n={},featureConfigs:i={},defaultValue:s="",onUpdate:o=a=>{},handleCommonActions:r=(a,l)=>{}}){var u;ph(this,Ix),ph(this,tr,void 0),ph(this,Tm,void 0),ph(this,bg,void 0),ph(this,Cy,!0),ph(this,yf,null);const a=Object.entries({...aMe,...n}).filter(([,d])=>d).map(([d])=>d);Mm(this,bg,(typeof e=="string"?document.querySelector(e):e)??document.body),Mm(this,tr,p7e.make().config(uMe(a)).config(d=>{d.set(my,Js(this,bg)),d.set(dy,s),d.set(yg,{editable:()=>Js(this,Cy)})}).config(d=>{const h=async(f,p)=>await r("handleFileUpload",{ctx:d,files:f,schema:p});d.update(_f.key,f=>({...f,uploader:h}))}).config(d=>{const h=d.get(Px);h.markdownUpdated((f,p,m)=>{p!==m&&o(p)}),h.updated((f,p,m)=>{r("editor_updated",f)})}).use(K7e).use(iMe).use(rMe).use(WH).use(XH).use(IMe).use(GEe));const l=(u=i==null?void 0:i["block-edit"])==null?void 0:u.canAddImage;l&&Js(this,tr).use(Ls(()=>new rs({filterTransaction:d=>d.docChanged?!d.steps.some(f=>{var m,b;let p=!1;return(b=(m=f.slice)==null?void 0:m.content)==null||b.forEach(w=>{var k;w.type.name.includes("image")&&(p=!0),(k=w.content)==null||k.forEach(C=>{C.type.name.includes("image")&&(p=!0)})}),p})||l():!0}))),Js(this,tr).use(Ls(()=>new rs({props:{handleTextInput(d,h,f,p){const m=d.state.schema.marks.link;if(p!==" "||!m)return!1;const b=d.state.doc.resolve(h),w=/(?:^|\s)((?:https?:\/\/|www\.)\S+)$/.exec(b.parent.textBetween(0,b.parentOffset,void 0,""));if(!w)return!1;const k=w[1].replace(/[.,)]+$/,""),C=h-w[1].length,A=C+k.length;if(d.state.doc.rangeHasMark(C,A,m))return!1;const S=(k.startsWith("http")?"":"https://")+k,M=d.state.tr.insertText(p,h).addMark(C,A,m.create({href:S})).removeStoredMark(m);return d.dispatch(M),!0}},appendTransaction:(d,h,f)=>{const p=f.schema.marks.link,m=f.selection.$cursor;if(!p||!m||!d.some(M=>M.docChanged))return null;const b=M=>M==null?void 0:M.marks.find(P=>P.type===p);if((f.storedMarks??m.marks()).some(M=>M.type===p)&&!b(m.nodeBefore)&&!b(m.nodeAfter))return f.tr.removeStoredMark(p);const C=m.pos;if(C<1||f.doc.textBetween(C-1,C)!==" "||!f.doc.rangeHasMark(C-1,C,p))return null;const A=b(f.doc.resolve(C-1).nodeBefore),S=b(f.doc.resolve(C).nodeAfter);return S&&(A==null?void 0:A.attrs.href)===S.attrs.href?null:f.tr.removeMark(C-1,C,p).removeStoredMark(p)}}))),Js(this,tr).use(Ls(()=>{let d=!1,h=!1;return new rs({view:f=>({update(){var A;const p=f.state.schema.marks.link,m=f.state.selection.$cursor,b=S=>S.type===p,w=!!p&&!!(m!=null&&m.marks().some(b)),k=document.querySelector("milkdown-link-preview"),C=(k==null?void 0:k.style.display)==="none"&&!h;if(w&&!C){k&&h&&(k.style.display=""),h=!1;const S=f.coordsAtPos((A=m.nodeBefore)!=null&&A.marks.some(b)?m.pos-1:m.pos);f.dom.dispatchEvent(new MouseEvent("mousemove",{bubbles:!0,clientX:S.left+1,clientY:(S.top+S.bottom)/2}))}else!w&&d&&(f.dom.dispatchEvent(new MouseEvent("mouseleave",{bubbles:!0})),k&&(k.style.display="none"),h=!0);d=w}})})}));const c=[];a.forEach(d=>{const h=i[d];c.push(lMe(d,Js(this,tr),h))}),Mm(this,Tm,Promise.all(c))}async create(){await Js(this,Tm);const e=await Js(this,tr).create();return LMe(this,Ix,ZH).call(this),e}async destroy(){var e;return(e=Js(this,yf))==null||e.disconnect(),await Js(this,Tm),Js(this,tr).destroy()}get editor(){return Js(this,tr)}setReadonly(e){return Mm(this,Cy,!e),this}getMarkdown(){return Js(this,tr).action(b7e())}getEditor(){return Js(this,tr)}destroyEditor(){this.destroy()}}tr=new WeakMap;Tm=new WeakMap;bg=new WeakMap;Cy=new WeakMap;yf=new WeakMap;Ix=new WeakSet;ZH=function(){const t=Js(this,bg),e=i=>{parseFloat(i.style.left)<0&&(i.style.left="0px")},n=i=>{const s=t.querySelector(i);s&&(Js(this,yf).observe(s,{attributes:!0,attributeFilter:["style"]}),setTimeout(()=>e(s),0))};Mm(this,yf,new MutationObserver(i=>{const s=i[0];s.type==="childList"?(n("milkdown-link-edit"),n("milkdown-link-preview")):e(s.target)})),Js(this,yf).observe(t,{childList:!0,subtree:!0})};JH.Feature=qH;const OMe=Symbol("editorInfoCtxKey"),DMe=fe({name:"MilkdownProvider",setup:(t,{slots:e})=>(Pt(OMe,{loading:ee(!0),dom:ee(null),editor:ee(void 0),editorFactory:ee(void 0)}),()=>{var r;return _(J,null,[(r=e.default)==null?void 0:r.call(e)])})});var RMe=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},QH=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Lx=(t,e,n)=>(RMe(t,e,"access private method"),n),xy,Ox;let VMe=class{constructor({node:e,view:n,getPos:i,decorations:s,innerDecorations:o,options:r}){QH(this,xy),this.selected=!1,this.selectNode=()=>{var a,l;this.selected=!0,(l=(a=this.options).selectNode)==null||l.call(a)},this.deselectNode=()=>{var a,l;this.selected=!1,(l=(a=this.options).deselectNode)==null||l.call(a)},this.shouldUpdate=a=>!(a.type!==this.node.type||a.sameMarkup(this.node)&&a.content.eq(this.node.content)),this.update=(a,l,c)=>{var u,d;const h=this.options.update;let f;return h&&(f=h(a,l,c)),typeof f!="boolean"&&(f=this.shouldUpdate(a)),this.node=a,this.decorations=l,this.innerDecorations=c,f&&((d=(u=this.options).onUpdate)==null||d.call(u)),f},this.shouldIgnoreMutation=a=>!this.dom||!this.contentDOM||this.node.isLeaf||this.node.isAtom?!0:a.type==="selection"?!1:this.contentDOM===a.target&&a.type==="attributes"?!0:!this.contentDOM.contains(a.target),this.ignoreMutation=a=>{if(!this.dom||!this.contentDOM)return!0;let l;const c=this.options.ignoreMutation;return c&&(l=c(a)),typeof l!="boolean"&&(l=this.shouldIgnoreMutation(a)),l},this.destroy=()=>{var a,l,c;(l=(a=this.options).destroy)==null||l.call(a),this.dom.remove(),(c=this.contentDOM)==null||c.remove()},this.setAttrs=a=>{const{dispatch:l,state:c}=this.view,u=this.getPos();if(typeof u=="number")return l(c.tr.setNodeMarkup(u,void 0,{...this.node.attrs,...a}))},this.node=e,this.view=n,this.getPos=i,this.decorations=s,this.innerDecorations=o,this.options=r,this.dom=this.createDOM(r.as),this.contentDOM=e.isLeaf?null:this.createContentDOM(r.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=r.setSelection,this.stopEvent=r.stopEvent}createDOM(e){return Lx(this,xy,Ox).call(this,e)}createContentDOM(e){return Lx(this,xy,Ox).call(this,e)}get component(){return this.options.component}};xy=new WeakSet,Ox=function(t){const{node:e}=this;return t==null?document.createElement(e.isInline?"span":"div"):t instanceof HTMLElement?t:t instanceof Function?t(e):document.createElement(t)};let FMe=class{constructor(e){this.view=e.view,this.options=e.options}get component(){return this.options.component}get root(){var e,n;let i=(n=(e=this.options).root)==null?void 0:n.call(e,this.view.dom);return i||(i=this.view.dom.parentElement??document.body),i}update(e,n){var i,s;this.view=e,this.prevState=n,(s=(i=this.options).update)==null||s.call(i,e,n)}destroy(){var e,n;(n=(e=this.options).destroy)==null||n.call(e)}};var Dx,eU;let NMe=class{constructor({pos:e,spec:n,options:i}){QH(this,Dx),this.pos=e,this.options=i,this.spec=n,this.dom=Lx(this,Dx,eU).call(this,i.as),this.dom.setAttribute("data-widget-view-root","true")}bind(e,n){this.view=e,this.getPos=n}get component(){return this.options.component}};Dx=new WeakSet,eU=function(t){return t instanceof HTMLElement?t:document.createElement(t)};let AS=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");var BMe=Object.defineProperty,zMe=(t,e,n)=>e in t?BMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ur=(t,e,n)=>(zMe(t,typeof e!="symbol"?e+"":e,n),n);const HMe=Symbol("[ProsemirrorAdapter]nodeViewContext"),UMe=Symbol("[ProsemirrorAdapter]useNodeViewFactory");let jMe=class extends VMe{constructor(){super(...arguments),ur(this,"key",AS()),ur(this,"context",{contentRef:e=>{e&&e instanceof HTMLElement&&this.contentDOM&&e.firstChild!==this.contentDOM&&e.appendChild(this.contentDOM)},view:this.view,getPos:this.getPos,setAttrs:this.setAttrs,node:Fn(this.node),selected:Fn(this.selected),decorations:Fn(this.decorations),innerDecorations:Fn(this.innerDecorations)}),ur(this,"updateContext",()=>{Object.entries({node:this.node,selected:this.selected,decorations:this.decorations,innerDecorations:this.innerDecorations}).forEach(([e,n])=>{const i=this.context[e];i.value!==n&&(i.value=n)})}),ur(this,"render",()=>{const e=this.component;return Xs(fe({name:"ProsemirrorNodeView",setup:()=>(Pt(HMe,this.context),()=>_(na,{key:this.key,to:this.dom},{default:()=>[_(e,null,null)]}))}))})}};const WMe=(t,e)=>n=>(i,s,o,r,a)=>{const l=new jMe({node:i,view:s,getPos:o,decorations:r,innerDecorations:a,options:{...n,onUpdate(){var c;(c=n.onUpdate)==null||c.call(n),l.updateContext()},selectNode(){var c;(c=n.selectNode)==null||c.call(n),l.updateContext()},deselectNode(){var c;(c=n.deselectNode)==null||c.call(n),l.updateContext()},destroy(){var c;(c=n.destroy)==null||c.call(n),e(l)}}});return t(l),l},YMe=Symbol("[ProsemirrorAdapter]nodeViewContext"),qMe=Symbol("[ProsemirrorAdapter]usePluginViewFactory");let GMe=class extends FMe{constructor(){super(...arguments),ur(this,"key",AS()),ur(this,"context",{view:Fn(this.view),prevState:Fn(this.prevState)}),ur(this,"updateContext",()=>{Object.entries({view:this.view,prevState:this.prevState}).forEach(([e,n])=>{const i=this.context[e];if(e==="view"){const s=Object.assign(Object.create(Object.getPrototypeOf(n)),n);i.value=s;return}i.value=n})}),ur(this,"render",()=>{const e=this.component;return Xs(fe({name:"ProsemirrorNodeView",setup:()=>(Pt(YMe,this.context),()=>_(na,{key:this.key,to:this.root},{default:()=>[_(e,null,null)]}))}))})}};const XMe=(t,e)=>n=>i=>{const s=new GMe({view:i,options:{...n,update:(o,r)=>{var a;(a=n.update)==null||a.call(n,o,r),s.updateContext()},destroy:()=>{var o;(o=n.destroy)==null||o.call(n),e(s)}}});return t(s),s},KMe=()=>{const t=ee({}),e=pt(),n=Xs({});return Dd(()=>{n.updater=()=>{e==null||e.update()}}),Sl(()=>{n.updater=void 0}),{portals:t,renderVueRenderer:i=>{var s;t.value[i.key]=i.render(),(s=n.updater)==null||s.call(n)},removeVueRenderer:i=>{delete t.value[i.key]}}},ZMe=Symbol("[ProsemirrorAdapter]widgetViewContext"),JMe=Symbol("[ProsemirrorAdapter]useWidgetViewFactory");let QMe=class extends NMe{constructor(){super(...arguments),ur(this,"key",AS()),ur(this,"context",{view:this.view,getPos:this.getPos,spec:this.spec}),ur(this,"updateContext",()=>{Object.assign(this.context,{view:this.view,getPos:this.getPos,spec:this.spec})}),ur(this,"render",()=>{const e=this.component;return Xs(fe({name:"ProsemirrorWidgetView",setup:()=>(Pt(ZMe,this.context),()=>_(na,{key:this.key,to:this.dom},{default:()=>[_(e,null,null)]}))}))})}};const eTe=(t,e)=>n=>(i,s={})=>{const o=new QMe({pos:i,options:n}),r={...s,destroy:a=>{var l;(l=s.destroy)==null||l.call(s,a),e(o)}};return o.spec=r,Fs.widget(i,(a,l)=>(o.bind(a,l),o.updateContext(),t(o),o.dom),r)},tTe=fe({name:"ProsemirrorAdapterProvider",setup:(t,{slots:e})=>{const{portals:n,renderVueRenderer:i,removeVueRenderer:s}=KMe(),o=WMe(i,s),r=XMe(i,s),a=eTe(i,s);return Pt(UMe,o),Pt(qMe,r),Pt(JMe,a),()=>{var l;return _(J,null,[(l=e.default)==null?void 0:l.call(e),Object.values(n.value).map(c=>bt(c))])}}}),nTe={name:"CrepeEditor",emits:["update:modelValue","handleMediaUpload","editorCreated","editor-escape"],props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},autofocus:{type:Boolean,default:!1},mentionQuery:{type:Object,default:()=>({})},autofocus_changed:{type:[Boolean,Number],default:!1},disable_mention:{type:Boolean,default:!1},disable_media:{type:Boolean,default:!1},defaultMentions:{type:Array,default:()=>[]},context:{type:String,default:""},is_modal:{type:Boolean,default:!1},onInlineUpload:{type:Function,default:null},canAddImage:{type:Function,default:null}},components:{MilkdownProvider:DMe,ProsemirrorAdapterProvider:tTe},data(){return{editor:null,editorFailed:!1,currentContent:"",showMentionPop:!1,currentMentionSearch:"",mentionResults:[],justReplaced:!1,searchingMention:!1,hasUnsavedChanges:!1,pendingNavigation:null,activeUploadBlock:null}},watch:{autofocus_changed(t){t&&this.focusOnEditor()},editorFailed(t){t&&this.$nextTick(this.resizeFallback)},modelValue(){this.editorFailed&&this.$nextTick(this.resizeFallback)},currentContent(){var e;const t=this.context==="feed"||this.context==="comment";this.hasUnsavedChanges=t&&!!((e=this.currentContent)!=null&&e.replace(/&#x20;|\u00A0/gi,"").trim()),this.context==="comment"&&this.is_modal&&(window.fcom_modal_comment_unsaved=this.hasUnsavedChanges)}},methods:{onUnsavedChangesProceeded(){if(this.pendingNavigation){this.hasUnsavedChanges=!1,this.context==="comment"&&this.is_modal&&(window.fcom_modal_comment_unsaved=!1);const t=this.pendingNavigation;this.pendingNavigation=null,setTimeout(()=>t.click(),0)}},clearContent(){if(!this.editor){this.currentContent="",this.$emit("update:modelValue",""),this.$refs.fallbackInput&&(this.$refs.fallbackInput.style.height="");return}this.editor.action(t=>{const e=t.get(Vn),{state:n}=e,i=n.tr.replaceWith(0,n.doc.content.size,n.schema.nodes.paragraph.create());e.dispatch(i)}),this.currentContent=""},updateContent(t){if(!this.editor){this.currentContent=(this.modelValue||"")+t,this.$emit("update:modelValue",this.currentContent);return}this.editor.action(e=>{const n=e.get(Vn),{state:i}=n,{from:s}=i.selection,o=t,r=i.tr.insertText(o,s),a=s+o.length,l=r.setSelection(Ot.create(r.doc,a));n.dispatch(l),n.focus()})},initEditor(){const t=this,e=new JH({root:this.$refs.crepe_editor_vue,defaultValue:this.modelValue,featureConfigs:{placeholder:{text:this.placeholder||this.$t("Type your message here!"),mode:"doc"},"block-edit":{hasImageBlock:!this.disable_media&&!!this.onInlineUpload,canAddImage:this.canAddImage},"image-block":{onUpload:async n=>{if(!this.onInlineUpload)return null;this.activeUploadBlock&&this.activeUploadBlock.classList.add("uploading");try{return await this.onInlineUpload(n)}finally{this.activeUploadBlock&&(this.activeUploadBlock.classList.remove("uploading"),this.activeUploadBlock=null)}},blockUploadButton:()=>this.$t("Upload image"),blockConfirmButton:()=>this.$t("Confirm"),blockUploadPlaceholderText:this.$t("or paste link")},"link-tooltip":{inputPlaceholder:this.$t("Paste link...")}},onUpdate(n){n=n.replace(/!\[[^\]]*\]\(\s*\)/g,""),t.$emit("update:modelValue",n),t.currentContent=n},async handleCommonActions(n,i){if(n==="editor_updated"){if(t.disable_mention)return!1;t.checkforMention(i)}else if(n==="handleFileUpload")return t.disable_media?[]:await t.handleFileUpload(i)}});e.create().then(()=>{this.editor=e.getEditor(),this.focusOnEditor(),this.$emit("editorCreated")}).catch(n=>{console.error("FluentCommunity: rich editor failed to load, falling back to plain text",n),this.editorFailed=!0,this.$emit("editorCreated")})},onFallbackInput(t){this.currentContent=t.target.value,this.$emit("update:modelValue",t.target.value),this.resizeFallback()},resizeFallback(){const t=this.$refs.fallbackInput;t&&(t.style.height="auto",t.style.height=t.scrollHeight+"px")},focusOnEditor(t=null){!t&&!this.autofocus||!this.editor||this.editor.action(e=>{const n=e.get(Vn),{state:i}=n;let s=null;t&&i.doc.descendants((r,a)=>{if(r.isText&&r.text){const l=r.text.lastIndexOf(t);l!==-1&&(s=a+l+t.length+1)}});const o=s!==null?Math.min(s,i.doc.content.size-1):Math.max(1,i.doc.content.size-1);n.dispatch(i.tr.setSelection(Ot.create(i.doc,o))),n.focus()})},checkforMention(t){if(!this.currentContent.includes("@")||this.justReplaced){this.showMentionPop=!1,this.currentMentionSearch="";return}const n=t.get(Vn),{state:i}=n,{selection:s}=i;if(!s)return;const r=i.doc.textBetween(0,s.to," ").match(/@([\p{L}\p{M}\p{N}_.-]+)$/u);if(!r){this.showMentionPop=!1,this.currentMentionSearch="";return}let a=r[1];if(!a||a.length<3){if(this.defaultMentions&&this.defaultMentions.length){let l=a.toLowerCase(),c=this.defaultMentions.filter(u=>u.username.toLowerCase().includes(l)||u.display_name.toLowerCase().includes(l));c.length&&(this.currentMentionSearch=a,this.mentionResults=c,this.showMentionPop=!0)}return}if(this.currentMentionSearch&&(this.currentMentionSearch=a,this.searchingMention))return!1;this.searchingMention=!0,this.currentMentionSearch=a,this.$get("members",{mention:this.currentMentionSearch,...this.mentionQuery}).then(l=>{this.mentionResults=l.members.data,this.showMentionPop=!0}).finally(()=>{this.searchingMention=!1})},addMention(t){if(this.disable_mention||!this.editor)return;const e=new RegExp(`@${this.currentMentionSearch}(?!.*@${this.currentMentionSearch})`);this.currentContent=this.currentContent.replace(e,t+" "),this.editor.action(w7e(this.currentContent)),this.focusOnEditor(t),this.showMentionPop=!1,this.currentMentionSearch="",this.justReplaced=!0,setTimeout(()=>{this.justReplaced=!1},2e3)},async handleFileUpload(t){const e=t.files;for(let n=0;n<e.length;n++){const i=e.item(n);if(i&&i.type.includes("image"))if(this.onInlineUpload){if(this.canAddImage&&!this.canAddImage())continue;await this.insertInlineImage(i)}else this.$emit("handleMediaUpload",i)}return[]},async insertInlineImage(t){try{const e=await this.onInlineUpload(t);if(!e||!this.editor)return;this.editor.action(n=>{const i=n.get(Vn),{state:s}=i,o=s.schema.nodes["image-block"];if(!o)return;const r=o.create({src:e,caption:"",ratio:1}),{$from:a}=s.selection,l=a.after(1),c=s.tr.insert(l,r);i.dispatch(c),i.focus()})}catch{}},handleBeforeUnload(t){this.hasUnsavedChanges&&(t.preventDefault(),t.returnValue="")},handleLinkClick(t){const e=t.target.closest("a");if(!e||!this.hasUnsavedChanges||t.metaKey||t.ctrlKey)return;const n=e.getAttribute("href"),i=this.appVars.portal_url;if(!n)return;const s=n.startsWith(i)||n.startsWith("/"),o=n===window.location.href;s&&!o&&(t.preventDefault(),t.stopPropagation(),this.pendingNavigation=e,this.$eventBus.emit("showUnsavedChangesModal",this.context))},handleImageBlockClick(t){const e=t.target.closest("milkdown-image-block");e&&(this.activeUploadBlock=e,t.target.closest(".confirm")&&!this.canAddImage()&&(t.preventDefault(),t.stopPropagation()))},handleEditorKeydown(t){const e=this.$refs.crepe_editor_vue;t.key!=="Escape"||!(e!=null&&e.contains(t.target))||this.showMentionPop||e.querySelector('milkdown-slash-menu[data-show="true"], milkdown-toolbar[data-show="true"], milkdown-link-preview[data-show="true"], milkdown-link-edit[data-show="true"]')||this.$emit("editor-escape")}},mounted(){this.initEditor(),window.addEventListener("beforeunload",this.handleBeforeUnload),document.addEventListener("click",this.handleLinkClick,!0),document.addEventListener("keydown",this.handleEditorKeydown,!0),this.onInlineUpload&&this.$refs.crepe_editor_vue.addEventListener("click",this.handleImageBlockClick,!0),this.$eventBus.on("unsavedChangesProceeded",this.onUnsavedChangesProceeded)},beforeUnmount(){var t;this.editor&&this.editor.destroy(),this.context==="comment"&&this.is_modal&&this.hasUnsavedChanges&&(window.fcom_modal_comment_unsaved=!1),window.removeEventListener("beforeunload",this.handleBeforeUnload),document.removeEventListener("click",this.handleLinkClick,!0),document.removeEventListener("keydown",this.handleEditorKeydown,!0),this.onInlineUpload&&((t=this.$refs.crepe_editor_vue)==null||t.removeEventListener("click",this.handleImageBlockClick,!0)),this.$eventBus.off("unsavedChangesProceeded",this.onUnsavedChangesProceeded)}},sTe={style:{position:"relative"},class:"fcom_md_editor"},iTe={ref:"crepe_editor_vue",class:"crepe-editor feed_md_content fcom_md_seditor_wrapper"},oTe=["placeholder","value"],rTe={class:"fcom_mention_pop_wrap"},aTe={key:0},lTe={key:0},cTe=["onClick"],uTe=["src"],dTe={key:1};function hTe(t,e,n,i,s,o){const r=B("ProsemirrorAdapterProvider"),a=B("MilkdownProvider"),l=Yo;return v(),$(J,null,[_(a,null,{default:y(()=>[_(r,null,{default:y(()=>[g("div",sTe,[Re(g("div",iTe,null,512),[[jt,!s.editorFailed]]),s.editorFailed?(v(),$("textarea",{key:0,ref:"fallbackInput",class:"fcom_md_editor_fallback",placeholder:n.placeholder||t.$t("Type your message here!"),value:n.modelValue,onInput:e[0]||(e[0]=(...c)=>o.onFallbackInput&&o.onFallbackInput(...c))},null,40,oTe)):O("",!0)])]),_:1})]),_:1}),g("div",rTe,[_(l,{"popper-class":"fcom_mention_pop",ref:"mentionPopoverRef",placement:"bottom",visible:s.showMentionPop,width:300,persistent:!1},{reference:y(()=>[...e[1]||(e[1]=[g("span",{style:{}},null,-1)])]),default:y(()=>[s.justReplaced?O("",!0):(v(),$("div",aTe,[s.mentionResults.length?(v(),$("ul",lTe,[(v(!0),$(J,null,ye(s.mentionResults,c=>(v(),$("li",{key:c.user_id,onClick:u=>o.addMention("@"+c.username)},[c.avatar?(v(),$("img",{key:0,alt:"",src:c.avatar},null,8,uTe)):O("",!0),g("span",null,x(c.display_name)+" (@"+x(c.username)+")",1)],8,cTe))),128))])):s.searchingMention?O("",!0):(v(),$("div",dTe,[g("p",null,x(t.$t("No results found. Please search by username")),1)]))]))]),_:1},8,["visible"])])],64)}const uu=ce(nTe,[["render",hTe]]),fTe={name:"CreateCorseForm",components:{FormBuilder:eN,SpaceGroupSelector:j8,TopicSelector:QF,SlugInput:Yd,ImageUploader:Ll,LogoEmojiSelector:sv,ErrorAlerts:iv,CrepeEditor:uu},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:"",disable_comments:"no",hide_members_count:"no"}}},savingCount:{required:!1,default:0},parent_id:{required:!1,default:null},disable_redirect:{required:!1,default:!1}},data(){return{saving:!1,privacies:Dwe,formErrors:[],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:"",course_details:"",course_layout:"classic"}},courseTypes:Rwe,dataLoaded:!1,metaSettings:null,fetchingMetaBoxes:!1,appReady:!1,courseInstructors:[],fetchingInstructors:!1}},watch:{savingCount(){this.submit(!1)}},methods:{getValidationErrors(){const t=[];return(!this.form.title||!this.form.title.trim())&&t.push(this.$t("Course title is required.")),(!this.form.description||!this.form.description.trim())&&t.push(this.$t("Short description is required.")),t},validateForm(){return this.formErrors=this.getValidationErrors(),this.formErrors.length===0},submit(t=!1){if(this.form.id){const s=this.getValidationErrors();if(s.length){this.$notify.error(s[0]);return}}else if(!this.validateForm())return;this.saving=!0;let e="admin/courses",n=this.form,i=this.$post;if(this.form.id&&(e+="/"+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,slug:this.form.slug,logo:this.form.logo,cover_photo:this.form.cover_photo,space_id:this.form.id,parent_id:this.form.parent_id,settings:this.form.settings,category_ids:this.form.category_ids},i=this.$put,this.form.created_by&&this.isAdmin()&&(n.created_by=this.form.created_by),this.metaSettings)){let s={};this.each(this.metaSettings,(o,r)=>{s[r]=o.settings}),n.meta_settings=s}i(e,n).then(s=>{if(!this.form.id&&!this.disable_redirect){let o=this.$getRouteLink("admin/manage-courses/edit/"+s.course.id+"/lessons");window.location.href=o,this.form={};return}this.$eventBus.emit("reloadMenu"),this.$notify.success(s.message||this.$t("Course has been created successfully")),this.$emit("completed",s.course),t&&this.$emit("close")}).catch(s=>{this.$handleError(s)}).finally(()=>{this.saving=!1})},searchUsers(t=""){t&&t.length<3||this.fetchCourseInstructors(t)},handlePhotoUpload(t){this.form.cover_photo=t},fetchMetaBoxes(){this.course.id&&(this.fetchingMetaBoxes=!0,this.$get("admin/courses/"+this.course.id+"/meta-settings").then(t=>{this.metaSettings=t.meta_settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetchingMetaBoxes=!1}))},fetchCourseInstructors(t=""){this.fetchingInstructors=!0,this.$get("admin/courses/"+this.course.id+"/instructors/search",{search:t}).then(e=>{this.courseInstructors=e.instructors}).catch(e=>{this.$handleError(e)}).finally(()=>{this.fetchingInstructors=!1})}},mounted(){var e,n,i,s,o;this.course.id?(this.form=this.course,this.form.created_by=parseInt(this.form.created_by),this.fetchMetaBoxes(),this.fetchCourseInstructors()):this.parent_id&&(this.form.parent_id=this.parent_id);const t=(n=(e=this.course)==null?void 0:e.settings)==null?void 0:n.course_type;t&&!((i=this.form)!=null&&i.course_type)&&(this.form.course_type=t),(!((o=(s=this.form)==null?void 0:s.settings)!=null&&o.course_layout)||!this.has_pro)&&(this.form.settings.course_layout="classic"),this.dataLoaded=!0,this.$nextTick(()=>{this.appReady=!0})}},pTe={key:0},mTe={class:"fcom_form_section"},gTe={class:"fcom_help_text"},vTe={class:"fcom_help_text"},_Te={class:"fcom_form_section"},yTe={style:{"font-weight":"bold"}},bTe={key:0},wTe={class:"fcom_help_text"},kTe={style:{"font-weight":"bold"}},CTe={class:"fcom_form_section"},xTe={class:"fcom_lined_checkboxes"},STe={class:"fcom_checkbox_with_tooltip"},$Te={key:0},ATe={key:0},ETe={class:"fcom_help_text"},MTe={key:0,class:"fcom_form_section"},TTe={class:"fcom_select_photo",style:{float:"left"}},PTe=["src","alt"],ITe={style:{float:"right",color:"#8492a6","font-size":"13px"}},LTe={class:"fcom_lined_checkboxes"},OTe={class:"fcom_form_section"},DTe={class:"fcom_help_text"},RTe=["href"],VTe={class:"fcom_image_uploader_wrapper"},FTe={class:"fcom_help_text"},NTe={class:"fcom_space_form_bottom"},BTe={key:0},zTe={class:"fcom_form_section fcom_mt_20"},HTe={key:1},UTe=["href"];function jTe(t,e,n,i,s,o){const r=B("logo-emoji-selector"),a=ht,l=tn,c=B("SlugInput"),u=B("crepe-editor"),d=B("space-group-selector"),h=Li,f=ws,p=Zt,m=Wt,b=qt,w=B("InfoFilled"),k=we,C=Ss,A=B("topic-selector"),S=bo,M=B("EditPen"),P=ze,T=B("Delete"),I=B("ImageUploader"),L=B("error-alerts"),R=nn,V=B("form-builder"),H=xt("loading");return t.hasFeature("has_course")?(v(),$("div",pTe,[_(R,{onSubmit:e[23]||(e[23]=Me(F=>t.doNothing(),["prevent"])),modelValue:s.form,"onUpdate:modelValue":e[24]||(e[24]=F=>s.form=F),"label-position":"top","require-asterisk-position":"right"},{default:y(()=>[g("div",mTe,[g("h4",null,x(t.$t("General")),1),_(l,{label:t.$t("Course Title"),required:""},{default:y(()=>[_(a,{type:"text",ref:"titleInput",placeholder:t.$t("Your Course Title"),modelValue:s.form.title,"onUpdate:modelValue":e[1]||(e[1]=F=>s.form.title=F)},{prepend:y(()=>{var F,U;return[s.dataLoaded?(v(),D(r,{key:0,custom_svg:!0,config:{logo:s.form.logo,emoji:(F=s.form.settings)==null?void 0:F.emoji,shape_svg:((U=s.form.settings)==null?void 0:U.shape_svg)||""},onUpdate:e[0]||(e[0]=Y=>{s.form.settings.emoji=Y.emoji,s.form.logo=Y.logo,s.form.settings.shape_svg=Y.shape_svg})},null,8,["config"])):O("",!0)]}),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),s.dataLoaded?(v(),D(l,{key:0,label:t.$t("Slug (optional)")},{default:y(()=>[_(c,{popMessage:t.$t("The URLs of this course lessons will be changed to the new slug. If you have lots of lessons and sections in this course, you should not change it. Are you sure you want to change it?"),is_inital_inactive:!!s.form.id,modelValue:s.form.slug,"onUpdate:modelValue":e[2]||(e[2]=F=>s.form.slug=F),description:t.$t("No spaces or special characters allowed. Only letters, numbers, hyphens, and underscores."),placeholder:t.$t("Course Slug (no spaces or special characters)")},null,8,["popMessage","is_inital_inactive","modelValue","description","placeholder"])]),_:1},8,["label"])):O("",!0),_(l,{label:t.$t("Short Description"),required:""},{default:y(()=>[_(a,{type:"textarea",placeholder:t.$t("Course Description"),modelValue:s.form.description,"onUpdate:modelValue":e[3]||(e[3]=F=>s.form.description=F)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),_(l,{class:"form_label_with_tooltip",label:t.$t("Course Details")},{default:y(()=>[s.appReady?(v(),D(u,{key:0,modelValue:s.form.settings.course_details,"onUpdate:modelValue":e[4]||(e[4]=F=>s.form.settings.course_details=F),autofocus:!1,placeholder:t.$t("Add any additional information or notes about this course here"),disable_media:!0},null,8,["modelValue","placeholder"])):O("",!0),g("div",gTe,[g("p",null,x(t.$t("This section will be displayed on the course landing page. Add extra details, notes, or instructions to help learners understand the course better.")),1)])]),_:1},8,["label"]),_(l,{label:t.$t("Menu Group")},{default:y(()=>[s.dataLoaded?(v(),D(d,{key:0,modelValue:s.form.parent_id,"onUpdate:modelValue":e[5]||(e[5]=F=>s.form.parent_id=F),space_id:s.form.id},null,8,["modelValue","space_id"])):O("",!0),g("div",vTe,[g("p",null,x(t.$t("Select a menu group to where this course will be added to the sidebar. If you do not select a menu group, it will be available on the all courses page.")),1)])]),_:1},8,["label"]),_(l,{label:t.$t("Status")},{default:y(()=>[_(f,{modelValue:s.form.status,"onUpdate:modelValue":e[6]||(e[6]=F=>s.form.status=F),class:"fcom_radio_group"},{default:y(()=>[_(h,{value:"published"},{default:y(()=>[N(x(t.$t("Published")),1)]),_:1}),_(h,{value:"draft"},{default:y(()=>[N(x(t.$t("Draft")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])]),g("div",_Te,[g("h4",null,x(t.$t("Access Control")),1),_(l,{label:t.$t("Privacy")},{default:y(()=>[_(m,{"popper-class":"rich_select",modelValue:s.form.privacy,"onUpdate:modelValue":e[7]||(e[7]=F=>s.form.privacy=F),placeholder:t.$t("Select Privacy")},{default:y(()=>[(v(!0),$(J,null,ye(s.privacies,(F,U)=>(v(),D(p,{key:U,label:F.label,value:U},{default:y(()=>[g("span",yTe,x(F.label),1),g("p",null,x(F.description),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),s.form.privacy=="private"?(v(),$(J,{key:0},[_(l,{label:t.$t("Lock Screen Type")},{default:y(()=>[_(f,{modelValue:s.form.settings.custom_lock_screen,"onUpdate:modelValue":e[8]||(e[8]=F=>s.form.settings.custom_lock_screen=F),class:"fcom_radio_group"},{default:y(()=>[_(h,{value:"yes"},{default:y(()=>[N(x(t.$t("Custom")),1)]),_:1}),_(h,{value:"no"},{default:y(()=>[N(x(t.$t("Default")),1)]),_:1}),_(h,{disabled:!t.has_pro,value:"redirect"},{default:y(()=>[N(x(t.$t("Redirect to an URL"))+" ",1),t.has_pro?O("",!0):(v(),$("span",bTe,"("+x(t.$t("Pro Required"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),s.form.settings.custom_lock_screen=="redirect"&&t.has_pro?(v(),D(l,{key:0,label:t.$t("Provide the Redirect URL")},{default:y(()=>[_(a,{modelValue:s.form.settings.onboard_redirect_url,"onUpdate:modelValue":e[9]||(e[9]=F=>s.form.settings.onboard_redirect_url=F),type:"text",placeholder:t.$t("Redirect URL for unenrolled users")},null,8,["modelValue","placeholder"]),g("div",wTe,[g("p",null,x(t.$t("This link will be used to redirect the unenrolled or public users. This may be your sales page for this course")),1)])]),_:1},8,["label"])):O("",!0),s.form.settings.custom_lock_screen=="no"?(v(),D(l,{key:1,style:{"margin-bottom":"0"}},{default:y(()=>[_(b,{"true-value":"yes","false-value":"no",modelValue:s.form.settings.show_paywalls,"onUpdate:modelValue":e[10]||(e[10]=F=>s.form.settings.show_paywalls=F),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Show Paywalls in the default lock screen")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0),s.form.settings.custom_lock_screen=="no"?(v(),D(l,{key:2},{default:y(()=>[_(b,{"true-value":"yes","false-value":"no",modelValue:s.form.settings.show_welcome_banner,"onUpdate:modelValue":e[11]||(e[11]=F=>s.form.settings.show_welcome_banner=F),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Show Welcome Banner in the default lock screen")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0)],64)):O("",!0),_(l,{label:t.$t("Enrollment Type")},{default:y(()=>[_(m,{"popper-class":"rich_select",modelValue:s.form.course_type,"onUpdate:modelValue":e[12]||(e[12]=F=>s.form.course_type=F),placeholder:t.$t("Select Type")},{default:y(()=>[(v(!0),$(J,null,ye(s.courseTypes,(F,U)=>(v(),D(p,{key:U,label:F.label,value:U},{default:y(()=>[g("span",kTe,x(F.label),1),g("p",null,x(F.description),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),g("div",CTe,[g("h4",null,x(t.$t("Features Customizations")),1),_(l,null,{default:y(()=>[g("div",xTe,[s.form.privacy=="public"&&s.form.course_type=="self_paced"?(v(),D(b,{key:0,"true-value":"yes","false-value":"no",modelValue:s.form.settings.public_lesson_view,"onUpdate:modelValue":e[13]||(e[13]=F=>s.form.settings.public_lesson_view=F),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Public users can view the lessons without enrolling in the course")),1)]),_:1},8,["modelValue"])):O("",!0),_(b,{"true-value":"yes","false-value":"no",modelValue:s.form.settings.disable_comments,"onUpdate:modelValue":e[14]||(e[14]=F=>s.form.settings.disable_comments=F),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Disable comments for all the lessons for this course")),1)]),_:1},8,["modelValue"]),_(b,{"true-value":"yes","false-value":"no",modelValue:s.form.settings.hide_members_count,"onUpdate:modelValue":e[15]||(e[15]=F=>s.form.settings.hide_members_count=F),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Hide students count from courses page")),1)]),_:1},8,["modelValue"]),g("div",STe,[_(b,{disabled:!t.has_pro,"true-value":"yes","false-value":"no","model-value":t.has_pro?s.form.settings.sequential_lesson_order:"no","onUpdate:modelValue":e[16]||(e[16]=F=>{s.form.settings.sequential_lesson_order=F}),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Lesson order enforcement"))+" ",1),t.has_pro?O("",!0):(v(),$("span",$Te,"("+x(t.$t("Pro Required"))+")",1))]),_:1},8,["disabled","model-value"]),_(C,{class:"box-item fcom_checkbox_tooltip",effect:"dark",placement:"right-end"},{content:y(()=>[N(x(t.$t("Your members will have to complete each lesson")),1),e[25]||(e[25]=g("br",null,null,-1)),N(" "+x(t.$t("in order before moving onto the next one.")),1)]),default:y(()=>[_(k,null,{default:y(()=>[_(w)]),_:1})]),_:1})])])]),_:1}),_(l,{label:t.$t("Course Layout")},{default:y(()=>[_(f,{modelValue:s.form.settings.course_layout,"onUpdate:modelValue":e[17]||(e[17]=F=>s.form.settings.course_layout=F),class:"fcom_radio_group"},{default:y(()=>[_(h,{value:"classic"},{default:y(()=>[N(x(t.$t("Classic")),1)]),_:1}),_(h,{disabled:!t.has_pro,value:"modern"},{default:y(()=>[N(x(t.$t("Modern"))+" ",1),t.has_pro?O("",!0):(v(),$("span",ATe,"("+x(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",ETe,[g("p",null,x(t.$t("Classic is the default layout. For a more visual and engaging experience, the Modern layout displays the featured image or embedded video thumbnail.")),1)])]),_:1},8,["label"])]),s.form.id?(v(),$("div",MTe,[g("h4",null,x(t.$t("Course Instructor")),1),_(l,{label:t.$t("Instructor")},{default:y(()=>[_(m,{disabled:!t.isAdmin(),class:"rich_select","fit-input-width":"",filterable:"",remote:"",loading:s.fetchingInstructors,"remote-method":o.searchUsers,placeholder:t.$t("Select User"),modelValue:s.form.created_by,"onUpdate:modelValue":e[18]||(e[18]=F=>s.form.created_by=F)},{default:y(()=>[(v(!0),$(J,null,ye(s.courseInstructors,F=>(v(),D(p,{class:"fcom_with_photo_option",key:F.ID,label:F.display_name+" ("+(F.user_email||F.ID)+")",value:F.ID},{default:y(()=>[g("span",TTe,[g("img",{src:F.photo,alt:F.display_name},null,8,PTe),g("span",null,x(F.display_name),1)]),g("span",ITe,x(F.user_email||F.ID),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["disabled","loading","remote-method","placeholder","modelValue"])]),_:1},8,["label"]),_(l,null,{default:y(()=>[g("div",LTe,[_(b,{"true-value":"yes","false-value":"no",modelValue:s.form.settings.hide_instructor_view,"onUpdate:modelValue":e[19]||(e[19]=F=>s.form.settings.hide_instructor_view=F),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Hide course instructor view from course overview page")),1)]),_:1},8,["modelValue"]),s.form.settings.hide_instructor_view!="yes"?(v(),D(b,{key:0,"true-value":"yes","false-value":"no",modelValue:s.form.settings.show_instructor_students_count,"onUpdate:modelValue":e[20]||(e[20]=F=>s.form.settings.show_instructor_students_count=F),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Show students count in course instructor view")),1)]),_:1},8,["modelValue"])):O("",!0)])]),_:1})])):O("",!0),g("div",OTe,[g("h4",null,x(t.$t("Others")),1),t.has_pro&&s.dataLoaded?(v(),D(l,{key:0,label:t.$t("Topic navigation")},{default:y(()=>[_(A,{modelValue:s.form.category_ids,"onUpdate:modelValue":e[21]||(e[21]=F=>s.form.category_ids=F),creatable:!0},null,8,["modelValue"]),g("div",DTe,[g("p",null,x(t.$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),g("p",null,[t.isAdmin()?(v(),$("a",{key:0,target:"_blank",rel:"noopener",href:t.$getRouteLink("admin/settings/topics-settings")},x(t.$t("Manage all topics")),9,RTe)):O("",!0)])])]),_:1},8,["label"])):O("",!0),_(l,{label:t.$t("Thumbnail / Open Graph Image (Recommended Size: 1200 x 630)")},{default:y(()=>[s.form.cover_photo?(v(),D(S,{key:0,alt:t.$t("Cover Photo"),src:s.form.cover_photo,style:{"max-width":"100px",height:"auto"}},null,8,["alt","src"])):O("",!0),g("div",VTe,[_(I,{isTextBtn:!1,can_remove:!!s.form.cover_photo,additionalData:{resize:!1,disable_convert:"yes",max_width:1200,max_height:630},onUploaded:o.handlePhotoUpload},hs({remove:y(()=>[_(k,null,{default:y(()=>[_(T)]),_:1})]),_:2},[s.form.cover_photo?{name:"trigger",fn:y(()=>[_(P,{class:"fcom_plain_button"},{default:y(()=>[_(k,null,{default:y(()=>[_(M)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove","onUploaded"])]),g("div",FTe,[g("p",null,x(t.$t("Will be used on course card preview and social sharing preview.")),1)])]),_:1},8,["label"]),_(L,{errors:s.formErrors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),s.form.id?O("",!0):(v(),D(l,{key:1,style:{"margin-top":"45px"}},{default:y(()=>[g("div",NTe,[e[26]||(e[26]=g("span",null,null,-1)),_(P,{class:"fcom_primary_button",disabled:s.saving,onClick:e[22]||(e[22]=F=>o.submit()),loading:s.saving},{default:y(()=>[g("span",null,x(t.$t("Create")),1)]),_:1},8,["disabled","loading"])])]),_:1}))])]),_:1},8,["modelValue"]),Re((v(),$("div",null,[s.metaSettings&&Object.keys(s.metaSettings).length>0?(v(),$("div",BTe,[(v(!0),$(J,null,ye(s.metaSettings,F=>(v(),$("div",zTe,[g("h4",null,x(F.section_title),1),_(V,{formData:F.settings,formFields:F.fields,disableSubmit:!0},null,8,["formData","formFields"])]))),256))])):O("",!0)])),[[H,s.fetchingMetaBoxes]])])):(v(),$("div",HTe,[g("p",null,x(t.$t("Course Module is disabled. Please enable the course module first")),1),g("a",{class:"el-button el-button--default fcom_primary_button fcom_mt_10",href:t.$getRouteLink("admin/settings/features")},x(t.$t("Go to features settings")),9,UTe)]))}const ES=ce(fTe,[["render",jTe]]),WTe={name:"SpaceIcon",props:["space_profile"]},YTe=["alt","src"],qTe={key:1,class:"fcom_emoji"},GTe={key:2,class:"fcom_shape"},XTe={key:3,class:"fcom_no_avatar"};function KTe(t,e,n,i,s,o){var a,l,c,u;const r=we;return n.space_profile.logo?(v(),$("img",{key:0,alt:t.$t("Space Logo"),src:n.space_profile.logo},null,8,YTe)):(a=n.space_profile.settings)!=null&&a.emoji?(v(),$("span",qTe,x((l=n.space_profile.settings)==null?void 0:l.emoji),1)):(c=n.space_profile.settings)!=null&&c.shape_svg?(v(),$("span",GTe,[_(r,{innerHTML:(u=n.space_profile.settings)==null?void 0:u.shape_svg},null,8,["innerHTML"])])):(v(),$("span",XTe))}const Sp=ce(WTe,[["render",KTe]]),ZTe={name:"SpaceCourseSelector",components:{SpaceIcon:Sp},emits:["update:modelValue","selectedType","selectedSlug"],props:{modelValue:{type:[String,Number,Array],default:""},placeholder_text:{type:String,default:""},is_multiple:{type:Boolean,default:!1},memberships:{type:Array,default:[]}},data(){return{all_spaces:[],selected_spaces:"",loading:!1,formattedSpaceGroups:[],app_ready:!1}},watch:{selected_spaces(t){this.is_multiple?this.$emit("update:modelValue",Array.isArray(t)?t:[]):this.$emit("update:modelValue",t||"")}},methods:{isMemberOfSpace(t){return this.memberships&&this.memberships.includes(t.toString())},fetch(){this.loading=!0,this.$get("admin/all_space_courses").then(t=>{this.all_spaces=t.all_spaces,this.formatSpaceGroups()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},emitChanges(){this.$emit("update:modelValue",this.selected_spaces||"");const t=Array.isArray(this.selected_spaces)&&this.selected_spaces.length?this.selected_spaces[0]:this.selected_spaces,e=this.all_spaces.find(n=>n.id==t);this.$emit("selectedSlug",(e==null?void 0:e.slug)||""),this.$emit("selectedType",(e==null?void 0:e.type)=="course"?"course":"space")},formatSpaceGroups(){if(this.all_spaces.length==0)return;let t=this.all_spaces,e=this.appVars.space_groups,n=[],i=[];this.each(e,o=>{let r=t.filter(a=>{let l=a.parent_id==o.id;return l&&i.push(a.slug),l});r.length&&n.push({label:o.title,spaces:r})});let s=t.filter(o=>o.parent_id===null);s&&s.length&&n.push({label:this.$t("Uncategorized"),spaces:s}),this.formattedSpaceGroups=n}},mounted(){this.is_multiple?this.selected_spaces=Array.isArray(this.modelValue)?this.modelValue:[]:this.selected_spaces=this.modelValue||"",this.fetch(),this.app_ready=!0}},JTe={key:0,class:"fcom_space_title"},QTe={key:0},ePe={key:1};function tPe(t,e,n,i,s,o){const r=B("SpaceIcon"),a=Zt,l=q1,c=Wt,u=xt("loading");return s.app_ready?(v(),D(c,{key:0,onChange:o.emitChanges,modelValue:s.selected_spaces,"onUpdate:modelValue":e[0]||(e[0]=d=>s.selected_spaces=d),filterable:"",multiple:n.is_multiple,placeholder:n.placeholder_text,style:{width:"100%"}},{default:y(()=>[(v(!0),$(J,null,ye(s.formattedSpaceGroups,d=>Re((v(),D(l,{key:d.label,label:d.label},{default:y(()=>[(v(!0),$(J,null,ye(d.spaces,h=>(v(),D(a,{key:h.slug,label:h.title,disabled:o.isMemberOfSpace(h.id),value:h.id.toString()},{default:y(()=>[h.id?(v(),$("span",JTe,[_(r,{space_profile:h},null,8,["space_profile"]),g("span",null,[N(x(t.getExcerpt(h.title,50))+" ",1),h.type=="course"?(v(),$("span",QTe," ("+x(t.$t("course"))+")",1)):O("",!0)])])):(v(),$("span",ePe,x(t.getExcerpt(h.title,50)),1))]),_:2},1032,["label","disabled","value"]))),128))]),_:2},1032,["label"])),[[u,s.loading]])),128))]),_:1},8,["onChange","modelValue","multiple","placeholder"])):O("",!0)}const MS=ce(ZTe,[["render",tPe]]),nPe={name:"SidebarLinkForm",components:{SpaceGroupSelector:j8,LogoEmojiSelector:sv,SpaceCourseSelector:MS,ErrorAlerts:iv},emits:["completed"],data(){return{saving:!1,formErrors:[],form:{title:"",privacy:"public",parent_id:"",settings:{permalink:"",new_tab:"yes",emoji:"🔗",shape_svg:"",memberships:[]}},dataLoaded:!1}},props:{link:{type:Object,default:()=>({})},parent_id:{type:[Number,String],default:null}},methods:{validateForm(){return this.formErrors=[],(!this.form.title||!this.form.title.trim())&&this.formErrors.push(this.$t("Link title is required.")),(!this.form.settings.permalink||!this.form.settings.permalink.trim())&&this.formErrors.push(this.$t("URL cannot be empty.")),this.formErrors.length===0},saveSettings(){this.validateForm()&&(this.saving=!0,this.$post("admin/links",{link:this.form}).then(t=>{this.$eventBus.emit("reloadMenu"),this.$emit("completed",t.link),this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1}))}},mounted(){this.link&&this.link.id?this.form=this.link:this.parent_id?this.form.parent_id=this.parent_id:this.$route.query.parent_id&&(this.form.parent_id=this.$route.query.parent_id),this.dataLoaded=!0}},sPe={class:"fcom_form_section"},iPe={class:"fcom_help_text"},oPe={class:"fcom_help_text"},rPe={class:"fcom_help_text"},aPe={key:0},lPe={key:1};function cPe(t,e,n,i,s,o){const r=B("logo-emoji-selector"),a=ht,l=tn,c=qt,u=B("space-group-selector"),d=Li,h=ws,f=B("SpaceCourseSelector"),p=B("error-alerts"),m=ze,b=nn,w=xt("loading");return v(),D(b,{onSubmit:e[8]||(e[8]=Me(k=>t.doNothing(),["prevent"])),modelValue:s.form,"onUpdate:modelValue":e[9]||(e[9]=k=>s.form=k),"label-position":"top","require-asterisk-position":"right",class:"fcom_space_form"},{default:y(()=>[g("div",sPe,[_(l,{label:t.$t("Link Title"),required:""},{default:y(()=>[_(a,{type:"text",placeholder:t.$t("Your Link Title"),modelValue:s.form.title,"onUpdate:modelValue":e[1]||(e[1]=k=>s.form.title=k)},{prepend:y(()=>{var k,C;return[s.dataLoaded?(v(),D(r,{key:0,custom_svg:!0,onUpdate:e[0]||(e[0]=A=>{s.form.settings.emoji=A.emoji,s.form.logo=A.logo,s.form.settings.shape_svg=A.shape_svg}),config:{logo:s.form.logo,emoji:((k=s.form.settings)==null?void 0:k.emoji)||"",shape_svg:((C=s.form.settings)==null?void 0:C.shape_svg)||""}},null,8,["config"])):O("",!0)]}),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),_(l,{label:t.$t("Permalink"),required:""},{default:y(()=>[_(a,{placeholder:t.$t("URL of the link"),modelValue:s.form.settings.permalink,"onUpdate:modelValue":e[2]||(e[2]=k=>s.form.settings.permalink=k)},null,8,["placeholder","modelValue"]),g("div",iPe,[_(c,{modelValue:s.form.settings.new_tab,"onUpdate:modelValue":e[3]||(e[3]=k=>s.form.settings.new_tab=k),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Open this link in new tab")),1)]),_:1},8,["modelValue"])])]),_:1},8,["label"]),_(l,{label:t.$t("Menu Group")},{default:y(()=>[s.dataLoaded?(v(),D(u,{key:0,modelValue:s.form.parent_id,"onUpdate:modelValue":e[4]||(e[4]=k=>s.form.parent_id=k),space_id:s.form.id},null,8,["modelValue","space_id"])):O("",!0),g("div",oPe,[g("p",null,x(t.$t("Select a menu group to where this link will be added to the sidebar.")),1)])]),_:1},8,["label"]),_(l,{label:t.$t("Visibility")},{default:y(()=>[_(h,{modelValue:s.form.privacy,"onUpdate:modelValue":e[5]||(e[5]=k=>s.form.privacy=k)},{default:y(()=>[_(d,{label:t.$t("Everyone"),value:"public"},null,8,["label"]),_(d,{label:t.$t("Logged-in users only"),value:"logged_in"},null,8,["label"]),_(d,{label:t.$t("By Space/Course Memberships"),value:"members_only"},null,8,["label"])]),_:1},8,["modelValue"]),g("div",rPe,[g("p",null,x(t.$t("Select who can see this link.")),1)])]),_:1},8,["label"]),s.form.privacy=="members_only"?(v(),D(l,{key:0,label:t.$t("Select Space/Course Memberships")},{default:y(()=>[_(f,{modelValue:s.form.settings.membership_ids,"onUpdate:modelValue":e[6]||(e[6]=k=>s.form.settings.membership_ids=k),placeholder_text:t.$t("Select Memberships"),is_multiple:!0},null,8,["modelValue","placeholder_text"])]),_:1},8,["label"])):O("",!0),_(p,{errors:s.formErrors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),_(l,{style:{"margin-top":"45px"}},{default:y(()=>[Re((v(),D(m,{class:"fcom_primary_button",disabled:s.saving,onClick:e[7]||(e[7]=k=>o.saveSettings())},{default:y(()=>[s.form.id?(v(),$("span",aPe,x(t.$t("Update")),1)):(v(),$("span",lPe,x(t.$t("Create Link")),1))]),_:1},8,["disabled"])),[[w,s.saving]])]),_:1})])]),_:1},8,["modelValue"])}const tU=ce(nPe,[["render",cPe]]),uPe={name:"SpaceIcon"},dPe={version:"1.1",viewBox:"0 0 128 128","xml:space":"preserve"};function hPe(t,e,n,i,s,o){return v(),$("svg",dPe,[...e[0]||(e[0]=[xr('<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)])])}const fPe=ce(uPe,[["render",hPe]]),pPe={name:"CourseIcon"},mPe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function gPe(t,e,n,i,s,o){return v(),$("svg",mPe,[...e[0]||(e[0]=[g("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),g("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)])])}const nU=ce(pPe,[["render",gPe]]),vPe={name:"SpaceCreateModal",components:{Drawer:nu,CreateSpaceForm:W8,CreateCourseForm:ES,SidebarLinkForm:tU,ArrowLeftBold:uae,SpaceIcon:fPe,CourseIcon:nU,Link:bR},data(){return{step:"choose_type",parent_id:null,showCreateSpaceModal:!1,select_type:"space_form",disable_redirect:!1,enteredForm:!1}},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"):this.step==="link_form"?this.$t("Create a Link"):""},leaveMessage(){return this.enteredForm?this.$t("Some settings have been changed. Are you sure to leave this page?"):this.$t("Closing will discard your changes. Are you sure?")}},watch:{showCreateSpaceModal(t){t||(this._resetState(),this._clearUrlQuery())}},methods:{handleNextStep(){this.enteredForm=!0,this.step=this.select_type},_resetState(){this.step="choose_type",this.select_type="space_form",this.enteredForm=!1},_clearUrlQuery(){const{create_space:t,parent_id:e,...n}=this.$route.query;t===void 0&&e===void 0||this.$router.replace({query:n})},handleCompleted(t){this.enteredForm=!1,this.parent_id=null,this.showCreateSpaceModal=!1,this.$eventBus.emit("spaceCreated",t)}},beforeUnmount(){this.$eventBus.off("createSpaceModal")},created(){this.$eventBus.on("createSpaceModal",t=>{const e=this.$route.query.parent_id||null;this._resetState(),this.showCreateSpaceModal=!0,this.parent_id=t&&t.parent_id||e||null,t&&(this.disable_redirect=!!t.disable_redirect,t.spaceConfig?(this.step="space_form",this.select_type="space_form",this.enteredForm=!0):t.course_config&&(this.select_type="course_form",this.step="course_form",this.enteredForm=!0))})},mounted(){this.$router.isReady().then(()=>{const{create_space:t,parent_id:e}=this.$route.query;t==="yes"&&e&&this.$eventBus.emit("createSpaceModal",{parent_id:e})})}},_Pe={class:"dialog_header"},yPe={class:"dialog_left"},bPe={class:"dialog_body"},wPe={key:0,class:"space-type-selector"},kPe={class:"space-cards"},CPe={class:"space-card-label"},xPe={class:"space-card-label"},SPe={key:0,class:"space-card-note"},$Pe={class:"space-card-label"},APe={key:0,class:"space-card-note"},EPe={class:"dialog_footer"};function MPe(t,e,n,i,s,o){const r=B("ArrowLeftBold"),a=we,l=ze,c=B("SpaceIcon"),u=B("CourseIcon"),d=B("Link"),h=B("create-space-form"),f=B("create-course-form"),p=B("sidebar-link-form"),m=B("Drawer");return v(),D(m,{modelValue:s.showCreateSpaceModal,"onUpdate:modelValue":e[5]||(e[5]=b=>s.showCreateSpaceModal=b),size:t.drawerWidth,"close-on-click-modal":!0,"has-close-confirmation":s.enteredForm,"close-confirmation-message":o.leaveMessage,drawerClass:"fcom_space_create_drawer"},hs({header:y(()=>[g("div",_Pe,[g("div",yPe,[s.step!="choose_type"?(v(),D(l,{key:0,"aria-label":t.$t("Back"),onClick:e[0]||(e[0]=b=>s.step="choose_type"),text:"",size:"small"},{default:y(()=>[_(a,null,{default:y(()=>[_(r)]),_:1})]),_:1},8,["aria-label"])):O("",!0),g("h4",null,x(o.currentTitle),1)])])]),default:y(()=>[g("div",bPe,[s.step=="choose_type"?(v(),$("div",wPe,[g("div",kPe,[g("div",{onClick:e[1]||(e[1]=b=>s.select_type="space_form"),class:q([{"is-active":s.select_type==="space_form"},"space-card"])},[_(a,{class:"space-card-icon"},{default:y(()=>[_(c)]),_:1}),g("span",CPe,x(t.$t("Discussion Space")),1)],2),g("div",{onClick:e[2]||(e[2]=b=>!!t.hasFeature("has_course")&&(s.select_type="course_form")),class:q([{"is-active":s.select_type==="course_form","is-disabled":!t.hasFeature("has_course")},"space-card"])},[_(a,{class:"space-card-icon"},{default:y(()=>[_(u)]),_:1}),g("span",xPe,x(t.$t("Course")),1),t.hasFeature("has_course")?O("",!0):(v(),$("span",SPe,x(t.$t("Course Module is disabled")),1))],2),g("div",{onClick:e[3]||(e[3]=b=>!!t.appVars.pro&&(s.select_type="link_form")),class:q([{"is-active":s.select_type==="link_form","is-disabled":!t.appVars.pro},"space-card"])},[_(a,{class:"space-card-icon"},{default:y(()=>[_(d)]),_:1}),g("span",$Pe,x(t.$t("Link")),1),t.appVars.pro?O("",!0):(v(),$("span",APe,x(t.$t("Pro Required")),1))],2)])])):s.step=="space_form"?(v(),D(h,{key:1,disable_redirect:s.disable_redirect,parent_id:s.parent_id,onCompleted:o.handleCompleted},null,8,["disable_redirect","parent_id","onCompleted"])):s.step=="course_form"?(v(),D(f,{key:2,disable_redirect:s.disable_redirect,parent_id:s.parent_id,onCompleted:o.handleCompleted},null,8,["disable_redirect","parent_id","onCompleted"])):s.step=="link_form"?(v(),D(p,{key:3,parent_id:s.parent_id,onCompleted:o.handleCompleted},null,8,["parent_id","onCompleted"])):O("",!0)])]),_:2},[s.step=="choose_type"?{name:"footer",fn:y(()=>[g("div",EPe,[_(l,{disabled:!s.select_type,class:"fcom_primary_button",onClick:e[4]||(e[4]=b=>o.handleNextStep())},{default:y(()=>[N(x(t.$t("Next")),1)]),_:1},8,["disabled"])])]),key:"0"}:void 0]),1032,["modelValue","size","has-close-confirmation","close-confirmation-message"])}const TPe=ce(vPe,[["render",MPe]]),Us=Q1("cache",{state:()=>({cache:{},stats:{hits:0,misses:0,size:0,totalSaved:0},maxSize:500,maxMemorySize:50*1024*1024}),getters:{getCacheHitRate:t=>{const e=t.stats.hits+t.stats.misses;return e>0?(t.stats.hits/e*100).toFixed(2):0},getCacheSize:t=>Object.keys(t.cache).length,getMemoryUsage:t=>{try{return(new Blob([JSON.stringify(t.cache)]).size/1024/1024).toFixed(2)+" MB"}catch{return"Unknown"}},getCacheKeys:t=>Object.keys(t.cache),getCacheEntry:t=>e=>t.cache[e]||null},actions:{get(t,e=null){const n=this.cache[t];if(!n)return this.stats.misses++,null;const i=Date.now()-n.timestamp,s=n.ttl||e||5*60*1e3;return i>s?(delete this.cache[t],this.stats.misses++,this.stats.size=Object.keys(this.cache).length,null):(this.stats.hits++,n.hits=(n.hits||0)+1,n.lastAccessed=Date.now(),n.data)},set(t,e,n=5*60*1e3){Object.keys(this.cache).length>=this.maxSize&&this.pruneLRU(50),this.cache[t]={data:e,timestamp:Date.now(),lastAccessed:Date.now(),hits:0,ttl:n},this.stats.size=Object.keys(this.cache).length,this.stats.totalSaved++},invalidate(t){this.cache[t]&&(delete this.cache[t],this.stats.size=Object.keys(this.cache).length)},invalidatePattern(t){let e=0;return Object.keys(this.cache).forEach(n=>{n.includes(t)&&(delete this.cache[n],e++)}),this.stats.size=Object.keys(this.cache).length,e},pruneLRU(t){const e=Object.entries(this.cache).map(([n,i])=>({key:n,lastAccessed:i.lastAccessed||i.timestamp})).sort((n,i)=>n.lastAccessed-i.lastAccessed).slice(0,t);return e.forEach(({key:n})=>{delete this.cache[n]}),this.stats.size=Object.keys(this.cache).length,e.length},pruneExpired(t=15*60*1e3){let e=0;const n=Date.now();return Object.entries(this.cache).forEach(([i,s])=>{n-s.timestamp>t&&(delete this.cache[i],e++)}),this.stats.size=Object.keys(this.cache).length,e},clear(){this.cache={},this.stats.hits=0,this.stats.misses=0,this.stats.size=0},getStats(){return{...this.stats,hitRate:this.getCacheHitRate,memoryUsage:this.getMemoryUsage,cacheSize:this.getCacheSize}},has(t){return t in this.cache},getKeysMatching(t){return Object.keys(this.cache).filter(e=>e.includes(t))},warmCache(t){Object.entries(t).forEach(([e,n])=>{this.set(e,n)})}}}),TS=Q1("user",{state:()=>({currentUser:null,profilesByUsername:{},follows:{},followers:[],loading:{},lastFetched:{}}),getters:{getProfile:t=>e=>t.profilesByUsername[e]||null,isFollowing:t=>e=>{const n=t.follows[String(e)];return n!==void 0&&["1","2"].includes(String(n))},isBlocked:t=>e=>{const n=t.follows[String(e)];return n!==void 0&&String(n)==="0"},getFollowLevel:t=>e=>t.follows[String(e)],getCurrentUser:t=>t.currentUser,isLoading:t=>e=>t.loading[e]||!1,followingCount:t=>Object.values(t.follows).filter(e=>["1","2"].includes(String(e))).length,followersCount:t=>t.followers.length},actions:{initializeCurrentUser(){var t;(t=window.fluentComAdmin)!=null&&t.auth&&(this.currentUser=window.fluentComAdmin.auth)},setFollows(t){if(!(!t||typeof t!="object"))for(const[e,n]of Object.entries(t)){const i=String(e);n==null?delete this.follows[i]:this.follows[i]=String(n)}},removeFollow(t){delete this.follows[String(t)]},async fetchProfile(t,e=!1){const n=Us(),i=`user-profile:${t}`;if(!e){const s=n.get(i);if(s)return this.profilesByUsername[t]=s,s.follow!==void 0&&s.user_id&&this.setFollows({[s.user_id]:s.follow}),s}this.loading[t]=!0;try{const s=await this.$api.get(`profile/${t}`),o=s.profile;return o.follow!==void 0&&o.user_id&&this.setFollows({[o.user_id]:o.follow}),s.current_user_follows&&this.setFollows(s.current_user_follows),this.profilesByUsername[t]=o,this.lastFetched[t]=Date.now(),n.set(i,o,5*60*1e3),this.loading[t]=!1,o}catch(s){throw this.loading[t]=!1,console.error("Failed to fetch user profile:",s),s}},async updateProfile(t,e=null,n=null){var s,o;const i=Us();try{const r=n||((s=this.currentUser)==null?void 0:s.username),a=await this.$api.put(`profile/${r}`,{data:t}),l=a.profile||a.user||a;return this.currentUser={...this.currentUser,...l},e&&e!==l.username&&(delete this.profilesByUsername[e],i.invalidate(`user-profile:${e}`)),l.username&&(this.profilesByUsername[l.username]=l,i.invalidate(`user-profile:${l.username}`)),(o=window.fluentComAdmin)!=null&&o.auth&&(window.fluentComAdmin.auth={...window.fluentComAdmin.auth,...l}),l}catch(r){throw console.error("Failed to update profile:",r),r}},async toggleFollow(t,e=null){var a,l,c;const n=Us(),i=String(t),s=this.follows[i],o=s!==void 0&&["1","2"].includes(String(s)),r=s;o?(delete this.follows[i],e&&this.profilesByUsername[e]&&(this.profilesByUsername[e].followers_count--,this.profilesByUsername[e].follow=void 0)):(this.follows[i]="1",e&&this.profilesByUsername[e]&&(this.profilesByUsername[e].followers_count++,this.profilesByUsername[e].follow="1"));try{const u=o?`profile/${e}/unfollow`:`profile/${e}/follow`,d=await this.$api.post(u);return o?delete this.follows[i]:((a=d.follow)==null?void 0:a.level)!==void 0&&this.setFollows({[i]:d.follow.level}),e&&this.profilesByUsername[e]&&(((l=d.xprofile)==null?void 0:l.followers_count)!==void 0&&(this.profilesByUsername[e].followers_count=d.xprofile.followers_count),n.invalidate(`user-profile:${e}`)),(c=window.fluentFrameworkApp)!=null&&c.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("user_follow_toggled",{userId:t,isFollowing:!o}),d}catch(u){throw o?(this.follows[i]=r,e&&this.profilesByUsername[e]&&(this.profilesByUsername[e].followers_count++,this.profilesByUsername[e].follow=r)):(delete this.follows[i],e&&this.profilesByUsername[e]&&(this.profilesByUsername[e].followers_count--,this.profilesByUsername[e].follow=void 0)),console.error("Failed to toggle follow:",u),u}},invalidateProfile(t){Us().invalidate(`user-profile:${t}`),delete this.lastFetched[t]},clearAll(){this.currentUser=null,this.profilesByUsername={},this.follows={},this.followers=[],this.loading={},this.lastFetched={};const t=Us();t.invalidatePattern("user-profile:"),t.invalidate("user-following")}}});var PPe=Na,IPe=PPe["__core-js_shared__"],LPe=IPe,B3=LPe,cT=function(){var t=/[^.]+$/.exec(B3&&B3.keys&&B3.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function OPe(t){return!!cT&&cT in t}var DPe=OPe,RPe=Function.prototype,VPe=RPe.toString;function FPe(t){if(t!=null){try{return VPe.call(t)}catch{}try{return t+""}catch{}}return""}var sU=FPe,NPe=HF,BPe=DPe,zPe=nv,HPe=sU,UPe=/[\\^$.*+?()[\]{}|]/g,jPe=/^\[object .+?Constructor\]$/,WPe=Function.prototype,YPe=Object.prototype,qPe=WPe.toString,GPe=YPe.hasOwnProperty,XPe=RegExp("^"+qPe.call(GPe).replace(UPe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function KPe(t){if(!zPe(t)||BPe(t))return!1;var e=NPe(t)?XPe:jPe;return e.test(HPe(t))}var ZPe=KPe;function JPe(t,e){return t==null?void 0:t[e]}var QPe=JPe,eIe=ZPe,tIe=QPe;function nIe(t,e){var n=tIe(t,e);return eIe(n)?n:void 0}var $p=nIe,sIe=$p,iIe=Na,oIe=sIe(iIe,"DataView"),rIe=oIe,aIe=$p,lIe=Na,cIe=aIe(lIe,"Map"),PS=cIe,uIe=$p,dIe=Na,hIe=uIe(dIe,"Promise"),fIe=hIe,pIe=$p,mIe=Na,gIe=pIe(mIe,"Set"),iU=gIe,vIe=$p,_Ie=Na,yIe=vIe(_Ie,"WeakMap"),bIe=yIe,Rx=rIe,Vx=PS,Fx=fIe,Nx=iU,Bx=bIe,oU=ev,Ap=sU,uT="[object Map]",wIe="[object Object]",dT="[object Promise]",hT="[object Set]",fT="[object WeakMap]",pT="[object DataView]",kIe=Ap(Rx),CIe=Ap(Vx),xIe=Ap(Fx),SIe=Ap(Nx),$Ie=Ap(Bx),Mu=oU;(Rx&&Mu(new Rx(new ArrayBuffer(1)))!=pT||Vx&&Mu(new Vx)!=uT||Fx&&Mu(Fx.resolve())!=dT||Nx&&Mu(new Nx)!=hT||Bx&&Mu(new Bx)!=fT)&&(Mu=function(t){var e=oU(t),n=e==wIe?t.constructor:void 0,i=n?Ap(n):"";if(i)switch(i){case kIe:return pT;case CIe:return uT;case xIe:return dT;case SIe:return hT;case $Ie:return fT}return e});var rU=Mu,AIe=zF,EIe=rU,MIe=R8,TIe=Ba,PIe=B8,IIe=V8,LIe=BF,OIe=N8,DIe="[object Map]",RIe="[object Set]",VIe=Object.prototype,FIe=VIe.hasOwnProperty;function NIe(t){if(t==null)return!0;if(PIe(t)&&(TIe(t)||typeof t=="string"||typeof t.splice=="function"||IIe(t)||OIe(t)||MIe(t)))return!t.length;var e=EIe(t);if(e==DIe||e==RIe)return!t.size;if(LIe(t))return!AIe(t).length;for(var n in t)if(FIe.call(t,n))return!1;return!0}var BIe=NIe;const aU=_i(BIe),zIe={name:"SocialLinks",props:["xprofile","isOwn"],computed:{hasSocialLinks(){return this.socialLinks.length>0},socialLinks(){var i;if(!this.xprofile)return[];const t=[];this.xprofile.website&&t.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});let e=this.xprofile.social_links;if(e||(e=(i=this.xprofile.meta)==null?void 0:i.social_links),aU(e))return t;const n=this.appVars.socialLinkProviders;return n&&this.each(n,(s,o)=>{e[o]&&t.push({title:s.title,icon:s.icon_svg,url:s.domain+e[o]})}),t}}},HIe={key:0,class:"fcom_social_links"},UIe=["href","title"];function jIe(t,e,n,i,s,o){const r=we,a=B("router-link");return o.hasSocialLinks?(v(),$("div",HIe,[(v(!0),$(J,null,ye(o.socialLinks,l=>(v(),$("a",{rel:"noopener nofollow",target:"_blank",href:l.url,key:l.title,title:l.title},[_(r,{innerHTML:l.icon},null,8,["innerHTML"])],8,UIe))),128)),n.isOwn&&!o.hasSocialLinks?(v(),D(a,{key:0,to:{name:"update_profile",params:{username:n.xprofile.username}}},{default:y(()=>[N(x("+ "+t.$t("Add social links")),1)]),_:1},8,["to"])):O("",!0)])):O("",!0)}const WIe=ce(zIe,[["render",jIe]]),lU=Q1("ui",{state:()=>({lastScrollPath:null,lastScrollPosition:0,lastViewedFeed:{},layoutStyle:null,sortBy:null,layoutStyleByContext:{},sortByContext:{},listSortByContext:{},modals:{feedModal:!1,createPostModal:!1,editPostModal:!1,shareModal:!1},globalLoading:!1,sidebarCollapsed:!1,searchQuery:"",activeSpace:null,activeTopic:null}),getters:{getLastViewedFeed:t=>e=>t.lastViewedFeed[e]||null,getLayoutStyle:t=>e=>t.layoutStyleByContext[e]||t.layoutStyle||"list",getSortBy:t=>e=>t.sortByContext[e]||t.sortBy||"latest",isModalOpen:t=>e=>t.modals[e]||!1},actions:{saveScrollPosition(t,e){this.lastScrollPath=t,this.lastScrollPosition=e},restoreScrollPosition(t){return this.lastScrollPath===t&&this.lastScrollPosition>0?this.lastScrollPosition:0},consumeScrollPosition(t){const e=this.restoreScrollPosition(t);return e>0&&(this.lastScrollPath=null,this.lastScrollPosition=0),e},saveLastViewedFeed(t,e,n){this.lastViewedFeed[t]={feedId:e,index:n,timestamp:Date.now()}},setLayoutStyle(t){this.layoutStyle=t;try{localStorage.setItem("fcom_feed_layout",t)}catch(e){console.error("Failed to save layout style:",e)}},setLayoutStyleForContext(t,e){this.layoutStyleByContext[t]=e;try{localStorage.setItem("fcom_layout_by_context",JSON.stringify(this.layoutStyleByContext))}catch(n){console.error("Failed to save layout style:",n)}},setSortBy(t){this.sortBy=t;try{localStorage.setItem("fcom_feed_sort",t)}catch(e){console.error("Failed to save sort preference:",e)}},setSortByForContext(t,e){this.sortByContext[t]=e;try{localStorage.setItem("fcom_sort_by_context",JSON.stringify(this.sortByContext))}catch(n){console.error("Failed to save sort preference:",n)}},setListSort(t,e,n){this.listSortByContext[t]={field:e,dir:n};try{localStorage.setItem("fcom_list_sort_by_context",JSON.stringify(this.listSortByContext))}catch(i){console.error("Failed to save list sort preference:",i)}},getListSort(t){return this.listSortByContext[t]||null},openModal(t){this.modals[t]=!0},closeModal(t){this.modals[t]=!1},toggleModal(t){this.modals[t]=!this.modals[t]},setGlobalLoading(t){this.globalLoading=t},toggleSidebar(){this.sidebarCollapsed=!this.sidebarCollapsed},setSidebar(t){this.sidebarCollapsed=t},setSearchQuery(t){this.searchQuery=t},setActiveSpace(t){this.activeSpace=t},setActiveTopic(t){this.activeTopic=t},clearScrollPosition(){this.lastScrollPath=null,this.lastScrollPosition=0},clearLastViewedFeeds(){this.lastViewedFeed={}},initialize(){try{const t=localStorage.getItem("fcom_feed_layout");t&&(this.layoutStyle=t);const e=localStorage.getItem("fcom_layout_by_context");e&&(this.layoutStyleByContext=JSON.parse(e))}catch(t){console.error("Failed to restore layout style:",t)}try{const t=localStorage.getItem("fcom_feed_sort");t&&(this.sortBy=t);const e=localStorage.getItem("fcom_sort_by_context");e&&(this.sortByContext=JSON.parse(e));const n=localStorage.getItem("fcom_list_sort_by_context");n&&(this.listSortByContext=JSON.parse(n))}catch(t){console.error("Failed to restore sort preference:",t)}},reset(){this.lastScrollPath=null,this.lastScrollPosition=0,this.lastViewedFeed={},this.modals={feedModal:!1,createPostModal:!1,editPostModal:!1,shareModal:!1},this.globalLoading=!1,this.sidebarCollapsed=!1,this.searchQuery="",this.activeSpace=null,this.activeTopic=null}}}),mT=Q1("feed",{state:()=>({feedsByContext:{},feedsById:{},stickyFeeds:{},loading:{},pagination:{},filters:{},tickerIntervals:{},tickerEnabled:{},lastTickerCheck:{},tickerPending:{},newPostsCount:{},ticker:{count:0,lastFetched:0},executionTimes:{},_pendingRequests:{},_requestSeq:{},_recentContexts:[]}),getters:{getFeedsByContext:t=>e=>{const n=t.feedsByContext[e];return n?n.data||[]:[]},getFeedById:t=>e=>t.feedsById[e]||null,getStickyFeed:t=>e=>t.stickyFeeds[e]||null,getPagination:t=>e=>t.pagination[e]||{page:1,per_page:10,total:0,last_page:1,has_more:!1},isLoading:t=>e=>t.loading[e]||!1,getExecutionTime:t=>e=>t.executionTimes[e]||"",totalFeedsInMemory:t=>{let e=Object.keys(t.feedsById).length;return Object.values(t.feedsByContext).forEach(n=>{var i;e+=((i=n.data)==null?void 0:i.length)||0}),e},disableAutoLoad:t=>e=>{const n=t.loading[e]||!1,i=t.pagination[e];return i?n||i.has_more===!1:!0},getTickerCount:t=>t.ticker.count||0,getTickerLastFetched:t=>t.ticker.lastFetched||0,isTickerActive:t=>e=>t.tickerEnabled[e]&&t.tickerIntervals[e]!==null,getNewPostsCount:t=>e=>t.newPostsCount[e]||0,getMemoryStats:t=>{let e=0,n={};Object.keys(t.feedsByContext).forEach(o=>{var a,l;const r=((l=(a=t.feedsByContext[o])==null?void 0:a.data)==null?void 0:l.length)||0;n[o]=r,e+=r});const i=Object.keys(t.feedsById).length,s=(e*5/1024).toFixed(2);return{totalFeeds:e,feedsByContextCount:n,feedsByIdCount:i,estimatedMemoryMB:s,contexts:Object.keys(t.feedsByContext).length}}},actions:{async fetchFeeds(t,e={},n=!1){var u,d,h;if(console.log("[Feed Store] fetchFeeds called:",{context:t,loadMore:n,paramsPage:e.page,currentLoading:this.loading[t],currentPage:(u=this.pagination[t])==null?void 0:u.page}),this.loading[t]){console.log("[Feed Store] Already loading for context:",t,"- ignoring duplicate request");return}const i=(this._requestSeq[t]||0)+1;this._requestSeq[t]=i;const s=n?(((d=this.pagination[t])==null?void 0:d.page)||0)+1:e.page||1,o={...e,page:s,per_page:e.per_page||10},r=`feeds:${t}:${JSON.stringify(o)}`,a=Us(),l=JSON.stringify({search:o.search||"",order_by_type:o.order_by_type||"",topic_slug:o.topic_slug||"",status:o.status||""});if(!n&&s===1){const f=a.get(r,3e5);if(f)return this.feedsByContext[t]={...f.feedsByContext,filterKey:l},this.pagination[t]=f.pagination,this.executionTimes[t]=f.executionTime,this.touchContext(t),f.stickyFeed&&!window["viewed_sticky_posts_"+f.stickyFeed.id]?this.stickyFeeds[t]=f.stickyFeed:(this.stickyFeeds[t]=null,f.stickyFeed&&((h=this.feedsByContext[t])!=null&&h.data)&&(this.feedsByContext[t].data.some(p=>p.id===f.stickyFeed.id)||this.feedsByContext[t].data.unshift(f.stickyFeed))),f.feedsByContext.data.forEach(p=>{this.feedsById[p.id]=p}),this.loading[t]=!1,f}return this.loading[t]=!0,this.$api.get(e.feed_base_url||"feeds",o).then(f=>{var p,m,b,w;if(this._requestSeq[t]===i){if(f.sticky){const k="viewed_sticky_posts_"+f.sticky.id;window[k]?(f.feeds.data.some(C=>C.id===f.sticky.id)||f.feeds.data.unshift(f.sticky),this.stickyFeeds[t]=null):this.stickyFeeds[t]=f.sticky}else s===1&&(this.stickyFeeds[t]=null);if(n){const k=((p=this.feedsByContext[t])==null?void 0:p.data)||[];this.feedsByContext[t]={data:[...k,...f.feeds.data],timestamp:Date.now(),filterKey:l}}else this.feedsByContext[t]={data:f.feeds.data,timestamp:Date.now(),filterKey:l};if(this.pagination[t]={page:s,per_page:o.per_page,total:f.feeds.total,last_page:f.feeds.last_page,has_more:f.feeds.has_more},this.touchContext(t),console.log("[Feed Store] Updated pagination:",{context:t,page:s,has_more:f.feeds.has_more,total:f.feeds.total}),f.execution_time&&(this.executionTimes[t]=f.execution_time),f.feeds.data.forEach(k=>{this.feedsById[k.id]={...k,timestamp:Date.now()}}),n){const k=((b=(m=this.feedsByContext[t])==null?void 0:m.data)==null?void 0:b.length)||0;k>500&&(console.log("[Feed Store] Pruning feeds, count:",k),this.pruneOldFeeds(t))}return f.last_fetched_timestamp&&(this.ticker.lastFetched=f.last_fetched_timestamp,(w=window.fluentFrameworkApp)!=null&&w.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("newest_feed_fetched",{last_fetched_timestamp:f.last_fetched_timestamp})),f.current_user_follows&&TS().setFollows(f.current_user_follows),!n&&s===1&&a.set(r,{feedsByContext:this.feedsByContext[t],pagination:this.pagination[t],stickyFeed:this.stickyFeeds[t],executionTime:this.executionTimes[t]}),console.log("[Feed Store] Fetch SUCCESS, stored feeds for context:",t,{feedCount:this.feedsByContext[t].data.length,pagination:this.pagination[t],hasSticky:!!this.stickyFeeds[t]}),this.loading[t]=!1,console.log("[Feed Store] Set loading to FALSE after success for context:",t),{feeds:this.feedsByContext[t].data,pagination:this.pagination[t],sticky:this.stickyFeeds[t]}}}).catch(f=>{throw console.error("[Feed Store] Failed to fetch feeds:",f),this._requestSeq[t]===i&&(this.loading[t]=!1),f})},async fetchFeedBySlug(t){const e=`feed:slug:${t}`,n=Us(),i=n.get(e,10*60*1e3);if(i)return this.feedsById[i.id]=i,i;try{const o=(await this.$api.get(`feeds/${t}/by-slug`)).feed;return this.feedsById[o.id]={...o,timestamp:Date.now()},n.set(e,o),window.appVars&&(window.appVars.last_feed_id=o.id),o}catch(s){throw console.error("Failed to fetch feed:",s),s}},_contextShowsUnlisted(t){const e=this.feedsByContext[t];if(!e||!e.filterKey)return!1;try{return JSON.parse(e.filterKey).status==="unlisted"}catch{return!1}},async createFeed(t,e){var n,i,s,o,r;try{const a=await this.$api.post("feeds",e),l=a.feed;if(this.feedsById[l.id]={...l,timestamp:Date.now()},!a.scheduled_at){const u=d=>{this.feedsByContext[d]||(this.feedsByContext[d]={data:[],timestamp:Date.now()}),this.stickyFeeds[d]&&(this.feedsByContext[d].data.some(f=>f.id===this.stickyFeeds[d].id)||this.feedsByContext[d].data.unshift(this.stickyFeeds[d]),this.stickyFeeds[d]=null);const h=this.feedsByContext[d].data.findIndex(f=>f.id===l.id);h===-1&&this.feedsByContext[d].data.unshift(l),this.pagination[d]?h===-1&&this.pagination[d].total++:this.pagination[d]={page:1,per_page:10,total:1,last_page:1,has_more:!1}};if(l.status==="unlisted")Object.keys(this.feedsByContext).forEach(d=>{this._contextShowsUnlisted(d)&&u(d)});else{u(t),l.space_id&&t!=="global"&&(u("global"),Us().invalidatePattern("feeds:global"));const d=`user-${l.user_id}`;this.feedsByContext[d]&&t!==d&&u(d)}(i=(n=window.fluentFrameworkApp)==null?void 0:n.$eventBus)==null||i.emit("recent_activities_refresh")}return a.last_fetched_timestamp&&(this.ticker.lastFetched=a.last_fetched_timestamp,(s=window.FluentCommunityUtil)!=null&&s.eventBus&&((r=(o=window.fluentFrameworkApp)==null?void 0:o.$eventBus)==null||r.emit("newest_feed_fetched",{last_fetched_timestamp:a.last_fetched_timestamp}))),Us().invalidatePattern(`feeds:${t}`),a}catch(a){throw console.error("Failed to create feed:",a),a}},async updateFeed(t,e){const n=this.feedsById[t]?{...this.feedsById[t]}:null;this.feedsById[t]&&(this.feedsById[t]={...this.feedsById[t],...e,timestamp:Date.now()}),Object.keys(this.feedsByContext).forEach(i=>{const s=this.feedsByContext[i].data.findIndex(o=>o.id===t);s!==-1&&(this.feedsByContext[i].data[s]={...this.feedsByContext[i].data[s],...e})});try{const s=(await this.$api.patch(`feeds/${t}`,e)).feed;return this.feedsById[t]={...this.feedsById[t],...s,timestamp:Date.now()},Object.keys(this.feedsByContext).forEach(r=>{const a=this.feedsByContext[r].data.findIndex(l=>l.id===t);a!==-1&&(this.feedsByContext[r].data[a]={...this.feedsByContext[r].data[a],...s})}),s.status==="unlisted"&&Object.keys(this.feedsByContext).forEach(r=>{if(this._contextShowsUnlisted(r))return;const a=this.feedsByContext[r];a!=null&&a.data&&(a.data=a.data.filter(l=>l.id!==t))}),Us().invalidatePattern("feed:"),s}catch(i){throw n&&(this.feedsById[t]=n,Object.keys(this.feedsByContext).forEach(s=>{const o=this.feedsByContext[s].data.findIndex(r=>r.id===t);o!==-1&&(this.feedsByContext[s].data[o]=n)})),console.error("Failed to update feed:",i),i}},async deleteFeed(t,e,n=null){try{return await this.$api.delete(`feeds/${e}`),delete this.feedsById[e],n!==null&&this.feedsByContext[t]?this.feedsByContext[t].data.splice(n,1):Object.keys(this.feedsByContext).forEach(s=>{var o;(o=this.feedsByContext[s])!=null&&o.data&&(this.feedsByContext[s].data=this.feedsByContext[s].data.filter(r=>r.id!==e))}),this.pagination[t]&&this.pagination[t].total--,Us().invalidatePattern("feed:"),!0}catch(i){throw console.error("Failed to delete feed:",i),i}},async fetchTicker(t){var e,n,i;try{const s=t||this.ticker.lastFetched;console.log("[Legacy Ticker] Fetching ticker with timestamp:",s);const o=await this.$api.get("feeds/ticker",{last_fetched_timestamp:s});if(console.log("[Legacy Ticker] Response:",{has_changes:o.has_changes,feeds:((e=o.feeds)==null?void 0:e.length)||0,new_items_count:o.new_items_count}),this.ticker={count:o.new_items_count||0,lastFetched:o.last_fetched_timestamp||Date.now()},console.log("[Legacy Ticker] Checking if we should process feeds:",{has_changes:o.has_changes,feeds_exists:!!o.feeds,feeds_length:((n=o.feeds)==null?void 0:n.length)||0,feeds_data:o.feeds}),o.has_changes&&o.feeds&&o.feeds.length>0){console.log(`[Legacy Ticker] ✅ Processing ${o.feeds.length} feed updates`);const r={};o.feeds.forEach(a=>{console.log("[Legacy Ticker] Processing feed update:",a);const l=a.context||"global";r[l]||(r[l]=[]),r[l].push(a)}),console.log("[Legacy Ticker] Updates grouped by context:",r);for(const a in r){console.log(`[Legacy Ticker] 📥 Processing context: ${a} (${r[a].length} updates)`);try{await this.processTickerUpdates(a,r[a]),console.log(`[Legacy Ticker] ✅ Successfully processed context: ${a}`)}catch(l){console.error(`[Legacy Ticker] ❌ Failed to process context: ${a}`,l)}}}else console.log("[Legacy Ticker] ⏭️ Skipping feed processing - no changes or no feeds in response");return(i=window.fluentFrameworkApp)!=null&&i.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("ticker_updated",o),this.ticker}catch(s){throw console.error("[Legacy Ticker] Failed to fetch ticker:",s),s}},resetTicker(){this.ticker.count=0},markStickyAsViewed(t,e){const n=this.stickyFeeds[t];n&&n.id===e&&(window["viewed_sticky_posts_"+e]=!0,this.feedsByContext[t]&&(this.feedsByContext[t].data.some(i=>i.id===n.id)||this.feedsByContext[t].data.unshift(n)),this.stickyFeeds[t]=null)},pruneOldFeeds(t=null){(t?[t]:Object.keys(this.feedsByContext)).forEach(i=>{var o;const s=((o=this.feedsByContext[i])==null?void 0:o.data)||[];if(s.length>500){const r=s.slice(0,s.length-500);this.feedsByContext[i].data=s.slice(s.length-500),console.log(`[Feed Store] Pruned ${r.length} old feeds from ${i}, kept ${this.feedsByContext[i].data.length}`),r.forEach(a=>{Object.values(this.feedsByContext).some(c=>{var u;return(u=c.data)==null?void 0:u.some(d=>d.id===a.id)})||delete this.feedsById[a.id]})}})},resetContext(t){this.feedsByContext[t]={data:[],timestamp:0},this.pagination[t]={page:1,per_page:10,total:0,last_page:1,has_more:!1},this.stickyFeeds[t]=null,this.loading[t]=!1,this.executionTimes[t]="",Us().invalidatePattern(`feeds:${t}`)},touchContext(t){if(!t)return;const e=this._recentContexts.indexOf(t);e>-1&&this._recentContexts.splice(e,1),this._recentContexts.push(t);const n=10;if(this._recentContexts.length<=n)return;let i=this._recentContexts.length-n;const s=[];for(const o of this._recentContexts)i>0&&!this.loading[o]?(delete this.feedsByContext[o],delete this.pagination[o],delete this.stickyFeeds[o],delete this.executionTimes[o],i--):s.push(o);this._recentContexts=s},async softRefreshContext(t,e={}){var n,i,s,o;if((i=(n=this.feedsByContext[t])==null?void 0:n.data)!=null&&i.length&&!this.loading[t]){this.touchContext(t);try{const r=await this.$api.get(e.feed_base_url||"feeds",{...e,page:1,per_page:e.per_page||10}),a=this.feedsByContext[t];if(!((s=a==null?void 0:a.data)!=null&&s.length))return;const l=a.data,c=((o=r.feeds)==null?void 0:o.data)||[];if(!c.length){a.timestamp=Date.now();return}const u=new Map(c.map(m=>[m.id,m])),d=new Set(l.map(m=>m.id)),h=l.map(m=>{const b=u.get(m.id);return b?{...m,...b}:m}),f=c.filter(m=>!d.has(m.id));this.feedsByContext[t]={...a,data:[...f,...h],timestamp:Date.now()};const p=Date.now();if(c.forEach(m=>{this.feedsById[m.id]={...this.feedsById[m.id]||{},...m,timestamp:p}}),r.sticky){const m="viewed_sticky_posts_"+r.sticky.id;window[m]||(this.stickyFeeds[t]=r.sticky)}}catch(r){console.warn("[Feed Store] Soft refresh failed for context",t,r)}}},startTicker(t="global",e=3e4){this.lastTickerCheck[t]||(this.lastTickerCheck[t]=new Date().toISOString()),this.stopTicker(t),this.tickerEnabled[t]=!0,this.newPostsCount[t]=0,this.tickerIntervals[t]=setInterval(()=>{this.checkForUpdates(t)},e),console.log(`[Feed Store] Ticker started for ${t} (interval: ${e}ms)`),this.checkForUpdates(t)},stopTicker(t){this.tickerIntervals[t]&&(clearInterval(this.tickerIntervals[t]),this.tickerIntervals[t]=null,this.tickerEnabled[t]=!1,console.log(`[Feed Store] Ticker stopped for ${t}`))},stopAllTickers(){Object.keys(this.tickerIntervals).forEach(t=>{this.stopTicker(t)})},async checkForUpdates(t="global"){if(!this.tickerPending[t]){this.tickerPending[t]=!0;try{const e=await this.$api.get("feeds/ticker-updates",{context:t,since:this.lastTickerCheck[t]||new Date().toISOString()});this.lastTickerCheck[t]=e.timestamp,e.has_changes&&e.updates.length>0&&(console.log(`[Feed Store] Ticker found ${e.updates.length} changes for ${t}`),await this.processTickerUpdates(t,e.updates))}catch(e){e.xhr_status!==404&&console.error("[Feed Store] Ticker check failed:",e)}finally{this.tickerPending[t]=!1}}},async processTickerUpdates(t,e){var s;console.log(`[processTickerUpdates] Called for context: ${t} with ${e.length} updates`),console.log("[processTickerUpdates] Updates:",e);const n=[],i=[];if(e.forEach(o=>{console.log("[processTickerUpdates] Processing update:",{id:o.id,action:o.action,updated_at:o.updated_at});const r=this.feedsById[o.id];console.log("[processTickerUpdates] Existing feed in store:",r?{id:r.id,updated_at:r.updated_at}:"NOT IN STORE"),o.action==="deleted"?(console.log(`[processTickerUpdates] ➡️ Marking feed ${o.id} for DELETION`),i.push(o.id)):o.action==="created"?(console.log(`[processTickerUpdates] ➡️ Marking feed ${o.id} for FETCH (CREATED)`),n.push(o.id)):o.action==="updated"&&(!r||new Date(r.updated_at)<new Date(o.updated_at)?(console.log(`[processTickerUpdates] ➡️ Marking feed ${o.id} for FETCH (UPDATED - ${r?"outdated":"not in store"})`),n.push(o.id)):console.log(`[processTickerUpdates] ⏭️ Skipping feed ${o.id} - already have latest version`))}),console.log("[processTickerUpdates] Summary:",{toFetch:n.length,toDelete:i.length,fetchIds:n,deleteIds:i}),i.length>0&&(console.log(`[processTickerUpdates] 🗑️ Deleting ${i.length} feeds from ${t}`),this.deleteFeedsFromStore(t,i)),n.length>0){console.log(`[processTickerUpdates] 📥 Fetching ${n.length} feeds for ${t}`),await this.fetchFeedsByIds(t,n);const o=e.filter(r=>r.action==="created").length;o>0&&(this.newPostsCount[t]=(this.newPostsCount[t]||0)+o)}(s=window.fluentFrameworkApp)!=null&&s.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("feeds_updated",{context:t,added:n.filter(o=>!this.feedsById[o]).length,updated:n.filter(o=>this.feedsById[o]).length,removed:i.length})},async fetchFeedsByIds(t,e){if(e.length===0)return;console.log("[Feed Store] fetchFeedsByIds called:",{context:t,count:e.length,ids:e});const n=20;try{if(e.length>n){console.log(`[Feed Store] Batching ${e.length} feeds into chunks of ${n}`);for(let i=0;i<e.length;i+=n){const s=e.slice(i,i+n);await this.fetchFeedBatch(t,s)}}else await this.fetchFeedBatch(t,e);console.log(`[Feed Store] Successfully fetched ${e.length} feeds for ${t}`)}catch(i){console.error("[Feed Store] Failed to fetch feeds by IDs:",{context:t,feedIds:e,error:i})}},async fetchFeedBatch(t,e){try{console.log("[Feed Store] Fetching feeds:",{context:t,feedIds:e});const n=await this.$api.post("feeds/batch",{feed_ids:e,context:t});if(console.log("[Feed Store] API response:",n),!n||!Array.isArray(n.feeds)){console.error("[Feed Store] Invalid response from /feeds/batch:",n);return}console.log(`[Feed Store] Received ${n.feeds.length} feeds for context: ${t}`),n.feeds.forEach(i=>{this.feedsById[i.id]=i,this.feedsByContext[t]||(this.feedsByContext[t]={data:[],timestamp:Date.now()});const s=this.feedsByContext[t].data,o=s.findIndex(r=>r.id===i.id);o===-1?s.unshift(i):s[o]=i})}catch(n){throw console.error("[Feed Store] Failed to fetch batch for context:",t,n),n}},deleteFeedsFromStore(t,e){e.forEach(n=>{var s;delete this.feedsById[n],(s=this.feedsByContext[t])!=null&&s.data&&(this.feedsByContext[t].data=this.feedsByContext[t].data.filter(o=>o.id!==n)),Us().invalidate(`feed:${n}`)}),console.log(`[Feed Store] Deleted ${e.length} feeds from ${t}`)},clearNewPostsCount(t){this.newPostsCount[t]=0},clearAll(){this.stopAllTickers(),this.feedsByContext={},this.feedsById={},this.stickyFeeds={},this.loading={},this.pagination={},this.filters={},this.ticker={count:0,lastFetched:0},this.executionTimes={},this._pendingRequests={},this.tickerIntervals={},this.tickerEnabled={},this.lastTickerCheck={},this.tickerPending={},this.newPostsCount={}}}}),H2=Q1("space",{state:()=>({spacesBySlug:{},currentSpace:null,currentPageLayout:null,mySpaces:[],topicsBySpace:{},loading:{},mySpacesLoading:!1,lastFetched:{}}),getters:{getSpaceBySlug:t=>e=>t.spacesBySlug[e]||null,getCurrentSpace:t=>t.currentSpace,getSpaceTopics:t=>e=>t.topicsBySpace[e]||[],isJoinedSpace:t=>e=>t.mySpaces.some(n=>n.slug===e),getMySpaces:t=>[...t.mySpaces].sort((e,n)=>e.title.localeCompare(n.title)),isLoading:t=>e=>t.loading[e]||!1,joinedSpacesCount:t=>t.mySpaces.length},actions:{async fetchSpace(t,e=!1){const n=Us(),i=`space:${t}`;if(!e){const s=n.get(i);if(s)return this.spacesBySlug[t]=s,this.currentSpace=s,s}this.loading[t]=!0;try{const s=await this.$api.get(`spaces/${t}/by-slug`),o=s.space||s;return this.spacesBySlug[t]=o,this.currentSpace=o,this.lastFetched[t]=Date.now(),s.topics&&(this.topicsBySpace[t]=s.topics),s.pending_count!==void 0&&(o.pending_count=s.pending_count),n.set(i,o,15*60*1e3),typeof window<"u"&&(window.fcom_current_community=o),this.loading[t]=!1,o}catch(s){throw this.loading[t]=!1,console.error("Failed to fetch space:",s),s}},async joinSpace(t,e=null){var o,r,a;const n=Us(),i=e||this.spacesBySlug[t];if(!i)throw new Error("Space not found");const s=((o=i.user_status)==null?void 0:o.status)==="active";s||(i.user_status||(i.user_status={}),i.user_status.status="active",i.members_count=(i.members_count||0)+1,this.mySpaces.find(l=>l.slug===t)||this.mySpaces.push(i));try{const l=await this.$api.post(`spaces/${t}/join`),c=(r=l.membership)==null?void 0:r.status;if(c&&(i.user_status.status=c),c&&c!=="active"&&!s){i.members_count=Math.max(0,(i.members_count||1)-1);const u=this.mySpaces.findIndex(d=>d.slug===t);u!==-1&&this.mySpaces.splice(u,1)}return n.invalidate(`space:${t}`),n.invalidate("my-spaces"),(a=window.fluentFrameworkApp)!=null&&a.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("space_joined",i),l}catch(l){if(!s){i.user_status.status=null,i.members_count=Math.max(0,(i.members_count||1)-1);const c=this.mySpaces.findIndex(u=>u.slug===t);c!==-1&&this.mySpaces.splice(c,1)}throw console.error("Failed to join space:",l),l}},async leaveSpace(t){var r,a,l,c;const e=Us(),n=this.spacesBySlug[t];if(!n)throw new Error("Space not found");const i=((r=n.user_status)==null?void 0:r.status)==="active",s=(a=n.user_status)==null?void 0:a.status,o=n.members_count;if(i){n.user_status.status=null,n.members_count=Math.max(0,(n.members_count||1)-1);const u=this.mySpaces.findIndex(d=>d.slug===t);u!==-1&&this.mySpaces.splice(u,1)}try{const u=await this.$api.post(`spaces/${t}/leave`),d=u.space||u;return this.spacesBySlug[t]=d,((l=this.currentSpace)==null?void 0:l.slug)===t&&(this.currentSpace=d),e.invalidate(`space:${t}`),e.invalidate("my-spaces"),(c=window.fluentFrameworkApp)!=null&&c.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("space_left",d),d}catch(u){throw i&&(n.user_status.status=s,n.members_count=o,this.mySpaces.push(n)),console.error("Failed to leave space:",u),u}},setCurrentSpace(t){const e=this.spacesBySlug[t];e&&(this.currentSpace=e,typeof window<"u"&&(window.fcom_current_community=e))},setCurrentPageLayout(t){this.currentPageLayout=t||null},clearCurrentSpace(){this.currentSpace=null,typeof window<"u"&&(window.fcom_current_community=null)},invalidateSpace(t){const e=Us();e.invalidate(`space:${t}`),e.invalidate(`space-topics:${t}`),delete this.lastFetched[t],this.currentSpace&&this.currentSpace.slug===t&&(this.currentSpace=null),delete this.spacesBySlug[t],delete this.topicsBySpace[t]},clearAll(){this.spacesBySlug={},this.currentSpace=null,this.mySpaces=[],this.topicsBySpace={},this.loading={},this.mySpacesLoading=!1,this.lastFetched={};const t=Us();t.invalidatePattern("space:"),t.invalidatePattern("space-topics:"),t.invalidate("my-spaces")}}}),YIe={name:"FollowAction",props:{profile:{type:Object,required:!0},followButtonText:{type:String,default:""}},emits:["refetch"],setup(){return{userStore:TS()}},data(){return{loading:!1,hovering:!1}},watch:{profile:{immediate:!0,handler(t){t!=null&&t.user_id&&(t==null?void 0:t.follow)!==void 0&&this.userStore.setFollows({[t.user_id]:t.follow})}}},computed:{isFollowing(){var t;return(t=this.profile)!=null&&t.user_id?this.userStore.isFollowing(this.profile.user_id):!1},showFollowAction(){var n;const t=(n=this.profile)==null?void 0:n.user_id,e=this.auth.user_id;return this.hasFeature("followers_module")&&t&&e&&t!=e},isBlocked(){var t;return(t=this.profile)!=null&&t.user_id?this.userStore.isBlocked(this.profile.user_id):!1},followBtnText(){var t;return this.followButtonText?this.followButtonText:(t=this.profile)!=null&&t.is_follower?this.$t("Follow Back"):this.$t("Follow")}},methods:{confirmUnfollow(){this.unfollowUser()},async followUser(){this.loading=!0;try{const t=await this.userStore.toggleFollow(this.profile.user_id,this.profile.username);this.$notify.success((t==null?void 0:t.message)||this.$t("Successfully followed user")),this.$emit("refetch")}catch(t){this.$handleError(t)}finally{this.loading=!1}},async unfollowUser(){this.loading=!0;try{const t=await this.userStore.toggleFollow(this.profile.user_id,this.profile.username);this.$notify.success((t==null?void 0:t.message)||this.$t("Successfully unfollowed user")),this.$emit("refetch")}catch(t){this.$handleError(t)}finally{this.loading=!1}},unblockUser(){this.loading=!0,this.$post("profile/"+this.profile.username+"/unblock").then(t=>{this.userStore.removeFollow(this.profile.user_id),this.$notify.success(t.message)}).finally(()=>{this.loading=!1})}}},qIe={key:0},GIe={key:1},XIe={key:0},KIe={key:1};function ZIe(t,e,n,i,s,o){const r=ze;return o.showFollowAction?(v(),$(J,{key:0},[o.isBlocked?(v(),D(r,{key:0,class:"fcom_secondary_button danger_button",loading:s.loading,disabled:s.loading,style:{"min-width":"90px","max-height":"30px"},onClick:o.unblockUser,onMouseenter:e[0]||(e[0]=a=>s.hovering=!0),onMouseleave:e[1]||(e[1]=a=>s.hovering=!1)},{default:y(()=>[s.hovering?(v(),$("span",GIe,x(t.$t("Unblock")),1)):(v(),$("span",qIe,x(t.$t("Blocked")),1))]),_:1},8,["loading","disabled","onClick"])):o.isFollowing?(v(),D(r,{key:1,onClick:o.confirmUnfollow,class:q(["fcom_secondary_button",{danger_button:s.hovering}]),style:{"min-width":"95px","max-height":"30px"},loading:s.loading,disabled:s.loading,onMouseenter:e[2]||(e[2]=a=>s.hovering=!0),onMouseleave:e[3]||(e[3]=a=>s.hovering=!1)},{default:y(()=>[s.hovering?(v(),$("span",KIe,x(t.$t("Unfollow")),1)):(v(),$("span",XIe,x(t.$t("Following")),1))]),_:1},8,["onClick","class","loading","disabled"])):(v(),D(r,{key:2,onClick:o.followUser,class:"fcom_color_button",style:{"max-height":"30px"},loading:s.loading,disabled:s.loading},{default:y(()=>[g("span",null,x(o.followBtnText),1)]),_:1},8,["onClick","loading","disabled"]))],64)):O("",!0)}const JIe=ce(YIe,[["render",ZIe]]),QIe={name:"UserRouteLink",props:{xprofile:{default:()=>({})},show_pop:{type:Boolean,default:!0},show_badge:{type:Boolean,default:!1},show_verified:{type:Boolean,default:!0},show_follow:{type:Boolean,default:!1},virtualRef:{default:null}},emits:["popover-mouseenter","popover-mouseleave"],components:{SocialLinks:WIe,FollowAction:JIe},data(){return{}},computed:{userLevel(){var t;return this.has_leaderboard&&((t=this.xprofile)!=null&&t.total_points)?Mh(this.xprofile.total_points):null}},methods:{initShow(){document.addEventListener("scroll",this.onScroll,!0)},onHide(){document.removeEventListener("scroll",this.onScroll,!0)},onScroll(){var t,e;(e=(t=this.$refs.popoverRef)==null?void 0:t.hide)==null||e.call(t),this.virtualRef&&this.$eventBus.emit("hide_mention_popover")}},beforeUnmount(){document.removeEventListener("scroll",this.onScroll,!0)}},eLe=["href"],tLe={class:"fcom_user_display_name"},nLe={key:1,class:"user_route"},sLe=["href"],iLe={class:"fcom_user_display_name"},oLe={class:"fcom_profile_pop_avatar"},rLe={key:0,class:"fcom_prfile_tagline"},aLe={class:"fcom_level_name"},lLe={style:{display:"block"},class:"fcoml_level_sub meta_line"},cLe={class:"fcom_profile_pop_info"},uLe={class:"pop_info_header"},dLe={class:"header_name"},hLe=["href"],fLe={class:"fcom_user_display_name"},pLe={class:"fcom_user_name"},mLe={key:0,class:"header_actions"},gLe={key:0,class:"fcom_profile_pop_bio"},vLe=["title"],_Le=["title"],yLe={class:"pop_info_btns"},bLe=["href"],wLe=["href"];function kLe(t,e,n,i,s,o){const r=B("verified-sign"),a=B("UserBadge"),l=B("UserAvatar"),c=jd,u=B("follow-action"),d=B("SocialLinks"),h=Ud,f=Yo;return n.show_pop?(v(),$("span",nLe,[_(f,{ref:"popoverRef",visible:n.virtualRef?!0:null,"virtual-ref":n.virtualRef,"virtual-triggering":!!n.virtualRef,width:500,"show-after":n.virtualRef?0:500,trigger:n.virtualRef?null:"hover",onShow:o.initShow,onHide:o.onHide,persistent:!1,"popper-class":"fcom_profile_popper",placement:"top","popper-style":"padding: 0;"},{reference:y(()=>[le(t.$slots,"default",{},()=>[g("a",{href:t.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[g("p",iLe,x(n.xprofile.display_name),1)],8,sLe)])]),default:y(()=>[g("div",{class:"fcom_profile_pop",onMouseenter:e[0]||(e[0]=p=>n.virtualRef&&t.$emit("popover-mouseenter")),onMouseleave:e[1]||(e[1]=p=>n.virtualRef&&t.$emit("popover-mouseleave"))},[n.xprofile&&n.xprofile.username?(v(),D(h,{key:0,gutter:20},{default:y(()=>[_(c,{sm:24,md:8},{default:y(()=>[g("div",oLe,[_(l,{xprofile:n.xprofile},null,8,["xprofile"]),o.userLevel?(v(),$("div",rLe,[g("div",aLe,x(o.userLevel.title),1),g("div",lLe,x(o.userLevel.tagline),1)])):O("",!0)])]),_:1}),_(c,{sm:24,md:16},{default:y(()=>{var p,m;return[g("div",cLe,[g("div",uLe,[g("div",dLe,[g("a",{href:t.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[g("p",fLe,x(n.xprofile.display_name),1),n.xprofile.is_verified?(v(),D(r,{key:0})):O("",!0),n.show_badge?(v(),D(a,{key:1,profile:n.xprofile},null,8,["profile"])):O("",!0)],8,hLe),g("span",pLe," @"+x(n.xprofile.username),1)]),n.show_follow?(v(),$("div",mLe,[_(u,{profile:n.xprofile},null,8,["profile"])])):O("",!0)]),(p=n.xprofile.meta)!=null&&p.short_description_rendered||n.xprofile.short_description_rendered?(v(),$("div",gLe,x(t.getExcerpt(((m=n.xprofile.meta)==null?void 0:m.short_description_rendered)||n.xprofile.short_description_rendered,160)),1)):O("",!0),n.xprofile.created_at?(v(),$("div",{key:1,title:n.xprofile.created_at,class:"meta_line"},x(t.$t("Joined: %s",t.humanDateDiff(n.xprofile.created_at))),9,vLe)):O("",!0),n.xprofile.last_activity?(v(),$("div",{key:2,title:n.xprofile.last_activity,class:"meta_line"},x(t.$t("Last seen: %s",t.humanDateDiff(n.xprofile.last_activity))),9,_Le)):O("",!0),g("div",yLe,[g("a",{class:"el-button el-button--primary is-text is-has-bg",href:t.$getRouteLink("u/:username",{username:n.xprofile.username})},x(t.$t("View Profile")),9,bLe),t.appVars.has_chat&&t.hasPermission("can_initiate_message")?(v(),$("a",{key:0,class:"el-button el-button--primary is-text is-has-bg",href:t.$getRouteLink("chat/?user_id=:user_id",{user_id:n.xprofile.user_id})},x(t.$t("Message")),9,wLe)):O("",!0)]),_(d,{style:{"justify-content":"left"},xprofile:n.xprofile,isOwn:!1},null,8,["xprofile"])])]}),_:1})]),_:1})):O("",!0)],32)]),_:3},8,["visible","virtual-ref","virtual-triggering","show-after","trigger","onShow","onHide"]),n.show_verified&&n.xprofile.is_verified?(v(),D(r,{key:0})):O("",!0),n.show_badge?(v(),D(a,{key:1,profile:n.xprofile},null,8,["profile"])):O("",!0)])):(v(),$("a",{key:0,href:t.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[le(t.$slots,"default",{},()=>[g("p",tLe,x(n.xprofile.display_name),1)]),n.show_verified&&n.xprofile.is_verified?(v(),D(r,{key:0})):O("",!0),n.show_badge?(v(),D(a,{key:1,profile:n.xprofile},null,8,["profile"])):O("",!0)],8,eLe))}const ua=ce(QIe,[["render",kLe]]),CLe={name:"MentionPopover",components:{UserRouteLink:ua},setup(){return{userStore:TS()}},data(){return{xprofile:null,virtualRef:null,hideTimeout:null,cache:{},cacheTTL:5*60*1e3,requestId:0}},methods:{getCached(t){const e=this.cache[t];return e?Date.now()-e.timestamp>this.cacheTTL?(delete this.cache[t],null):e.data:null},setCache(t,e){this.cache[t]={data:e,timestamp:Date.now()}},async showPopover({username:t,triggerElement:e}){this.cancelHide();const n=++this.requestId;let i=this.getCached(t);if(!i){try{i=await this.userStore.fetchProfile(t)}catch{return}this.setCache(t,i)}n===this.requestId&&(this.xprofile=i,this.virtualRef=e)},cancelHide(){clearTimeout(this.hideTimeout)},startHideTimeout(){this.cancelHide(),this.hideTimeout=setTimeout(()=>{this.virtualRef=null},200)}},mounted(){this.$eventBus.on("show_mention_popover",this.showPopover),this.$eventBus.on("hide_mention_popover",this.startHideTimeout)},beforeUnmount(){this.$eventBus.off("show_mention_popover",this.showPopover),this.$eventBus.off("hide_mention_popover",this.startHideTimeout),clearTimeout(this.hideTimeout)}};function xLe(t,e,n,i,s,o){const r=B("UserRouteLink");return s.virtualRef&&s.xprofile?(v(),D(r,{key:0,xprofile:s.xprofile,virtualRef:s.virtualRef,show_badge:!0,show_follow:!0,onPopoverMouseenter:o.cancelHide,onPopoverMouseleave:o.startHideTimeout},null,8,["xprofile","virtualRef","onPopoverMouseenter","onPopoverMouseleave"])):O("",!0)}const SLe=ce(CLe,[["render",xLe]]),$Le={name:"UnfinishedChangesModal",emits:["proceed"],data(){return{isVisible:!1,message:""}},methods:{handleCancel(){this.isVisible=!1,window.fcom_pending_modal_close=!1},handleProceed(){this.isVisible=!1,window.fcom_pending_modal_close?(this.$emit("proceed"),window.fcom_pending_modal_close=!1,window.fcom_modal_comment_unsaved=!1):this.$eventBus.emit("unsavedChangesProceeded")},showModal(t){t==="feed"?this.message=this.$t("You haven't finished your post yet. Do you want to leave without finishing?"):t==="comment"&&(this.message=this.$t("You haven't finished your comment yet. Do you want to leave without finishing?")),this.isVisible=!0}},mounted(){this.$eventBus.on("showUnsavedChangesModal",this.showModal)},beforeUnmount(){this.$eventBus.off("showUnsavedChangesModal",this.showModal)}},ALe={class:"dialog_header"},ELe={class:"dialog_left"},MLe={class:"dialog_body"},TLe={class:"dialog_footer"};function PLe(t,e,n,i,s,o){const r=ze,a=$s;return v(),D(a,{"modal-class":"fcom_common_dialog fcom_editor_unfinished_dialog",modelValue:s.isVisible,"onUpdate:modelValue":e[0]||(e[0]=l=>s.isVisible=l),width:t.modalWidth,"close-on-click-modal":!1,"close-on-press-escape":!1,"append-to-body":!0,"show-close":!1},{header:y(()=>[g("div",ALe,[g("div",ELe,[g("h4",null,x(t.$t("Leave Page?")),1)])])]),footer:y(()=>[g("div",TLe,[_(r,{class:"fcom_secondary_button",onClick:o.handleCancel},{default:y(()=>[N(x(t.$t("Cancel")),1)]),_:1},8,["onClick"]),_(r,{class:"fcom_primary_button",onClick:o.handleProceed},{default:y(()=>[N(x(t.$t("Leave")),1)]),_:1},8,["onClick"])])]),default:y(()=>[g("div",MLe,[g("span",null,x(s.message),1)])]),_:1},8,["modelValue","width"])}const ILe=ce($Le,[["render",PLe]]),LLe={name:"Pagination",emits:["fetch","per_page_change"],props:{pagination:{required:!0,type:Object},extra_sizes:{required:!1,type:Array,default(){return[]}},hide_on_single:{required:!1,type:Boolean,default(){return!0}}},computed:{page_sizes(){const t=[];this.pagination.per_page<10&&t.push(this.pagination.per_page);const e=[10,20,50,80,100,120,150];return[...t,...e,...this.extra_sizes]},pager_layout(){return this.isMobile?"total, sizes, jumper, prev, next":"total, sizes, jumper , prev, pager, next"}},methods:{changePage(t){this.pagination.page=t,this.$emit("fetch")},changeSize(t){this.pagination.per_page=t,this.$emit("per_page_change",t),this.$emit("fetch")}}},OLe={class:"fcom_pagination_wrap"};function DLe(t,e,n,i,s,o){const r=Ive;return v(),$("div",OLe,[_(r,{background:!1,size:"small","pager-count":5,layout:o.pager_layout,onCurrentChange:o.changePage,onSizeChange:o.changeSize,"hide-on-single-page":n.hide_on_single,"current-page":n.pagination.page,"page-sizes":o.page_sizes,"page-size":n.pagination.per_page,total:n.pagination.total},null,8,["layout","onCurrentChange","onSizeChange","hide-on-single-page","current-page","page-sizes","page-size","total"])])}const du=ce(LLe,[["render",DLe]]),RLe={name:"ReportReviewModal",components:{Pagination:du},data(){return{isOpen:!1,loading:!1,content:{},postReports:[],report:null,type:null,ignoring:!1,unpublishing:!1,pagination:{page:1,per_page:10,total:0}}},computed:{getReason(){return t=>this.appVars.report_reasons[t]},isContentLive(){var t;return((t=this.content)==null?void 0:t.status)=="published"},getPublishBtnText(){return this.isContentLive?this.$t("Dismiss Reports"):this.$t("Approve")+" "+this.$t(this.ucFirst(this.type))},getUnpublishBtnText(){return this.isContentLive?this.$t("Unpublish")+" "+this.$t(this.ucFirst(this.type)):this.$t("Remove")+" "+this.$t(this.ucFirst(this.type))}},methods:{closeModal(){this.isOpen=!1,this.content={},this.type=null,this.postReports=[],this.report=null,this.pagination={page:1,per_page:10,total:0}},showReportReviewModal(t){this.isOpen=!0,this.content=t.content,this.type=t.type,this.getPostReports()},getPostReports(){var e;this.loading=!0;let t={page:this.pagination.page,per_page:this.pagination.per_page,content_type:this.type,space_id:(e=this.content)==null?void 0:e.space_id};this.type=="comment"?t.parent_id=this.content.id:t.post_id=this.content.id,this.$get("moderation/reports",t).then(n=>{this.postReports=n.reports.data,this.report=n.reports.data[0]||null,this.pagination.total=n.reports.total}).catch(n=>{this.$handleError(n)}).finally(()=>{this.loading=!1})},ignoreReport(){var t,e;if(!((t=this.report)!=null&&t.id)){this.$notify.error(this.$t("No moderation report found for this content."));return}this.ignoring=!0,this.$put("moderation/reports/"+this.report.id,{space_id:(e=this.content)==null?void 0:e.space_id,status:"ignored"}).then(n=>{this.$notify.success(n.message),this.isOpen=!1,this.$eventBus.emit("updateModerationReport",{content:n.content,action:"ignored",type:this.type}),this.closeModal()}).catch(n=>{this.$handleError(n)}).finally(()=>{this.ignoring=!1})},unpublishReport(){var t,e;if(!((t=this.report)!=null&&t.id)){this.$notify.error(this.$t("No moderation report found for this content."));return}this.unpublishing=!0,this.$put("moderation/reports/"+this.report.id,{space_id:(e=this.content)==null?void 0:e.space_id,status:"unpublished"}).then(n=>{this.$notify.success(n.message),this.isOpen=!1,this.$eventBus.emit("updateModerationReport",{content:n.content,action:"unpublished",type:this.type}),this.closeModal()}).catch(n=>{this.$handleError(n)}).finally(()=>{this.unpublishing=!1})}},created(){this.$eventBus.on("showReportReviewModal",this.showReportReviewModal)},beforeUnmount(){this.$eventBus.off("showReportReviewModal",this.showReportReviewModal)}},VLe={class:"dialog_body"},FLe={class:"report_details"},NLe={class:"report_details_header"},BLe={class:"report_details_header_left"},zLe={class:"report_details_header_right"},HLe={key:0},ULe={key:1},jLe={key:1},WLe={class:"report_reason"},YLe=["title"],qLe={key:0,class:"report_details_body"},GLe=["textContent"],XLe=["aria-label"],KLe={class:"dialog_footer report_footer"};function ZLe(t,e,n,i,s,o){const r=B("UserAvatar"),a=B("UserRouteLink"),l=Vt,c=B("Pagination"),u=ze,d=$s;return v(),D(d,{modelValue:s.isOpen,"onUpdate:modelValue":e[3]||(e[3]=h=>s.isOpen=h),"modal-class":"fcom_common_dialog",id:"fluent_comminity_body",width:t.dialogWidth,"append-to-body":!0,"close-on-click-modal":!1,direction:"rtl",onClose:o.closeModal},{footer:y(()=>[g("div",KLe,[_(u,{class:"fcom_secondary_button",onClick:e[1]||(e[1]=h=>o.unpublishReport()),loading:s.unpublishing,disabled:!s.loading&&!s.report},{default:y(()=>[N(x(o.getUnpublishBtnText),1)]),_:1},8,["loading","disabled"]),_(u,{class:"fcom_primary_button",onClick:e[2]||(e[2]=h=>o.ignoreReport()),loading:s.ignoring,disabled:!s.loading&&!s.report},{default:y(()=>[N(x(o.getPublishBtnText),1)]),_:1},8,["loading","disabled"])])]),default:y(()=>{var h,f;return[g("div",VLe,[g("h4",null,x(t.$t("Reports")+" ("+((f=(h=s.content)==null?void 0:h.meta)==null?void 0:f.reports_count)+")"),1),g("div",FLe,[s.loading?(v(),D(l,{key:1,rows:5,animated:!0})):(v(!0),$(J,{key:0},ye(s.postReports,p=>(v(),$("div",{key:p.id,class:"report_details_item"},[g("div",NLe,[g("div",BLe,[p.reporter?(v(),D(r,{key:0,with_level:!1,xprofile:p.reporter},null,8,["xprofile"])):O("",!0)]),g("div",zLe,[!p.reporter&&!o.getReason(p.reason)?(v(),$("div",HLe,x(t.$t("Flagged automatically by the site rule")),1)):(v(),$("div",ULe,[p.reporter?(v(),D(a,{key:0,show_verified:!1,xprofile:p.reporter},null,8,["xprofile"])):(v(),$("span",jLe,x(t.$t("By System ")),1)),o.getReason(p.reason)?(v(),$(J,{key:2},[g("span",null,x(t.$t("reported for ")),1),g("span",WLe,x(o.getReason(p.reason)),1)],64)):O("",!0)])),g("div",{title:p.created_at,class:"meta_line"},x(t.humanDateDiff(p.created_at)),9,YLe)])]),p.explanation?(v(),$("div",qLe,[g("div",{textContent:x(p.explanation)},null,8,GLe)])):O("",!0)]))),128)),s.pagination.total?(v(),$("div",{key:2,role:"region","aria-label":t.$t("Pagination"),class:"pagination_wrap"},[_(c,{hide_on_single:!0,onFetch:e[0]||(e[0]=p=>o.getPostReports()),pagination:s.pagination},null,8,["pagination"])],8,XLe)):O("",!0)])])]}),_:1},8,["modelValue","width","onClose"])}const JLe=ce(RLe,[["render",ZLe]]),QLe={name:"ReportContentModal",data(){return{reportConfig:null,showModal:!1,saving:!1,contentType:"",reportReason:"",reportExplanation:""}},computed:{currentTitle(){return this.contentType=="comment"?this.$t("Report Comment"):this.$t("Report Post")}},methods:{closeModal(){this.showModal=!1},showReportContentModal(t){this.showModal=!0,this.reportReason="",this.reportExplanation="",this.contentType=t.type,this.reportConfig=t.reportConfig},validateAndSubmit(){if(!this.reportReason){this.$handleError(this.$t("Please select a reason for reporting this content"));return}this.submitReport()},getParentId(){return this.contentType=="comment"?this.reportConfig.id:null},getPostId(){return this.contentType=="post"?this.reportConfig.id:this.reportConfig.post_id},submitReport(){this.saving=!0,this.$post("moderation/report",{content_type:this.contentType,user_id:this.auth.user_id,post_id:this.getPostId(),parent_id:this.getParentId(),reason:this.reportReason,explanation:this.reportExplanation}).then(t=>{this.$notify.success(t.message),this.$eventBus.emit("updateModerationReport",{content:t.content,action:"reported"}),this.closeModal()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},created(){this.$eventBus.on("showReportContentModal",this.showReportContentModal)},beforeUnmount(){this.$eventBus.off("showReportContentModal",this.showReportContentModal)}},eOe={class:"dialog_header"},tOe={class:"dialog_left"},nOe={class:"dialog_body"},sOe={class:"fcom_report_content_form"},iOe={class:"dialog_footer"};function oOe(t,e,n,i,s,o){const r=Zt,a=Wt,l=tn,c=ht,u=nn,d=ze,h=$s;return s.showModal?(v(),D(h,{key:0,"modal-class":"fcom_common_dialog","append-to-body":!0,"close-on-click-modal":!1,width:t.drawerWidth,modelValue:s.showModal,"onUpdate:modelValue":e[4]||(e[4]=f=>s.showModal=f),direction:"rtl",onClose:o.closeModal},{header:y(()=>[g("div",eOe,[g("div",tOe,[g("h4",null,x(o.currentTitle),1)])])]),footer:y(()=>[g("div",iOe,[_(d,{class:"fcom_secondary_button",onClick:e[2]||(e[2]=f=>o.closeModal())},{default:y(()=>[N(x(t.$t("Cancel")),1)]),_:1}),_(d,{class:"fcom_primary_button",onClick:e[3]||(e[3]=f=>o.validateAndSubmit()),loading:s.saving},{default:y(()=>[N(x(t.$t("Report")),1)]),_:1},8,["loading"])])]),default:y(()=>[g("div",nOe,[g("div",sOe,[_(u,{ref:"reportForm","label-position":"top"},{default:y(()=>[_(l,{label:t.$t("Reason")},{default:y(()=>[_(a,{modelValue:s.reportReason,"onUpdate:modelValue":e[0]||(e[0]=f=>s.reportReason=f),placeholder:t.$t("Please select a reason for reporting this content")},{default:y(()=>[(v(!0),$(J,null,ye(t.appVars.report_reasons,(f,p)=>(v(),D(r,{key:p,label:f,value:p},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),_(l,{label:t.$t("Explanation")},{default:y(()=>[_(c,{modelValue:s.reportExplanation,"onUpdate:modelValue":e[1]||(e[1]=f=>s.reportExplanation=f),placeholder:t.$t("Provide an explanation (Optional)"),type:"textarea",rows:4,maxlength:1e3,"show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},512)])])]),_:1},8,["width","modelValue","onClose"])):O("",!0)}const rOe=ce(QLe,[["render",oOe]]);/*! Element Plus v2.13.6 */var cU={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.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the 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",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"},mention:{loading:"Loading"},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",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},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}"}}};let aOe=window.fluentComAdmin.el_i18n;for(const[t,e]of Object.entries(aOe))cU.el[t]=e;const lOe={name:"PortalApplication",components:{Back:hR,SpaceCreateModal:TPe,CourseIcon:nU,AnalyticsIcon:ile,MentionPopover:SLe,UnfinishedChangesModal:ILe,ReportReviewModal:JLe,ReportContentModal:rOe},data(){return{loading:!1,hasSearchHolder:!1,hasNotificationHolder:!1,isSmallScreen:!1,menuItems:this.appVars.portalSettingsMenus,enLang:cU}},created(){this.isSmallScreen=window.innerWidth<=1024}},cOe={class:"fcom_general_menu"},uOe=["href"],dOe={class:"el-icon fcom_arrow_icon"},hOe={class:"fcom_communities_menu fcom_admin_menu"},fOe={class:"fcom_general_menu"},pOe={class:"community_avatar"},mOe={class:"fcom_shape"},gOe={class:"community_name"},vOe={class:"fcom_general_menu"},_Oe={class:"community_avatar"},yOe={class:"fcom_shape"},bOe={class:"community_name"},wOe={class:"fcom_general_menu"},kOe={class:"community_avatar"},COe={class:"fcom_shape"},xOe={class:"community_name"};function SOe(t,e,n,i,s,o){const r=B("router-view"),a=B("Back"),l=we,c=B("router-link"),u=B("CourseIcon"),d=B("AnalyticsIcon"),h=B("space-create-modal"),f=B("mention-popover"),p=B("unfinished-changes-modal"),m=B("report-review-modal"),b=B("report-content-modal"),w=Dde;return v(),D(w,{locale:s.enLang},{default:y(()=>[_(r),(v(),D(na,{to:"#fcom_menu_sidebar"},[g("ul",cOe,[g("li",null,[g("a",{href:t.appVars.portal_url},[g("i",dOe,[_(a)]),g("span",null,x(t.$t("Back to home")),1)],8,uOe)])]),g("div",hOe,[Object.keys(s.menuItems).length>0?(v(),$(J,{key:0},[g("h4",null,x(t.$t("Portal Settings")),1),g("ul",fOe,[(v(!0),$(J,null,ye(s.menuItems,k=>(v(),$("li",{key:k.route,class:q("settings_inner_menu_"+k.route)},[_(c,{to:{name:k.route}},{default:y(()=>[g("div",pOe,[g("span",mOe,[_(l,{innerHTML:k.icon_svg},null,8,["innerHTML"])])]),g("span",gOe,x(k.label),1)]),_:2},1032,["to"])],2))),128))])],64)):O("",!0),t.hasFeature("has_course")&&t.hasCourseCreatorAccess()?(v(),$(J,{key:1},[g("h4",null,x(t.$t("Course Management")),1),g("ul",vOe,[g("li",null,[_(c,{to:{name:"manage_courses"}},{default:y(()=>[g("div",_Oe,[g("span",yOe,[_(l,null,{default:y(()=>[_(u)]),_:1})])]),g("span",bOe,x(t.$t("Manage Courses")),1)]),_:1})])])],64)):O("",!0),t.hasFeature("has_analytics")&&t.isAdmin()?(v(),$(J,{key:2},[g("h4",null,x(t.$t("Reports")),1),g("ul",wOe,[g("li",null,[_(c,{to:{name:"analytics_overview"}},{default:y(()=>[g("div",kOe,[g("span",COe,[_(l,null,{default:y(()=>[_(d)]),_:1})])]),g("span",xOe,x(t.$t("Analytics")),1)]),_:1})])])],64)):O("",!0)])])),_(h),_(f),_(p),_(m),_(b)]),_:1},8,["locale"])}const $Oe=ce(lOe,[["render",SOe]]),AOe={name:"AddMembersForm",components:{SpaceCourseSelector:MS},props:{context:{type:String,required:!0},target:{type:Object,required:!0}},emits:["completed","membersAdded"],data(){return{sourceMode:"wp_users",wpUsers:[],wpLoading:!1,currentSearch:"",inviting:!1,selectedUserIds:[],role:"member",saving:!1,selectedSourceId:"",selectedSourceType:"",selectedSourceSlug:"",csvRows:[],csvFileName:"",createMissingUsers:!1,sendWelcomeEmailCsv:!1,sendWelcomeEmailCrm:!1,wpUsersLoaded:!1,crmTags:[],crmTagsLoading:!1,crmTagsLoaded:!1,selectedTagId:null,createMissingCrmUsers:!1,batchRunning:!1,batchProgress:0,batchProcessed:0,batchTotal:0,importDone:null}},computed:{isEmail(){return/^\S+@\S+\.\S+$/.test(this.currentSearch)}},watch:{sourceMode(t){t==="wp_users"&&!this.wpUsersLoaded&&this.fetchWpUsers(),t==="crm_tag"&&this.appVars.pro&&!this.crmTagsLoaded&&this.fetchCrmTags()},createMissingUsers(t){t||(this.sendWelcomeEmailCsv=!1)},createMissingCrmUsers(t){t||(this.sendWelcomeEmailCrm=!1)}},methods:{invitingLabel(t){return t?this.$t("Send Invitation to %s",t):this.$t("Send Invitation")},searchWpUsers(t=""){this.currentSearch=(t||"").trim(),!(t&&t.length<2)&&this.fetchWpUsers(t)},fetchWpUsers(t=""){this.wpLoading=!0;const e=this.context==="course",n=e?`admin/courses/${this.target.id}/users/search`:"spaces/users/search",i=e?{search:t}:{context:"add_member",search:t,space_id:this.target.id};this.$get(n,i).then(s=>{this.wpUsers=s.users.data,this.wpUsersLoaded=!0}).catch(s=>{this.$handleError(s)}).finally(()=>{this.wpLoading=!1})},addWpUsers(){if(!this.selectedUserIds.length)return;const t=this.context==="course";if(this.selectedUserIds.length===1){this.saving=!0;const i=t?"admin/courses/"+this.target.id+"/students":"spaces/"+this.target.slug+"/members",s=t?{user_id:this.selectedUserIds[0]}:{user_id:this.selectedUserIds[0],role:this.role};this.$post(i,s).then(o=>{this.$notify.success(o.message),this.$emit("completed")}).catch(o=>{this.$handleError(o)}).finally(()=>{this.saving=!1});return}const e=t?"admin/courses/"+this.target.id+"/students/bulk-add":"spaces/"+this.target.slug+"/members/bulk-add",n=t?{}:{role:this.role};this.runChunkedImport(this.selectedUserIds,i=>({url:e,data:{user_ids:i,...n}}))},inviteToSpace(){if(this.context!=="space")return;const t=this.currentSearch;this.inviting=!0,this.$post("invitations",{email:t,space_id:this.target.id}).then(e=>{this.$notify.success(e.message||this.$t("Invitation sent.")),this.currentSearch="",this.fetchWpUsers("")}).catch(e=>{this.$handleError(e)}).finally(()=>this.inviting=!1)},importFromSource(){if(!this.selectedSourceId){this.$notify.error(this.$t("Please select a source space or course."));return}const t=this.context==="course",e=this.selectedSourceType==="course";if(e&&!parseInt(this.selectedSourceId,10)){this.$notify.error(this.$t("Invalid source course."));return}if(!e&&!this.selectedSourceSlug){this.$notify.error(this.$t("Invalid source space."));return}const n=t?"admin/courses/"+this.target.id+"/students/bulk-add":"spaces/"+this.target.slug+"/members/bulk-add",i=e?{from_course_id:parseInt(this.selectedSourceId,10)}:{from_space_slug:this.selectedSourceSlug};this.runOffsetImport(n,i)},downloadSampleCsv(){this.$exportToCsv([{Name:"John Doe",Email:"john@example.com",Username:"johndoe"},{Name:"Jane Smith",Email:"jane@example.com",Username:"janesmith"},{Name:"Bob Lee",Email:"bob@example.com",Username:"boblee"}],"fcom-bulk-import-sample-"+this.context+".csv")},onCsvFileChange(t){if(t&&t.status&&t.status!=="ready")return;const e=t.raw||t;if(!e)return;this.csvFileName=e.name||"import.csv";const n=new FileReader;n.onload=i=>{this.csvRows=this.parseCsvText(i.target.result.trim()),this.csvRows.length||this.$notify.error(this.$t("No valid rows found. Ensure columns are Name, Email, Username."))},n.readAsText(e)},resetCsvImport(){this.csvRows=[],this.csvFileName=""},splitCsvLine(t){return t.split(/,(?=(?:[^"]*"[^"]*")*[^"]*$)/).map(e=>e.trim().replace(/^"|"$/g,"").replace(/""/g,'"'))},parseCsvText(t){const e=t.split(/\r?\n/).map(d=>d.trim()).filter(Boolean);if(!e.length)return[];const n=this.splitCsvLine(e[0]).map(d=>d.toLowerCase()),i=["name","email","username"],s=n.some(d=>i.includes(d));let o=0,r=1,a=2,l=0;s&&(l=1,o=n.indexOf("name"),r=n.indexOf("email"),a=n.indexOf("username"));const c=new Set,u=[];for(let d=l;d<e.length;d++){const h=this.splitCsvLine(e[d]),f=o>=0&&h[o]||"",p=r>=0?(h[r]||"").toLowerCase():"",m=a>=0&&h[a]||"";!p.includes("@")||c.has(p)||(c.add(p),u.push({name:f,email:p,username:m}))}return u},importCsv(){if(!this.csvRows.length)return;let t=`spaces/${this.target.slug}/members/bulk-import`;this.context==="course"&&(t=`admin/courses/${this.target.id}/students/bulk-import`);const e=100,n=this.csvRows.length,i={added:0,skipped:0,failed:0};this.batchRunning=!0,this.batchTotal=n,this.batchProcessed=0,this.batchProgress=0;const s=o=>{if(o>=n){this.batchRunning=!1,this.importDone={...i,total:n},this.$emit("membersAdded");return}const r=this.csvRows.slice(o,o+e);this.$post(t,{rows:r,create_missing:this.createMissingUsers,notify_new_users:this.sendWelcomeEmailCsv}).then(a=>{i.added+=a.added||0,i.skipped+=a.skipped||0,i.failed+=a.failed||0;const l=a.processed&&a.processed>0?a.processed:r.length,c=o+l;this.batchProcessed=Math.min(n,c),this.batchProgress=Math.round(this.batchProcessed/n*100),s(c)}).catch(a=>{this.$handleError(a),this.batchRunning=!1,this.importDone={...i,total:n},this.$emit("membersAdded")})};s(0)},fetchCrmTags(){this.crmTagsLoading=!0,this.$get("settings/crm-tagging-config").then(t=>{this.crmTags=t.crm_tags||[],this.crmTagsLoaded=!0}).catch(t=>{this.$handleError(t)}).finally(()=>{this.crmTagsLoading=!1})},addFromCrmTag(){if(!this.selectedTagId)return;const t=this.context==="course",e=t?`admin/courses/${this.target.id}/students/resolve-crm-tag`:`spaces/${this.target.slug}/members/resolve-crm-tag`,n=t?`admin/courses/${this.target.id}/students/bulk-add`:`spaces/${this.target.slug}/members/bulk-add`,i=[];let s=0;this.batchRunning=!0,this.batchTotal=0,this.batchProcessed=0,this.batchProgress=0;const o=()=>{this.batchRunning=!1;const a=i.length+s;this.importDone={added:0,skipped:0,failed:s,total:a},this.$emit("membersAdded")},r=a=>{this.$post(e,{tag_id:this.selectedTagId,create_missing:this.createMissingCrmUsers,notify_new_users:this.sendWelcomeEmailCrm,offset:a,per_page:200}).then(l=>{if(l.user_ids&&l.user_ids.length&&i.push(...l.user_ids),s+=l.failed||0,l.has_more){r(l.next_offset);return}if(!i.length){o();return}this.runChunkedImport(i,c=>({url:n,data:{user_ids:c}}),s)}).catch(l=>{this.$handleError(l),this.batchRunning=!1;const c=i.length+s;this.importDone={added:0,skipped:0,failed:s,total:c},this.$emit("membersAdded")})};r(0)},runChunkedImport(t,e,n=0){const s=t.length,o={added:0,skipped:0,failed:n},r=s+n;this.batchRunning=!0,this.batchTotal=s,this.batchProcessed=0,this.batchProgress=0;const a=l=>{if(l>=s){this.batchRunning=!1,this.importDone={...o,total:r},this.$emit("membersAdded");return}const c=t.slice(l,l+500),{url:u,data:d}=e(c);this.$post(u,d).then(h=>{o.added+=h.added||0,o.skipped+=h.skipped||0,o.failed+=h.failed||0;const f=h.processed&&h.processed>0?h.processed:c.length,p=l+f;this.batchProcessed=Math.min(s,p),this.batchProgress=Math.round(this.batchProcessed/s*100),a(p)}).catch(h=>{this.$handleError(h),this.batchRunning=!1,this.importDone={...o,total:r},this.$emit("membersAdded")})};a(0)},runOffsetImport(t,e){const n={added:0,skipped:0,failed:0};this.batchRunning=!0,this.batchTotal=0,this.batchProcessed=0,this.batchProgress=0;const i=s=>{this.$post(t,{...e,offset:s,per_page:500}).then(o=>{n.added+=o.added||0,n.skipped+=o.skipped||0,n.failed+=o.failed||0,o.total&&!this.batchTotal&&(this.batchTotal=o.total),this.batchProcessed=o.next_offset||s+(o.processed||0),this.batchProgress=this.batchTotal?Math.min(99,Math.round(this.batchProcessed/this.batchTotal*100)):50,o.has_more?i(o.next_offset||this.batchProcessed):(this.batchProgress=100,this.batchRunning=!1,this.importDone={...n,total:this.batchTotal||n.added+n.skipped+n.failed},this.$emit("membersAdded"))}).catch(o=>{this.$handleError(o),this.batchRunning=!1,this.importDone={...n,total:this.batchTotal||n.added+n.skipped+n.failed},this.$emit("membersAdded")})};i(0)}},mounted(){this.sourceMode==="wp_users"&&!this.wpUsersLoaded&&this.fetchWpUsers()}},EOe={class:"fcom_add_members_form"},MOe={key:0,class:"fcom_source_selector_wrap fcom_mb_20"},TOe={key:1,class:"fcom_import_done"},POe={class:"fcom_done_title"},IOe={class:"fcom_done_subtitle"},LOe={class:"fcom_import_summary"},OOe={class:"fcom_import_summary_title"},DOe={class:"fcom_import_summary_row"},ROe={class:"fcom_import_summary_row"},VOe={key:0,class:"fcom_import_summary_row"},FOe={key:1,class:"fcom_import_summary_row"},NOe={key:2,class:"fcom_import_progress_wrap"},BOe={class:"fcom_help_text fcom_mb_15"},zOe={key:0,class:"fcom_muted_text fcom_mt_10"},HOe={class:"fcom_select_photo",style:{float:"left"}},UOe=["src","alt"],jOe={style:{float:"right",color:"#8492a6","font-size":"13px"}},WOe={style:{padding:"4px","text-align":"center"}},YOe={style:{margin:"0 0 8px"}},qOe={key:0},GOe={key:1},XOe={key:2},KOe={key:1,style:{margin:"4px 0 0","font-size":"12px"}},ZOe={key:0,class:"fcom_help_text fcom_mb_10"},JOe=["href"],QOe={class:"fcom_help_text fcom_mb_15"},eDe={key:0},tDe={key:2},nDe={class:"fcom_spaced_flex fcom_mb_10"},sDe={class:"fcom_csv_drop_inner"},iDe={class:"el-upload__text fcom_mt_10"},oDe={key:0},rDe={class:"el-upload__tip"},aDe={class:"fcom_spaced_flex fcom_mb_10"},lDe={class:"fcom_muted_text",style:{"margin-left":"8px"}},cDe={key:0,class:"fcom_muted_text fcom_mb_10"},uDe=["aria-label"],dDe={class:"fcom_help_text fcom_mb_15"},hDe=["aria-label"],fDe={class:"fcom_help_text fcom_mb_15"},pDe={key:0};function mDe(t,e,n,i,s,o){const r=Qc,a=ws,l=c2,c=Zt,u=ze,d=Wt,h=tn,f=nn,p=B("SpaceCourseSelector"),m=J1,b=Il,w=Pl,k=qt,C=xt("loading");return v(),$("div",EOe,[!s.batchRunning&&!s.importDone?(v(),$("div",MOe,[_(a,{modelValue:s.sourceMode,"onUpdate:modelValue":e[0]||(e[0]=A=>s.sourceMode=A),size:"small"},{default:y(()=>[_(r,{value:"wp_users"},{default:y(()=>[N(x(t.$t("WP Users")),1)]),_:1}),_(r,{value:"from_source"},{default:y(()=>[N(x(t.$t("From Space/Course")),1)]),_:1}),_(r,{value:"csv"},{default:y(()=>[N(x(t.$t("CSV Import")),1)]),_:1}),t.appVars.has_fluentcrm?(v(),D(r,{key:0,value:"crm_tag"},{default:y(()=>[N(x(t.$t("CRM Tag")),1)]),_:1})):O("",!0)]),_:1},8,["modelValue"])])):O("",!0),s.importDone?(v(),$("div",TOe,[e[19]||(e[19]=g("div",{class:"fcom_done_icon_wrap"},[g("div",{class:"fcom_done_circle"},[g("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[g("path",{d:"M4 10l4.5 4.5L16 6",stroke:"white","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"})])])],-1)),g("h3",POe,x(t.$t("All Done!")),1),g("p",IOe,x(t.$t("Import has been completed. You may close this now.")),1),g("div",LOe,[g("strong",OOe,x(t.$t("Import Summary")),1),g("p",DOe,x(t.$t("Total Records:"))+" "+x(s.importDone.total),1),g("p",ROe,x(n.context==="course"?t.$t("Enrolled:"):t.$t("Added:"))+" "+x(s.importDone.added),1),s.importDone.skipped?(v(),$("p",VOe,x(t.$t("Skipped:"))+" "+x(s.importDone.skipped),1)):O("",!0),s.importDone.failed?(v(),$("p",FOe,x(t.$t("Failed:"))+" "+x(s.importDone.failed),1)):O("",!0)])])):s.batchRunning?(v(),$("div",NOe,[g("div",BOe,[g("p",null,x(t.$t("Importing… Please do not close this window.")),1)]),_(l,{percentage:s.batchProgress,"stroke-width":12},null,8,["percentage"]),s.batchTotal?(v(),$("p",zOe,x(s.batchProcessed)+" / "+x(s.batchTotal)+" "+x(t.$t("processed")),1)):O("",!0)])):(v(),$(J,{key:3},[s.sourceMode==="wp_users"?(v(),D(f,{key:0,onSubmit:e[5]||(e[5]=Me(()=>{},["prevent"])),"label-position":"top"},{default:y(()=>[_(h,{label:t.$t("Users")},{default:y(()=>[_(d,{class:"rich_select","fit-input-width":"",multiple:"",filterable:"",remote:"","default-first-option":"","reserve-keyword":!1,loading:s.wpLoading,"remote-method":o.searchWpUsers,placeholder:t.$t("Search and select users"),modelValue:s.selectedUserIds,"onUpdate:modelValue":e[2]||(e[2]=A=>s.selectedUserIds=A)},{empty:y(()=>[g("div",WOe,[g("p",YOe,[o.isEmail?(v(),$("span",qOe,[N(x(t.$t("User not registered:"))+" ",1),g("strong",null,x(s.currentSearch),1)])):s.currentSearch?(v(),$("span",GOe,x(t.$t("No matching user found.")),1)):(v(),$("span",XOe,x(t.$t("No data")),1))]),n.context==="space"?(v(),$(J,{key:0},[o.isEmail?(v(),D(u,{key:0,size:"small",class:"fcom_primary_button",loading:s.inviting,disabled:s.inviting,"aria-label":o.invitingLabel(s.currentSearch),onClick:e[1]||(e[1]=A=>o.inviteToSpace())},{default:y(()=>[N(x(t.$t("Send Email Invitation")),1)]),_:1},8,["loading","disabled","aria-label"])):s.currentSearch?(v(),$("p",KOe,x(t.$t("Type a valid email to invite.")),1)):O("",!0)],64)):O("",!0)])]),default:y(()=>[(v(!0),$(J,null,ye(s.wpUsers,A=>(v(),D(c,{class:"fcom_with_photo_option",key:A.ID,label:`${A.display_name} (${A.user_email||A.ID})`,value:A.ID},{default:y(()=>[g("span",HOe,[g("img",{src:A.photo,alt:A.display_name},null,8,UOe),g("span",null,x(A.display_name),1)]),g("span",jOe,x(A.user_email||A.ID),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["loading","remote-method","placeholder","modelValue"])]),_:1},8,["label"]),n.context==="space"?(v(),D(h,{key:0,label:t.$t("Membership Role")},{default:y(()=>[_(d,{modelValue:s.role,"onUpdate:modelValue":e[3]||(e[3]=A=>s.role=A),placeholder:t.$t("Select Role")},{default:y(()=>[_(c,{label:t.$t("Member"),value:"member"},null,8,["label"]),_(c,{label:t.$t("Moderator"),value:"moderator"},null,8,["label"]),_(c,{label:t.$t("Admin"),value:"admin"},null,8,["label"])]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])):O("",!0),_(h,null,{default:y(()=>[s.selectedUserIds.length>1&&!t.appVars.pro?(v(),$("div",ZOe,[g("p",null,[N(x(t.$t("Bulk adding requires FluentCommunity Pro."))+" ",1),t.appVars.upgrade_url?(v(),$("a",{key:0,href:t.$upgradeUrl("feature_lock_bulk_add_members"),target:"_blank"},x(t.$t("Upgrade")),9,JOe)):O("",!0)])])):O("",!0),Re((v(),D(u,{class:"fcom_primary_button",onClick:e[4]||(e[4]=A=>o.addWpUsers())},{default:y(()=>[N(x(n.context==="course"?t.$t("Add Students"):t.$t("Add as %s",s.role)),1)]),_:1})),[[C,s.saving]])]),_:1})]),_:1})):s.sourceMode==="from_source"?(v(),D(f,{key:1,"label-position":"top"},{default:y(()=>[_(h,{label:t.$t("Select Source Space or Course")},{default:y(()=>[_(p,{modelValue:s.selectedSourceId,"onUpdate:modelValue":e[6]||(e[6]=A=>s.selectedSourceId=A),placeholder_text:t.$t("Select a space or course..."),memberships:[n.target.id.toString()],onSelectedType:e[7]||(e[7]=A=>s.selectedSourceType=A),onSelectedSlug:e[8]||(e[8]=A=>s.selectedSourceSlug=A)},null,8,["modelValue","placeholder_text","memberships"])]),_:1},8,["label"]),g("div",QOe,[g("p",null,x(n.context==="course"?t.$t("All users will be enrolled as Student."):t.$t("All users will be added as Member.")),1)]),_(u,{class:"fcom_primary_button",onClick:e[9]||(e[9]=A=>o.importFromSource())},{default:y(()=>[N(x(n.context==="course"?t.$t("Import Students"):t.$t("Import Members"))+" ",1),t.appVars.pro?O("",!0):(v(),$("span",eDe,"  ("+x(t.$t("Pro"))+")",1))]),_:1})]),_:1})):s.sourceMode==="csv"?(v(),$("div",tDe,[s.csvRows.length?(v(),$(J,{key:1},[g("div",aDe,[g("div",null,[g("strong",null,x(s.csvFileName),1),g("span",lDe,x(s.csvRows.length)+" "+x(t.$t("contacts")),1)]),_(u,{link:"",size:"small",onClick:e[11]||(e[11]=A=>o.resetCsvImport())},{default:y(()=>[N(x(t.$t("Change")),1)]),_:1})]),_(w,{data:s.csvRows.slice(0,5),size:"small",class:"fcom_mb_10"},{default:y(()=>[_(b,{prop:"name",label:t.$t("Name"),"min-width":"120"},null,8,["label"]),_(b,{prop:"email",label:t.$t("Email"),"min-width":"160"},null,8,["label"]),_(b,{prop:"username",label:t.$t("Username"),"min-width":"110"},null,8,["label"])]),_:1},8,["data"]),s.csvRows.length>5?(v(),$("p",cDe," + "+x(s.csvRows.length-5)+" "+x(t.$t("more rows")),1)):O("",!0),_(f,{"label-position":"top"},{default:y(()=>[_(h,null,{default:y(()=>[g("div",{role:"group","aria-label":t.$t("Create WordPress accounts for new email addresses")},[g("div",null,[_(k,{modelValue:s.createMissingUsers,"onUpdate:modelValue":e[12]||(e[12]=A=>s.createMissingUsers=A),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Create WordPress accounts for new email addresses")),1)]),_:1},8,["modelValue"])]),g("div",null,[Re(_(k,{modelValue:s.sendWelcomeEmailCsv,"onUpdate:modelValue":e[13]||(e[13]=A=>s.sendWelcomeEmailCsv=A),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Send default WordPress welcome email for new users")),1)]),_:1},8,["modelValue"]),[[jt,s.createMissingUsers]])])],8,uDe)]),_:1}),g("div",dDe,[g("p",null,x(n.context==="course"?t.$t("All contacts with this tag will be enrolled as Student."):t.$t("All contacts with this tag will be added as Member.")),1)]),_(h,null,{default:y(()=>[_(u,{class:"fcom_primary_button",onClick:e[14]||(e[14]=A=>o.importCsv())},{default:y(()=>[N(x(n.context==="course"?t.$t("Import Students"):t.$t("Import Members")),1)]),_:1})]),_:1})]),_:1})],64)):(v(),$(J,{key:0},[g("div",nDe,[e[20]||(e[20]=g("span",null,null,-1)),t.appVars.pro?(v(),D(u,{key:0,link:"",size:"small",onClick:e[10]||(e[10]=A=>o.downloadSampleCsv())},{default:y(()=>[N("↓ "+x(t.$t("Sample CSV")),1)]),_:1})):O("",!0)]),_(m,{drag:"",accept:".csv,.txt","auto-upload":!1,"show-file-list":!1,"on-change":o.onCsvFileChange,disabled:!t.appVars.pro},{tip:y(()=>[g("div",rDe,x(t.$t("Columns: Name, Email, Username")),1)]),default:y(()=>[g("div",sDe,[e[22]||(e[22]=g("div",{class:"fcom_csv_drop_arrow"},"↑",-1)),g("div",iDe,[N(x(t.$t("Drop CSV here or"))+" ",1),g("em",null,x(t.$t("click to browse")),1),e[21]||(e[21]=N()),t.appVars.pro?O("",!0):(v(),$("span",oDe,"  ("+x(t.$t("Pro"))+")",1))])])]),_:1},8,["on-change","disabled"])],64))])):s.sourceMode==="crm_tag"?(v(),D(f,{key:3,"label-position":"top"},{default:y(()=>[_(h,{label:t.$t("FluentCRM Tag")},{default:y(()=>[_(d,{modelValue:s.selectedTagId,"onUpdate:modelValue":e[15]||(e[15]=A=>s.selectedTagId=A),loading:s.crmTagsLoading,placeholder:t.$t("Select a tag"),style:{width:"100%"}},{default:y(()=>[(v(!0),$(J,null,ye(s.crmTags,A=>(v(),D(c,{key:A.id,label:A.title,value:A.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","placeholder"])]),_:1},8,["label"]),_(h,null,{default:y(()=>[g("div",{role:"group","aria-label":t.$t("Create WordPress accounts for contacts without an existing account")},[g("div",null,[_(k,{modelValue:s.createMissingCrmUsers,"onUpdate:modelValue":e[16]||(e[16]=A=>s.createMissingCrmUsers=A),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Create WordPress accounts for contacts without an existing account")),1)]),_:1},8,["modelValue"])]),g("div",null,[Re(_(k,{modelValue:s.sendWelcomeEmailCrm,"onUpdate:modelValue":e[17]||(e[17]=A=>s.sendWelcomeEmailCrm=A),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Send default WordPress welcome email for new users")),1)]),_:1},8,["modelValue"]),[[jt,s.createMissingCrmUsers]])])],8,hDe)]),_:1}),g("div",fDe,[g("p",null,x(n.context==="course"?t.$t("All contacts with this tag will be enrolled as Student."):t.$t("All contacts with this tag will be added as Member.")),1)]),_(u,{class:"fcom_primary_button",onClick:e[18]||(e[18]=A=>o.addFromCrmTag())},{default:y(()=>[N(x(n.context==="course"?t.$t("Add Students"):t.$t("Add Members")),1),t.appVars.pro?O("",!0):(v(),$("span",pDe,"  ("+x(t.$t("Pro"))+")",1))]),_:1})]),_:1})):O("",!0)],64))])}const gDe=ce(AOe,[["render",mDe]]),vDe={name:"SortDirIcon",props:{dir:{type:String,default:"desc"}},computed:{arrowPath(){return this.dir==="asc"?"M12 12.5 V4 M10 6 L12 4 L14 6":"M12 3.5 V12 M10 10 L12 12 L14 10"}}},_De={viewBox:"0 0 16 16",width:"1em",height:"1em",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},yDe=["d"];function bDe(t,e,n,i,s,o){return v(),$("svg",_De,[e[0]||(e[0]=g("line",{x1:"2.5",y1:"4",x2:"8.5",y2:"4"},null,-1)),e[1]||(e[1]=g("line",{x1:"2.5",y1:"8",x2:"6.5",y2:"8"},null,-1)),e[2]||(e[2]=g("line",{x1:"2.5",y1:"12",x2:"4.5",y2:"12"},null,-1)),g("path",{d:o.arrowPath},null,8,yDe)])}const wDe=ce(vDe,[["render",bDe]]);let kDe=0;const CDe={name:"SortControl",components:{SortDirIcon:wDe},emits:["update:field","update:dir","change"],props:{field:{type:String,required:!0},dir:{type:String,default:"desc",validator:t=>["asc","desc"].includes(t)},options:{type:Array,required:!0}},data(){const t=++kDe;return{sortLabelId:"fcom_sort_by_"+t,orderLabelId:"fcom_sort_order_"+t}},computed:{currentLabel(){const t=this.options.find(e=>e.value===this.field);return t?t.label:""},ariaLabel(){const t=this.dir==="asc"?this.$t("Ascending"):this.$t("Descending");return this.$t("Sort by")+": "+this.currentLabel+", "+t}},methods:{selectField(t){t.value!==this.field&&(this.$emit("update:field",t.value),this.$emit("update:dir",t.defaultDir||"asc"),this.$emit("change"))},selectDir(t){t!==this.dir&&(this.$emit("update:dir",t),this.$emit("change"))}}},xDe={class:"fcom_feed_filter_icon"},SDe={class:"fcom_feed_filter_value"},$De={role:"presentation",class:"fcom_feed_filter_group"},ADe=["id"],EDe=["aria-labelledby"],MDe={role:"presentation",class:"fcom_feed_filter_group"},TDe=["id"],PDe=["aria-labelledby"],IDe={class:"fcom_sort_option"},LDe={class:"fcom_sort_option"};function ODe(t,e,n,i,s,o){const r=B("SortDirIcon"),a=B("ArrowDown"),l=we,c=ze,u=Ar,d=Er,h=$r;return v(),D(h,{class:"fcom_feed_filter_dropdown","popper-class":"fcom_feed_filter_pop",trigger:"click",placement:"bottom-end","hide-on-click":!1},{dropdown:y(()=>[_(d,{class:"fcom_feed_filter_menu"},{default:y(()=>[g("li",$De,[g("span",{id:s.sortLabelId,class:"fcom_feed_filter_group_label"},x(t.$t("Sort by")),9,ADe),g("ul",{role:"group","aria-labelledby":s.sortLabelId,class:"fcom_feed_filter_group_list"},[(v(!0),$(J,null,ye(n.options,f=>(v(),D(u,{key:f.value,role:"menuitemradio","aria-checked":n.field===f.value,"aria-current":n.field===f.value?"true":void 0,class:q({fcom_feed_filter_selected:n.field===f.value}),onClick:p=>o.selectField(f)},{default:y(()=>[N(x(f.label),1)]),_:2},1032,["aria-checked","aria-current","class","onClick"]))),128))],8,EDe)]),g("li",MDe,[g("span",{id:s.orderLabelId,class:"fcom_feed_filter_group_label fcom_feed_filter_group_divided"},x(t.$t("Order")),9,TDe),g("ul",{role:"group","aria-labelledby":s.orderLabelId,class:"fcom_feed_filter_group_list"},[_(u,{role:"menuitemradio","aria-checked":n.dir==="asc","aria-current":n.dir==="asc"?"true":void 0,class:q({fcom_feed_filter_selected:n.dir==="asc"}),onClick:e[0]||(e[0]=f=>o.selectDir("asc"))},{default:y(()=>[g("span",IDe,[_(r,{dir:"asc"}),N(x(t.$t("Ascending")),1)])]),_:1},8,["aria-checked","aria-current","class"]),_(u,{role:"menuitemradio","aria-checked":n.dir==="desc","aria-current":n.dir==="desc"?"true":void 0,class:q({fcom_feed_filter_selected:n.dir==="desc"}),onClick:e[1]||(e[1]=f=>o.selectDir("desc"))},{default:y(()=>[g("span",LDe,[_(r,{dir:"desc"}),N(x(t.$t("Descending")),1)])]),_:1},8,["aria-checked","aria-current","class"])],8,PDe)])]),_:1})]),default:y(()=>[_(c,{text:"",class:"fcom_feed_filter_trigger","aria-label":o.ariaLabel},{default:y(()=>[g("span",xDe,[_(r,{dir:n.dir},null,8,["dir"])]),g("span",SDe,x(o.currentLabel),1),_(l,{class:"fcom_feed_filter_caret"},{default:y(()=>[_(a)]),_:1})]),_:1},8,["aria-label"])]),_:1})}const DDe=ce(CDe,[["render",ODe]]),RDe={name:"ExportIcon"},VDe={viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function FDe(t,e,n,i,s,o){return v(),$("svg",VDe,[...e[0]||(e[0]=[g("path",{d:"M8.00001 9.66667L8.00001 3M8.00001 9.66667C7.53319 9.66667 6.66103 8.33713 6.33334 8M8.00001 9.66667C8.46683 9.66667 9.33899 8.33713 9.66668 8",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M13.3333 11C13.3333 12.6547 12.988 13 11.3333 13H4.66666C3.01199 13 2.66666 12.6547 2.66666 11",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const uU=ce(RDe,[["render",FDe]]),NDe={name:"CourseMembers",props:["course"],components:{Search:j1,UserRouteLink:ua,Pagination:du,AddMembersForm:gDe,ExportIcon:uU,SortControl:DDe},setup(){return{uiStore:lU()}},data(){return{students:[],search:"",sort_by:"created_at",sort_dir:"desc",loading:!0,exporting:!1,isAddStdOpen:!1,pagination:{page:1,per_page:20,total:0}}},computed:{sortOptions(){return[{value:"display_name",label:this.$t("Name"),defaultDir:"asc"},{value:"created_at",label:this.$t("Start Date"),defaultDir:"desc"},{value:"last_activity",label:this.$t("Last Seen"),defaultDir:"desc"}]}},methods:{onSortChange(){this.uiStore.setListSort("course-students",this.sort_by,this.sort_dir),this.toSearch()},restoreSortPreference(){const t=this.uiStore.getListSort("course-students");t&&this.sortOptions.some(e=>e.value===t.field)&&(this.sort_by=t.field,this.sort_dir=t.dir==="asc"?"asc":"desc")},exportStudents(){if(!this.has_pro){this.$handleError(this.$t("Please upgrade to Pro to use this feature"));return}this.exporting=!0,this.$get("admin/courses/"+this.course.id+"/export/students",{search:this.search}).then(t=>{this.$exportToCsv(t.students,"course-students-"+this.course.slug+".csv")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.exporting=!1})},updateStudents(t){this.students=this.students.filter(e=>e.user_id!==t.user_id)},studentAdded(){this.isAddStdOpen=!1,this.fetchStudents()},handleSearch(){this.search&&this.search.length<3||this.toSearch()},toSearch(){this.pagination.page=1,this.fetchStudents()},restartStudent(t){this.$confirm(this.$t("Restart progress for %s?",t.display_name),this.$t("Restart Progress"),{confirmButtonText:this.$t("Yes, restart"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.$del("admin/courses/"+this.course.id+"/students/"+t.user_id+"/progress").then(e=>{this.$notify.success(e.message),this.fetchStudents()}).catch(e=>{this.$handleError(e)})}).catch(()=>{})},removeStudentPrompt(t){this.$confirm(this.$t("Are you sure you want to remove this student from this course?"),this.$t("Remove Student?"),{confirmButtonText:this.$t("Remove"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"error"}).then(()=>{this.removeStudent(t)})},removeStudent(t){this.$del("admin/courses/"+this.course.id+"/students/"+t.user_id).then(e=>{this.$notify.success(e.message),this.updateStudents(t)}).catch(e=>{this.$handleError(e)})},fetchStudents(){this.loading=!0,this.$get("admin/courses/"+this.course.id+"/students",{page:this.pagination.page,per_page:this.pagination.per_page,search:this.search,sort_by:this.sort_by,sort_dir:this.sort_dir}).then(t=>{this.students=t.students.data,this.pagination.total=t.students.total,window.scrollTo(0,0)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.restoreSortPreference(),this.fetchStudents()}},BDe={class:"fcom_course_members"},zDe={class:"fcom_course_member_header"},HDe={class:"fcom_course_member_actions"},UDe={key:0},jDe={key:1},WDe={class:"search_member fcom_mb_20"},YDe={class:"feed_filters"},qDe={class:"table_user_card"},GDe={class:"card_avatar"},XDe={class:"card_info"},KDe={class:"card_name"},ZDe={key:0,class:"meta_line"},JDe={class:"progress_wrap"},QDe=["title"],eRe=["title"];function tRe(t,e,n,i,s,o){const r=B("ExportIcon"),a=we,l=ze,c=B("Search"),u=ht,d=B("SortControl"),h=B("UserAvatar"),f=B("UserRouteLink"),p=Il,m=c2,b=B("MoreFilled"),w=Ar,k=Er,C=$r,A=Pl,S=B("pagination"),M=B("add-members-form"),P=Fa,T=xt("loading");return v(),$("div",BDe,[g("div",zDe,[g("h3",null,x(t.$t("Course Students")),1),g("div",HDe,[t.hasCourseCreatorAccess()?(v(),D(l,{key:0,class:"fcom_secondary_button",loading:s.exporting,onClick:e[0]||(e[0]=I=>o.exportStudents())},{default:y(()=>[_(a,null,{default:y(()=>[_(r)]),_:1}),t.has_pro?(v(),$("span",UDe,x(t.$t("Export")),1)):(v(),$("span",jDe,x(t.$t("Export (Pro)")),1))]),_:1},8,["loading"])):O("",!0),t.hasCourseCreatorAccess()?(v(),D(l,{key:1,class:"fcom_primary_button",onClick:e[1]||(e[1]=I=>s.isAddStdOpen=!0)},{default:y(()=>[N(x(t.$t("Add Student")),1)]),_:1})):O("",!0)])]),g("div",WDe,[_(u,{onKeydown:ut(o.toSearch,["enter"]),onInput:o.handleSearch,modelValue:s.search,"onUpdate:modelValue":e[2]||(e[2]=I=>s.search=I),clearable:"",onClear:o.toSearch,placeholder:t.$t("Search Members...")},{prefix:y(()=>[_(a,null,{default:y(()=>[_(c)]),_:1})]),_:1},8,["onKeydown","onInput","modelValue","onClear","placeholder"])]),g("div",YDe,[e[7]||(e[7]=g("div",{class:"fcom_feed_divider"},null,-1)),_(d,{field:s.sort_by,"onUpdate:field":e[3]||(e[3]=I=>s.sort_by=I),dir:s.sort_dir,"onUpdate:dir":e[4]||(e[4]=I=>s.sort_dir=I),options:o.sortOptions,onChange:o.onSortChange},null,8,["field","dir","options","onChange"])]),Re((v(),D(A,{data:s.students,style:{width:"100%","border-radius":"8px"},"empty-text":t.$t("No Students Found")},{default:y(()=>[_(p,{prop:"ID",label:t.$t("Name"),"min-width":"200"},{default:y(I=>{var L;return[g("div",qDe,[g("div",GDe,[_(h,{xprofile:I.row},null,8,["xprofile"])]),g("div",XDe,[g("div",KDe,[_(f,{show_badge:!0,xprofile:I.row},null,8,["xprofile"])]),I.row.short_description?(v(),$("div",ZDe,x(t.getExcerpt(((L=I.row.meta)==null?void 0:L.short_description_rendered)||I.row.short_description,160)),1)):O("",!0)])])]}),_:1},8,["label"]),_(p,{width:"160",prop:"progress",label:t.$t("Progress")},{default:y(I=>[g("div",JDe,[_(m,{class:"fcom_progress",percentage:parseInt(I.row.progress)},null,8,["percentage"])])]),_:1},8,["label"]),_(p,{width:"160",label:t.$t("Start Date")},{default:y(I=>[g("div",{title:I.row.space_pivot.created_at},x(t.smartDate(I.row.space_pivot.created_at,!0)),9,QDe)]),_:1},8,["label"]),_(p,{width:"150",label:t.$t("Last Seen")},{default:y(I=>[g("div",{title:I.row.last_activity},x(t.humanDateDiff(I.row.last_activity)),9,eRe)]),_:1},8,["label"]),_(p,{width:"60"},{default:y(I=>[t.hasCourseCreatorAccess()?(v(),D(C,{key:0,trigger:"click"},{dropdown:y(()=>[_(k,null,{default:y(()=>[_(w,{disabled:!parseInt(I.row.progress),onClick:L=>o.restartStudent(I.row)},{default:y(()=>[N(x(t.$t("Restart Progress")),1)]),_:1},8,["disabled","onClick"]),_(w,{onClick:L=>o.removeStudentPrompt(I.row)},{default:y(()=>[N(x(t.$t("Remove")),1)]),_:1},8,["onClick"])]),_:2},1024)]),default:y(()=>[_(l,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu",size:"small",text:""},{default:y(()=>[_(a,null,{default:y(()=>[_(b)]),_:1})]),_:1},8,["aria-label"])]),_:2},1024)):O("",!0)]),_:1})]),_:1},8,["data","empty-text"])),[[T,s.loading]]),_(S,{hide_on_single:!0,onFetch:o.fetchStudents,pagination:s.pagination},null,8,["onFetch","pagination"]),_(P,{modelValue:s.isAddStdOpen,"onUpdate:modelValue":e[6]||(e[6]=I=>s.isAddStdOpen=I),"close-on-click-modal":!1,"append-to-body":!0,size:t.drawerWidth,direction:"rtl"},{header:y(()=>[g("h4",null,x(t.$t("Add Student")),1)]),default:y(()=>[s.isAddStdOpen?(v(),D(M,{key:0,context:"course",target:n.course,onCompleted:o.studentAdded,onMembersAdded:e[5]||(e[5]=I=>o.fetchStudents())},null,8,["target","onCompleted"])):O("",!0)]),_:1},8,["modelValue","size"])])}const nRe=ce(NDe,[["render",tRe]]);let sRe=0;const iRe={name:"BlankAnswer",props:{segments:{type:Array,default:()=>[]},modelValue:{type:Array,default:()=>[]},readonly:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{sentenceId:"fcom_blank_sentence_"+ ++sRe}},computed:{blankCount(){return Math.max(this.segments.length-1,0)},sentenceText(){return this.segments.map((t,e)=>e<this.blankCount?t+" "+this.$t("Blank %s",e+1)+" ":t).join("").replace(/\s+/g," ").replace(/\s+([.,!?;:])/g,"$1").trim()}},methods:{updateBlank(t,e){const n=[...this.modelValue];n[t]=e,this.$emit("update:modelValue",n)}}},oRe={class:"fcom_blank_answer"},rRe=["id"],aRe={class:"fcom_blank_segment"},lRe={key:0,class:"fcom_blank_value"};function cRe(t,e,n,i,s,o){const r=ht;return v(),$("div",oRe,[n.readonly?O("",!0):(v(),$("span",{key:0,id:s.sentenceId,class:"fcom_sr_only"},x(o.sentenceText),9,rRe)),(v(!0),$(J,null,ye(n.segments,(a,l)=>(v(),$(J,{key:l},[g("span",aRe,x(a),1),l<o.blankCount?(v(),$(J,{key:0},[n.readonly?(v(),$("span",lRe,x(n.modelValue[l]||"____"),1)):(v(),D(r,{key:1,class:"fcom_blank_input",size:"small","model-value":n.modelValue[l],"aria-label":t.$t("Blank %s",l+1),"aria-describedby":s.sentenceId,maxlength:200,"onUpdate:modelValue":c=>o.updateBlank(l,c)},null,8,["model-value","aria-label","aria-describedby","onUpdate:modelValue"]))],64)):O("",!0)],64))),128))])}const uRe=ce(iRe,[["render",cRe]]),dRe={name:"FluentDnD",props:{items:{type:Array,required:!0},itemClass:{type:String},itemStyle:{type:String},rowKey:{type:String,default:"id"},group:{type:String,default:""},gap:{type:String,default:""},draggable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},itemLabel:{type:Function,default:null},handle:{type:String,default:""}},emits:["drop","crossDrop","drag-start"],data(){return{draggingIndex:null,startIndex:null,snapshotBeforeDrag:null,handleIndex:null,liveMessage:""}},computed:{keyboardEnabled(){return this.keyboard&&this.draggable}},methods:{isItemDraggable(t){return this.draggable?this.handle?this.handleIndex===t:!0:!1},onItemMouseDown(t,e){var n,i;!this.handle||!this.draggable||(this.handleIndex=(i=(n=t.target)==null?void 0:n.closest)!=null&&i.call(n,this.handle)?e:null)},releaseHandle(){this.handleIndex=null},itemAriaLabel(t,e){return this.itemLabel?this.itemLabel(t,e):this.$t("Sortable item %1$s of %2$s. Use the up and down arrow keys to reorder.",e+1,this.items.length)},onItemKeydown(t,e){if(!this.keyboardEnabled||t.target!==t.currentTarget)return;let n=0;if(t.key==="ArrowUp")n=-1;else if(t.key==="ArrowDown")n=1;else return;const i=e+n;i<0||i>=this.items.length||(t.preventDefault(),this.reorderItems(e,i),this.$emit("drop",{index:i,newItems:this.items}),this.liveMessage="",this.$nextTick(()=>{var o;(o=this.$el.querySelectorAll(":scope > .drag-group > .drag-item")[i])==null||o.focus(),this.liveMessage=this.$t("Moved to position %1$s of %2$s",i+1,this.items.length)}))},dragStart(t,e){t._fluentDndHandled||(t._fluentDndHandled=!0,this.draggingIndex=e,this.startIndex=e,this.snapshotBeforeDrag=[...this.items],this.$emit("drag-start",{index:e,items:this.items}),t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",this.items[e][this.rowKey]),this.group&&t.dataTransfer.setData("source-group",this.group))},dragEnd(){this.handleIndex=null,this.snapshotBeforeDrag&&(this.items.splice(0,this.items.length,...this.snapshotBeforeDrag),this.snapshotBeforeDrag=null),this.draggingIndex=null},dragOver(t,e){if(t.preventDefault(),!this.group&&t.dataTransfer.types.includes("source-group")||this.draggingIndex===null)return;const n=this.items[this.draggingIndex],i=this.items[e];if(n===i)return;const s=t.currentTarget.getBoundingClientRect(),o=s.top+s.height/2,r=t.clientY;(this.draggingIndex<e&&r>o||this.draggingIndex>e&&r<o)&&(this.reorderItems(this.draggingIndex,e),this.draggingIndex=e)},dropEnd(t,e){const n=t.dataTransfer.getData("source-group");if(!(!this.group&&n)){if(this.group&&n&&n!==this.group){t.stopPropagation();const i=t.dataTransfer.getData("text/plain");this.$emit("crossDrop",{itemKey:i,sourceGroup:n,targetGroup:this.group,targetIndex:e});return}this.startIndex===null||this.startIndex===e||(t.stopPropagation(),this.snapshotBeforeDrag=null,this.draggingIndex=null,this.startIndex=null,this.handleIndex=null,this.$emit("drop",{index:e,newItems:this.items}))}},onContainerDragOver(t){t.preventDefault()},onContainerDrop(t){if(!this.group)return;const e=t.dataTransfer.getData("source-group");if(!e||e===this.group)return;const n=t.dataTransfer.getData("text/plain");this.$emit("crossDrop",{itemKey:n,sourceGroup:e,targetGroup:this.group,targetIndex:this.items.length})},reorderItems(t,e){const n=this.items.splice(t,1)[0];this.items.splice(e,0,n)}}},hRe=["onDragstart","onDragover","onDrop","onKeydown","onMousedown","draggable","tabindex","aria-label"],fRe={key:0,class:"fcom_sr_only","aria-live":"polite","aria-atomic":"true"};function pRe(t,e,n,i,s,o){return v(),$("div",{class:"drag-container",onDragover:e[2]||(e[2]=Me((...r)=>o.onContainerDragOver&&o.onContainerDragOver(...r),["prevent"])),onDrop:e[3]||(e[3]=Me((...r)=>o.onContainerDrop&&o.onContainerDrop(...r),["prevent"]))},[_(Lb,{name:"flip-list",tag:"div",class:"drag-group",style:Xe(n.gap?{display:"flex",flexDirection:"column",gap:n.gap}:{})},{default:y(()=>[(v(!0),$(J,null,ye(n.items,(r,a)=>(v(),$("div",{key:r[n.rowKey],onDragstart:l=>o.dragStart(l,a),onDragend:e[0]||(e[0]=(...l)=>o.dragEnd&&o.dragEnd(...l)),onDragover:Me(l=>o.dragOver(l,a),["prevent"]),onDrop:Me(l=>o.dropEnd(l,a),["prevent"]),onKeydown:l=>o.onItemKeydown(l,a),onMousedown:l=>o.onItemMouseDown(l,a),onMouseup:e[1]||(e[1]=(...l)=>o.releaseHandle&&o.releaseHandle(...l)),draggable:o.isItemDraggable(a),tabindex:o.keyboardEnabled?0:null,"aria-label":o.keyboardEnabled?o.itemAriaLabel(r,a):null,class:q(["drag-item",n.itemClass,{dragging:s.draggingIndex===a}]),style:Xe(n.itemStyle)},[le(t.$slots,"item",{data:r,index:a},void 0,!0)],46,hRe))),128))]),_:3},8,["style"]),o.keyboardEnabled?(v(),$("span",fRe,x(s.liveMessage),1)):O("",!0)],32)}const Tr=ce(dRe,[["render",pRe],["__scopeId","data-v-7267c3a1"]]),mRe={name:"OrderingAnswer",components:{FluentDnD:Tr},props:{modelValue:{type:Array,default:()=>[]},readonly:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{items:this.toItems(this.modelValue)}},watch:{modelValue(t){JSON.stringify(t)!==JSON.stringify(this.items.map(e=>e.label))&&(this.items=this.toItems(t))}},methods:{toItems(t){return t.map((e,n)=>({label:e,_key:n}))},itemLabel(t,e){return this.$t("%1$s, position %2$s. Use the up and down arrow keys to reorder.",t.label,e+1)},emitOrder(){this.$emit("update:modelValue",this.items.map(t=>t.label))}}},gRe={key:0,class:"fcom_ordering_answer is_readonly"},vRe={key:1,class:"fcom_ordering_answer"},_Re={class:"fcom_help_text"},yRe={class:"fcom_ordering_item"},bRe={class:"fcom_order_number"};function wRe(t,e,n,i,s,o){const r=B("FluentDnD");return n.readonly?(v(),$("ol",gRe,[(v(!0),$(J,null,ye(n.modelValue,(a,l)=>(v(),$("li",{key:l},x(a),1))),128))])):(v(),$("div",vRe,[g("p",_Re,x(t.$t("Drag the items, or focus one and use the arrow keys, to put them in the right order.")),1),_(r,{items:s.items,"row-key":"_key","item-label":o.itemLabel,onDrop:o.emitOrder},{item:y(({data:a,index:l})=>[g("div",yRe,[e[0]||(e[0]=g("span",{class:"fcom_drag_handle","aria-hidden":"true"},"⋮⋮",-1)),g("span",bRe,x(l+1),1),g("span",null,x(a.label),1)])]),_:1},8,["items","item-label","onDrop"])]))}const kRe=ce(mRe,[["render",wRe]]),CRe={name:"PairsAnswer",props:{options:{type:Array,default:()=>[]},choices:{type:Array,default:()=>[]},modelValue:{type:Array,default:()=>[]},withImages:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["update:modelValue"],methods:{matchLabel(t,e){return this.withImages?this.$t("Label for image %s",e+1):this.$t("Match for %s",t.label)},updateMatch(t,e){const n=[...this.modelValue];n[t]=e,this.$emit("update:modelValue",n)}}},xRe={key:1,class:"fcom_pair_prompt"},SRe={key:2,class:"fcom_pair_value"};function $Re(t,e,n,i,s,o){const r=bo,a=Zt,l=Wt;return v(),$("div",{class:q(["fcom_pairs_answer",{with_images:n.withImages}])},[(v(!0),$(J,null,ye(n.options,(c,u)=>(v(),$("div",{key:u,class:"fcom_pairs_answer_row"},[n.withImages?(v(),D(r,{key:0,class:"fcom_pair_image",src:c.image_url,alt:t.$t("Image %s",u+1),fit:"cover"},null,8,["src","alt"])):(v(),$("span",xRe,x(c.label),1)),n.readonly?(v(),$("span",SRe,x(n.modelValue[u]||"-"),1)):(v(),D(l,{key:3,class:"fcom_pair_select","model-value":n.modelValue[u]||"",placeholder:t.$t("Choose a match"),"aria-label":o.matchLabel(c,u),"onUpdate:modelValue":d=>o.updateMatch(u,d)},{default:y(()=>[(v(!0),$(J,null,ye(n.choices,d=>(v(),D(a,{key:d,label:d,value:d},null,8,["label","value"]))),128))]),_:1},8,["model-value","placeholder","aria-label","onUpdate:modelValue"]))]))),128))],2)}const ARe=ce(CRe,[["render",$Re]]),ERe={name:"TypedAnswer",components:{BlankAnswer:uRe,OrderingAnswer:kRe,PairsAnswer:ARe},props:{question:{type:Object,required:!0},modelValue:{type:Array,default:()=>[]},readonly:{type:Boolean,default:!1}},emits:["update:modelValue"]};function MRe(t,e,n,i,s,o){const r=B("BlankAnswer"),a=B("OrderingAnswer"),l=B("PairsAnswer");return n.question.type==="fill_in_the_blank"?(v(),D(r,{key:0,segments:n.question.blank_segments||[],"model-value":n.modelValue,readonly:n.readonly,"onUpdate:modelValue":e[0]||(e[0]=c=>t.$emit("update:modelValue",c))},null,8,["segments","model-value","readonly"])):n.question.type==="ordering"?(v(),D(a,{key:1,"model-value":n.modelValue,readonly:n.readonly,"onUpdate:modelValue":e[1]||(e[1]=c=>t.$emit("update:modelValue",c))},null,8,["model-value","readonly"])):n.question.type==="matching"||n.question.type==="image_matching"?(v(),D(l,{key:2,options:n.question.options||[],choices:n.question.match_choices||[],"with-images":n.question.type==="image_matching","model-value":n.modelValue,readonly:n.readonly,"onUpdate:modelValue":e[2]||(e[2]=c=>t.$emit("update:modelValue",c))},null,8,["options","choices","with-images","model-value","readonly"])):O("",!0)}const dU=ce(ERe,[["render",MRe]]);function eb(t){const e=String(t||"").split(/\[\[([\s\S]*?)\]\]/),n=[],i=[];let s="";return e.forEach((o,r)=>{if(r%2===0){s+=o;return}const a=[...new Set(o.split("|").map(l=>l.trim()).filter(Boolean))];if(!a.length){s+="[["+o+"]]";return}n.push(s),i.push(a),s=""}),n.push(s),{blanks:i,segments:n}}const hU=["fill_in_the_blank","ordering","matching","image_matching"],nm=["single_choice","multiple_choice"],z3=["matching","image_matching"],gT={choice:["single_choice","multiple_choice","true_false"],text:["written_answer","fill_in_the_blank"],arrange:["ordering","matching","image_matching"]};function fU(t,e,n){return t.type!=="true_false"?e.label:e.label==="True"?n("True"):e.label==="False"?n("False"):e.label}const TRe={name:"ViewQuizResult",props:["result","course"],emits:["close","updateResult"],components:{Check:Z4,TypedAnswer:dU},data(){return{openModal:!0,lesson:this.result.lesson,xprofile:this.result.xprofile,userAnswers:this.result.message,currentStatus:["passed","failed"].includes(this.result.status)?this.result.status:"",statuses:{passed:this.$t("Passed"),failed:this.$t("Failed")}}},watch:{openModal(){this.$emit("close")}},computed:{questions(){var t,e;return((e=(t=this.lesson)==null?void 0:t.meta)==null?void 0:e.quiz_questions)||[]}},methods:{closeModal(){this.openModal=!1,this.$emit("close")},showQuestion(t){return!!this.userAnswers[t.slug]},showQuestionImage(t){return t.image_enabled&&t.image_url},isQuestionCorrect(t){var e;return(e=this.userAnswers[t.slug])==null?void 0:e.is_correct},isOptionSelected(t,e){var i;const n=(i=this.userAnswers[t.slug])==null?void 0:i.user_answer;return Array.isArray(n)?n.includes(e.label):n===e.label},isTypedAnswer(t){return hU.includes(t.type)},optionLabel(t,e){return fU(t,e,this.$t)},isSingleChoice(t){return t.type==="single_choice"||t.type==="true_false"},isWrittenAnswer(t){return t.type==="written_answer"},isExactMatchQuestion(t){return t.grading_mode==="exact_match"},freeTextBadgeClass(t){return this.isExactMatchQuestion(t)?this.isQuestionCorrect(t)?"correct":"incorrect":"correct"},handleOptionChange(){},updateResult(){this.$post("admin/courses/"+this.course.id+"/quiz-results/"+this.result.id,{status:this.currentStatus}).then(t=>{this.$notify.success(t.message),this.closeModal(),this.$emit("updateResult")})}}},PRe={class:"dialog_header"},IRe={class:"dialog_left"},LRe={class:"fcom_view_quiz_result"},ORe={class:"fcom_result_details"},DRe={class:"fcom_questions_wrap"},RRe={key:0,class:"fcom_question_image"},VRe={class:"fcom_question_header"},FRe=["innerHTML"],NRe={class:"fcom_question_body"},BRe={key:0,class:"correct_text"},zRe={key:1,class:"correct_text"},HRe={class:"fcom_written_answer_answer"},URe={class:"fcom_user_answer_text"},jRe={key:0,class:"correct_text"},WRe={key:1,class:"correct_text"},YRe={key:1,class:"fcom_question_options"},qRe={key:2,class:"question_help_text"},GRe={class:"fcom_result_info"},XRe={class:"result_info_item"},KRe={class:"left_side"},ZRe={class:"sub_title"},JRe={class:"right_side"},QRe={class:"result_info_item"},eVe={class:"left_side"},tVe={class:"title"},nVe={class:"sub_title"},sVe={class:"result_info_item"},iVe={class:"left_side"},oVe={class:"title"},rVe={class:"sub_title"},aVe={class:"result_info_item"},lVe={class:"left_side"},cVe={class:"title"},uVe={class:"score"},dVe={class:"right_side"},hVe={class:"title"},fVe={class:"score"},pVe={class:"result_info_item"},mVe={class:"left_side"},gVe={class:"title"},vVe={class:"dialog_footer"};function _Ve(t,e,n,i,s,o){const r=bo,a=B("Check"),l=we,c=B("Close"),u=B("TypedAnswer"),d=qt,h=B("UserRouteLink"),f=B("UserAvatar"),p=Zt,m=Wt,b=ze,w=$s;return v(),D(w,{modelValue:s.openModal,"onUpdate:modelValue":e[1]||(e[1]=k=>s.openModal=k),"close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,"modal-class":"fcom_common_dialog result_dialog",onClose:o.closeModal},{header:y(()=>[g("div",PRe,[g("div",IRe,[g("h4",null,x(t.$t("Quiz Result")),1)])])]),footer:y(()=>[g("div",vVe,[_(b,{class:"fcom_secondary_button",onClick:o.closeModal},{default:y(()=>[N(x(t.$t("Cancel")),1)]),_:1},8,["onClick"]),_(b,{class:"fcom_primary_button",onClick:o.updateResult},{default:y(()=>[N(x(t.$t("Update Result")),1)]),_:1},8,["onClick"])])]),default:y(()=>{var k;return[g("div",LRe,[g("div",ORe,[g("div",DRe,[(v(!0),$(J,null,ye(o.questions,C=>{var A,S;return v(),$(J,{key:C.slug},[o.showQuestion(C)?(v(),$("div",{key:0,class:q(["fcom_question",C.type])},[o.showQuestionImage(C)?(v(),$("div",RRe,[_(r,{src:C.image_url},null,8,["src"])])):O("",!0),g("div",VRe,[g("div",{innerHTML:C.label_rendered,class:"fcom_question_label"},null,8,FRe)]),g("div",NRe,[o.isWrittenAnswer(C)?(v(),$(J,{key:0},[g("div",{class:q(["fcom_is_correct",o.freeTextBadgeClass(C)])},[o.isExactMatchQuestion(C)?(v(),$("p",BRe,[o.isQuestionCorrect(C)?(v(),$(J,{key:0},[_(l,null,{default:y(()=>[_(a)]),_:1}),N(" "+x(t.$t("Correct")),1)],64)):(v(),$(J,{key:1},[_(l,null,{default:y(()=>[_(c)]),_:1}),N(" "+x(t.$t("Incorrect")),1)],64))])):(v(),$("p",zRe,[_(l,null,{default:y(()=>[_(a)]),_:1}),N(" "+x(t.$t("Answered")),1)]))],2),g("div",HRe,[g("div",URe,x((A=s.userAnswers[C.slug])==null?void 0:A.user_answer),1)])],64)):(v(),$(J,{key:1},[g("div",{class:q(["fcom_is_correct",o.isQuestionCorrect(C)?"correct":"incorrect"])},[o.isQuestionCorrect(C)?(v(),$("p",jRe,[_(l,null,{default:y(()=>[_(a)]),_:1}),N(" "+x(t.$t("Correct")),1)])):(v(),$("p",WRe,[_(l,null,{default:y(()=>[_(c)]),_:1}),N(" "+x(t.$t("Incorrect")),1)]))],2),o.isTypedAnswer(C)?(v(),D(u,{key:0,question:C,"model-value":((S=s.userAnswers[C.slug])==null?void 0:S.user_answer)||[],readonly:!0},null,8,["question","model-value"])):(v(),$("div",YRe,[(v(!0),$(J,null,ye(C.options,M=>(v(),$("div",{key:M.label,class:"fcom_question_option"},[_(d,{class:q({single_choice:o.isSingleChoice(C)}),"model-value":o.isOptionSelected(C,M),onChange:P=>o.handleOptionChange(C,M)},{default:y(()=>[N(x(o.optionLabel(C,M)),1)]),_:2},1032,["class","model-value","onChange"])]))),128))]))],64)),C.help_text?(v(),$("div",qRe,x(C.help_text),1)):O("",!0)])],2)):O("",!0)],64)}),128))])]),g("div",GRe,[g("div",XRe,[g("div",KRe,[_(h,{show_badge:!0,xprofile:s.xprofile},null,8,["xprofile"]),g("div",ZRe,x(t.$t("Attempts")+": "+n.result.meta.attempts),1)]),g("div",JRe,[_(f,{xprofile:s.xprofile,with_level:!1},null,8,["xprofile"])])]),g("div",QRe,[g("div",eVe,[g("div",tVe,x(n.result.lesson.title),1),g("div",nVe,x((k=n.course)==null?void 0:k.title),1)])]),g("div",sVe,[g("div",iVe,[g("div",oVe,x(t.$t("Submitted")),1),g("div",rVe,x(t.smartDate(n.result.updated_at,!0)),1)])]),g("div",aVe,[g("div",lVe,[g("div",cVe,x(t.$t("Score")),1),g("div",uVe,x(n.result.score+"%"),1)]),g("div",dVe,[g("div",hVe,x(t.$t("Correct")),1),g("div",fVe,x(n.result.meta.correct_answers+"/"+n.result.meta.total_questions),1)])]),g("div",pVe,[g("div",mVe,[g("div",gVe,x(t.$t("Did the student pass or fail?")),1),_(m,{modelValue:s.currentStatus,"onUpdate:modelValue":e[0]||(e[0]=C=>s.currentStatus=C),placeholder:t.$t("-- Select --")},{default:y(()=>[(v(!0),$(J,null,ye(Object.keys(s.statuses),C=>(v(),D(p,{key:C,label:s.statuses[C],value:C},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])])])])]}),_:1},8,["modelValue","width","onClose"])}const yVe=ce(TRe,[["render",_Ve]]),bVe={name:"QuizResults",props:["course","course_id"],components:{UserRouteLink:ua,Pagination:du,ViewQuizResult:yVe,Search:j1,ExportIcon:uU},data(){return{results:[],search:"",loading:!1,working:!1,exporting:!1,openResult:!1,result:null,pagination:{page:1,per_page:20,total:0},filter_by:"all"}},methods:{isOpenResult(t){this.result=t,this.openResult=!0},closeResult(){this.openResult=!1,this.result=null},getTagType(t){return["passed","failed"].includes(t)?t==="passed"?"success":"danger":"info"},getResultText(t){return["passed","failed"].includes(t)?this.$t(t):this.$t("n/a")},toSearch(){this.pagination.page=1,this.fetchResults()},handleSearch(){this.search&&this.search.length<3||this.toSearch()},fetchResults(){this.loading=!0,this.$get("admin/courses/"+this.course.id+"/quiz-results",{page:this.pagination.page,per_page:this.pagination.per_page,search:this.search,filter_by:this.filter_by}).then(t=>{this.results=t.results.data,this.pagination.total=t.results.total,window.scrollTo(0,0)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},exportResults(){this.exporting=!0,this.$get("admin/courses/"+this.course.id+"/export/quiz-results",{search:this.search,filter_by:this.filter_by}).then(t=>{this.$exportToCsv(t.results,"quiz-results-"+this.course.slug+".csv")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.exporting=!1})}},mounted(){this.has_pro&&this.fetchResults()}},wVe={class:"fcom_course_members"},kVe={class:"fcom_course_member_header"},CVe={key:0,class:"fcom_course_member_actions"},xVe={class:"search_member"},SVe={class:"feed_filters"},$Ve={id:"feed_short_by",class:"fcom_feed_filter_label"},AVe={class:"table_user_card"},EVe={class:"card_avatar"},MVe={class:"card_info"},TVe={class:"card_name"},PVe={class:"meta_line"};function IVe(t,e,n,i,s,o){const r=B("ExportIcon"),a=we,l=ze,c=B("Search"),u=ht,d=Zt,h=Wt,f=B("UserAvatar"),p=B("UserRouteLink"),m=Il,b=qs,w=Pl,k=B("pagination"),C=B("ViewQuizResult"),A=xt("loading");return v(),$("div",wVe,[g("div",kVe,[g("h3",null,x(t.$t("Quiz Results")),1),t.has_pro?(v(),$("div",CVe,[_(l,{class:"fcom_secondary_button",loading:s.exporting,onClick:e[0]||(e[0]=S=>o.exportResults())},{default:y(()=>[_(a,null,{default:y(()=>[_(r)]),_:1}),g("span",null,x(t.$t("Export")),1)]),_:1},8,["loading"])])):O("",!0)]),g("div",xVe,[_(u,{clearable:"",onClear:o.toSearch,onKeydown:ut(o.toSearch,["enter"]),onInput:o.handleSearch,modelValue:s.search,"onUpdate:modelValue":e[1]||(e[1]=S=>s.search=S),placeholder:t.$t("Search by Name or Quiz")},{prefix:y(()=>[_(a,null,{default:y(()=>[_(c)]),_:1})]),_:1},8,["onClear","onKeydown","onInput","modelValue","placeholder"])]),g("div",SVe,[e[4]||(e[4]=g("div",{class:"fcom_feed_divider"},null,-1)),g("span",$Ve,x(t.$t("Filter by:")),1),_(h,{"aria-label":t.$t("Sort members by"),modelValue:s.filter_by,"onUpdate:modelValue":e[2]||(e[2]=S=>s.filter_by=S),class:"fcom_minimal_select","popper-class":"plain_select",placeholder:t.$t("All"),onChange:e[3]||(e[3]=S=>o.fetchResults())},{default:y(()=>[_(d,{value:"all",label:t.$t("All")},null,8,["label"]),_(d,{value:"passed",label:t.$t("Passed")},null,8,["label"]),_(d,{value:"failed",label:t.$t("Failed")},null,8,["label"]),_(d,{value:"n/a",label:t.$t("Not Set")},null,8,["label"])]),_:1},8,["aria-label","modelValue","placeholder"])]),Re((v(),D(w,{data:s.results,style:{width:"100%","border-radius":"8px"},"empty-text":t.$t("No Results Found")},{default:y(()=>[_(m,{prop:"ID",label:t.$t("Name & Quiz"),"min-width":"260"},{default:y(S=>{var M;return[g("div",AVe,[g("div",EVe,[_(f,{xprofile:S.row.xprofile},null,8,["xprofile"])]),g("div",MVe,[g("div",TVe,[_(p,{show_badge:!0,xprofile:S.row.xprofile},null,8,["xprofile"])]),g("div",PVe,x(t.getExcerpt((M=S.row.lesson)==null?void 0:M.title,160)),1)])])]}),_:1},8,["label"]),_(m,{width:"260",label:t.$t("Submitted Date")},{default:y(S=>[N(x(t.smartDate(S.row.updated_at,!0)),1)]),_:1},8,["label"]),_(m,{width:"120",label:t.$t("Score")},{default:y(S=>[N(x(S.row.score)+"% ",1)]),_:1},8,["label"]),_(m,{width:"120",label:t.$t("Result")},{default:y(S=>[_(b,{type:o.getTagType(S.row.status),size:"small"},{default:y(()=>[N(x(o.getResultText(S.row.status)),1)]),_:2},1032,["type"])]),_:1},8,["label"]),_(m,{width:"160",label:t.$t("Actions")},{default:y(S=>[_(l,{class:"fcom_secondary_button",onClick:M=>o.isOpenResult(S.row)},{default:y(()=>[N(x(t.$t("View")),1)]),_:1},8,["onClick"])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])),[[A,s.loading]]),_(k,{hide_on_single:!0,onFetch:o.fetchResults,pagination:s.pagination},null,8,["onFetch","pagination"]),s.openResult?(v(),D(C,{key:0,open:s.openResult,result:s.result,course:n.course,onClose:o.closeResult,onUpdateResult:o.fetchResults},null,8,["open","result","course","onClose","onUpdateResult"])):O("",!0)])}const LVe=ce(bVe,[["render",IVe]]),OVe={name:"ChatIcon"},DVe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function RVe(t,e,n,i,s,o){return v(),$("svg",DVe,[...e[0]||(e[0]=[g("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),g("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)])])}const pU=ce(OVe,[["render",RVe]]),VVe={name:"HeartIcon",props:{filled:{default:!1}}},FVe={key:0,viewBox:"0 0 24 24","aria-hidden":"true"},NVe={key:1,viewBox:"0 0 24 24","aria-hidden":"true"};function BVe(t,e,n,i,s,o){return n.filled?(v(),$("svg",FVe,[...e[0]||(e[0]=[g("g",null,[g("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)])])):(v(),$("svg",NVe,[...e[1]||(e[1]=[g("g",null,[g("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)])]))}const U2=ce(VVe,[["render",BVe]]),zVe={name:"ImageIcon"},HVe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function UVe(t,e,n,i,s,o){return v(),$("svg",HVe,[...e[0]||(e[0]=[g("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"},null,-1),g("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"},null,-1),g("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"},null,-1)])])}const mU=ce(zVe,[["render",UVe]]),jVe={name:"PollIcon"},WVe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function YVe(t,e,n,i,s,o){return v(),$("svg",WVe,[...e[0]||(e[0]=[g("path",{d:"M1.66663 18.334H18.3333",stroke:"currentColor","stroke-width":"1.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("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"},null,-1),g("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"},null,-1),g("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"},null,-1)])])}const qVe=ce(jVe,[["render",YVe]]),GVe={name:"SurveyEditForm",props:{form:{type:Object,required:!0},is_editing:{type:Boolean,default:!1}},emits:["cancel"],data(){return{}},methods:{addOption(){this.form.options.push({label:"",slug:""})},removeOption(t){this.form.options.splice(t,1)}}},XVe={class:"fcom_compose_app_form"},KVe={class:"fcom_app_header"},ZVe={class:"fcom_app_options"},JVe={class:"fcom_app_pref"},QVe={class:"fcom_app_footer"},eFe={style:{"font-weight":"500",color:"var(--el-text-color-regular)","font-size":"14px"}};function tFe(t,e,n,i,s,o){const r=ze,a=ht,l=B("Plus"),c=we,u=qt,d=Wd;return v(),$("div",XVe,[g("div",KVe,[g("h5",null,x(t.$t("Poll Options")),1),g("div",null,[_(r,{onClick:e[0]||(e[0]=h=>t.$emit("cancel")),size:"small",text:""},{default:y(()=>[N(x(t.$t("cancel")),1)]),_:1})])]),g("div",ZVe,[(v(!0),$(J,null,ye(n.form.options,(h,f)=>(v(),$("div",{class:"fcom_app_option",key:"option_"+f},[_(a,{modelValue:h.label,"onUpdate:modelValue":p=>h.label=p,type:"text",placeholder:t.$t("Your option text")},hs({_:2},[!h.slug&&f!==0?{name:"suffix",fn:y(()=>[_(r,{onClick:p=>o.removeOption(f),text:"",size:"small"},{default:y(()=>[...e[3]||(e[3]=[N("x",-1)])]),_:1},8,["onClick"])]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","placeholder"])]))),128)),g("div",JVe,[_(r,{onClick:o.addOption,text:"",size:"small"},{default:y(()=>[_(c,null,{default:y(()=>[_(l)]),_:1}),g("span",null,x(t.$t("Add More")),1)]),_:1},8,["onClick"])])]),g("div",QVe,[g("h5",null,x(t.$t("Poll Settings")),1),n.is_editing?O("",!0):(v(),D(u,{key:0,modelValue:n.form.type,"onUpdate:modelValue":e[1]||(e[1]=h=>n.form.type=h),"true-value":"multi_choice","false-value":"single_choice",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Users can choose multiple options")),1)]),_:1},8,["modelValue"])),e[4]||(e[4]=g("br",null,null,-1)),g("label",eFe,x(t.$t("End Date:")),1),g("div",null,[_(d,{style:{"min-width":"50%"},placeholder:t.$t("Leave blank for not end"),clearable:!0,type:"datetime",modelValue:n.form.end_date,"onUpdate:modelValue":e[2]||(e[2]=h=>n.form.end_date=h),"value-format":"YYYY-MM-DD HH:mm:ss"},null,8,["placeholder","modelValue"])])])])}const nFe=ce(GVe,[["render",tFe]]),sFe={name:"GiphyIcon"},iFe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function oFe(t,e,n,i,s,o){return v(),$("svg",iFe,[...e[0]||(e[0]=[xr('<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)])])}const rFe=ce(sFe,[["render",oFe]]);var aFe=Na,lFe=function(){return aFe.Date.now()},cFe=lFe,uFe=/\s/;function dFe(t){for(var e=t.length;e--&&uFe.test(t.charAt(e)););return e}var hFe=dFe,fFe=hFe,pFe=/^\s+/;function mFe(t){return t&&t.slice(0,fFe(t)+1).replace(pFe,"")}var gFe=mFe,vFe=ev,_Fe=tv,yFe="[object Symbol]";function bFe(t){return typeof t=="symbol"||_Fe(t)&&vFe(t)==yFe}var j2=bFe,wFe=gFe,vT=nv,kFe=j2,_T=0/0,CFe=/^[-+]0x[0-9a-f]+$/i,xFe=/^0b[01]+$/i,SFe=/^0o[0-7]+$/i,$Fe=parseInt;function AFe(t){if(typeof t=="number")return t;if(kFe(t))return _T;if(vT(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=vT(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=wFe(t);var n=xFe.test(t);return n||SFe.test(t)?$Fe(t.slice(2),n?2:8):CFe.test(t)?_T:+t}var EFe=AFe,MFe=nv,H3=cFe,yT=EFe,TFe="Expected a function",PFe=Math.max,IFe=Math.min;function LFe(t,e,n){var i,s,o,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(TFe);e=yT(e)||0,MFe(n)&&(u=!!n.leading,d="maxWait"in n,o=d?PFe(yT(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(M){var P=i,T=s;return i=s=void 0,c=M,r=t.apply(T,P),r}function p(M){return c=M,a=setTimeout(w,e),u?f(M):r}function m(M){var P=M-l,T=M-c,I=e-P;return d?IFe(I,o-T):I}function b(M){var P=M-l,T=M-c;return l===void 0||P>=e||P<0||d&&T>=o}function w(){var M=H3();if(b(M))return k(M);a=setTimeout(w,m(M))}function k(M){return a=void 0,h&&i?f(M):(i=s=void 0,r)}function C(){a!==void 0&&clearTimeout(a),c=0,i=l=s=a=void 0}function A(){return a===void 0?r:k(H3())}function S(){var M=H3(),P=b(M);if(i=arguments,s=this,l=M,P){if(a===void 0)return p(l);if(d)return clearTimeout(a),a=setTimeout(w,e),f(l)}return a===void 0&&(a=setTimeout(w,e)),r}return S.cancel=C,S.flush=A,S}var OFe=LFe;const DFe=_i(OFe),RFe={name:"Giphy",components:{GiphyIcon:rFe},data(){return{gifs:[],searchQuery:"",offset:0,limit:20,loading:!1}},methods:{loadGifs(){var e,n;if(this.offset===0&&((n=(e=this.$gloablStorage)==null?void 0:e.gifs)==null?void 0:n.length)>0&&!this.searchQuery){this.gifs=this.$gloablStorage.gifs;return}this.loading=!0;const t={limit:this.limit,offset:this.offset,q:this.searchQuery.trim()};this.$get("giphy",t).then(i=>{this.gifs=this.offset===0?i.gifs:this.gifs.concat(i.gifs),!this.searchQuery&&this.offset===0&&(this.$gloablStorage.gifs=this.gifs),this.offset+=this.limit}).catch(i=>{this.$handleError(i)}).finally(()=>{this.loading=!1})},handleGiphyClick(){this.offset=0,this.searchQuery="",this.loadGifs()},handleSearch:DFe(function(){this.offset=0,this.loadGifs()},300),handleScroll(t){t.target.scrollHeight-t.target.scrollTop===t.target.clientHeight&&!this.loading&&this.loadGifs()},selectGiphy(t){this.$emit("selected-giphy",t),this.$refs.popover.hide()}}},VFe={class:"fcom_giphy_composer"},FFe={class:"search-container"},NFe=["onLoad","src","alt","onClick"],BFe={key:0,class:"img_loading"},zFe={key:1,class:"no_result"};function HFe(t,e,n,i,s,o){const r=ht,a=jd,l=Ud,c=B("GiphyIcon"),u=we,d=ze,h=Yo,f=xt("loading");return v(),$("div",VFe,[_(h,{placement:"bottom-end",width:300,persistent:!1,trigger:"click",teleported:!1,"popper-class":"fcom_giphy_popover fcom_menu_below_nav",ref:"popover"},{reference:y(()=>[_(d,{"aria-label":t.$t("Pick GIF"),text:"",onClick:o.handleGiphyClick},{default:y(()=>[_(u,{class:q(["fcom_apps_icon"])},{default:y(()=>[_(c)]),_:1})]),_:1},8,["aria-label","onClick"])]),default:y(()=>[Re((v(),$("div",FFe,[_(r,{modelValue:s.searchQuery,"onUpdate:modelValue":e[0]||(e[0]=p=>s.searchQuery=p),placeholder:t.$t("Search Gifs"),onInput:o.handleSearch},null,8,["modelValue","placeholder","onInput"]),g("div",{class:"gif_container",onScroll:e[1]||(e[1]=(...p)=>o.handleScroll&&o.handleScroll(...p))},[s.gifs.length>0?(v(),D(l,{key:0,gutter:5},{default:y(()=>[(v(!0),$(J,null,ye(s.gifs,p=>(v(),D(a,{span:12,key:p.id,class:"gif_item"},{default:y(()=>[g("img",{alt:"",onLoad:m=>p.loaded=!0,src:p.images.preview_gif.url,onClick:m=>o.selectGiphy(p)},null,40,NFe),p.loaded?O("",!0):(v(),$("p",BFe))]),_:2},1024))),128))]),_:1})):(v(),$("p",zFe,x(t.$t("No results")),1))],32),e[2]||(e[2]=g("div",{class:"fcom_giphy_powered_by"},[g("span",{class:"powered_by"},"POWERED BY "),g("span",null,"GIPHY")],-1))])),[[f,s.loading]])]),_:1},512)])}const UFe=ce(RFe,[["render",HFe]]),jFe={name:"VideoIcon"},WFe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function YFe(t,e,n,i,s,o){return v(),$("svg",WFe,[...e[0]||(e[0]=[g("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),g("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)])])}const qFe=ce(jFe,[["render",YFe]]),GFe={name:"FluentPlayerPreview",emits:["load-failed"],props:{media:{type:Object,required:!0}},data(){return{html:"",loading:!1,playerInstanceKey:"",fallbackGuardCleanups:[],guardGeneration:0}},watch:{"media.url"(){this.loadFluentPlayerContent()}},async mounted(){await this.loadFluentPlayerContent()},beforeUnmount(){this.clearFallbackGuard()},methods:{getFallbackTiming(t,e){var i,s;const n=Number((s=(i=this.appVars.features.fluent_player)==null?void 0:i.fallback)==null?void 0:s[t]);return!Number.isFinite(n)||n<500?e:n},getPlayerInstanceKey(){if(!this.playerInstanceKey){const t=Number.parseInt(this._uid,10);this.playerInstanceKey=Number.isSafeInteger(t)&&t>0?`i${t}`:`i${Math.random().toString(36).slice(2,8)}`}return this.playerInstanceKey},getStableMediaId(){var i,s,o,r,a,l,c,u,d,h,f,p;const t=Number.parseInt((i=this.media)==null?void 0:i.media_id,10);if(Number.isSafeInteger(t)&&t>0)return t;const e=[(s=this.media)==null?void 0:s.media_key,(o=this.media)==null?void 0:o.feed_id,(r=this.media)==null?void 0:r.share_url,(l=(a=this.media)==null?void 0:a.settings)==null?void 0:l.src,(c=this.media)==null?void 0:c.url,(u=this.media)==null?void 0:u.html,(d=this.media)==null?void 0:d.title,(h=this.media)==null?void 0:h.player,(f=this.media)==null?void 0:f.type,(p=this.media)==null?void 0:p.provider].filter(Boolean).join("|");if(!e)return 1;let n=5381;for(let m=0;m<e.length;m++)n=(n<<5)+n+e.charCodeAt(m)>>>0;return n||1},async loadFluentPlayerContent(){var e,n,i,s,o,r;this.clearFallbackGuard();const t=++this.guardGeneration;this.loading=!0;try{if(!this.appVars.features.has_fluent_player||this.appVars.features.enable_fluent_player!=="yes"){this.$emit("load-failed");return}const a=this.getStableMediaId(),l=await this.withTimeout(this.$get("fluent-player/video-content/"+a,{media_id:a,player_instance_key:this.getPlayerInstanceKey(),share_url:((e=this.media)==null?void 0:e.share_url)||"",url:((n=this.media)==null?void 0:n.url)||"",title:((i=this.media)==null?void 0:i.title)||"",image:((s=this.media)==null?void 0:s.image)||"",provider:((o=this.media)==null?void 0:o.provider)||"",type:((r=this.media)==null?void 0:r.type)||""}),this.getFallbackTiming("content_timeout_ms",1e4));if(t!==this.guardGeneration)return;l.html?(this.html=l.html,this.$nextTick(()=>{if(t!==this.guardGeneration)return;const c=this.$el&&this.$el.querySelector(".fluent-player");if(!c){this.fallBack("player markup missing");return}this.startFallbackGuard(c,l.media)})):this.$emit("load-failed")}catch(a){if(t!==this.guardGeneration)return;console.warn("Failed to load fluent-player assets:",a),this.$emit("load-failed")}finally{t===this.guardGeneration&&(this.loading=!1)}},withTimeout(t,e){return Promise.race([t,new Promise((n,i)=>{const s=setTimeout(()=>i(new Error("fluent-player content request timed out")),e);this.fallbackGuardCleanups.push(()=>clearTimeout(s))})])},startFallbackGuard(t,e){const n=()=>{document.dispatchEvent(new CustomEvent("InitSingleFluentPlayer",{detail:{container:t,playerData:{media:e}}}))};this.waitForPlayerScript(this.getFallbackTiming("script_timeout_ms",12e3),i=>{if(!i){this.fallBack("player script never loaded");return}n(),this.verifyPlayerInit(t)})},waitForPlayerScript(t,e){const n=()=>typeof window.FluentPlayer=="function";if(n()){e(!0);return}const i=document.querySelector('script[src*="fluent-player.js"]');let s=!1;const o=()=>{s=!0};i&&i.addEventListener("error",o);const r=()=>!i||!window.performance||!performance.getEntriesByType?!1:performance.getEntriesByType("resource").some(h=>h.name===i.src&&h.responseEnd>0);let a=0,l=0;const c=this.getFallbackTiming("script_grace_ms",2e3),u=setInterval(()=>{if(a+=250,n()){d(),e(!0);return}i&&(s||r())&&(l+=250),(l>=c||a>=t)&&(d(),e(!1))},250),d=()=>{clearInterval(u),i&&i.removeEventListener("error",o)};this.fallbackGuardCleanups.push(d)},verifyPlayerInit(t){const e=()=>{const s=t.querySelector("media-player");return!!(s&&s.hasAttribute("data-media-player"))};if(e()){this.enhanceAudioSpeedLabel(t),this.watchCanPlay(t);return}let n=0;const i=setInterval(()=>{n+=250,e()?(clearInterval(i),this.enhanceAudioSpeedLabel(t),this.watchCanPlay(t)):n>=this.getFallbackTiming("init_timeout_ms",3e3)&&(clearInterval(i),this.fallBack("player did not initialize"))},250);this.fallbackGuardCleanups.push(()=>clearInterval(i))},enhanceAudioSpeedLabel(t){try{const e=t.querySelector("media-player");if(!(e&&(e.getAttribute("view-type")==="audio"||t.querySelector(".fp-audio-layout"))))return;const i=t.querySelector(".fp-speed-menu media-menu-button");if(!i)return;const s=i.querySelector('media-icon[type="odometer"]');s&&(s.style.display="none");let o=i.querySelector(".fcom_speed_label");o||(o=document.createElement("span"),o.className="fcom_speed_label",i.appendChild(o));const r=()=>{const a=Number(e.playbackRate)||1;o.textContent=(Number.isInteger(a)?a:a.toFixed(2).replace(/0+$/,"").replace(/\.$/,""))+"x"};r(),e.addEventListener("rate-change",r),this.fallbackGuardCleanups.push(()=>e.removeEventListener("rate-change",r))}catch{}},watchCanPlay(t){const e=t.querySelector("media-player");if(!e){this.fallBack("media-player element missing");return}if(e.hasAttribute("data-can-play"))return;let n=0,i=!1;const s=this.getFallbackTiming("stall_timeout_ms",12e3),o=1e3,r=()=>{n=0},a=["load-start","source-change","provider-change","loaded-metadata","loaded-data","progress","waiting","play"];a.forEach(w=>e.addEventListener(w,r));let l=null;const c=()=>{const w=e.querySelector("iframe");w&&w!==l&&(l=w,l.addEventListener("load",r),r())};c();let u=null;const d=()=>{u&&(clearInterval(u),u=null)},h=()=>{u||(u=setInterval(b,o))},f="IntersectionObserver"in window?new IntersectionObserver(w=>{const k=w[w.length-1];i=!!(k&&k.isIntersecting),i?(n=0,h()):d()}):null,p=()=>m();e.addEventListener("can-play",p);const m=()=>{d(),e.removeEventListener("can-play",p),a.forEach(w=>e.removeEventListener(w,r)),l&&l.removeEventListener("load",r),f&&f.disconnect()},b=()=>{if(!document.body.contains(e)||e.hasAttribute("data-can-play")){m();return}c(),!(!i||!e.hasAttribute("data-can-load"))&&(n+=o,n>=s&&(m(),this.fallBack("player stalled before becoming playable")))};f?f.observe(e):(i=!0,h()),this.fallbackGuardCleanups.push(m)},fallBack(t){this.clearFallbackGuard(),console.warn("FluentPlayer: switching to standard media render ("+t+")"),this.html="",this.$emit("load-failed")},clearFallbackGuard(){const t=this.fallbackGuardCleanups;this.fallbackGuardCleanups=[],t.forEach(e=>{try{e()}catch{}})}}},XFe={class:"fluent-player-preview"},KFe={key:0,class:"player-container"},ZFe=["innerHTML"];function JFe(t,e,n,i,s,o){const r=Vt;return v(),$("div",XFe,[s.html?(v(),$("div",KFe,[g("div",{innerHTML:s.html},null,8,ZFe)])):O("",!0),s.loading?(v(),D(r,{key:1,animated:"",rows:5})):O("",!0)])}const gU=ce(GFe,[["render",JFe],["__scopeId","data-v-a381802f"]]),QFe={name:"TuneIcon"},eNe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",fill:"none","aria-hidden":"true",focusable:"false"};function tNe(t,e,n,i,s,o){return v(),$("svg",eNe,[...e[0]||(e[0]=[g("path",{d:"M6 4v6M6 14v6M12 4v3M12 11v9M18 4v9M18 17v3",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round"},null,-1),g("path",{d:"M4 12h4M10 9h4M16 15h4",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round"},null,-1)])])}const nNe=ce(QFe,[["render",tNe]]),sNe={name:"AudioList",components:{FluentPlayerPreview:gU,TuneIcon:nNe,Close:Ho},emits:["remove","edit"],props:{feed:{type:Object,default:null},audios:{type:Array,default:()=>[]},editable:{type:Boolean,default:!1}},data(){return{failedItems:{}}},methods:{onLoadFailed(t){this.failedItems={...this.failedItems,[t]:!0}},audioUrl(t){var e;return((e=t.settings)==null?void 0:e.src)||t.url||""},audioType(t){const n=this.audioUrl(t).split("?")[0].split("#")[0].split(".").pop().toLowerCase();return{mp3:"audio/mpeg",wav:"audio/wav",m4a:"audio/mp4",aac:"audio/aac",ogg:"audio/ogg",oga:"audio/ogg",flac:"audio/flac",opus:"audio/opus",weba:"audio/webm"}[n]||"audio/mpeg"},audioKey(t,e){var s,o;const n=((s=t.settings)==null?void 0:s.posterSrc)||t.image||"",i=((o=t.settings)==null?void 0:o.title)||t.title||"";return(t.media_id||e)+"|"+n+"|"+i},playerMediaFor(t){var n,i;const e={...t,feed_id:((n=this.feed)==null?void 0:n.id)||t.feed_id||"",share_url:((i=this.feed)==null?void 0:i.permalink)||t.share_url||""};return this.editable&&(e.controls={...t.controls||{},settings:!1}),e}}},iNe={class:"fcom_audio_list"},oNe={key:1,class:"fcom_audio_native_wrap"},rNe={class:"fcom_audio_native",controls:"",preload:"metadata"},aNe=["src","type"],lNe=["aria-label","onClick"],cNe=["aria-label","onClick"];function uNe(t,e,n,i,s,o){const r=B("fluent-player-preview"),a=B("tune-icon"),l=B("Close"),c=we;return v(),$("div",iNe,[(v(!0),$(J,null,ye(n.audios,(u,d)=>(v(),$("div",{key:o.audioKey(u,d),class:"fcom_audio_player_wrap"},[s.failedItems[u.media_id||d]?(v(),$("div",oNe,[g("audio",rNe,[g("source",{src:o.audioUrl(u),type:o.audioType(u)},null,8,aNe)])])):(v(),D(r,{key:0,media:o.playerMediaFor(u),onLoadFailed:h=>o.onLoadFailed(u.media_id||d)},null,8,["media","onLoadFailed"])),n.editable?(v(),$(J,{key:2},[g("button",{type:"button",class:"fcom_audio_ctl fcom_audio_edit_btn","aria-label":t.$t("Edit audio"),onClick:h=>t.$emit("edit",d)},[_(a)],8,lNe),g("button",{type:"button",class:"fcom_audio_ctl fcom_audio_remove_btn","aria-label":t.$t("Remove audio"),onClick:h=>t.$emit("remove",d)},[_(c,null,{default:y(()=>[_(l)]),_:1})],8,cNe)],64)):O("",!0)]))),128))])}const vU=ce(sNe,[["render",uNe]]),dNe={name:"MediaPreview",components:{Postcard:Ole,FluentPlayerPreview:gU,AudioList:vU},props:["feed","media_item","is_single"],data(){return{is_error:!1,isPlaying:!1,videoFailed:!1,fluentPlayerFailed:!1}},watch:{"media.url"(){this.fluentPlayerFailed=!1,this.videoFailed=!1}},computed:{media(){var t;return this.feed?(t=this.feed.meta)==null?void 0:t.media_preview:this.media_item},audioMedias(){var n,i,s,o,r;const t=(i=(n=this.feed)==null?void 0:n.meta)==null?void 0:i.audio_medias;if(Array.isArray(t)&&t.length)return t;const e=(o=(s=this.feed)==null?void 0:s.meta)==null?void 0:o.media_preview;return e&&(((r=e.settings)==null?void 0:r.viewType)==="audio"||e.content_type==="audio")?[e]:[]},playerMedia(){var t,e,n,i;return{...this.media,feed_id:((t=this.feed)==null?void 0:t.id)||((e=this.media)==null?void 0:e.feed_id)||"",share_url:((n=this.feed)==null?void 0:n.permalink)||((i=this.media)==null?void 0:i.share_url)||""}},mediaSrcUrl(){var t,e,n;return((e=(t=this.media)==null?void 0:t.settings)==null?void 0:e.src)||((n=this.media)==null?void 0:n.url)||""},mediaWrapperType(){return this.media.type==="oembed"&&!this.isVideoMedia?"meta_data":this.media.type},isVideoMedia(){return this.isYouTubePlaylistUrl(this.mediaSrcUrl)&&!this.media.html?!1:["oembed","iframe_html","video","fluent_player"].includes(this.media.type)},hasFluentPlayer(){var t;return this.appVars.features.has_fluent_player&&((t=this.appVars.features.fluent_player)==null?void 0:t.enable)},playEmbeddedVideos(){var t;return(t=this.appVars.features.fluent_player)==null?void 0:t.play_embedded_videos}},methods:{toAbsoluteUrl(t){return t?/^[a-z][\w+.-]*:/i.test(t)?t:`https://${t}`:""},getDomainName(t){const e=this.toAbsoluteUrl(t);if(!e)return"";try{return new URL(e).hostname.replace(/^www\./i,"")}catch{return""}},isYouTubePlaylistUrl(t){return t?/^(https?:\/\/)?([\w-]+\.)?youtube\.com\/playlist\?/i.test(t)&&/[?&]list=/i.test(t):!1},isYouTubePlaylistEmbed(){var e;const t=(((e=this.media)==null?void 0:e.html)||"").replace(/&amp;/gi,"&");return/youtube(-nocookie)?\.com\/embed\/[^"'\s]*[?&]list=/i.test(t)},isSupportedByFluentPlayer(){var n,i;const t=((i=(n=this.media)==null?void 0:n.settings)==null?void 0:i.src)||this.media.url;return!t||this.isYouTubePlaylistUrl(t)||this.isYouTubePlaylistEmbed()||!this.playEmbeddedVideos&&this.media.provider!=="upload"?!1:[{name:"youtube",regex:/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\/.+$/},{name:"vimeo",regex:/^(https?:\/\/)?(www\.)?vimeo\.com\/\d+(\/[a-f0-9]+)?([?#].*)?$/},{name:"file",regex:/\.(mp4|m3u8|mpd|webm|mov|qt|mp3|wav|m4a|aac|ogg|oga|flac|opus|weba)(\?.*)?$/i}].some(s=>s.regex.test(t))},getAspectRatio(t,e){if(t&&e){let n=t/e;return n<1?16/9:n}return 16/9},handleImageError(){this.is_error=!0},getVideoType(t){const e={mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",ogv:"video/ogg",mov:"video/quicktime",qt:"video/quicktime"},n=t.split(".").pop().toLowerCase();return e[n]||"video/mp4"},isAudioUrl(t){return t?/\.(mp3|wav|m4a|aac|ogg|oga|flac|opus|weba)(\?.*)?$/i.test(t):!1},getAudioType(t){const e={mp3:"audio/mpeg",wav:"audio/wav",m4a:"audio/mp4",aac:"audio/aac",ogg:"audio/ogg",oga:"audio/ogg",flac:"audio/flac",opus:"audio/opus",weba:"audio/webm"},n=t.split("?")[0].split("#")[0].split(".").pop().toLowerCase();return e[n]||"audio/mpeg"},playVideo(){this.$refs.nativeVideo&&this.$refs.nativeVideo.play()},onVideoPause(){this.$refs.nativeVideo&&this.$refs.nativeVideo.currentTime>0&&(this.isPlaying=!0)}}},hNe={key:0,class:"feed_media feed_media_audio_list"},fNe={key:0},pNe={key:1},mNe=["innerHTML"],gNe={key:2,class:"native_audio_wrapper"},vNe=["preload"],_Ne=["src","type"],yNe=["controls","preload","poster"],bNe=["src","type"],wNe={key:4,class:"native_video_wrapper"},kNe={key:1,class:"fcom_media_load_error"},CNe=["href"],xNe={key:0,class:"feed_media_image"},SNe={key:1,class:"feed_media_content"},$Ne={class:"media_domain"},ANe={class:"feed_media_title"},ENe={key:0,class:"feed_media_description"},MNe={class:"feed_meta_desc"};function TNe(t,e,n,i,s,o){const r=B("audio-list"),a=B("fluent-player-preview"),l=bo,c=Vt;return o.audioMedias.length?(v(),$("div",hNe,[_(r,{feed:n.feed,audios:o.audioMedias},null,8,["feed","audios"])])):(v(),$("div",{key:1,class:q(["feed_media","feed_media_"+o.mediaWrapperType])},[o.isVideoMedia?(v(),$(J,{key:0},[o.hasFluentPlayer&&o.isSupportedByFluentPlayer()&&!s.fluentPlayerFailed?(v(),$("div",fNe,[_(a,{media:o.playerMedia,onLoadFailed:e[0]||(e[0]=u=>s.fluentPlayerFailed=!0)},null,8,["media"])])):o.media.html?(v(),$("div",pNe,[g("div",{class:"feed_media_ext_video",innerHTML:o.media.html},null,8,mNe)])):o.media.url&&o.isAudioUrl(o.media.url)?(v(),$("div",gNe,[g("audio",{class:"native_audio_player",controls:"",preload:n.is_single?"metadata":"none"},[g("source",{src:o.media.url,type:o.getAudioType(o.media.url)},null,8,_Ne)],8,vNe)])):o.media.url&&!s.videoFailed?(v(),$("div",{key:3,class:q(["native_video_wrapper",{video_playing:s.isPlaying}])},[g("video",{ref:"nativeVideo",class:"native_video_player",controls:s.isPlaying,preload:n.is_single?"metadata":"none",poster:o.media.thumbnail,onPlay:e[2]||(e[2]=u=>s.isPlaying=!0),onPause:e[3]||(e[3]=(...u)=>o.onVideoPause&&o.onVideoPause(...u)),onEnded:e[4]||(e[4]=u=>s.isPlaying=!1)},[g("source",{src:o.media.url,type:o.getVideoType(o.media.url),onError:e[1]||(e[1]=u=>s.videoFailed=!0)},null,40,bNe)],40,yNe),s.isPlaying?O("",!0):(v(),$("div",{key:0,class:"native_video_overlay",onClick:e[5]||(e[5]=(...u)=>o.playVideo&&o.playVideo(...u))},[...e[7]||(e[7]=[g("div",{class:"native_play_button"},[g("svg",{viewBox:"0 0 24 24",fill:"currentColor"},[g("path",{d:"M8 5v14l11-7z"})])],-1)])]))],2)):o.media.url?(v(),$("div",wNe,[o.media.thumbnail?(v(),D(l,{key:0,src:o.media.thumbnail,alt:"",style:{width:"100%"}},null,8,["src"])):(v(),$("p",kNe,x(t.$t("This video could not be played.")),1))])):O("",!0)],64)):o.media.type=="image"||o.media.is_uploaded?(v(),$("div",{key:1,class:q(["feed_media_provider_"+o.media.provider,"feed_media_image feed_custom_uploaded"])},[o.media.image&&!s.is_error?(v(),D(l,{key:0,alt:"",style:Xe({width:"100%",aspectRatio:o.getAspectRatio(o.media.width,o.media.height)}),src:o.media.image,lazy:!0,previewSrcList:[o.media.image],loading:"lazy",onError:o.handleImageError,"zoom-rate":1.2,"max-scale":7,"hide-on-click-modal":!0,"preview-teleported":!0,"min-scale":.2,"initial-index":1,class:q("fcom_media_provider_"+o.media.provider),fit:"scale-down"},{placeholder:y(()=>[_(c,{animated:!0})]),_:1},8,["style","src","previewSrcList","onError","class"])):O("",!0)],2)):(v(),$("a",{key:2,href:o.toAbsoluteUrl(o.media.url),target:"_blank",rel:"noopener",class:"feed_media_link"},[o.media.image&&!s.is_error?(v(),$("div",xNe,[_(l,{onError:e[6]||(e[6]=u=>o.handleImageError()),style:{width:"100%"},src:o.media.image},{error:y(()=>[...e[8]||(e[8]=[g("span",null,null,-1)])]),_:1},8,["src"])])):O("",!0),o.media.title||o.media.url?(v(),$("div",SNe,[g("div",$Ne,x(o.getDomainName(o.media.url)),1),g("div",ANe,x(t.getExcerpt(o.media.title||o.media.url,88)),1),o.media.description?(v(),$("div",ENe,[g("div",MNe,x(t.getExcerpt(o.media.description,160)),1)])):O("",!0)])):O("",!0)],8,CNe))],2))}const Ep=ce(dNe,[["render",TNe],["__scopeId","data-v-de1ae8ac"]]),bT={video:{extensions:[".mp4",".webm",".mov",".qt"],pattern:/\.(mp4|webm|mov|qt)$/i},audio:{extensions:[".mp3",".wav",".m4a",".aac",".ogg",".oga",".flac"],pattern:/\.(mp3|wav|m4a|aac|ogg|oga|flac)$/i}},wT=[{name:"youtube",regex:/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\/.+$/},{name:"vimeo",regex:/^(https?:\/\/)?(www\.)?vimeo\.com\/\d+(\/[a-f0-9]+)?([?#].*)?$/},{name:"file",regex:/\.(mp4|m3u8|mpd|webm|mov|qt|mp3|wav|m4a|aac|ogg|oga|flac|opus|weba)(\?.*)?$/i}],PNe={name:"FluentPlayerUploader",components:{UploadFilled:n8},emits:["video-added","completed","uploading"],props:{className:{type:String,default:"video-uploader"},type:{type:String,default:"url"},media_kind:{type:String,default:"video"}},data(){return{videoUrl:"",processing:!1}},computed:{uploadKind(){return this.media_kind==="audio"?"audio":"video"},acceptTypes(){return bT[this.uploadKind].extensions.join(",")},uploadButtonLabel(){return this.uploadKind==="audio"?this.$t("Upload Audio"):this.$t("Upload Video")},kindErrorMessage(){return this.uploadKind==="audio"?this.$t("The file must be a valid audio type (MP3, WAV, M4A, AAC, OGG, FLAC)"):this.$t("The file must be a valid video type (MP4, WebM, MOV)")},uploadData(){return{context:"fluent_player",media_kind:this.uploadKind}},action_url(){return this.appVars.rest.url+"/fluent-player/video-upload"},headers(){return{"X-WP-Nonce":this.appVars.rest.nonce}}},methods:{beforeUpload(t){return bT[this.uploadKind].pattern.test(t.name||"")?!0:(this.$handleError(this.kindErrorMessage),!1)},async handleUrlSubmit(){if(!this.videoUrl)return;const t=wT.some(i=>i.name==="file"&&i.regex.test(this.videoUrl)),e=wT.some(i=>i.name!=="file"&&i.regex.test(this.videoUrl));let n={type:"oembed",url:this.videoUrl,html:"",content_type:"video"};t?(n.player="fluent_player",n.provider="url",n.media_id=new Date().getTime()):e&&(n.player="fluent_player",n.media_id=new Date().getTime()),this.$emit("video-added",n)},handleVideoUploadSuccess(t){var e,n;try{if(!t||!t.media||!t.media.url)throw new Error("Invalid response: missing media.url");const{media:i}=t,s=((e=i.settings)==null?void 0:e.viewType)==="audio"||this.uploadKind==="audio",o={type:"upload",url:i.url,player:"fluent_player",provider:"upload",content_type:s?"audio":"video",html:"",title:((n=i.settings)==null?void 0:n.title)||"",media_id:i.media_id,settings:i.settings||{}};this.$emit("video-added",o)}catch(i){console.error("[FluentPlayerUploader] handleVideoUploadSuccess error:",i,t)}finally{this.$emit("completed",t),this.processing=!1}},handleError(t){try{let e=(t==null?void 0:t.message)||t;if(typeof e=="string")try{const n=JSON.parse(e);e=(n==null?void 0:n.message)||e}catch{}this.$handleError(e)}catch(e){console.error("[FluentPlayerUploader] handleError failed:",e,t)}finally{this.$emit("completed",t),this.processing=!1}},inProgress(t){this.$emit("uploading"),this.processing=!0}}},INe=["element-loading-text"],LNe={key:0,class:"upload-options"},ONe={class:"uploader-content"},DNe={class:"el-upload__text"},RNe={key:1,class:"url-input-section"};function VNe(t,e,n,i,s,o){const r=B("upload-filled"),a=we,l=ze,c=J1,u=ht,d=xt("loading");return Re((v(),$("div",{class:"fluent-player-uploader","element-loading-text":t.$t("Uploading media..."),"element-loading-background":"rgba(255, 255, 255, 0.85)"},[n.type==="upload"?(v(),$("div",LNe,[_(c,{drag:"",class:q([n.className,"video-drag-uploader"]),multiple:o.uploadKind==="audio",action:o.action_url,headers:o.headers,accept:o.acceptTypes,data:o.uploadData,"before-upload":o.beforeUpload,"on-success":o.handleVideoUploadSuccess,"on-progress":o.inProgress,"on-error":o.handleError,"show-file-list":!1,disabled:s.processing},{default:y(()=>[g("div",ONe,[_(a,{class:"el-icon--upload"},{default:y(()=>[_(r)]),_:1}),g("div",DNe,[N(x(t.$t("Drop file here or"))+" ",1),g("em",null,x(t.$t("upload by clicking")),1)]),_(l,{type:"primary",class:"upload-button",loading:s.processing,disabled:s.processing},{default:y(()=>[le(t.$slots,"trigger",{},()=>[le(t.$slots,"default",{},()=>[N(x(s.processing?t.$t("Uploading..."):o.uploadButtonLabel),1)])])]),_:3},8,["loading","disabled"])])]),_:3},8,["class","multiple","action","headers","accept","data","before-upload","on-success","on-progress","on-error","disabled"])])):(v(),$("div",RNe,[_(u,{modelValue:s.videoUrl,"onUpdate:modelValue":e[0]||(e[0]=h=>s.videoUrl=h),type:"url",placeholder:t.$t("Enter video URL"),size:"large"},{append:y(()=>[_(l,{onClick:o.handleUrlSubmit,loading:s.processing},{default:y(()=>[N(x(t.$t("Embed")),1)]),_:1},8,["onClick","loading"])]),_:1},8,["modelValue","placeholder"])]))],8,INe)),[[d,s.processing]])}const FNe=ce(PNe,[["render",VNe]]),NNe={name:"MediaEmbeder",emits:["embeded"],props:{media:{type:Object,default:()=>({type:"oembed",url:"",inner_html:"",content_type:"video",html:"",provider:"",title:"",author_name:"",image:""})},box_title:{type:String,default:""},box_description:{type:String,default:""},has_iframe:{type:Boolean,default:!0},space:{type:String,default:""},is_feed:{type:Boolean,default:!1}},components:{MediaPreview:Ep,FluentPlayerUploader:FNe},computed:{showPreview(){return this.media.html&&!this.showInput},editorMode:{get(){return this.media.type},set(t){this.media.type=t}},hasFluentPlayer(){var t;return this.hasFluentPlayerInstalled&&((t=this.appVars.features.fluent_player)==null?void 0:t.enable)},hasFluentPlayerInstalled(){return this.appVars.features.has_fluent_player},hasUploadEnabled(){var t;return this.is_feed&&this.hasFluentPlayer&&((t=this.appVars.features.fluent_player)==null?void 0:t.has_video_upload)},uploadRole(){var t;return((t=this.appVars.features.fluent_player)==null?void 0:t.video_upload_role)||"admin"},getSpace(){return this.space||""},playEmbeddedVideos(){var t;return(t=this.appVars.features.fluent_player)==null?void 0:t.play_embedded_videos},editorTitle(){return this.box_title||this.$t("Featured media")},uploadHint(){return this.$t("The file must be a valid video type (MP4, WebM, MOV)")},hasUpload(){return this.hasUploadEnabled&&(this.uploadRole==="everyone"||this.uploadRole==="admin_moderator"&&(this.isModerator(this.getSpace)||this.isAdmin())||this.uploadRole==="admin"&&this.isAdmin())}},data(){return{appReady:!1,showInput:!1,fetching:!1,uploading:!1,uploadKind:"video"}},methods:{fetchData(){this.media.url&&(this.fetching=!0,this.$get("feeds/oembed",{url:this.media.url}).then(t=>{this.media.html=t.oembed.html,this.media.provider=t.oembed.provider,this.media.title=t.oembed.title,this.media.author_name=t.oembed.author_name,this.media.type=t.oembed.type,this.media.image=t.oembed.image,this.media.content_type="video",this.$emit("embeded",this.media),this.showInput=!1}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1}))},handleAddCustomHtml(){if(!/<iframe[\s>]/i.test(this.media.html||"")){this.$handleError(this.$t("Only iframe embed code is supported. Script-based embeds will not work."));return}this.media.content_type="video",this.$emit("embeded",this.media),this.showInput=!1},handleFluentPlayerVideo(t){Object.assign(this.media,t);const e=this.media.type==="upload"||this.media.provider==="url";if(this.media.player==="fluent_player"&&e){this.media.type="oembed",this.$emit("embeded",this.media);return}this.fetchData()}},mounted(){typeof this.media!="object"&&(this.media={type:"oembed",url:"",inner_html:"",content_type:"video"}),this.appReady=!0,this.media.html||this.fetchData()}},BNe={key:0},zNe={key:0,class:"fcom_media_editor_actions"},HNe={key:1,class:"fcom_media_editor fcom_media_embeder"},UNe={key:0},jNe={key:1},WNe={key:2,class:"fcom_course_media"};function YNe(t,e,n,i,s,o){var f;const r=ze,a=Qc,l=ws,c=ht,u=B("fluent-player-uploader"),d=B("media-preview"),h=xt("loading");return s.appReady?Re((v(),$("div",BNe,[n.has_iframe||o.hasUpload?(v(),$("div",zNe,[o.showPreview?(v(),D(r,{key:0,onClick:e[0]||(e[0]=p=>s.showInput=!0),size:"small",text:""},{default:y(()=>[N(x(t.$t("Edit media")),1)]),_:1})):(v(),D(l,{key:1,onChange:e[1]||(e[1]=p=>{n.media.html="",n.media.url="",s.showInput=!0}),size:"small",modelValue:o.editorMode,"onUpdate:modelValue":e[2]||(e[2]=p=>o.editorMode=p),disabled:s.uploading,"aria-label":t.$t("Media source")},{default:y(()=>[_(a,{label:t.$t("Oembed"),value:"oembed"},null,8,["label"]),n.has_iframe?(v(),D(a,{key:0,label:t.$t("HTML Code"),value:"iframe_html"},null,8,["label"])):O("",!0),o.hasUpload?(v(),D(a,{key:1,label:t.$t("Upload Video"),value:"upload","data-testid":"upload-kind-video"},null,8,["label"])):O("",!0)]),_:1},8,["modelValue","disabled","aria-label"]))])):O("",!0),o.showPreview?(v(),$("div",WNe,[_(d,{media_item:n.media},null,8,["media_item"])])):(v(),$("div",HNe,[n.media.type=="iframe_html"&&n.has_iframe?(v(),$(J,{key:0},[g("h3",null,x(t.$t("Add Video from custom HTML Code")),1),_(c,{rows:5,modelValue:n.media.html,"onUpdate:modelValue":e[3]||(e[3]=p=>n.media.html=p),type:"textarea",placeholder:t.$t("Paste an iframe code")},null,8,["modelValue","placeholder"]),_(r,{class:"fcom_secondary_button fcom_mt_20",onClick:e[4]||(e[4]=p=>o.handleAddCustomHtml())},{default:y(()=>[N(x(t.$t("Embed")),1)]),_:1})],64)):(v(),$(J,{key:1},[g("h3",null,x(o.editorTitle),1),o.hasFluentPlayerInstalled&&n.media.type==="upload"?(v(),$("p",UNe,x(o.uploadHint),1)):(v(),$("p",jNe,x(n.box_description||t.$t("Embed from Vimeo, YouTube, Wistia and more")),1)),o.hasFluentPlayer&&(n.media.type==="upload"||o.playEmbeddedVideos)?(v(),D(u,{key:2,type:((f=n.media)==null?void 0:f.type)==="upload"?"upload":"url",media_kind:s.uploadKind,onVideoAdded:o.handleFluentPlayerVideo,onUploading:e[5]||(e[5]=p=>s.uploading=!0),onCompleted:e[6]||(e[6]=p=>s.uploading=!1)},null,8,["type","media_kind","onVideoAdded"])):(v(),D(c,{key:3,onKeydown:ut(o.fetchData,["enter"]),size:"large",modelValue:n.media.url,"onUpdate:modelValue":e[7]||(e[7]=p=>n.media.url=p),type:"url",placeholder:t.$t("Paste a URL to embed")},{append:y(()=>[_(r,{onClick:o.fetchData,class:"fcom_primary_button"},{default:y(()=>[N(x(t.$t("Embed")),1)]),_:1},8,["onClick"])]),_:1},8,["onKeydown","modelValue","placeholder"]))],64))]))])),[[h,s.fetching]]):O("",!0)}const _v=ce(NNe,[["render",YNe]]),qNe={name:"VideoEmbeder",emits:["embeded"],props:["is_admin","space"],components:{MediaEmbeder:_v,VideoIcon:qFe},data(){return{videoUrl:"",showVideoPop:!1,media:{type:"oembed",url:"",inner_html:"",content_type:"video"}}},watch:{showVideoPop(t){t||this.resetMedia()}},methods:{show(){this.showVideoPop=!0},resetMedia(){this.media={type:"oembed",url:"",inner_html:"",content_type:"video"}},embeded(t){var n;this.$emit("embeded",t),t&&(t.content_type==="audio"||((n=t.settings)==null?void 0:n.viewType)==="audio")||(this.showVideoPop=!1,this.resetMedia())}}},GNe={class:"fcom_video_embeder"};function XNe(t,e,n,i,s,o){const r=B("VideoIcon"),a=we,l=ze,c=B("media-embeder"),u=$s;return v(),$("div",GNe,[_(l,{"aria-label":t.$t("Add Video"),text:"",onClick:o.show},{default:y(()=>[_(a,{class:q(["fcom_apps_icon"])},{default:y(()=>[_(r)]),_:1})]),_:1},8,["aria-label","onClick"]),s.showVideoPop?(v(),D(u,{key:0,title:t.$t("Attach Media"),modelValue:s.showVideoPop,"onUpdate:modelValue":e[0]||(e[0]=d=>s.showVideoPop=d),width:t.dialogWidth,style:{"max-width":"600px"},"append-to-body":!0},{default:y(()=>[_(c,{box_title:t.$t("Add Featured Video for this post"),has_iframe:n.is_admin,is_feed:!0,onEmbeded:o.embeded,space:n.space,media:s.media},null,8,["box_title","has_iframe","onEmbeded","space","media"])]),_:1},8,["title","modelValue","width"])):O("",!0)])}const KNe=ce(qNe,[["render",XNe]]),ZNe={name:"AudioEditModal",components:{ImageUploader:Ll,EditPen:vR,Delete:mp},emits:["update:visible","saved"],props:{media:{type:Object,required:!0},visible:{type:Boolean,default:!1}},data(){return{localTitle:this.readTitle(),localPoster:this.readPoster(),saving:!1}},watch:{visible(t){t&&(this.localTitle=this.readTitle(),this.localPoster=this.readPoster())}},methods:{readTitle(){var t,e,n;return((e=(t=this.media)==null?void 0:t.settings)==null?void 0:e.title)||((n=this.media)==null?void 0:n.title)||""},readPoster(){var t,e,n;return((e=(t=this.media)==null?void 0:t.settings)==null?void 0:e.posterSrc)||((n=this.media)==null?void 0:n.image)||""},save(){var t;if(!this.localTitle||!this.localTitle.trim()){this.$handleError(this.$t("Audio file name cannot be empty"));return}if(this.localTitle=this.localTitle.trim(),!((t=this.media)!=null&&t.media_id)){this.$emit("saved",this.buildLocalUpdate()),this.$emit("update:visible",!1);return}this.saving=!0,this.$post("fluent-player/audio-media/"+this.media.media_id,{title:this.localTitle,posterSrc:this.localPoster}).then(e=>{this.$emit("saved",{...this.media,...e.media}),this.$emit("update:visible",!1)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},buildLocalUpdate(){var e;const t={...((e=this.media)==null?void 0:e.settings)||{},title:this.localTitle,posterSrc:this.localPoster,poster_is_custom:!!this.localPoster};return{...this.media,title:this.localTitle,image:this.localPoster,settings:t}}}},JNe={class:"fcom_audio_edit"},QNe={id:"fcom_audio_name_label",class:"fcom_audio_edit__label"},eBe={class:"fcom_audio_edit__label"},tBe={class:"fcom_audio_edit__thumb_row"},nBe={class:"fcom_image_uploader_wrapper"},sBe={class:"fcom_sr_only"};function iBe(t,e,n,i,s,o){const r=ht,a=bo,l=B("EditPen"),c=we,u=ze,d=B("Delete"),h=B("image-uploader"),f=$s;return v(),D(f,{"model-value":n.visible,title:t.$t("Edit Audio"),width:"440px","append-to-body":"","onUpdate:modelValue":e[3]||(e[3]=p=>t.$emit("update:visible",p))},{footer:y(()=>[_(u,{class:"fcom_secondary_button",onClick:e[2]||(e[2]=p=>t.$emit("update:visible",!1))},{default:y(()=>[N(x(t.$t("Cancel")),1)]),_:1}),_(u,{class:"fcom_primary_button",loading:s.saving,disabled:!s.localTitle||!s.localTitle.trim(),onClick:o.save},{default:y(()=>[N(x(t.$t("Save")),1)]),_:1},8,["loading","disabled","onClick"])]),default:y(()=>[g("div",JNe,[g("label",QNe,x(t.$t("Audio file name")),1),_(r,{modelValue:s.localTitle,"onUpdate:modelValue":e[0]||(e[0]=p=>s.localTitle=p),placeholder:t.$t("Audio file name"),"aria-label":t.$t("Audio file name"),"aria-labelledby":"fcom_audio_name_label"},null,8,["modelValue","placeholder","aria-label"]),g("label",eBe,x(t.$t("Thumbnail")),1),g("div",tBe,[s.localPoster?(v(),D(a,{key:0,src:s.localPoster,alt:t.$t("Thumbnail"),style:{"max-width":"100px",height:"auto"}},null,8,["src","alt"])):O("",!0),g("div",nBe,[_(h,{isTextBtn:!1,removeIcon:!0,can_remove:!!s.localPoster,confirm_remove:!0,additionalData:{resize:!1,max_width:500,skip_convert:"yes"},onUploaded:e[1]||(e[1]=p=>{s.localPoster=p})},hs({remove:y(()=>[_(c,null,{default:y(()=>[_(d)]),_:1}),g("span",sBe,x(t.$t("Remove Thumbnail")),1)]),_:2},[s.localPoster?{name:"trigger",fn:y(({loading:p})=>[_(u,{class:"fcom_plain_button",loading:p,disabled:p,"aria-label":t.$t("Change Thumbnail"),title:t.$t("Change Thumbnail")},{default:y(()=>[_(c,null,{default:y(()=>[_(l)]),_:1})]),_:1},8,["loading","disabled","aria-label","title"])]),key:"0"}:void 0]),1032,["can_remove"])])])])]),_:1},8,["model-value","title"])}const oBe=ce(ZNe,[["render",iBe]]),rBe={name:"MusicIcon"},aBe={width:"22",height:"22",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",focusable:"false"};function lBe(t,e,n,i,s,o){return v(),$("svg",aBe,[...e[0]||(e[0]=[g("path",{d:"M7.5 15V4.583l8.333-1.25V13.75",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M5.417 17.5c1.15 0 2.083-.84 2.083-1.875S6.567 13.75 5.417 13.75 3.333 14.59 3.333 15.625 4.266 17.5 5.417 17.5Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M13.75 15.625c1.15 0 2.083-.84 2.083-1.875s-.933-1.875-2.083-1.875-2.083.84-2.083 1.875.933 1.875 2.083 1.875Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const cBe=ce(rBe,[["render",lBe]]),uBe={name:"AudioUploadButton",components:{MusicIcon:cBe},emits:["audio-added","uploading","completed"],props:{space:{type:String,default:""},remaining:{type:Number,default:null}},data(){return{uploading:!1}},computed:{maxAudios(){var t;return((t=this.appVars.features.fluent_player)==null?void 0:t.max_audios_per_post)||10},capacity(){return this.remaining===null?this.maxAudios:Math.max(0,this.remaining)},canUpload(){const t=this.appVars.features.fluent_player;if(!this.appVars.features.has_fluent_player||!t||!t.enable||!t.has_audio_upload)return!1;const e=t.video_upload_role||"admin";return e==="everyone"?!0:e==="admin_moderator"?this.isModerator(this.space)||this.isAdmin():this.isAdmin()}},methods:{pickFiles(){this.$refs.fileInput&&this.$refs.fileInput.click()},async onFilesSelected(t){var n,i;let e=Array.from(t.target.files||[]);if(t.target.value="",!!e.length){if(this.capacity<=0){this.$handleError(this.$t("You can add a maximum of %s audios per post.",this.maxAudios));return}e.length>this.capacity&&((i=(n=this.$notify)==null?void 0:n.warning)==null||i.call(n,this.$t("You can add a maximum of %s audios per post.",this.maxAudios)),e=e.slice(0,this.capacity)),this.uploading=!0,this.$emit("uploading");for(const s of e)try{await this.uploadOne(s)}catch(o){this.$handleError(o&&o.message?o.message:o)}this.uploading=!1,this.$emit("completed")}},uploadOne(t){const e=new FormData;return e.append("file",t),e.append("context","fluent_player"),e.append("media_kind","audio"),fetch(this.appVars.rest.url+"/fluent-player/video-upload",{method:"POST",headers:{"X-WP-Nonce":this.appVars.rest.nonce},body:e}).then(n=>n.json().then(i=>({ok:n.ok,body:i}))).then(({ok:n,body:i})=>{if(!n||!i||!i.media||!i.media.url)throw new Error(i&&i.message||this.$t("Failed to upload audio"));const s=i.media;this.$emit("audio-added",{type:"upload",url:s.url,player:"fluent_player",provider:"upload",content_type:"audio",html:"",title:s.settings&&s.settings.title||t.name,media_id:s.media_id,settings:s.settings||{}})})}}};function dBe(t,e,n,i,s,o){const r=B("MusicIcon"),a=we,l=ze;return o.canUpload?(v(),D(l,{key:0,"aria-label":t.$t("Upload Audio"),title:t.$t("Upload Audio"),text:"",loading:s.uploading,onClick:o.pickFiles},{default:y(()=>[_(a,{class:"fcom_status_img_icon"},{default:y(()=>[_(r)]),_:1}),g("input",{ref:"fileInput",type:"file",accept:".mp3,.wav,.m4a,.aac,.ogg,.oga,.flac",multiple:"",hidden:"",onChange:e[0]||(e[0]=(...c)=>o.onFilesSelected&&o.onFilesSelected(...c))},null,544)]),_:1},8,["aria-label","title","loading","onClick"])):O("",!0)}const hBe=ce(uBe,[["render",dBe]]),fBe={name:"DocumentsUploader",components:{UploadFilled:n8,Document:U1},emits:["filesChanged","fileAdded"],props:{is_multiple:{type:Boolean,default:!1},additional_data:{type:Object,default:()=>({})},showLists:{type:Boolean,default:!0},prevFiles:{type:Array,default:()=>[]}},computed:{action_url(){return this.appVars.rest.url+"/documents/upload"},headers(){return{"X-WP-Nonce":this.appVars.rest.nonce}},uploadingFiles(){return this.fileList.filter(t=>t.status==="uploading")}},data(){return{fileList:[]}},methods:{handleSuccess(t){var e;console.log(t),(e=t==null?void 0:t.file)!=null&&e.media_key&&this.$emit("fileAdded",t==null?void 0:t.file)},handleChange(){let t=[];this.fileList.forEach(e=>{var n,i;(i=(n=e==null?void 0:e.response)==null?void 0:n.file)!=null&&i.media_key&&t.push({id:e.response.file.id,media_key:e.response.file.media_key,title:e.response.file.title,type:e.response.file.type})}),this.$emit("filesChanged",t)},handleError(t){this.$handleError(JSON.parse(t.message))}}},pBe={class:"fcom_documents_uploader"},mBe={class:"el-upload__text"},gBe={key:0},vBe={class:"fcom_document_lists"},_Be={class:"fcom_each_document"},yBe={class:"fcom_document_info"},bBe={class:"fcom_document_icon"},wBe={class:"fcom_document_title"},kBe={class:"fcom_document_actions"};function CBe(t,e,n,i,s,o){const r=B("UploadFilled"),a=we,l=J1,c=B("Document"),u=ze;return v(),$("div",pBe,[_(l,{action:o.action_url,headers:o.headers,"file-list":s.fileList,"onUpdate:fileList":e[0]||(e[0]=d=>s.fileList=d),accept:"*/*",drag:"",class:"fcom_document_upload",multiple:n.is_multiple,data:n.additional_data,"show-file-list":n.showLists,"on-change":o.handleChange,"on-success":o.handleSuccess,"on-error":o.handleError,"on-remove":o.handleChange},{default:y(()=>[_(a,{class:"el-icon--upload"},{default:y(()=>[_(r)]),_:1}),g("div",mBe,x(t.$t("Drop file here or click to upload")),1)]),_:1},8,["action","headers","file-list","multiple","data","show-file-list","on-change","on-success","on-error","on-remove"]),!n.showLists&&o.uploadingFiles.length?(v(),$("div",gBe,[g("div",vBe,[(v(!0),$(J,null,ye(o.uploadingFiles,d=>(v(),$("div",_Be,[g("div",yBe,[g("div",bBe,[_(a,null,{default:y(()=>[_(c)]),_:1})]),g("span",wBe,x(d.name),1)]),g("div",kBe,[_(u,{text:"",size:"small",loading:!0},{default:y(()=>[N(x(t.$t("Uploading...")),1)]),_:1})])]))),256))])])):O("",!0)])}const _U=ce(fBe,[["render",CBe]]),xBe={name:"PdfIcon"},SBe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function $Be(t,e,n,i,s,o){return v(),$("svg",SBe,[...e[0]||(e[0]=[g("path",{opacity:"0.4",d:"M19 11C19 10.1825 19 9.4306 18.8478 9.06306C18.6955 8.69552 18.4065 8.40649 17.8284 7.82843L13.0919 3.09188C12.593 2.593 12.3436 2.34355 12.0345 2.19575C11.9702 2.165 11.9044 2.13772 11.8372 2.11401C11.5141 2 11.1614 2 10.4558 2C7.21082 2 5.58831 2 4.48933 2.88607C4.26731 3.06508 4.06508 3.26731 3.88607 3.48933C3 4.58831 3 6.21082 3 9.45584V14C3 17.7712 3 19.6569 4.17157 20.8284C5.34315 22 7.22876 22 11 22H19M12 2.5V3C12 5.82843 12 7.24264 12.8787 8.12132C13.7574 9 15.1716 9 18 9H18.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M21 14H19C18.4477 14 18 14.4477 18 15V16.5M18 16.5V19M18 16.5H20.5M7 19V17M7 17V14H8.5C9.32843 14 10 14.6716 10 15.5C10 16.3284 9.32843 17 8.5 17H7ZM12.5 14H13.7857C14.7325 14 15.5 14.7462 15.5 15.6667V17.3333C15.5 18.2538 14.7325 19 13.7857 19H12.5V14Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const ABe=ce(xBe,[["render",$Be]]),EBe={name:"ZipIcon"},MBe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function TBe(t,e,n,i,s,o){return v(),$("svg",MBe,[...e[0]||(e[0]=[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.24643 13.7697C8.9545 13.7507 8.55839 13.75 8.00407 13.75H7.00391C6.58969 13.75 6.25391 13.4142 6.25391 13C6.25391 12.5858 6.58969 12.25 7.00391 12.25H8.00407C8.01907 12.25 8.03402 12.25 8.04892 12.25C8.66199 12.25 9.18423 12.25 9.57881 12.2929C9.93962 12.3322 10.469 12.4271 10.7888 12.8672C10.9627 13.1066 11.0272 13.3876 10.9857 13.67C10.9495 13.9166 10.8383 14.1258 10.7382 14.2819C10.5513 14.5734 10.2447 14.912 9.91903 15.2718C9.90537 15.2868 9.89169 15.3019 9.87798 15.3171L8.63592 16.6895C8.43153 16.9153 8.27429 17.0901 8.15532 17.2303C8.44726 17.2493 8.84336 17.25 9.39768 17.25H10.3978C10.8121 17.25 11.1478 17.5858 11.1478 18C11.1478 18.4142 10.8121 18.75 10.3978 18.75L9.35284 18.75C8.73977 18.75 8.21752 18.7501 7.82294 18.7071C7.46213 18.6678 6.93277 18.5729 6.61299 18.1328C6.43908 17.8934 6.37458 17.6124 6.41604 17.33C6.45224 17.0835 6.5634 16.8742 6.66351 16.7181C6.85041 16.4266 7.15703 16.088 7.48273 15.7283C7.49638 15.7132 7.51006 15.6981 7.52377 15.6829L8.76583 14.3105C8.97022 14.0847 9.12746 13.9099 9.24643 13.7697Z",fill:"currentColor"},null,-1),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.1914 13C12.1914 12.5858 12.5272 12.25 12.9414 12.25H15.4869C15.9011 12.25 16.2369 12.5858 16.2369 13C16.2369 13.4142 15.9011 13.75 15.4869 13.75H14.9641V17.25H15.4869C15.9011 17.25 16.2369 17.5858 16.2369 18C16.2369 18.4142 15.9011 18.75 15.4869 18.75H12.9414C12.5272 18.75 12.1914 18.4142 12.1914 18C12.1914 17.5858 12.5272 17.25 12.9414 17.25H13.4641V13.75H12.9414C12.5272 13.75 12.1914 13.4142 12.1914 13Z",fill:"currentColor"},null,-1),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.0189 12.25C19.0305 12.25 19.0419 12.25 19.0534 12.25H19.7321C20.8365 12.25 21.7549 13.1328 21.7549 14.25C21.7549 15.3673 20.8365 16.25 19.7321 16.25H18.7852V18C18.7852 18.4142 18.4494 18.75 18.0352 18.75C17.621 18.75 17.2852 18.4142 17.2852 18V14C17.2852 13.9885 17.2852 13.9769 17.2852 13.9653C17.2851 13.7605 17.285 13.5378 17.3107 13.3497C17.3411 13.1278 17.4193 12.8466 17.6588 12.6114C17.8964 12.378 18.1772 12.3037 18.3966 12.2748C18.5853 12.2499 18.8094 12.2499 19.0189 12.25ZM18.7852 14.75H19.7321C20.0336 14.75 20.2549 14.5135 20.2549 14.25C20.2549 13.9866 20.0336 13.75 19.7321 13.75H19.0534C18.9463 13.75 18.8604 13.7501 18.7863 13.7514C18.7852 13.8207 18.7852 13.9009 18.7852 14V14.75Z",fill:"currentColor"},null,-1),g("path",{opacity:"0.4",d:"M7.13841 20.7033C8.00786 20.7942 9.13899 20.7955 10.7476 20.7955H14.9079C15.4456 20.7955 15.8816 21.233 15.8816 21.7727C15.8816 22.3125 15.4456 22.75 14.9079 22.75H10.6927C9.15159 22.75 7.91879 22.75 6.93654 22.6473C5.92712 22.5417 5.0659 22.3186 4.32113 21.7919C3.93077 21.5159 3.58222 21.1871 3.28704 20.8146C2.71721 20.0956 2.47396 19.2577 2.35985 18.2843C2.24996 17.3469 2.24998 16.1743 2.25 14.7262V12.1428V12.1427C2.25 10.7244 2.24999 9.61179 2.30919 8.71107C2.36944 7.79422 2.49398 7.02952 2.77509 6.31755C3.61848 4.1815 5.39221 2.51875 7.61221 1.73658C8.99465 1.2495 10.6813 1.24971 13.5209 1.25007L13.7572 1.25009L13.9605 1.25004L13.9606 1.25004C15.5156 1.2495 16.548 1.24914 17.4068 1.55172C18.7834 2.03673 19.8918 3.071 20.4206 4.41031C20.6039 4.87447 20.6795 5.36014 20.7153 5.90477C20.75 6.43335 20.75 7.08083 20.75 7.87999V7.88006V10.0455C20.75 10.5852 20.3141 11.0228 19.7763 11.0228C19.2386 11.0228 18.8026 10.5852 18.8026 10.0455V7.91329C18.8026 7.07303 18.8021 6.49008 18.7721 6.03341C18.7427 5.58546 18.6879 5.32704 18.6102 5.1304C18.3001 4.34503 17.6344 3.70339 16.7618 3.39593C16.2584 3.21858 15.5913 3.20463 13.7572 3.20463C13.4591 3.20463 13.1023 3.2058 12.7641 3.20732C12.426 3.20885 11.8726 3.21134 11.4104 3.48025C11.1057 3.65756 10.8849 3.85945 10.7582 4.08004C10.5409 4.45845 10.4166 4.89711 10.4166 5.3648C10.4166 5.51193 10.4262 5.70446 10.4344 5.88206L10.4344 5.88212C10.4417 6.03696 10.4496 6.20566 10.4531 6.3737C10.461 6.75379 10.449 7.19733 10.3343 7.62548C10.1108 8.45945 9.4594 9.11086 8.62543 9.33432C8.19728 9.44904 7.75374 9.46105 7.37365 9.45315C7.20551 9.44966 7.03693 9.44174 6.88201 9.43446C6.70441 9.42622 6.48041 9.41667 6.33328 9.41667C5.88661 9.41667 5.46642 9.53003 5.09991 9.72955C4.87246 9.85337 4.65104 10.0965 4.47811 10.3875C4.19749 10.8596 4.19732 11.4982 4.19734 11.7652L4.19737 14.6653C4.19737 16.1888 4.19894 17.2461 4.29387 18.0559C4.38611 18.8427 4.55555 19.2754 4.81111 19.5979C4.9889 19.8223 5.20128 20.0234 5.44274 20.1941C5.80057 20.4472 6.28449 20.6139 7.13841 20.7033Z",fill:"currentColor"},null,-1)])])}const PBe=ce(EBe,[["render",TBe]]),IBe={name:"AudioIcon"},LBe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function OBe(t,e,n,i,s,o){return v(),$("svg",LBe,[...e[0]||(e[0]=[g("path",{d:"M5.5 21.5H18.5C20.1569 21.5 21.5 20.1569 21.5 18.5V5.5C21.5 3.84315 20.1569 2.5 18.5 2.5H5.5C3.84315 2.5 2.5 3.84315 2.5 5.5V18.5C2.5 20.1569 3.84315 21.5 5.5 21.5Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"},null,-1),g("path",{d:"M10 15.5C10 16.3284 9.32843 17 8.5 17C7.67157 17 7 16.3284 7 15.5C7 14.6716 7.67157 14 8.5 14C9.32843 14 10 14.6716 10 15.5ZM10 15.5V8.5L16 7V13.5M16 13.5C16 14.3284 15.3284 15 14.5 15C13.6716 15 13 14.3284 13 13.5C13 12.6716 13.6716 12 14.5 12C15.3284 12 16 12.6716 16 13.5Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const DBe=ce(IBe,[["render",OBe]]),RBe={name:"DocIcon"},VBe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function FBe(t,e,n,i,s,o){return v(),$("svg",VBe,[...e[0]||(e[0]=[g("path",{d:"M21 15C21 14.4477 20.5523 14 20 14H19C18.4477 14 18 14.4477 18 15V18C18 18.5523 18.4477 19 19 19H20C20.5523 19 21 18.5523 21 18M7 14H8C9.10457 14 10 14.8954 10 16V17C10 18.1046 9.10457 19 8 19H7V14ZM13.5 14H14.5C15.0523 14 15.5 14.4477 15.5 15V18C15.5 18.5523 15.0523 19 14.5 19H13.5C12.9477 19 12.5 18.5523 12.5 18V15C12.5 14.4477 12.9477 14 13.5 14Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M19 22H5C3.89543 22 3 21.1046 3 20L3 4C3 2.89543 3.89543 2 5 2H12L19 9V11M18.5 9H13.998C12.8935 9 11.998 8.10457 11.998 7V2.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const NBe=ce(RBe,[["render",FBe]]),BBe={name:"VideoFileIcon"},zBe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function HBe(t,e,n,i,s,o){return v(),$("svg",zBe,[...e[0]||(e[0]=[g("path",{d:"M19 13V9L12 2H5C3.89543 2 3 2.89543 3 4V20C3 21.1046 3.89543 22 5 22H9",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),g("path",{d:"M12 2V7C12 8.10457 12.8954 9 14 9H19",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"},null,-1),g("path",{d:"M18 19.5L21 21V17L18 18.5M18 19.5V18.5M18 19.5V21C18 21.5523 17.5523 22 17 22H13C12.4477 22 12 21.5523 12 21V17C12 16.4477 12.4477 16 13 16H17C17.5523 16 18 16.4477 18 17V18.5",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"},null,-1)])])}const UBe=ce(BBe,[["render",HBe]]),jBe={name:"DocumentLists",components:{Document:U1,Download:Gae,PdfIcon:ABe,ImageIcon:mU,ZipIcon:PBe,AudioIcon:DBe,DocIcon:NBe,VideoFileIcon:UBe},props:["document_lists","additional_data","is_editable","allow_rename"],emits:["fileRemoved","documentsUpdated"],data(){return{editingIndex:null,editingTitle:"",isSaving:!1}},computed:{canEditTitle(){return this.is_editable||this.allow_rename}},methods:{removeDocument(t,e){if(!this.is_editable){this.$emit("fileRemoved",t);return}this.$confirm(this.$t("Are you sure you want to delete this document?"),this.$t("Warning"),{confirmButtonText:this.$t("OK"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.deleteDocument(t,e)})},deleteDocument(t,e){this.isSaving=!0,this.$post("documents/delete",{id:e.id}).then(n=>{this.$notify.success(n.message),this.document_lists.splice(t,1),this.$emit("documentsUpdated",this.document_lists)}).catch(n=>{this.$handleError(n)}).finally(()=>{this.isSaving=!1})},getIcon(t){return t=="application/pdf"?"pdf-icon":t.includes("image")?"image-icon":t=="application/zip"?"zip-icon":t.includes("audio")?"audio-icon":t.includes("video")?"video-file-icon":t.includes("openxmlformats")?"doc-icon":"document"},startEdit(t,e){this.editingIndex=t,this.editingTitle=this.getBaseName(e.title)},cancelEdit(){this.editingIndex=null,this.editingTitle=""},getFileExtension(t){if(!t)return"";const e=t.lastIndexOf(".");return e<=0||e===t.length-1?"":t.slice(e)},getBaseName(t){const e=this.getFileExtension(t);return e?t.slice(0,-e.length):t||""},saveDoc(t){const e=this.editingTitle.trim()+this.getFileExtension(t.title);this.isSaving=!0,this.$post("documents/update",{id:t.id,title:e,...this.additional_data}).then(n=>{t.title=e,this.$notify.success(n.message),this.isSaving=!1,this.editingIndex=null,this.$emit("documentsUpdated",this.document_lists)}).catch(n=>{this.$handleError(n)}).finally(()=>{this.isSaving=!1})}}},WBe={class:"fcom_document_lists"},YBe={class:"fcom_each_document"},qBe={class:"fcom_document_info"},GBe={class:"fcom_document_icon"},XBe={class:"fcom_document_ext"},KBe={class:"fcom_rename_actions"},ZBe=["href"],JBe={class:"fcom_document_actions"},QBe=["href","aria-label"];function eze(t,e,n,i,s,o){const r=we,a=ht,l=ze,c=B("EditPen"),u=B("Download"),d=B("DeleteFilled"),h=xt("loading");return v(),$("div",WBe,[(v(!0),$(J,null,ye(n.document_lists,(f,p)=>(v(),$("div",YBe,[g("div",qBe,[g("div",GBe,[_(r,null,{default:y(()=>[(v(),D(Ct(o.getIcon(f.type))))]),_:2},1024)]),o.canEditTitle&&s.editingIndex==p?(v(),$(J,{key:0},[_(a,{readonly:s.isSaving,size:"small","aria-label":t.$t("Document name"),style:{flex:"1",width:"100%"},modelValue:s.editingTitle,"onUpdate:modelValue":e[0]||(e[0]=m=>s.editingTitle=m)},hs({_:2},[o.getFileExtension(f.title)?{name:"suffix",fn:y(()=>[g("span",XBe,x(o.getFileExtension(f.title)),1)]),key:"0"}:void 0]),1032,["readonly","aria-label","modelValue"]),g("div",KBe,[_(l,{disabled:s.isSaving||!s.editingTitle.trim(),loading:s.isSaving,onClick:m=>o.saveDoc(f),type:"primary",size:"small"},{default:y(()=>[N(x(t.$t("Update")),1)]),_:1},8,["disabled","loading","onClick"]),_(l,{disabled:s.isSaving,onClick:o.cancelEdit,size:"small"},{default:y(()=>[N(x(t.$t("Cancel")),1)]),_:1},8,["disabled","onClick"])])],64)):(v(),$("a",{key:1,href:f.url,target:"_blank",rel:"noopener",class:"fcom_document_title"},x(f.title),9,ZBe))]),Re((v(),$("div",JBe,[o.canEditTitle&&s.editingIndex!=p?(v(),D(l,{key:0,"aria-label":t.$t("Edit"),onClick:m=>o.startEdit(p,f),plain:"",text:"",size:"small"},{default:y(()=>[_(r,null,{default:y(()=>[_(c)]),_:1})]),_:1},8,["aria-label","onClick"])):O("",!0),!n.is_editable&&f.url?(v(),$("a",{key:1,href:f.url+"&force_download=1",target:"_blank","aria-label":t.$t("Download"),class:"el-button el-button--text"},[_(r,null,{default:y(()=>[_(u)]),_:1})],8,QBe)):O("",!0),n.is_editable?(v(),D(l,{key:2,"aria-label":t.$t("Delete"),onClick:m=>o.removeDocument(p,f),plain:"",text:"",size:"small"},{default:y(()=>[_(r,null,{default:y(()=>[_(d)]),_:1})]),_:1},8,["aria-label","onClick"])):O("",!0)])),[[h,s.isSaving]])]))),256))])}const yv=ce(jBe,[["render",eze]]),tze={name:"DocumentUploaderPop",components:{DocumentLists:yv,DocumentsUploader:_U,Document:U1},props:["feed","space_id","is_inline"],methods:{reset(){delete this.feed.document_ids,this.feed.content_type=""},fileAdded(t){this.feed.document_ids||(this.feed.document_ids=[]),this.feed.document_ids.push(t),this.feed.content_type="document"},removeDocument(t){this.feed.document_ids.splice(t,1),(!this.feed.document_ids||this.feed.document_ids.length===0)&&(this.feed.content_type="")}}},nze={class:"fcom_inline_docs_form"},sze={class:"fcom_doc_upload_modal"};function ize(t,e,n,i,s,o){var c;const r=ze,a=B("documents-uploader"),l=B("document-lists");return v(),$("div",nze,[g("div",sze,[_(r,{onClick:e[0]||(e[0]=u=>o.reset()),class:"fcom_file_cancel_btn",text:"",size:"small"},{default:y(()=>[N(x(t.$t("Cancel")),1)]),_:1}),_(a,{style:{"margin-bottom":"20px"},showLists:!1,additional_data:{space_id:n.space_id},is_multiple:!0,onFileAdded:o.fileAdded},null,8,["additional_data","onFileAdded"]),_(l,{class:"fcom_boxed_documents",additional_data:{space_id:n.space_id,feed_id:n.feed.id},is_editable:!0,document_lists:(c=n.feed)==null?void 0:c.document_ids,onFileRemoved:o.removeDocument},null,8,["additional_data","document_lists","onFileRemoved"])])])}const oze=ce(tze,[["render",ize]]),rze={name:"PaperClipIcon"},aze={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function lze(t,e,n,i,s,o){return v(),$("svg",aze,[...e[0]||(e[0]=[g("path",{d:"M18.1188 9.2622L11.431 16.6897C9.50497 18.8288 6.13081 18.9109 3.86828 16.8737C1.60575 14.8365 1.33471 11.4723 3.26079 9.33317L9.14601 2.79697C10.4836 1.31147 12.8106 1.25484 14.3818 2.66956C15.953 4.08428 16.1399 6.40445 14.8023 7.88995L9.45214 13.832C8.70311 14.6638 7.42326 14.695 6.54338 13.9027C5.66351 13.1105 5.5607 11.8344 6.30973 11.0025L10.8574 5.95182",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const cze=ce(rze,[["render",lze]]),uze=window.fluentComAdmin.auth,dze={name:"FeedTextComposer",components:{AudioEditModal:oBe,AudioList:vU,AudioUploadButton:hBe,PaperClipIcon:cze,DocumentLists:yv,DocumentUploaderPop:oze,Document:U1,MediaPreview:Ep,Giphy:UFe,ImageUploader:Ll,SurveyEditForm:nFe,MarkdownEditor:uu,EmojiPicker:JF,VideoEmbeder:KNe,ImageIcon:mU,PollIcon:qVe},emits:["editorCreated"],props:{placeholder:{type:String,default(){return"What's happening, "+uze.first_name}},config:{type:Object,default(){return{multipleMedia:!1,surveyApp:!1,videoApp:!1,disableUpload:!1,documentsApp:!1,space_id:null,spaceSlug:null,isAdmin:!1}}},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,Number],default(){return!1}},defaultMentions:{type:Array,default(){return[]}},context:{type:String,default(){return""}},is_editing:{type:Boolean,default(){return!1}},is_modal:{type:Boolean,default(){return!1}}},computed:{hasActiveApp(){return this.content.content_type=="document"},hasInlineImageUpload(){return this.appVars.features.has_inline_image_upload==="yes"},maxAudios(){var t;return((t=this.appVars.features.fluent_player)==null?void 0:t.max_audios_per_post)||10},audioRemaining(){var t,e;return Math.max(0,this.maxAudios-(((e=(t=this.content)==null?void 0:t.audio_medias)==null?void 0:e.length)||0))}},data(){return{mentionResults:[],mentionSearch:"",uploading:!1,isEmojiPickerVisible:!1,showAudioEdit:!1,composerEditIndex:null,maxMediaPerPost:this.appVars.features.max_media_per_post}},methods:{cencelSurvey(){this.content.survey=null},insertEmoji(t){this.$refs.markdownEditor&&this.$refs.markdownEditor.updateContent(t)},focusComposerAction(){var e,n,i;const t=((e=this.$refs.composerActions)==null?void 0:e.querySelector("button:not([disabled])"))||((i=(n=this.$refs.composerActions)==null?void 0:n.parentElement)==null?void 0:i.querySelector("button:not([disabled])"));t==null||t.focus()},clearContent(){var t;this.content.message="",(t=this.$refs.markdownEditor)==null||t.clearContent()},checkHasImageForCommentsEdit(t){return t.media&&t.media.media_url},removeImageFromComments(){this.content.media=null},checkForImage(t){for(let e=0;e<t.clipboardData.items.length;++e){let n=t.clipboardData.items[e];if(n.kind=="file"&&n.type.startsWith("image/")){const i=n.getAsFile(),s=t.clipboardData.getData("text")||"clipboard-image.png";this.uploadImage(new File([i],s,{type:i.type}))}}},uploadImage(t,e=!0){if(this.config.disableUpload)return this.$notify.error(this.$t("You are not allowed to upload media here.")),!1;if(!this.canAddImage())return!1;e&&(this.uploading=!0);const n=new FormData;return n.append("file",t),n.append("max_width",1400),n.append("context",this.context),n.append("resize",!0),this.$uploadFile("feeds/media-upload",n).then(i=>(e&&this.handleMediaUpload(i.media.url),i.media.url)).catch(i=>{this.$handleError(i)}).finally(()=>{this.uploading=!1})},handleMediaUpload(t,e="uploader"){var n,i;if(this.content.media_images||(this.content.media_images=[]),(i=(n=this.content)==null?void 0:n.meta)!=null&&i.media_preview&&(this.content.meta.media_preview=null),this.config.multipleMedia||(this.content.media_images=[]),!this.canAddImage())return!1;this.content.media=null,this.content.meta=null,this.content.audio_medias=[],this.content.media_images.push({url:t,provider:e,type:"image",height:0,width:0})},initSurveyForm(){this.content.survey||(this.content.survey={type:"single_choice",options:[{slug:"",label:this.$t("First choice")},{slug:"",label:""}]})},selectedGiphy(t){var n,i;this.content.meta||(this.content.meta=[]),(n=this.content)!=null&&n.media_images&&(this.content.media_images=[]),(i=this.content)!=null&&i.media&&(this.content.media=null),this.content.audio_medias=[];const e={image:t.images.downsized_medium.url,height:t.images.downsized_medium.height,width:t.images.downsized_medium.width,type:"image",provider:"giphy"};this.content.meta={media_preview:e}},handleVideoAttachment(t){var n,i,s;if(t&&(t.content_type==="audio"||((n=t.settings)==null?void 0:n.viewType)==="audio")){if(this.content.media_images=[],this.content.media=null,this.content.meta&&!Array.isArray(this.content.meta)&&this.content.meta.media_preview&&(this.content.meta.media_preview=null),Array.isArray(this.content.audio_medias)||(this.content.audio_medias=[]),this.content.audio_medias.length>=this.maxAudios){(s=(i=this.$notify)==null?void 0:i.warning)==null||s.call(i,this.$t("You can add a maximum of %s audios per post.",this.maxAudios));return}this.content.audio_medias.push({...t,player:"fluent_player"}),this.syncAudioMediasToMeta();return}this.content.media_images=[],this.content.meta=[],this.content.audio_medias=[],this.content.media=t},syncAudioMediasToMeta(){const t=Array.isArray(this.content.audio_medias)?this.content.audio_medias:[];(!this.content.meta||Array.isArray(this.content.meta))&&(this.content.meta={...this.content.meta||{}}),t.length?this.content.meta.audio_medias=t:delete this.content.meta.audio_medias},removeComposerAudio(t){Array.isArray(this.content.audio_medias)&&(this.content.audio_medias.splice(t,1),this.syncAudioMediasToMeta())},openComposerAudioEdit(t){this.composerEditIndex=t,this.showAudioEdit=!0},onComposerAudioSaved(t){if(this.composerEditIndex===null)return;const e=this.content.audio_medias[this.composerEditIndex]||{};this.content.audio_medias.splice(this.composerEditIndex,1,{...e,...t}),this.syncAudioMediasToMeta()},getInlineImageCount(){var e,n;const t=(n=(e=this.$refs.markdownEditor)==null?void 0:e.$refs)==null?void 0:n.crepe_editor_vue;return t?t.querySelectorAll('img[src^="http"]').length:0},canAddImage(){var n;return(((n=this.content.media_images)==null?void 0:n.length)||0)+this.getInlineImageCount()>=this.maxMediaPerPost?(this.$notify.error(this.$t("You can upload a maximum of %s images per post.",this.maxMediaPerPost)),!1):!0}},mounted(){var e,n,i;const t=(n=(e=this.content)==null?void 0:e.meta)==null?void 0:n.audio_medias;Array.isArray(t)&&t.length&&!((i=this.content.audio_medias)!=null&&i.length)&&(this.content.audio_medias=[...t]),this.autofocus&&this.$nextTick(()=>{this.$refs.create_status&&this.$refs.create_status.focus()})}},hze={class:"fcom_text_composer"},fze={class:"fcom_editor status_text_input"},pze={key:1,class:"fcom_audio_compose_list"},mze={key:2,style:{position:"relative","text-align":"center"}},gze={key:3,class:"fcom_media_items"},vze={key:0,class:"fcom_media_images"},_ze=["src","alt"],yze={key:1,class:"fcrom_media_images"},bze={class:"fcrom_media_image"},wze=["src","alt"],kze={key:4,class:"fcrom_media_images"},Cze=["src","alt"],xze={key:5,class:"fcrom_media_images"},Sze={class:"fcrom_media_image"},$ze=["src","alt"],Aze={class:"fcom_composer_footer"},Eze={class:"fcom_composer_apps"},Mze={key:0},Tze={ref:"composerActions",class:"fcom_composer_actions"};function Pze(t,e,n,i,s,o){var T,I,L,R,V,H,F,U,Y,z,X;const r=B("MarkdownEditor"),a=B("DocumentUploaderPop"),l=B("SurveyEditForm"),c=B("audio-list"),u=B("audio-edit-modal"),d=ze,h=B("media-preview"),f=B("CloseBold"),p=we,m=B("ImageIcon"),b=B("image-uploader"),w=B("video-embeder"),k=B("audio-upload-button"),C=B("PaperClipIcon"),A=B("PollIcon"),S=B("EmojiPicker"),M=B("Giphy"),P=xt("loading");return v(),$(J,null,[g("div",hze,[g("div",fze,[le(t.$slots,"before_input"),_(r,{ref:"markdownEditor",modelValue:n.content.message,"onUpdate:modelValue":e[0]||(e[0]=Z=>n.content.message=Z),context:n.context,is_modal:n.is_modal,autofocus:n.autofocus,placeholder:n.placeholder,mentionQuery:n.mentionQuery,defaultMentions:n.defaultMentions,autofocus_changed:n.autofocus_changed,onInlineUpload:o.hasInlineImageUpload?Z=>o.uploadImage(Z,!1):null,canAddImage:o.canAddImage,onHandleMediaUpload:o.uploadImage,onEditorCreated:e[1]||(e[1]=()=>{t.$emit("editorCreated")}),onEditorEscape:o.focusComposerAction},null,8,["modelValue","context","is_modal","autofocus","placeholder","mentionQuery","defaultMentions","autofocus_changed","onInlineUpload","canAddImage","onHandleMediaUpload","onEditorEscape"]),le(t.$slots,"after_input")]),n.content.content_type=="document"?(v(),$(J,{key:0},[n.config.documentsApp&&n.config.space_id?(v(),D(a,{key:0,is_inline:!0,feed:n.content,space_id:n.config.space_id},null,8,["feed","space_id"])):O("",!0)],64)):(v(),$(J,{key:1},[n.content.survey?(v(),D(l,{key:0,onCancel:o.cencelSurvey,form:n.content.survey,is_editing:n.is_editing},null,8,["onCancel","form","is_editing"])):O("",!0),(I=(T=n.content)==null?void 0:T.audio_medias)!=null&&I.length?(v(),$("div",pze,[_(c,{audios:n.content.audio_medias,editable:!0,onRemove:o.removeComposerAudio,onEdit:o.openComposerAudioEdit},null,8,["audios","onRemove","onEdit"]),s.composerEditIndex!==null?(v(),D(u,{key:0,media:n.content.audio_medias[s.composerEditIndex],visible:s.showAudioEdit,"onUpdate:visible":e[2]||(e[2]=Z=>s.showAudioEdit=Z),onSaved:o.onComposerAudioSaved},null,8,["media","visible","onSaved"])):O("",!0)])):(R=(L=n.content)==null?void 0:L.media)!=null&&R.type?(v(),$("div",mze,[_(d,{onClick:e[3]||(e[3]=Z=>{n.content.media=null}),text:"",type:"danger"},{default:y(()=>[N(x(t.$t("Remove Media")),1)]),_:1}),_(h,{media_item:n.content.media},null,8,["media_item"])])):(V=n.content)!=null&&V.meta?(v(),$("div",gze,[(F=(H=n.content.meta)==null?void 0:H.media_items)!=null&&F.length?(v(!0),$(J,{key:0},ye(n.content.meta.media_items,(Z,G)=>(v(),$("div",{key:G},[Z.type=="image"?(v(),$("div",vze,[g("img",{class:"fcom_media_image",src:Z.url,alt:t.$t("Media image")},null,8,_ze),_(d,{"aria-label":t.$t("Remove image"),class:"fcom_media_images_cross_button",link:"",onClick:Q=>n.content.meta.media_items.splice(G,1)},{default:y(()=>[_(p,null,{default:y(()=>[_(f)]),_:1})]),_:1},8,["aria-label","onClick"])])):O("",!0)]))),128)):((Y=(U=n.content.meta)==null?void 0:U.media_preview)==null?void 0:Y.type)=="image"||(X=(z=n.content.meta)==null?void 0:z.media_preview)!=null&&X.image?(v(),$("div",yze,[g("div",bze,[g("img",{src:n.content.meta.media_preview.image,alt:t.$t("Media Preview image")},null,8,wze),_(d,{"aria-label":t.$t("Remove image"),link:"",onClick:e[4]||(e[4]=Z=>n.content.meta.media_preview=null)},{default:y(()=>[_(p,null,{default:y(()=>[_(f)]),_:1})]),_:1},8,["aria-label"])])])):O("",!0)])):n.content.media_images&&n.content.media_images.length?(v(),$("div",kze,[(v(!0),$(J,null,ye(n.content.media_images,(Z,G)=>(v(),$("div",{class:"fcrom_media_image",key:G},[g("img",{src:Z.url,alt:t.$t("Media image")},null,8,Cze),_(d,{"aria-label":t.$t("Remove image"),link:"",onClick:Q=>n.content.media_images.splice(G,1)},{default:y(()=>[_(p,null,{default:y(()=>[_(f)]),_:1})]),_:1},8,["aria-label","onClick"])]))),128))])):o.checkHasImageForCommentsEdit(n.content)?(v(),$("div",xze,[g("div",Sze,[g("img",{src:n.content.media.media_url,alt:t.$t("Media image")},null,8,$ze),_(d,{"aria-label":t.$t("Remove image"),link:"",onClick:e[5]||(e[5]=Z=>o.removeImageFromComments())},{default:y(()=>[_(p,null,{default:y(()=>[_(f)]),_:1})]),_:1},8,["aria-label"])])])):O("",!0)],64))]),le(t.$slots,"before_composer_footer"),Re((v(),$("div",Aze,[g("div",Eze,[o.hasActiveApp?O("",!0):(v(),$(J,{key:0},[s.maxMediaPerPost?(v(),D(b,{key:0,additionalData:{resize:!0,context:n.context,max_width:1400},isMultiple:n.config.multipleMedia,onUploading:e[6]||(e[6]=()=>{s.uploading=!0}),onCompleted:e[7]||(e[7]=()=>{s.uploading=!1}),onUploaded:o.handleMediaUpload},{default:y(()=>[_(d,{"aria-label":t.$t("Upload Media"),loading:s.uploading,text:""},{default:y(()=>[_(p,{class:"fcom_status_img_icon"},{default:y(()=>[_(m)]),_:1}),s.uploading?(v(),$("span",Mze,x(t.$t("Uploading...")),1)):O("",!0)]),_:1},8,["aria-label","loading"])]),_:1},8,["additionalData","isMultiple","onUploaded"])):O("",!0),n.config.videoApp&&t.hasFeature("video_embeder")?(v(),D(w,{key:1,space:n.config.spaceSlug,is_admin:n.config.is_admin,onEmbeded:o.handleVideoAttachment},null,8,["space","is_admin","onEmbeded"])):O("",!0),n.config.videoApp&&t.hasFeature("video_embeder")?(v(),D(k,{key:2,space:n.config.spaceSlug,remaining:o.audioRemaining,onAudioAdded:o.handleVideoAttachment,onUploading:e[8]||(e[8]=()=>{s.uploading=!0}),onCompleted:e[9]||(e[9]=()=>{s.uploading=!1})},null,8,["space","remaining","onAudioAdded"])):O("",!0),n.config.documentsApp&&n.config.space_id?(v(),D(d,{key:3,"aria-label":t.$t("Add Documents"),title:t.$t("Upload Documents"),text:"",onClick:e[10]||(e[10]=Z=>n.content.content_type="document")},{default:y(()=>[_(p,{class:q(["fcom_apps_icon"])},{default:y(()=>[_(C)]),_:1})]),_:1},8,["aria-label","title"])):O("",!0),n.config.surveyApp&&t.hasFeature("has_survey_poll")?(v(),D(d,{key:4,"aria-label":t.$t("Create Poll"),onClick:o.initSurveyForm,text:""},{default:y(()=>[_(p,{class:"fcom_apps_icon"},{default:y(()=>[_(A)]),_:1})]),_:1},8,["aria-label","onClick"])):O("",!0),t.hasFeature("emoji_app")?(v(),D(S,{key:5,onEmojiSelected:o.insertEmoji},null,8,["onEmojiSelected"])):O("",!0),t.hasFeature("giphy_app")?(v(),D(M,{key:6,onSelectedGiphy:o.selectedGiphy},null,8,["onSelectedGiphy"])):O("",!0)],64))]),g("div",Tze,[le(t.$slots,"default")],512)])),[[P,s.uploading]]),le(t.$slots,"after_composer_footer")],64)}const bv=ce(dze,[["render",Pze]]),Ize={name:"FeedMdContent",props:["content","class_name"],data(){return{hoverTimeout:null,lightboxImages:[],lightboxIndex:0}},watch:{content(){this.$nextTick(()=>{this.cleanupListeners(),this.setupListeners()})}},methods:{setupListeners(){const t=this.$refs.content;if(!t)return;const e=/\/u\/([^\/]+)\/?$/;t.querySelectorAll("a").forEach(n=>{const i=n.getAttribute("href"),s=(i==null?void 0:i.startsWith(this.appVars.portal_url))&&i.match(e);if(!s)return;const o=s[1];n._mentionEnter=()=>{clearTimeout(this.hoverTimeout),this.hoverTimeout=setTimeout(()=>{this.$eventBus.emit("show_mention_popover",{username:o,triggerElement:n})},500)},n._mentionLeave=()=>{clearTimeout(this.hoverTimeout),this.$eventBus.emit("hide_mention_popover")},n.addEventListener("mouseenter",n._mentionEnter),n.addEventListener("mouseleave",n._mentionLeave)}),this._clickHandler=n=>{var r;const i=n.target.closest('img[src^="http"]');if(i){n.preventDefault();const a=Array.from(t.querySelectorAll('img[src^="http"]')).map(l=>l.src);this.lightboxImages=a,this.lightboxIndex=Math.max(0,a.indexOf(i.src));return}const s=n.target.closest(".fcom_copy_code_btn");if(!s)return;n.stopPropagation();const o=(r=s.parentElement)==null?void 0:r.querySelector("pre");o&&this.$toClipboard((o.querySelector("code")||o).innerText,"Code copied")},t.addEventListener("click",this._clickHandler),t.querySelectorAll("pre").forEach(n=>{var s;if((s=n.parentElement)!=null&&s.classList.contains("fcom_code_wrap"))return;const i=document.createElement("div");i.className="fcom_code_wrap",i.innerHTML='<button class="fcom_copy_code_btn" title="'+this.$t("Copy code")+'"></button>',n.replaceWith(i),i.prepend(n)})},cleanupListeners(){const t=this.$refs.content;t&&(t.querySelectorAll("a").forEach(e=>{e._mentionEnter&&(e.removeEventListener("mouseenter",e._mentionEnter),e.removeEventListener("mouseleave",e._mentionLeave))}),this.$eventBus.emit("hide_mention_popover"),clearTimeout(this.hoverTimeout),this._clickHandler&&(t.removeEventListener("click",this._clickHandler),this._clickHandler=null),t.querySelectorAll(".fcom_copy_code_btn").forEach(e=>e.remove()))}},mounted(){this.$nextTick(()=>this.setupListeners())},beforeUnmount(){this.cleanupListeners()}},Lze=["innerHTML"];function Oze(t,e,n,i,s,o){const r=hF;return v(),$(J,null,[g("div",{ref:"content",class:q(["feed_md_content",n.class_name]),innerHTML:n.content},null,10,Lze),s.lightboxImages.length?(v(),D(r,{key:0,"url-list":s.lightboxImages,"initial-index":s.lightboxIndex,"hide-on-click-modal":!0,onClose:e[0]||(e[0]=a=>s.lightboxImages=[]),"show-progress":s.lightboxImages.length>1},null,8,["url-list","initial-index","show-progress"])):O("",!0)],64)}const Mp=ce(Ize,[["render",Oze]]),Dze={name:"CommentReacts",components:{UserRouteLink:ua},data(){return{centerDialogVisible:!1,reactions:null,loading:!1}},props:{comment:{required:!0,default:null}},methods:{getReactions(){this.reactions&&this.reactions.length===this.comment.reactions_count||(this.loading=!0,this.$get("comments/"+this.comment.id+"/reactions").then(t=>{this.reactions=t.reactions,t.current_user_follows&&this.setFollowIds(t.current_user_follows)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1}))}}},Rze={style:{"margin-left":"5px"}},Vze={key:0},Fze={key:1},Nze={class:"fcom_user_lists"},Bze={key:2};function zze(t,e,n,i,s,o){const r=Vt,a=B("UserAvatar"),l=B("UserRouteLink"),c=zs,u=Yo;return v(),D(u,{persistent:!1,placement:"bottom",title:t.$t("Likes"),width:210,trigger:"click","popper-class":"fcom_menu_below_nav",onShow:o.getReactions},{reference:y(()=>[g("span",Rze,x(n.comment.reactions_count),1)]),default:y(()=>[s.loading?(v(),$("div",Vze,[_(r,{animated:!0,rows:1})])):s.reactions?(v(),$("div",Fze,[_(c,{"max-height":"300px"},{default:y(()=>[g("ul",Nze,[(v(!0),$(J,null,ye(s.reactions,d=>(v(),$("li",null,[d.xprofile?(v(),$(J,{key:0},[_(a,{with_level:!1,xprofile:d.xprofile},null,8,["xprofile"]),_(l,{show_badge:!0,xprofile:d.xprofile,show_follow:!0},null,8,["xprofile"])],64)):O("",!0)]))),256))])]),_:1})])):(v(),$("div",Bze,[g("p",null,x(t.$t("Failed to load the list")),1)]))]),_:1},8,["title","onShow"])}const yU=ce(Dze,[["render",zze]]),Hze={name:"ImageCarousel",props:["feed","is_single"],data(){return{failedMedia:{}}},computed:{srcList(){return this.feed.meta.media_items.map(t=>t.url)},visibleMedia(){return this.feed.meta.media_items.map((t,e)=>({url:t.url,type:t.type,index:e})).slice(0,4)},overflowCount(){return this.srcList.length>4?this.srcList.length-4:0},carouselClass(){const t=this.srcList.length;return t===1?"fcom_image_carousel_num_1":t===3?"fcom_image_carousel_num_3":t===2||t===4||t>4?"fcom_image_carousel_num_2_or_4":""}},methods:{getVideoType(t){switch(t.split(".").pop().toLowerCase()){case"mp4":return"video/mp4";case"webm":return"video/webm";case"ogg":case"ogv":return"video/ogg";default:return"video/mp4"}},isOverflowSlot(t){return t===3&&this.feed.meta.media_items.length>4}}},Uze={class:"fcom_image_carousel"},jze={key:0},Wze=["preload","poster"],Yze=["src","type","onError"],qze={key:1,class:"fcom_media_load_error"},Gze={key:1,class:"fcom_image_wrap"},Xze={key:0,class:"fcom_image_overlay"};function Kze(t,e,n,i,s,o){const r=bo;return v(),$("div",Uze,[g("div",{class:q([o.carouselClass+" "+n.feed.type,"fcom_image_carousel__container"])},[(v(!0),$(J,null,ye(o.visibleMedia,(a,l)=>(v(),$("div",{class:q(["fcom_carousel__image","fcom_media_type_"+a.type])},[a.type==="video"?(v(),$("div",jze,[s.failedMedia[a.url]?(v(),$("p",qze,x(t.$t("This video could not be played.")),1)):(v(),$("video",{key:0,style:{width:"100%","aspect-ratio":"16/9"},controls:"",preload:n.is_single?"":"none",poster:a.thumbnail},[g("source",{src:a.url,type:o.getVideoType(a.url),onError:c=>s.failedMedia[a.url]=!0},null,40,Yze)],8,Wze))])):(v(),$("div",Gze,[_(r,{lazy:"",alt:"",src:a.url,"zoom-rate":1.2,"max-scale":7,"min-scale":.5,"hide-on-click-modal":!0,"preview-teleported":!0,"initial-index":a.index,"preview-src-list":o.srcList,"show-progress":"",fit:"cover"},null,8,["src","initial-index","preview-src-list"]),o.isOverflowSlot(l)?(v(),$("div",Xze,"+"+x(o.overflowCount),1)):O("",!0)]))],2))),256))],2)])}const IS=ce(Hze,[["render",Kze]]),Zze={name:"ErrorIcon"},Jze={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"rgb(245 166 7)","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"h-3 w-3 ltr:mr-2 rtl:ml-2"};function Qze(t,e,n,i,s,o){return v(),$("svg",Jze,[...e[0]||(e[0]=[g("circle",{cx:"12",cy:"12",r:"10"},null,-1),g("line",{x1:"12",x2:"12",y1:"16",y2:"12"},null,-1),g("line",{x1:"12",x2:"12.01",y1:"8",y2:"8"},null,-1)])])}const eHe=ce(Zze,[["render",Qze]]),tHe={name:"ReportReview",components:{ErrorIcon:eHe},props:{feed:{type:Object,required:!0},type:{type:String,default:"post"}},emits:["updated"],methods:{openReportDetails(){this.$eventBus.emit("showReportReviewModal",{content:this.feed,type:this.type})},handleReportUpdate(t){var e,n;((e=t.content)==null?void 0:e.id)==((n=this.feed)==null?void 0:n.id)&&this.$emit("updated",t.content)}},mounted(){this.$eventBus.on("updateModerationReport",this.handleReportUpdate)},beforeUnmount(){this.$eventBus.off("updateModerationReport",this.handleReportUpdate)}},nHe={class:"fcom_feed_report_wrap"},sHe={class:"fcom_feed_report_content"},iHe={key:0},oHe={key:1},rHe={key:2},aHe={class:"fcom_feed_report_action"};function lHe(t,e,n,i,s,o){const r=B("ErrorIcon"),a=ze;return v(),$("div",nHe,[g("div",sHe,[_(r),n.feed.meta.auto_flagged=="yes"?(v(),$("span",iHe,x(t.$t("This %s has been flagged automatically by the site rule.",n.type)),1)):n.feed.meta.reports_count>1?(v(),$("span",oHe,x(t.$t("This %1$s has been flagged with %2$s reports",n.type,n.feed.meta.reports_count)),1)):(v(),$("span",rHe,x(t.$t("This %1$s has been flagged with %2$s report",n.type,n.feed.meta.reports_count)),1))]),g("div",aHe,[_(a,{onClick:e[0]||(e[0]=l=>o.openReportDetails())},{default:y(()=>[N(x(t.$t("Review")),1)]),_:1})])])}const bU=ce(tHe,[["render",lHe]]),cHe={name:"StickyIcon"},uHe={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"};function dHe(t,e,n,i,s,o){return v(),$("svg",uHe,[...e[0]||(e[0]=[g("g",null,[g("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)])])}const wU=ce(cHe,[["render",dHe]]),hHe=80,fHe=20,pHe=5e3,W2={methods:{scrollCommentIntoView(t,e=null){var a;const n=this.$el instanceof Element?this.$el:(a=this.$el)==null?void 0:a.parentElement,i=(n==null?void 0:n.closest(".feed"))||document,s=l=>l&&i.querySelector("#comment_"+l),o=s(t)||s(e);if(!o)return;const r=o.querySelector(".comment_text")||o;r.classList.add("fcom_highlight_glow"),setTimeout(()=>r.classList.remove("fcom_highlight_glow"),pHe),setTimeout(()=>{const l=o.getBoundingClientRect();l.top>=hHe&&l.bottom<=window.innerHeight-fHe||o.scrollIntoView({behavior:"smooth",block:"center"})},50)}}},mHe={name:"SingleComment",mixins:[W2],components:{ImageCarousel:IS,FeedTextComposer:bv,MediaPreview:Ep,ReportReview:bU,StickyIcon:wU,FeedMdContent:Mp,ActionPopover:aa},props:{comment:{type:Object,required:!0},show_header:{type:Boolean,default:!0},show_report:{type:Boolean,default:!1},space_id:{type:String,default:null}},emits:["deleted","updated","reload","copyLink"],watch:{isEdit(t){t||(this.expanded=!1,this.canExpand=!1,this.$nextTick(()=>{this.checkOverflow(),this.canExpand&&(this.expanded=!0)}))}},mounted(){this.$nextTick(()=>this.checkOverflow())},data(){return{working:!1,isEdit:!1,editingComment:null,focusTrigger:0,expanded:!1,canExpand:!1}},computed:{contentClass(){return"comment_text_body"+(this.expanded?"":" clamped")},isReportEnabled(){return this.has_pro&&this.appVars.moderationConfig.is_enabled},showReport(){var t;return this.hasSpaceModeratorAccess()&&this.isReportEnabled&&this.show_report&&(this.comment.status=="pending"||((t=this.comment.meta)==null?void 0:t.reports_count))},showReportOption(){return!(this.comment.user_id==this.auth.user_id)&&this.auth.user_id&&this.isReportEnabled},showStickyOption(){return!this.comment.parent_id&&this.hasSpaceModeratorAccess()},getReportComment(){return{...this.comment,space_id:this.space_id}},commentActions(){const t=[{label:this.$t("Copy Link"),action:()=>this.copyCommentLink(this.comment)}];return this.showStickyOption&&t.push({label:this.comment.is_sticky?this.$t("Unpin from Top"):this.$t("Pin to Top"),action:()=>this.toggleSticky()}),this.showReportOption&&t.push({label:this.$t("Report Comment"),action:()=>this.reportComment(this.comment)}),this.canEditComment(this.comment)&&t.push({label:this.$t("Edit"),action:()=>this.editComment()}),this.canDeleteComment(this.comment)&&t.push({label:this.$t("Delete"),type:"danger",action:()=>this.deleteComment()}),t}},methods:{maybeSave(t){(t.metaKey||t.ctrlKey)&&t.keyCode===13&&this.updateComment()},deleteComment(){this.$confirm(this.$t("Are you sure you want to delete this comment and associated data?"),this.$t("Warning"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.working=!0,this.$del("feeds/"+this.comment.post_id+"/comments/"+this.comment.id).then(t=>{this.$emit("deleted"),this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1})})},editComment(){this.working=!0,this.$get(`comments/${this.comment.id}`,{context:"edit"}).then(t=>{this.editingComment=t.comment,this.isEdit=!0}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1,this.$refs.comment_actions.hide()})},updateComment(){var e,n,i,s;const t=((e=this.editingComment.media_images)==null?void 0:e.length)>0||((i=(n=this.editingComment.meta)==null?void 0:n.media_preview)==null?void 0:i.image);if(!((s=this.editingComment.message)!=null&&s.replace(/&#x20;|\u00A0/gi,"").trim())&&!t){this.$notify.error(this.$t("Comment cannot be empty")),this.focusTrigger++;return}this.working=!0,this.isEdit=!0,this.$post(`feeds/${this.comment.post_id}/comments/${this.comment.id}`,{comment:this.editingComment.message,media_images:this.editingComment.media_images,meta:this.editingComment.meta}).then(o=>{this.$notify.success((o==null?void 0:o.message)||this.$t("Comment updated successfully")),Object.assign(this.comment,o.comment),this.comment.media_images=[],this.isEdit=!1,this.$nextTick(()=>{this.scrollCommentIntoView(this.comment.id)})}).catch(o=>{this.$handleError(o),this.focusTrigger++}).finally(()=>{this.isEdit=!1,this.working=!1})},toggleSticky(){this.hasSpaceModeratorAccess()&&(this.working=!0,this.comment.is_sticky=!this.comment.is_sticky,this.$patch("feeds/"+this.comment.post_id+"/comments/"+this.comment.id,{is_sticky:this.comment.is_sticky?1:0}).then(t=>{this.$notify.success(t.message),this.$emit("reload")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1}))},renderedComment(t){const n=/(?:https?:\/\/)?(?:www\.)?youtube\.com\/watch\?v=([a-zA-Z0-9_-]+)/.exec(t);if(n&&n[1]){let o=n[1];if(o){let r=`<div class="feed_media_ext_video"><iframe src="https://www.youtube.com/embed/${o}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>`;t+=r}}let i=window.location.origin,s=new RegExp(i,"g");return t=t.replace(/<a(.*?)href="(.*?)"(.*?)>/g,(o,r,a,l)=>a.match(s)?`<a${r}href="${a}"${l}>`:`<a${r}href="${a}" target="_blank"${l}>`),t},copyCommentLink(t){this.$emit("copyLink",t),this.$refs.comment_actions.hide()},reportComment(t){this.$refs.comment_actions.hide(),this.$eventBus.emit("showReportContentModal",{reportConfig:t,type:"comment"})},checkOverflow(){var e,n;if(this.expanded)return;const t=(n=(e=this.$refs.commentBody)==null?void 0:e.$refs)==null?void 0:n.content;t&&(this.canExpand=t.scrollHeight>t.clientHeight+1)},toggleExpand(){this.expanded=!this.expanded},reportUpdated(t){var e;t.status=="unpublished"?this.$emit("deleted"):(this.comment.status=t.status,this.comment.meta&&(this.comment.meta.reports_count=((e=t.meta)==null?void 0:e.reports_count)||0),this.$emit("updated"))}}},gHe={key:1,class:"person_avatar"},vHe={class:"comment_wrap"},_He={key:0,class:"comment_text"},yHe={key:0,class:"comment_text_head"},bHe={class:"comment_text_head_name"},wHe=["title"],kHe={key:0,class:"comment_text_head_status"},CHe={class:"comment_actions"},xHe={key:2,class:"comment_text_media"},SHe={key:3,class:"comment_text_media"};function $He(t,e,n,i,s,o){const r=B("ReportReview"),a=B("UserAvatar"),l=B("UserRouteLink"),c=qs,u=B("StickyIcon"),d=we,h=ze,f=B("MoreFilled"),p=B("ActionPopover"),m=B("FeedMdContent"),b=B("MediaPreview"),w=B("ImageCarousel"),k=B("feed-text-composer"),C=xt("loading");return v(),$(J,null,[o.showReport?(v(),D(r,{key:0,feed:o.getReportComment,type:"comment",onUpdated:o.reportUpdated},null,8,["feed","onUpdated"])):O("",!0),n.show_header&&n.comment.xprofile?(v(),$("div",gHe,[_(a,{with_level:!1,xprofile:n.comment.xprofile,is_rounded:!0},null,8,["xprofile"])])):O("",!0),Re((v(),$("div",vHe,[s.isEdit?(v(),$("div",{key:1,onKeydown:e[4]||(e[4]=ut((...A)=>o.maybeSave&&o.maybeSave(...A),["enter"])),class:"comment_text"},[_(k,{context:"comment",config:{multipleMedia:!0},placeholder:t.$t("Write a comment"),content:s.editingComment,autofocus:!0,autofocus_changed:s.focusTrigger},{default:y(()=>[g("div",null,[_(h,{onClick:e[2]||(e[2]=A=>s.isEdit=!1),class:"fcom_secondary_button"},{default:y(()=>[N(x(t.$t("Cancel")),1)]),_:1}),_(h,{class:"fcom_primary_button",onClick:e[3]||(e[3]=A=>o.updateComment(s.editingComment))},{default:y(()=>[N(x(t.$t("Update")),1)]),_:1})])]),_:1},8,["placeholder","content","autofocus_changed"])],32)):(v(),$("div",_He,[n.show_header?(v(),$("div",yHe,[g("div",bHe,[_(l,{show_badge:!0,xprofile:n.comment.xprofile,show_follow:!0},null,8,["xprofile"]),g("div",{title:n.comment.created_at,class:"comment_text_head_time"},x(t.humanDateDiff(n.comment.created_at)),9,wHe),n.comment.status=="pending"?(v(),$("div",kHe,[_(c,{type:"warning"},{default:y(()=>[N(x(t.$t("In Review")),1)]),_:1})])):O("",!0)]),g("div",CHe,[n.comment.is_sticky?(v(),D(h,{key:0,onClick:e[0]||(e[0]=A=>o.toggleSticky()),"aria-label":t.$t("Toggle Sticky"),class:"no_pad_btn",text:"",size:"small"},{default:y(()=>[_(d,{title:t.$t("Unpin from Top"),class:"fcom_sticky"},{default:y(()=>[_(u)]),_:1},8,["title"])]),_:1},8,["aria-label"])):O("",!0),_(p,{ref:"comment_actions",items:o.commentActions,placement:"bottom",width:200},{trigger:y(()=>[_(h,{"aria-label":t.$t("View comment actions"),class:"fcom_dot_menu",size:"small",text:""},{default:y(()=>[_(d,null,{default:y(()=>[_(f)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["items"])])])):O("",!0),_(m,{ref:"commentBody",class_name:o.contentClass,content:o.renderedComment(n.comment.message_rendered)},null,8,["class_name","content"]),s.canExpand?(v(),$("button",{key:1,type:"button",class:"fcom_see_more_btn",onClick:e[1]||(e[1]=(...A)=>o.toggleExpand&&o.toggleExpand(...A))},x(s.expanded?t.$t("See less"):t.$t("See more")),1)):O("",!0),n.comment.meta.media_preview?(v(),$("div",xHe,[_(b,{media_item:n.comment.meta.media_preview},null,8,["media_item"])])):n.comment.meta.media_items?(v(),$("div",SHe,[n.comment.meta.media_items?(v(),D(w,{key:0,feed:n.comment},null,8,["feed"])):O("",!0)])):O("",!0)])),le(t.$slots,"after_comment_text")])),[[C,s.working]])],64)}const Y2=ce(mHe,[["render",$He]]),AHe={name:"IndividualCommentReply",mixins:[W2],components:{FeedTextComposer:bv,FeedMdContent:Mp,HeartIcon:U2,SingleComment:Y2,CommentReactions:yU},props:["comment","comments"],data(){return{commenting:!0,replyingComment:{},newComment:{message:"",media_images:[]},saving:!1}},watch:{comment:{handler(){this.updateReplyingComment()},immediate:!0}},methods:{toggleCommentBox(){this.commenting=!this.commenting},handleCommentDelete(t){this.replyingComment.comments&&this.replyingComment.comments.splice(t,1)},toggleLike(t){this.$emit("toggleLike",t)},postComment(){if(!this.newComment.message){this.$notify({title:this.$t("Error"),message:this.$t("Please write a reply first"),type:"error"});return}this.saving=!0,this.$post("feeds/"+this.comment.post_id+"/comments",{comment:this.newComment.message,parent_id:this.comment.id,media_images:this.newComment.media_images}).then(t=>{this.replyingComment.comments||(this.replyingComment.comments=[]),this.replyingComment.comments.push(t.comment),this.$eventBus.emit("recent_activities_refresh"),this.newComment={message:"",media_images:[]},this.$nextTick(()=>{this.scrollCommentIntoView(t.comment.id,this.comment.id)})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})},updateReplyingComment(){this.comment.parent_id&&this.comments?(this.replyingComment=this.comments.find(t=>t.id===parseInt(this.comment.parent_id))||this.comment,this.replyingComment.comments=this.comments.filter(t=>parseInt(t.parent_id)===this.replyingComment.id)):this.replyingComment=this.comment}},mounted(){this.updateReplyingComment()}},EHe={class:"fcom_course_comment each_comment"},MHe={key:0,class:"person_avatar"},THe=["src","alt"],PHe={class:"comment_wrap"},IHe={class:"comment_text"},LHe={class:"comment_text_head"},OHe={class:"comment_text_head_name"},DHe=["title"],RHe={class:"reply_box"},VHe={class:"fcom_comments_react"},FHe={class:"child_comments"},NHe=["id"],BHe={class:"reply_box"},zHe=["onClick"],HHe={class:"fcom_comments_react fcom_reaction_list"},UHe={key:0,class:"child_reply_wrap"},jHe={class:"feed_commenting"},WHe={class:"person_avatar"},YHe=["src"],qHe={class:"feed_comment_input comment_text"};function GHe(t,e,n,i,s,o){const r=B("UserRouteLink"),a=B("FeedMdContent"),l=B("HeartIcon"),c=we,u=B("CommentReactions"),d=B("single-comment"),h=ze,f=B("FeedTextComposer"),p=xt("loading");return v(),$("div",EHe,[s.replyingComment.xprofile?(v(),$("div",MHe,[g("img",{src:s.replyingComment.xprofile.avatar,alt:t.$t("avatar")},null,8,THe)])):O("",!0),g("div",PHe,[g("div",IHe,[g("div",LHe,[g("div",OHe,[_(r,{xprofile:s.replyingComment.xprofile,show_follow:!0},null,8,["xprofile"]),g("div",{title:s.replyingComment.created_at,class:"comment_text_head_time"},x(t.humanDateDiff(s.replyingComment.created_at)),9,DHe)])]),_(a,{content:s.replyingComment.message_rendered,class_name:"comment_text_body"},null,8,["content"])]),g("div",RHe,[g("span",{onClick:e[0]||(e[0]=(...m)=>o.toggleCommentBox&&o.toggleCommentBox(...m)),class:"reply_btn"},x(t.$t("Post Comment")),1),g("span",{class:q([{fcom_is_liked:s.replyingComment.liked},"reply_btn"])},[g("div",VHe,[_(c,{role:"button",tabindex:"0","aria-label":t.$t("React"),"aria-pressed":!!s.replyingComment.liked,class:q({user_reacted:s.replyingComment.liked}),onClick:e[1]||(e[1]=m=>o.toggleLike(s.replyingComment)),onKeydown:[e[2]||(e[2]=ut(Me(m=>o.toggleLike(s.replyingComment),["prevent"]),["enter"])),e[3]||(e[3]=ut(Me(m=>o.toggleLike(s.replyingComment),["prevent"]),["space"]))]},{default:y(()=>[_(l,{filled:s.replyingComment.liked},null,8,["filled"])]),_:1},8,["aria-label","aria-pressed","class"]),parseInt(s.replyingComment.reactions_count)?(v(),D(u,{key:0,comment:n.comment},null,8,["comment"])):O("",!0)])],2)]),g("div",FHe,[(v(!0),$(J,null,ye(s.replyingComment.comments,(m,b)=>(v(),$("div",{id:"comment_"+m.id,class:"each_comment"},[_(d,{onDeleted:w=>o.handleCommentDelete(b),comment:m,show_report:!0},{after_comment_text:y(()=>[g("div",BHe,[g("span",{onClick:w=>o.toggleCommentBox(m),class:"reply_btn"},x(t.$t("Reply")),9,zHe),g("span",{class:q([{fcom_is_liked:m.liked},"reply_btn"])},[g("div",HHe,[_(c,{role:"button",tabindex:"0","aria-label":t.$t("React"),"aria-pressed":!!m.liked,class:q({user_reacted:m.liked}),onClick:w=>o.toggleLike(m),onKeydown:[ut(Me(w=>o.toggleLike(m),["prevent"]),["enter"]),ut(Me(w=>o.toggleLike(m),["prevent"]),["space"])]},{default:y(()=>[_(l,{filled:m.liked},null,8,["filled"])]),_:2},1032,["aria-label","aria-pressed","class","onClick","onKeydown"]),parseInt(m.reactions_count)?(v(),D(u,{key:0,comment:m},null,8,["comment"])):O("",!0)])],2)])]),_:2},1032,["onDeleted","comment"])],8,NHe))),256))]),s.commenting?(v(),$("div",UHe,[g("div",jHe,[g("div",WHe,[g("img",{alt:"",src:t.auth.avatar},null,8,YHe)]),g("div",qHe,[_(f,{context:"comment",mentionQuery:{space_id:s.replyingComment.space_id},autofocus_changed:s.commenting,autofocus:s.commenting,disabled:s.saving,placeholder:t.$t("Write a reply"),content:s.newComment},{default:y(()=>[Re((v(),D(h,{disabled:s.saving,class:"fcom_primary_button",onClick:e[4]||(e[4]=m=>o.postComment())},{default:y(()=>[N(x(t.$t("Post Comment")),1)]),_:1},8,["disabled"])),[[p,s.saving]])]),_:1},8,["mentionQuery","autofocus_changed","autofocus","disabled","placeholder","content"])])])])):O("",!0)])])}const XHe=ce(AHe,[["render",GHe]]),KHe={name:"CourseComments",props:["course"],components:{IndividualCommentReply:XHe,Pagination:du,ChatIcon:pU,HeartIcon:U2,FeedMdContent:Mp,ActionPopover:aa},data(){return{comments:[],loading:!0,pagination:{page:1,per_page:10,total:0},working:!1,replyingComemnt:null,isReplying:!1}},methods:{fetchComments(){this.loading=!0,this.$get("admin/courses/"+this.course.id+"/comments",{page:this.pagination.page,per_page:this.pagination.per_page}).then(t=>{this.comments=t.comments.data,this.pagination.total=t.comments.total,window.scrollTo(0,0)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},toggleLike(t){const e=!t.liked;this.$post("feeds/"+t.post_id+"/comments/"+t.id+"/reactions",{state:e?1:0}).then(n=>{t.liked=n.liked,t.reactions_count=n.reactions_count}).catch(n=>{this.$handleError(n)})},deleteComment(t,e){this.$confirm(this.$t("Are you sure you want to delete this comment and associated data?"),this.$t("Warning"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.working=!0,this.$del("feeds/"+t.post_id+"/comments/"+t.id).then(n=>{this.comments.splice(e,1),this.$notify.success(n.message)}).catch(n=>{this.$handleError(n)}).finally(()=>{this.working=!1})})},initCommentReply(t){this.replyingComemnt=t,this.$nextTick(()=>{this.isReplying=!0})}},mounted(){this.fetchComments()}},ZHe={key:0,class:"white_loaded"},JHe={key:0,class:"fcom_course_comments_header"},QHe={class:"course_comments feed_comments overview_comments"},eUe={key:0,class:"person_avatar"},tUe={class:"comment_wrap"},nUe={class:"comment_text"},sUe={class:"comment_text_head"},iUe={class:"comment_text_head_name"},oUe=["title"],rUe={class:"comment_actions"},aUe={class:"comment_text_details"},lUe=["href"],cUe={class:"comment_text_actions"},uUe={key:0};function dUe(t,e,n,i,s,o){const r=Vt,a=B("UserAvatar"),l=B("UserRouteLink"),c=B("MoreFilled"),u=we,d=ze,h=B("ActionPopover"),f=B("FeedMdContent"),p=B("ChatIcon"),m=B("HeartIcon"),b=B("pagination"),w=B("IndividualCommentReply"),k=Fa,C=xt("loading");return s.loading?(v(),$("div",ZHe,[_(r,{row:5})])):(v(),$(J,{key:1},[s.pagination.total?(v(),$("div",JHe,[g("h5",null,x(t.$t("Comments (%s)",s.pagination.total)),1)])):O("",!0),g("div",QHe,[(v(!0),$(J,null,ye(s.comments,(A,S)=>(v(),$("div",{key:A.id,class:"fcom_course_comment each_comment"},[A.xprofile?(v(),$("div",eUe,[_(a,{with_level:!1,xprofile:A.xprofile},null,8,["xprofile"])])):O("",!0),g("div",tUe,[g("div",nUe,[g("div",sUe,[g("div",iUe,[_(l,{xprofile:A.xprofile},null,8,["xprofile"]),g("div",{title:A.created_at,class:"comment_text_head_time"},x(t.humanDateDiff(A.created_at)),9,oUe)]),Re((v(),$("div",rUe,[t.canDeleteComment(A)?(v(),D(h,{key:0,placement:"bottom",width:200,items:[{label:t.$t("Delete"),type:"danger",action:()=>o.deleteComment(A,S)}]},{trigger:y(()=>[_(d,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu",text:""},{default:y(()=>[_(u,null,{default:y(()=>[_(c)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["items"])):O("",!0)])),[[C,s.working]])]),g("div",aUe,[g("a",{href:t.$getRouteLink("course/:course_slug/lessons/:lesson_slug/view?comment_id=:comment_id&show_comments=true",{course_slug:n.course.slug,lesson_slug:A.post.slug,comment_id:A.id})},[N(x(t.$t("Commented in"))+" ",1),g("b",null,x(t.getExcerpt(A.post.title,60)),1)],8,lUe)]),_(f,{content:A.message_rendered,class_name:"comment_text_body"},null,8,["content"]),g("div",cUe,[_(d,{onClick:M=>o.initCommentReply(A),text:""},{default:y(()=>[_(u,null,{default:y(()=>[_(p)]),_:1}),g("span",null,x(t.$t("Reply")),1)]),_:1},8,["onClick"]),_(d,{"aria-label":t.$t("React"),text:""},{default:y(()=>[_(u,{class:q({user_reacted:A.liked}),onClick:M=>o.toggleLike(A)},{default:y(()=>[_(m,{filled:A.liked},null,8,["filled"])]),_:2},1032,["class","onClick"]),g("span",null,x(A.reactions_count||""),1)]),_:2},1032,["aria-label"])])])])]))),128)),s.pagination.total?O("",!0):(v(),$("div",uUe,[g("h5",null,x(t.$t("No comments from any lessons yet! Comments from all lessons will be shown here.")),1)]))]),_(b,{pagination:s.pagination,onFetch:o.fetchComments},null,8,["pagination","onFetch"]),_(k,{"append-to-body":!0,modelValue:s.isReplying,"onUpdate:modelValue":e[0]||(e[0]=A=>s.isReplying=A),size:t.dialogWidth},{header:y(()=>{var A;return[g("p",null,[N(x(t.$t("Replying to"))+" ",1),g("b",null,x((A=s.replyingComemnt)==null?void 0:A.post.title),1)])]}),default:y(()=>[s.replyingComemnt?(v(),D(w,{key:0,comment:s.replyingComemnt,comments:s.comments,onToggleLike:o.toggleLike},null,8,["comment","comments","onToggleLike"])):O("",!0)]),_:1},8,["modelValue","size"])],64))}const hUe=ce(KHe,[["render",dUe]]),fUe={name:"CourseOverview",props:["course","course_id"],components:{CourseComments:hUe}},pUe={class:"fcom_cards fcom_cards_2"},mUe={class:"fcom_card"},gUe={class:"fcom_card_body"},vUe={class:"fcom_card"},_Ue={class:"fcom_card_body"};function yUe(t,e,n,i,s,o){const r=B("course-comments");return v(),$(J,null,[g("div",pUe,[g("div",mUe,[g("div",gUe,[g("p",null,x(t.$t("Students")),1),g("h3",null,x(n.course.students_count),1)])]),g("div",vUe,[g("div",_Ue,[g("p",null,x(t.$t("Average Completion Rate")),1),g("h3",null,x(n.course.overAllProgress)+"%",1)])])]),_(r,{course:n.course},null,8,["course"])],64)}const bUe=ce(fUe,[["render",yUe]]),wUe={name:"ContentLayout",props:["title","content_class","wrapper_class"]},kUe={key:0,class:"fhr_content_layout_header"},CUe=["aria-label"],xUe=["aria-label"];function SUe(t,e,n,i,s,o){return v(),$("div",{class:q([n.wrapper_class,"fhr_content_layout"])},[le(t.$slots,"header",{},()=>[n.title?(v(),$("div",kUe,[le(t.$slots,"title",{},()=>[g("h1",{role:"region","aria-label":t.$t("Page Title"),style:{cursor:"pointer"},onClick:e[0]||(e[0]=r=>t.$eventBus.emit("toTop")),class:"fhr_page_title"},x(n.title),9,CUe)]),g("div",{role:"region","aria-label":t.$t("Actions"),class:"fhr_page_actions"},[le(t.$slots,"actions")],8,xUe)])):O("",!0)]),le(t.$slots,"sub_header"),g("div",{class:q([n.content_class,"fhr_content_layout_body"])},[le(t.$slots,"default")],2)],2)}const yi=ce(wUe,[["render",SUe]]),$Ue={name:"AppLayout",props:["wrapper_class"]},AUe={class:"feeds_main"};function EUe(t,e,n,i,s,o){const r=B("router-view");return v(),$("div",{class:q([n.wrapper_class,"feeds fcom_feeds"])},[g("div",AUe,[le(t.$slots,"before_route_view"),le(t.$slots,"default",{},()=>[_(r)]),le(t.$slots,"after_route_view")])],2)}const bi=ce($Ue,[["render",EUe]]),MUe={name:"EditCourseRoute",components:{AppLayout:bi,Layout:yi},props:["course_id"],data(){return{course:{},loading:!0,menuItems:[{name:"course_overview",route:"course_overview",title:this.$t("Overview")},{name:"lessons",route:"edit_lessons",title:this.$t("Lessons")},{name:"students",route:"course_students",title:this.$t("Students")}]}},computed:{computedMenuItems(){var e;const t=[...this.menuItems];return(e=this.course)!=null&&e.quiz_count&&t.push({name:"quiz-results",route:"quiz_results",title:this.$t("Quiz Results")}),t}},methods:{fetchCourse(){this.loading=!0,this.$get("admin/courses/"+this.course_id).then(t=>{this.course=t.course}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},initDeleteCourse(){this.$refs.course_actions.hide(),this.$confirm(this.$t("Are you sure you want to delete this course?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete the course"),cancelButtonText:this.$t("No"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.$promt(this.$t("Please Type %s to confirm. Please note, all the lessons, topics, students progress will be deleted.",'"DELETE"'),this.$t("Delete Course"),{confirmButtonText:this.$t("Confirm Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button"}).then(t=>{t.value==="DELETE"?this.deleteCourse():this.$notify.error(this.$t("The verification string does not match"))})})},initDuplicateCourse(){this.$refs.course_actions.hide(),this.$confirm(this.$t("Are you sure you want to duplicate this course?"),this.$t("Confirm"),{confirmButtonText:this.$t("Yes, Duplicate the course"),cancelButtonText:this.$t("No"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"info"}).then(()=>{this.duplicateCourse()})},duplicateCourse(){this.loading=!0,this.$post("admin/courses/"+this.course.id+"/duplicate").then(t=>{this.$notify.success(t.message),t.course&&this.$router.push({name:"course_overview",params:{course_id:t.course.id}}).then(()=>{window.location.reload()}),this.loading=!1}).catch(t=>{this.$handleError(t),this.loading=!1})},deleteCourse(){this.loading=!0,this.$del("admin/courses/"+this.course.id).then(t=>{this.$notify.success(t.message),this.$router.push({name:"manage_courses"})}).catch(t=>{this.$handleError(t),this.loading=!1})},goToSettings(){this.$router.push({name:"course_settings_general",params:{course_id:this.course_id}})},toViewCourse(){let t=this.$getRouteLink("course/:course_slug/lessons",{course_slug:this.course.slug});window.location.href=t}},mounted(){this.fetchCourse(),this.$route.query.customize_course&&this.$router.replace({name:"course_settings_general",params:{course_id:this.course_id}})}},TUe={class:"object_menu"},PUe={class:"fcom_space_menu_ul"},IUe={key:0},LUe={class:"actions_items"},OUe={key:0,class:"white_loaded"},DUe={key:2};function RUe(t,e,n,i,s,o){const r=Ade,a=$de,l=B("router-link"),c=B("MoreFilled"),u=we,d=ze,h=Yo,f=Vt,p=B("router-view"),m=B("layout"),b=B("app-layout");return v(),D(b,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:y(()=>[_(m,{wrapper_class:"no_bg_layout",title:t.$t("Courses")},{title:y(()=>[_(a,null,{default:y(()=>[_(r,{to:{name:"manage_courses"}},{default:y(()=>[N(x(t.$t("Courses")),1)]),_:1}),s.course.id?(v(),D(r,{key:0},{default:y(()=>[N(x(s.course.title)+" ",1),t.hasCourseCreatorAccess()?(v(),$("span",{key:0,class:"fcom_edit_course fcom_secondary_button clickable",onClick:e[0]||(e[0]=w=>o.goToSettings())},x(t.$t("Edit Info")),1)):O("",!0)]),_:1})):O("",!0)]),_:1})]),actions:y(()=>[g("div",TUe,[g("ul",PUe,[(v(!0),$(J,null,ye(o.computedMenuItems,w=>(v(),$("li",{key:w.name,class:q("course_inner_menu_"+w.name)},[_(l,{to:{name:w.route,params:{course_id:s.course.id}}},{default:y(()=>[N(x(w.title),1)]),_:2},1032,["to"])],2))),128)),t.hasCourseCreatorAccess()?(v(),$("li",IUe,[_(h,{placement:"bottom",ref:"course_actions",persistent:!1,width:200,trigger:"click"},{reference:y(()=>[_(d,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu",size:"small",text:""},{default:y(()=>[_(u,null,{default:y(()=>[_(c)]),_:1})]),_:1},8,["aria-label"])]),default:y(()=>[g("ul",LUe,[g("li",{onClick:e[1]||(e[1]=w=>o.toViewCourse())},x(t.$t("View Course")),1),g("li",{onClick:e[2]||(e[2]=()=>{t.$refs.course_actions.hide(),o.goToSettings()})},x(t.$t("Edit Course")),1),g("li",{onClick:e[3]||(e[3]=(...w)=>o.initDuplicateCourse&&o.initDuplicateCourse(...w))},x(t.$t("Duplicate Course")),1),g("li",{onClick:e[4]||(e[4]=(...w)=>o.initDeleteCourse&&o.initDeleteCourse(...w))},x(t.$t("Delete Course")),1)])]),_:1},512)])):O("",!0)])])]),default:y(()=>[s.loading?(v(),$("div",OUe,[_(f,{loading:s.loading,animation:"pulse",row:"10"},null,8,["loading"])])):s.course.id?(v(),D(p,{key:1,course:s.course},null,8,["course"])):(v(),$("div",DUe,[g("h3",null,x(t.$t("Sorry, the course cannot be loaded")),1)]))]),_:1},8,["title"])]),_:1})}const VUe=ce(MUe,[["render",RUe]]),FUe={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 t=this.$refs.block_editor;this.loading=!1,this.all_loaded=!0,window.wp.attachEditor(t,{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","core/html"]},__experimentalOnChange:function(e){console.log(e)},sidebar:{inserter:!1,inspector:!0}},editor:{__experimentalOnChange:function(e){console.log(e)},__experimentalOnInput(e){console.log(e)},__experimentalOnSelection(e){console.log(e)},onSaveContent:function(e){console.log(e)}}}),t.addEventListener("change",e=>{this.html=e.target.value,this.$emit("update:modelValue",e.target.value)})},loadScript(t){return new Promise((e,n)=>{const i=document.createElement("script");i.src=t,i.onload=e,i.onerror=n,document.head.append(i)})},async loadScripts(){const t=this.appVars.block_editor_assets.scripts;for(const e in t)try{await this.loadScript(t[e]),console.log(`${e} JS loaded`)}catch(n){this.has_error=!0,console.error(`Failed to load js ${e}:`,n)}this.attach()},loadCSSFile(t){return new Promise((e,n)=>{const i=document.createElement("link");i.rel="stylesheet",i.href=t,i.onload=e,i.onerror=n,document.head.append(i)})},async loadCSSFiles(){const e=this.appVars.block_editor_assets.styles.map(this.loadCSSFile);try{await Promise.all(e),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)}},NUe={class:"fcom_block_editor"};function BUe(t,e,n,i,s,o){const r=Vt;return v(),$("div",NUe,[Re(g("div",null,[g("textarea",{ref:"block_editor",id:"fcom_block_editor",name:"block_editor"}," "+x(s.html)+`
132 + `,513)],512),[[jt,s.all_loaded]]),s.all_loaded?O("",!0):(v(),D(r,{key:0,class:"white_loaded",rows:7,animated:!0}))])}const kU=ce(FUe,[["render",BUe]]),zUe={name:"LengthInput",props:["modelValue"],data(){return{muinutes:0,seconds:0}},methods:{updateLength(){this.$emit("update:modelValue",parseInt(this.muinutes)*60+parseInt(this.seconds))}},mounted(){this.modelValue&&(this.muinutes=Math.floor(this.modelValue/60)||"",this.seconds=this.modelValue%60||"")}},HUe={class:"fcom_length_input"};function UUe(t,e,n,i,s,o){const r=ht;return v(),$("div",HUe,[_(r,{type:"number",modelValue:s.muinutes,"onUpdate:modelValue":e[0]||(e[0]=a=>s.muinutes=a),onChange:o.updateLength,min:0,max:1444,size:"small"},{append:y(()=>[N(x(t.$t("min")),1)]),_:1},8,["modelValue","onChange"]),_(r,{type:"number",modelValue:s.seconds,"onUpdate:modelValue":e[1]||(e[1]=a=>s.seconds=a),onChange:o.updateLength,min:0,max:59,size:"small"},{append:y(()=>[N(x(t.$t("sec")),1)]),_:1},8,["modelValue","onChange"])])}const jUe=ce(zUe,[["render",UUe]]),WUe={name:"LessonDocuments",components:{DocumentLists:yv,DocumentsUploader:_U},props:["lesson"],methods:{fileAdded(t){this.lesson.meta.document_ids=this.lesson.meta.document_lists||[],this.lesson.meta.document_lists.push(t)}}},YUe={class:"fcom_meta_section fcom_lesson_documents_form"},qUe={class:"fcom_meta_label"},GUe={style:{"font-size":"90%",padding:"0px",margin:"0 0 15px","line-height":"120%"}},XUe={key:0,class:"fcom_lesson_documents_list"},KUe={key:1,class:"fcom_lesson_documents_list"};function ZUe(t,e,n,i,s,o){const r=B("documents-uploader"),a=B("document-lists");return v(),$("div",YUe,[g("div",qUe,x(t.$t("Documents & Files")),1),g("p",GUe,x(t.$t("These files will be available to your students to view and download")),1),t.has_pro?(v(),$("div",XUe,[_(r,{style:{"margin-bottom":"20px",padding:"0"},showLists:!1,additional_data:{space_id:n.lesson.space_id,lesson_id:n.lesson.id},is_multiple:!0,onFileAdded:o.fileAdded},null,8,["additional_data","onFileAdded"]),_(a,{class:"fcom_boxed_documents",additional_data:{space_id:n.lesson.space_id,lesson_id:n.lesson.id},is_editable:!0,document_lists:n.lesson.meta.document_lists},null,8,["additional_data","document_lists"])])):(v(),$("div",KUe,[g("p",null,x(t.$t("You need to upgrade to Pro to upload documents")),1)]))])}const CU=ce(WUe,[["render",ZUe]]),JUe={name:"BgImageUpload",emits:["update:modelValue"],props:{modelValue:{type:String,required:!1},button_text:{type:String,default(){return""}},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(t){this.imageUrl=t.media.url,this.$emit("update:modelValue",this.imageUrl)},handleError(t){this.$handleError(JSON.parse(t.message))},removeImage(){this.imageUrl="",this.$emit("update:modelValue","")}}};function QUe(t,e,n,i,s,o){const r=bo,a=ze,l=J1,c=B("CloseBold"),u=we;return v(),$(J,null,[_(l,{action:o.action_url,headers:o.headers,accept:"image/*",class:"fcom_bg_upload",multiple:n.is_multiple,data:n.additional_data,"show-file-list":!1,"on-success":o.handleSuccess,"on-error":o.handleError},{default:y(()=>[le(t.$slots,"trigger",{},()=>[le(t.$slots,"default",{},()=>[s.imageUrl?(v(),D(r,{key:0,alt:t.$t("Image Preview"),src:s.imageUrl},null,8,["alt","src"])):(v(),D(a,{key:1,class:"fcom_btn_upload",text:""},{default:y(()=>[N(x(n.button_text||t.$t("Upload Image")),1)]),_:1}))])])]),_:3},8,["action","headers","multiple","data","on-success","on-error"]),s.imageUrl&&n.can_remove?(v(),D(a,{key:0,"aria-label":t.$t("Remove image"),class:"fcom_bg_remove",text:"",size:"small",onClick:o.removeImage},{default:y(()=>[_(u,null,{default:y(()=>[_(c)]),_:1})]),_:1},8,["aria-label","onClick"])):O("",!0)],64)}const Tp=ce(JUe,[["render",QUe]]),eje={name:"QuizLayoutThumb",props:{layout:{type:String,default:"all"}}},tje={class:"fcom_quiz_layout_thumb",viewBox:"0 0 100 70","aria-hidden":"true"},nje=["y"],sje=["y"],ije=["y"];function oje(t,e,n,i,s,o){return v(),$("svg",tje,[e[3]||(e[3]=g("rect",{x:"0",y:"0",width:"100",height:"70",class:"thumb_page"},null,-1)),n.layout==="one_by_one"?(v(),$(J,{key:0},[e[0]||(e[0]=xr('<rect x="12" y="8" width="76" height="3" rx="1.5" class="thumb_line"></rect><rect x="12" y="8" width="30" height="3" rx="1.5" class="thumb_accent"></rect><rect x="12" y="17" width="76" height="34" rx="2" class="thumb_card"></rect><rect x="18" y="22" width="44" height="3.5" rx="1" class="thumb_title"></rect><rect x="18" y="31" width="50" height="3" rx="1" class="thumb_line"></rect><rect x="18" y="37" width="50" height="3" rx="1" class="thumb_line"></rect><rect x="18" y="43" width="36" height="3" rx="1" class="thumb_line"></rect><rect x="12" y="56" width="18" height="7" rx="3.5" class="thumb_line"></rect><rect x="70" y="56" width="18" height="7" rx="3.5" class="thumb_accent"></rect>',9))],64)):(v(),$(J,{key:1},[(v(),$(J,null,ye([8,29],r=>(v(),$(J,{key:r},[g("rect",{x:"12",y:r,width:"76",height:"17",rx:"2",class:"thumb_card"},null,8,nje),g("rect",{x:"18",y:r+4,width:"40",height:"3",rx:"1",class:"thumb_title"},null,8,sje),g("rect",{x:"18",y:r+10,width:"54",height:"2.5",rx:"1",class:"thumb_line"},null,8,ije)],64))),64)),e[1]||(e[1]=g("rect",{x:"12",y:"50",width:"76",height:"12",rx:"2",class:"thumb_card"},null,-1)),e[2]||(e[2]=g("rect",{x:"18",y:"54",width:"40",height:"3",rx:"1",class:"thumb_title"},null,-1))],64))])}const rje=ce(eje,[["render",oje]]),aje={name:"CourseMeta",components:{LessonDocuments:CU,MediaEmbeder:_v,LengthInput:jUe,BgImageUpload:Tp,QuizLayoutThumb:rje},props:{lesson:{type:Object,required:!0},course:{type:Object,required:!0},quiz_meta:{type:Boolean,default:!1}},computed:{showCommentsDisabled(){return this.course.settings.disable_comments=="yes"},enablePassingScore(){var t;return((t=this.lesson.meta)==null?void 0:t.enable_passing_score)=="yes"},isFluentPlayerMedia(){var t,e;return((e=(t=this.lesson.meta)==null?void 0:t.media)==null?void 0:e.type)=="fluent_player"},quizLayout(){return this.lesson.meta.layout==="one_by_one"?"one_by_one":"all"},layoutOptions(){return[{value:"all",label:this.$t("All at once"),description:this.$t("Every question on one page. Students scroll through and submit once.")},{value:"one_by_one",label:this.$t("One by one"),description:this.$t("One question per screen, with a progress bar and Previous / Next buttons.")}]},selectedLayout(){return this.layoutOptions.find(t=>t.value===this.quizLayout)}}},lje={class:"fcom_course_meta"},cje={class:"fcom_meta_section"},uje={class:"fcom_meta_label"},dje={class:"fcom_meta_content"},hje={key:2,class:"checkbox_with_tooltip"},fje={key:0},pje={key:1,class:"checkbox_with_tooltip"},mje={class:"fcom_quiz_layout_picker"},gje={class:"fcom_quiz_layout_options"},vje=["value","checked","aria-describedby","onChange"],_je={class:"fcom_quiz_layout_name"},yje=["id"],bje={class:"fcom_quiz_layout_help","aria-hidden":"true"},wje={key:0,class:"fcom_meta_section"},kje={key:0,class:"fcom_meta_content"},Cje={class:"fcom_meta_label"},xje={class:"fcom_meta_content"},Sje={key:1,class:"fcom_meta_section"},$je={class:"fcom_meta_label"},Aje={class:"fcom_edit_lesson_documents"};function Eje(t,e,n,i,s,o){var w;const r=qt,a=B("InfoFilled"),l=we,c=Ss,u=ht,d=B("QuizLayoutThumb"),h=B("media-embeder"),f=B("length-input"),p=B("BgImageUpload"),m=tn,b=B("LessonDocuments");return v(),$("div",lje,[g("div",cje,[g("div",uje,x(t.$t("Features Settings")),1),g("div",dje,[_(r,{modelValue:n.lesson.meta.enable_media,"onUpdate:modelValue":e[0]||(e[0]=k=>n.lesson.meta.enable_media=k),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Enable Video Embed")),1)]),_:1},8,["modelValue"]),o.showCommentsDisabled?(v(),D(r,{key:0,disabled:!0,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Comments are disabled for this course")),1)]),_:1})):(v(),D(r,{key:1,modelValue:n.lesson.meta.enable_comments,"onUpdate:modelValue":e[1]||(e[1]=k=>n.lesson.meta.enable_comments=k),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Enable Comments")),1)]),_:1},8,["modelValue"])),n.quiz_meta?O("",!0):(v(),$("div",hje,[_(r,{modelValue:n.lesson.meta.free_preview_lesson,"onUpdate:modelValue":e[2]||(e[2]=k=>n.lesson.meta.free_preview_lesson=k),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Free Preview Lesson"))+" ",1),t.has_pro?O("",!0):(v(),$("span",fje,"("+x(t.$t("Available on Pro"))+")",1))]),_:1},8,["modelValue","disabled"]),_(c,{class:"box-item",effect:"dark",placement:"right-end"},{content:y(()=>[N(x(t.$t("If enabled, public users can view this lesson without enrolling in the course.")),1)]),default:y(()=>[_(l,null,{default:y(()=>[_(a)]),_:1})]),_:1})])),n.quiz_meta?(v(),$(J,{key:3},[_(r,{modelValue:n.lesson.meta.enable_passing_score,"onUpdate:modelValue":e[3]||(e[3]=k=>n.lesson.meta.enable_passing_score=k),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Set a passing grade")),1)]),_:1},8,["modelValue"]),o.enablePassingScore?(v(),D(u,{key:0,modelValue:n.lesson.meta.passing_score,"onUpdate:modelValue":e[4]||(e[4]=k=>n.lesson.meta.passing_score=k),min:10,max:100,step:1,type:"number",class:"fcom_input_number",placeholder:"80"},{append:y(()=>[...e[11]||(e[11]=[N("%",-1)])]),_:1},8,["modelValue"])):O("",!0),o.enablePassingScore?(v(),$("div",pje,[_(r,{modelValue:n.lesson.meta.enforce_passing_score,"onUpdate:modelValue":e[5]||(e[5]=k=>n.lesson.meta.enforce_passing_score=k),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Enforce pass to continue")),1)]),_:1},8,["modelValue"]),_(c,{class:"box-item",effect:"dark",placement:"right-end"},{content:y(()=>[N(x(t.$t("If enabled, members will have to achieve a minimum score before")),1),e[12]||(e[12]=g("br",null,null,-1)),N(" "+x(t.$t("proceeding to the next lesson. They can re-take this quiz multiple times.")),1)]),default:y(()=>[_(l,null,{default:y(()=>[_(a)]),_:1})]),_:1})])):O("",!0),_(r,{modelValue:n.lesson.meta.hide_result,"onUpdate:modelValue":e[6]||(e[6]=k=>n.lesson.meta.hide_result=k),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Hide answers on result page")),1)]),_:1},8,["modelValue"]),_(r,{modelValue:n.lesson.meta.shuffle_options,"onUpdate:modelValue":e[7]||(e[7]=k=>n.lesson.meta.shuffle_options=k),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Shuffle answer options")),1)]),_:1},8,["modelValue"]),_(r,{modelValue:n.lesson.meta.shuffle_questions,"onUpdate:modelValue":e[8]||(e[8]=k=>n.lesson.meta.shuffle_questions=k),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Shuffle question order")),1)]),_:1},8,["modelValue"]),g("fieldset",mje,[g("legend",null,x(t.$t("Quiz Layout")),1),g("div",gje,[(v(!0),$(J,null,ye(o.layoutOptions,k=>(v(),$("label",{key:k.value,class:q(["fcom_quiz_layout_option",{is_active:o.quizLayout===k.value}])},[g("input",{type:"radio",class:"fcom_sr_only",name:"fcom_quiz_layout",value:k.value,checked:o.quizLayout===k.value,"aria-describedby":"fcom_quiz_layout_desc_"+k.value,onChange:C=>n.lesson.meta.layout=k.value},null,40,vje),_(d,{layout:k.value},null,8,["layout"]),g("span",_je,x(k.label),1)],2))),128))]),(v(!0),$(J,null,ye(o.layoutOptions,k=>(v(),$("span",{key:k.value,id:"fcom_quiz_layout_desc_"+k.value,class:"fcom_sr_only"},x(k.description),9,yje))),128)),g("p",bje,x(o.selectedLayout.description),1)])],64)):O("",!0)])]),((w=n.lesson.meta)==null?void 0:w.enable_media)=="yes"?(v(),$("div",wje,[o.isFluentPlayerMedia?(v(),$("div",kje,[g("p",null,x(t.$t("The feature video is managed by the FluentPlayer block in the lesson editor.")),1)])):(v(),D(h,{key:1,style:{margin:"0"},media:n.lesson.meta.media},null,8,["media"])),g("div",Cje,x(t.$t("Lesson Duration")),1),g("div",xje,[_(f,{modelValue:n.lesson.meta.video_length,"onUpdate:modelValue":e[9]||(e[9]=k=>n.lesson.meta.video_length=k)},null,8,["modelValue"])])])):O("",!0),n.quiz_meta?(v(),$("div",Sje,[g("div",$je,x(t.$t("Featured Image")),1),_(m,{class:"fcom_bg_image"},{default:y(()=>[_(p,{modelValue:n.lesson.meta.featured_image_id,"onUpdate:modelValue":e[10]||(e[10]=k=>n.lesson.meta.featured_image_id=k),can_remove:!0},null,8,["modelValue"])]),_:1})])):O("",!0),g("div",Aje,[_(b,{lesson:n.lesson},null,8,["lesson"])])])}const xU=ce(aje,[["render",Eje]]),Mje={name:"FullEditorFrame",emits:["update:modelValue","titleUpdated","featuredMediaUpdated","metaUpdated","manageDocuments","useAlternateEditor"],props:{editorPath:{type:String,default:"/editor"},modelValue:{type:String,default:""},editorParams:{type:Object,default:()=>({})},frameHeight:{type:String,default:"500px"},documentTitle:{type:String,default:""},featured_image_id:{type:[String,Number],default:""},metaSettings:{type:Object,default:()=>null}},data(){return{editorData:{content:""},editorFrame:null,editorOrigin:null,lastUpdate:"No updates yet",dataSent:!1,isFailing:!1,loadTimer:null,readyTimer:null}},computed:{hasFailed(){return!this.dataSent&&this.isFailing}},mounted(){this.loadTimer=setTimeout(this.markEditorFailed,3e4),this.editorData.content=this.modelValue,this.editorData.title=this.documentTitle,this.editorData.featured_image_id=this.featured_image_id,this.metaSettings&&(this.editorData.metaSettings=this.metaSettings),this.createEditorIframe(),window.addEventListener("message",this.handleEditorMessage)},beforeUnmount(){window.removeEventListener("message",this.handleEditorMessage),this.clearFailureTimers(),this.editorFrame&&(this.editorFrame.onload=null,this.$refs.iframeContainer.removeChild(this.editorFrame),this.editorFrame=null)},methods:{createEditorIframe(){const t=new URL(this.editorPath,window.location.origin);this.editorOrigin=t.origin,this.editorFrame=document.createElement("iframe");let e=this.appVars.wp_lesson_editor_frame;if(this.editorParams){const n=new URLSearchParams(this.editorParams);e+="&"+n.toString()}this.editorFrame.onload=()=>{clearTimeout(this.loadTimer),this.loadTimer=null,!(this.dataSent||this.readyTimer)&&(this.readyTimer=setTimeout(this.markEditorFailed,15e3))},this.editorFrame.onerror=this.markEditorFailed,this.editorFrame.src=e,this.editorFrame.style.width="100%",this.editorFrame.style.height=this.frameHeight,this.$refs.iframeContainer.appendChild(this.editorFrame)},editorFailed(){this.$emit("useAlternateEditor")},markEditorFailed(){this.clearFailureTimers(),this.dataSent||(this.isFailing=!0)},clearFailureTimers(){clearTimeout(this.loadTimer),clearTimeout(this.readyTimer),this.loadTimer=null,this.readyTimer=null},sendDataToEditor(){if(this.editorFrame&&this.editorFrame.contentWindow){const t=JSON.parse(JSON.stringify(this.editorData));this.editorFrame.contentWindow.postMessage({type:"UPDATE_EDITOR",data:t},"*"),this.dataSent=!0}else alert("Editor frame is not loaded or contentWindow is not accessible.")},syncMetaToEditor(t){this.editorFrame&&this.editorFrame.contentWindow&&this.editorFrame.contentWindow.postMessage({type:"SYNC_META",data:JSON.parse(JSON.stringify(t))},"*")},handleEditorMessage(t){const{action:e,content:n}=t.data;e==="EDITOR_UPDATED"?this.dataSent&&(this.editorData.content=n,this.$emit("update:modelValue",n)):e==="TITLE_UPDATED"?(this.editorData.title=n,this.$emit("titleUpdated",n)):e==="FEATURED_MEDIA_UPDATED"?this.$emit("featuredMediaUpdated",n):e==="META_UPDATED"?this.$emit("metaUpdated",n):e==="MANAGE_DOCUMENTS"?this.$emit("manageDocuments"):e==="EDITOR_READY"&&(this.clearFailureTimers(),this.isFailing=!1,this.sendDataToEditor())}}},Tje={key:0,style:{display:"flex","justify-content":"center","align-items":"center","column-gap":"10px"}},Pje=["element-loading-text"];function Ije(t,e,n,i,s,o){const r=ze,a=Vt,l=xt("loading");return v(),$(J,null,[o.hasFailed?(v(),$("div",Tje,[g("p",null,x(t.$t("Problem with loading the editor?")),1),_(r,{onClick:e[0]||(e[0]=c=>o.editorFailed())},{default:y(()=>[N(x(t.$t("Use Alternative Editor")),1)]),_:1})])):O("",!0),Re((v(),$("div",{"element-loading-text":t.$t("Loading editor. Please wait..."),class:"editor-container"},[!s.dataSent&&!o.hasFailed?(v(),D(a,{key:0,style:{margin:"50px"},animated:!0,rows:2})):O("",!0),g("div",{ref:"iframeContainer",class:q(["iframe-container",{"is-hidden":o.hasFailed}])},null,2)],8,Pje)),[[l,!s.dataSent&&!o.hasFailed]])],64)}const LS=ce(Mje,[["render",Ije],["__scopeId","data-v-1796445f"]]),Lje={name:"LessonEditor",props:["lesson","section","course","editingIndex"],emits:["saved","close","changeLesson"],components:{LessonDocuments:CU,BlockEditor:kU,MediaEmbeder:_v,LessonMeta:xU,FullEditorFrame:LS},data(){return{saving:!1,showSideBar:!1,useClassic:!1,showDocumentsModal:!1}},computed:{previewUrl(){return this.$getRouteLink("course/:course_slug/lessons/:lesson_slug/view?preview=yes",{course_slug:this.course.slug,lesson_slug:this.lesson.slug})}},methods:{saveData(){this.saving=!0;const t={lesson:{id:this.lesson.id,parent_id:this.lesson.parent_id,space_id:this.lesson.space_id,title:this.lesson.title,message:this.lesson.message,meta:this.lesson.meta,status:this.lesson.status}};this.$put("admin/courses/"+this.lesson.space_id+"/lessons/"+this.lesson.id,t).then(e=>{this.$notify.success(e.message),this.$emit("saved",e.lesson),this.dispatchLessonSaveEvent(e.lesson,t)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},dispatchLessonSaveEvent(t,e){const n={lesson:t,lessonData:e};if(this.$refs.fullEditorFrame&&this.$refs.fullEditorFrame.editorFrame)try{if(this.$refs.fullEditorFrame.editorFrame.contentWindow){const i=new CustomEvent("fluentcommunity:lesson:after_save",{detail:n});this.$refs.fullEditorFrame.editorFrame.contentWindow.dispatchEvent(i);return}}catch(i){console.warn("Could not dispatch event to iframe:",i)}window.dispatchEvent(new CustomEvent("fluentcommunity:lesson:after_save",{detail:n}))},onDocumentsModalClosed(){this.$refs.fullEditorFrame&&this.$refs.fullEditorFrame.syncMetaToEditor(this.lesson.meta)},switchToClassic(){this.useClassic=!0,window.fcomFullEditorFailed=!0}},mounted(){window.fcomFullEditorFailed&&(this.useClassic=!0),document.body.classList.add("fcom-no-scroll")},beforeUnmount(){document.body.classList.remove("fcom-no-scroll")}},Oje={class:"fcom_full_editor"},Dje={class:"fcom_full_editor_header"},Rje=["aria-label"],Vje={class:"fcom_desktop_only"},Fje={key:0},Nje={class:"full_editor_actions"},Bje={class:"fcom_lesson_camp"},zje={class:"fcom_lesson_nav"},Hje=["title","href"],Uje={style:{padding:"20px"}},jje={class:"fcom_lesson_content"},Wje={key:0},Yje={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},qje={class:"fcom_lesson_title"},Gje={class:"fcom_documents_dialog_footer"};function Xje(t,e,n,i,s,o){const r=B("ArrowLeft"),a=we,l=ze,c=B("ArrowRight"),u=B("arrow-down"),d=Ar,h=Er,f=$r,p=B("View"),m=K1,b=B("lesson-meta"),w=zs,k=X1,C=ht,A=B("block-editor"),S=B("FullEditorFrame"),M=yo,P=G1,T=B("LessonDocuments"),I=$s,L=xt("loading");return v(),$("div",Oje,[_(P,null,{default:y(()=>[_(m,{class:"fcom_full_editor_header_wrap"},{default:y(()=>[g("div",Dje,[g("button",{type:"button",onClick:e[0]||(e[0]=R=>t.$emit("close")),class:"fcom_back_header","aria-label":t.$t("Back to Lessons")},[_(a,{class:"fcom_arrow_icon"},{default:y(()=>[_(r)]),_:1}),g("span",Vje,x(t.$t("Back to Lessons")),1),n.course&&n.course.title?(v(),$("span",Fje,"("+x(n.course.title)+")",1)):O("",!0)],8,Rje),g("div",Nje,[g("div",Bje,[g("div",null,x(t.$t("Lesson %1$s of %2$s - %3$s",n.editingIndex+1,n.section.lessons.length,n.section.title)),1),g("div",zje,[_(l,{onClick:e[1]||(e[1]=R=>t.$emit("changeLesson",n.editingIndex-1)),disabled:n.editingIndex===0,size:"small"},{default:y(()=>[_(a,{class:"fcom_arrow_icon"},{default:y(()=>[_(r)]),_:1})]),_:1},8,["disabled"]),_(l,{onClick:e[2]||(e[2]=R=>t.$emit("changeLesson",n.editingIndex+1)),disabled:n.editingIndex+1===n.section.lessons.length,size:"small"},{default:y(()=>[_(a,{class:"fcom_arrow_icon"},{default:y(()=>[_(c)]),_:1})]),_:1},8,["disabled"])])]),t.isMobile&&!s.showSideBar?(v(),D(l,{key:0,text:"",onClick:e[3]||(e[3]=R=>s.showSideBar=!s.showSideBar)},{default:y(()=>[g("span",null,x(t.$t("Features")),1)]),_:1})):O("",!0),_(f,{onCommand:e[4]||(e[4]=R=>{n.lesson.status=R}),trigger:"click"},{dropdown:y(()=>[_(h,null,{default:y(()=>[_(d,{command:"draft"},{default:y(()=>[N(x(t.$t("Draft")),1)]),_:1}),_(d,{command:"published"},{default:y(()=>[N(x(t.$t("Published")),1)]),_:1})]),_:1})]),default:y(()=>[_(l,{type:n.lesson.status=="published"?"success":"info",bg:"",text:"",class:"el-dropdown-link"},{default:y(()=>[N(x(t.$labelize(n.lesson.status))+" ",1),_(a,{class:"el-icon--right"},{default:y(()=>[_(u)]),_:1})]),_:1},8,["type"])]),_:1}),Re((v(),D(l,{style:{"margin-left":"15px"},disabled:s.saving,onClick:o.saveData,class:"fcom_primary_button"},{default:y(()=>[N(x(t.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[L,s.saving]]),g("a",{title:t.$t("Preview Lesson"),class:"el-button el-button--text",target:"_blank",rel:"noopener",href:o.previewUrl},[_(a,null,{default:y(()=>[_(p)]),_:1})],8,Hje)])])]),_:1}),_(P,{class:"fcom_full_editor_container fcom_lesson_editor_full"},{default:y(()=>[s.useClassic?Re((v(),D(k,{key:0,style:{padding:"0"},class:"fcom_full_editor_side",width:"300px"},{default:y(()=>[_(w,{height:"calc(100vh - 60px)"},{default:y(()=>[g("div",Uje,[_(b,{course:n.course,lesson:n.lesson},null,8,["course","lesson"]),t.isMobile?(v(),D(l,{key:0,size:"small",onClick:e[5]||(e[5]=R=>s.showSideBar=!1)},{default:y(()=>[_(a,{class:"fcom_arrow_icon"},{default:y(()=>[_(r)]),_:1}),g("span",null,x(t.$t("Close")),1)]),_:1})):O("",!0)])]),_:1})]),_:1},512)),[[jt,s.showSideBar||!t.isMobile]]):O("",!0),_(M,{style:{overflow:"hidden",padding:"0"},class:"fcom_full_editor_main"},{default:y(()=>[O("",!0),g("div",jje,[s.useClassic?(v(),$("div",Wje,[_(w,{height:"calc(100vh - 60px)",class:"fcom_lesson_editor_scroll"},{default:y(()=>[g("div",Yje,[g("div",qje,[g("label",null,x(t.$t("Lesson Title")),1),_(C,{type:"text",class:"fcom_input_h1",modelValue:n.lesson.title,"onUpdate:modelValue":e[7]||(e[7]=R=>n.lesson.title=R),size:"large",placeholder:t.$t("Lesson Title")},null,8,["modelValue","placeholder"])]),g("label",null,x(t.$t("Lesson Content")),1),_(A,{modelValue:n.lesson.message,"onUpdate:modelValue":e[8]||(e[8]=R=>n.lesson.message=R)},null,8,["modelValue"])])]),_:1})])):(v(),D(S,{key:1,ref:"fullEditorFrame",onUseAlternateEditor:o.switchToClassic,editorParams:{context:"course_lesson",lesson_id:n.lesson.id},frameHeight:"calc(100vh - 60px)",documentTitle:n.lesson.title,metaSettings:n.lesson.meta,onTitleUpdated:e[9]||(e[9]=R=>{n.lesson.title=R}),onMetaUpdated:e[10]||(e[10]=R=>{n.lesson.meta=R}),featured_image_id:n.lesson.meta.featured_image_id||"",onFeaturedMediaUpdated:e[11]||(e[11]=R=>{n.lesson.meta.featured_image_id=R}),onManageDocuments:e[12]||(e[12]=R=>s.showDocumentsModal=!0),modelValue:n.lesson.message,"onUpdate:modelValue":e[13]||(e[13]=R=>n.lesson.message=R)},null,8,["onUseAlternateEditor","editorParams","documentTitle","metaSettings","featured_image_id","modelValue"]))])]),_:1})]),_:1})]),_:1}),_(I,{modelValue:s.showDocumentsModal,"onUpdate:modelValue":e[15]||(e[15]=R=>s.showDocumentsModal=R),title:t.$t("Documents & Files"),width:"600px","close-on-click-modal":!1,onClosed:o.onDocumentsModalClosed,class:"fcom_documents_dialog"},{footer:y(()=>[g("div",Gje,[_(l,{type:"primary",onClick:e[14]||(e[14]=R=>s.showDocumentsModal=!1)},{default:y(()=>[N(x(t.$t("Done")),1)]),_:1})])]),default:y(()=>[_(T,{lesson:n.lesson},null,8,["lesson"])]),_:1},8,["modelValue","title","onClosed"])])}const SU=ce(Lje,[["render",Xje]]),Kje={name:"LessonLine",emits:["showEditor","updated","deleteLesson","moveLesson","duplicateLesson"],props:["course","sections","lesson"],components:{LessonEditor:SU,SlugInput:Yd},data(){return{editing_title:!1,editingSlugPopup:!1,showMoveLessonPopup:!1,selectedSectionId:null}},computed:{filteredSections(){return this.sections.filter(t=>t.id!=this.lesson.parent_id)},isQuizType(){var t;return((t=this.lesson)==null?void 0:t.content_type)==="quiz"},menuLabels(){return this.isQuizType?{preview:this.$t("Preview Quiz"),move:this.$t("Move Quiz"),duplicate:this.$t("Duplicate Quiz"),delete:this.$t("Delete Quiz")}:{preview:this.$t("Preview Lesson"),move:this.$t("Move Lesson"),duplicate:this.$t("Duplicate Lesson"),delete:this.$t("Delete Lesson")}}},methods:{updateLessonStatus(t){if(this.lesson.status===t)return!1;this.lesson.status=t,this.$emit("updated",this.lesson,["status"])},updateLessonTitle(){this.editing_title=!1,this.$emit("updated",this.lesson,["title"])},updateLessonSlug(){this.editingSlugPopup=!1,this.$emit("updated",this.lesson,["slug"])},showEditor(){this.editing_title=!0,this.$nextTick(()=>{this.$refs.lesson_title_edit.focus()})},moveLesson(){this.showMoveLessonPopup=!1,this.$emit("moveLesson",this.lesson.id,this.selectedSectionId)},handleLessonAction(t){if(t==="edit_title")this.showEditor();else if(t==="delete")this.$emit("deleteLesson",this.lesson);else if(t==="edit_lesson")this.$emit("showEditor",this.lesson);else if(t==="preview_lesson"){let e=this.$getRouteLink("course/:course_slug/lessons/:lesson_slug/view?preview=yes",{course_slug:this.course.slug,lesson_slug:this.lesson.slug});window.open(e,"_blank")}else t==="move_lesson"?(this.showMoveLessonPopup=!0,this.selectedSectionId=null,this.showOnlyThisPopup("fcom_action_lesson_popup")):t==="duplicate_lesson"?this.$emit("duplicateLesson",this.lesson):t==="edit_slug"&&(this.editingSlugPopup=!0,this.showOnlyThisPopup("fcom_edit_slug_popup"))},showOnlyThisPopup(t){this.$nextTick(()=>{document.querySelector(`.${t}.lesson_${this.lesson.id}`).style.display="block",document.querySelectorAll(`.${t}:not(.lesson_${this.lesson.id})`).forEach(e=>e.style.display="none")})}}},Zje={key:0,class:"fcom_heading_item"},Jje=["innerHTML"],Qje={class:"fcom_section_item_actions"},eWe={class:"fcom_action_lesson"},tWe={class:"fcom_move_popup_close"},nWe={class:"fcom_move_popup_close"};function sWe(t,e,n,i,s,o){const r=qs,a=ze,l=ht,c=B("arrow-down"),u=we,d=Ar,h=Er,f=$r,p=B("MoreFilled"),m=Zt,b=Wt,w=tn,k=nn,C=B("Close"),A=B("slug-input");return v(),$(J,null,[g("div",{class:q([{fcom_title_editing:s.editing_title},"fcom_section_item_title fcom_title_editable"])},[le(t.$slots,"before_section_heading"),s.editing_title?(v(),D(l,{key:1,onKeydown:e[1]||(e[1]=ut(S=>s.editing_title=!1,["esc"])),ref:"lesson_title_edit",onKeyup:ut(o.updateLessonTitle,["enter"]),modelValue:n.lesson.title,"onUpdate:modelValue":e[2]||(e[2]=S=>n.lesson.title=S)},{append:y(()=>[_(a,{onClick:o.updateLessonTitle},{default:y(()=>[N(x(t.$t("Save")),1)]),_:1},8,["onClick"])]),_:1},8,["onKeyup","modelValue"])):(v(),$("p",Zje,[g("span",{onClick:e[0]||(e[0]=S=>t.$emit("showEditor",n.lesson)),innerHTML:n.lesson.title},null,8,Jje),o.isQuizType?(v(),D(r,{key:0},{default:y(()=>[N(x(t.$t("quiz")),1)]),_:1})):O("",!0)]))],2),g("div",Qje,[_(a,{onClick:e[3]||(e[3]=S=>t.$emit("showEditor",n.lesson)),class:"fcom_show_hover",text:""},{default:y(()=>[N(x(o.isQuizType?t.$t("Edit Quiz"):t.$t("Edit Lesson")),1)]),_:1}),_(f,{onCommand:e[4]||(e[4]=S=>{o.updateLessonStatus(S)}),trigger:"click"},{dropdown:y(()=>[_(h,null,{default:y(()=>[_(d,{command:"draft"},{default:y(()=>[N(x(t.$t("Draft")),1)]),_:1}),_(d,{command:"published"},{default:y(()=>[N(x(t.$t("Published")),1)]),_:1})]),_:1})]),default:y(()=>[_(a,{class:q(["el-dropdown-link",`fcom_button_${n.lesson.status==="published"?"success":"info"}`]),bg:"",text:""},{default:y(()=>[N(x(t.$labelize(n.lesson.status))+" ",1),_(u,{class:"el-icon--right"},{default:y(()=>[_(c)]),_:1})]),_:1},8,["class"])]),_:1}),g("div",eWe,[_(f,{onCommand:o.handleLessonAction,trigger:"click"},{dropdown:y(()=>[_(h,null,{default:y(()=>[_(d,{command:"edit_lesson"},{default:y(()=>[N(x(t.$t("Edit Content")),1)]),_:1}),_(d,{command:"edit_title"},{default:y(()=>[N(x(t.$t("Edit Title")),1)]),_:1}),_(d,{command:"edit_slug"},{default:y(()=>[N(x(t.$t("Edit Slug")),1)]),_:1}),_(d,{command:"preview_lesson"},{default:y(()=>[N(x(o.menuLabels.preview),1)]),_:1}),_(d,{command:"move_lesson"},{default:y(()=>[N(x(o.menuLabels.move),1)]),_:1}),_(d,{command:"duplicate_lesson"},{default:y(()=>[N(x(o.menuLabels.duplicate),1)]),_:1}),_(d,{command:"delete"},{default:y(()=>[N(x(o.menuLabels.delete),1)]),_:1})]),_:1})]),default:y(()=>[_(a,{"aria-label":t.$t("View actions"),size:"small",class:"fcom_dot_menu",text:""},{default:y(()=>[_(u,null,{default:y(()=>[_(p)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"]),Re(g("div",{class:q(["fcom_action_lesson_popup","lesson_"+n.lesson.id])},[_(k,{onSubmit:e[6]||(e[6]=Me(S=>t.doNothing(),["prevent"])),"label-position":"top"},{default:y(()=>[_(w,{label:t.$t("Move to a different Section")},{default:y(()=>[_(b,{placeholder:t.$t("Select Section"),modelValue:s.selectedSectionId,"onUpdate:modelValue":e[5]||(e[5]=S=>s.selectedSectionId=S)},{default:y(()=>[(v(!0),$(J,null,ye(o.filteredSections,S=>(v(),D(m,{key:S.id,label:S.title,value:S.id},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),_(a,{onClick:o.moveLesson,disabled:!s.selectedSectionId,class:"fcom_primary_button"},{default:y(()=>[N(x(o.menuLabels.move),1)]),_:1},8,["onClick","disabled"])]),_:1}),g("div",tWe,[_(u,{onClick:e[7]||(e[7]=S=>s.showMoveLessonPopup=!1)},{default:y(()=>[_(C)]),_:1})])],2),[[jt,s.showMoveLessonPopup]]),Re(g("div",{class:q(["fcom_edit_slug_popup","lesson_"+n.lesson.id])},[_(k,{onSubmit:e[9]||(e[9]=Me(S=>t.doNothing(),["prevent"])),"label-position":"top"},{default:y(()=>[_(w,{label:t.$t("Slug (optional)")},{default:y(()=>[_(A,{modelValue:n.lesson.slug,"onUpdate:modelValue":e[8]||(e[8]=S=>n.lesson.slug=S),is_inital_inactive:!0,placeholder:t.$t("Slug of the lesson")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(a,{onClick:o.updateLessonSlug,class:"fcom_primary_button"},{default:y(()=>[N(x(t.$t("Save")),1)]),_:1},8,["onClick"])]),_:1}),g("div",nWe,[_(u,{onClick:e[10]||(e[10]=S=>s.editingSlugPopup=!1)},{default:y(()=>[_(C)]),_:1})])],2),[[jt,s.editingSlugPopup]])])])],64)}const iWe=ce(Kje,[["render",sWe]]),oWe={name:"QuizTypeIcon",props:{type:{type:String,default:""},size:{type:Number,default:18}}},rWe=["width","height"],aWe={key:7,d:"M4 7h16M4 12h16M4 17h10"};function lWe(t,e,n,i,s,o){return v(),$("svg",{class:"fcom_quiz_type_icon",width:n.size,height:n.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[n.type==="single_choice"?(v(),$(J,{key:0},[e[0]||(e[0]=g("circle",{cx:"12",cy:"12",r:"8"},null,-1)),e[1]||(e[1]=g("circle",{cx:"12",cy:"12",r:"3",fill:"currentColor"},null,-1))],64)):n.type==="multiple_choice"?(v(),$(J,{key:1},[e[2]||(e[2]=g("rect",{x:"4",y:"4",width:"16",height:"16",rx:"3"},null,-1)),e[3]||(e[3]=g("path",{d:"M8 12l3 3 5-6"},null,-1))],64)):n.type==="true_false"?(v(),$(J,{key:2},[e[4]||(e[4]=g("path",{d:"M3 12l3 3 5-6"},null,-1)),e[5]||(e[5]=g("path",{d:"M14 8l7 7M21 8l-7 7"},null,-1))],64)):n.type==="fill_in_the_blank"?(v(),$(J,{key:3},[e[6]||(e[6]=g("path",{d:"M3 15h4M17 15h4"},null,-1)),e[7]||(e[7]=g("rect",{x:"9",y:"10",width:"6",height:"7",rx:"1.5"},null,-1))],64)):n.type==="ordering"?(v(),$(J,{key:4},[e[8]||(e[8]=g("path",{d:"M5 4v16M2 7l3-3 3 3M2 17l3 3 3-3"},null,-1)),e[9]||(e[9]=g("path",{d:"M12 7h9M12 12h9M12 17h9"},null,-1))],64)):n.type==="matching"?(v(),$(J,{key:5},[e[10]||(e[10]=xr('<circle cx="5" cy="7" r="2"></circle><circle cx="5" cy="17" r="2"></circle><circle cx="19" cy="7" r="2"></circle><circle cx="19" cy="17" r="2"></circle><path d="M7 7.5l10 9M7 16.5l10-9"></path>',5))],64)):n.type==="image_matching"?(v(),$(J,{key:6},[e[11]||(e[11]=g("rect",{x:"2",y:"5",width:"11",height:"14",rx:"2"},null,-1)),e[12]||(e[12]=g("path",{d:"M2 15l3-3 3 3 2-2 3 3"},null,-1)),e[13]||(e[13]=g("path",{d:"M16 12h6M19 9l3 3-3 3"},null,-1))],64)):(v(),$("path",aWe))],8,rWe)}const cWe=ce(oWe,[["render",lWe]]),uWe={name:"BlankEditor",props:{question:{type:Object,required:!0}},computed:{parsed(){return eb(this.question.blank_text)}},methods:{insertBlank(){var o;const t=(o=this.$refs.blankInput)==null?void 0:o.textarea,e=this.question.blank_text||"",n=t?t.selectionStart:e.length,i=t?t.selectionEnd:e.length,s=e.slice(n,i)||this.$t("answer");this.question.blank_text=e.slice(0,n)+"[["+s+"]]"+e.slice(i),this.$nextTick(()=>{t&&(t.focus(),t.setSelectionRange(n+2,n+2+s.length))})}}},dWe={class:"fcom_blank_editor"},hWe={class:"fcom_quiz_type_toolbar"},fWe={class:"sub_label"},pWe={class:"fcom_help_text"},mWe={key:0,class:"fcom_blank_list"},gWe={class:"fcom_blank_number"};function vWe(t,e,n,i,s,o){const r=ze,a=ht,l=qs;return v(),$("div",dWe,[g("div",hWe,[g("span",fWe,x(t.$t("Sentence with blanks")),1),_(r,{size:"small",onClick:o.insertBlank},{default:y(()=>[N(x("+ "+t.$t("Insert blank")),1)]),_:1},8,["onClick"])]),_(a,{ref:"blankInput",modelValue:n.question.blank_text,"onUpdate:modelValue":e[0]||(e[0]=c=>n.question.blank_text=c),type:"textarea",autosize:{minRows:3,maxRows:8},"aria-label":t.$t("Sentence with blanks"),placeholder:t.$t("The capital of France is [[Paris]].")},null,8,["modelValue","aria-label","placeholder"]),g("p",pWe,x(t.$t("Select a word and press Insert blank, or type [[answer]]. Separate accepted variants with |, like [[Paris|paris city]].")),1),o.parsed.blanks.length?(v(),$("ul",mWe,[(v(!0),$(J,null,ye(o.parsed.blanks,(c,u)=>(v(),$("li",{key:u},[g("span",gWe,x(t.$t("Blank %s",u+1)),1),(v(!0),$(J,null,ye(c,d=>(v(),D(l,{key:d,size:"small",type:"info","disable-transitions":""},{default:y(()=>[N(x(d),1)]),_:2},1024))),128))]))),128))])):O("",!0)])}const _We=ce(uWe,[["render",vWe]]),yWe={name:"ListEditor",components:{FluentDnD:Tr},props:{question:{type:Object,required:!0}},data(){return{DeleteIcon:Xs(mp),keyCounter:0}},methods:{addItem(){this.question.options.push({label:"",_key:"item_"+ ++this.keyCounter})}}},bWe={class:"fcom_list_editor"},wWe={class:"sub_label"},kWe={class:"fcom_question_option"},CWe={class:"fcom_order_number"};function xWe(t,e,n,i,s,o){const r=ht,a=ze,l=B("FluentDnD");return v(),$("div",bWe,[g("span",wWe,x(t.$t("Enter the items in the correct order. Students get them shuffled.")),1),_(l,{items:n.question.options,"row-key":"_key",class:"fcom_modal_options"},{item:y(({data:c,index:u})=>[g("div",kWe,[e[0]||(e[0]=g("div",{class:"fcom_drag_handle fcom_option_drag","aria-hidden":"true"},"⋮⋮",-1)),g("span",CWe,x(u+1),1),_(r,{modelValue:c.label,"onUpdate:modelValue":d=>c.label=d,type:"text","aria-label":t.$t("Item %s",u+1)},null,8,["modelValue","onUpdate:modelValue","aria-label"]),n.question.options.length>2?(v(),D(a,{key:0,text:"",type:"danger",icon:s.DeleteIcon,"aria-label":t.$t("Remove item"),onClick:d=>n.question.options.splice(u,1)},null,8,["icon","aria-label","onClick"])):O("",!0)])]),_:1},8,["items"]),_(a,{class:"fcom_add_row_link",link:"",type:"primary",onClick:o.addItem},{default:y(()=>[N(x("+ "+t.$t("Add item")),1)]),_:1},8,["onClick"])])}const SWe=ce(yWe,[["render",xWe]]),$We={name:"PairsEditor",components:{BgImageUpload:Tp},props:{question:{type:Object,required:!0},withImages:{type:Boolean,default:!1}},data(){return{DeleteIcon:Xs(mp),keyCounter:0}},created(){Array.isArray(this.question.extra_matches)||(this.question.extra_matches=[])},methods:{addPair(){const t=this.withImages?{image_url:"",match:""}:{label:"",match:""};this.question.options.push({...t,_key:"pair_"+ ++this.keyCounter})}}},AWe={class:"sub_label"},EWe={class:"fcom_image_pairs"},MWe={class:"fcom_pair_row"},TWe={class:"sub_label"},PWe={class:"fcom_extra_matches"},IWe={class:"sub_label"};function LWe(t,e,n,i,s,o){const r=B("BgImageUpload"),a=ht,l=ze,c=fF;return v(),$("div",{class:q(["fcom_pairs_editor",{with_images:n.withImages}])},[n.withImages?(v(),$(J,{key:0},[g("span",AWe,x(t.$t("Upload an image and type the label that belongs to it.")),1),g("div",EWe,[(v(!0),$(J,null,ye(n.question.options,(u,d)=>(v(),$("div",{key:u._key,class:"fcom_image_pair"},[_(r,{modelValue:u.image_url,"onUpdate:modelValue":h=>u.image_url=h,can_remove:!0,button_text:t.$t("Upload image")},null,8,["modelValue","onUpdate:modelValue","button_text"]),g("div",MWe,[_(a,{modelValue:u.match,"onUpdate:modelValue":h=>u.match=h,placeholder:t.$t("Label"),"aria-label":t.$t("Label for image %s",d+1)},null,8,["modelValue","onUpdate:modelValue","placeholder","aria-label"]),n.question.options.length>2?(v(),D(l,{key:0,text:"",type:"danger",icon:s.DeleteIcon,"aria-label":t.$t("Remove pair"),onClick:h=>n.question.options.splice(d,1)},null,8,["icon","aria-label","onClick"])):O("",!0)])]))),128))])],64)):(v(),$(J,{key:1},[g("span",TWe,x(t.$t("Students see the prompts in this order and the matches shuffled.")),1),(v(!0),$(J,null,ye(n.question.options,(u,d)=>(v(),$("div",{key:u._key,class:"fcom_pair_row"},[_(a,{modelValue:u.label,"onUpdate:modelValue":h=>u.label=h,placeholder:t.$t("Prompt"),"aria-label":t.$t("Prompt %s",d+1)},null,8,["modelValue","onUpdate:modelValue","placeholder","aria-label"]),e[1]||(e[1]=g("span",{class:"fcom_pair_arrow","aria-hidden":"true"},"→",-1)),_(a,{modelValue:u.match,"onUpdate:modelValue":h=>u.match=h,placeholder:t.$t("Correct match"),"aria-label":t.$t("Match for prompt %s",d+1)},null,8,["modelValue","onUpdate:modelValue","placeholder","aria-label"]),n.question.options.length>2?(v(),D(l,{key:0,text:"",type:"danger",icon:s.DeleteIcon,"aria-label":t.$t("Remove pair"),onClick:h=>n.question.options.splice(d,1)},null,8,["icon","aria-label","onClick"])):O("",!0)]))),128))],64)),_(l,{class:"fcom_add_row_link",link:"",type:"primary",onClick:o.addPair},{default:y(()=>[N(x("+ "+t.$t("Add pair")),1)]),_:1},8,["onClick"]),g("div",PWe,[g("span",IWe,x(n.withImages?t.$t("Extra labels (optional)"):t.$t("Extra matches (optional)")),1),_(c,{modelValue:n.question.extra_matches,"onUpdate:modelValue":e[0]||(e[0]=u=>n.question.extra_matches=u),trigger:"Enter",placeholder:t.$t("Wrong answers with no pair, press Enter to add"),"aria-label":n.withImages?t.$t("Extra labels (optional)"):t.$t("Extra matches (optional)")},null,8,["modelValue","placeholder","aria-label"])])],2)}const OWe=ce($We,[["render",LWe]]),DWe={name:"AddQuestionModal",components:{CrepeEditor:uu,BgImageUpload:Tp,FluentDnD:Tr,QuizTypeIcon:cWe,BlankEditor:_We,ListEditor:SWe,PairsEditor:OWe},emits:["close","addQuestion","updateQuestion"],props:{lesson:{type:Object,required:!0},question:{type:Object,required:!1}},data(){return{showModal:!0,appReady:!1,questionData:null,optKeyCounter:0,originalQuestionData:null,openPanels:[],DeleteIcon:Xs(mp),questionTypes:this.appVars.question_types||[]}},watch:{showModal(t){t||this.$emit("close")},"questionData.type"(t,e){if(!(!e||t===e)){if(nm.includes(t)&&nm.includes(e)){t==="single_choice"&&this.questionData.options.forEach((n,i)=>{n.is_correct=i===0});return}Object.assign(this.questionData,this.defaultsFor(t))}}},computed:{isDirty(){return!this.questionData||!this.originalQuestionData?!1:JSON.stringify(this.cleanQuestion())!==this.originalQuestionData},isRemovable(){return this.questionData.options.length>1},isChoice(){return nm.includes(this.questionData.type)},isSingleChoice(){return this.questionData.type=="single_choice"},isWrittenAnswer(){return this.questionData.type==="written_answer"},isFillBlank(){return this.questionData.type==="fill_in_the_blank"},isPairs(){return z3.includes(this.questionData.type)},isExactMatch(){return this.questionData.grading_mode==="exact_match"},isNewQuestion(){return!this.question},typeGroups(){const t={choice:this.$t("Choice"),text:this.$t("Text"),arrange:this.$t("Arrange"),other:this.$t("Other")},e=Object.values(gT).flat(),n={...gT,other:this.questionTypes.map(i=>i.value).filter(i=>!e.includes(i))};return Object.keys(n).map(i=>({key:i,label:t[i],types:this.questionTypes.filter(s=>n[i].includes(s.value))})).filter(i=>i.types.length)},trueFalseAnswer:{get(){const t=this.questionData.options.find(e=>e.is_correct);return t?t.label:"True"},set(t){this.questionData.options.forEach(e=>{e.is_correct=e.label===t})}}},methods:{defaultsFor(t){const e=i=>i.map(s=>({...s,_key:++this.optKeyCounter})),n={grading_mode:"open",correct_answers:[],blank_text:"",extra_matches:[],options:[]};return nm.includes(t)?n.options=e([{label:"Option 1",is_correct:!0},{label:"Option 2",is_correct:!1}]):t==="true_false"?n.options=e([{label:"True",is_correct:!0},{label:"False",is_correct:!1}]):t==="ordering"?n.options=e([{label:""},{label:""},{label:""}]):t==="matching"?n.options=e([{label:"",match:""},{label:"",match:""}]):t==="image_matching"&&(n.options=e([{image_url:"",match:""},{image_url:"",match:""}])),n},confirmDiscard(){return this.$confirm(this.$t("You have unsaved changes. Closing will discard them. Continue?"),this.$t("Discard changes?"),{confirmButtonText:this.$t("Discard"),cancelButtonText:this.$t("Keep editing"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"})},requestClose(){if(!this.isDirty){this.showModal=!1;return}this.confirmDiscard().then(()=>{this.showModal=!1}).catch(()=>{})},handleBeforeClose(t){if(!this.isDirty){t();return}this.confirmDiscard().then(()=>t()).catch(()=>{})},cleanQuestion(){return{...this.questionData,options:this.questionData.options.map(({_key:t,...e})=>e)}},addQuestion(){this.checkValidation()&&(this.showModal=!1,this.$emit("addQuestion",this.prepareQuestionData()))},updateQuestion(){this.checkValidation()&&(this.showModal=!1,this.$emit("updateQuestion",this.prepareQuestionData()))},prepareQuestionData(){const t=this.cleanQuestion();return t.type==="written_answer"&&(t.options=[],t.correct_answers=t.grading_mode==="exact_match"?this.getCleanCorrectAnswers():[]),t.type==="fill_in_the_blank"&&(t.options=[]),z3.includes(t.type)&&(t.extra_matches=[...new Set((t.extra_matches||[]).map(e=>(e||"").trim()).filter(Boolean))]),t},getCleanCorrectAnswers(){return[...new Set((this.questionData.correct_answers||[]).map(t=>(t||"").trim()).filter(Boolean))]},addNewOption(){const t=this.questionData.options.length;this.questionData.options.push({label:`Option ${t+1}`,is_correct:!1,_key:++this.optKeyCounter})},removeOption(t){this.questionData.options.splice(t,1)},checkOption(t){this.isSingleChoice&&this.questionData.options.forEach(e=>{e.is_correct=e===t})},typeErrors(){const{options:t,type:e,grading_mode:n,blank_text:i}=this.questionData,s=o=>typeof o=="string"&&o.trim()!=="";return nm.includes(e)?[{valid:Array.isArray(t)&&t.length>=2,message:this.$t("Please add at least 2 options")},{valid:t&&t.every(o=>s(o.label)),message:this.$t("Please enter a label for each option")},{valid:t&&t.some(o=>o.is_correct===!0),message:this.$t("Please select the correct option")}]:e==="written_answer"&&n==="exact_match"?[{valid:this.getCleanCorrectAnswers().length>0,message:this.$t("Please add at least one correct answer")}]:e==="fill_in_the_blank"?[{valid:eb(i).blanks.length>0,message:this.$t("Please add at least one blank")}]:e==="ordering"?[{valid:t.length>=2,message:this.$t("Please add at least 2 items")},{valid:t.every(o=>s(o.label)),message:this.$t("Please fill in every item")}]:e==="matching"?[{valid:t.length>=2,message:this.$t("Please add at least 2 pairs")},{valid:t.every(o=>s(o.label)&&s(o.match)),message:this.$t("Please fill in every prompt and match")}]:e==="image_matching"?[{valid:t.length>=2,message:this.$t("Please add at least 2 pairs")},{valid:t.every(o=>s(o.image_url)&&s(o.match)),message:this.$t("Please add an image and a label to every pair")}]:[]},checkValidation(){if(!this.has_pro)return!1;const{label:t,type:e}=this.questionData,i=[{valid:e==="fill_in_the_blank"||!!t&&t.trim()!=="",message:this.$t("Please enter a question")},...this.typeErrors()].find(s=>!s.valid);return i?(this.$handleError(i.message),!1):!0}},created(){if(this.isNewQuestion){const t="single_choice";this.questionData={slug:"",type:t,label:"",image_url:"",enabled:!0,image_enabled:!1,help_text:"",explanation:"",...this.defaultsFor(t)}}else this.questionData=JSON.parse(JSON.stringify(this.question)),Array.isArray(this.questionData.options)||(this.questionData.options=[]),this.questionData.options.forEach(t=>{t._key=++this.optKeyCounter});typeof this.questionData.explanation>"u"&&(this.questionData.explanation=""),Array.isArray(this.questionData.correct_answers)||(this.questionData.correct_answers=[]),this.questionData.grading_mode||(this.questionData.grading_mode="open"),z3.includes(this.questionData.type)&&!Array.isArray(this.questionData.extra_matches)&&(this.questionData.extra_matches=[]),(this.questionData.help_text||this.questionData.explanation)&&(this.openPanels=["more"]),this.originalQuestionData=JSON.stringify(this.cleanQuestion())},mounted(){this.$nextTick(()=>{this.appReady=!0})}},RWe={class:"dialog_header"},VWe={class:"dialog_left"},FWe={class:"dialog_body"},NWe={class:"fcom_type_option"},BWe={class:"fcom_type_text"},zWe={class:"fcom_type_label"},HWe={key:0,class:"fcom_type_desc"},UWe={key:0,class:"fcom_banner_image_holder"},jWe={key:1,class:"fcom_banner_image_preview"},WWe={class:"fcom_help_text"},YWe={class:"sub_label"},qWe={class:"fcom_question_option"},GWe={class:"fcom_more_options_title"},XWe={class:"fcom_more_options_label"},KWe={class:"fcom_more_options_hint"},ZWe={class:"fcom_explanation_help"},JWe={class:"dialog_footer fcom_question_dialog_footer"},QWe={class:"fcom_question_enabled"},eYe={key:0};function tYe(t,e,n,i,s,o){const r=B("QuizTypeIcon"),a=Zt,l=q1,c=Wt,u=tn,d=tu,h=B("BgImageUpload"),f=bo,p=B("CloseBold"),m=we,b=ze,w=B("crepe-editor"),k=Li,C=ws,A=fF,S=qt,M=ht,P=E8,T=B("FluentDnD"),I=Qc,L=B("BlankEditor"),R=B("ListEditor"),V=B("PairsEditor"),H=LV,F=IV,U=nn,Y=$s;return v(),D(Y,{modelValue:s.showModal,"onUpdate:modelValue":e[13]||(e[13]=z=>s.showModal=z),width:t.drawerWidth,"modal-class":"fcom_common_dialog question_dialog","align-center":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,"before-close":o.handleBeforeClose},{header:y(()=>[g("div",RWe,[g("div",VWe,[g("h4",null,x(o.isNewQuestion?t.$t("Add Question"):t.$t("Edit Question")),1)])])]),footer:y(()=>[g("div",JWe,[g("label",QWe,[_(d,{modelValue:s.questionData.enabled,"onUpdate:modelValue":e[12]||(e[12]=z=>s.questionData.enabled=z),"aria-label":t.$t("Enable this question")},null,8,["modelValue","aria-label"]),g("span",null,x(t.$t("Enabled")),1)]),_(b,{class:"fcom_secondary_button",onClick:o.requestClose},{default:y(()=>[N(x(t.$t("Cancel")),1)]),_:1},8,["onClick"]),o.isNewQuestion?(v(),D(b,{key:0,class:"fcom_primary_button",onClick:o.addQuestion},{default:y(()=>[N(x(t.$t("Add Question")),1)]),_:1},8,["onClick"])):(v(),D(b,{key:1,class:"fcom_primary_button",onClick:o.updateQuestion},{default:y(()=>[N(x(t.$t("Update Question"))+" ",1),t.has_pro?O("",!0):(v(),$("span",eYe," ("+x(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"]))])]),default:y(()=>[g("div",FWe,[_(U,{onSubmit:e[11]||(e[11]=Me(z=>t.doNothing(),["prevent"])),"label-position":"top",model:s.questionData},{default:y(()=>[_(u,{label:t.$t("Question Type"),class:"fcom_question_type_field"},{default:y(()=>[_(c,{modelValue:s.questionData.type,"onUpdate:modelValue":e[0]||(e[0]=z=>s.questionData.type=z),filterable:"","default-first-option":"",class:"fcom_question_type_select","popper-class":"fcom_question_type_popper",placeholder:t.$t("Search question types..."),"aria-label":t.$t("Question Type")},{prefix:y(()=>[_(r,{type:s.questionData.type},null,8,["type"])]),default:y(()=>[(v(!0),$(J,null,ye(o.typeGroups,z=>(v(),D(l,{key:z.key,label:z.label},{default:y(()=>[(v(!0),$(J,null,ye(z.types,X=>(v(),D(a,{key:X.value,value:X.value,label:X.label},{default:y(()=>[g("div",NWe,[_(r,{type:X.value},null,8,["type"]),g("span",BWe,[g("span",zWe,x(X.label),1),X.description?(v(),$("span",HWe,x(X.description),1)):O("",!0)])])]),_:2},1032,["value","label"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","placeholder","aria-label"])]),_:1},8,["label"]),_(u,{label:t.$t("Image")},{default:y(()=>[_(d,{class:"fcom_question_switch",modelValue:s.questionData.image_enabled,"onUpdate:modelValue":e[1]||(e[1]=z=>s.questionData.image_enabled=z),"aria-label":t.$t("Image")},null,8,["modelValue","aria-label"]),s.questionData.image_enabled&&!s.questionData.image_url?(v(),$("div",UWe,[g("h4",null,x(t.$t("Banner Image")),1),g("p",null,x(t.$t("Upload a banner image at the top of the question. Recommended image dimension: 1080x420")),1),_(h,{modelValue:s.questionData.image_url,"onUpdate:modelValue":e[2]||(e[2]=z=>s.questionData.image_url=z)},null,8,["modelValue"])])):s.questionData.image_enabled&&s.questionData.image_url?(v(),$("div",jWe,[_(f,{alt:t.$t("Image Preview"),src:s.questionData.image_url},null,8,["alt","src"]),_(b,{class:"fcom_secondary_button",text:"","aria-label":t.$t("Remove image"),onClick:e[3]||(e[3]=z=>s.questionData.image_url="")},{default:y(()=>[_(m,null,{default:y(()=>[_(p)]),_:1})]),_:1},8,["aria-label"])])):O("",!0)]),_:1},8,["label"]),_(u,{label:o.isFillBlank?t.$t("Instructions (optional)"):t.$t("Question")},{default:y(()=>[s.appReady?(v(),D(w,{key:o.isFillBlank?"instructions":"question",modelValue:s.questionData.label,"onUpdate:modelValue":e[4]||(e[4]=z=>s.questionData.label=z),placeholder:o.isFillBlank?t.$t("e.g. Complete the sentence"):t.$t("Write your question here")},null,8,["modelValue","placeholder"])):O("",!0)]),_:1},8,["label"]),o.isWrittenAnswer?(v(),D(u,{key:0,label:t.$t("Grading Mode")},{default:y(()=>[_(C,{modelValue:s.questionData.grading_mode,"onUpdate:modelValue":e[5]||(e[5]=z=>s.questionData.grading_mode=z)},{default:y(()=>[_(k,{value:"open"},{default:y(()=>[N(x(t.$t("Open (any answer accepted)")),1)]),_:1}),_(k,{value:"exact_match"},{default:y(()=>[N(x(t.$t("Exact Match (auto-graded)")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),o.isWrittenAnswer&&o.isExactMatch?(v(),D(u,{key:1,label:t.$t("Correct Answer(s)")},{default:y(()=>[_(A,{modelValue:s.questionData.correct_answers,"onUpdate:modelValue":e[6]||(e[6]=z=>s.questionData.correct_answers=z),trigger:"Enter",placeholder:t.$t("Type an answer and press Enter"),style:{width:"100%"}},null,8,["modelValue","placeholder"]),g("div",WWe,[g("p",null,x(t.$t("Add multiple variations to handle different ways students might write the answer (case-insensitive, trimmed).")),1)])]),_:1},8,["label"])):O("",!0),o.isChoice?(v(),D(u,{key:2,label:t.$t("Responses"),class:"fcom_question_options"},{default:y(()=>[g("span",YWe,x(t.$t("Select correct answer")),1),_(T,{items:s.questionData.options,"row-key":"_key",class:"fcom_modal_options"},{item:y(({data:z,index:X})=>[g("div",qWe,[e[14]||(e[14]=g("div",{class:"fcom_drag_handle fcom_option_drag","aria-hidden":"true"},"⋮⋮",-1)),_(S,{modelValue:z.is_correct,"onUpdate:modelValue":Z=>z.is_correct=Z,onChange:Z=>o.checkOption(z),class:q({single_choice:o.isSingleChoice})},null,8,["modelValue","onUpdate:modelValue","onChange","class"]),_(M,{modelValue:z.label,"onUpdate:modelValue":Z=>z.label=Z,type:"text"},null,8,["modelValue","onUpdate:modelValue"]),o.isRemovable?(v(),D(P,{key:0,type:"danger",title:t.$t("Remove"),"aria-label":t.$t("Remove option"),icon:s.DeleteIcon,underline:!1,onClick:Z=>o.removeOption(X)},null,8,["title","aria-label","icon","onClick"])):O("",!0)])]),_:1},8,["items"]),_(b,{class:"fcom_add_row_link",link:"",type:"primary",onClick:o.addNewOption},{default:y(()=>[N(x("+ "+t.$t("Add new option")),1)]),_:1},8,["onClick"])]),_:1},8,["label"])):O("",!0),s.questionData.type==="true_false"?(v(),D(u,{key:3,label:t.$t("Correct answer")},{default:y(()=>[_(C,{modelValue:o.trueFalseAnswer,"onUpdate:modelValue":e[7]||(e[7]=z=>o.trueFalseAnswer=z),class:"fcom_true_false_select","aria-label":t.$t("Correct answer")},{default:y(()=>[_(I,{value:"True"},{default:y(()=>[N(x(t.$t("True")),1)]),_:1}),_(I,{value:"False"},{default:y(()=>[N(x(t.$t("False")),1)]),_:1})]),_:1},8,["modelValue","aria-label"])]),_:1},8,["label"])):O("",!0),o.isFillBlank?(v(),D(u,{key:4,label:t.$t("Answer"),class:"fcom_question_options"},{default:y(()=>[_(L,{question:s.questionData},null,8,["question"])]),_:1},8,["label"])):O("",!0),s.questionData.type==="ordering"?(v(),D(u,{key:5,label:t.$t("Items"),class:"fcom_question_options"},{default:y(()=>[_(R,{question:s.questionData},null,8,["question"])]),_:1},8,["label"])):O("",!0),o.isPairs?(v(),D(u,{key:6,label:s.questionData.type==="image_matching"?t.$t("Image and label pairs"):t.$t("Pairs"),class:"fcom_question_options"},{default:y(()=>[(v(),D(V,{key:s.questionData.type,question:s.questionData,"with-images":s.questionData.type==="image_matching"},null,8,["question","with-images"]))]),_:1},8,["label"])):O("",!0),_(F,{modelValue:s.openPanels,"onUpdate:modelValue":e[10]||(e[10]=z=>s.openPanels=z),class:"fcom_more_options"},{default:y(()=>[_(H,{name:"more"},{title:y(()=>[g("span",GWe,[g("span",XWe,x(t.$t("More options")),1),g("span",KWe,x(t.$t("Help text, explanation")),1)])]),default:y(()=>[_(u,{label:t.$t("Help Text")},{default:y(()=>[_(M,{modelValue:s.questionData.help_text,"onUpdate:modelValue":e[8]||(e[8]=z=>s.questionData.help_text=z),type:"textarea",autosize:{minRows:2,maxRows:5}},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Explanation"),class:"fcom_explanation_field"},{default:y(()=>[s.appReady?(v(),D(w,{key:0,modelValue:s.questionData.explanation,"onUpdate:modelValue":e[9]||(e[9]=z=>s.questionData.explanation=z),placeholder:t.$t("Optional, shown after submit")},null,8,["modelValue","placeholder"])):O("",!0),g("p",ZWe,x(t.$t("Shown to students after they submit the quiz, regardless of whether their answer was correct or wrong.")),1)]),_:1},8,["label"])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["model"])])]),_:1},8,["modelValue","width","before-close"])}const nYe=ce(DWe,[["render",tYe]]),sYe={name:"QuizEditor",props:["lesson","section","course","editingIndex"],emits:["close","changeLesson","saved"],components:{LessonMeta:xU,CrepeEditor:uu,AddQuestionModal:nYe,FeedMdContent:Mp,FluentDnD:Tr,ActionPopover:aa,TypedAnswer:dU},data(){return{saving:!1,showSideBar:!1,appReady:!1,showQuestionModal:!1,question:null,keyCounter:0,expandedExplanations:{},canExpandExplanations:{}}},computed:{showMoving(){var t,e;return((e=(t=this.lesson.meta)==null?void 0:t.quiz_questions)==null?void 0:e.length)>1},previewUrl(){return this.$getRouteLink("course/:course_slug/lessons/:lesson_slug/view?preview=yes",{course_slug:this.course.slug,lesson_slug:this.lesson.slug})},showQuestionImage(){return t=>(t==null?void 0:t.image_enabled)&&(t==null?void 0:t.image_url)}},methods:{explanationClass(t){return"fcom_explanation_body"+(this.expandedExplanations[t]?"":" clamped")},toggleExplanation(t){this.expandedExplanations={...this.expandedExplanations,[t]:!this.expandedExplanations[t]}},checkExplanationOverflow(){var i,s;const t=this.$refs.explanationBody||[],e=(((s=(i=this.lesson)==null?void 0:i.meta)==null?void 0:s.quiz_questions)||[]).filter(o=>o.explanation_rendered),n={};t.forEach((o,r)=>{var c;const a=(c=o==null?void 0:o.$refs)==null?void 0:c.content,l=e[r];a&&l&&(n[l.slug]=a.scrollHeight>a.clientHeight+1)}),this.canExpandExplanations=n},getStatusText(t){return t.enabled?this.$t("Disable"):this.$t("Enable")},toggleQuestion(t){t.enabled=!t.enabled,this.saveData()},duplicateQuestion(t){const e=JSON.parse(JSON.stringify(t));if(e.slug="",t.label){const[i,...s]=t.label.split(`
133 +`),o=i.replace(/\s*\(Copy(?:\s+\d+)?\)\s*$/,""),r=l=>[o+(l>1?` (Copy ${l})`:" (Copy)"),...s].join(`
134 +`);let a=1;for(;this.lesson.meta.quiz_questions.some(l=>l.label===r(a));)a++;e.label=r(a)}e.label_rendered="";const n=this.lesson.meta.quiz_questions.indexOf(t)+1;this.lesson.meta.quiz_questions.splice(n,0,e),this.ensureKeys(),this.saveData()},moveUp(t){if(t==0)return;const e=this.lesson.meta.quiz_questions[t];this.lesson.meta.quiz_questions[t]=this.lesson.meta.quiz_questions[t-1],this.lesson.meta.quiz_questions[t-1]=e,this.saveData()},moveDown(t){var n,i;if(t==((i=(n=this.lesson.meta)==null?void 0:n.quiz_questions)==null?void 0:i.length)-1)return;const e=this.lesson.meta.quiz_questions[t];this.lesson.meta.quiz_questions[t]=this.lesson.meta.quiz_questions[t+1],this.lesson.meta.quiz_questions[t+1]=e,this.saveData()},openEditQuestionModal(t){this.question=t,this.showQuestionModal=!0},openAddQuestionModal(){this.has_pro&&(this.question=null,this.showQuestionModal=!0)},ensureKeys(){var t;(((t=this.lesson.meta)==null?void 0:t.quiz_questions)||[]).forEach(e=>{(e.options||[]).forEach(n=>{n._key||(n._key=++this.keyCounter)})})},buildMetaForSave(){const t={...this.lesson.meta};return Array.isArray(t.quiz_questions)&&(t.quiz_questions=t.quiz_questions.map(e=>({...e,options:(e.options||[]).map(({_key:n,...i})=>i)}))),t},orderingItemLabel(t,e){return this.$t("%1$s, position %2$s. Use the up and down arrow keys to reorder.",t.label,e+1)},isSingleAnswer(t){return t.type==="single_choice"||t.type==="true_false"},isTypedAnswer(t){return hU.includes(t.type)},optionLabel(t,e){return fU(t,e,this.$t)},typeLabel(t){var e;return((e=(this.appVars.question_types||[]).find(n=>n.value===t.type))==null?void 0:e.label)||""},previewQuestion(t){return t.type!=="fill_in_the_blank"?t:{...t,blank_segments:eb(t.blank_text).segments}},previewAnswer(t){return t.type==="fill_in_the_blank"?eb(t.blank_text).blanks.map(e=>e.join(" / ")):t.type==="ordering"?(t.options||[]).map(e=>e.label):(t.options||[]).map(e=>e.match)},normalizeSingleChoice(){var t;(((t=this.lesson.meta)==null?void 0:t.quiz_questions)||[]).forEach(e=>{if(!this.isSingleAnswer(e))return;let n=!1;(e.options||[]).forEach(i=>{i.is_correct&&!n?n=!0:i.is_correct=!1}),!n&&e.options&&e.options.length&&(e.options[0].is_correct=!0)})},syncQuestionsFromServer(t){var i,s,o;const e=((i=t==null?void 0:t.meta)==null?void 0:i.quiz_questions)||[],n=((o=(s=this.lesson)==null?void 0:s.meta)==null?void 0:o.quiz_questions)||[];e.forEach((r,a)=>{const l=n[a];if(!l)return;const c=l.options||[];Object.assign(l,r,{options:(r.options||[]).map((u,d)=>{var h;return{...u,_key:((h=c[d])==null?void 0:h._key)??++this.keyCounter}})})})},addQuestion(t){Array.isArray(this.lesson.meta.quiz_questions)||(this.lesson.meta.quiz_questions=[]),this.lesson.meta.quiz_questions.push({...t}),this.ensureKeys(),this.saveData()},updateQuestion(t){var e,n,i;this.lesson.meta.quiz_questions=(i=(n=(e=this.lesson)==null?void 0:e.meta)==null?void 0:n.quiz_questions)==null?void 0:i.map(s=>s.slug==t.slug?t:s),this.ensureKeys(),this.saveData()},checkAndSaveQuestion(t,e){if(!t.enabled){e.is_correct=!e.is_correct;return}if(this.isSingleAnswer(t)&&t.options.forEach(n=>{n.is_correct=n===e}),t.type=="multiple_choice"&&!t.options.filter(i=>i.is_correct).length&&!e.is_correct){e.is_correct=!0;return}this.updateQuestion(t)},openDeleteQuestionPrompt(t){this.$confirm(this.$t("Are you sure you want to delete this question?"),this.$t("Delete Question"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{var e,n,i;this.lesson.meta.quiz_questions=(i=(n=(e=this.lesson)==null?void 0:e.meta)==null?void 0:n.quiz_questions)==null?void 0:i.filter(s=>s.slug!==t),this.saveData()})},closeModal(){this.showQuestionModal=!1},saveData(){this.saving=!0;const t={id:this.lesson.id,parent_id:this.lesson.parent_id,space_id:this.lesson.space_id,title:this.lesson.title,message:this.lesson.message,meta:this.buildMetaForSave(),status:this.lesson.status};this.$put("admin/courses/"+this.lesson.space_id+"/lessons/"+this.lesson.id,{lesson:t}).then(e=>{this.$notify.success(e.message),this.syncQuestionsFromServer(e.lesson),this.$emit("saved",e.lesson)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},watch:{"lesson.meta.quiz_questions":{handler(){this.$nextTick(()=>this.checkExplanationOverflow())},deep:!0,immediate:!0}},beforeUnmount(){document.body.classList.remove("fcom-no-scroll")},created(){this.ensureKeys(),this.normalizeSingleChoice()},mounted(){document.body.classList.add("fcom-no-scroll"),this.$nextTick(()=>{this.appReady=!0,this.checkExplanationOverflow()})}},iYe={class:"fcom_full_editor"},oYe={class:"fcom_full_editor_header"},rYe=["aria-label"],aYe={class:"fcom_desktop_only"},lYe={key:0},cYe={class:"full_editor_actions"},uYe={class:"fcom_lesson_camp"},dYe={class:"fcom_lesson_nav"},hYe=["title","href"],fYe={class:"fcom_lesson_content"},pYe={class:"fcom_quiz_editor"},mYe={key:1,class:"fcom_questions_wrap"},gYe=["id"],vYe={key:0,class:"fcom_question_image"},_Ye={class:"fcom_question_header"},yYe=["aria-label","onClick","onKeydown"],bYe=["innerHTML"],wYe={key:1},kYe={class:"fcom_question_actions"},CYe={class:"fcom_question_body"},xYe={class:"fcom_question_option"},SYe={class:"fcom_order_number"},$Ye={class:"fcom_question_option"},AYe={key:0,class:"fcom_drag_handle fcom_option_drag","aria-hidden":"true"},EYe={key:3,class:"question_help_text"},MYe={key:4,class:"fcom_question_explanation_preview"},TYe={class:"fcom_explanation_label"},PYe=["onClick"],IYe={key:1,class:"fcom_meta_sorting"},LYe={key:2,class:"fcom_banner_image_holder add_quiz_banner"},OYe={key:0},DYe={key:0},RYe={style:{padding:"20px"}};function VYe(t,e,n,i,s,o){const r=B("ArrowLeft"),a=we,l=ze,c=B("ArrowRight"),u=B("arrow-down"),d=Ar,h=Er,f=$r,p=B("View"),m=K1,b=ht,w=B("crepe-editor"),k=bo,C=B("action-popover"),A=B("FluentDnD"),S=B("TypedAnswer"),M=qt,P=B("FeedMdContent"),T=B("Top"),I=B("Bottom"),L=zs,R=yo,V=B("lesson-meta"),H=X1,F=B("AddQuestionModal"),U=G1,Y=xt("loading");return v(),$("div",iYe,[_(U,null,{default:y(()=>[_(m,{class:"fcom_full_editor_header_wrap"},{default:y(()=>{var z;return[g("div",oYe,[g("button",{type:"button",onClick:e[0]||(e[0]=X=>t.$emit("close")),class:"fcom_back_header","aria-label":t.$t("Back to Lessons")},[_(a,{class:"fcom_arrow_icon"},{default:y(()=>[_(r)]),_:1}),g("span",aYe,x(t.$t("Back to Lessons")),1),(z=n.course)!=null&&z.title?(v(),$("span",lYe,"("+x(n.course.title)+")",1)):O("",!0)],8,rYe),g("div",cYe,[g("div",uYe,[g("div",null,x(t.$t("Lesson %1$s of %2$s - %3$s",n.editingIndex+1,n.section.lessons.length,n.section.title)),1),g("div",dYe,[_(l,{onClick:e[1]||(e[1]=X=>t.$emit("changeLesson",n.editingIndex-1)),disabled:n.editingIndex===0,size:"small"},{default:y(()=>[_(a,null,{default:y(()=>[_(r)]),_:1})]),_:1},8,["disabled"]),_(l,{onClick:e[2]||(e[2]=X=>t.$emit("changeLesson",n.editingIndex+1)),disabled:n.editingIndex+1===n.section.lessons.length,size:"small"},{default:y(()=>[_(a,{class:"fcom_arrow_icon"},{default:y(()=>[_(c)]),_:1})]),_:1},8,["disabled"])])]),t.isMobile&&!s.showSideBar?(v(),D(l,{key:0,text:"",onClick:e[3]||(e[3]=X=>s.showSideBar=!s.showSideBar)},{default:y(()=>[g("span",null,x(t.$t("Features")),1)]),_:1})):O("",!0),_(f,{onCommand:e[4]||(e[4]=X=>{n.lesson.status=X}),trigger:"click"},{dropdown:y(()=>[_(h,null,{default:y(()=>[_(d,{command:"draft"},{default:y(()=>[N(x(t.$t("Draft")),1)]),_:1}),_(d,{command:"published"},{default:y(()=>[N(x(t.$t("Published")),1)]),_:1})]),_:1})]),default:y(()=>[_(l,{type:n.lesson.status=="published"?"success":"info",bg:"",text:"",class:"el-dropdown-link"},{default:y(()=>[N(x(t.$labelize(n.lesson.status))+" ",1),_(a,{class:"el-icon--right"},{default:y(()=>[_(u)]),_:1})]),_:1},8,["type"])]),_:1}),Re((v(),D(l,{style:{"margin-left":"15px"},disabled:s.saving,onClick:o.saveData,class:"fcom_primary_button"},{default:y(()=>[N(x(t.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[Y,s.saving]]),g("a",{title:t.$t("Preview Lesson"),class:"el-button el-button--text",target:"_blank",rel:"noopener",href:o.previewUrl},[_(a,null,{default:y(()=>[_(p)]),_:1})],8,hYe)])])]}),_:1}),_(U,{class:"fcom_full_editor_container fcom_lesson_editor_full"},{default:y(()=>[_(R,{style:{overflow:"hidden",padding:"0"},class:"fcom_full_editor_main"},{default:y(()=>[g("div",fYe,[_(L,{height:"calc(100vh - 60px)",class:"fcom_lesson_editor_scroll"},{default:y(()=>{var z,X,Z,G;return[g("div",pYe,[_(b,{modelValue:n.lesson.title,"onUpdate:modelValue":e[5]||(e[5]=Q=>n.lesson.title=Q),placeholder:t.$t("Title")},null,8,["modelValue","placeholder"]),s.appReady?(v(),D(w,{key:0,modelValue:n.lesson.message,"onUpdate:modelValue":e[6]||(e[6]=Q=>n.lesson.message=Q),autofocus:!0,placeholder:t.$t("Describe this quiz")+"...",disable_media:!0},null,8,["modelValue","placeholder"])):O("",!0),(X=(z=n.lesson.meta)==null?void 0:z.quiz_questions)!=null&&X.length?(v(),$("div",mYe,[(v(!0),$(J,null,ye(n.lesson.meta.quiz_questions,(Q,ne)=>(v(),$("div",{key:Q.slug,id:"fcom_question_"+Q.slug,class:q(["fcom_question",[Q.type,{disabled:!Q.enabled}]])},[o.showQuestionImage(Q)?(v(),$("div",vYe,[_(k,{src:Q.image_url},null,8,["src"])])):O("",!0),g("div",_Ye,[g("div",{class:"fcom_question_label",role:"button",tabindex:"0","aria-label":t.$t("Edit question"),onClick:K=>o.openEditQuestionModal(Q),onKeydown:[ut(K=>o.openEditQuestionModal(Q),["enter"]),ut(Me(K=>o.openEditQuestionModal(Q),["prevent"]),["space"])]},[Q.label_rendered?(v(),$("span",{key:0,innerHTML:Q.label_rendered},null,8,bYe)):(v(),$("span",wYe,x(Q.label||o.typeLabel(Q)||t.$t("Untitled question")),1))],40,yYe),g("div",kYe,[_(C,{items:[{label:o.getStatusText(Q),action:()=>{o.toggleQuestion(Q)}},{label:t.$t("Edit"),action:()=>{o.openEditQuestionModal(Q)}},{label:t.$t("Duplicate"),action:()=>{o.duplicateQuestion(Q)}},{label:t.$t("Delete"),type:"danger",action:()=>{o.openDeleteQuestionPrompt(Q.slug)}}],placement:"bottom-end"},null,8,["items"])])]),g("div",CYe,[Q.type==="ordering"?(v(),D(A,{key:0,class:"fcom_question_options",items:Q.options,"row-key":"_key","item-class":"fcom_question_option_dnd","item-label":o.orderingItemLabel,onDrop:o.saveData},{item:y(({data:K,index:ae})=>[g("div",xYe,[e[8]||(e[8]=g("div",{class:"fcom_drag_handle fcom_option_drag","aria-hidden":"true"},"⋮⋮",-1)),g("span",SYe,x(ae+1)+".",1),g("span",null,x(K.label),1)])]),_:1},8,["items","item-label","onDrop"])):o.isTypedAnswer(Q)?(v(),D(S,{key:1,question:o.previewQuestion(Q),"model-value":o.previewAnswer(Q),readonly:!0},null,8,["question","model-value"])):(v(),D(A,{key:2,class:"fcom_question_options",items:Q.options,"row-key":"_key","item-class":"fcom_question_option_dnd",draggable:Q.type!=="true_false",onDrop:o.saveData},{item:y(({data:K})=>[g("div",$Ye,[Q.type!=="true_false"?(v(),$("div",AYe,"⋮⋮")):O("",!0),_(M,{modelValue:K.is_correct,"onUpdate:modelValue":ae=>K.is_correct=ae,onChange:ae=>o.checkAndSaveQuestion(Q,K),class:q({single_choice:o.isSingleAnswer(Q)})},{default:y(()=>[N(x(o.optionLabel(Q,K)),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange","class"])])]),_:2},1032,["items","draggable","onDrop"])),Q.help_text?(v(),$("div",EYe,x(Q.help_text),1)):O("",!0),Q.explanation_rendered||Q.explanation?(v(),$("div",MYe,[g("span",TYe,x(t.$t("Explanation")),1),_(P,{ref_for:!0,ref:"explanationBody",class_name:o.explanationClass(Q.slug),content:Q.explanation_rendered||""},null,8,["class_name","content"]),s.canExpandExplanations[Q.slug]?(v(),$("button",{key:0,type:"button",class:"fcom_see_more_btn",onClick:K=>o.toggleExplanation(Q.slug)},x(s.expandedExplanations[Q.slug]?t.$t("See less"):t.$t("See more")),9,PYe)):O("",!0)])):O("",!0)]),o.showMoving?(v(),$("div",IYe,[_(a,{role:"button",tabindex:ne===0?-1:0,"aria-disabled":ne===0,"aria-label":t.$t("Move question up"),onClick:K=>o.moveUp(ne),onKeydown:[ut(K=>o.moveUp(ne),["enter"]),ut(Me(K=>o.moveUp(ne),["prevent"]),["space"])]},{default:y(()=>[_(T)]),_:1},8,["tabindex","aria-disabled","aria-label","onClick","onKeydown"]),_(a,{role:"button",tabindex:ne===n.lesson.meta.quiz_questions.length-1?-1:0,"aria-disabled":ne===n.lesson.meta.quiz_questions.length-1,"aria-label":t.$t("Move question down"),onClick:K=>o.moveDown(ne),onKeydown:[ut(K=>o.moveDown(ne),["enter"]),ut(Me(K=>o.moveDown(ne),["prevent"]),["space"])]},{default:y(()=>[_(I)]),_:1},8,["tabindex","aria-disabled","aria-label","onClick","onKeydown"])])):O("",!0)],10,gYe))),128))])):O("",!0),(G=(Z=n.lesson.meta)==null?void 0:Z.quiz_questions)!=null&&G.length?(v(),D(l,{key:3,onClick:o.openAddQuestionModal,class:"fcom_primary_button add_btn"},{default:y(()=>[N(x("+ "+t.$t("Add Question"))+" ",1),t.has_pro?O("",!0):(v(),$("span",DYe," ("+x(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"])):(v(),$("div",LYe,[g("h4",null,x(t.$t("Add Question")),1),g("p",null,x(t.$t("No questions have been added yet. Click below to create your first quiz question and engage your learners!")),1),_(l,{onClick:o.openAddQuestionModal,class:"fcom_secondary_button add_btn"},{default:y(()=>[N(x("+ "+t.$t("Add Question"))+" ",1),t.has_pro?O("",!0):(v(),$("span",OYe," ("+x(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"])]))])]}),_:1})])]),_:1}),Re(_(H,{style:{padding:"0"},class:"fcom_full_editor_side",width:"300px"},{default:y(()=>[_(L,{height:"calc(100vh - 60px)"},{default:y(()=>[g("div",RYe,[_(V,{course:n.course,lesson:n.lesson,quiz_meta:!0},null,8,["course","lesson"]),t.isMobile?(v(),D(l,{key:0,size:"small",onClick:e[7]||(e[7]=z=>s.showSideBar=!1)},{default:y(()=>[_(a,null,{default:y(()=>[_(r)]),_:1}),g("span",null,x(t.$t("Close")),1)]),_:1})):O("",!0)])]),_:1})]),_:1},512),[[jt,s.showSideBar||!t.isMobile]]),s.showQuestionModal?(v(),D(F,{key:0,lesson:n.lesson,question:s.question,onClose:o.closeModal,onAddQuestion:o.addQuestion,onUpdateQuestion:o.updateQuestion},null,8,["lesson","question","onClose","onAddQuestion","onUpdateQuestion"])):O("",!0)]),_:1})]),_:1})])}const FYe=ce(sYe,[["render",VYe]]),NYe={name:"SectionScheduler",components:{CaretBottom:$ae},props:["section","course"],data(){return{saving:!1,show:!1,time:"09:00",date:"",unlock_after:0}},methods:{saveSchedule(){let t=this.date+" "+this.convertTo24Hour(this.time)+":00";if(!dayjs(t).isValid()){this.$notify.error(this.$t("Please select a valid date and time"));return}this.section.scheduled_at=t,this.patchCourse({scheduled_at:t},()=>{this.show=!1})},saveUnlockDays(){this.patchCourse({reactions_count:this.unlock_after},()=>{this.section.reactions_count=this.unlock_after,this.show=!1})},patchCourse(t={},e=null){this.saving=!0,this.$patch("admin/courses/"+this.course.id+"/sections/"+this.section.id,t).then(n=>{this.$notify.success(this.$t("Schedule has been updated")),e&&e(n)}).catch(n=>{this.$handleError(n)}).finally(()=>{this.saving=!1})},initUnlockDay(){if(this.show){this.show=!1;return}this.unlock_after=parseInt(this.section.reactions_count),this.show=!0},initPicker(){if(this.show){this.show=!1;return}let t=this.section.scheduled_at;if(!t){this.show=!0;return}this.date=dayjs(t).format("YYYY-MM-DD"),this.time=dayjs(t).format(this.siteTimeFormat),this.show=!0}}},BYe={style:{"padding-left":"10px"},class:"fcom_section_scheduler"},zYe={class:"fcom_scheduler_form"},HYe={class:"fcom_input_group"},UYe={class:"el_inline_date_picker"},jYe={class:"fcom_input_group"},WYe={class:"fcom_input_group"},YYe={class:"fcom_scheduler_form scheduler_structured"},qYe={class:"fcom_input_group"},GYe={class:"fcom_label"},XYe={class:"fcom_input_group"};function KYe(t,e,n,i,s,o){const r=B("CaretBottom"),a=we,l=Wd,c=D8,u=ze,d=Yo,h=l2,f=xt("loading");return v(),$("div",BYe,[n.course.settings.course_type=="scheduled"?(v(),D(d,{key:0,persistent:!1,placement:"bottom",width:400,visible:s.show},{reference:y(()=>[g("button",{onClick:e[0]||(e[0]=(...p)=>o.initPicker&&o.initPicker(...p)),class:"fcom_input_select_btn"},[g("span",null,x(n.section.scheduled_at?t.smartDate(n.section.scheduled_at,!0,!0):t.$t("Select Drip date")),1),_(a,null,{default:y(()=>[_(r)]),_:1})])]),default:y(()=>[g("div",zYe,[g("div",HYe,[g("div",UYe,[_(l,{"value-format":"YYYY-MM-DD",format:t.siteDateFormat,teleported:!1,"popper-class":"el_inline_date_picker_box",modelValue:s.date,"onUpdate:modelValue":e[1]||(e[1]=p=>s.date=p)},null,8,["format","modelValue"])])]),g("div",jYe,[_(c,{modelValue:s.time,"onUpdate:modelValue":e[2]||(e[2]=p=>s.time=p),start:"00:00",end:"23:59",steps:15,format:t.siteTimeFormat},null,8,["modelValue","format"])]),g("div",WYe,[Re((v(),D(u,{disabled:s.saving,type:"success",onClick:o.saveSchedule},{default:y(()=>[N(x(t.$t("Update Date")),1)]),_:1},8,["disabled","onClick"])),[[f,s.saving]])])])]),_:1},8,["visible"])):O("",!0),n.course.settings.course_type=="structured"?(v(),D(d,{key:1,persistent:!1,placement:"bottom",width:275,visible:s.show},{reference:y(()=>[g("button",{onClick:e[3]||(e[3]=(...p)=>o.initUnlockDay&&o.initUnlockDay(...p)),class:"fcom_input_select_btn"},[g("span",null,x(n.section.reactions_count?t.$t("after %s days of enrollment",n.section.reactions_count):t.$t("Immediately")),1),_(a,null,{default:y(()=>[_(r)]),_:1})])]),default:y(()=>[g("div",YYe,[g("div",qYe,[g("div",GYe,x(t.$t("Unlock section after")),1),_(h,{modelValue:s.unlock_after,"onUpdate:modelValue":e[4]||(e[4]=p=>s.unlock_after=p),min:0,max:1e3,"controls-position":"right",precision:0},null,8,["modelValue"]),N(" "+x(t.$t("Days")),1)]),g("div",XYe,[Re((v(),D(u,{disabled:s.saving,type:"success",onClick:o.saveUnlockDays},{default:y(()=>[N(x(t.$t("Update")),1)]),_:1},8,["disabled","onClick"])),[[f,s.saving]])])])]),_:1},8,["visible"])):O("",!0)])}const ZYe=ce(NYe,[["render",KYe]]),JYe={name:"_SectionSechedulerEmail",components:{CrepeEditor:uu},props:{section:{type:Object,required:!0},course:{type:Object,required:!0}},data(){return{editorOpen:!1,savingEmailMeta:!1,smartCodes:this.appVars.course_smart_codes}},methods:{openEditor(){if(!this.has_pro){this.$notify({title:this.$t("Pro Required"),message:this.$t("This feature is only available in the pro version."),type:"error"});return}this.editorOpen=!0},getDefaultSubject(){var t;return(t=this.appVars.default_course_email)==null?void 0:t.subject},getDefaultMessage(){var t;return(t=this.appVars.default_course_email)==null?void 0:t.message},insertIntoSubject(t){const e=(this.section.meta.email_subject||"")+t;this.section.meta.email_subject=e.trim()},insertIntoMessage(t){const e=this.$refs.emailEditor;if(e&&typeof e.updateContent=="function")e.updateContent(t);else{const n=this.section.meta.email_body;this.section.meta.email_body=(n?n+`
135 +`:"")+t}},saveSectionMeta(){if(!this.has_pro){this.$notify({title:this.$t("Pro Required"),message:this.$t("This feature is only available in the pro version."),type:"error"});return}this.savingEmailMeta=!0,this.$patch("admin/courses/"+this.course.id+"/sections/"+this.section.id,{meta:this.section.meta}).then(t=>{this.editorOpen=!1,this.section.meta=t.topic.meta,this.$notify.success(this.$t("Email settings updated"))}).catch(t=>{this.$handleError(t)}).finally(()=>{this.savingEmailMeta=!1})}},mounted(){var t,e,n;this.section.meta=this.section.meta||{},Object.assign(this.section.meta,{email_enabled:((t=this.section.meta)==null?void 0:t.email_enabled)??"no",email_subject:((e=this.section.meta)==null?void 0:e.email_subject)??this.getDefaultSubject(),email_body:((n=this.section.meta)==null?void 0:n.email_body)??this.getDefaultMessage()})}},QYe={class:"fcom_section_email_config"},eqe={class:"dialog_header"},tqe={class:"dialog_left"},nqe={class:"dialog_body"},sqe={class:"fcom_input_group"},iqe={class:"fcom_label label_row"},oqe={class:"fcom_input_group"},rqe={class:"fcom_label label_row"},aqe={class:"fcom_extra_editor"},lqe={class:"dialog_footer"};function cqe(t,e,n,i,s,o){const r=tu,a=ze,l=Ar,c=Er,u=$r,d=ht,h=B("crepe-editor"),f=$s;return v(),$("div",QYe,[_(r,{"active-value":"yes","inactive-value":"no",disabled:!t.has_pro,modelValue:n.section.meta.email_enabled,"onUpdate:modelValue":e[0]||(e[0]=p=>n.section.meta.email_enabled=p),onClick:o.saveSectionMeta},null,8,["disabled","modelValue","onClick"]),_(a,{size:"small",text:"",class:"fcom_secondary_button",onClick:o.openEditor},{default:y(()=>[N(x(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(f,{"modal-class":"fcom_common_dialog","append-to-body":!0,"close-on-click-modal":!1,modelValue:s.editorOpen,"onUpdate:modelValue":e[4]||(e[4]=p=>s.editorOpen=p),width:t.drawerWidth},{header:y(()=>[g("div",eqe,[g("div",tqe,[g("h4",null,x(t.$t("Edit Email Notification")),1)])])]),footer:y(()=>[g("div",lqe,[_(a,{class:"fcom_secondary_button",onClick:e[3]||(e[3]=p=>s.editorOpen=!1)},{default:y(()=>[N(x(t.$t("Cancel")),1)]),_:1}),_(a,{class:"fcom_primary_button",loading:s.savingEmailMeta,onClick:o.saveSectionMeta},{default:y(()=>[N(x(t.$t("Save")),1)]),_:1},8,["loading","onClick"])])]),default:y(()=>[g("div",nqe,[g("div",sqe,[g("div",iqe,[g("span",null,x(t.$t("Subject")),1),_(u,{trigger:"click",onCommand:o.insertIntoSubject},{dropdown:y(()=>[_(c,null,{default:y(()=>[(v(!0),$(J,null,ye(s.smartCodes,(p,m)=>(v(),D(l,{key:m,command:m},{default:y(()=>[N(x(p),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:y(()=>[_(a,{class:"fcom_secondary_button"},{default:y(()=>[N(x(t.$t("Add shortcode")),1)]),_:1})]),_:1},8,["onCommand"])]),_(d,{modelValue:n.section.meta.email_subject,"onUpdate:modelValue":e[1]||(e[1]=p=>n.section.meta.email_subject=p),placeholder:t.$t("Enter email subject")},null,8,["modelValue","placeholder"])]),g("div",oqe,[g("div",rqe,[g("span",null,x(t.$t("Message")),1),_(u,{trigger:"click",onCommand:o.insertIntoMessage},{dropdown:y(()=>[_(c,null,{default:y(()=>[(v(!0),$(J,null,ye(s.smartCodes,(p,m)=>(v(),D(l,{key:m,command:m},{default:y(()=>[N(x(p),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:y(()=>[_(a,{class:"fcom_secondary_button"},{default:y(()=>[N(x(t.$t("Add shortcode")),1)]),_:1})]),_:1},8,["onCommand"])]),g("div",aqe,[_(h,{ref:"emailEditor",modelValue:n.section.meta.email_body,"onUpdate:modelValue":e[2]||(e[2]=p=>n.section.meta.email_body=p),placeholder:t.$t("Write the email message")},null,8,["modelValue","placeholder"])])])])]),_:1},8,["modelValue","width"])])}const uqe=ce(JYe,[["render",cqe]]),dqe={name:"SectionPart",props:["course","sections","section"],emits:["reload"],components:{LessonEditor:SU,LessonLine:iWe,SectionScheduler:ZYe,FluentDnD:Tr,QuizEditor:FYe,SectionSechedulerEmail:uqe},data(){return{editing_title:!1,addingSectionItem:!1,newSectionItem:{title:"",type:""},working:!1,editingLesson:null,editingIndex:0,showAddSectionPopup:!1,showCopySectionPopup:!1,selectedCourseId:null,courses:[],loading:!1}},computed:{courseType(){var t;return(t=this.course.settings)==null?void 0:t.course_type},isLesson(){var t;return((t=this.editingLesson)==null?void 0:t.content_type)=="text"},isQuiz(){var t;return((t=this.editingLesson)==null?void 0:t.content_type)=="quiz"},selectedType(){return this.newSectionItem.type},hasSchedule(){return["scheduled","structured"].includes(this.courseType)},showEmailConfig(){return this.courseType=="scheduled"?this.section.scheduled_at||!1:this.section.reactions_count||!1}},methods:{handleSaveLesson(t){const e=this.section.lessons[this.editingIndex];!e||!t||(e.title=t.title,e.status=t.status)},updateLessonStatus(t,e){t.status=e},showTitleEditor(){this.editing_title=!0,this.$nextTick(()=>{this.$refs.fcom_section_title_editor.focus()})},patchSection(t){let e={};t.forEach(n=>{e[n]=this.section[n]}),this.editing_title=!1,this.$patch("admin/courses/"+this.course.id+"/sections/"+this.section.id,e).then(n=>{console.log(n)}).catch(n=>{this.$handleError(n)})},handleLessonUpdated(t,e){let n={};e.forEach(i=>{n[i]=t[i]}),this.editing_title=!1,this.$patch("admin/courses/"+this.course.id+"/lessons/"+t.id,n).then(i=>{this.$notify.success(i.message)}).catch(i=>{this.$handleError(i)})},addSectionItem(t,e=!1){t&&t.preventDefault(),this.addingSectionItem=!0,this.$post("admin/courses/"+this.course.id+"/lessons",{...this.newSectionItem,section_id:parseInt(this.section.id)}).then(n=>{this.section.lessons.push(n.lesson),this.showAddSectionPopup=!1,this.newSectionItem.title="",this.newSectionItem.type="",e&&this.$nextTick(()=>{let i=this.section.lessons.length-1;this.editingLesson=this.section.lessons[i],this.editingIndex=i})}).catch(n=>{this.$handleError(n)}).finally(()=>{this.addingSectionItem=!1})},handleSectionAction(t){if(t=="edit_title"){this.showTitleEditor();return}t=="delete"&&this.$confirm(this.$t("Are you sure you want to delete this section? All the associated lessons and enrollment data will be deleted too."),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning",title:this.$t("Are you sure?"),showInput:!0,dangerouslyUseHTMLString:!0,inputPlaceholder:this.$t("Type %s to confirm","DELETE"),inputValidator(e){return e.toLowerCase()==="delete"?!0:this.$t("You must type %s to confirm","DELETE")},inputErrorMessage:this.$t("You must type %s to confirm","DELETE")}).then(e=>{if(e.value!="DELETE"){this.$notify.error({title:"Error",message:this.$t("You must type %s to confirm","DELETE")});return}this.working=!0,this.$del("admin/courses/"+this.course.id+"/sections/"+this.section.id).then(n=>{this.$emit("reload")}).catch(n=>{this.$handleError(n)}).finally(()=>{this.working=!1})}).catch(()=>{}),t==="copy_section"&&(this.fetchCourses(),this.showCopySectionPopup=!0,this.selectedCourseId=null,this.$nextTick(()=>{var e,n;document.querySelector(`.fcom_copy_section_popup.section_${(e=this.section)==null?void 0:e.id}`).style.display="block",document.querySelectorAll(`.fcom_copy_section_popup:not(.section_${(n=this.section)==null?void 0:n.id})`).forEach(i=>i.style.display="none")}))},fetchCourses(t=""){this.loading=!0,this.$get("admin/courses",{search:t}).then(e=>{var n;(n=e==null?void 0:e.courses)!=null&&n.data&&(this.courses=e.courses.data.filter(i=>i.id!==this.course.id))}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},copySection(){this.showCopySectionPopup=!1,this.$put(`admin/courses/${this.selectedCourseId}/copy-section`,{section_id:this.section.id,from_course_id:this.course.id}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)})},handleMoveLesson(t,e){this.$put("admin/courses/"+this.course.id+"/move-lesson",{lesson_id:t,section_id:e}).then(n=>{this.$notify.success(n.message),this.$emit("reload")}).catch(n=>{this.$handleError(n)})},handleDuplicateLesson(t){this.working=!0,this.$post("admin/courses/"+this.course.id+"/lessons/"+t.id+"/duplicate").then(e=>{this.$notify.success(e.message),this.$emit("reload")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})},handleDeleteLesson(t){this.$confirm(this.$t("Are you sure you want to delete this lesson? All the associated data will be deleted too."),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning",title:this.$t("Are you sure?")}).then(()=>{this.working=!0,this.$del("admin/courses/"+this.course.id+"/lessons/"+t.id).then(e=>{this.$emit("reload")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})}).catch(()=>{})},handleChangeLesson(t){this.editingLesson=null,this.editingIndex=0,this.$nextTick(()=>{this.editingLesson=this.section.lessons[t],this.editingIndex=t,this.$router.push({query:{lesson_id:this.editingLesson.id}})})},initLessonEditor(t,e){this.editingLesson=t,this.editingIndex=e,this.$nextTick(()=>{this.$router.push({query:{lesson_id:t.id}})})},dropLesson({index:t}){const e=this.section.lessons.splice(t,1)[0];this.section.lessons.splice(t,0,e),this.resetLessonIndexes()},resetLessonIndexes(){const t={};Mc(this.section.lessons,(e,n)=>{t[e.id]=n+1}),this.$patch("admin/courses/"+this.course.id+"/sections/"+this.section.id+"/indexes",{indexes:t}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)})},handleCloseLessonEditor(){this.editingLesson=null,this.editingIndex=0,this.$router.push({query:{}})},handleAddSectionItem(t){this.newSectionItem.type=t,this.$nextTick(()=>{this.showAddSectionPopup=!0,document.querySelector(`.fcom_add_section_popup.section_${this.section.id}`).style.display="block",document.querySelectorAll(`.fcom_add_section_popup:not(.section_${this.section.id})`).forEach(e=>e.style.display="none"),this.$refs.fcom_lesson_or_quiz_title.focus()})}},watch:{"$route.query.lesson_id"(t){const e=this.section.lessons.findIndex(n=>n.id==parseInt(t));this.editingLesson=e>-1?this.section.lessons[e]:null,this.editingIndex=e>-1?e:0}},mounted(){let t=parseInt(this.$route.query.lesson_id);if(t){let e=this.section.lessons.findIndex(n=>n.id==t);e>-1&&this.initLessonEditor(this.section.lessons[e],e)}}},hqe={class:"fcom_section_primary"},fqe={class:"fcom_section_primary_item"},pqe={key:0,class:"fcom_heading_item"},mqe={class:"fcom_space_counts"},gqe={class:"fcom_section_config fcom_label_schedule"},vqe={class:"fcom_section_config fcom_label_email"},_qe={class:"fcom_section_primary_item_actions fcom_label_actions add_section_item"},yqe={key:0},bqe={class:"fcom_move_popup_close"},wqe={class:"fcom_move_popup_close"},kqe={key:0,class:"fcom_section_items"},Cqe={key:0};function xqe(t,e,n,i,s,o){const r=we,a=ze,l=ht,c=B("section-scheduler"),u=B("SectionSechedulerEmail"),d=Ar,h=Er,f=$r,p=tn,m=nn,b=B("Close"),w=Zt,k=Wt,C=B("MoreFilled"),A=B("lesson-line"),S=B("FluentDnD"),M=B("LessonEditor"),P=B("QuizEditor"),T=xt("loading");return v(),$(J,null,[Re((v(),$("div",hqe,[g("div",fqe,[g("div",{class:q(["fcom_section_primary_item_title fcom_title_editable fcom_label_lesson",{fcom_title_editing:s.editing_title}])},[le(t.$slots,"before_section_heading"),s.editing_title?(v(),D(l,{key:1,ref:"fcom_section_title_editor",modelValue:n.section.title,"onUpdate:modelValue":e[3]||(e[3]=I=>n.section.title=I),onKeyup:e[4]||(e[4]=ut(I=>o.patchSection(["title"]),["enter"]))},{append:y(()=>[_(a,{onClick:e[2]||(e[2]=I=>o.patchSection(["title"]))},{default:y(()=>[N(x(t.$t("save")),1)]),_:1})]),_:1},8,["modelValue"])):(v(),$("h4",pqe,[g("span",{onClick:e[0]||(e[0]=I=>s.editing_title=!0)},x(n.section.title),1),n.section.lessons&&n.section.lessons.length?(v(),D(a,{key:0,style:{"background-color":"var(--el-fill-color-light)"},class:"fcom_collapse_btn",size:"small",text:"",onClick:e[1]||(e[1]=I=>n.section.isCollapsed=!n.section.isCollapsed)},{default:y(()=>[_(r,{style:Xe(n.section.isCollapsed?"transform: rotate(-90deg);":"")},{default:y(()=>[...e[12]||(e[12]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024","data-v-d2e47025":""},[g("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"})],-1)])]),_:1},8,["style"]),g("span",mqe,x(t.$_n("%s lesson","%s lessons",n.section.lessons.length)),1)]),_:1})):O("",!0)]))],2),o.hasSchedule?(v(),$(J,{key:0},[g("div",gqe,[_(c,{section:n.section,course:n.course},null,8,["section","course"])]),g("div",vqe,[o.showEmailConfig?(v(),D(u,{key:0,section:n.section,course:n.course},null,8,["section","course"])):O("",!0)])],64)):O("",!0),g("div",_qe,[_(f,{onCommand:o.handleAddSectionItem,trigger:"click"},{dropdown:y(()=>[_(h,null,{default:y(()=>[_(d,{command:"lesson"},{default:y(()=>[N(x(t.$t("Lesson")),1)]),_:1}),_(d,{disabled:!t.has_pro,command:"quiz"},{default:y(()=>[N(x(t.$t("Quiz"))+" ",1),t.has_pro?O("",!0):(v(),$("span",yqe," ("+x(t.$t("Pro Required"))+")",1))]),_:1},8,["disabled"])]),_:1})]),default:y(()=>[_(a,{"aria-label":t.$t("Add New"),class:"fcom_secondary_button"},{default:y(()=>[N(x(t.$t("Add New")),1)]),_:1},8,["aria-label"])]),_:1},8,["onCommand"]),Re(g("div",{class:q(["fcom_add_section_popup","section_"+n.section.id])},[_(m,{onSubmit:[e[7]||(e[7]=Me(I=>t.doNothing(),["prevent"])),o.addSectionItem],"label-position":"top"},{default:y(()=>[_(p,{label:o.selectedType==="quiz"?t.$t("Quiz Title"):t.$t("Lesson Title")},{default:y(()=>[_(l,{ref:"fcom_lesson_or_quiz_title",modelValue:s.newSectionItem.title,"onUpdate:modelValue":e[5]||(e[5]=I=>s.newSectionItem.title=I),placeholder:o.selectedType==="quiz"?t.$t("Enter Quiz title"):t.$t("Enter Lesson title")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(p,null,{default:y(()=>[Re((v(),D(a,{disabled:s.addingSectionItem,class:"fcom_secondary_button",onClick:o.addSectionItem},{default:y(()=>[N(x(t.$t("Add")),1)]),_:1},8,["disabled","onClick"])),[[T,s.addingSectionItem]]),Re((v(),D(a,{disabled:s.addingSectionItem,class:"fcom_primary_button",onClick:e[6]||(e[6]=()=>{o.addSectionItem(!1,!0)})},{default:y(()=>[N(x(t.$t("Add & Edit")),1)]),_:1},8,["disabled"])),[[T,s.addingSectionItem]])]),_:1})]),_:1},8,["onSubmit"]),g("div",bqe,[_(r,{onClick:e[8]||(e[8]=I=>s.showAddSectionPopup=!1)},{default:y(()=>[_(b)]),_:1})])],2),[[jt,s.showAddSectionPopup]]),Re(g("div",{class:q(["fcom_copy_section_popup","section_"+n.section.id])},[_(m,{onSubmit:e[10]||(e[10]=Me(I=>t.doNothing(),["prevent"])),"label-position":"top"},{default:y(()=>[_(p,{label:t.$t("Copy Section to a different Course")},{default:y(()=>[_(k,{filterable:"",clearable:"",remote:"","remote-show-suffix":"","remote-method":o.fetchCourses,modelValue:s.selectedCourseId,"onUpdate:modelValue":e[9]||(e[9]=I=>s.selectedCourseId=I),loading:s.loading,placeholder:t.$t("Select Course")},{default:y(()=>[(v(!0),$(J,null,ye(s.courses,I=>(v(),D(w,{key:I.id,label:I.title,value:I.id},null,8,["label","value"]))),128))]),_:1},8,["remote-method","modelValue","loading","placeholder"])]),_:1},8,["label"]),_(a,{onClick:o.copySection,disabled:!s.selectedCourseId,class:"fcom_primary_button"},{default:y(()=>[N(x(t.$t("Copy Section")),1)]),_:1},8,["onClick","disabled"])]),_:1}),g("div",wqe,[_(r,{onClick:e[11]||(e[11]=I=>s.showCopySectionPopup=!1)},{default:y(()=>[_(b)]),_:1})])],2),[[jt,s.showCopySectionPopup]]),_(f,{onCommand:o.handleSectionAction,trigger:"click"},{dropdown:y(()=>[_(h,null,{default:y(()=>[_(d,{command:"edit_title"},{default:y(()=>[N(x(t.$t("Edit Title")),1)]),_:1}),_(d,{command:"copy_section"},{default:y(()=>[N(x(t.$t("Copy To")),1)]),_:1}),_(d,{command:"delete"},{default:y(()=>[N(x(t.$t("Delete section")),1)]),_:1})]),_:1})]),default:y(()=>[_(a,{"aria-label":t.$t("View actions"),size:"small",class:"fcom_dot_menu",text:""},{default:y(()=>[_(r,null,{default:y(()=>[_(C)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"])])]),n.section.lessons.length&&!n.section.isCollapsed?(v(),$("div",kqe,[_(S,{items:n.section.lessons,onDrop:o.dropLesson,"item-class":"fcom_section_item fcom_space_item_padding"},{item:y(({data:I,index:L})=>[(v(),D(A,{course:n.course,sections:n.sections,key:I.id,lesson:I,onDeleteLesson:o.handleDeleteLesson,onUpdated:o.handleLessonUpdated,onMoveLesson:o.handleMoveLesson,onDuplicateLesson:o.handleDuplicateLesson,onShowEditor:R=>o.initLessonEditor(I,L)},{before_section_heading:y(()=>[...e[13]||(e[13]=[g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)])]),_:1},8,["course","sections","lesson","onDeleteLesson","onUpdated","onMoveLesson","onDuplicateLesson","onShowEditor"]))]),_:1},8,["items","onDrop"])])):O("",!0)])),[[T,s.working]]),s.editingLesson?(v(),$("div",Cqe,[(v(),D(na,{to:"body"},[o.isLesson?(v(),D(M,{key:0,course:n.course,section:n.section,lesson:s.editingLesson,editingIndex:s.editingIndex,onChangeLesson:o.handleChangeLesson,onClose:o.handleCloseLessonEditor},null,8,["course","section","lesson","editingIndex","onChangeLesson","onClose"])):O("",!0),o.isQuiz?(v(),D(P,{key:1,course:n.course,section:n.section,lesson:s.editingLesson,editingIndex:s.editingIndex,onSaved:o.handleSaveLesson,onClose:o.handleCloseLessonEditor,onChangeLesson:o.handleChangeLesson},null,8,["course","section","lesson","editingIndex","onSaved","onClose","onChangeLesson"])):O("",!0)]))])):O("",!0)],64)}const Sqe=ce(dqe,[["render",xqe]]),$qe={name:"EditLessons",props:["course"],components:{SectionPart:Sqe,FluentDnD:Tr},data(){return{sections:[],loading:!1,newSection:{title:""},addingSection:!1,isCollapsed:!1}},computed:{lessonsCount(){let t=0;return Mc(this.sections,e=>{t+=e.lessons.length}),t}},methods:{showAddSectionPopup(){this.$nextTick(()=>{this.$refs.fcom_section_title_add&&this.$refs.fcom_section_title_add.focus()})},fetchSections(){this.loading=!0,this.$get("admin/courses/"+this.course.id+"/sections").then(t=>{this.sections=t.sections}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},dropSection({indx:t}){const e=this.sections.splice(t,1)[0];this.sections.splice(t,0,e),this.resetSectionIndexes()},addSection(){this.addingSection=!0,this.$post("admin/courses/"+this.course.id+"/sections",this.newSection).then(t=>{this.sections.push(t.section),this.$refs.add_section.hide(),this.newSection.title="",this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.addingSection=!1})},resetSectionIndexes(){const t={};Mc(this.sections,(e,n)=>{t[e.id]=n+1}),this.$patch("admin/courses/"+this.course.id+"/sections/indexes",{indexes:t}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)})},toggleSectionCollapse(){this.isCollapsed=!this.isCollapsed,Mc(this.sections,t=>{t.isCollapsed=this.isCollapsed})}},mounted(){this.fetchSections(),this.showAddSectionPopup()}},Aqe={class:"fcom_course_lessons"},Eqe={class:"fcom_settings_header"},Mqe={class:"fcom_settings_header_meta"},Tqe={class:"fcom_settings_header_meta_item"},Pqe={class:"fcom_card_section_heading"},Iqe={key:0},Lqe={class:"fcom_section_labels"},Oqe={class:"fcom_lebel fcom_label_lesson"},Dqe={class:"fcom_lebel fcom_label_schedule"},Rqe={class:"fcom_lebel fcom_label_email"};function Vqe(t,e,n,i,s,o){const r=Vt,a=we,l=ze,c=ht,u=tn,d=nn,h=Yo,f=B("section-part"),p=B("FluentDnD"),m=xt("loading");return v(),$("div",Aqe,[g("div",Eqe,[g("div",null,[g("h2",null,x(t.$t("Lessons")),1),g("div",Mqe,[g("div",Tqe,[g("b",null,x(t.$t("Type:")),1),N(" "+x(t.$labelize(n.course.settings.course_type))+" • ",1),g("b",null,x(t.$t("Status:")),1),N(" "+x(t.$labelize(n.course.status))+" • ",1),g("b",null,x(t.$t("Visibility:")),1),N(" "+x(t.$labelize(n.course.privacy)),1)])])])]),g("div",{class:q(["fcom_card_sections","fcom_course_type_"+n.course.settings.course_type])},[g("div",Pqe,[s.loading?(v(),D(r,{key:1,rows:1})):(v(),$("h3",Iqe,x(t.$_n("%d Section","%d Sections",s.sections.length))+" • "+x(t.$_n("%d Lesson","%d Lessons",o.lessonsCount)),1)),g("div",null,[o.lessonsCount&&s.sections.length>1?(v(),D(l,{key:0,title:t.$t("Expand/Close all sections"),onClick:o.toggleSectionCollapse,class:"fcom_secondary_button"},{default:y(()=>[_(a,{style:Xe(s.isCollapsed?"transform: rotate(-90deg);":"")},{default:y(()=>[...e[2]||(e[2]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",color:"currentColor",fill:"none"},[g("path",{d:"M17.999 12.4999L11.999 18.4999L5.99898 12.4999",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M17.9993 5.49951L11.9994 11.4995L5.99932 5.49956",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1},8,["style"])]),_:1},8,["title","onClick"])):O("",!0),_(h,{persistent:!1,ref:"add_section",placement:"bottom",width:400,trigger:"click",onShow:o.showAddSectionPopup},{reference:y(()=>[_(l,{class:"fcom_primary_button",bg:""},{default:y(()=>[N(x(t.$t("+ Add Section")),1)]),_:1})]),default:y(()=>[_(d,{onSubmit:e[1]||(e[1]=Me(b=>t.doNothing(),["prevent"])),"label-position":"top"},{default:y(()=>[_(u,{label:t.$t("Section Title")},{default:y(()=>[_(c,{ref:"fcom_section_title_add",onKeydown:ut(Me(o.addSection,["prevent"]),["enter"]),modelValue:s.newSection.title,"onUpdate:modelValue":e[0]||(e[0]=b=>s.newSection.title=b),placeholder:t.$t("Enter Section title")},null,8,["onKeydown","modelValue","placeholder"])]),_:1},8,["label"]),_(u,null,{default:y(()=>[Re((v(),D(l,{disabled:s.addingSection,class:"fcom_primary_button",onClick:o.addSection},{default:y(()=>[N(x(t.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[m,s.addingSection]])]),_:1})]),_:1})]),_:1},8,["onShow"])])]),s.loading?(v(),D(r,{key:0,animated:!0,rows:10,style:{padding:"1rem"}})):O("",!0),g("div",Lqe,[g("div",Oqe,x(t.$t("Lesson name")),1),g("div",Dqe,x(t.$t("Schedule")),1),g("div",Rqe,x(t.$t("E-mail")),1),e[3]||(e[3]=g("div",{class:"fcom_lebel fcom_label_actions"},null,-1))]),_(p,{items:s.sections,onDrop:o.dropSection,"item-class":"fcom_section_item"},{item:y(({data:b})=>[_(f,{onReload:o.fetchSections,course:n.course,sections:s.sections,section:b},{before_section_heading:y(()=>[...e[4]||(e[4]=[g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)])]),_:1},8,["onReload","course","sections","section"])]),_:1},8,["items","onDrop"])],2)])}const Fqe=ce($qe,[["render",Vqe]]),Nqe={name:"GroupIcon"},Bqe={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function zqe(t,e,n,i,s,o){return v(),$("svg",Bqe,[...e[0]||(e[0]=[g("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),g("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),g("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),g("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)])])}const Hqe=ce(Nqe,[["render",zqe]]),Uqe={name:"ManageCourses",components:{CreateCourseForm:ES,AppLayout:bi,Layout:yi,GroupIcon:Hqe,Pagination:du,Search:j1},data(){return{courses:[],loading:!1,pagination:{page:1,per_page:24,total:0},search:"",status:"",sort_by:"latest",courseCategories:null,topic_slug:null,newCourseModal:!1}},methods:{fetchCourses(){this.loading||(this.loading=!0,this.$get("admin/courses",{page:this.pagination.page,per_page:this.pagination.per_page,search:this.search,status:this.status,sort_by:this.sort_by,topic_slug:this.topic_slug,with_categories:!this.courseCategories}).then(t=>{this.courses=t.courses.data,this.pagination.total=t.courses.total,t.course_categories&&t.course_categories.length&&(this.courseCategories=t.course_categories)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1}))},handleSearch(){this.search&&this.search.length<3||this.toSearch()},toSearch(){this.pagination.page=1,this.fetchCourses()},setStatus(t){this.status=t,this.toSearch()},setTopic(t){this.topic_slug=t,this.toSearch()},getExcerpt(t,e=200){if(!t)return"";let n=t.replace(/(<([^>]+)>)/ig,"");return n.length>e&&(n=n.substring(0,e)+"..."),n},navigateToEditLessons(t){this.$router.push({name:"course_overview",params:{course_id:t}})}},mounted(){this.fetchCourses()}},jqe={class:"object_menu"},Wqe={class:"fcom_space_menu_ul"},Yqe={key:0,class:"fcom_space_topics"},qqe={class:"fcom_topics_filters"},Gqe={class:"search_member"},Xqe={class:"feed_filters"},Kqe={class:"fcom_feed_filter_label"},Zqe={class:"fcom_courses"},Jqe={class:"fcom_box_card_list"},Qqe=["onClick"],eGe=["src","onError"],tGe={key:1,class:"fcom_no_image"},nGe={class:"fcom_box_card_info"},sGe={class:"fcom_box_card_name"},iGe={class:"fcom_box_card_by"},oGe={class:"fcom_box_card_details"},rGe={class:"inline_details"},aGe={class:"inline_details"},lGe={key:0,class:"fcom_box_card_description"},cGe={class:"fcom_box_card_action"},uGe=["onClick"],dGe={key:0,class:"fcom_no_items_wrap"};function hGe(t,e,n,i,s,o){const r=ze,a=zs,l=B("Search"),c=we,u=ht,d=Zt,h=Wt,f=qs,p=B("router-link"),m=B("GroupIcon"),b=B("pagination"),w=B("layout"),k=B("app-layout"),C=B("create-course-form"),A=Fa,S=xt("loading");return v(),$(J,null,[_(k,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:y(()=>[_(w,{wrapper_class:"no_bg_layout",title:t.$t("Manage Courses")+(s.pagination.total?" ("+s.pagination.total+")":"")},{actions:y(()=>[g("div",jqe,[g("ul",Wqe,[g("li",null,[g("a",{onClick:e[0]||(e[0]=Me(M=>o.setStatus(""),["prevent"])),class:q(s.status===""?"router-link-active router-link-exact-active":""),href:"#"},x(t.$t("All")),3)]),g("li",null,[g("a",{onClick:e[1]||(e[1]=Me(M=>o.setStatus("published"),["prevent"])),class:q(s.status==="published"?"router-link-active router-link-exact-active":""),href:"#"},x(t.$t("Published")),3)]),g("li",null,[g("a",{onClick:e[2]||(e[2]=Me(M=>o.setStatus("draft"),["prevent"])),class:q(s.status==="draft"?"router-link-active router-link-exact-active":""),href:"#"},x(t.$t("Draft")),3)]),g("li",null,[_(r,{class:"fcom_primary_button",onClick:e[3]||(e[3]=M=>s.newCourseModal=!0)},{default:y(()=>[N(x(t.$t("Add Course")),1)]),_:1})])])])]),default:y(()=>[s.courseCategories&&s.courseCategories.length?(v(),$("div",Yqe,[_(a,null,{default:y(()=>[g("div",qqe,[_(r,{onClick:e[4]||(e[4]=M=>o.setTopic("")),class:q({fcom_active_topic:!s.topic_slug})},{default:y(()=>[N(x(t.$t("All")),1)]),_:1},8,["class"]),(v(!0),$(J,null,ye(s.courseCategories,M=>(v(),D(r,{key:M.slug,onClick:P=>o.setTopic(M.slug),class:q({fcom_active_topic:M.slug==s.topic_slug})},{default:y(()=>[N(x(M.title),1)]),_:2},1032,["onClick","class"]))),128))])]),_:1})])):O("",!0),g("div",Gqe,[_(u,{clearable:"",onClear:o.toSearch,onKeydown:ut(o.toSearch,["enter"]),onInput:o.handleSearch,modelValue:s.search,"onUpdate:modelValue":e[5]||(e[5]=M=>s.search=M),placeholder:t.$t("Search Courses...")},{prefix:y(()=>[_(c,null,{default:y(()=>[_(l)]),_:1})]),_:1},8,["onClear","onKeydown","onInput","modelValue","placeholder"])]),g("div",Xqe,[e[10]||(e[10]=g("div",{class:"fcom_feed_divider"},null,-1)),g("span",Kqe,x(t.$t("Sort by:")),1),_(h,{modelValue:s.sort_by,"onUpdate:modelValue":e[6]||(e[6]=M=>s.sort_by=M),class:"fcom_minimal_select space_sort_select","popper-class":"plain_select",onChange:o.toSearch},{default:y(()=>[_(d,{value:"latest",label:t.$t("Latest")},null,8,["label"]),_(d,{value:"alphabetical",label:t.$t("Alphabetical")},null,8,["label"])]),_:1},8,["modelValue","onChange"])]),Re((v(),$("div",Zqe,[g("div",Jqe,[(v(!0),$(J,null,ye(s.courses,M=>{var P;return v(),$("div",{key:M.id,class:"fcom_each_box_card"},[g("div",{class:"fcom_box_card_avatar",onClick:T=>o.navigateToEditLessons(M.id)},[M.cover_photo&&!M.coverError?(v(),$("img",{key:0,src:M.cover_photo,alt:"",onError:T=>M.coverError=!0},null,40,eGe)):(v(),$("div",tGe))],8,Qqe),g("div",nGe,[g("div",sGe,[_(p,{class:"course_route",to:{name:"course_overview",params:{course_id:M.id}}},{default:y(()=>[N(x(o.getExcerpt(M.title,20))+" ",1),M.status=="draft"?(v(),D(f,{key:0,type:"info"},{default:y(()=>[N(x(M.status),1)]),_:2},1024)):O("",!0)]),_:2},1032,["to"]),g("span",iGe,x(t.$t("by %s",(P=M==null?void 0:M.owner)==null?void 0:P.display_name)),1)]),g("div",oGe,[g("div",rGe,[g("span",null,x(t.$_n("%d Section","%d Sections",M.sectionsCount)),1),e[11]||(e[11]=g("span",{class:"fcom_inline_separator"},null,-1)),g("span",null,x(t.$_n("%d Lesson","%d Lessons",M.lessonsCount)),1)]),g("div",aGe,[_(c,null,{default:y(()=>[_(m)]),_:1}),N(" "+x(t.$_n("%d student","%d students",M.students_count||0)),1)])]),M.description?(v(),$("div",lGe,x(o.getExcerpt(M.description,40)),1)):O("",!0),g("div",cGe,[g("button",{class:"fcom_card_button",onClick:T=>o.navigateToEditLessons(M.id)},x(t.$t("Manage")),9,uGe)])])])}),128))]),_(b,{hide_on_single:!0,onFetch:o.fetchCourses,pagination:s.pagination},null,8,["onFetch","pagination"]),!s.loading&&!s.courses.length?(v(),$("div",dGe,[s.topic_slug?(v(),$(J,{key:0},[g("h3",null,x(t.$t("No courses found in this topic")),1),g("p",null,x(t.$t("No courses found based on your search criteria")),1)],64)):s.search?(v(),$(J,{key:1},[g("h3",null,x(t.$t("No courses found based on your search criteria")),1),g("p",null,x(t.$t("No courses match your search criteria. Try adjusting your search terms or browse our course catalog.")),1)],64)):s.status?(v(),$(J,{key:2},[g("h3",null,x(t.$t("No courses found")),1),g("p",null,x(t.$t("No courses match your current filters. Try adjusting your filters.")),1)],64)):(v(),$(J,{key:3},[g("h3",null,x(t.$t("Create your first course")),1),g("p",null,x(t.$t("Deliver engaging & high-performance learning experiences in your community.")),1),_(r,{onClick:e[7]||(e[7]=M=>s.newCourseModal=!0),class:"fcom_primary_button fcom_mt_10"},{default:y(()=>[N(x(t.$t("Create a Course")),1)]),_:1})],64))])):O("",!0)])),[[S,s.loading]])]),_:1},8,["title"])]),_:1}),_(A,{"close-on-click-modal":!1,"append-to-body":!0,size:t.drawerWidth,modelValue:s.newCourseModal,"onUpdate:modelValue":e[9]||(e[9]=M=>s.newCourseModal=M),direction:"rtl"},{header:y(()=>[g("h4",null,x(t.$t("Create a new course")),1)]),default:y(()=>[s.newCourseModal?(v(),D(C,{key:0,onCompleted:e[8]||(e[8]=M=>{s.newCourseModal=!1,o.fetchCourses()})})):O("",!0)]),_:1},8,["size","modelValue"])],64)}const fGe=ce(Uqe,[["render",hGe]]),pGe={name:"BuddyPress",props:{is_buddyboss:{type:Boolean,default:!1}},data(){return{stage:"config",loading:!1,groupItems:[],stats:{},featureConfig:{},current_status:{},configMap:{},reset_migration:"no",spaceGroups:window.fluentComAdmin.space_groups,migrating:!1,max_ids:{},has_previous_migration:!1,delete_current_data:"no",delete_confirmation:""}},watch:{reset_migration(t){t!=="yes"&&(this.delete_current_data="no",this.delete_confirmation="")},delete_current_data(t){t!=="yes"&&(this.delete_confirmation="")}},methods:{getMigrationConfig(){this.loading=!0,this.$get("migrations/buddypress/config").then(t=>{this.groupItems=t.groupItems,this.featureConfig=t.featureConfig,this.stats=t.stats,this.current_status=t.current_status,this.has_previous_migration=t.has_previous}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},startMigration(){this.migrating=!0,this.$post("migrations/buddypress/start",{config:this.configMap,reset_migration:this.reset_migration,delete_current_data:this.isDeletionRequested?"yes":"no",delete_current_data_confirmation:this.delete_confirmation}).then(t=>{this.migrating=!0,this.current_status=t.current_status,this.max_ids=t.max_ids,this.stage="migrating",this.startPolling()}).catch(t=>{this.$handleError(t),this.migrating=!1})},startPolling(){this.$get("migrations/buddypress/status").then(t=>{this.current_status=t,this.current_status.current_stage!="completed"&&this.startPolling()}).catch(t=>{this.$handleError(t)})},percentage(t,e){return parseInt(t/e*100)}},computed:{isDeletionRequested(){return this.has_previous_migration&&this.reset_migration==="yes"&&this.delete_current_data==="yes"},providerName(){return this.is_buddyboss?"BuddyBoss":"BuddyPress"},completedSteps(){let t=this.current_status.current_stage;return t=="group_members"?{group_members:!0,posts:!1,users:!1}:t=="posts"?{group_members:!0,posts:!0,users:!1}:t=="users"?{group_members:!0,posts:!0,users:!1}:t=="completed"?{group_members:!0,posts:!0,users:!0}:{group_members:!1,posts:!1,users:!1}}},mounted(){this.getMigrationConfig()}},mGe={class:"setting_header"},gGe={class:"setting_body"},vGe={key:1,class:"fcom_bp_migration_space_table"},_Ge={style:{margin:"20px 0 20px"}},yGe={class:"fcom_listed fcom_mb_20"},bGe={key:0},wGe={key:1},kGe={key:3,class:"fcom_mt_10"},CGe={key:2,style:{"text-align":"center"}},xGe={style:{"text-align":"left",margin:"0px 20px 30px","font-size":"20px"},class:"fcom_listed"},SGe={key:0},$Ge={key:1},AGe={key:0},EGe={key:1},MGe={key:2},TGe={key:3},PGe=["href"],IGe={key:3};function LGe(t,e,n,i,s,o){const r=Vt,a=qs,l=Il,c=B("InfoFilled"),u=we,d=Ss,h=Zt,f=Wt,p=Pl,m=qt,b=oa,w=ht,k=ze,C=c2,A=xt("loading");return v(),$(J,null,[g("div",mGe,[g("h2",null,x(t.$t("%s Migration",o.providerName)),1)]),g("div",gGe,[s.loading?(v(),D(r,{key:0,animated:!0,rows:5})):s.stage=="config"?(v(),$("div",vGe,[g("h5",null,x(t.$t("Please configure your %s groups for FluentCommunity Menu",o.providerName)),1),g("p",null,x(t.$t("The %s groups will be created with the same name and users, posts, comments, reactions will be migrated to FluentCommunity.",o.providerName)),1),e[4]||(e[4]=g("hr",null,null,-1)),s.featureConfig.has_groups?(v(),D(p,{key:0,data:s.groupItems,ref:"spaceTable","empty-text":t.$t("No Groups Found")},{default:y(()=>[_(l,{label:n.is_buddyboss?t.$t("BudyBoss Group"):t.$t("BudyPress Group")},{default:y(S=>[g("div",null,[N(x(S.row.name)+" ",1),S.row.is_migrated?(v(),D(a,{key:0,type:"success"},{default:y(()=>[N(x(t.$t("Migrated")),1)]),_:1})):O("",!0)])]),_:1},8,["label"]),_(l,{label:t.$t("FluentCommunity Menu Group"),"class-name":"space_groups"},{header:y(()=>[g("span",null,x(t.$t("FluentCommunity Menu Group")),1),_(d,{class:"box-item",effect:"dark",content:t.$t("Space will be created under the selected Menu group."),placement:"right"},{default:y(()=>[_(u,{class:"el-icon--right"},{default:y(()=>[_(c)]),_:1})]),_:1},8,["content"])]),default:y(S=>[_(f,{clearable:"",placeholder:t.$t("No Menu Group"),modelValue:s.configMap[S.row.id],"onUpdate:modelValue":M=>s.configMap[S.row.id]=M,filterable:""},{default:y(()=>[_(h,{value:0,label:t.$t("No Menu Group")},null,8,["label"]),(v(!0),$(J,null,ye(s.spaceGroups,M=>(v(),D(h,{key:M.id,label:M.title,value:M.id},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue","onUpdate:modelValue"])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])):O("",!0),g("h5",_Ge,x(t.$t("The following data will be migrated to FluentCommunity")),1),g("ul",yGe,[s.featureConfig.has_groups?(v(),$("li",bGe,x(t.$t("Total Groups:"))+" "+x(s.groupItems.length),1)):O("",!0),g("li",null,x(t.$t("Total Activity (Posts):"))+" "+x(t.$formatNumber(s.stats.total_posts))+" "+x(t.$t("(+ associate favorites/reactions)")),1),g("li",null,x(t.$t("Total Comments:"))+" "+x(t.$formatNumber(s.stats.total_comments)),1),g("li",null,x(t.$t("Total Users:"))+" "+x(t.$formatNumber(s.stats.total_community_users)),1),s.stats.total_reactions?(v(),$("li",wGe,x(t.$t("Total Reactions:"))+" "+x(t.$formatNumber(s.stats.total_reactions)),1)):O("",!0)]),s.has_previous_migration?(v(),D(m,{key:1,modelValue:s.reset_migration,"onUpdate:modelValue":e[0]||(e[0]=S=>s.reset_migration=S),"true-value":"yes","false-value":"no"},{default:y(()=>[N(x(t.$t("Restart Migration (If unchecked, then it will continue from the last migration stage)")),1)]),_:1},8,["modelValue"])):O("",!0),s.has_previous_migration&&s.reset_migration=="yes"?(v(),D(m,{key:2,modelValue:s.delete_current_data,"onUpdate:modelValue":e[1]||(e[1]=S=>s.delete_current_data=S),"true-value":"yes","false-value":"no"},{default:y(()=>[N(x(t.$t("Delete Current Data (If checked, all current data of fluent community will be deleted and migration will start from scratch)")),1)]),_:1},8,["modelValue"])):O("",!0),o.isDeletionRequested?(v(),$("div",kGe,[_(b,{type:"error",closable:!1,"show-icon":""},{default:y(()=>[N(x(t.$t("This permanently deletes ALL current FluentCommunity data (posts, comments, reactions, media, activity, member profiles and community spaces) and cannot be undone.")),1)]),_:1}),_(w,{modelValue:s.delete_confirmation,"onUpdate:modelValue":e[2]||(e[2]=S=>s.delete_confirmation=S),"aria-label":t.$t("Type %s to confirm","DELETE"),placeholder:t.$t("Type %s to confirm","DELETE"),class:"fcom_mt_10"},null,8,["modelValue","aria-label","placeholder"])])):O("",!0),e[5]||(e[5]=g("hr",{class:"fcom_mb_20"},null,-1)),_(k,{loading:s.migrating,disabled:o.isDeletionRequested&&s.delete_confirmation!=="DELETE",onClick:e[3]||(e[3]=S=>o.startMigration()),class:"fcom_primary_button"},{default:y(()=>[N(x(t.$t("Start Migrating Data")),1)]),_:1},8,["loading","disabled"])])):s.stage=="migrating"?(v(),$("div",CGe,[g("ul",xGe,[s.featureConfig.has_groups?(v(),$("li",SGe,[N(x(t.$t("Groups"))+" ",1),_(a,{type:"success"},{default:y(()=>[N(x(t.$t("Migrated")),1)]),_:1})])):O("",!0),s.featureConfig.has_groups?Re((v(),$("li",$Ge,[N(x(t.$t("Group Members"))+" ",1),o.completedSteps.group_members?(v(),D(a,{key:0,type:"success"},{default:y(()=>[N(x(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[A,s.current_status.current_stage=="group_members"]]):O("",!0),Re((v(),$("li",null,[N(x(t.$t("Posts & Activities"))+" ",1),o.completedSteps.posts?(v(),D(a,{key:0,type:"success"},{default:y(()=>[N(x(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[A,s.current_status.current_stage=="posts"]]),Re((v(),$("li",null,[N(x(t.$t("Users"))+" ",1),o.completedSteps.users?(v(),D(a,{key:0,type:"success"},{default:y(()=>[N(x(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[A,s.current_status.current_stage=="users"]])]),e[9]||(e[9]=g("hr",{style:{"margin-bottom":"20px"}},null,-1)),s.current_status.current_stage=="group_members"?(v(),$("div",AGe,[g("h3",null,x(t.$t("Migrating Group Members from %s to FluentCommunity Spaces",o.providerName)),1),g("p",null,x(t.$t("Please do not close this window or go to other pages")),1),e[6]||(e[6]=g("hr",null,null,-1)),g("h4",null,x(t.$t("Current Stage:"))+" "+x(s.current_status.last_migrated_member_id)+"/"+x(s.max_ids.group_member_max),1),_(C,{"stroke-width":26,percentage:o.percentage(s.current_status.last_migrated_member_id,s.max_ids.group_member_max),indeterminate:!0},null,8,["percentage"])])):s.current_status.current_stage=="posts"?(v(),$("div",EGe,[g("h3",null,x(t.$t("Migrating Posts from %s to FluentCommunity",o.providerName)),1),g("p",null,x(t.$t("Please do not close this window or go to other pages")),1),e[7]||(e[7]=g("hr",null,null,-1)),g("h4",null,x(t.$t("Current Stage:"))+" "+x(s.current_status.last_activity_id)+"/"+x(s.max_ids.max_activity_id),1),_(C,{"stroke-width":26,percentage:o.percentage(s.current_status.last_activity_id,s.max_ids.max_activity_id),indeterminate:!0},null,8,["percentage"])])):s.current_status.current_stage=="users"?(v(),$("div",MGe,[g("h3",null,x(t.$t("Syncing User Data from %s to FluentCommunity",o.providerName)),1),g("p",null,x(t.$t("Please do not close this window or go to other pages")),1),e[8]||(e[8]=g("hr",null,null,-1)),g("h4",null,x(t.$t("Current Stage:"))+" "+x(s.current_status.last_migrated_user_id)+"/"+x(s.max_ids.max_user_id),1),_(C,{"stroke-width":26,percentage:o.percentage(s.current_status.last_migrated_user_id,s.max_ids.max_user_id),indeterminate:!0},null,8,["percentage"])])):s.current_status.current_stage=="completed"?(v(),$("div",TGe,[g("h3",null,x(t.$t("Congratulation! Migration has been completed!")),1),g("p",null,x(t.$t("Enjoy the blazing-fast community portal. Please go to the portal and review your data.")),1),g("a",{class:"el-button fcom_primary_button fcom_mt_20",href:t.appVars.portal_url},x(t.$t("Go to Community Portal")),9,PGe)])):O("",!0)])):(v(),$("div",IGe,x(t.$t("Migration Completed")),1))])],64)}const OGe=ce(pGe,[["render",LGe]]),DGe={name:"ManageMigrations",components:{BuddyPress:OGe,Layout:yi,AppLayout:bi},data(){return{selectedMigration:"",loading:!1,migrations:[]}},computed:{canManageMigrations(){return this.hasPermission("super_admin")}},methods:{getMigrations(){this.loading=!0,this.$get("migrations/").then(t=>{this.migrations=t.migrations,this.loading=!1}).catch(t=>{this.loading=!1,console.log(t)})}},mounted(){this.canManageMigrations&&this.getMigrations()}},RGe={class:"settings_router"},VGe={class:"fhr_content_layout_body"},FGe={key:0,class:"no_members"},NGe={key:1,class:"fcom_migration_selectors white_loaded"},BGe={key:1},zGe={style:{margin:"0"}},HGe={style:{margin:"10px 0 20px"}},UGe={class:"fcom_box_card_list"},jGe=["onClick"],WGe={style:{padding:"10px"},class:"fcom_box_card_avatar"},YGe=["src"],qGe={class:"fcom_box_card_info"},GGe={style:{"text-align":"center",display:"block"},class:"fcom_box_card_name"},XGe={href:"https://fluentcommunity.co/docs/fluentcommunity-buddyboss-migration",target:"_blank",rel:"noopener"},KGe={key:2,class:"fcom_migration_content"};function ZGe(t,e,n,i,s,o){const r=Vt,a=oa,l=B("BuddyPress"),c=B("layout"),u=B("app-layout");return v(),D(u,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:y(()=>[_(c,{class:"no_bg_layout",title:t.$t("Manage Migrations")},{default:y(()=>[g("div",RGe,[g("div",VGe,[o.canManageMigrations?s.selectedMigration?(v(),$("div",KGe,[s.selectedMigration=="buddypress"||s.selectedMigration=="buddyboss"?(v(),D(l,{key:0,is_buddyboss:s.selectedMigration=="buddyboss"},null,8,["is_buddyboss"])):O("",!0)])):(v(),$("div",NGe,[s.loading?(v(),D(r,{key:0,animated:!0})):(v(),$("div",BGe,[g("h3",zGe,x(t.$t("Migrate Data from other plugins.")),1),g("p",HGe,x(t.$t("Please select a plugin from where you want to migrate data to FluentCommunity.")),1),g("div",UGe,[(v(!0),$(J,null,ye(s.migrations,d=>(v(),$("div",{style:{border:"1px solid var(--fcom-primary-border, #e5e7eb)","text-align":"center"},key:d.key,onClick:h=>s.selectedMigration=d.key,class:"fcom_each_box_card"},[g("div",WGe,[d.logo?(v(),$("img",{key:0,style:{width:"200px","max-width":"100%","object-fit":"scale-down"},src:d.logo,alt:""},null,8,YGe)):O("",!0)]),g("div",qGe,[g("div",GGe,[g("h4",null,x(d.title),1)])])],8,jGe))),128))])])),_(a,{type:"warning",closable:!1,style:{"margin-top":"15px"}},{default:y(()=>[g("p",null,[N(x(t.$t("For large databases, please read our documentation and use wp-cli."))+" ",1),g("a",XGe,x(t.$t("Read Documentation")),1)])]),_:1})])):(v(),$("div",FGe,x(t.$t("Sorry, you do not have permission to view this page")),1))])])]),_:1},8,["title"])]),_:1})}const JGe=ce(DGe,[["render",ZGe]]),QGe={name:"GeneticPromo",props:{placement:{type:String,default:"generic_promo"}}},eXe={class:"fcom_generic_promo"},tXe={style:{"text-align":"center"},class:"fcom_upgrade_banner"},nXe={style:{"font-size":"18px","margin-bottom":"10px"}},sXe=["href"];function iXe(t,e,n,i,s,o){return v(),$("div",eXe,[g("div",tXe,[g("h3",nXe,x(t.$t("This feature is available on the pro version of FluentCommunity")),1),g("a",{class:"el-button fcom_primary_button",href:t.$upgradeUrl(n.placement),target:"_blank"},x(t.$t("Upgrade Now")),9,sXe)])])}const $U=ce(QGe,[["render",iXe]]),oXe={name:"AccessAutomator",components:{GeneticPromo:$U,AppLayout:bi,Layout:yi},data(){return{loading:!1,saving:!1,settings:{},crm_tags:[],spaceGroups:null,has_fluentcrm:!1}},methods:{fetchSettings(){this.loading=!0,this.$get("settings/crm-tagging-config").then(t=>{this.has_fluentcrm=t.has_fluentcrm,this.settings=t.settings,this.spaceGroups=t.spaceGroups,this.crm_tags=t.crm_tags}).catch(t=>{console.error(t)}).finally(()=>{this.loading=!1})},saveSettings(){if(!this.has_pro){this.$notify.error(this.$t("This feature is available on the pro version of FluentCommunity"));return}this.saving=!0,this.$post("settings/crm-tagging-config",{settings:this.settings}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})},installPlugin(t){this.saving=!0,this.$post("settings/install_plugin",{plugin:t}).then(e=>{e.is_installed?this.$notify.success(e.message):this.$notify.error(this.$t("Sorry, the selected plugins could not be installed")),this.fetchSettings()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){this.has_pro&&this.fetchSettings()}},rXe={class:"settings_router"},aXe={class:"fhr_content_layout_body_"},lXe={class:"fcom_settings_header"},cXe={class:"setting_body_"},uXe={key:0,class:"white_loaded"},dXe={key:1,class:"white_loaded"},hXe={key:2,class:"white_loaded"},fXe={class:"fcom_generic_promo"},pXe={style:{"text-align":"center"},class:"fcom_upgrade_banner"},mXe={style:{"font-size":"18px","margin-bottom":"10px"}},gXe={key:3},vXe={class:"white_loaded fcom_mb_20"},_Xe={class:"fcom_input_wrap"},yXe={key:0},bXe={class:"fcom_input_wrap"},wXe={class:"fcom_input_wrap"},kXe={key:0,class:"fcom_input_wrap"},CXe={key:0,class:"fcom_mapped_list"},xXe={class:"fcom_mapped_list__head"},SXe={class:"fcom_mapped_list__group_title"},$Xe={class:"fcom_mapped_list__space"},AXe=["innerHTML"],EXe=["innerHTML"],MXe={key:2,class:"fcom_mapped_list__icon fcom_no_avatar"},TXe={class:"fcom_mapped_list__name"},PXe={class:"fcom_mapped_list__actions"},IXe={key:1,class:"white_loaded"},LXe={key:4};function OXe(t,e,n,i,s,o){const r=ze,a=oa,l=Vt,c=B("genetic-promo"),u=qt,d=nn,h=we,f=Zt,p=Wt,m=B("layout"),b=B("app-layout");return v(),D(b,{wrapper_class:"fcom_single_layout fcom_access_automator fcom_max_layout"},{default:y(()=>[_(m,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Access Management with FluentCRM")},{actions:y(()=>[s.spaceGroups?(v(),D(r,{key:0,class:"fcom_primary_button",loading:s.saving,onClick:o.saveSettings},{default:y(()=>[g("span",null,x(t.$t("Save Settings")),1)]),_:1},8,["loading","onClick"])):O("",!0)]),default:y(()=>[g("div",rXe,[g("div",aXe,[g("div",lXe,[g("h2",null,x(t.$t("Automate your Course or Space accesses with FluentCRM Tags")),1),g("p",null,x(t.$t("Control user accesses to different spaces/courses of your portal based on the contact tags.")),1),g("p",null,x(t.$t("Select the corresponding FluentCRM Tag for each space/course. So when someone gets the tag, they will get access to the space/course. Similarly when someone join a space or course they will be tagged in FluentCRM.")),1),_(a,{class:"fcom_pro_tag",type:"warning",closable:!1,size:"small"},{default:y(()=>[N(x(t.$t("Please note: Existing contact with the tags will not get access automatically. To Give access to existing contacts with tags, please go to FluentCRM and use bulk actions.")),1)]),_:1})]),g("div",cXe,[s.loading?(v(),$("div",uXe,[_(l,{rows:5,animated:!0})])):t.has_pro?s.has_fluentcrm?s.settings&&s.spaceGroups?(v(),$("div",gXe,[g("div",vXe,[_(d,{onSubmit:e[5]||(e[5]=Me(w=>t.doNothing(),["prevent"])),modelValue:s.settings,"onUpdate:modelValue":e[6]||(e[6]=w=>s.settings=w),"label-position":"top"},{default:y(()=>[g("div",_Xe,[_(u,{modelValue:s.settings.is_enabled,"onUpdate:modelValue":e[1]||(e[1]=w=>s.settings.is_enabled=w),"true-value":"yes","false-value":"no"},{default:y(()=>[N(x(t.$t("Enable Access Management with FluentCRM")),1)]),_:1},8,["modelValue"]),s.settings.is_enabled!="yes"?(v(),$("p",yXe,x(t.$t("Enable to configure your access management with FluentCRM")),1)):O("",!0)]),s.settings.is_enabled=="yes"?(v(),$(J,{key:0},[g("div",bXe,[_(u,{modelValue:s.settings.create_crm_contact,"onUpdate:modelValue":e[2]||(e[2]=w=>s.settings.create_crm_contact=w),"true-value":"yes","false-value":"no"},{default:y(()=>[N(x(t.$t("Create contact in FluentCRM (if not exist) when join in the configured spaces / courses.")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("If enabled then, FluentCommunity will create a contact to assign the associate tags from your configuration. Otherwise it will skip tagging.")),1)]),g("div",wXe,[_(u,{modelValue:s.settings.create_user,"onUpdate:modelValue":e[3]||(e[3]=w=>s.settings.create_user=w),"true-value":"yes","false-value":"no"},{default:y(()=>[N(x(t.$t("Create User in WP when you apply a configured tag on a contact to add to the course / space.")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("If enabled then, a WP user will be created if not exist and add to the configured course or space.")),1)]),s.settings.create_user=="yes"?(v(),$("div",kXe,[_(u,{modelValue:s.settings.send_welcome_email,"onUpdate:modelValue":e[4]||(e[4]=w=>s.settings.send_welcome_email=w),"true-value":"yes","false-value":"no"},{default:y(()=>[N(x(t.$t("Send default WP welcome email when creating the user by tagging.")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("If enabled then, The default WordPress welcome and password set email will be sent.")),1)])):O("",!0)],64)):O("",!0)]),_:1},8,["modelValue"])]),s.settings.is_enabled=="yes"?(v(),$("div",CXe,[g("div",xXe,[g("span",null,x(t.$t("Space")),1),g("span",null,x(t.$t("Mapped FluentCRM Tag")),1)]),(v(!0),$(J,null,ye(s.spaceGroups,w=>(v(),$("div",{class:"fcom_mapped_list__group",key:w.id},[g("div",SXe,x(w.title),1),(v(!0),$(J,null,ye(w.spaces,k=>(v(),$("div",{class:"fcom_mapped_list__row",key:k.id},[g("div",$Xe,[k.icon?(v(),D(h,{key:0,class:"fcom_mapped_list__icon"},{default:y(()=>[g("span",{innerHTML:k.icon},null,8,AXe)]),_:2},1024)):k.shape_svg?(v(),$("span",{key:1,class:"fcom_mapped_list__icon",innerHTML:k.shape_svg},null,8,EXe)):(v(),$("span",MXe)),g("span",TXe,x(k.title),1)]),g("div",PXe,[_(p,{filterable:"",clearable:"",placeholder:t.$t("No Mapping"),modelValue:s.settings.tagging_maps[k.id],"onUpdate:modelValue":C=>s.settings.tagging_maps[k.id]=C},{default:y(()=>[(v(!0),$(J,null,ye(s.crm_tags,C=>(v(),D(f,{label:C.title,value:C.id},null,8,["label","value"]))),256))]),_:1},8,["placeholder","modelValue","onUpdate:modelValue"]),s.settings.tagging_maps[k.id]?(v(),D(u,{key:0,modelValue:s.settings.linked_maps[k.id],"onUpdate:modelValue":C=>s.settings.linked_maps[k.id]=C,"true-value":s.settings.tagging_maps[k.id],"false-value":""},{default:y(()=>[N(x(t.$t("Sync this tag with the %s access",k.type=="community"?t.$labelize("space"):t.$labelize("course"))),1)]),_:2},1032,["modelValue","onUpdate:modelValue","true-value"])):O("",!0)])]))),128))]))),128))])):O("",!0),t.has_pro?(v(),D(r,{key:2,class:"fcom_primary_button",loading:s.saving,onClick:o.saveSettings},{default:y(()=>[g("span",null,x(t.$t("Save Settings")),1)]),_:1},8,["loading","onClick"])):(v(),$("div",IXe,[_(c,{placement:"feature_lock_access_automator"})]))])):(v(),$("div",LXe,[g("p",null,x(t.$t("Settings could not be loaded")),1)])):(v(),$("div",hXe,[g("div",fXe,[g("div",pXe,[g("h3",mXe,x(t.$t("FluentCRM is not installed!")),1),g("p",null,x(t.$t("Please install FluentCRM to enable this feature.")),1),_(r,{loading:s.saving,class:"el-button fcom_primary_button",onClick:e[0]||(e[0]=w=>o.installPlugin("fluent-crm"))},{default:y(()=>[N(x(t.$t("Install FluentCRM")),1)]),_:1},8,["loading"])])])])):(v(),$("div",dXe,[_(c,{placement:"feature_lock_access_automator"})]))])])])]),_:1},8,["title"])]),_:1})}const DXe=ce(oXe,[["render",OXe]]),RXe={name:"TopicsConfig",emits:["saved"],data(){return{config:this.appVars.topicsConfig,loading:!1}},methods:{update(){this.loading=!0,this.$post("admin/topics/config",{config:this.config}).then(t=>{this.$notify.success(t.message),this.appVars.topicsConfig=t.config,this.$emit("saved")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}}};function VXe(t,e,n,i,s,o){const r=l2,a=tn,l=qt,c=ze,u=nn,d=xt("loading");return v(),D(u,{onSubmit:e[4]||(e[4]=Me(h=>t.doNothing(),["prevent"])),"label-position":"top",modelValue:s.config,"onUpdate:modelValue":e[5]||(e[5]=h=>s.config=h)},{default:y(()=>[_(a,{label:t.$t("Maximum Number of Topics a user can select when creating a post")},{default:y(()=>[_(r,{modelValue:s.config.max_topics_per_post,"onUpdate:modelValue":e[0]||(e[0]=h=>s.config.max_topics_per_post=h),min:1,max:20,step:1},null,8,["modelValue"])]),_:1},8,["label"]),_(a,{label:t.$t("Maximum Number of Topics a space may have")},{default:y(()=>[_(r,{modelValue:s.config.max_topics_per_space,"onUpdate:modelValue":e[1]||(e[1]=h=>s.config.max_topics_per_space=h),min:1,max:40,step:1},null,8,["modelValue"])]),_:1},8,["label"]),_(a,{label:t.$t("Show/Hide Topics On post Card")},{default:y(()=>[_(l,{"true-value":"yes","false-value":"no",modelValue:s.config.show_on_post_card,"onUpdate:modelValue":e[2]||(e[2]=h=>s.config.show_on_post_card=h),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Show Topics on Post Card")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(a,null,{default:y(()=>[Re((v(),D(c,{class:"fcom_primary_button",onClick:e[3]||(e[3]=h=>o.update())},{default:y(()=>[N(x(t.$t("Update")),1)]),_:1})),[[d,s.loading]])]),_:1})]),_:1},8,["modelValue"])}const FXe=ce(RXe,[["render",VXe]]),NXe={name:"TopicCreateForm",components:{SpaceIcon:Sp,SlugInput:Yd},emits:["saved"],props:{space_id:{type:Number,required:!1},all_spaces:{type:Array,required:!1,default:()=>[]},topic:{type:Object,required:!1,default:{title:"",description:"",slug:"",space_ids:[],admin_only:"no"}}},data(){return{saving:!1,editing_topic:this.topic,formattedSpaceGroups:[]}},methods:{createOrupdateTopic(){this.saving=!0,this.space_id&&(this.editing_topic.space_ids=[this.space_id],this.editing_topic.inline="yes"),this.$post("admin/topics",this.editing_topic).then(t=>{this.$notify.success(t.message),this.$emit("saved",t.topic)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})},formatSpaceGroups(){if(this.space_id||this.all_spaces.length==0)return;let t=this.all_spaces,e=this.appVars.space_groups,n=[],i=[];this.each(e,r=>{let a=t.filter(l=>{let c=l.parent_id==r.id;return c&&i.push(l.slug),c});a.length&&n.push({label:r.title,spaces:a})});let s=e.map(r=>r.id),o=t.filter(r=>{let a=!s.includes(r.id),l=!r.parent_id||!s.includes(r.parent_id);return a&&l&&!i.includes(r.slug)});o.length&&n.push({label:this.$t("Other Spaces - No Assigned Group"),spaces:o}),this.formattedSpaceGroups=n}},mounted(){this.formatSpaceGroups()}},BXe={class:"fcom_help_text"},zXe={key:0,class:"fcom_space_title"},HXe={key:0},UXe={key:1},jXe={class:"fcom_help_text"};function WXe(t,e,n,i,s,o){const r=ht,a=tn,l=B("slug-input"),c=B("SpaceIcon"),u=Zt,d=q1,h=Wt,f=qt,p=ze,m=nn,b=xt("loading");return v(),D(m,{onSubmit:e[5]||(e[5]=Me(w=>t.doNothing(),["prevent"])),modelValue:s.editing_topic,"onUpdate:modelValue":e[6]||(e[6]=w=>s.editing_topic=w),"label-position":"top"},{default:y(()=>[_(a,{label:t.$t("Topic Title")},{default:y(()=>[_(r,{placeholder:t.$t("Title of your topic"),modelValue:s.editing_topic.title,"onUpdate:modelValue":e[0]||(e[0]=w=>s.editing_topic.title=w),type:"text"},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),_(a,{label:t.$t("Topic Slug")},{default:y(()=>[_(l,{disabled:!!s.editing_topic.id,modelValue:s.editing_topic.slug,"onUpdate:modelValue":e[1]||(e[1]=w=>s.editing_topic.slug=w),placeholder:t.$t("Slug of your topic")},null,8,["disabled","modelValue","placeholder"])]),_:1},8,["label"]),_(a,{label:t.$t("Topic sub-title")},{default:y(()=>[_(r,{placeholder:t.$t("Sub-title of your topic"),modelValue:s.editing_topic.description,"onUpdate:modelValue":e[2]||(e[2]=w=>s.editing_topic.description=w),type:"text"},null,8,["placeholder","modelValue"]),g("div",BXe,[g("p",null,x(t.$t("This will be displayed under the title in the topic when selecting in post creation form")),1)])]),_:1},8,["label"]),n.space_id?O("",!0):(v(),D(a,{key:0,label:t.$t("Space visibility")},{default:y(()=>[_(h,{modelValue:s.editing_topic.space_ids,"onUpdate:modelValue":e[3]||(e[3]=w=>s.editing_topic.space_ids=w),multiple:"",placeholder:t.$t("Select Spaces"),style:{width:"100%"}},{default:y(()=>[(v(!0),$(J,null,ye(s.formattedSpaceGroups,w=>(v(),D(d,{key:w.label,label:w.label},{default:y(()=>[(v(!0),$(J,null,ye(w.spaces,k=>(v(),D(u,{key:k.slug,label:k.title,value:k.id.toString()},{default:y(()=>[k.id?(v(),$("span",zXe,[_(c,{space_profile:k},null,8,["space_profile"]),g("span",null,[N(x(t.getExcerpt(k.title,50))+" ",1),k.type=="course"?(v(),$("span",HXe," ("+x(t.$t("course"))+")",1)):O("",!0)])])):(v(),$("span",UXe,x(t.getExcerpt(k.title,50)),1))]),_:2},1032,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","placeholder"]),g("div",jXe,[g("p",null,x(t.$t("Select spaces where this topic will be visible.")),1)])]),_:1},8,["label"])),_(a,null,{default:y(()=>[_(f,{modelValue:s.editing_topic.admin_only,"onUpdate:modelValue":e[4]||(e[4]=w=>s.editing_topic.admin_only=w),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Only admins and moderators can select this topic")),1)]),_:1},8,["modelValue"])]),_:1}),_(a,null,{default:y(()=>[Re((v(),D(p,{class:"fcom_primary_button",onClick:o.createOrupdateTopic,disabled:s.saving},{default:y(()=>[N(x(t.$t("Save")),1)]),_:1},8,["onClick","disabled"])),[[b,s.saving]])]),_:1})]),_:1},8,["modelValue"])}const YXe=ce(NXe,[["render",WXe]]),qXe={name:"AllTopics",components:{TopicCreateForm:YXe,SlugInput:Yd,SpaceIcon:Sp,Layout:yi,AppLayout:bi,TopicsConfig:FXe,FluentDnD:Tr},data(){return{topics:[],saving:!1,loading:!1,search:"",applied_search:"",showModal:!1,editing_topic:{title:"",description:"",slug:"",space_ids:[],admin_only:"no"},all_spaces:[],showConfig:!1}},methods:{showForm(t){this.editing_topic=t||{title:"",slug:"",space_ids:[],admin_only:"no"},this.showModal=!0},fetch(){const t=this.search;this.loading=!0,this.$get("admin/topics",{search:t}).then(e=>{this.topics=e.topics,this.all_spaces=e.all_spaces,this.applied_search=t,this._savedOrder=this.topicOrderKey()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},removeTopic(t){this.$confirm(this.$t("Are you sure you want to remove this topic?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Remove"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.saving=!0,this.$del("admin/topics/"+t.id).then(e=>{this.$notify.success(e.message),this.fetch()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})})},formatTopics(t){let e=this.all_spaces,n=[];return t.forEach(i=>{let s=e.find(o=>o.id==i);s&&n.push(s.title)}),n.join(", ")},onTopicDrop(){this.applied_search||(clearTimeout(this._reorderTimer),this._reorderTimer=setTimeout(()=>{this.saveTopicOrder()},400))},saveTopicOrder(){if(this._savingOrder){this._orderQueued=!0;return}const t=this.topicOrderKey();t!==this._savedOrder&&(this._savingOrder=!0,this.$post("admin/topics/reorder",{topic_ids:this.topics.map(e=>e.id)}).then(e=>{this._savedOrder=t,this.$notify.success(e.message)}).catch(e=>{this.$handleError(e),this._orderQueued||this.fetch()}).finally(()=>{this._savingOrder=!1,this._orderQueued&&(this._orderQueued=!1,this.saveTopicOrder())}))},topicOrderKey(){return this.topics.map(t=>t.id).join(",")},topicItemLabel(t,e){return this.$t("%1$s. Sortable item %2$s of %3$s. Use the up and down arrow keys to reorder.",t.title,e+1,this.topics.length)}},watch:{search(t){!t&&this.applied_search&&this.fetch()}},mounted(){this.has_pro&&this.fetch(),this.changeTitle(this.$t("Topics Settings"))},beforeUnmount(){clearTimeout(this._reorderTimer)}},GXe=["href"],XXe={key:0,class:"fhr_content_layout_body"},KXe={class:"fcom_mb_10"},ZXe={class:"fcom_manager_actions fcom_mb_10"},JXe={class:"bulk_search"},QXe={class:"fcom_topics_dnd fcom_manager_table"},eKe={key:0,class:"fcom_topic_row fcom_topic_row_head"},tKe={class:"col_title"},nKe={class:"col_spaces"},sKe={class:"col_admin"},iKe={class:"col_actions"},oKe={class:"fcom_topic_row"},rKe=["title"],aKe={class:"col_title"},lKe={class:"fcom_topic_title"},cKe={class:"fcom_meta_text"},uKe={class:"col_spaces"},dKe={class:"col_admin"},hKe={class:"col_actions"},fKe={class:"fcom_table_action_col"},pKe={key:2,class:"fcom_topic_empty"},mKe={key:1,class:"settings_router"},gKe={class:"fhr_content_layout_body"},vKe={class:"setting_body",style:{"text-align":"center"}},_Ke={class:"promo_description"},yKe=["href"],bKe={class:"dialog_header"},wKe={class:"dialog_left"},kKe={key:0,class:"dialog_body"};function CKe(t,e,n,i,s,o){const r=B("Plus"),a=we,l=ze,c=B("Operation"),u=ht,d=B("DeleteFilled"),h=B("FluentDnD"),f=B("layout"),p=B("app-layout"),m=B("TopicCreateForm"),b=$s,w=B("TopicsConfig"),k=xt("loading");return v(),$(J,null,[_(p,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:y(()=>[_(f,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Topics")},{actions:y(()=>[t.has_pro?(v(),$(J,{key:0},[_(l,{class:"fcom_primary_button",onClick:e[0]||(e[0]=C=>o.showForm(null))},{default:y(()=>[_(a,null,{default:y(()=>[_(r)]),_:1}),g("span",null,x(t.$t("New Topic")),1)]),_:1}),_(l,{onClick:e[1]||(e[1]=C=>s.showConfig=!0),class:"fcom_secondary_button"},{default:y(()=>[_(a,null,{default:y(()=>[_(c)]),_:1}),g("span",null,x(t.$t("Settings")),1)]),_:1})],64)):(v(),$("a",{key:1,target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_topics"),class:"el-button el-button--danger"},x(t.$t("Upgrade to Pro")),9,GXe))]),default:y(()=>[t.has_pro?(v(),$("div",XXe,[g("div",null,[g("p",KXe,x(t.$t("Categorize your content and allow members to filter posts with the topic navigation bar in spaces.")),1),g("div",ZXe,[g("div",JXe,[_(u,{modelValue:s.search,"onUpdate:modelValue":e[2]||(e[2]=C=>s.search=C),onKeydown:ut(o.fetch,["enter"]),clearable:"",placeholder:t.$t("Search"),class:"el-input-round"},{prefix:y(()=>[...e[7]||(e[7]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[g("path",{d:"M14.5833 14.584L18.3333 18.334",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M16.6667 9.16699C16.6667 5.02486 13.3088 1.66699 9.16666 1.66699C5.02453 1.66699 1.66666 5.02486 1.66666 9.16699C1.66666 13.3091 5.02453 16.667 9.16666 16.667C13.3088 16.667 16.6667 13.3091 16.6667 9.16699Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})],-1)])]),_:1},8,["modelValue","onKeydown","placeholder"])])]),Re((v(),$("div",QXe,[s.topics.length?(v(),$("div",eKe,[e[8]||(e[8]=g("span",{class:"col_handle"},null,-1)),g("span",tKe,x(t.$t("Title")),1),g("span",nKe,x(t.$t("Spaces")),1),g("span",sKe,x(t.$t("Admin Only?")),1),g("span",iKe,x(t.$t("Actions")),1)])):O("",!0),s.topics.length?(v(),D(h,{key:1,items:s.topics,"row-key":"id",draggable:!s.applied_search,"item-label":o.topicItemLabel,onDrop:o.onTopicDrop},{item:y(({data:C})=>[g("div",oKe,[g("span",{class:q(["col_handle fcom_drag_handle",{fcom_drag_disabled:s.applied_search}]),title:s.applied_search?t.$t("Clear the search to reorder"):t.$t("Drag to reorder"),"aria-hidden":"true"},"⋮⋮",10,rKe),g("span",aKe,[g("p",lKe,x(C.title),1),g("span",cKe,x(C.description),1)]),g("span",uKe,x(o.formatTopics(C.space_ids)),1),g("span",dKe,x(C.admin_only=="yes"?t.$t("Yes"):t.$t("No")),1),g("span",hKe,[g("div",fKe,[_(l,{onClick:A=>o.showForm(C),size:"small"},{default:y(()=>[N(x(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(l,{"aria-label":t.$t("Delete"),onClick:A=>o.removeTopic(C),type:"danger",plain:"",size:"small"},{default:y(()=>[_(a,null,{default:y(()=>[_(d)]),_:1})]),_:1},8,["aria-label","onClick"])])])])]),_:1},8,["items","draggable","item-label","onDrop"])):(v(),$("p",pKe,x(t.$t("No Topics Found")),1))])),[[k,s.loading]])])])):(v(),$("div",mKe,[g("div",gKe,[g("div",vKe,[g("p",_Ke,x(t.$t("__TOPIC_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_topics"),class:"el-button el-button--danger"},x(t.$t("Upgrade to Pro")),9,yKe)])])]))]),_:1},8,["title"])]),_:1}),_(b,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:s.showModal,"onUpdate:modelValue":e[4]||(e[4]=C=>s.showModal=C),direction:"rtl"},{header:y(({close:C})=>[g("div",bKe,[g("div",wKe,[e[9]||(e[9]=g("div",{class:"header_icon"},[g("svg",{viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"},[g("path",{d:"M2.73552 11.6867C1.78253 12.7511 1.76203 14.3569 2.63665 15.4865C4.37226 17.7281 6.2719 19.6277 8.51351 21.3633C9.64313 22.238 11.2489 22.2175 12.3133 21.2645C15.203 18.6771 17.8494 15.9731 20.4033 13.0016C20.6558 12.7078 20.8137 12.3477 20.8492 11.9619C21.0059 10.2561 21.3279 5.34144 19.9932 4.00675C18.6586 2.67207 13.7439 2.99408 12.0381 3.15083C11.6523 3.18627 11.2922 3.34421 10.9984 3.59671C8.02692 6.15064 5.32291 8.797 2.73552 11.6867Z",stroke:"currentColor","stroke-width":"1.5"}),g("path",{opacity:"0.4",d:"M7.5 14.5L9.5 16.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M18 6L22 2",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})])],-1)),g("div",null,[g("h4",null,x(s.editing_topic.id?t.$t("Update Topic"):t.$t("Add Topic")),1)])])])]),default:y(()=>[s.showModal?(v(),$("div",kKe,[s.showModal?(v(),D(m,{key:0,all_spaces:s.all_spaces,topic:s.editing_topic,onSaved:e[3]||(e[3]=C=>{s.showModal=!1,o.fetch()})},null,8,["all_spaces","topic"])):O("",!0)])):O("",!0)]),_:1},8,["width","modelValue"]),_(b,{"close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,title:t.$t("Topics Settings"),modelValue:s.showConfig,"onUpdate:modelValue":e[6]||(e[6]=C=>s.showConfig=C),direction:"rtl"},{default:y(()=>[s.showConfig?(v(),D(w,{key:0,onSaved:e[5]||(e[5]=C=>{s.showConfig=!1})})):O("",!0)]),_:1},8,["width","title","modelValue"])],64)}const xKe=ce(qXe,[["render",CKe]]),SKe={name:"CustomizationSettings",components:{Layout:yi,AppLayout:bi},data(){return{loadingCustomizations:!1,loadingSnippets:!1,savingCustomizations:!1,savingSnippets:!1,settings:null,snippetsSettings:null,settingsDirty:!1,snippetsDirty:!1,postOrderOptions:this.appVars.post_order_by_options}},watch:{settings:{handler(){this.settingsDirty=!0},deep:!0},snippetsSettings:{handler(){this.snippetsDirty=!0},deep:!0}},methods:{getCustomizations(){this.loadingCustomizations=!0,this.$get("settings/customization-settings").then(t=>{this.settings=t.settings,this.$nextTick(()=>{this.settingsDirty=!1})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loadingCustomizations=!1})},saveAll(){this.settingsDirty&&this.snippetsDirty?this.saveSnippets(!0).then(()=>{this.saveCustomizations()}):this.settingsDirty?this.saveCustomizations():this.snippetsDirty?this.saveSnippets():this.saveCustomizations()},saveCustomizations(){this.savingCustomizations=!0,this.$post("settings/customization-settings",{settings:this.settings}).then(t=>{this.settingsDirty=!1,this.$notify.success(t.message),window.location.reload()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.savingCustomizations=!1})},getSnippetsSettings(){this.loadingSnippets=!0,this.$get("settings/snippets-settings").then(t=>{this.snippetsSettings=t.snippets,this.$nextTick(()=>{this.snippetsDirty=!1})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loadingSnippets=!1})},saveSnippets(t=!1){return this.savingSnippets=!0,this.$post("settings/snippets-settings",{snippets:this.snippetsSettings}).then(e=>{this.snippetsDirty=!1,this.$notify.success(e.message)}).catch(e=>{if(this.$handleError(e),t)throw e}).finally(()=>{this.savingSnippets=!1})}},mounted(){this.getCustomizations(),this.has_pro&&this.getSnippetsSettings(),this.changeTitle(this.$t("Customization Settings"))}},$Ke={class:"settings_router"},AKe={key:0,class:"white_loaded"},EKe={key:1,class:"fhr_content_layout_body"},MKe={class:"setting_header"},TKe={class:"setting_body"},PKe={class:"fcom_input_wrap"},IKe={class:"fcom_input_wrap"},LKe={class:"fcom_input_wrap"},OKe={class:"fcom_input_wrap"},DKe={class:"fcom_input_wrap"},RKe={key:0},VKe={class:"fcom_input_wrap"},FKe={key:0,class:"fcom_input_wrap"},NKe=["innerHTML"],BKe={key:1,style:{cursor:"pointer","font-weight":"bold"}},zKe={class:"fcom_input_wrap"},HKe={style:{"font-weight":"bold"}},UKe={class:"fcom_help_text"},jKe={target:"_blank",rel:"noopener",href:"https://wpmanageninja.com/affiliate/"},WKe={class:"fcom_input_wrap"},YKe={class:"fcom_input_wrap"},qKe={class:"fcom_input_wrap"},GKe={key:0},XKe={class:"fcom_help_text"},KKe={class:"fcom_input_wrap"},ZKe={key:0},JKe={class:"fcom_help_text"},QKe={class:"fcom_input_wrap"},eZe={class:"fcom_help_text"},tZe={key:2,class:"fcom_input_wrap"},nZe={class:"fcom_help_text"},sZe={class:"fcom_input_wrap"},iZe={class:"fcom_help_text"},oZe={key:0},rZe={key:1},aZe={class:"fcom_input_wrap"},lZe={class:"fcom_input_wrap"},cZe={style:{margin:"20px 0 0 0"},class:"fcom_input_wrap"},uZe={key:2},dZe={key:0,class:"white_loaded"},hZe={key:1,class:"fhr_content_layout_body"},fZe={class:"setting_header"},pZe={class:"setting_body"},mZe={class:"setting_sub_header"},gZe={class:"setting_sub_body"},vZe={class:"setting_sub_header"},_Ze={class:"setting_sub_body"},yZe={style:{margin:"20px 0 0 0"},class:"fcom_input_wrap"},bZe={key:2},wZe={key:4,class:"fhr_content_layout_body",style:{"text-align":"center"}},kZe={class:"setting_header"},CZe={class:"setting_body"},xZe={class:"promo_description"},SZe=["href"];function $Ze(t,e,n,i,s,o){const r=ze,a=Vt,l=qt,c=ht,u=Yo,d=Li,h=ws,f=tn,p=Zt,m=Wt,b=nn,w=$8,k=B("layout"),C=B("app-layout"),A=xt("loading");return v(),D(C,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:y(()=>[_(k,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Customize Your Portal")},{actions:y(()=>[_(r,{class:"fcom_primary_button",disabled:s.savingCustomizations||s.savingSnippets||s.loadingCustomizations||s.loadingSnippets,onClick:o.saveAll},{default:y(()=>[g("span",null,x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),default:y(()=>[g("div",$Ke,[s.loadingCustomizations?(v(),$("div",AKe,[_(a,{rows:5,animated:!0})])):s.settings?(v(),$("div",EKe,[g("div",MKe,[g("h2",null,x(t.$t("Customize the UI features of the portal")),1)]),g("div",TKe,[_(b,{onSubmit:e[20]||(e[20]=Me(S=>t.doNothing(),["prevent"])),modelValue:s.settings,"onUpdate:modelValue":e[21]||(e[21]=S=>s.settings=S),"label-position":"top"},{default:y(()=>[g("div",PKe,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.dark_mode,"onUpdate:modelValue":e[0]||(e[0]=S=>s.settings.dark_mode=S),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Enable Dark Mode")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("Enables switching between dark and light interface themes, accommodating different lighting conditions and user preferences.")),1)]),g("div",IKe,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.fixed_page_header,"onUpdate:modelValue":e[1]||(e[1]=S=>s.settings.fixed_page_header=S),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Enable Sticky Page headers across portal")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("When enabled, the page header will remain visible at the top of the screen as users scroll down the page.")),1)]),g("div",LKe,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.feed_link_on_sidebar,"onUpdate:modelValue":e[2]||(e[2]=S=>s.settings.feed_link_on_sidebar=S),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Show Default Feed link on left sidebar")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("Adds the default Feed link in the sidebar, providing an extra access point to the all feeds page")),1)]),g("div",OKe,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.collapse_sidebar_groups,"onUpdate:modelValue":e[3]||(e[3]=S=>s.settings.collapse_sidebar_groups=S),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Collapse sidebar groups by default")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("When enabled, all space groups in the left sidebar will be collapsed by default. Users can still expand them manually.")),1)]),g("div",DKe,[_(l,{disabled:!t.has_pro,"true-value":"yes","false-value":"no",modelValue:s.settings.enable_sidebar_toggle,"onUpdate:modelValue":e[4]||(e[4]=S=>s.settings.enable_sidebar_toggle=S),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Enable sidebar collapse on desktop"))+" ",1),t.has_pro?O("",!0):(v(),$("span",RKe,"("+x(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled","modelValue"]),g("p",null,x(t.$t("__SIDEBAR_TOGGLE_DESC")),1)]),g("div",VKe,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.hide_header_on_scroll,"onUpdate:modelValue":e[5]||(e[5]=S=>s.settings.hide_header_on_scroll=S),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Hide Header & Footer on Scroll (Mobile)")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("On mobile devices, the header and footer will automatically hide when scrolling down and reappear when scrolling up.")),1)]),t.has_pro?(v(),$("div",FKe,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.show_powered_by,"onUpdate:modelValue":e[6]||(e[6]=S=>s.settings.show_powered_by=S),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Show powered by text")),1)]),_:1},8,["modelValue"]),g("p",null,[N(x(t.$t("Displays a 'Powered by FluentCommunity' link, showing support for the platform and increasing its visibility."))+" ",1),_(u,{persistent:!1,placement:"bottom",width:400,trigger:"click"},{reference:y(()=>[s.settings.affiliate_id?(v(),$("span",BKe,x(t.$t("Affiliate ID: %s",s.settings.affiliate_id)),1)):(v(),$("span",{key:0,style:{cursor:"pointer"},innerHTML:t.$t("%1$sClick here%2$s to add affiliate ID","<b>","</b>")},null,8,NKe))]),default:y(()=>[g("div",zKe,[g("label",HKe,x(t.$t("Your affiliate ID")),1),_(c,{style:{margin:"20px 0"},placeholder:t.$t("Affiliate ID"),type:"number",modelValue:s.settings.affiliate_id,"onUpdate:modelValue":e[7]||(e[7]=S=>s.settings.affiliate_id=S)},null,8,["placeholder","modelValue"]),Re((v(),D(r,{onClick:o.saveCustomizations,disabled:s.savingCustomizations,class:"fcom_primary_button"},{default:y(()=>[N(x(t.$t("Save")),1)]),_:1},8,["onClick","disabled"])),[[A,s.savingCustomizations]])]),g("div",UKe,[g("p",null,[N(x(t.$t("Don't have an affiliate account?"))+" ",1),g("a",jKe,x(t.$t("Click here"))+".",1)])])]),_:1})])])):O("",!0),g("div",WKe,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.icon_on_header_menu,"onUpdate:modelValue":e[8]||(e[8]=S=>s.settings.icon_on_header_menu=S),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Show icon on header menu items")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("Adds icons next to text in header menu items, enhancing visual appeal and improving navigation clarity.")),1)]),g("div",YKe,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.show_post_modal,"onUpdate:modelValue":e[9]||(e[9]=S=>s.settings.show_post_modal=S),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Use Modal UI for quick post view")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("If you enable this then, posts will be shown as modal when interacting")),1)]),O("",!0),g("div",qKe,[_(f,{label:t.$t("Rich Media Post Layout")},{default:y(()=>[_(h,{modelValue:s.settings.rich_post_layout,"onUpdate:modelValue":e[11]||(e[11]=S=>s.settings.rich_post_layout=S),class:"fcom_radio_group"},{default:y(()=>[_(d,{value:"classic"},{default:y(()=>[N(x(t.$t("Classic")),1)]),_:1}),_(d,{disabled:!t.has_pro,value:"modern"},{default:y(()=>[N(x(t.$t("Modern"))+" ",1),t.has_pro?O("",!0):(v(),$("span",GKe,"("+x(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",XKe,[g("p",null,x(t.$t("Classic: Image/Video after the content. Modern: Image/Video at first")),1)])]),_:1},8,["label"])]),g("div",KKe,[_(f,{label:t.$t("Members List Layout")},{default:y(()=>[_(h,{modelValue:s.settings.member_list_layout,"onUpdate:modelValue":e[12]||(e[12]=S=>s.settings.member_list_layout=S),class:"fcom_radio_group"},{default:y(()=>[_(d,{value:"classic"},{default:y(()=>[N(x(t.$t("List View")),1)]),_:1}),_(d,{disabled:!t.has_pro,value:"grid"},{default:y(()=>[N(x(t.$t("Grid View"))+" ",1),t.has_pro?O("",!0):(v(),$("span",ZKe,"("+x(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",JKe,[g("p",null,x(t.$t("List View: Member profiles will be shown as lists. Modern: Members profile will be shown as cards (Grid)")),1)])]),_:1},8,["label"])]),g("div",QKe,[_(f,{label:t.$t("Post Title Requirements")},{default:y(()=>[_(h,{modelValue:s.settings.post_title_pref,"onUpdate:modelValue":e[13]||(e[13]=S=>s.settings.post_title_pref=S),class:"fcom_radio_group"},{default:y(()=>[_(d,{value:"optional"},{default:y(()=>[N(x(t.$t("Optional")),1)]),_:1}),_(d,{value:"required"},{default:y(()=>[N(x(t.$t("Required")),1)]),_:1}),_(d,{value:"disabled"},{default:y(()=>[N(x(t.$t("Disabled")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",eZe,[g("p",null,x(t.$t("When creating a new post, check if the post title is required or not")),1)])]),_:1},8,["label"])]),s.settings.dark_mode==="yes"?(v(),$("div",tZe,[_(f,{label:t.$t("Default Theme Mode")},{default:y(()=>[_(h,{modelValue:s.settings.default_theme_mode,"onUpdate:modelValue":e[14]||(e[14]=S=>s.settings.default_theme_mode=S),class:"fcom_radio_group"},{default:y(()=>[_(d,{value:"light"},{default:y(()=>[N(x(t.$t("Light")),1)]),_:1}),_(d,{value:"dark"},{default:y(()=>[N(x(t.$t("Dark")),1)]),_:1}),_(d,{value:"system"},{default:y(()=>[N(x(t.$t("System")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",nZe,[g("p",null,x(t.$t("New members see the selected theme by default and can change it anytime.")),1)])]),_:1},8,["label"])])):O("",!0),g("div",sZe,[_(f,{label:t.$t("Default Feed Layout")},{default:y(()=>[_(h,{modelValue:s.settings.default_feed_layout,"onUpdate:modelValue":e[15]||(e[15]=S=>s.settings.default_feed_layout=S),class:"fcom_radio_group"},{default:y(()=>[_(d,{value:"timeline"},{default:y(()=>[N(x(t.$t("Timeline View")),1)]),_:1}),_(d,{value:"list"},{default:y(()=>[N(x(t.$t("List View")),1)]),_:1}),_(d,{value:"card"},{default:y(()=>[N(x(t.$t("Card View")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(l,{modelValue:s.settings.disable_feed_layout,"onUpdate:modelValue":e[16]||(e[16]=S=>s.settings.disable_feed_layout=S),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Disable Layout Style Change Option")),1)]),_:1},8,["modelValue"]),g("div",iZe,[s.settings.disable_feed_layout==="yes"?(v(),$("p",oZe,x(t.$t("The selected layout will be applied for all members. They cannot switch to a different view.")),1)):(v(),$("p",rZe,x(t.$t("User can change the layout style to their own preference.")),1))])]),g("div",aZe,[_(f,{label:t.$t("Max Media Per Post")},{default:y(()=>[_(c,{modelValue:s.settings.max_media_per_post,"onUpdate:modelValue":e[17]||(e[17]=S=>s.settings.max_media_per_post=S),placeholder:t.$t("Max Media Per Post"),type:"number",min:1,max:100},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),g("div",lZe,[_(f,{label:t.$t("Default Feed Sort By")},{default:y(()=>[_(m,{modelValue:s.settings.default_feed_sort_by,"onUpdate:modelValue":e[18]||(e[18]=S=>s.settings.default_feed_sort_by=S),clearable:"",class:"fcom_select",placeholder:t.$t("Latest Posts Sort")},{default:y(()=>[(v(!0),$(J,null,ye(s.postOrderOptions,(S,M)=>(v(),D(p,{key:M,value:M,label:S},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),_(l,{modelValue:s.settings.disable_feed_sort_by,"onUpdate:modelValue":e[19]||(e[19]=S=>s.settings.disable_feed_sort_by=S),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Disable Feed Sort By Options")),1)]),_:1},8,["modelValue"])]),g("div",cZe,[Re((v(),D(r,{onClick:o.saveCustomizations,disabled:s.savingCustomizations,class:"fcom_primary_button"},{default:y(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[A,s.savingCustomizations]])])]),_:1},8,["modelValue"])])])):(v(),$("div",uZe,[g("p",null,x(t.$t("Customizations could not be loaded")),1)])),e[24]||(e[24]=g("div",{style:{"margin-top":"30px"}},null,-1)),t.has_pro?(v(),$(J,{key:3},[s.loadingSnippets?(v(),$("div",dZe,[_(a,{rows:5,animated:!0})])):s.snippetsSettings?(v(),$("div",hZe,[g("div",fZe,[g("h2",null,x(t.$t("Custom Snippets")),1)]),g("div",pZe,[g("div",mZe,[g("h3",null,x(t.$t("Custom CSS")),1),g("p",null,x(t.$t("You can write your custom CSS here for the portal. Please do not include %s tag","<style> </style>")),1)]),g("div",gZe,[_(c,{placeholder:t.$t("Your CSS Code"),type:"textarea",modelValue:s.snippetsSettings.custom_css,"onUpdate:modelValue":e[22]||(e[22]=S=>s.snippetsSettings.custom_css=S),rows:5},null,8,["placeholder","modelValue"])]),_(w),g("div",vZe,[g("h3",null,x(t.$t("Custom JavaScript")),1),g("p",null,x(t.$t("You can write your custom JavaScript (with script tag), analytics code, and more here for the portal")),1)]),g("div",_Ze,[_(c,{placeholder:t.$t("Your Javascript or Analytics Code"),type:"textarea",modelValue:s.snippetsSettings.custom_js,"onUpdate:modelValue":e[23]||(e[23]=S=>s.snippetsSettings.custom_js=S),rows:5},null,8,["placeholder","modelValue"])]),g("div",yZe,[Re((v(),D(r,{onClick:o.saveSnippets,disabled:s.savingSnippets,class:"fcom_primary_button"},{default:y(()=>[N(x(t.$t("Save Custom CSS & JS")),1)]),_:1},8,["onClick","disabled"])),[[A,s.savingSnippets]])])])])):(v(),$("div",bZe,[g("p",null,x(t.$t("Custom Snippets could not be loaded")),1)]))],64)):(v(),$("div",wZe,[g("div",kZe,[g("h2",null,x(t.$t("Custom Snippets")),1)]),g("div",CZe,[g("p",xZe,x(t.$t("__CUSTOM_SNIPPETS_PROMO__")),1),g("a",{class:"el-button fcom_primary_button",href:t.$upgradeUrl("feature_lock_customization"),target:"_blank"},x(t.$t("Upgrade to Pro")),9,SZe)])]))])]),_:1},8,["title"])]),_:1})}const AZe=ce(SKe,[["render",$Ze]]),EZe={name:"EmailNotification",components:{ImageUploader:Ll,CrepeEditor:uu,Layout:yi,AppLayout:bi},data(){return{loading:!1,saving:!1,email_settings:null,verifiedEmailSenders:this.appVars.verified_email_senders}},methods:{getSettings(){this.loading=!0,this.$get("admin/email-settings").then(t=>{this.email_settings=t.email_settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},save(){this.saving=!0,this.$post("admin/email-settings",{email_settings:this.email_settings}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings(),this.changeTitle(this.$t("Email Notification Settings"))}},MZe={class:"settings_router fcom_mb_20"},TZe={key:0,class:"white_loaded"},PZe={key:1,class:"fhr_content_layout_body"},IZe={class:"setting_body"},LZe={style:{"font-size":"18px",margin:"0",padding:"0"}},OZe={style:{margin:"5px 0","font-size":"90%","line-height":"120%"}},DZe={class:"fcom_help_text"},RZe={class:"fcom_help_text"},VZe={class:"fcom_help_text"},FZe={class:"fcom_help_text"},NZe={class:"fcom_extra_editor"},BZe={class:"fcom_help_text"},zZe=["innerHTML"],HZe=["src","alt"],UZe={class:"fcom_image_uploader_wrapper"},jZe={class:"setting_body"},WZe={style:{"font-size":"18px",margin:"0",padding:"0"}},YZe={style:{margin:"5px 0","font-size":"90%","line-height":"120%"}},qZe={key:0,class:"fcom_help_text"},GZe={key:0,class:"fcom_help_text"},XZe={key:0,class:"fcom_help_text"},KZe={class:"fcom_help_text"},ZZe={key:0,class:"fcom_help_text"},JZe={class:"fcom_meta_text"},QZe={class:"setting_body"},eJe={key:2};function tJe(t,e,n,i,s,o){const r=ze,a=Vt,l=ht,c=tn,u=jd,d=Zt,h=Wt,f=Ud,p=B("crepe-editor"),m=B("EditPen"),b=we,w=B("Delete"),k=B("ImageUploader"),C=qt,A=D8,S=nn,M=B("layout"),P=B("app-layout"),T=xt("loading");return v(),D(P,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:y(()=>[_(M,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Email Settings")},{actions:y(()=>[Re((v(),D(r,{class:"fcom_primary_button",onClick:o.save},{default:y(()=>[g("span",null,x(t.$t("Save Settings")),1)]),_:1},8,["onClick"])),[[T,s.saving]])]),default:y(()=>[g("div",MZe,[s.loading?(v(),$("div",TZe,[_(a,{rows:5,animated:!0})])):s.email_settings?(v(),$("div",PZe,[_(S,{onSubmit:e[14]||(e[14]=Me(I=>t.doNothing(),["prevent"])),modelValue:s.email_settings,"onUpdate:modelValue":e[15]||(e[15]=I=>s.email_settings=I),"label-position":"top"},{default:y(()=>[g("div",IZe,[g("h3",LZe,x(t.$t("Mailing Settings")),1),g("p",OZe,x(t.$t("Set your from name, email, and email footer. These configurations will be used to send emails from FluentCommunity.")),1),e[16]||(e[16]=g("hr",null,null,-1)),_(f,{gutter:30},{default:y(()=>[_(u,{sm:24,md:12},{default:y(()=>[_(c,{label:t.$t("From Name")},{default:y(()=>[_(l,{placeholder:t.$t("Email from name"),modelValue:s.email_settings.send_from_name,"onUpdate:modelValue":e[0]||(e[0]=I=>s.email_settings.send_from_name=I)},null,8,["placeholder","modelValue"]),g("div",DZe,[g("p",null,x(t.$t("Name that will be used to send emails")),1)])]),_:1},8,["label"])]),_:1}),_(u,{sm:24,md:12},{default:y(()=>[_(c,{label:t.$t("From Email")},{default:y(()=>{var I;return[((I=s.verifiedEmailSenders)==null?void 0:I.length)>0?(v(),D(h,{key:0,class:"fcom_select",placeholder:t.$t("Select Email Address"),modelValue:s.email_settings.send_from_email,"onUpdate:modelValue":e[1]||(e[1]=L=>s.email_settings.send_from_email=L)},{default:y(()=>[(v(!0),$(J,null,ye(s.verifiedEmailSenders,L=>(v(),D(d,{key:L,label:L,value:L},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"])):(v(),D(l,{key:1,placeholder:t.$t("Valid Email address"),modelValue:s.email_settings.send_from_email,"onUpdate:modelValue":e[2]||(e[2]=L=>s.email_settings.send_from_email=L)},null,8,["placeholder","modelValue"])),g("div",RZe,[g("p",null,x(t.$t("Provide Valid Email Address email as per your domain/SMTP settings. This email will be used to send emails like notifications")),1)])]}),_:1},8,["label"])]),_:1})]),_:1}),_(f,{gutter:30},{default:y(()=>[_(u,{sm:24,md:12},{default:y(()=>[_(c,{label:t.$t("Reply to name (Optional)")},{default:y(()=>[_(l,{placeholder:t.$t("Optional Reply to email"),modelValue:s.email_settings.reply_to_name,"onUpdate:modelValue":e[3]||(e[3]=I=>s.email_settings.reply_to_name=I)},null,8,["placeholder","modelValue"]),g("div",VZe,[g("p",null,x(t.$t("Name that will be used for replyTo attribute")),1)])]),_:1},8,["label"])]),_:1}),_(u,{sm:24,md:12},{default:y(()=>[_(c,{label:t.$t("Reply to email (optional)")},{default:y(()=>[_(l,{placeholder:t.$t("Optional email"),modelValue:s.email_settings.reply_to_email,"onUpdate:modelValue":e[4]||(e[4]=I=>s.email_settings.reply_to_email=I)},null,8,["placeholder","modelValue"]),g("div",FZe,[g("p",null,x(t.$t("If someone replies to your notification email, this is where you would like to receive it.")),1)])]),_:1},8,["label"])]),_:1})]),_:1}),_(c,{label:t.$t("Email Footer")},{default:y(()=>[g("div",NZe,[_(p,{modelValue:s.email_settings.email_footer,"onUpdate:modelValue":e[5]||(e[5]=I=>s.email_settings.email_footer=I)},null,8,["modelValue"])]),g("div",BZe,[g("p",null,x(t.$t("This email footer will be used for all emails sent from FluentCommunity. It's highly recommended to use your business name and address in the footer for compliance.")),1),g("p",{innerHTML:t.$t("Use %1$s tag to insert dynamic notification settings URL. Other Smartcode: %2$s for Site Name with permalink","{{manage_email_notification_url|Manage Your Email Notifications Preference}}","{{site_name_with_url}}")},null,8,zZe)])]),_:1},8,["label"]),_(f,{gutter:30},{default:y(()=>[_(u,{sm:24,md:12},{default:y(()=>[_(c,{label:t.$t("Logo for Email Header")},{default:y(()=>[s.email_settings.logo||s.email_settings.global_logo?(v(),$("img",{key:0,src:s.email_settings.logo||s.email_settings.global_logo,alt:t.$t("Email header logo"),style:{"max-width":"100px",height:"auto"}},null,8,HZe)):O("",!0),g("div",UZe,[_(k,{additionalData:{resize:!1,max_width:500,skip_convert:"yes"},button_text:s.email_settings.logo?t.$t("Change"):t.$t("Upload Logo"),can_remove:!!s.email_settings.logo,isTextBtn:!1,onUploaded:e[6]||(e[6]=I=>{s.email_settings.logo=I})},hs({remove:y(()=>[_(b,null,{default:y(()=>[_(w)]),_:1})]),_:2},[s.email_settings.logo||s.email_settings.global_logo?{name:"trigger",fn:y(()=>[_(r,{"aria-label":t.$t("Change logo"),class:"fcom_plain_button"},{default:y(()=>[_(b,null,{default:y(()=>[_(m)]),_:1})]),_:1},8,["aria-label"])]),key:"0"}:void 0]),1032,["button_text","can_remove"])])]),_:1},8,["label"])]),_:1}),_(u,{sm:24,md:12},{default:y(()=>[t.has_pro?(v(),D(c,{key:0},{default:y(()=>[_(C,{modelValue:s.email_settings.disable_powered_by,"onUpdate:modelValue":e[7]||(e[7]=I=>s.email_settings.disable_powered_by=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Disable powered by FluentCommunity in the email footer")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0)]),_:1})]),_:1})]),e[18]||(e[18]=g("hr",null,null,-1)),g("div",jZe,[g("h3",WZe,x(t.$t("Email Notification Settings")),1),g("p",YZe,x(t.$t("This is the default settings that will be applied to all the community members. Individual members can override the settings for their own preference")),1),e[17]||(e[17]=g("hr",null,null,-1)),_(c,{label:t.$t("Email on new comment")},{default:y(()=>[_(C,{modelValue:s.email_settings.com_my_post_mail,"onUpdate:modelValue":e[8]||(e[8]=I=>s.email_settings.com_my_post_mail=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Send an email to the author when a new comment is added to a post.")),1)]),_:1},8,["modelValue"]),s.email_settings.com_my_post_mail!="yes"?(v(),$("div",qZe,[g("p",null,x(t.$t("You should enable this. Currently disabled.")),1)])):O("",!0)]),_:1},8,["label"]),_(c,{label:t.$t("Email on comment reply")},{default:y(()=>[_(C,{modelValue:s.email_settings.reply_my_com_mail,"onUpdate:modelValue":e[9]||(e[9]=I=>s.email_settings.reply_my_com_mail=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Email authors when someone replies to their comments.")),1)]),_:1},8,["modelValue"]),s.email_settings.reply_my_com_mail!="yes"?(v(),$("div",GZe,[g("p",null,x(t.$t("You should enable this. Currently disabled.")),1)])):O("",!0)]),_:1},8,["label"]),_(c,{label:t.$t("Email Announcement on Post")},{default:y(()=>[_(C,{modelValue:s.email_settings.mention_mail,"onUpdate:modelValue":e[10]||(e[10]=I=>s.email_settings.mention_mail=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Give option to admin/moderators to send email when posting on a space")),1)]),_:1},8,["modelValue"]),s.email_settings.mention_mail!="yes"?(v(),$("div",XZe,[g("p",null,x(t.$t("You should enable this. Currently disabled.")),1)])):O("",!0)]),_:1},8,["label"]),_(c,null,{default:y(()=>[_(C,{"true-value":"yes","false-value":"no",modelValue:s.email_settings.digest_email_status,"onUpdate:modelValue":e[11]||(e[11]=I=>s.email_settings.digest_email_status=I),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Enable Weekly Digest Email for community members")),1)]),_:1},8,["modelValue"]),g("div",KZe,[g("p",null,x(t.$t("Members can enable/disable their own digest status")),1)])]),_:1}),_(f,{gutter:30},{default:y(()=>[_(u,{sm:24,md:12},{default:y(()=>[_(c,{label:t.$t("In which day, the digest email will be sent")},{default:y(()=>[_(h,{modelValue:s.email_settings.digest_mail_day,"onUpdate:modelValue":e[12]||(e[12]=I=>s.email_settings.digest_mail_day=I),placeholder:t.$t("Select Digest Email Day")},{default:y(()=>[_(d,{value:"mon",label:t.$t("Every Monday")},null,8,["label"]),_(d,{value:"tue",label:t.$t("Every Tuesday")},null,8,["label"]),_(d,{value:"wed",label:t.$t("Every Wednesday")},null,8,["label"]),_(d,{value:"thu",label:t.$t("Every Thursday")},null,8,["label"]),_(d,{value:"fri",label:t.$t("Every Friday")},null,8,["label"]),_(d,{value:"sat",label:t.$t("Every Saturday")},null,8,["label"]),_(d,{value:"sun",label:t.$t("Every Sunday")},null,8,["label"])]),_:1},8,["modelValue","placeholder"]),s.email_settings.digest_email_status=="yes"?(v(),$("div",ZZe,[g("p",null,x(t.$t("Email will be sent if there are any unread notifications for the user from the last email sent.")),1)])):O("",!0)]),_:1},8,["label"])]),_:1}),_(u,{sm:24,md:12},{default:y(()=>[_(c,{label:t.$t("Time to send the digest email")},{default:y(()=>[_(A,{step:"00:10",start:"00:10",end:"23:59",modelValue:s.email_settings.daily_digest_time,"onUpdate:modelValue":e[13]||(e[13]=I=>s.email_settings.daily_digest_time=I)},null,8,["modelValue"]),g("p",JZe,x(t.$t("Approximate time when the digest emails will start sending for the members")),1)]),_:1},8,["label"])]),_:1})]),_:1})]),e[19]||(e[19]=g("hr",null,null,-1)),g("div",QZe,[Re((v(),D(r,{onClick:o.save,disabled:s.saving,class:"fcom_primary_button"},{default:y(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[T,s.saving]])])]),_:1},8,["modelValue"])])):(v(),$("div",eJe,[g("p",null,x(t.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const nJe=ce(EZe,[["render",tJe]]),sJe={name:"UpgradeToProModal",props:{showModal:{type:Boolean,default:!0},upgrade_module:{type:String,required:!0}},data(){return{openModal:this.showModal,upgradeModule:Vwe[this.upgrade_module]||{}}},computed:{upgradeUrl(){const t=(this.upgrade_module||"").replace(/_module$/,"");return this.$upgradeUrl(t?"feature_lock_"+t:"upgrade_page")}},watch:{openModal:function(){this.$emit("closeModal")}}},iJe={class:"fcom_upgrade_header"},oJe={class:"dialog_body"},rJe={class:"fcom_upgrade_banner"},aJe=["href"],lJe={class:"fcom_upgrade_content"},cJe={key:0,class:"fcom_feature_image"},uJe=["src","alt"],dJe={class:"fcom_upgrade_body"},hJe={class:"fcom_upgrade_description"},fJe=["href"];function pJe(t,e,n,i,s,o){const r=Fa;return v(),D(r,{"modal-class":"fcom_upgrade_dialog","close-on-click-modal":!1,"append-to-body":!0,size:"50%",modelValue:s.openModal,"onUpdate:modelValue":e[0]||(e[0]=a=>s.openModal=a),direction:"rtl"},{header:y(()=>[g("div",iJe,[g("h4",null,x(s.upgradeModule.headerTitle),1),g("p",null,x(s.upgradeModule.headerDescription),1)])]),default:y(()=>[g("div",oJe,[g("div",rJe,[g("p",null," 🎉 "+x(t.$t("Discover exciting new features now!")),1),g("a",{href:o.upgradeUrl,target:"_blank"},x(t.$t("Upgrade Now")),9,aJe)]),g("div",lJe,[s.upgradeModule.featureImage?(v(),$("div",cJe,[g("img",{src:t.appVars.assets_url+"images/upgrades/"+s.upgradeModule.featureImage,alt:s.upgradeModule.headerTitle},null,8,uJe)])):O("",!0),g("div",dJe,[g("h4",null,x(s.upgradeModule.bodyTitle),1),g("p",hJe,x(s.upgradeModule.bodyDescription),1),g("a",{class:"el-button fcom_primary_button",href:o.upgradeUrl,target:"_blank"},x(t.$t("Upgrade to Pro")),9,fJe)])])])]),_:1},8,["modelValue"])}const Qd=ce(sJe,[["render",pJe]]),mJe={name:"StorageSettings",props:["features"],components:{UpgradeToProModal:Qd},data(){return{openUpgradeModal:!1,storageConfig:!1,showSettings:!1,fetching:!1,saving:!1,s3Locations:{},bunnyLocations:{}}},methods:{docsNotice(t,e){const n='<a target="_blank" rel="noopener" href="'+t+'">';return this.$t("Please %1$sRead the documentation first%2$s to configure %3$s.",n,"</a>",e)},fetchSettings(){this.fetching=!0,this.$get("admin/storage-settings").then(t=>{this.storageConfig=t.config,this.s3Locations=t.s3_locations,this.bunnyLocations=t.bunny_locations}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1})},openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.showSettings=!0},saveSettings(){this.saving=!0,this.$post("admin/storage-settings",{config:this.storageConfig}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})},maybeResetConfig(){let t=this.storageConfig.driver;this.storageConfig={driver:t}}},mounted(){this.has_pro&&this.fetchSettings()}},gJe={class:"fcom_storage_settings"},vJe={class:"dialog_header"},_Je={class:"dialog_left"},yJe={key:0,class:"white_loaded"},bJe={key:1,class:"dialog_body"},wJe={key:0},kJe=["innerHTML"],CJe={class:"fcom_cloudflare_settings"},xJe=["innerHTML"],SJe={class:"fcom_s3_settings"},$Je=["innerHTML"],AJe={class:"fcom_cloudflare_settings"},EJe={key:3,class:"fcom_mb_10"},MJe={class:"dialog_footer"},TJe={key:2};function PJe(t,e,n,i,s,o){const r=ze,a=Vt,l=Qc,c=ws,u=tn,d=ht,h=Zt,f=Wt,p=nn,m=$s,b=B("UpgradeToProModal"),w=xt("loading");return v(),$(J,null,[g("div",gJe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=k=>o.openSettings())},{default:y(()=>{var k;return[N(x(t.$t("Configure"))+" ("+x((k=s.storageConfig)==null?void 0:k.driver)+") ",1)]}),_:1})]),_(m,{"align-center":"","modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:s.showSettings,"onUpdate:modelValue":e[18]||(e[18]=k=>s.showSettings=k),direction:"rtl"},{header:y(({close:k})=>[g("div",vJe,[g("div",_Je,[g("div",null,[g("h4",null,x(t.$t("Configure Media Storage")),1)])])])]),default:y(()=>[s.fetching?(v(),$("div",yJe,[_(a,{rows:5,animated:!0})])):s.storageConfig?(v(),$("div",bJe,[s.storageConfig.is_defined?(v(),$("p",wJe,x(t.$t("__CLOUD_STORAGE_CONFIGURED")),1)):(v(),$(J,{key:1},[_(p,{onSubmit:e[17]||(e[17]=Me(k=>t.doNothing(),["prevent"])),"label-position":"top"},{default:y(()=>[_(u,{label:t.$t("Storage Location")},{default:y(()=>[_(c,{class:"fcom_radio_group",onChange:e[1]||(e[1]=k=>o.maybeResetConfig()),modelValue:s.storageConfig.driver,"onUpdate:modelValue":e[2]||(e[2]=k=>s.storageConfig.driver=k)},{default:y(()=>[_(l,{type:"primary",value:"local"},{default:y(()=>[N(x(t.$t("Server Storage")),1)]),_:1}),_(l,{value:"cloudflare_r2"},{default:y(()=>[N(x(t.$t("Cloudflare R2 (Recommended)")),1)]),_:1}),_(l,{value:"amazon_s3"},{default:y(()=>[N(x(t.$t("Amazon S3")),1)]),_:1}),_(l,{value:"bunny_cdn"},{default:y(()=>[N(x(t.$t("BunnyCDN")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),s.storageConfig.driver==="cloudflare_r2"?(v(),$(J,{key:0},[g("p",{innerHTML:o.docsNotice("https://fluentcommunity.co/docs/configuring-cloudflare-r2/","Cloudflare R2")},null,8,kJe),e[20]||(e[20]=g("hr",null,null,-1)),g("div",CJe,[_(u,{label:t.$t("Cloudflare Access Key")},{default:y(()=>[_(d,{type:"password",modelValue:s.storageConfig.access_key,"onUpdate:modelValue":e[3]||(e[3]=k=>s.storageConfig.access_key=k)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Cloudflare Secret Key")},{default:y(()=>[_(d,{type:"password",modelValue:s.storageConfig.secret_key,"onUpdate:modelValue":e[4]||(e[4]=k=>s.storageConfig.secret_key=k)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Cloudflare Bucket Public URL")},{default:y(()=>[_(d,{modelValue:s.storageConfig.public_url,"onUpdate:modelValue":e[5]||(e[5]=k=>s.storageConfig.public_url=k)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Cloudflare Endpoint URL")},{default:y(()=>[_(d,{modelValue:s.storageConfig.endpoint_url,"onUpdate:modelValue":e[6]||(e[6]=k=>s.storageConfig.endpoint_url=k),placeholder:t.$t("eg: https://your-account-id.r2.cloudflarestorage.com/your-bucket-name")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(u,{label:t.$t("Bucket Sub-Folder (Optional)")},{default:y(()=>[_(d,{modelValue:s.storageConfig.sub_folder,"onUpdate:modelValue":e[7]||(e[7]=k=>s.storageConfig.sub_folder=k),placeholder:t.$t("If you want to store files in a folder within the bucket.")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])])],64)):s.storageConfig.driver==="amazon_s3"?(v(),$(J,{key:1},[g("p",{innerHTML:o.docsNotice("https://fluentcommunity.co/docs/configuring-amazon-s3/","Amazon S3")},null,8,xJe),e[21]||(e[21]=g("hr",null,null,-1)),g("div",SJe,[_(u,{label:t.$t("Amazon S3 Access Key")},{default:y(()=>[_(d,{type:"password",modelValue:s.storageConfig.access_key,"onUpdate:modelValue":e[8]||(e[8]=k=>s.storageConfig.access_key=k)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Amazon S3 Secret Key")},{default:y(()=>[_(d,{type:"password",modelValue:s.storageConfig.secret_key,"onUpdate:modelValue":e[9]||(e[9]=k=>s.storageConfig.secret_key=k)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Amazon S3 Bucket Name")},{default:y(()=>[_(d,{modelValue:s.storageConfig.bucket,"onUpdate:modelValue":e[10]||(e[10]=k=>s.storageConfig.bucket=k)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Amazon S3 Location")},{default:y(()=>[_(f,{modelValue:s.storageConfig.s3_endpoint,"onUpdate:modelValue":e[11]||(e[11]=k=>s.storageConfig.s3_endpoint=k),placeholder:t.$t("Select S3 Location")},{default:y(()=>[(v(!0),$(J,null,ye(s.s3Locations,(k,C)=>(v(),D(h,{label:k,value:C},null,8,["label","value"]))),256))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),_(u,{label:t.$t("Bucket Sub-Folder (Optional)")},{default:y(()=>[_(d,{placeholder:t.$t("If you want to store files in a folder within the bucket."),modelValue:s.storageConfig.sub_folder,"onUpdate:modelValue":e[12]||(e[12]=k=>s.storageConfig.sub_folder=k)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])])],64)):O("",!0),s.storageConfig.driver==="bunny_cdn"?(v(),$(J,{key:2},[g("p",{innerHTML:o.docsNotice("https://fluentcommunity.co/docs/configuring-bunnycdn","BunnyCDN")},null,8,$Je),e[22]||(e[22]=g("hr",null,null,-1)),g("div",AJe,[_(u,{label:t.$t("BunnyCDN API Key")},{default:y(()=>[_(d,{type:"password",modelValue:s.storageConfig.access_key,"onUpdate:modelValue":e[13]||(e[13]=k=>s.storageConfig.access_key=k)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("BunnyCDN Storage Zone Name")},{default:y(()=>[_(d,{modelValue:s.storageConfig.bucket,"onUpdate:modelValue":e[14]||(e[14]=k=>s.storageConfig.bucket=k)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Primary Storage Region")},{default:y(()=>[_(f,{modelValue:s.storageConfig.s3_endpoint,"onUpdate:modelValue":e[15]||(e[15]=k=>s.storageConfig.s3_endpoint=k),placeholder:t.$t("Select Storage Region")},{default:y(()=>[(v(!0),$(J,null,ye(s.bunnyLocations,(k,C)=>(v(),D(h,{label:k,value:C},null,8,["label","value"]))),256))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),_(u,{label:t.$t("BunnyCDN Public URL")},{default:y(()=>[_(d,{placeholder:t.$t("Provide your CDN URL (without trailing /)"),modelValue:s.storageConfig.public_url,"onUpdate:modelValue":e[16]||(e[16]=k=>s.storageConfig.public_url=k)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])])],64)):(v(),$("p",EJe,x(t.$t("Your files will be stored in the default Uploads folder")),1))]),_:1}),g("div",MJe,[Re((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:y(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[w,s.saving]])])],64))])):(v(),$("div",TJe,[g("p",null,x(t.$t("Config could not be loaded")),1)]))]),_:1},8,["width","modelValue"]),s.openUpgradeModal?(v(),D(b,{key:0,showModal:s.openUpgradeModal,onCloseModal:e[19]||(e[19]=k=>s.openUpgradeModal=!1),upgrade_module:"media_module"},null,8,["showModal"])):O("",!0)],64)}const IJe=ce(mJe,[["render",PJe]]),LJe={name:"LeaderBoardConfig",props:["features"],emits:["saveSettings"],data(){return{levels:null,excludedUserIds:[],showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1,users:[],usersLoaded:!1}},components:{UpgradeToProModal:Qd},methods:{openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.fetching=!0,this.$get("admin/leaderboards/levels").then(t=>{this.levels=t.levels,this.excludedUserIds=t.excludedUserIds,this.users=t.excludedUsers}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1,this.usersLoaded=!0})},fetchUsers(t=""){this.loading=!0,this.$get("admin/users",{context:"users",search:t}).then(e=>{this.users=e.users.data}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},saveSettings(){let t=this.features.leader_board_module=="yes";this.$emit("saveSettings",!t),t&&this.saveLevelSettings()},saveLevelSettings(){this.saving=!0,this.$post("admin/leaderboards/levels",{levels:this.levels,excludedUserIds:this.excludedUserIds}).then(t=>{this.$notify.success(t.message),this.$emit("saveSettings",!0)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}}},OJe={class:"fcom_storage_settings"},DJe={key:0,class:"white_loaded"},RJe={key:1,class:"dialog_body"},VJe={class:"fcom_mb_20"},FJe={class:"fcom_level_table"},NJe={class:"fcom_level_table_row fcom_header_row"},BJe={class:"fcom_lavel_desc"},zJe={class:"fcom_lavel_actions"},HJe={class:"fcom_lavel_num"},UJe={class:"fcom_lavel_desc"},jJe={class:"fcom_lavel_actions"},WJe={class:"fcom_user_selector fcom_mb_20"},YJe={class:"fcom_mb_20"},qJe={style:{float:"left"}},GJe={style:{float:"right",color:"#8492a6","font-size":"13px"}},XJe={class:"dialog_footer"},KJe={key:2};function ZJe(t,e,n,i,s,o){const r=ze,a=Vt,l=qt,c=tn,u=ht,d=Zt,h=Wt,f=nn,p=Fa,m=B("UpgradeToProModal"),b=xt("loading");return v(),$(J,null,[g("div",OJe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=w=>o.openSettings())},{default:y(()=>[N(x(t.$t("Settings")),1)]),_:1})]),_(p,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,size:t.dialogWidth,modelValue:s.showSettings,"onUpdate:modelValue":e[4]||(e[4]=w=>s.showSettings=w),direction:"rtl"},{header:y(({close:w})=>[g("h4",null,x(t.$t("Leaderboard / Gamification Settings")),1)]),default:y(()=>[s.fetching?(v(),$("div",DJe,[_(a,{rows:5,animated:!0})])):s.levels?(v(),$("div",RJe,[_(f,{onSubmit:e[3]||(e[3]=Me(w=>t.doNothing(),["prevent"])),"label-position":"top"},{default:y(()=>[_(c,null,{default:y(()=>[_(l,{modelValue:n.features.leader_board_module,"onUpdate:modelValue":e[1]||(e[1]=w=>n.features.leader_board_module=w),"true-value":"yes","false-value":"no",label:t.$t("Enable Leaderboards Module"),class:"fcom_checkbox"},null,8,["modelValue","label"])]),_:1}),n.features.leader_board_module==="yes"?(v(),$(J,{key:0},[g("h5",VJe,x(t.$t("Leaderboard Levels")),1),g("div",FJe,[g("div",NJe,[e[6]||(e[6]=g("div",{class:"fcom_lavel_num"}," # ",-1)),g("div",BJe,x(t.$t("Title & Description")),1),g("div",zJe,x(t.$t("Minimum Points")),1)]),(v(!0),$(J,null,ye(s.levels,(w,k,C)=>(v(),$("div",{class:"fcom_level_table_row",key:k},[g("div",HJe,x(C+1),1),g("div",UJe,[_(u,{class:"fcom_bold_input",type:"text",modelValue:w.title,"onUpdate:modelValue":A=>w.title=A,placeholder:t.$t("Level Title")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),_(u,{type:"text",modelValue:w.tagline,"onUpdate:modelValue":A=>w.tagline=A,placeholder:t.$t("Level Tagline")},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),g("div",jJe,[_(c,{label:""},{default:y(()=>[_(u,{min:0,max:999999999,disabled:k==="level_1",type:"number",modelValue:w.min_points,"onUpdate:modelValue":A=>w.min_points=A,placeholder:t.$t("Minimum Points")},null,8,["disabled","modelValue","onUpdate:modelValue","placeholder"])]),_:2},1024)])]))),128))]),g("div",WJe,[g("h5",YJe,x(t.$t("Exclude Users")),1),_(c,{label:t.$t("Exclude selected users from the leaderboard")},{default:y(()=>[s.usersLoaded?(v(),D(h,{key:0,multiple:!0,class:"rich_select",filterable:"",remote:"","remote-method":o.fetchUsers,placeholder:t.$t("Select Users"),modelValue:s.excludedUserIds,"onUpdate:modelValue":e[2]||(e[2]=w=>s.excludedUserIds=w)},{default:y(()=>[(v(!0),$(J,null,ye(s.users,w=>(v(),D(d,{key:w.ID,label:w.display_name+" ("+w.user_email+")",value:w.ID},{default:y(()=>[g("span",qJe,x(w.display_name),1),g("span",GJe,x(w.user_email),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["remote-method","placeholder","modelValue"])):O("",!0)]),_:1},8,["label"])])],64)):O("",!0)]),_:1}),g("div",XJe,[Re((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:y(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[b,s.saving]])])])):(v(),$("div",KJe,[g("p",null,x(t.$t("Config could not be loaded")),1)]))]),_:1},8,["size","modelValue"]),s.openUpgradeModal?(v(),D(m,{key:0,showModal:s.openUpgradeModal,onCloseModal:e[5]||(e[5]=w=>s.openUpgradeModal=!1),upgrade_module:"leader_board_module"},null,8,["showModal"])):O("",!0)],64)}const JJe=ce(LJe,[["render",ZJe]]),QJe={name:"UserBadgesConfig",components:{LogoEmojiSelector:sv,UpgradeToProModal:Qd,Drawer:nu,FluentDnD:Tr},props:["features"],emits:["saveSettings"],data(){return{badges:null,showSettings:!1,fetching:!1,saving:!1,editingBadge:null,showEditBagdeModal:!1,openUpgradeModal:!1,isDirty:!1}},watch:{badges:{handler(){this.isDirty=!0},deep:!0},"features.user_badge"(){this.isDirty=!0}},methods:{openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.isDirty=!1,this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.fetching=!0,this.$get("admin/user-badges").then(t=>{this.badges=t.badges,this._savedOrder=this.badgeOrderKey(),this.$nextTick(()=>{this.isDirty=!1})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1})},saveSettings(){let t=this.features.user_badge=="yes";this.$emit("saveSettings",!t),t?this.saveBadgeSettings():this.isDirty=!1},saveBadgeSettings(){this.saving=!0,this.$post("admin/user-badges",{badges:this.badges}).then(t=>{this.$notify.success(t.message),this.$emit("saveSettings",!1);let e=t.badges;this.badges=Object.values(e),this._savedOrder=this.badgeOrderKey(),this.features.user_badge=="yes"?this.appVars.user_badges=e:this.appVars.user_badges=null,this.$nextTick(()=>{this.isDirty=!1})}).catch(t=>{this.$handleError(t),this.fetchSettings()}).finally(()=>{this.saving=!1})},initAddNew(){this.editingBadge={title:"",config:{emoji:"",shape_svg:"",logo:""},show_label:"yes",color:"",background_color:""},this.showEditBagdeModal=!0},initEdit(t){this.editingBadge=t,this.showEditBagdeModal=!0},closeEdit(){this.badges.find(t=>{var e;return t.slug===((e=this.editingBadge)==null?void 0:e.slug)})||this.badges.push(this.editingBadge),this.showEditBagdeModal=!1,this.editingBadge=null,this.saveBadgeSettings()},deleteBadge(t){this.badges=this.badges.filter(e=>e.slug!==t.slug),this.saveBadgeSettings()},onBadgeDrop(){clearTimeout(this._reorderTimer),this._reorderTimer=setTimeout(()=>{this.badgeOrderKey()!==this._savedOrder&&this.saveBadgeSettings()},400)},badgeOrderKey(){return this.badges.map(t=>t.slug).join(",")}},beforeUnmount(){clearTimeout(this._reorderTimer)}},eQe={class:"fcom_storage_settings"},tQe={key:0,class:"white_loaded"},nQe={key:1},sQe={class:"header_user_badge"},iQe={class:"fcom_user_badges fcom_manager_table fcom_badge_dnd"},oQe={key:0,class:"fcom_badge_row fcom_badge_row_head"},rQe={class:"col_title"},aQe={class:"col_preview"},lQe={class:"col_actions"},cQe={class:"fcom_badge_row"},uQe=["title"],dQe={class:"col_title"},hQe={class:"col_preview"},fQe={class:"fcom_badge_preview"},pQe={class:"col_actions"},mQe={class:"fcom_table_action_col"},gQe=["onClick"],vQe=["onClick"],_Qe={key:2,class:"fcom_badge_empty"},yQe={key:2};function bQe(t,e,n,i,s,o){const r=ze,a=Vt,l=qt,c=tn,u=B("UserBadge"),d=B("Edit"),h=we,f=B("Delete"),p=B("FluentDnD"),m=nn,b=B("Drawer"),w=B("logo-emoji-selector"),k=ht,C=eu,A=jd,S=Ud,M=$s,P=B("UpgradeToProModal"),T=xt("loading");return v(),$(J,null,[g("div",eQe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=I=>o.openSettings())},{default:y(()=>[N(x(t.$t("Settings")),1)]),_:1})]),_(b,{modelValue:s.showSettings,"onUpdate:modelValue":e[4]||(e[4]=I=>s.showSettings=I),size:t.drawerWidth,title:t.$t("User Badge Settings"),"append-to-body":!0,"close-on-click-modal":!0,"has-close-confirmation":s.isDirty,"close-confirmation-message":t.$t("You have unsaved changes. Are you sure you want to close this?"),"modal-class":"fcom_common_dialog",id:"fluent_comminity_body"},{default:y(()=>[s.fetching?(v(),$("div",tQe,[_(a,{rows:5,animated:!0})])):s.badges?(v(),$("div",nQe,[_(m,{onSubmit:e[3]||(e[3]=Me(I=>t.doNothing(),["prevent"])),"label-position":"top"},{default:y(()=>[_(c,null,{default:y(()=>[_(l,{"true-value":"yes","false-value":"no",modelValue:n.features.user_badge,"onUpdate:modelValue":e[1]||(e[1]=I=>n.features.user_badge=I),label:t.$t("Enable User Badge Module"),size:"large",class:"fcom_checkbox"},null,8,["modelValue","label"])]),_:1}),n.features.user_badge==="yes"?(v(),$(J,{key:0},[g("div",sQe,[g("h3",null,x(t.$t("User Badges")),1),_(r,{class:"fcom_secondary_button",onClick:e[2]||(e[2]=I=>o.initAddNew()),size:"small"},{default:y(()=>[N(x(t.$t("Add New")),1)]),_:1})]),g("div",iQe,[s.badges.length?(v(),$("div",oQe,[e[16]||(e[16]=g("span",{class:"col_handle"},null,-1)),g("span",rQe,x(t.$t("Title")),1),g("span",aQe,x(t.$t("Preview")),1),g("span",lQe,x(t.$t("Actions")),1)])):O("",!0),s.badges.length?(v(),D(p,{key:1,items:s.badges,"row-key":"slug",onDrop:o.onBadgeDrop},{item:y(({data:I})=>[g("div",cQe,[g("span",{class:"col_handle fcom_drag_handle",title:t.$t("Drag to reorder")},"⋮⋮",8,uQe),g("span",dQe,x(I.title),1),g("span",hQe,[g("div",fQe,[_(u,{is_preview:!0,badge:I},null,8,["badge"])])]),g("span",pQe,[g("div",mQe,[g("div",{onClick:L=>o.initEdit(I),class:"action_item clickable"},[_(h,null,{default:y(()=>[_(d)]),_:1})],8,gQe),g("div",{class:"action_item clickable",onClick:L=>o.deleteBadge(I)},[_(h,null,{default:y(()=>[_(f)]),_:1})],8,vQe)])])])]),_:1},8,["items","onDrop"])):(v(),$("p",_Qe,x(t.$t("No badges have been configured.")),1))])],64)):O("",!0),_(c,null,{default:y(()=>[Re((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:y(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[T,s.saving]])]),_:1})]),_:1})])):(v(),$("div",yQe,[g("p",null,x(t.$t("Config could not be loaded")),1)]))]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"]),_(M,{"append-to-body":!0,modelValue:s.showEditBagdeModal,"onUpdate:modelValue":e[14]||(e[14]=I=>s.showEditBagdeModal=I),title:t.$t("Edit Badge"),width:"30%"},{default:y(()=>[s.editingBadge?(v(),D(m,{key:0,onSubmit:e[13]||(e[13]=Me(I=>t.doNothing(),["prevent"])),"label-position":"top"},{default:y(()=>[_(c,{label:t.$t("Title")},{default:y(()=>[_(k,{modelValue:s.editingBadge.title,"onUpdate:modelValue":e[6]||(e[6]=I=>s.editingBadge.title=I),placeholder:t.$t("Badge Title")},{prepend:y(()=>{var I,L;return[_(w,{fallback_mark:"",custom_svg:!0,onUpdate:e[5]||(e[5]=R=>{s.editingBadge.config.emoji=R.emoji,s.editingBadge.config.logo=R.logo,s.editingBadge.config.shape_svg=R.shape_svg}),config:{logo:s.editingBadge.config.logo,emoji:((I=s.editingBadge.config)==null?void 0:I.emoji)||"",shape_svg:(L=s.editingBadge.config)==null?void 0:L.shape_svg}},null,8,["config"])]}),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),_(c,null,{default:y(()=>[_(l,{modelValue:s.editingBadge.show_label,"onUpdate:modelValue":e[7]||(e[7]=I=>s.editingBadge.show_label=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Show Label on Badge")),1)]),_:1},8,["modelValue"])]),_:1}),s.editingBadge.show_label=="yes"?(v(),$(J,{key:0},[_(S,{gutter:20},{default:y(()=>[_(A,{span:12},{default:y(()=>[_(c,{label:t.$t("Color")},{default:y(()=>[_(C,{predefine:t.appVars.suggestedColors,onActiveChange:e[8]||(e[8]=I=>{s.editingBadge.color=I}),modelValue:s.editingBadge.color,"onUpdate:modelValue":e[9]||(e[9]=I=>s.editingBadge.color=I)},null,8,["predefine","modelValue"])]),_:1},8,["label"])]),_:1}),_(A,{span:12},{default:y(()=>[_(c,{label:t.$t("Background Color")},{default:y(()=>[_(C,{predefine:t.appVars.suggestedColors,onActiveChange:e[10]||(e[10]=I=>{s.editingBadge.background_color=I}),modelValue:s.editingBadge.background_color,"onUpdate:modelValue":e[11]||(e[11]=I=>s.editingBadge.background_color=I)},null,8,["predefine","modelValue"])]),_:1},8,["label"])]),_:1})]),_:1}),g("p",null,x(t.$t("For best UI, keep the colors empty")),1)],64)):O("",!0),_(c,null,{default:y(()=>[_(r,{class:"fcom_primary_button",onClick:e[12]||(e[12]=I=>o.closeEdit())},{default:y(()=>[N(x(t.$t("Save")),1)]),_:1})]),_:1})]),_:1})):O("",!0)]),_:1},8,["modelValue","title"]),s.openUpgradeModal?(v(),D(P,{key:0,showModal:s.openUpgradeModal,onCloseModal:e[15]||(e[15]=I=>s.openUpgradeModal=!1),upgrade_module:"user_badge_module"},null,8,["showModal"])):O("",!0)],64)}const wQe=ce(QJe,[["render",bQe],["__scopeId","data-v-cde5da01"]]),kQe={name:"SocialMediaLinkConfig",components:{Drawer:nu},data(){return{providers:null,loading:!1,saving:!1,showSettings:!1,isDirty:!1}},watch:{showSettings(t){t||(this.isDirty=!1)}},methods:{openSettings(){this.loading=!0,this.showSettings=!0,this.isDirty=!1,this.providers=null,this.$get("admin/profile-link-providers").then(t=>{this.providers=t.providers}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveSettings(){if(!this.has_pro){this.$notify.error(this.$t("Please upgrade to Pro to use this feature"));return}this.saving=!0;const t=[];this.each(this.providers,(e,n)=>{e.enabled==="yes"&&t.push(n)}),this.$post("admin/profile-link-providers",{configs:t}).then(e=>{this.$notify.success(e.message),this.isDirty=!1}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}}},CQe={class:"fcom_storage_settings"},xQe={key:0,class:"white_loaded"},SQe={key:1,class:"dialog_body"},$Qe={class:"fcom_level_table"},AQe={class:"fcom_level_table_row fcom_header_row"},EQe={class:"fcom_lavel_desc"},MQe={class:"fcom_lavel_actions"},TQe={style:{display:"flex","align-items":"center","column-gap":"10px"},class:"fcom_lavel_desc"},PQe=["innerHTML"],IQe={class:"fcom_lavel_actions"},LQe={class:"dialog_footer"},OQe={key:1,class:"fcom_upgrade_banner"},DQe={class:"fcom_upgrade_description"},RQe=["href"],VQe={key:2};function FQe(t,e,n,i,s,o){const r=ze,a=Vt,l=we,c=qs,u=tu,d=B("Drawer"),h=xt("loading");return v(),$(J,null,[g("div",CQe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=f=>o.openSettings())},{default:y(()=>[N(x(t.$t("Settings")),1)]),_:1})]),_(d,{modelValue:s.showSettings,"onUpdate:modelValue":e[2]||(e[2]=f=>s.showSettings=f),size:t.drawerWidth,title:t.$t("Social Media Links Settings"),"append-to-body":!0,"close-on-click-modal":!0,"has-close-confirmation":s.isDirty,"close-confirmation-message":t.$t("You have unsaved changes. Are you sure you want to close this?"),"modal-class":"fcom_common_dialog fcom_upgrade_dialog",id:"fluent_comminity_body"},{default:y(()=>[s.loading?(v(),$("div",xQe,[_(a,{rows:5,animated:!0})])):s.providers?(v(),$("div",SQe,[g("div",$Qe,[g("div",AQe,[g("div",EQe,x(t.$t("Provider")),1),g("div",MQe,x(t.$t("Status")),1)]),(v(!0),$(J,null,ye(s.providers,(f,p)=>(v(),$("div",{style:{padding:"5px 10px"},class:"fcom_level_table_row",key:p},[g("div",TQe,[_(l,null,{default:y(()=>[g("span",{innerHTML:f.icon_svg},null,8,PQe)]),_:2},1024),g("span",null,x(f.title),1),f.enabled==="yes"?(v(),D(c,{key:0,type:"success",size:"small",effect:"light"},{default:y(()=>[N(x(t.$t("Enabled")),1)]),_:1})):(v(),D(c,{key:1,type:"info",size:"small"},{default:y(()=>[N(x(t.$t("disabled")),1)]),_:1}))]),g("div",IQe,[_(u,{modelValue:f.enabled,"onUpdate:modelValue":m=>f.enabled=m,"active-value":"yes","inactive-value":"no",onChange:e[1]||(e[1]=m=>s.isDirty=!0)},null,8,["modelValue","onUpdate:modelValue"])])]))),128))]),g("div",LQe,[t.has_pro?Re((v(),D(r,{key:0,class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:y(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[h,s.saving]]):(v(),$("div",OQe,[g("p",DQe,x(t.$t("Please upgrade to Pro to use this feature")),1),g("a",{class:"el-button",href:t.$upgradeUrl("feature_lock_social_links"),target:"_blank"},x(t.$t("Upgrade to Pro")),9,RQe)]))])])):(v(),$("div",VQe,[g("p",null,x(t.$t("Config could not be loaded")),1)]))]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"])],64)}const NQe=ce(kQe,[["render",FQe]]),BQe={name:"MessagingSettings",data(){return{loading:!1,settings:null,saving:!1,socketConfig:this.initSocketConfig()}},computed:{isRealTimeEnabled(){var t;return((t=this.settings)==null?void 0:t.realtime_enabled)==="yes"},isWpConfigDefined(){var t;return((t=this.socketConfig)==null?void 0:t.is_defined)??!1},isFluentMessagingProvider(){var t;return((t=this.settings)==null?void 0:t.socket_provider)==="fluent-socket"},showClusterField(){var t;return["pusher","custom"].includes((t=this.settings)==null?void 0:t.socket_provider)},isCustomProvider(){var t;return((t=this.settings)==null?void 0:t.socket_provider)==="custom"}},methods:{initSocketConfig(){return{key:"",secret:"",appId:"",cluster:"",options:{host:"",port:443,scheme:"https"}}},maybeResetConfig(){this.socketConfig.is_defined||(this.socketConfig=this.initSocketConfig())},getSettings(){this.loading=!0,this.$get("admin/messaging-setting").then(t=>{this.settings=t.settings,this.socketConfig=t.socket_config??this.initSocketConfig()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveSettings(){if(this.isRealTimeEnabled&&!this.isWpConfigDefined){if(["key","secret","appId"].filter(i=>!this.socketConfig[i]).length>0){this.$handleError(this.$t("Please fill in all required socket configuration fields (App Key, App Secret, App ID)"));return}if(this.isCustomProvider&&!this.socketConfig.options.host){this.$handleError(this.$t("Host is required for custom socket provider"));return}}this.saving=!0;const t={settings:this.settings};this.isRealTimeEnabled&&!this.isWpConfigDefined&&(t.socket_config=this.socketConfig),this.$post("admin/messaging-setting",t).then(e=>{this.$notify.success(e.message),this.settings=e.settings}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings()}},zQe={key:1},HQe={class:"fcom_help_text"},UQe={key:0},jQe={key:1},WQe={class:"fcom_help_text"},YQe={class:"fcom_help_text"},qQe={class:"fcom_section_divider"},GQe={class:"fcom_help_text"},XQe={key:0},KQe={key:1},ZQe={class:"fcom_help_text"},JQe={key:0},QQe={key:1},eet={key:2},tet={class:"fcom_help_text"},net={key:2},set={class:"dialog_footer"},iet={key:1,class:"fcom_upgrade_banner"},oet={class:"fcom_upgrade_description"},ret=["href"];function aet(t,e,n,i,s,o){const r=Vt,a=qt,l=tn,c=Li,u=ws,d=l2,h=oa,f=ht,p=Zt,m=Wt,b=nn,w=ze,k=xt("loading");return v(),$(J,null,[s.loading?(v(),D(r,{key:0,animated:!0,rows:5})):s.settings?(v(),$("div",zQe,[_(b,{modelValue:s.settings,"onUpdate:modelValue":e[14]||(e[14]=C=>s.settings=C),"label-position":"top"},{default:y(()=>[_(l,null,{default:y(()=>[_(a,{"true-value":"yes","false-value":"no",modelValue:s.settings.messaging_email_status,"onUpdate:modelValue":e[0]||(e[0]=C=>s.settings.messaging_email_status=C),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Send email notification on one-to-one messages (unread) to individual members")),1)]),_:1},8,["modelValue"]),g("div",HQe,[s.settings.messaging_email_status=="no"?(v(),$("p",UQe,x(t.$t("Email notification on messaging is disabled")),1)):(v(),$("p",jQe,x(t.$t("Emails will be sent based on your Email Frequency settings")),1))])]),_:1}),s.settings.messaging_email_status=="yes"?(v(),D(l,{key:0,label:t.$t("Default Email sending frequency for one-to-one messages")},{default:y(()=>[_(u,{modelValue:s.settings.messaging_email_frequency,"onUpdate:modelValue":e[1]||(e[1]=C=>s.settings.messaging_email_frequency=C)},{default:y(()=>[_(c,{value:"hourly",label:t.$t("Hourly")},null,8,["label"]),_(c,{value:"daily",label:t.$t("Daily")},null,8,["label"]),_(c,{value:"weekly",label:t.$t("Weekly")},null,8,["label"]),_(c,{value:"disabled",label:t.$t("Per User Choice")},null,8,["label"])]),_:1},8,["modelValue"]),g("div",WQe,[g("p",null,x(t.$t("This is your default email sending frequency. Individual users can customize the frequency or disable the notification.")),1)])]),_:1},8,["label"])):O("",!0),_(l,{label:t.$t("Who can initiate an one-to-one message with the other members?")},{default:y(()=>[_(u,{modelValue:s.settings.who_can_initiate_message,"onUpdate:modelValue":e[2]||(e[2]=C=>s.settings.who_can_initiate_message=C)},{default:y(()=>[_(c,{value:"everyone",label:t.$t("Any Community Members")},null,8,["label"]),_(c,{value:"mods",label:t.$t("Only Moderator and Admins")},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),s.settings.who_can_initiate_message==="everyone"?(v(),D(l,{key:1,label:t.$t("Points needed to intiate a new message thread with another member or send message to community chats.")},{default:y(()=>[_(d,{modelValue:s.settings.points_to_initiate_message,"onUpdate:modelValue":e[3]||(e[3]=C=>s.settings.points_to_initiate_message=C),min:0},null,8,["modelValue"]),g("div",YQe,[g("p",null,x(t.$t("Set the number of points a user must have to initiate a new one-to-one message thread. Set to 0 to disable this feature.")),1)])]),_:1},8,["label"])):O("",!0),g("div",qQe,[g("h4",null,x(t.$t("Real-time Chat")),1)]),_(l,null,{default:y(()=>[_(a,{"true-value":"yes","false-value":"no",modelValue:s.settings.realtime_enabled,"onUpdate:modelValue":e[4]||(e[4]=C=>s.settings.realtime_enabled=C),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Enable Real-time Chat")),1)]),_:1},8,["modelValue"]),g("div",GQe,[s.settings.realtime_enabled==="no"?(v(),$("p",XQe,x(t.$t("Real-time chat is disabled. Messages will be delivered on page refresh.")),1)):(v(),$("p",KQe,x(t.$t("Real-time chat is enabled. Messages will be delivered instantly via WebSocket.")),1))])]),_:1}),o.isRealTimeEnabled?(v(),D(l,{key:2,label:t.$t("Socket Provider")},{default:y(()=>[_(u,{modelValue:s.settings.socket_provider,"onUpdate:modelValue":e[5]||(e[5]=C=>s.settings.socket_provider=C),onChange:e[6]||(e[6]=C=>o.maybeResetConfig())},{default:y(()=>[_(c,{value:"fluent-socket"},{default:y(()=>[N(x(t.$t("Fluent Socket")),1)]),_:1}),_(c,{value:"pusher"},{default:y(()=>[N(x(t.$t("Pusher")),1)]),_:1}),_(c,{value:"custom"},{default:y(()=>[N(x(t.$t("Custom")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",ZQe,[s.settings.socket_provider==="fluent-socket"?(v(),$("p",JQe,[N(x(t.$t("Use the built-in Fluent Socket server. You can create your free credentials at"))+" ",1),e[15]||(e[15]=g("a",{href:"https://fluentsocket.com/",target:"_blank",rel:"noopener"},"fluentsocket.com",-1))])):s.settings.socket_provider==="pusher"?(v(),$("p",QQe,x(t.$t("Use Pusher.com for WebSocket connections")),1)):(v(),$("p",eet,x(t.$t("Use a custom Pusher-compatible WebSocket server (e.g., Soketi)")),1))])]),_:1},8,["label"])):O("",!0),o.isRealTimeEnabled&&o.isWpConfigDefined?(v(),D(h,{key:3,type:"info",closable:!1,class:"fcom_mb_20"},{default:y(()=>[N(x(t.$t("Socket configuration is defined in wp-config.php and cannot be changed here.")),1)]),_:1})):o.isRealTimeEnabled?(v(),$(J,{key:4},[_(l,{label:t.$t("App ID")},{default:y(()=>[_(f,{modelValue:s.socketConfig.appId,"onUpdate:modelValue":e[7]||(e[7]=C=>s.socketConfig.appId=C),placeholder:t.$t("Your app ID")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(l,{label:t.$t("App Key")},{default:y(()=>[_(f,{modelValue:s.socketConfig.key,"onUpdate:modelValue":e[8]||(e[8]=C=>s.socketConfig.key=C),placeholder:t.$t("Your app key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(l,{label:t.$t("App Secret")},{default:y(()=>[_(f,{type:"password",modelValue:s.socketConfig.secret,"onUpdate:modelValue":e[9]||(e[9]=C=>s.socketConfig.secret=C),placeholder:t.$t("Your app secret"),"show-password":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o.showClusterField?(v(),D(l,{key:0,label:t.$t("Cluster")},{default:y(()=>[_(f,{modelValue:s.socketConfig.cluster,"onUpdate:modelValue":e[10]||(e[10]=C=>s.socketConfig.cluster=C),placeholder:s.settings.socket_provider==="pusher"?"mt1":t.$t("Optional")},null,8,["modelValue","placeholder"]),g("div",tet,[g("p",null,x(t.$t("Pusher cluster region (e.g., mt1, us2, eu, ap1). Optional for custom providers.")),1)])]),_:1},8,["label"])):O("",!0),o.isCustomProvider?(v(),$(J,{key:1},[_(l,{label:t.$t("Host")},{default:y(()=>[_(f,{modelValue:s.socketConfig.options.host,"onUpdate:modelValue":e[11]||(e[11]=C=>s.socketConfig.options.host=C),placeholder:t.$t("e.g., ws.example.com")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(l,{label:t.$t("Port")},{default:y(()=>[_(f,{modelValue:s.socketConfig.options.port,"onUpdate:modelValue":e[12]||(e[12]=C=>s.socketConfig.options.port=C),placeholder:"443"},null,8,["modelValue"])]),_:1},8,["label"]),_(l,{label:t.$t("Scheme")},{default:y(()=>[_(m,{modelValue:s.socketConfig.options.scheme,"onUpdate:modelValue":e[13]||(e[13]=C=>s.socketConfig.options.scheme=C),style:{width:"100%"}},{default:y(()=>[_(p,{value:"https",label:t.$t("HTTPS (Secure)")},null,8,["label"]),_(p,{value:"http",label:"HTTP"})]),_:1},8,["modelValue"])]),_:1},8,["label"])],64)):O("",!0)],64)):O("",!0)]),_:1},8,["modelValue"])])):(v(),$("div",net,[g("h3",null,x(t.$t("Sorry, settings could not be loaded. Please make sure you have latest version of FluentCommunity Pro and Fluent Messaging Addons")),1)])),g("div",set,[t.has_pro?Re((v(),D(w,{key:0,class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:y(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[k,s.saving]]):(v(),$("div",iet,[g("p",oet,x(t.$t("Please upgrade to Pro to use this feature")),1),g("a",{class:"el-button",href:t.$upgradeUrl("feature_lock_messaging"),target:"_blank"},x(t.$t("Upgrade to Pro")),9,ret)]))])],64)}const cet=ce(BQe,[["render",aet]]),uet={name:"FollowingConfigView",props:["features"],data(){return{follower_settings:null,showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1}},components:{UpgradeToProModal:Qd},methods:{openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.fetching=!0,this.$get("settings/followers/config").then(t=>{this.follower_settings=t.settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1})},saveSettings(){const t=this.follower_settings.is_enabled!==this.features.followers_module;this.follower_settings.is_enabled=this.features.followers_module,this.saving=!0,this.$post("settings/followers/config",{settings:this.follower_settings}).then(e=>{this.$notify.success(e.message),t&&window.location.reload()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}}},det={class:"fcom_storage_settings"},het={key:0,class:"white_loaded"},fet={key:1,class:"dialog_body"},pet={class:"fcom_mb_20"},met={class:"dialog_footer"},get={key:2};function vet(t,e,n,i,s,o){const r=ze,a=Vt,l=qt,c=tn,u=Li,d=ws,h=nn,f=Fa,p=B("UpgradeToProModal"),m=xt("loading");return v(),$(J,null,[g("div",det,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=b=>o.openSettings())},{default:y(()=>[N(x(t.$t("Settings")),1)]),_:1})]),_(f,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,size:t.dialogWidth,modelValue:s.showSettings,"onUpdate:modelValue":e[5]||(e[5]=b=>s.showSettings=b),direction:"rtl"},{header:y(({close:b})=>[g("h4",null,x(t.$t("Follower Module Settings")),1)]),default:y(()=>[s.fetching?(v(),$("div",het,[_(a,{rows:5,animated:!0})])):s.follower_settings?(v(),$("div",fet,[_(h,{onSubmit:e[4]||(e[4]=Me(b=>t.doNothing(),["prevent"])),"label-position":"top"},{default:y(()=>[_(c,null,{default:y(()=>[_(l,{modelValue:n.features.followers_module,"onUpdate:modelValue":e[1]||(e[1]=b=>n.features.followers_module=b),"true-value":"yes","false-value":"no",label:t.$t("Enable Follower Module"),class:"fcom_checkbox"},null,8,["modelValue","label"])]),_:1}),n.features.followers_module==="yes"?(v(),$(J,{key:0},[g("h5",pet,x(t.$t("Following Config")),1),_(c,{label:t.$t("Who can see the followers list on the user's profile?")},{default:y(()=>[_(d,{modelValue:s.follower_settings.who_can_see_followers,"onUpdate:modelValue":e[2]||(e[2]=b=>s.follower_settings.who_can_see_followers=b)},{default:y(()=>[_(u,{value:"public",label:t.$t("Everyone")},null,8,["label"]),_(u,{value:"members",label:t.$t("Members Only")},null,8,["label"]),_(u,{value:"only_me",label:t.$t("Only Profile Owner and Admin")},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(c,{label:t.$t("Who can see the followings list on the user's profile?")},{default:y(()=>[_(d,{modelValue:s.follower_settings.who_can_see_followings,"onUpdate:modelValue":e[3]||(e[3]=b=>s.follower_settings.who_can_see_followings=b)},{default:y(()=>[_(u,{value:"public",label:t.$t("Everyone")},null,8,["label"]),_(u,{value:"members",label:t.$t("Members Only")},null,8,["label"]),_(u,{value:"only_me",label:t.$t("Only Profile Owner and Admin")},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"])],64)):O("",!0)]),_:1}),g("div",met,[Re((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:y(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[m,s.saving]])])])):(v(),$("div",get,[g("p",null,x(t.$t("Config could not be loaded")),1)]))]),_:1},8,["size","modelValue"]),s.openUpgradeModal?(v(),D(p,{key:0,showModal:s.openUpgradeModal,onCloseModal:e[6]||(e[6]=b=>s.openUpgradeModal=!1),upgrade_module:"follower_module"},null,8,["showModal"])):O("",!0)],64)}const _et=ce(uet,[["render",vet]]),yet={name:"FluentPlayerCustomization",components:{InfoFilled:wl},props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],data(){return{activeNames:["0"]}},computed:{localSettings:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},controls(){return this.localSettings.controls||{}},behaviors(){return this.localSettings.behaviors||{}}},methods:{isControlVisible(t){return this.localSettings.skin==="simple"?["play","volume","fullscreen","pip","captions_toggle"].includes(t):!0}}},bet={key:0,class:"fluent-player-top-title-overlay"},wet={class:"fluent-player-title-stack"},ket={class:"fluent-player-media-title"},Cet={key:1,class:"fp-media-controls-center"},xet={class:"fp-controls-group center"},$et={key:2,class:"fp-media-controls-bottom"},Aet={key:0,class:"fp-controls-group"},Eet={key:0,class:"fp-media-button vds-button"},Met={key:1,class:"fp-media-button vds-button"},Tet={key:2,class:"fp-media-button vds-button"},Pet={key:3,class:"fp-media-button vds-button"},Iet={key:4,class:"fp-media-slider vds-time-slider slider-volume"},Let={key:5,class:"fp-media-time-group"},Oet={key:6,class:"fp-media-controls-spacer-slider"},Det={key:7,class:"fp-media-button vds-button"},Ret={key:8,class:"fp-media-button vds-button"},Vet={key:9,class:"fp-media-button vds-button"},Fet={key:10,class:"fp-media-button vds-button"},Net={key:11,class:"fp-media-button vds-button"},Bet={key:0,class:"fp-media-slider vds-time-slider"},zet={key:1,class:"fp-controls-group"},Het={key:0,class:"fp-media-button vds-button"},Uet={key:1,class:"fp-media-button vds-button"},jet={key:2,class:"fp-media-button vds-button"},Wet={key:3,class:"fp-media-button vds-button"},Yet={key:4,class:"fp-media-slider vds-time-slider slider-volume"},qet={key:5,class:"fp-media-time-group"},Get={key:6,class:"fp-media-button vds-button"},Xet={key:7,class:"fp-media-button vds-button"},Ket={key:8,class:"fp-media-button vds-button"},Zet={key:9,class:"fp-media-button vds-button"},Jet={key:10,class:"fp-media-button vds-button"},Qet={key:2,class:"fp-controls-group"},ett={key:0,class:"fp-media-button vds-button"},ttt={key:1,class:"fp-media-button vds-button"},ntt={key:2,class:"fp-media-slider vds-time-slider slider-volume"},stt={key:3,class:"fp-media-button vds-button"},itt={key:4,class:"fp-media-button vds-button"},ott={key:5,class:"fp-media-button vds-button"},rtt={key:3,class:"fp-controls-group fp-floating-bar"},att={key:0,class:"fp-media-button vds-button"},ltt={key:1,class:"fp-media-button vds-button"},ctt={key:2,class:"fp-media-button vds-button"},utt={key:3,class:"fp-media-time-group"},dtt={key:4,class:"fp-media-controls-spacer-slider"},htt={key:5,class:"fp-media-button vds-button"},ftt={key:6,class:"fp-media-slider vds-time-slider slider-volume"},ptt={key:7,class:"fp-media-button vds-button"},mtt={key:8,class:"fp-media-button vds-button"},gtt={key:9,class:"fp-media-button vds-button"},vtt={key:10,class:"fp-media-button vds-button"},_tt={key:11,class:"fp-media-button vds-button"},ytt={class:"player_settings_wrap"},btt={class:"setting_row"},wtt={class:"setting_row_flex"},ktt={class:"setting_row_flex"},Ctt={class:"setting_row_flex"},xtt={class:"setting_row_flex"},Stt={key:0,class:"setting_row"},$tt={key:1,class:"setting_row"},Att={key:2,class:"setting_row"},Ett={key:3,class:"setting_row"},Mtt={key:4,class:"setting_row"},Ttt={key:5,class:"setting_row"},Ptt={key:6,class:"setting_row"},Itt={key:7,class:"setting_row"},Ltt={key:8,class:"setting_row"},Ott={key:9,class:"setting_row"},Dtt={key:10,class:"setting_row"},Rtt={key:1,class:"setting_row"},Vtt={class:"setting_row"},Ftt={key:2,class:"setting_row"},Ntt={key:3,class:"setting_row"},Btt={key:4,class:"setting_row"},ztt={class:"setting_row setting_row--column"},Htt={class:"setting_row__label-with-icon"},Utt={class:"fcom_help_text"},jtt={class:"fcom_form_label"},Wtt={class:"fcom_help_text"};function Ytt(t,e,n,i,s,o){const r=jd,a=Zt,l=Wt,c=eu,u=tu,d=B("InfoFilled"),h=we,f=Ss,p=Ud,m=tn,b=Li,w=ws;return v(),$("div",{class:q(["fluent_player_config_wrap",{is_disabled:o.localSettings.enable_fluent_player!=="yes"}])},[_(p,{gutter:30},{default:y(()=>[_(r,{span:17},{default:y(()=>[g("div",{class:"player_preview_wrap",style:Xe({"--media-brand":o.localSettings.brandColor,"--fp-control-bar-bg":o.localSettings.controlBarColor||void 0,"--media-play-color":o.localSettings.playButtonColor||void 0,"--media-play-bg":o.localSettings.playButtonBgColor||void 0})},[g("div",{class:q(["player-preview","fp-skin-"+o.localSettings.skin])},[o.localSettings.skin!=="minimal"&&!o.behaviors.hide_top_controls?(v(),$("div",bet,[g("div",wet,[g("span",ket,x(t.$t("The Title of the Video")),1)])])):O("",!0),o.behaviors.hide_center_controls?O("",!0):(v(),$("div",Cet,[g("div",xet,[g("button",{onClick:e[0]||(e[0]=Me(k=>t.doNothing(),["prevent"])),class:"fp-media-button vds-button"},[...e[26]||(e[26]=[g("svg",{class:"vds-play-icon",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z",fill:"currentColor"})],-1)])])])])),o.localSettings.skin!=="minimal"&&!o.behaviors.hide_bottom_controls?(v(),$("div",$et,[o.localSettings.skin==="modern"?(v(),$("div",Aet,[o.controls.backward?(v(),$("button",Eet,[...e[27]||(e[27]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16.6667 10.3452C16.6667 10.8924 16.0439 11.2066 15.6038 10.8814L11.0766 7.5364C10.7159 7.26993 10.7159 6.73054 11.0766 6.46405L15.6038 3.11873C16.0439 2.79356 16.6667 3.10773 16.6667 3.6549V5.22682C16.6667 5.29746 16.7223 5.35579 16.7927 5.36066C22.6821 5.76757 27.3333 10.674 27.3333 16.6667C27.3333 22.9259 22.2592 28 16 28C9.96483 28 5.03145 23.2827 4.68601 17.3341C4.66466 16.9665 4.96518 16.6673 5.33339 16.6673H7.3334C7.70157 16.6673 7.99714 16.9668 8.02743 17.3337C8.36638 21.4399 11.8064 24.6667 16 24.6667C20.4183 24.6667 24 21.085 24 16.6667C24 12.5225 20.8483 9.11428 16.8113 8.70739C16.7337 8.69957 16.6667 8.76096 16.6667 8.83893V10.3452Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0226 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4279 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0993 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0832 15.4782 19.2015 15.6828 19.2868 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z",fill:"currentColor"}),g("path",{d:"M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.play?(v(),$("button",Met,[...e[28]||(e[28]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.forward?(v(),$("button",Tet,[...e[29]||(e[29]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M15.3333 10.3452C15.3333 10.8924 15.9561 11.2066 16.3962 10.8814L20.9234 7.5364C21.2841 7.26993 21.2841 6.73054 20.9235 6.46405L16.3962 3.11873C15.9561 2.79356 15.3333 3.10773 15.3333 3.6549V5.22682C15.3333 5.29746 15.2778 5.35579 15.2073 5.36066C9.31791 5.76757 4.66667 10.674 4.66667 16.6667C4.66667 22.9259 9.74078 28 16 28C22.0352 28 26.9686 23.2827 27.314 17.3341C27.3354 16.9665 27.0348 16.6673 26.6666 16.6673H24.6666C24.2984 16.6673 24.0029 16.9668 23.9726 17.3337C23.6336 21.4399 20.1937 24.6667 16 24.6667C11.5817 24.6667 8 21.085 8 16.6667C8 12.5225 11.1517 9.11428 15.1887 8.70739C15.2663 8.69957 15.3333 8.76096 15.3333 8.83893V10.3452Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0225 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4278 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0992 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0831 15.4782 19.2015 15.6828 19.2867 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z",fill:"currentColor"}),g("path",{d:"M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.volume?(v(),$("button",Pet,[...e[30]||(e[30]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M17.5091 24.6595C17.5091 25.2066 16.8864 25.5208 16.4463 25.1956L9.44847 20.0252C9.42553 20.0083 9.39776 19.9992 9.36923 19.9992H4.66667C4.29848 19.9992 4 19.7007 4 19.3325V12.6658C4 12.2976 4.29848 11.9992 4.66667 11.9992H9.37115C9.39967 11.9992 9.42745 11.99 9.45039 11.9731L16.4463 6.80363C16.8863 6.47845 17.5091 6.79262 17.5091 7.3398L17.5091 24.6595Z",fill:"currentColor"}),g("path",{d:"M27.5091 9.33336C27.8773 9.33336 28.1758 9.63184 28.1758 10V22C28.1758 22.3682 27.8773 22.6667 27.5091 22.6667H26.1758C25.8076 22.6667 25.5091 22.3682 25.5091 22V10C25.5091 9.63184 25.8076 9.33336 26.1758 9.33336L27.5091 9.33336Z",fill:"currentColor"}),g("path",{d:"M22.1758 12C22.544 12 22.8424 12.2985 22.8424 12.6667V19.3334C22.8424 19.7016 22.544 20 22.1758 20H20.8424C20.4743 20 20.1758 19.7016 20.1758 19.3334V12.6667C20.1758 12.2985 20.4743 12 20.8424 12H22.1758Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.volume?(v(),$("div",Iet,[...e[31]||(e[31]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),o.controls.current_time?(v(),$("div",Let,[...e[32]||(e[32]=[g("span",null,"0:00",-1),g("span",null,"/",-1),g("span",null,"5:34",-1)])])):O("",!0),o.controls.progress_bar?(v(),$("div",Oet,[...e[33]||(e[33]=[g("div",{class:"fp-media-slider vds-time-slider"},[g("div",{class:"vds-slider-track"}),g("div",{class:"vds-slider-track-fill vds-slider-track"}),g("div",{class:"vds-slider-thumb"})],-1)])])):O("",!0),o.controls.captions_toggle?(v(),$("button",Det,[...e[34]||(e[34]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.6661 6.66699C4.29791 6.66699 3.99943 6.96547 3.99943 7.33366V24.667C3.99943 25.0352 4.29791 25.3337 4.6661 25.3337H27.3328C27.701 25.3337 27.9994 25.0352 27.9994 24.667V7.33366C27.9994 6.96547 27.701 6.66699 27.3328 6.66699H4.6661ZM8.66667 21.3333C8.29848 21.3333 8 21.0349 8 20.6667V11.3333C8 10.9651 8.29848 10.6667 8.66667 10.6667H14C14.3682 10.6667 14.6667 10.9651 14.6667 11.3333V12.6667C14.6667 13.0349 14.3682 13.3333 14 13.3333H10.8C10.7264 13.3333 10.6667 13.393 10.6667 13.4667V18.5333C10.6667 18.607 10.7264 18.6667 10.8 18.6667H14C14.3682 18.6667 14.6667 18.9651 14.6667 19.3333V20.6667C14.6667 21.0349 14.3682 21.3333 14 21.3333H8.66667ZM18 21.3333C17.6318 21.3333 17.3333 21.0349 17.3333 20.6667V11.3333C17.3333 10.9651 17.6318 10.6667 18 10.6667H23.3333C23.7015 10.6667 24 10.9651 24 11.3333V12.6667C24 13.0349 23.7015 13.3333 23.3333 13.3333H20.1333C20.0597 13.3333 20 13.393 20 13.4667V18.5333C20 18.607 20.0597 18.6667 20.1333 18.6667H23.3333C23.7015 18.6667 24 18.9651 24 19.3333V20.6667C24 21.0349 23.7015 21.3333 23.3333 21.3333H18Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.playback_speed?(v(),$("button",Ret,[...e[35]||(e[35]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.14 25.1089C25.0171 25.2532 24.8356 25.3333 24.646 25.3333H22.8124C22.1084 25.3333 21.7734 24.1872 22.2745 23.6927C23.9161 22.0729 24.9336 19.822 24.9336 17.3333C24.9336 12.3997 20.9336 8.39973 16 8.39973C11.0664 8.39973 7.06641 12.3997 7.06641 17.3333C7.06641 19.822 8.08389 22.0729 9.72555 23.6927C10.2266 24.1872 9.89155 25.3333 9.18762 25.3333H7.35398C7.16436 25.3333 6.98294 25.2532 6.86001 25.1089C5.07703 23.015 4 20.2991 4 17.3333C4 10.7057 9.3724 5.33333 16 5.33333C22.6276 5.33333 28 10.7057 28 17.3333C28 20.2991 26.923 23.015 25.14 25.1089Z",fill:"currentColor"}),g("path",{d:"M21.1992 14.3399C21.4595 14.0796 21.4595 13.6575 21.1992 13.3971L20.2564 12.4543C19.996 12.194 19.5739 12.194 19.3136 12.4543L16.4492 15.3187C16.4185 15.3493 16.3749 15.3629 16.332 15.3568C16.2236 15.3414 16.1127 15.3334 16 15.3334C14.7113 15.3334 13.6667 16.378 13.6667 17.6667C13.6667 18.9554 14.7113 20 16 20C17.2887 20 18.3333 18.9554 18.3333 17.6667C18.3333 17.5464 18.3242 17.4283 18.3067 17.313C18.3001 17.2696 18.3136 17.2255 18.3446 17.1945L21.1992 14.3399Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.settings?(v(),$("button",Vet,[...e[36]||(e[36]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5722 5.33333C13.2429 5.33333 12.9629 5.57382 12.9132 5.89938L12.4063 9.21916C12.4 9.26058 12.3746 9.29655 12.3378 9.31672C12.2387 9.37118 12.1409 9.42779 12.0444 9.48648C12.0086 9.5083 11.9646 9.51242 11.9255 9.49718L8.79572 8.27692C8.48896 8.15732 8.14083 8.27958 7.9762 8.56472L5.5491 12.7686C5.38444 13.0538 5.45271 13.4165 5.70981 13.6223L8.33308 15.7225C8.3658 15.7487 8.38422 15.7887 8.38331 15.8306C8.38209 15.8867 8.38148 15.9429 8.38148 15.9993C8.38148 16.0558 8.3821 16.1121 8.38332 16.1684C8.38423 16.2102 8.36582 16.2503 8.33313 16.2765L5.7103 18.3778C5.45334 18.5836 5.38515 18.9462 5.54978 19.2314L7.97688 23.4352C8.14155 23.7205 8.48981 23.8427 8.79661 23.723L11.926 22.5016C11.9651 22.4864 12.009 22.4905 12.0449 22.5123C12.1412 22.5709 12.2388 22.6274 12.3378 22.6818C12.3745 22.7019 12.4 22.7379 12.4063 22.7793L12.9132 26.0993C12.9629 26.4249 13.2429 26.6654 13.5722 26.6654H18.4264C18.7556 26.6654 19.0356 26.425 19.0854 26.0995L19.5933 22.7801C19.5997 22.7386 19.6252 22.7027 19.6619 22.6825C19.7614 22.6279 19.8596 22.5711 19.9564 22.5121C19.9923 22.4903 20.0362 22.4862 20.0754 22.5015L23.2035 23.7223C23.5103 23.842 23.8585 23.7198 24.0232 23.4346L26.4503 19.2307C26.6149 18.9456 26.5467 18.583 26.2898 18.3771L23.6679 16.2766C23.6352 16.2504 23.6168 16.2104 23.6177 16.1685C23.619 16.1122 23.6196 16.0558 23.6196 15.9993C23.6196 15.9429 23.619 15.8866 23.6177 15.8305C23.6168 15.7886 23.6353 15.7486 23.668 15.7224L26.2903 13.623C26.5474 13.4172 26.6156 13.0544 26.451 12.7692L24.0239 8.56537C23.8592 8.28023 23.5111 8.15797 23.2043 8.27757L20.0758 9.49734C20.0367 9.51258 19.9927 9.50846 19.9569 9.48664C19.8599 9.42762 19.7616 9.37071 19.6618 9.31596C19.6251 9.2958 19.5997 9.25984 19.5933 9.21843L19.0854 5.89915C19.0356 5.57369 18.7556 5.33333 18.4264 5.33333H13.5722ZM16.0001 20.2854C18.3672 20.2854 20.2862 18.3664 20.2862 15.9993C20.2862 13.6322 18.3672 11.7132 16.0001 11.7132C13.6329 11.7132 11.714 13.6322 11.714 15.9993C11.714 18.3664 13.6329 20.2854 16.0001 20.2854Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.pip?(v(),$("button",Fet,[...e[37]||(e[37]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16 15.3333C15.6318 15.3333 15.3333 15.6318 15.3333 16V20C15.3333 20.3682 15.6318 20.6667 16 20.6667H21.3333C21.7015 20.6667 22 20.3682 22 20V16C22 15.6318 21.7015 15.3333 21.3333 15.3333H16Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.33333 7.33334C5.33333 6.96515 5.63181 6.66667 5.99999 6.66667H26C26.3682 6.66667 26.6667 6.96515 26.6667 7.33334V24.6667C26.6667 25.0349 26.3682 25.3333 26 25.3333H5.99999C5.63181 25.3333 5.33333 25.0349 5.33333 24.6667V7.33334ZM7.99999 10C7.99999 9.63182 8.29847 9.33334 8.66666 9.33334H23.3333C23.7015 9.33334 24 9.63182 24 10V22C24 22.3682 23.7015 22.6667 23.3333 22.6667H8.66666C8.29847 22.6667 7.99999 22.3682 7.99999 22V10Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.fullscreen?(v(),$("button",Net,[...e[38]||(e[38]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.3299 7.26517C25.2958 6.929 25.0119 6.66666 24.6667 6.66666H19.3334C18.9652 6.66666 18.6667 6.96514 18.6667 7.33333V9.33333C18.6667 9.70152 18.9652 10 19.3334 10L21.8667 10C21.9403 10 22 10.0597 22 10.1333V12.6667C22 13.0349 22.2985 13.3333 22.6667 13.3333H24.6667C25.0349 13.3333 25.3334 13.0349 25.3334 12.6667V7.33333C25.3334 7.31032 25.3322 7.28758 25.3299 7.26517Z",fill:"currentColor"}),g("path",{d:"M22 21.8667C22 21.9403 21.9403 22 21.8667 22L19.3334 22C18.9652 22 18.6667 22.2985 18.6667 22.6667V24.6667C18.6667 25.0349 18.9652 25.3333 19.3334 25.3333L24.6667 25.3333C25.0349 25.3333 25.3334 25.0349 25.3334 24.6667V19.3333C25.3334 18.9651 25.0349 18.6667 24.6667 18.6667H22.6667C22.2985 18.6667 22 18.9651 22 19.3333V21.8667Z",fill:"currentColor"}),g("path",{d:"M12.6667 22H10.1334C10.0597 22 10 21.9403 10 21.8667V19.3333C10 18.9651 9.70154 18.6667 9.33335 18.6667H7.33335C6.96516 18.6667 6.66669 18.9651 6.66669 19.3333V24.6667C6.66669 25.0349 6.96516 25.3333 7.33335 25.3333H12.6667C13.0349 25.3333 13.3334 25.0349 13.3334 24.6667V22.6667C13.3334 22.2985 13.0349 22 12.6667 22Z",fill:"currentColor"}),g("path",{d:"M10 12.6667V10.1333C10 10.0597 10.0597 10 10.1334 10L12.6667 10C13.0349 10 13.3334 9.70152 13.3334 9.33333V7.33333C13.3334 6.96514 13.0349 6.66666 12.6667 6.66666H7.33335C6.96516 6.66666 6.66669 6.96514 6.66669 7.33333V12.6667C6.66669 13.0349 6.96516 13.3333 7.33335 13.3333H9.33335C9.70154 13.3333 10 13.0349 10 12.6667Z",fill:"currentColor"})],-1)])])):O("",!0)])):O("",!0),o.localSettings.skin==="classic"?(v(),$(J,{key:1},[o.controls.progress_bar?(v(),$("div",Bet,[...e[39]||(e[39]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),o.localSettings.skin==="classic"?(v(),$("div",zet,[o.controls.backward?(v(),$("button",Het,[...e[40]||(e[40]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16.6667 10.3452C16.6667 10.8924 16.0439 11.2066 15.6038 10.8814L11.0766 7.5364C10.7159 7.26993 10.7159 6.73054 11.0766 6.46405L15.6038 3.11873C16.0439 2.79356 16.6667 3.10773 16.6667 3.6549V5.22682C16.6667 5.29746 16.7223 5.35579 16.7927 5.36066C22.6821 5.76757 27.3333 10.674 27.3333 16.6667C27.3333 22.9259 22.2592 28 16 28C9.96483 28 5.03145 23.2827 4.68601 17.3341C4.66466 16.9665 4.96518 16.6673 5.33339 16.6673H7.3334C7.70157 16.6673 7.99714 16.9668 8.02743 17.3337C8.36638 21.4399 11.8064 24.6667 16 24.6667C20.4183 24.6667 24 21.085 24 16.6667C24 12.5225 20.8483 9.11428 16.8113 8.70739C16.7337 8.69957 16.6667 8.76096 16.6667 8.83893V10.3452Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0226 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4279 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0993 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0832 15.4782 19.2015 15.6828 19.2868 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z",fill:"currentColor"}),g("path",{d:"M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.play?(v(),$("button",Uet,[...e[41]||(e[41]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.forward?(v(),$("button",jet,[...e[42]||(e[42]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M15.3333 10.3452C15.3333 10.8924 15.9561 11.2066 16.3962 10.8814L20.9234 7.5364C21.2841 7.26993 21.2841 6.73054 20.9235 6.46405L16.3962 3.11873C15.9561 2.79356 15.3333 3.10773 15.3333 3.6549V5.22682C15.3333 5.29746 15.2778 5.35579 15.2073 5.36066C9.31791 5.76757 4.66667 10.674 4.66667 16.6667C4.66667 22.9259 9.74078 28 16 28C22.0352 28 26.9686 23.2827 27.314 17.3341C27.3354 16.9665 27.0348 16.6673 26.6666 16.6673H24.6666C24.2984 16.6673 24.0029 16.9668 23.9726 17.3337C23.6336 21.4399 20.1937 24.6667 16 24.6667C11.5817 24.6667 8 21.085 8 16.6667C8 12.5225 11.1517 9.11428 15.1887 8.70739C15.2663 8.69957 15.3333 8.76096 15.3333 8.83893V10.3452Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0225 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4278 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0992 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0831 15.4782 19.2015 15.6828 19.2867 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z",fill:"currentColor"}),g("path",{d:"M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.volume?(v(),$("button",Wet,[...e[43]||(e[43]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M17.5091 24.6595C17.5091 25.2066 16.8864 25.5208 16.4463 25.1956L9.44847 20.0252C9.42553 20.0083 9.39776 19.9992 9.36923 19.9992H4.66667C4.29848 19.9992 4 19.7007 4 19.3325V12.6658C4 12.2976 4.29848 11.9992 4.66667 11.9992H9.37115C9.39967 11.9992 9.42745 11.99 9.45039 11.9731L16.4463 6.80363C16.8863 6.47845 17.5091 6.79262 17.5091 7.3398L17.5091 24.6595Z",fill:"currentColor"}),g("path",{d:"M27.5091 9.33336C27.8773 9.33336 28.1758 9.63184 28.1758 10V22C28.1758 22.3682 27.8773 22.6667 27.5091 22.6667H26.1758C25.8076 22.6667 25.5091 22.3682 25.5091 22V10C25.5091 9.63184 25.8076 9.33336 26.1758 9.33336L27.5091 9.33336Z",fill:"currentColor"}),g("path",{d:"M22.1758 12C22.544 12 22.8424 12.2985 22.8424 12.6667V19.3334C22.8424 19.7016 22.544 20 22.1758 20H20.8424C20.4743 20 20.1758 19.7016 20.1758 19.3334V12.6667C20.1758 12.2985 20.4743 12 20.8424 12H22.1758Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.volume?(v(),$("div",Yet,[...e[44]||(e[44]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),o.controls.current_time?(v(),$("div",qet,[...e[45]||(e[45]=[g("span",null,"0:00",-1),g("span",null,"/",-1),g("span",null,"5:34",-1)])])):O("",!0),e[51]||(e[51]=g("div",{class:"fp-media-controls-spacer"},null,-1)),o.controls.captions_toggle?(v(),$("button",Get,[...e[46]||(e[46]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.6661 6.66699C4.29791 6.66699 3.99943 6.96547 3.99943 7.33366V24.667C3.99943 25.0352 4.29791 25.3337 4.6661 25.3337H27.3328C27.701 25.3337 27.9994 25.0352 27.9994 24.667V7.33366C27.9994 6.96547 27.701 6.66699 27.3328 6.66699H4.6661ZM8.66667 21.3333C8.29848 21.3333 8 21.0349 8 20.6667V11.3333C8 10.9651 8.29848 10.6667 8.66667 10.6667H14C14.3682 10.6667 14.6667 10.9651 14.6667 11.3333V12.6667C14.6667 13.0349 14.3682 13.3333 14 13.3333H10.8C10.7264 13.3333 10.6667 13.393 10.6667 13.4667V18.5333C10.6667 18.607 10.7264 18.6667 10.8 18.6667H14C14.3682 18.6667 14.6667 18.9651 14.6667 19.3333V20.6667C14.6667 21.0349 14.3682 21.3333 14 21.3333H8.66667ZM18 21.3333C17.6318 21.3333 17.3333 21.0349 17.3333 20.6667V11.3333C17.3333 10.9651 17.6318 10.6667 18 10.6667H23.3333C23.7015 10.6667 24 10.9651 24 11.3333V12.6667C24 13.0349 23.7015 13.3333 23.3333 13.3333H20.1333C20.0597 13.3333 20 13.393 20 13.4667V18.5333C20 18.607 20.0597 18.6667 20.1333 18.6667H23.3333C23.7015 18.6667 24 18.9651 24 19.3333V20.6667C24 21.0349 23.7015 21.3333 23.3333 21.3333H18Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.playback_speed?(v(),$("button",Xet,[...e[47]||(e[47]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.14 25.1089C25.0171 25.2532 24.8356 25.3333 24.646 25.3333H22.8124C22.1084 25.3333 21.7734 24.1872 22.2745 23.6927C23.9161 22.0729 24.9336 19.822 24.9336 17.3333C24.9336 12.3997 20.9336 8.39973 16 8.39973C11.0664 8.39973 7.06641 12.3997 7.06641 17.3333C7.06641 19.822 8.08389 22.0729 9.72555 23.6927C10.2266 24.1872 9.89155 25.3333 9.18762 25.3333H7.35398C7.16436 25.3333 6.98294 25.2532 6.86001 25.1089C5.07703 23.015 4 20.2991 4 17.3333C4 10.7057 9.3724 5.33333 16 5.33333C22.6276 5.33333 28 10.7057 28 17.3333C28 20.2991 26.923 23.015 25.14 25.1089Z",fill:"currentColor"}),g("path",{d:"M21.1992 14.3399C21.4595 14.0796 21.4595 13.6575 21.1992 13.3971L20.2564 12.4543C19.996 12.194 19.5739 12.194 19.3136 12.4543L16.4492 15.3187C16.4185 15.3493 16.3749 15.3629 16.332 15.3568C16.2236 15.3414 16.1127 15.3334 16 15.3334C14.7113 15.3334 13.6667 16.378 13.6667 17.6667C13.6667 18.9554 14.7113 20 16 20C17.2887 20 18.3333 18.9554 18.3333 17.6667C18.3333 17.5464 18.3242 17.4283 18.3067 17.313C18.3001 17.2696 18.3136 17.2255 18.3446 17.1945L21.1992 14.3399Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.settings?(v(),$("button",Ket,[...e[48]||(e[48]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5722 5.33333C13.2429 5.33333 12.9629 5.57382 12.9132 5.89938L12.4063 9.21916C12.4 9.26058 12.3746 9.29655 12.3378 9.31672C12.2387 9.37118 12.1409 9.42779 12.0444 9.48648C12.0086 9.5083 11.9646 9.51242 11.9255 9.49718L8.79572 8.27692C8.48896 8.15732 8.14083 8.27958 7.9762 8.56472L5.5491 12.7686C5.38444 13.0538 5.45271 13.4165 5.70981 13.6223L8.33308 15.7225C8.3658 15.7487 8.38422 15.7887 8.38331 15.8306C8.38209 15.8867 8.38148 15.9429 8.38148 15.9993C8.38148 16.0558 8.3821 16.1121 8.38332 16.1684C8.38423 16.2102 8.36582 16.2503 8.33313 16.2765L5.7103 18.3778C5.45334 18.5836 5.38515 18.9462 5.54978 19.2314L7.97688 23.4352C8.14155 23.7205 8.48981 23.8427 8.79661 23.723L11.926 22.5016C11.9651 22.4864 12.009 22.4905 12.0449 22.5123C12.1412 22.5709 12.2388 22.6274 12.3378 22.6818C12.3745 22.7019 12.4 22.7379 12.4063 22.7793L12.9132 26.0993C12.9629 26.4249 13.2429 26.6654 13.5722 26.6654H18.4264C18.7556 26.6654 19.0356 26.425 19.0854 26.0995L19.5933 22.7801C19.5997 22.7386 19.6252 22.7027 19.6619 22.6825C19.7614 22.6279 19.8596 22.5711 19.9564 22.5121C19.9923 22.4903 20.0362 22.4862 20.0754 22.5015L23.2035 23.7223C23.5103 23.842 23.8585 23.7198 24.0232 23.4346L26.4503 19.2307C26.6149 18.9456 26.5467 18.583 26.2898 18.3771L23.6679 16.2766C23.6352 16.2504 23.6168 16.2104 23.6177 16.1685C23.619 16.1122 23.6196 16.0558 23.6196 15.9993C23.6196 15.9429 23.619 15.8866 23.6177 15.8305C23.6168 15.7886 23.6353 15.7486 23.668 15.7224L26.2903 13.623C26.5474 13.4172 26.6156 13.0544 26.451 12.7692L24.0239 8.56537C23.8592 8.28023 23.5111 8.15797 23.2043 8.27757L20.0758 9.49734C20.0367 9.51258 19.9927 9.50846 19.9569 9.48664C19.8599 9.42762 19.7616 9.37071 19.6618 9.31596C19.6251 9.2958 19.5997 9.25984 19.5933 9.21843L19.0854 5.89915C19.0356 5.57369 18.7556 5.33333 18.4264 5.33333H13.5722ZM16.0001 20.2854C18.3672 20.2854 20.2862 18.3664 20.2862 15.9993C20.2862 13.6322 18.3672 11.7132 16.0001 11.7132C13.6329 11.7132 11.714 13.6322 11.714 15.9993C11.714 18.3664 13.6329 20.2854 16.0001 20.2854Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.pip?(v(),$("button",Zet,[...e[49]||(e[49]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16 15.3333C15.6318 15.3333 15.3333 15.6318 15.3333 16V20C15.3333 20.3682 15.6318 20.6667 16 20.6667H21.3333C21.7015 20.6667 22 20.3682 22 20V16C22 15.6318 21.7015 15.3333 21.3333 15.3333H16Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.33333 7.33334C5.33333 6.96515 5.63181 6.66667 5.99999 6.66667H26C26.3682 6.66667 26.6667 6.96515 26.6667 7.33334V24.6667C26.6667 25.0349 26.3682 25.3333 26 25.3333H5.99999C5.63181 25.3333 5.33333 25.0349 5.33333 24.6667V7.33334ZM7.99999 10C7.99999 9.63182 8.29847 9.33334 8.66666 9.33334H23.3333C23.7015 9.33334 24 9.63182 24 10V22C24 22.3682 23.7015 22.6667 23.3333 22.6667H8.66666C8.29847 22.6667 7.99999 22.3682 7.99999 22V10Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.fullscreen?(v(),$("button",Jet,[...e[50]||(e[50]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.3299 7.26517C25.2958 6.929 25.0119 6.66666 24.6667 6.66666H19.3334C18.9652 6.66666 18.6667 6.96514 18.6667 7.33333V9.33333C18.6667 9.70152 18.9652 10 19.3334 10L21.8667 10C21.9403 10 22 10.0597 22 10.1333V12.6667C22 13.0349 22.2985 13.3333 22.6667 13.3333H24.6667C25.0349 13.3333 25.3334 13.0349 25.3334 12.6667V7.33333C25.3334 7.31032 25.3322 7.28758 25.3299 7.26517Z",fill:"currentColor"}),g("path",{d:"M22 21.8667C22 21.9403 21.9403 22 21.8667 22L19.3334 22C18.9652 22 18.6667 22.2985 18.6667 22.6667V24.6667C18.6667 25.0349 18.9652 25.3333 19.3334 25.3333L24.6667 25.3333C25.0349 25.3333 25.3334 25.0349 25.3334 24.6667V19.3333C25.3334 18.9651 25.0349 18.6667 24.6667 18.6667H22.6667C22.2985 18.6667 22 18.9651 22 19.3333V21.8667Z",fill:"currentColor"}),g("path",{d:"M12.6667 22H10.1334C10.0597 22 10 21.9403 10 21.8667V19.3333C10 18.9651 9.70154 18.6667 9.33335 18.6667H7.33335C6.96516 18.6667 6.66669 18.9651 6.66669 19.3333V24.6667C6.66669 25.0349 6.96516 25.3333 7.33335 25.3333H12.6667C13.0349 25.3333 13.3334 25.0349 13.3334 24.6667V22.6667C13.3334 22.2985 13.0349 22 12.6667 22Z",fill:"currentColor"}),g("path",{d:"M10 12.6667V10.1333C10 10.0597 10.0597 10 10.1334 10L12.6667 10C13.0349 10 13.3334 9.70152 13.3334 9.33333V7.33333C13.3334 6.96514 13.0349 6.66666 12.6667 6.66666H7.33335C6.96516 6.66666 6.66669 6.96514 6.66669 7.33333V12.6667C6.66669 13.0349 6.96516 13.3333 7.33335 13.3333H9.33335C9.70154 13.3333 10 13.0349 10 12.6667Z",fill:"currentColor"})],-1)])])):O("",!0)])):O("",!0)],64)):O("",!0),o.localSettings.skin==="simple"?(v(),$("div",Qet,[o.controls.play?(v(),$("button",ett,[...e[52]||(e[52]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.volume?(v(),$("button",ttt,[...e[53]||(e[53]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M17.5091 24.6595C17.5091 25.2066 16.8864 25.5208 16.4463 25.1956L9.44847 20.0252C9.42553 20.0083 9.39776 19.9992 9.36923 19.9992H4.66667C4.29848 19.9992 4 19.7007 4 19.3325V12.6658C4 12.2976 4.29848 11.9992 4.66667 11.9992H9.37115C9.39967 11.9992 9.42745 11.99 9.45039 11.9731L16.4463 6.80363C16.8863 6.47845 17.5091 6.79262 17.5091 7.3398L17.5091 24.6595Z",fill:"currentColor"}),g("path",{d:"M27.5091 9.33336C27.8773 9.33336 28.1758 9.63184 28.1758 10V22C28.1758 22.3682 27.8773 22.6667 27.5091 22.6667H26.1758C25.8076 22.6667 25.5091 22.3682 25.5091 22V10C25.5091 9.63184 25.8076 9.33336 26.1758 9.33336L27.5091 9.33336Z",fill:"currentColor"}),g("path",{d:"M22.1758 12C22.544 12 22.8424 12.2985 22.8424 12.6667V19.3334C22.8424 19.7016 22.544 20 22.1758 20H20.8424C20.4743 20 20.1758 19.7016 20.1758 19.3334V12.6667C20.1758 12.2985 20.4743 12 20.8424 12H22.1758Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.volume?(v(),$("div",ntt,[...e[54]||(e[54]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),e[58]||(e[58]=g("div",{class:"fp-media-slider vds-time-slider"},[g("div",{class:"vds-slider-track"}),g("div",{class:"vds-slider-track-fill vds-slider-track"}),g("div",{class:"vds-slider-thumb"})],-1)),o.controls.captions_toggle?(v(),$("button",stt,[...e[55]||(e[55]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.6661 6.66699C4.29791 6.66699 3.99943 6.96547 3.99943 7.33366V24.667C3.99943 25.0352 4.29791 25.3337 4.6661 25.3337H27.3328C27.701 25.3337 27.9994 25.0352 27.9994 24.667V7.33366C27.9994 6.96547 27.701 6.66699 27.3328 6.66699H4.6661ZM8.66667 21.3333C8.29848 21.3333 8 21.0349 8 20.6667V11.3333C8 10.9651 8.29848 10.6667 8.66667 10.6667H14C14.3682 10.6667 14.6667 10.9651 14.6667 11.3333V12.6667C14.6667 13.0349 14.3682 13.3333 14 13.3333H10.8C10.7264 13.3333 10.6667 13.393 10.6667 13.4667V18.5333C10.6667 18.607 10.7264 18.6667 10.8 18.6667H14C14.3682 18.6667 14.6667 18.9651 14.6667 19.3333V20.6667C14.6667 21.0349 14.3682 21.3333 14 21.3333H8.66667ZM18 21.3333C17.6318 21.3333 17.3333 21.0349 17.3333 20.6667V11.3333C17.3333 10.9651 17.6318 10.6667 18 10.6667H23.3333C23.7015 10.6667 24 10.9651 24 11.3333V12.6667C24 13.0349 23.7015 13.3333 23.3333 13.3333H20.1333C20.0597 13.3333 20 13.393 20 13.4667V18.5333C20 18.607 20.0597 18.6667 20.1333 18.6667H23.3333C23.7015 18.6667 24 18.9651 24 19.3333V20.6667C24 21.0349 23.7015 21.3333 23.3333 21.3333H18Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.pip?(v(),$("button",itt,[...e[56]||(e[56]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16 15.3333C15.6318 15.3333 15.3333 15.6318 15.3333 16V20C15.3333 20.3682 15.6318 20.6667 16 20.6667H21.3333C21.7015 20.6667 22 20.3682 22 20V16C22 15.6318 21.7015 15.3333 21.3333 15.3333H16Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.33333 7.33334C5.33333 6.96515 5.63181 6.66667 5.99999 6.66667H26C26.3682 6.66667 26.6667 6.96515 26.6667 7.33334V24.6667C26.6667 25.0349 26.3682 25.3333 26 25.3333H5.99999C5.63181 25.3333 5.33333 25.0349 5.33333 24.6667V7.33334ZM7.99999 10C7.99999 9.63182 8.29847 9.33334 8.66666 9.33334H23.3333C23.7015 9.33334 24 9.63182 24 10V22C24 22.3682 23.7015 22.6667 23.3333 22.6667H8.66666C8.29847 22.6667 7.99999 22.3682 7.99999 22V10Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.fullscreen?(v(),$("button",ott,[...e[57]||(e[57]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.3299 7.26517C25.2958 6.929 25.0119 6.66666 24.6667 6.66666H19.3334C18.9652 6.66666 18.6667 6.96514 18.6667 7.33333V9.33333C18.6667 9.70152 18.9652 10 19.3334 10L21.8667 10C21.9403 10 22 10.0597 22 10.1333V12.6667C22 13.0349 22.2985 13.3333 22.6667 13.3333H24.6667C25.0349 13.3333 25.3334 13.0349 25.3334 12.6667V7.33333C25.3334 7.31032 25.3322 7.28758 25.3299 7.26517Z",fill:"currentColor"}),g("path",{d:"M22 21.8667C22 21.9403 21.9403 22 21.8667 22L19.3334 22C18.9652 22 18.6667 22.2985 18.6667 22.6667V24.6667C18.6667 25.0349 18.9652 25.3333 19.3334 25.3333L24.6667 25.3333C25.0349 25.3333 25.3334 25.0349 25.3334 24.6667V19.3333C25.3334 18.9651 25.0349 18.6667 24.6667 18.6667H22.6667C22.2985 18.6667 22 18.9651 22 19.3333V21.8667Z",fill:"currentColor"}),g("path",{d:"M12.6667 22H10.1334C10.0597 22 10 21.9403 10 21.8667V19.3333C10 18.9651 9.70154 18.6667 9.33335 18.6667H7.33335C6.96516 18.6667 6.66669 18.9651 6.66669 19.3333V24.6667C6.66669 25.0349 6.96516 25.3333 7.33335 25.3333H12.6667C13.0349 25.3333 13.3334 25.0349 13.3334 24.6667V22.6667C13.3334 22.2985 13.0349 22 12.6667 22Z",fill:"currentColor"}),g("path",{d:"M10 12.6667V10.1333C10 10.0597 10.0597 10 10.1334 10L12.6667 10C13.0349 10 13.3334 9.70152 13.3334 9.33333V7.33333C13.3334 6.96514 13.0349 6.66666 12.6667 6.66666H7.33335C6.96516 6.66666 6.66669 6.96514 6.66669 7.33333V12.6667C6.66669 13.0349 6.96516 13.3333 7.33335 13.3333H9.33335C9.70154 13.3333 10 13.0349 10 12.6667Z",fill:"currentColor"})],-1)])])):O("",!0)])):O("",!0),o.localSettings.skin==="floating"?(v(),$("div",rtt,[o.controls.backward?(v(),$("button",att,[...e[59]||(e[59]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16.6667 10.3452C16.6667 10.8924 16.0439 11.2066 15.6038 10.8814L11.0766 7.5364C10.7159 7.26993 10.7159 6.73054 11.0766 6.46405L15.6038 3.11873C16.0439 2.79356 16.6667 3.10773 16.6667 3.6549V5.22682C16.6667 5.29746 16.7223 5.35579 16.7927 5.36066C22.6821 5.76757 27.3333 10.674 27.3333 16.6667C27.3333 22.9259 22.2592 28 16 28C9.96483 28 5.03145 23.2827 4.68601 17.3341C4.66466 16.9665 4.96518 16.6673 5.33339 16.6673H7.3334C7.70157 16.6673 7.99714 16.9668 8.02743 17.3337C8.36638 21.4399 11.8064 24.6667 16 24.6667C20.4183 24.6667 24 21.085 24 16.6667C24 12.5225 20.8483 9.11428 16.8113 8.70739C16.7337 8.69957 16.6667 8.76096 16.6667 8.83893V10.3452Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0226 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4279 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0993 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0832 15.4782 19.2015 15.6828 19.2868 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z",fill:"currentColor"}),g("path",{d:"M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.play?(v(),$("button",ltt,[...e[60]||(e[60]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.forward?(v(),$("button",ctt,[...e[61]||(e[61]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M15.3333 10.3452C15.3333 10.8924 15.9561 11.2066 16.3962 10.8814L20.9234 7.5364C21.2841 7.26993 21.2841 6.73054 20.9235 6.46405L16.3962 3.11873C15.9561 2.79356 15.3333 3.10773 15.3333 3.6549V5.22682C15.3333 5.29746 15.2778 5.35579 15.2073 5.36066C9.31791 5.76757 4.66667 10.674 4.66667 16.6667C4.66667 22.9259 9.74078 28 16 28C22.0352 28 26.9686 23.2827 27.314 17.3341C27.3354 16.9665 27.0348 16.6673 26.6666 16.6673H24.6666C24.2984 16.6673 24.0029 16.9668 23.9726 17.3337C23.6336 21.4399 20.1937 24.6667 16 24.6667C11.5817 24.6667 8 21.085 8 16.6667C8 12.5225 11.1517 9.11428 15.1887 8.70739C15.2663 8.69957 15.3333 8.76096 15.3333 8.83893V10.3452Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0225 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4278 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0992 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0831 15.4782 19.2015 15.6828 19.2867 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z",fill:"currentColor"}),g("path",{d:"M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.current_time?(v(),$("div",utt,[...e[62]||(e[62]=[g("span",null,"0:00",-1),g("span",null,"/",-1),g("span",null,"5:34",-1)])])):O("",!0),o.controls.progress_bar?(v(),$("div",dtt,[...e[63]||(e[63]=[g("div",{class:"fp-media-slider vds-time-slider"},[g("div",{class:"vds-slider-track"}),g("div",{class:"vds-slider-track-fill vds-slider-track"}),g("div",{class:"vds-slider-thumb"})],-1)])])):O("",!0),o.controls.volume?(v(),$("button",htt,[...e[64]||(e[64]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M17.5091 24.6595C17.5091 25.2066 16.8864 25.5208 16.4463 25.1956L9.44847 20.0252C9.42553 20.0083 9.39776 19.9992 9.36923 19.9992H4.66667C4.29848 19.9992 4 19.7007 4 19.3325V12.6658C4 12.2976 4.29848 11.9992 4.66667 11.9992H9.37115C9.39967 11.9992 9.42745 11.99 9.45039 11.9731L16.4463 6.80363C16.8863 6.47845 17.5091 6.79262 17.5091 7.3398L17.5091 24.6595Z",fill:"currentColor"}),g("path",{d:"M27.5091 9.33336C27.8773 9.33336 28.1758 9.63184 28.1758 10V22C28.1758 22.3682 27.8773 22.6667 27.5091 22.6667H26.1758C25.8076 22.6667 25.5091 22.3682 25.5091 22V10C25.5091 9.63184 25.8076 9.33336 26.1758 9.33336L27.5091 9.33336Z",fill:"currentColor"}),g("path",{d:"M22.1758 12C22.544 12 22.8424 12.2985 22.8424 12.6667V19.3334C22.8424 19.7016 22.544 20 22.1758 20H20.8424C20.4743 20 20.1758 19.7016 20.1758 19.3334V12.6667C20.1758 12.2985 20.4743 12 20.8424 12H22.1758Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.volume?(v(),$("div",ftt,[...e[65]||(e[65]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),o.controls.captions_toggle?(v(),$("button",ptt,[...e[66]||(e[66]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.6661 6.66699C4.29791 6.66699 3.99943 6.96547 3.99943 7.33366V24.667C3.99943 25.0352 4.29791 25.3337 4.6661 25.3337H27.3328C27.701 25.3337 27.9994 25.0352 27.9994 24.667V7.33366C27.9994 6.96547 27.701 6.66699 27.3328 6.66699H4.6661ZM8.66667 21.3333C8.29848 21.3333 8 21.0349 8 20.6667V11.3333C8 10.9651 8.29848 10.6667 8.66667 10.6667H14C14.3682 10.6667 14.6667 10.9651 14.6667 11.3333V12.6667C14.6667 13.0349 14.3682 13.3333 14 13.3333H10.8C10.7264 13.3333 10.6667 13.393 10.6667 13.4667V18.5333C10.6667 18.607 10.7264 18.6667 10.8 18.6667H14C14.3682 18.6667 14.6667 18.9651 14.6667 19.3333V20.6667C14.6667 21.0349 14.3682 21.3333 14 21.3333H8.66667ZM18 21.3333C17.6318 21.3333 17.3333 21.0349 17.3333 20.6667V11.3333C17.3333 10.9651 17.6318 10.6667 18 10.6667H23.3333C23.7015 10.6667 24 10.9651 24 11.3333V12.6667C24 13.0349 23.7015 13.3333 23.3333 13.3333H20.1333C20.0597 13.3333 20 13.393 20 13.4667V18.5333C20 18.607 20.0597 18.6667 20.1333 18.6667H23.3333C23.7015 18.6667 24 18.9651 24 19.3333V20.6667C24 21.0349 23.7015 21.3333 23.3333 21.3333H18Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.playback_speed?(v(),$("button",mtt,[...e[67]||(e[67]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.14 25.1089C25.0171 25.2532 24.8356 25.3333 24.646 25.3333H22.8124C22.1084 25.3333 21.7734 24.1872 22.2745 23.6927C23.9161 22.0729 24.9336 19.822 24.9336 17.3333C24.9336 12.3997 20.9336 8.39973 16 8.39973C11.0664 8.39973 7.06641 12.3997 7.06641 17.3333C7.06641 19.822 8.08389 22.0729 9.72555 23.6927C10.2266 24.1872 9.89155 25.3333 9.18762 25.3333H7.35398C7.16436 25.3333 6.98294 25.2532 6.86001 25.1089C5.07703 23.015 4 20.2991 4 17.3333C4 10.7057 9.3724 5.33333 16 5.33333C22.6276 5.33333 28 10.7057 28 17.3333C28 20.2991 26.923 23.015 25.14 25.1089Z",fill:"currentColor"}),g("path",{d:"M21.1992 14.3399C21.4595 14.0796 21.4595 13.6575 21.1992 13.3971L20.2564 12.4543C19.996 12.194 19.5739 12.194 19.3136 12.4543L16.4492 15.3187C16.4185 15.3493 16.3749 15.3629 16.332 15.3568C16.2236 15.3414 16.1127 15.3334 16 15.3334C14.7113 15.3334 13.6667 16.378 13.6667 17.6667C13.6667 18.9554 14.7113 20 16 20C17.2887 20 18.3333 18.9554 18.3333 17.6667C18.3333 17.5464 18.3242 17.4283 18.3067 17.313C18.3001 17.2696 18.3136 17.2255 18.3446 17.1945L21.1992 14.3399Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.settings?(v(),$("button",gtt,[...e[68]||(e[68]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5722 5.33333C13.2429 5.33333 12.9629 5.57382 12.9132 5.89938L12.4063 9.21916C12.4 9.26058 12.3746 9.29655 12.3378 9.31672C12.2387 9.37118 12.1409 9.42779 12.0444 9.48648C12.0086 9.5083 11.9646 9.51242 11.9255 9.49718L8.79572 8.27692C8.48896 8.15732 8.14083 8.27958 7.9762 8.56472L5.5491 12.7686C5.38444 13.0538 5.45271 13.4165 5.70981 13.6223L8.33308 15.7225C8.3658 15.7487 8.38422 15.7887 8.38331 15.8306C8.38209 15.8867 8.38148 15.9429 8.38148 15.9993C8.38148 16.0558 8.3821 16.1121 8.38332 16.1684C8.38423 16.2102 8.36582 16.2503 8.33313 16.2765L5.7103 18.3778C5.45334 18.5836 5.38515 18.9462 5.54978 19.2314L7.97688 23.4352C8.14155 23.7205 8.48981 23.8427 8.79661 23.723L11.926 22.5016C11.9651 22.4864 12.009 22.4905 12.0449 22.5123C12.1412 22.5709 12.2388 22.6274 12.3378 22.6818C12.3745 22.7019 12.4 22.7379 12.4063 22.7793L12.9132 26.0993C12.9629 26.4249 13.2429 26.6654 13.5722 26.6654H18.4264C18.7556 26.6654 19.0356 26.425 19.0854 26.0995L19.5933 22.7801C19.5997 22.7386 19.6252 22.7027 19.6619 22.6825C19.7614 22.6279 19.8596 22.5711 19.9564 22.5121C19.9923 22.4903 20.0362 22.4862 20.0754 22.5015L23.2035 23.7223C23.5103 23.842 23.8585 23.7198 24.0232 23.4346L26.4503 19.2307C26.6149 18.9456 26.5467 18.583 26.2898 18.3771L23.6679 16.2766C23.6352 16.2504 23.6168 16.2104 23.6177 16.1685C23.619 16.1122 23.6196 16.0558 23.6196 15.9993C23.6196 15.9429 23.619 15.8866 23.6177 15.8305C23.6168 15.7886 23.6353 15.7486 23.668 15.7224L26.2903 13.623C26.5474 13.4172 26.6156 13.0544 26.451 12.7692L24.0239 8.56537C23.8592 8.28023 23.5111 8.15797 23.2043 8.27757L20.0758 9.49734C20.0367 9.51258 19.9927 9.50846 19.9569 9.48664C19.8599 9.42762 19.7616 9.37071 19.6618 9.31596C19.6251 9.2958 19.5997 9.25984 19.5933 9.21843L19.0854 5.89915C19.0356 5.57369 18.7556 5.33333 18.4264 5.33333H13.5722ZM16.0001 20.2854C18.3672 20.2854 20.2862 18.3664 20.2862 15.9993C20.2862 13.6322 18.3672 11.7132 16.0001 11.7132C13.6329 11.7132 11.714 13.6322 11.714 15.9993C11.714 18.3664 13.6329 20.2854 16.0001 20.2854Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.pip?(v(),$("button",vtt,[...e[69]||(e[69]=[g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16 15.3333C15.6318 15.3333 15.3333 15.6318 15.3333 16V20C15.3333 20.3682 15.6318 20.6667 16 20.6667H21.3333C21.7015 20.6667 22 20.3682 22 20V16C22 15.6318 21.7015 15.3333 21.3333 15.3333H16Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.33333 7.33334C5.33333 6.96515 5.63181 6.66667 5.99999 6.66667H26C26.3682 6.66667 26.6667 6.96515 26.6667 7.33334V24.6667C26.6667 25.0349 26.3682 25.3333 26 25.3333H5.99999C5.63181 25.3333 5.33333 25.0349 5.33333 24.6667V7.33334ZM7.99999 10C7.99999 9.63182 8.29847 9.33334 8.66666 9.33334H23.3333C23.7015 9.33334 24 9.63182 24 10V22C24 22.3682 23.7015 22.6667 23.3333 22.6667H8.66666C8.29847 22.6667 7.99999 22.3682 7.99999 22V10Z",fill:"currentColor"})],-1)])])):O("",!0),o.controls.fullscreen?(v(),$("button",_tt,[...e[70]||(e[70]=[g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.3299 7.26517C25.2958 6.929 25.0119 6.66666 24.6667 6.66666H19.3334C18.9652 6.66666 18.6667 6.96514 18.6667 7.33333V9.33333C18.6667 9.70152 18.9652 10 19.3334 10L21.8667 10C21.9403 10 22 10.0597 22 10.1333V12.6667C22 13.0349 22.2985 13.3333 22.6667 13.3333H24.6667C25.0349 13.3333 25.3334 13.0349 25.3334 12.6667V7.33333C25.3334 7.31032 25.3322 7.28758 25.3299 7.26517Z",fill:"currentColor"}),g("path",{d:"M22 21.8667C22 21.9403 21.9403 22 21.8667 22L19.3334 22C18.9652 22 18.6667 22.2985 18.6667 22.6667V24.6667C18.6667 25.0349 18.9652 25.3333 19.3334 25.3333L24.6667 25.3333C25.0349 25.3333 25.3334 25.0349 25.3334 24.6667V19.3333C25.3334 18.9651 25.0349 18.6667 24.6667 18.6667H22.6667C22.2985 18.6667 22 18.9651 22 19.3333V21.8667Z",fill:"currentColor"}),g("path",{d:"M12.6667 22H10.1334C10.0597 22 10 21.9403 10 21.8667V19.3333C10 18.9651 9.70154 18.6667 9.33335 18.6667H7.33335C6.96516 18.6667 6.66669 18.9651 6.66669 19.3333V24.6667C6.66669 25.0349 6.96516 25.3333 7.33335 25.3333H12.6667C13.0349 25.3333 13.3334 25.0349 13.3334 24.6667V22.6667C13.3334 22.2985 13.0349 22 12.6667 22Z",fill:"currentColor"}),g("path",{d:"M10 12.6667V10.1333C10 10.0597 10.0597 10 10.1334 10L12.6667 10C13.0349 10 13.3334 9.70152 13.3334 9.33333V7.33333C13.3334 6.96514 13.0349 6.66666 12.6667 6.66666H7.33335C6.96516 6.66666 6.66669 6.96514 6.66669 7.33333V12.6667C6.66669 13.0349 6.96516 13.3333 7.33335 13.3333H9.33335C9.70154 13.3333 10 13.0349 10 12.6667Z",fill:"currentColor"})],-1)])])):O("",!0)])):O("",!0)])):O("",!0)],2)],4)]),_:1}),_(r,{span:7,class:"player_settings_col"},{default:y(()=>[g("div",ytt,[g("div",btt,[g("span",null,x(t.$t("Skin")),1),_(l,{modelValue:o.localSettings.skin,"onUpdate:modelValue":e[1]||(e[1]=k=>o.localSettings.skin=k)},{default:y(()=>[_(a,{label:t.$t("Modern"),value:"modern"},null,8,["label"]),_(a,{label:t.$t("Classic"),value:"classic"},null,8,["label"]),_(a,{label:t.$t("Simple"),value:"simple"},null,8,["label"]),_(a,{label:t.$t("Floating"),value:"floating"},null,8,["label"]),_(a,{label:t.$t("Minimal"),value:"minimal"},null,8,["label"])]),_:1},8,["modelValue"])]),g("div",wtt,[g("label",null,x(t.$t("Brand Color")),1),_(c,{modelValue:o.localSettings.brandColor,"onUpdate:modelValue":e[2]||(e[2]=k=>o.localSettings.brandColor=k)},null,8,["modelValue"])]),g("div",ktt,[g("label",null,x(t.$t("Control Bar Color")),1),_(c,{modelValue:o.localSettings.controlBarColor,"onUpdate:modelValue":e[3]||(e[3]=k=>o.localSettings.controlBarColor=k)},null,8,["modelValue"])]),g("div",Ctt,[g("label",null,x(t.$t("Play Button Color")),1),_(c,{modelValue:o.localSettings.playButtonColor,"onUpdate:modelValue":e[4]||(e[4]=k=>o.localSettings.playButtonColor=k)},null,8,["modelValue"])]),g("div",xtt,[g("label",null,x(t.$t("Play Button Background Color")),1),_(c,{modelValue:o.localSettings.playButtonBgColor,"onUpdate:modelValue":e[5]||(e[5]=k=>o.localSettings.playButtonBgColor=k),"show-alpha":""},null,8,["modelValue"])]),o.localSettings.skin!=="minimal"?(v(),$(J,{key:0},[g("h4",null,x(t.$t("Controls")),1),o.isControlVisible("progress_bar")?(v(),$("div",Stt,[g("span",null,x(t.$t("Progress Bar")),1),_(u,{modelValue:o.localSettings.controls.progress_bar,"onUpdate:modelValue":e[6]||(e[6]=k=>o.localSettings.controls.progress_bar=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("play")?(v(),$("div",$tt,[g("span",null,x(t.$t("Play/Pause")),1),_(u,{modelValue:o.localSettings.controls.play,"onUpdate:modelValue":e[7]||(e[7]=k=>o.localSettings.controls.play=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("forward")?(v(),$("div",Att,[g("span",null,x(t.$t("Forward")),1),_(u,{modelValue:o.localSettings.controls.forward,"onUpdate:modelValue":e[8]||(e[8]=k=>o.localSettings.controls.forward=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("backward")?(v(),$("div",Ett,[g("span",null,x(t.$t("Backward")),1),_(u,{modelValue:o.localSettings.controls.backward,"onUpdate:modelValue":e[9]||(e[9]=k=>o.localSettings.controls.backward=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("volume")?(v(),$("div",Mtt,[g("span",null,x(t.$t("Volume")),1),_(u,{modelValue:o.localSettings.controls.volume,"onUpdate:modelValue":e[10]||(e[10]=k=>o.localSettings.controls.volume=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("current_time")?(v(),$("div",Ttt,[g("span",null,x(t.$t("Current Time")),1),_(u,{modelValue:o.localSettings.controls.current_time,"onUpdate:modelValue":e[11]||(e[11]=k=>o.localSettings.controls.current_time=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("playback_speed")?(v(),$("div",Ptt,[g("span",null,x(t.$t("Playback Speed")),1),_(u,{modelValue:o.localSettings.controls.playback_speed,"onUpdate:modelValue":e[12]||(e[12]=k=>o.localSettings.controls.playback_speed=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("settings")?(v(),$("div",Itt,[g("span",null,x(t.$t("Settings Menu")),1),_(u,{modelValue:o.localSettings.controls.settings,"onUpdate:modelValue":e[13]||(e[13]=k=>o.localSettings.controls.settings=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("fullscreen")?(v(),$("div",Ltt,[g("span",null,x(t.$t("Fullscreen")),1),_(u,{modelValue:o.localSettings.controls.fullscreen,"onUpdate:modelValue":e[14]||(e[14]=k=>o.localSettings.controls.fullscreen=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("pip")?(v(),$("div",Ott,[g("span",null,x(t.$t("Picture in Picture")),1),_(u,{modelValue:o.localSettings.controls.pip,"onUpdate:modelValue":e[15]||(e[15]=k=>o.localSettings.controls.pip=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("captions_toggle")?(v(),$("div",Dtt,[g("span",null,x(t.$t("Captions Toggle")),1),_(u,{modelValue:o.localSettings.controls.captions_toggle,"onUpdate:modelValue":e[16]||(e[16]=k=>o.localSettings.controls.captions_toggle=k)},null,8,["modelValue"])])):O("",!0)],64)):O("",!0),g("h4",null,x(t.$t("Behaviors")),1),o.localSettings.skin!=="minimal"?(v(),$("div",Rtt,[g("span",null,x(t.$t("Muted Autoplay")),1),_(u,{modelValue:o.localSettings.behaviors.muted_autoplay,"onUpdate:modelValue":e[17]||(e[17]=k=>o.localSettings.behaviors.muted_autoplay=k)},null,8,["modelValue"])])):O("",!0),g("div",Vtt,[g("span",null,x(t.$t("Save Play Position")),1),_(u,{modelValue:o.localSettings.behaviors.save_play_position,"onUpdate:modelValue":e[18]||(e[18]=k=>o.localSettings.behaviors.save_play_position=k)},null,8,["modelValue"])]),o.localSettings.skin!=="minimal"?(v(),$("div",Ftt,[g("span",null,x(t.$t("Hide Top Controls")),1),_(u,{modelValue:o.localSettings.behaviors.hide_top_controls,"onUpdate:modelValue":e[19]||(e[19]=k=>o.localSettings.behaviors.hide_top_controls=k)},null,8,["modelValue"])])):O("",!0),o.localSettings.skin!=="minimal"?(v(),$("div",Ntt,[g("span",null,x(t.$t("Hide Center Controls")),1),_(u,{modelValue:o.localSettings.behaviors.hide_center_controls,"onUpdate:modelValue":e[20]||(e[20]=k=>o.localSettings.behaviors.hide_center_controls=k)},null,8,["modelValue"])])):O("",!0),o.localSettings.skin!=="minimal"?(v(),$("div",Btt,[g("span",null,x(t.$t("Hide Bottom Controls")),1),_(u,{modelValue:o.localSettings.behaviors.hide_bottom_controls,"onUpdate:modelValue":e[21]||(e[21]=k=>o.localSettings.behaviors.hide_bottom_controls=k)},null,8,["modelValue"])])):O("",!0),g("div",ztt,[g("span",Htt,[N(x(t.$t("Load Strategy"))+" ",1),_(f,{effect:"dark",placement:"top","popper-class":"fp-load-strategy-tooltip","raw-content":!0,content:"<strong>"+t.$t("Visible")+":</strong> "+t.$t("Loads when scrolled into view")+"<br><strong>"+t.$t("Play")+":</strong> "+t.$t("Loads only on click")+"<br><strong>"+t.$t("Idle")+":</strong> "+t.$t("Loads during browser idle time")+"<br><strong>"+t.$t("Eager")+":</strong> "+t.$t("Loads immediately on page load")},{default:y(()=>[_(h,{class:"setting_row__info-icon"},{default:y(()=>[_(d)]),_:1})]),_:1},8,["content"])]),_(l,{modelValue:o.localSettings.behaviors.load_strategy,"onUpdate:modelValue":e[22]||(e[22]=k=>o.localSettings.behaviors.load_strategy=k),class:"setting_row__select"},{default:y(()=>[_(a,{value:"visible",label:t.$t("Visible")},null,8,["label"]),_(a,{value:"play",label:t.$t("Play")},null,8,["label"]),_(a,{value:"idle",label:t.$t("Idle")},null,8,["label"]),_(a,{value:"eager",label:t.$t("Eager")},null,8,["label"])]),_:1},8,["modelValue"])])])]),_:1})]),_:1}),_(p,{gutter:30},{default:y(()=>[_(r,{span:24,md:12},{default:y(()=>[_(m,{label:t.$t("Enable Video Upload"),class:"fcom_input_wrap",style:{"margin-bottom":"0"}},{default:y(()=>[_(u,{modelValue:o.localSettings.video_upload,"onUpdate:modelValue":e[23]||(e[23]=k=>o.localSettings.video_upload=k),"active-value":"yes","inactive-value":"no"},null,8,["modelValue"])]),_:1},8,["label"]),g("div",Utt,[g("p",null,x(t.$t("Allow space members to upload videos on post based on their permission.")),1)])]),_:1})]),_:1}),o.localSettings.video_upload==="yes"?(v(),D(p,{key:0,gutter:30,style:{"margin-top":"16px"}},{default:y(()=>[_(r,{span:24,style:{"margin-bottom":"4px"}},{default:y(()=>[g("label",jtt,x(t.$t("Who Can Upload Videos")),1)]),_:1}),_(r,{span:24},{default:y(()=>[_(w,{modelValue:o.localSettings.video_upload_role,"onUpdate:modelValue":e[24]||(e[24]=k=>o.localSettings.video_upload_role=k)},{default:y(()=>[_(b,{value:"admin",class:"fcom_radio"},{default:y(()=>[N(x(t.$t("Admins")),1)]),_:1}),_(b,{value:"admin_moderator",class:"fcom_radio"},{default:y(()=>[N(x(t.$t("Admins and Moderators")),1)]),_:1}),_(b,{value:"everyone",class:"fcom_radio"},{default:y(()=>[N(x(t.$t("Everyone")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})):O("",!0),_(p,{gutter:30},{default:y(()=>[_(r,{span:24},{default:y(()=>[_(m,{label:t.$t("Play Embedded Videos With FluentPlayer"),class:"fcom_input_wrap",style:{"margin-bottom":"0","margin-top":"20px"}},{default:y(()=>[_(u,{modelValue:o.localSettings.play_embedded_videos,"onUpdate:modelValue":e[25]||(e[25]=k=>o.localSettings.play_embedded_videos=k),"active-value":"yes","inactive-value":"no"},null,8,["modelValue"])]),_:1},8,["label"]),g("div",Wtt,[g("p",null,x(t.$t("FluentPlayer only supports videos from YouTube, Vimeo, HLS, DASH, and direct video uploads. The native player will be used for other video types.")),1)])]),_:1})]),_:1})],2)}const qtt=ce(yet,[["render",Ytt]]),Gtt={name:"FluentPlayerSettings",components:{FluentPlayerCustomization:qtt},data(){return{loading:!1,settings:null,saving:!1}},computed:{isNotEnabled(){var t;return((t=this.settings)==null?void 0:t.enable_fluent_player)!=="yes"}},methods:{getSettings(){this.loading=!0,this.$get("settings/fluent-player-settings").then(t=>{this.settings=t.settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveSettings(){this.saving=!0,this.$post("settings/fluent-player-settings",{settings:this.settings}).then(t=>{this.$notify.success(t.message),this.settings=t.settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings()}},Xtt={key:1},Ktt={class:"fcom_help_text"},Ztt={class:"fcom_help_text"},Jtt={class:"dialog_footer fcom_mt_20"};function Qtt(t,e,n,i,s,o){const r=Vt,a=tu,l=tn,c=B("FluentPlayerCustomization"),u=nn,d=ze,h=xt("loading");return s.loading?(v(),D(r,{key:0,animated:!0,rows:5})):s.settings?(v(),$("div",Xtt,[_(u,null,{default:y(()=>[_(l,{label:t.$t("Enable FluentPlayer"),class:"fcom_input_wrap",style:{"margin-bottom":"0"}},{default:y(()=>[_(a,{modelValue:s.settings.enable_fluent_player,"onUpdate:modelValue":e[0]||(e[0]=f=>s.settings.enable_fluent_player=f),"active-value":"yes","inactive-value":"no"},null,8,["modelValue"])]),_:1},8,["label"]),g("div",Ktt,[g("p",null,x(t.$t("FluentPlayer allows you to customize the look of the video player. Also, it gives you the ability to upload videos by your community members.")),1)]),_(l,{label:t.$t("Enable FluentPlayer Audio"),class:"fcom_input_wrap",style:{"margin-bottom":"0"}},{default:y(()=>[_(a,{modelValue:s.settings.enable_audio,"onUpdate:modelValue":e[1]||(e[1]=f=>s.settings.enable_audio=f),"active-value":"yes","inactive-value":"no",disabled:o.isNotEnabled},null,8,["modelValue","disabled"])]),_:1},8,["label"]),g("div",Ztt,[g("p",null,x(t.$t("Enable the Audio tab in the feed composer so members can upload audio files based on their upload permission.")),1)]),_(c,{modelValue:s.settings,"onUpdate:modelValue":e[2]||(e[2]=f=>s.settings=f)},null,8,["modelValue"])]),_:1}),g("div",Jtt,[Re((v(),D(d,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:y(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[h,s.saving]])])])):O("",!0)}const ent=ce(Gtt,[["render",Qtt]]),tnt={name:"CustomProfileFieldsConfig",components:{UpgradeToProModal:Qd,FluentDnD:Tr,Drawer:nu},props:["features"],data(){return{CloseBoldIcon:Xs(mR),config:null,showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1,showGroupEditor:!1,editingGroup:null,editingGroupIndex:null,showFieldEditor:!1,editingField:null,editingFieldSlug:null,collapsedGroups:[],openedFieldSlug:null,moveTargetGroup:null,multiselectOptionsList:[],isDirty:!1,fieldTypes:this.appVars.customProfileFieldTypes||[],privacyOptions:[{value:"public",label:this.$t("Public (Everyone)"),short:this.$t("Public"),tag:"success"},{value:"logged_in",label:this.$t("Logged-In Users"),short:this.$t("Logged In"),tag:"primary"},{value:"internal",label:this.$t("Admins Only"),short:this.$t("Admins"),tag:"warning"},{value:"private",label:this.$t("Owner & Admins"),short:this.$t("Private"),tag:"danger"}]}},watch:{config:{handler(){this.isDirty=!0},deep:!0},"features.custom_profile_fields"(){this.isDirty=!0},showSettings(t){t||(this.isDirty=!1)}},computed:{isOptionType(){return this.editingField&&["select","radio","multiselect"].includes(this.editingField.type)}},methods:{hasGroupFields(t){return this.getGroupFields(t).length>0},openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.fetching=!0,this.$get("admin/custom-profile-fields").then(t=>{this.config=t.config,this.$nextTick(()=>this.isDirty=!1)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1})},saveSettings(){const t=this.config.is_enabled!==this.features.custom_profile_fields;this.config.is_enabled=this.features.custom_profile_fields,this.saving=!0,this.$post("admin/custom-profile-fields",{groups:this.config.groups,fields:this.config.fields,is_enabled:this.config.is_enabled}).then(e=>{this.$notify.success(e.message),t&&(this.config.is_enabled==="yes"&&localStorage.setItem("fcom_cpf_reopen","1"),window.location.reload()),e.config&&(this.config=e.config),this.$nextTick(()=>this.isDirty=!1)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},privacyMeta(t){return this.privacyOptions.find(e=>e.value===t)||{short:t,tag:"info"}},getGroupFields(t){return this.config.fields.filter(e=>e.group===t)},getDefaultGroupSlug(){var e;const t=this.config.groups.find(n=>n.is_system);return t?t.slug:((e=this.config.groups[0])==null?void 0:e.slug)||"_additional_info"},openGroupEditor(t=null){this.editingGroupIndex=t,this.editingGroup=t!==null?{...this.config.groups[t]}:{label:"",slug:"",edit_description:""},this.showGroupEditor=!0},confirmGroup(){if(!this.editingGroup.label){this.$notify.error(this.$t("Group label is required"));return}this.editingGroupIndex!==null?this.config.groups[this.editingGroupIndex]=this.editingGroup:this.config.groups.push(this.editingGroup),this.showGroupEditor=!1,this.editingGroup=null,this.editingGroupIndex=null,this.saveSettings()},deleteGroup(t){const e=this.config.groups[t];if(e.is_system)return;const n=this.getGroupFields(e.slug).length;let i=this.$t("Are you sure you want to delete this group?");n&&(i+=" "+this.$t("Fields in this group will be moved to the default group.")),this.$confirm(i,this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{const s=this.getDefaultGroupSlug();this.config.fields.forEach(o=>{o.group===e.slug&&(o.group=s)}),this.config.groups.splice(t,1),this.saveSettings()}).catch(()=>{})},toggleGroup(t){this.collapsedGroups.includes(t)?this.collapsedGroups=this.collapsedGroups.filter(e=>e!==t):this.collapsedGroups.push(t)},openFieldEditor(t=null,e=null){if(t){const n=this.config.fields.find(i=>i.slug===t);if(!n)return;this.editingField={...n,options:n.type==="multiselect"?{...n.options||{}}:[...n.options||[]]},this.editingFieldSlug=t,this.multiselectOptionsList=n.type==="multiselect"&&n.options?Object.entries(n.options).map(([i,s])=>({key:i,label:s})):[]}else this.editingField={label:"",slug:"",type:"text",placeholder:"",options:[],is_required:!1,is_enabled:!0,privacy:"public",group:e||this.getDefaultGroupSlug()},this.editingFieldSlug=null,this.multiselectOptionsList=[];this.showFieldEditor=!0},confirmField(){var t;if(!this.editingField.label){this.$notify.error(this.$t("Label is required"));return}if(this.isOptionType){if(this.editingField.type==="multiselect"){if(!this.multiselectOptionsList.length){this.$notify.error(this.$t("At least one option is required for this field type"));return}const e={};this.multiselectOptionsList.forEach(n=>{n.key&&n.label&&(e[n.key]=n.label)}),this.editingField.options=e}else if(!((t=this.editingField.options)!=null&&t.length)){this.$notify.error(this.$t("At least one option is required for this field type"));return}}if(this.editingFieldSlug!==null){const e=this.config.fields.findIndex(n=>n.slug===this.editingFieldSlug);e!==-1&&(this.config.fields[e]=this.editingField)}else this.config.fields.push(this.editingField);this.showFieldEditor=!1,this.editingField=null,this.editingFieldSlug=null,this.saveSettings()},handleGroupAction(t,e){t==="delete"&&this.deleteGroup(e)},handleFieldAction(t,e){t==="move"?(this.moveTargetGroup=null,this.openedFieldSlug=e.slug):t==="delete"?this.deleteField(e.slug):t==="duplicate"&&this.duplicateField(e)},duplicateField(t){const e=JSON.parse(JSON.stringify(t));e.label=t.label+" "+this.$t("(Copy)"),e.slug="";const n=this.config.fields.findIndex(i=>i.slug===t.slug);n!==-1&&(this.config.fields.splice(n+1,0,e),this.saveSettings())},moveField(t,e){const n=this.config.fields.find(i=>i.slug===t);n&&(n.group=e,this.openedFieldSlug=null,this.moveTargetGroup=null,this.saveSettings())},deleteField(t){this.$confirm(this.$t("Are you sure you want to delete this field? Any saved data for this field will no longer be accessible."),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{const e=this.config.fields.findIndex(n=>n.slug===t);e!==-1&&this.config.fields.splice(e,1),this.saveSettings()}).catch(()=>{})},onFieldDrop(t,e){const n=this.config.fields.filter(s=>s.group!==e),i=[];this.config.groups.forEach(s=>{s.slug===e?i.push(...t.newItems):i.push(...n.filter(o=>o.group===s.slug))}),this.config.fields=i},onFieldCrossDrop({itemKey:t,sourceGroup:e,targetGroup:n}){const i=this.config.fields.find(s=>s.slug===t&&s.group===e);i&&(i.group=n,this.saveSettings())},onEmptyGroupDrop(t,e){const n=t.dataTransfer.getData("source-group"),i=t.dataTransfer.getData("text/plain");if(!n||!i||n===e)return;const s=this.config.fields.find(o=>o.slug===i&&o.group===n);s&&(s.group=e,this.saveSettings())},onTypeChange(){this.editingField.type==="multiselect"?(this.editingField.options={},this.multiselectOptionsList=[]):["select","radio"].includes(this.editingField.type)&&(Array.isArray(this.editingField.options)||(this.editingField.options=[]))}},mounted(){localStorage.getItem("fcom_cpf_reopen")&&(localStorage.removeItem("fcom_cpf_reopen"),this.openSettings())}},nnt={class:"fcom_storage_settings"},snt={key:0,class:"white_loaded"},int={key:1,class:"fcom_cpf_settings"},ont={class:"fcom_cpf_header"},rnt={key:0,style:{padding:"1rem"}},ant={key:1,class:"fcom_card_sections fcom_cpf_groups"},lnt={class:"fcom_section_primary_item"},cnt={class:"fcom_section_primary_item_title"},unt={class:"fcom_heading_item"},dnt={class:"fcom_space_counts"},hnt={class:"fcom_section_item_actions"},fnt={key:0,class:"fcom_section_items"},pnt={class:"fcom_heading_item"},mnt={key:0,style:{color:"var(--el-color-danger)"}},gnt={class:"fcom_section_item_actions"},vnt={style:{position:"relative"}},_nt={class:"fcom_action_field_popup"},ynt={class:"fcom_move_popup_close"},bnt=["onDrop"],wnt={key:2},knt={class:"dialog_header"},Cnt={class:"dialog_body"},xnt={class:"dialog_footer"},Snt={class:"dialog_header"},$nt={class:"dialog_body"},Ant={style:{display:"flex",gap:"8px","margin-bottom":"4px","font-size":"12px",color:"var(--fcom-text-off, #919399)",width:"100%"}},Ent={style:{flex:"1"}},Mnt={style:{flex:"1"}},Tnt={class:"dialog_footer"};function Pnt(t,e,n,i,s,o){const r=ze,a=Vt,l=qt,c=tn,u=we,d=qs,h=B("Plus"),f=B("MoreFilled"),p=Ar,m=Er,b=$r,w=tu,k=Zt,C=Wt,A=nn,S=B("CloseBold"),M=B("FluentDnD"),P=B("drawer"),T=ht,I=$s,L=E8,R=Li,V=ws,H=B("UpgradeToProModal"),F=xt("loading");return v(),$(J,null,[g("div",nnt,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=U=>o.openSettings())},{default:y(()=>[N(x(t.$t("Settings")),1)]),_:1})]),_(P,{modelValue:s.showSettings,"onUpdate:modelValue":e[9]||(e[9]=U=>s.showSettings=U),size:t.dialogWidth,title:t.$t("Custom Profile Fields Settings"),"append-to-body":!0,"close-on-click-modal":!0,"has-close-confirmation":s.isDirty,"close-confirmation-message":t.$t("You have unsaved changes. Are you sure you want to close this?"),"modal-class":"fcom_common_dialog",id:"fluent_comminity_body"},{default:y(()=>[s.fetching?(v(),$("div",snt,[_(a,{rows:5,animated:!0})])):s.config!==null?(v(),$("div",int,[_(A,{onSubmit:e[8]||(e[8]=Me(U=>t.doNothing(),["prevent"])),"label-position":"top"},{default:y(()=>[_(c,null,{default:y(()=>[_(l,{"true-value":"yes","false-value":"no",modelValue:n.features.custom_profile_fields,"onUpdate:modelValue":e[1]||(e[1]=U=>n.features.custom_profile_fields=U),label:t.$t("Enable Custom Profile Fields"),size:"large",class:"fcom_checkbox",onChange:e[2]||(e[2]=U=>{U==="yes"&&s.config.is_enabled!=="yes"&&!s.saving&&o.saveSettings()})},null,8,["modelValue","label"])]),_:1}),n.features.custom_profile_fields==="yes"?(v(),$(J,{key:0},[g("div",ont,[g("h3",null,x(t.$t("Field Groups")),1),_(r,{class:"fcom_primary_button",onClick:e[3]||(e[3]=U=>o.openGroupEditor())},{default:y(()=>[N(x(t.$t("Add Group")),1)]),_:1})]),s.config.groups.length?(v(),$("div",ant,[_(M,{items:s.config.groups,"row-key":"slug"},{item:y(({data:U,index:Y})=>[g("div",{class:q({fcom_collapsed_group:s.collapsedGroups.includes(U.slug)})},[g("div",lnt,[g("div",cnt,[e[28]||(e[28]=g("div",{class:"fcom_drag_handle"},"⋮⋮",-1)),g("div",unt,[g("h4",null,x(U.label),1),g("div",null,[o.getGroupFields(U.slug).length?(v(),D(r,{key:0,style:{"background-color":"var(--el-fill-color-light)"},class:"fcom_collapse_btn",onClick:z=>o.toggleGroup(U.slug),size:"small",text:""},{default:y(()=>[_(u,null,{default:y(()=>[...e[27]||(e[27]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("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"})],-1)])]),_:1}),g("span",dnt,x(t.$t("%s fields",o.getGroupFields(U.slug).length)),1)]),_:2},1032,["onClick"])):O("",!0),U.is_system?(v(),D(d,{key:1,size:"small",type:"info",style:{"margin-left":"6px"}},{default:y(()=>[N(x(t.$t("System")),1)]),_:1})):O("",!0),_(r,{"aria-label":t.$t("Add field"),style:{"background-color":"var(--el-fill-color-light)","margin-left":"5px"},size:"small",text:"",onClick:z=>o.openFieldEditor(null,U.slug)},{default:y(()=>[_(u,null,{default:y(()=>[_(h)]),_:1})]),_:1},8,["aria-label","onClick"])])])]),g("div",hnt,[_(r,{class:"fcom_secondary_button",onClick:z=>o.openGroupEditor(Y)},{default:y(()=>[N(x(t.$t("Edit Info")),1)]),_:1},8,["onClick"]),U.is_system?O("",!0):(v(),D(b,{key:0,trigger:"click",onCommand:z=>o.handleGroupAction(z,Y)},{dropdown:y(()=>[_(m,null,{default:y(()=>[_(p,{command:"delete"},{default:y(()=>[N(x(t.$t("Delete")),1)]),_:1})]),_:1})]),default:y(()=>[_(r,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu edit_action",size:"small",text:""},{default:y(()=>[_(u,null,{default:y(()=>[_(f)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"]))])]),s.collapsedGroups.includes(U.slug)?O("",!0):(v(),$("div",fnt,[o.hasGroupFields(U.slug)?(v(),D(M,{key:0,items:o.getGroupFields(U.slug),"row-key":"slug",group:U.slug,"item-class":"fcom_section_item",onDrop:z=>o.onFieldDrop(z,U.slug),onCrossDrop:o.onFieldCrossDrop},{item:y(({data:z})=>[g("div",{class:"fcom_section_item_title",style:Xe(z.is_enabled?"":"opacity: 0.5")},[e[29]||(e[29]=g("div",{class:"fcom_drag_handle"},"⋮⋮",-1)),g("p",pnt,[N(x(z.label)+" ",1),z.is_required?(v(),$("span",mnt,"*")):O("",!0),_(d,{size:"small",type:"info"},{default:y(()=>[N(x(z.type),1)]),_:2},1024),_(d,{size:"small",type:o.privacyMeta(z.privacy).tag},{default:y(()=>[N(x(o.privacyMeta(z.privacy).short),1)]),_:2},1032,["type"])])],4),g("div",gnt,[_(w,{modelValue:z.is_enabled,"onUpdate:modelValue":X=>z.is_enabled=X,size:"small",onChange:o.saveSettings},null,8,["modelValue","onUpdate:modelValue","onChange"]),_(r,{class:"fcom_secondary_button",size:"small",onClick:X=>o.openFieldEditor(z.slug)},{default:y(()=>[N(x(t.$t("Edit")),1)]),_:1},8,["onClick"]),g("div",vnt,[_(b,{trigger:"click",onCommand:X=>o.handleFieldAction(X,z)},{dropdown:y(()=>[_(m,{class:"fcom_cpf_field_dropdown"},{default:y(()=>[_(p,{command:"duplicate"},{default:y(()=>[N(x(t.$t("Duplicate")),1)]),_:1}),_(p,{command:"move"},{default:y(()=>[N(x(t.$t("Move")),1)]),_:1}),_(p,{command:"delete"},{default:y(()=>[N(x(t.$t("Delete")),1)]),_:1})]),_:1})]),default:y(()=>[_(r,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu edit_action",size:"small",text:""},{default:y(()=>[_(u,null,{default:y(()=>[_(f)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"]),Re(g("div",_nt,[_(A,{onSubmit:e[5]||(e[5]=Me(X=>t.doNothing(),["prevent"])),"label-position":"top"},{default:y(()=>[_(c,{label:t.$t("Move to a different Group")},{default:y(()=>[_(C,{placeholder:t.$t("Select Group"),modelValue:s.moveTargetGroup,"onUpdate:modelValue":e[4]||(e[4]=X=>s.moveTargetGroup=X)},{default:y(()=>[(v(!0),$(J,null,ye(s.config.groups.filter(X=>X.slug!==z.group),X=>(v(),D(k,{key:X.slug,label:X.label,value:X.slug},null,8,["label","value"]))),128))]),_:2},1032,["placeholder","modelValue"])]),_:2},1032,["label"]),_(r,{disabled:!s.moveTargetGroup,onClick:X=>o.moveField(z.slug,s.moveTargetGroup),class:"fcom_primary_button"},{default:y(()=>[N(x(t.$t("Move Field")),1)]),_:1},8,["disabled","onClick"])]),_:2},1024),g("div",ynt,[_(u,{onClick:e[6]||(e[6]=X=>s.openedFieldSlug=null)},{default:y(()=>[_(S)]),_:1})])],512),[[jt,s.openedFieldSlug===z.slug]])])])]),_:2},1032,["items","group","onDrop","onCrossDrop"])):(v(),$("div",{key:1,style:{padding:"10px 15px 10px 35px",color:"var(--fcom-text-off, #919399)","font-size":"13px"},onDragover:e[7]||(e[7]=Me(()=>{},["prevent"])),onDrop:Me(z=>o.onEmptyGroupDrop(z,U.slug),["prevent"])},x(t.$t("No fields in this group. Click + to add one.")),41,bnt))]))],2)]),_:1},8,["items"])])):(v(),$("div",rnt,[g("p",null,x(t.$t("No groups configured yet.")),1)]))],64)):O("",!0),_(c,null,{default:y(()=>[Re((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:y(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[F,s.saving]])]),_:1})]),_:1})])):(v(),$("div",wnt,[g("p",null,x(t.$t("Config could not be loaded")),1)]))]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"]),_(I,{"modal-class":"fcom_common_dialog fcom_cpf_dialog","append-to-body":!0,"close-on-click-modal":!1,modelValue:s.showGroupEditor,"onUpdate:modelValue":e[14]||(e[14]=U=>s.showGroupEditor=U),width:"40%"},{header:y(()=>[g("div",knt,[g("h4",null,x(s.editingGroupIndex!==null?t.$t("Edit Group"):t.$t("Add Group")),1)])]),footer:y(()=>[g("div",xnt,[_(r,{class:"fcom_secondary_button",onClick:e[13]||(e[13]=U=>s.showGroupEditor=!1)},{default:y(()=>[N(x(t.$t("Cancel")),1)]),_:1}),_(r,{class:"fcom_primary_button",onClick:o.confirmGroup},{default:y(()=>[N(x(s.editingGroupIndex!==null?t.$t("Update Group"):t.$t("Add Group")),1)]),_:1},8,["onClick"])])]),default:y(()=>[g("div",Cnt,[s.editingGroup?(v(),D(A,{key:0,onSubmit:e[12]||(e[12]=Me(U=>t.doNothing(),["prevent"])),"label-position":"top"},{default:y(()=>[_(c,{label:t.$t("Group Label")},{default:y(()=>[_(T,{modelValue:s.editingGroup.label,"onUpdate:modelValue":e[10]||(e[10]=U=>s.editingGroup.label=U),placeholder:t.$t("Group name"),disabled:s.editingGroup.is_system},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["label"]),_(c,{label:t.$t("Description (shown on edit form)")},{default:y(()=>[_(T,{modelValue:s.editingGroup.edit_description,"onUpdate:modelValue":e[11]||(e[11]=U=>s.editingGroup.edit_description=U),type:"textarea",rows:3,placeholder:t.$t("Optional description shown to users when editing their profile")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})):O("",!0)])]),_:1},8,["modelValue"]),_(I,{"modal-class":"fcom_common_dialog fcom_cpf_dialog","append-to-body":!0,"close-on-click-modal":!1,modelValue:s.showFieldEditor,"onUpdate:modelValue":e[25]||(e[25]=U=>s.showFieldEditor=U),width:"40%"},{header:y(()=>[g("div",Snt,[g("h4",null,x(s.editingFieldSlug!==null?t.$t("Edit Field"):t.$t("Add Field")),1)])]),footer:y(()=>[g("div",Tnt,[_(r,{class:"fcom_secondary_button",onClick:e[24]||(e[24]=U=>s.showFieldEditor=!1)},{default:y(()=>[N(x(t.$t("Cancel")),1)]),_:1}),_(r,{class:"fcom_primary_button",onClick:o.confirmField},{default:y(()=>[N(x(s.editingFieldSlug!==null?t.$t("Update Field"):t.$t("Add Field")),1)]),_:1},8,["onClick"])])]),default:y(()=>[g("div",$nt,[s.editingField?(v(),D(A,{key:0,onSubmit:e[23]||(e[23]=Me(U=>t.doNothing(),["prevent"])),"label-position":"top"},{default:y(()=>[_(c,{label:t.$t("Field Type")},{default:y(()=>[_(C,{modelValue:s.editingField.type,"onUpdate:modelValue":e[15]||(e[15]=U=>s.editingField.type=U),disabled:s.editingFieldSlug!==null,onChange:o.onTypeChange},{default:y(()=>[(v(!0),$(J,null,ye(s.fieldTypes,(U,Y)=>(v(),D(k,{key:Y,label:U,value:Y},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled","onChange"])]),_:1},8,["label"]),_(c,{label:t.$t("Label")},{default:y(()=>[_(T,{modelValue:s.editingField.label,"onUpdate:modelValue":e[16]||(e[16]=U=>s.editingField.label=U),placeholder:t.$t("Field Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(c,{label:t.$t("Placeholder")},{default:y(()=>[_(T,{modelValue:s.editingField.placeholder,"onUpdate:modelValue":e[17]||(e[17]=U=>s.editingField.placeholder=U),placeholder:t.$t("Placeholder text")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(c,{label:t.$t("Privacy")},{default:y(()=>[_(C,{modelValue:s.editingField.privacy,"onUpdate:modelValue":e[18]||(e[18]=U=>s.editingField.privacy=U)},{default:y(()=>[(v(!0),$(J,null,ye(s.privacyOptions,U=>(v(),D(k,{key:U.value,label:U.label,value:U.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(c,{label:t.$t("Group")},{default:y(()=>[_(C,{modelValue:s.editingField.group,"onUpdate:modelValue":e[19]||(e[19]=U=>s.editingField.group=U)},{default:y(()=>[(v(!0),$(J,null,ye(s.config.groups,U=>(v(),D(k,{key:U.slug,label:U.label,value:U.slug},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),o.isOptionType&&s.editingField.type!=="multiselect"?(v(),D(c,{key:0,label:t.$t("Options"),class:"fcom_question_options"},{default:y(()=>[(v(!0),$(J,null,ye(s.editingField.options,(U,Y)=>(v(),$("div",{key:Y,class:"fcom_question_option"},[_(T,{modelValue:s.editingField.options[Y],"onUpdate:modelValue":z=>s.editingField.options[Y]=z,type:"text"},null,8,["modelValue","onUpdate:modelValue"]),s.editingField.options.length>1?(v(),D(L,{key:0,type:"danger",title:t.$t("Remove"),icon:s.CloseBoldIcon,underline:!1,onClick:z=>s.editingField.options.splice(Y,1)},null,8,["title","icon","onClick"])):O("",!0)]))),128)),_(L,{type:"primary",underline:!1,onClick:e[20]||(e[20]=U=>s.editingField.options.push(`Option ${s.editingField.options.length+1}`))},{default:y(()=>[N(x("+ "+t.$t("Add new option")),1)]),_:1})]),_:1},8,["label"])):O("",!0),s.editingField.type==="multiselect"?(v(),D(c,{key:1,label:t.$t("Options (Key-Value)"),class:"fcom_question_options"},{default:y(()=>[g("div",Ant,[g("span",Ent,x(t.$t("Key")),1),g("span",Mnt,x(t.$t("Label")),1),e[30]||(e[30]=g("span",{style:{width:"32px"}},null,-1))]),(v(!0),$(J,null,ye(s.multiselectOptionsList,(U,Y)=>(v(),$("div",{key:Y,class:"fcom_question_option"},[_(T,{modelValue:U.key,"onUpdate:modelValue":z=>U.key=z,type:"text",placeholder:t.$t("Key")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),_(T,{modelValue:U.label,"onUpdate:modelValue":z=>U.label=z,type:"text",placeholder:t.$t("Label")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),s.multiselectOptionsList.length>1?(v(),D(L,{key:0,type:"danger",title:t.$t("Remove"),icon:s.CloseBoldIcon,underline:!1,onClick:z=>s.multiselectOptionsList.splice(Y,1)},null,8,["title","icon","onClick"])):O("",!0)]))),128)),_(L,{type:"primary",underline:!1,onClick:e[21]||(e[21]=U=>s.multiselectOptionsList.push({key:`option_${s.multiselectOptionsList.length+1}`,label:`Option ${s.multiselectOptionsList.length+1}`}))},{default:y(()=>[N(x("+ "+t.$t("Add new option")),1)]),_:1})]),_:1},8,["label"])):O("",!0),_(c,{label:t.$t("Required")},{default:y(()=>[_(V,{modelValue:s.editingField.is_required,"onUpdate:modelValue":e[22]||(e[22]=U=>s.editingField.is_required=U)},{default:y(()=>[_(R,{value:!0},{default:y(()=>[N(x(t.$t("Yes")),1)]),_:1}),_(R,{value:!1},{default:y(()=>[N(x(t.$t("No")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1})):O("",!0)])]),_:1},8,["modelValue"]),s.openUpgradeModal?(v(),D(H,{key:0,showModal:s.openUpgradeModal,onCloseModal:e[26]||(e[26]=U=>s.openUpgradeModal=!1),upgrade_module:"custom_profile_fields"},null,8,["showModal"])):O("",!0)],64)}const Int=ce(tnt,[["render",Pnt]]),Lnt={name:"PwaConfig",props:["features"],emits:["saveSettings"],data(){return{settings:null,defaultIcon:null,showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1}},components:{UpgradeToProModal:Qd,ImageUploader:Ll},methods:{openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.settings=null,this.fetching=!0,this.$get("admin/pwa-settings").then(t=>{this.settings=t.settings,this.defaultIcon=t.default_icon||null}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1})},saveSettings(){if(this.features.pwa_module!=="yes"){this.$emit("saveSettings",!0);return}this.savePwaSettings()},savePwaSettings(){if(!this.settings.app_name){this.$handleError(this.$t("App Name is required"));return}if(this.settings.icon_source==="custom"&&!this.settings.custom_icon){this.$handleError(this.$t("Please upload an app icon or use the default icon."));return}this.saving=!0,this.$post("admin/pwa-settings",{settings:this.settings}).then(t=>{t.settings&&(this.settings=t.settings),this.$notify.success(t.message),this.$emit("saveSettings",!0)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}}},Ont={class:"fcom_pwa_settings"},Dnt=["id"],Rnt={key:0,class:"white_loaded"},Vnt={key:1,class:"dialog_body"},Fnt={class:"fcom_help_text"},Nnt={class:"fcom_help_text"},Bnt={class:"fcom_help_text"},znt={class:"fcom_help_text"},Hnt={class:"fcom_image_uploader_wrapper"},Unt={class:"fcom_help_text"},jnt={class:"fcom_help_text"},Wnt={class:"fcom_help_text"},Ynt={class:"dialog_footer"},qnt={key:2};function Gnt(t,e,n,i,s,o){const r=ze,a=Vt,l=qt,c=tn,u=ht,d=eu,h=Li,f=ws,p=oa,m=bo,b=B("EditPen"),w=we,k=B("Delete"),C=B("ImageUploader"),A=nn,S=Fa,M=B("UpgradeToProModal"),P=xt("loading");return v(),$(J,null,[g("div",Ont,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=T=>o.openSettings())},{default:y(()=>[N(x(t.$t("Settings")),1)]),_:1})]),_(S,{"modal-class":"fcom_common_dialog","close-on-click-modal":!1,"append-to-body":!0,size:t.dialogWidth,modelValue:s.showSettings,"onUpdate:modelValue":e[11]||(e[11]=T=>s.showSettings=T),direction:"rtl"},{header:y(({titleId:T,titleClass:I})=>[g("h4",{id:T,class:q(I)},x(t.$t("Progressive Web App (PWA) Settings")),11,Dnt)]),default:y(()=>[s.fetching?(v(),$("div",Rnt,[_(a,{rows:5,animated:!0})])):s.settings?(v(),$("div",Vnt,[_(A,{onSubmit:e[10]||(e[10]=Me(T=>t.doNothing(),["prevent"])),"label-position":"top"},{default:y(()=>[_(c,null,{default:y(()=>[_(l,{modelValue:n.features.pwa_module,"onUpdate:modelValue":e[1]||(e[1]=T=>n.features.pwa_module=T),"true-value":"yes","false-value":"no",label:t.$t("Enable Progressive Web App (PWA)"),class:"fcom_checkbox"},null,8,["modelValue","label"])]),_:1}),n.features.pwa_module==="yes"?(v(),$(J,{key:0},[_(c,{label:t.$t("App Name")},{default:y(()=>[_(u,{modelValue:s.settings.app_name,"onUpdate:modelValue":e[2]||(e[2]=T=>s.settings.app_name=T),maxlength:60,placeholder:t.$t("Your community name")},null,8,["modelValue","placeholder"]),g("div",Fnt,[g("p",null,x(t.$t("Shown on the install dialog and splash screen.")),1)])]),_:1},8,["label"]),_(c,{label:t.$t("Short Name")},{default:y(()=>[_(u,{modelValue:s.settings.short_name,"onUpdate:modelValue":e[3]||(e[3]=T=>s.settings.short_name=T),maxlength:12,"show-word-limit":"",placeholder:t.$t("Home screen label")},null,8,["modelValue","placeholder"]),g("div",Nnt,[g("p",null,x(t.$t("Label under the home screen icon. Leave empty to use the App Name.")),1)])]),_:1},8,["label"]),_(c,{label:t.$t("Splash Screen Color")},{default:y(()=>[_(d,{modelValue:s.settings.background_color,"onUpdate:modelValue":e[4]||(e[4]=T=>s.settings.background_color=T)},null,8,["modelValue"]),g("div",Bnt,[g("p",null,x(t.$t("Background shown behind the app icon while the app is loading. Leave empty to match your portal background.")),1)])]),_:1},8,["label"]),_(c,{label:t.$t("App Icon")},{default:y(()=>[_(f,{modelValue:s.settings.icon_source,"onUpdate:modelValue":e[5]||(e[5]=T=>s.settings.icon_source=T)},{default:y(()=>[_(h,{value:"default"},{default:y(()=>[N(x(t.$t("Default (Site Icon)")),1)]),_:1}),_(h,{value:"custom"},{default:y(()=>[N(x(t.$t("Custom")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),s.settings.icon_source==="default"&&s.defaultIcon?(v(),D(c,{key:0},{default:y(()=>[s.defaultIcon.url?s.defaultIcon.is_square===!1?(v(),D(p,{key:1,type:"warning",closable:!1,"show-icon":""},{default:y(()=>[N(x(t.$t("Icon is %s, not square — the install option will not appear.",s.defaultIcon.sizes)),1)]),_:1})):(v(),$(J,{key:2},[_(m,{alt:t.$t("App Icon"),src:s.defaultIcon.url,style:{"max-width":"64px",height:"auto"}},null,8,["alt","src"]),g("div",znt,[g("p",null,x(t.$t("This is the icon members will install.")),1)])],64)):(v(),D(p,{key:0,type:"warning",closable:!1,"show-icon":""},{default:y(()=>[N(x(t.$t("No app icon found — the install option will not appear. Set a Site Icon or choose Custom.")),1)]),_:1}))]),_:1})):O("",!0),s.settings.icon_source==="custom"?(v(),D(c,{key:1},{default:y(()=>[s.settings.custom_icon?(v(),D(m,{key:0,alt:t.$t("App Icon"),src:s.settings.custom_icon,style:{"max-width":"100px",height:"auto"}},null,8,["alt","src"])):O("",!0),g("div",Hnt,[_(C,{isTextBtn:!1,removeIcon:!0,can_remove:!!s.settings.custom_icon,confirm_remove:!0,remove_label:t.$t("Remove App Icon"),additionalData:{resize:!1,disable_convert:"yes",skip_convert:"yes",max_width:512},onUploaded:e[6]||(e[6]=T=>{s.settings.custom_icon=T})},hs({remove:y(()=>[_(w,null,{default:y(()=>[_(k)]),_:1})]),_:2},[s.settings.custom_icon?{name:"trigger",fn:y(()=>[_(r,{class:"fcom_plain_button","aria-label":t.$t("Change App Icon")},{default:y(()=>[_(w,null,{default:y(()=>[_(b)]),_:1})]),_:1},8,["aria-label"])]),key:"0"}:void 0]),1032,["can_remove","remove_label"])]),g("div",Unt,[g("p",null,x(t.$t("Upload a square image. Anything larger than 512x512 is scaled down, because browsers reject oversized icons and the install option then never appears.")),1)])]),_:1})):O("",!0),_(c,null,{default:y(()=>[_(l,{modelValue:s.settings.install_entry,"onUpdate:modelValue":e[7]||(e[7]=T=>s.settings.install_entry=T),"true-value":"yes","false-value":"no",label:t.$t("Show Install App in portal menu (mobile only)"),class:"fcom_checkbox"},null,8,["modelValue","label"]),g("div",jnt,[g("p",null,x(t.$t("Adds an Install App button to the portal menu on mobile. It installs in one tap where supported, and shows step-by-step instructions on other browsers like Firefox and iOS.")),1)])]),_:1}),s.settings.install_entry==="yes"?(v(),D(c,{key:2},{default:y(()=>[_(l,{modelValue:s.settings.install_dismissible,"onUpdate:modelValue":e[8]||(e[8]=T=>s.settings.install_dismissible=T),"true-value":"yes","false-value":"no",label:t.$t("Allow members to hide the install button"),class:"fcom_checkbox"},null,8,["modelValue","label"]),g("div",Wnt,[g("p",null,x(t.$t("If allowed, members can dismiss the button and it stays hidden for 7 days.")),1)])]),_:1})):O("",!0),s.settings.install_entry==="yes"?(v(),D(c,{key:3,label:t.$t("Install Button Position")},{default:y(()=>[_(f,{modelValue:s.settings.install_position,"onUpdate:modelValue":e[9]||(e[9]=T=>s.settings.install_position=T)},{default:y(()=>[_(h,{value:"top"},{default:y(()=>[N(x(t.$t("Sidebar Top")),1)]),_:1}),_(h,{value:"bottom"},{default:y(()=>[N(x(t.$t("Sidebar Bottom")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0)],64)):O("",!0)]),_:1}),g("div",Ynt,[Re((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:y(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[P,s.saving]])])])):(v(),$("div",qnt,[g("p",null,x(t.$t("Config could not be loaded")),1)]))]),_:1},8,["size","modelValue"]),s.openUpgradeModal?(v(),D(M,{key:0,showModal:s.openUpgradeModal,onCloseModal:e[12]||(e[12]=T=>s.openUpgradeModal=!1),upgrade_module:"pwa_module"},null,8,["showModal"])):O("",!0)],64)}const Xnt=ce(Lnt,[["render",Gnt]]),Knt={name:"PushNotificationSettings",emits:["dirty-change"],data(){return{loading:!1,saving:!1,push_settings:null,push_available:!1,push_setup:{state:"",settings_url:"",can_install:!1,can_activate:!1,has_installer:!1,learn_more_url:""},installing:!1,initialState:null}},computed:{setupTrack(){const t=[{key:"install",name:this.isInactive?this.$t("Activate FluentNotify"):this.$t("Install FluentNotify"),note:this.isInactive?this.$t("Already installed, it just needs activating."):this.$t("The companion plugin that delivers push.")},{key:"enable",name:this.$t("Enable the push service"),note:this.$t("One switch inside FluentNotify.")},{key:"firebase",name:this.$t("Connect Firebase"),note:this.$t("The SDK values plus a service account.")},{key:"ready",name:this.$t("Ready to send"),note:this.$t("Choose what members get notified about.")}],e=this.currentStopIndex;return t.map((n,i)=>{let s="ahead";return i<e?s="done":i===e&&(s="current"),Object.assign({},n,{position:i+1,status:s})})},currentStopIndex(){const e={not_installed:0,inactive:0,disabled:1,incomplete:2}[this.push_setup.state];return e===void 0?1:e},isInactive(){return this.push_setup.state==="inactive"},setupAction(){return this.isInactive?this.push_setup.can_activate?"activate":"":this.push_setup.state==="not_installed"?this.push_setup.can_install?this.push_setup.has_installer?"install":"guide":"":this.push_setup.settings_url?"configure":""},isPushEnabled(){return this.push_settings&&this.push_settings.push_enabled==="yes"},placementOptions(){return[{value:"feed_sidebar",label:this.$t("Show the push notification prompt in the feed sidebar")},{value:"profile_sidebar",label:this.$t("Show the push notification prompt in the profile sidebar")},{value:"profile_notification_prefs",label:this.$t("Show the push notification prompt on the notification preferences page")},{value:"notification_popover",label:this.$t("Show the push notification prompt in the notifications dropdown")}]},isDirty(){return this.initialState?JSON.stringify(this.push_settings)!==this.initialState:!1}},watch:{isDirty(t){this.$emit("dirty-change",t)}},methods:{getSettings(){this.loading||(this.loading=!0,this.$get("admin/push-settings").then(t=>{this.push_settings=t.push_settings,this.push_available=!!t.push_available,t.push_setup&&(this.push_setup=t.push_setup),this.initialState=JSON.stringify(this.push_settings)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1}))},openFluentNotifySettings(){this.push_setup.settings_url&&window.open(this.push_setup.settings_url,"_blank","noopener")},installFluentNotify(){if(this.installing)return;const t=this.isInactive;this.installing=!0,this.$post("settings/install_plugin",{plugin:"fluent-notify"}).then(e=>{e.is_installed?(this.$notify.success(e.message),this.getSettings()):t?this.$notify.error(this.$t("Sorry, FluentNotify could not be activated")):this.$notify.error(this.$t("Sorry, FluentNotify could not be installed"))}).catch(e=>{this.$handleError(e)}).finally(()=>{this.installing=!1})},save(){!this.push_available||this.saving||(this.saving=!0,this.$post("admin/push-settings",{settings:this.push_settings}).then(t=>{this.initialState=JSON.stringify(this.push_settings),this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1}))}},mounted(){this.getSettings()}},Znt={key:1,class:"fluent-notify-settings"},Jnt={key:0,class:"fcom_push_setup"},Qnt={class:"fcom_push_track"},est={class:"fcom_push_track_rail"},tst={class:"fcom_push_track_node"},nst={key:0,"aria-hidden":"true"},sst={key:1},ist={class:"fcom_push_track_text"},ost={class:"fcom_push_track_name"},rst={class:"fcom_push_track_note"},ast={class:"fcom_push_setup_actions"},lst=["href"],cst={class:"fcom_push_setup_note"},ust={key:4,class:"fcom_push_setup_note"},dst={key:5,class:"fcom_push_setup_note"},hst={key:0,class:"fcom_help_text"},fst={class:"setting_sub_header"},pst={class:"setting_sub_header"},mst={key:2,class:"fluent-notify-settings"};function gst(t,e,n,i,s,o){const r=Vt,a=ze,l=qt,c=tn,u=nn,d=$8,h=o2;return s.loading?(v(),D(r,{key:0,animated:!0,rows:4})):s.push_settings?(v(),$("div",Znt,[s.push_available?(v(),$(J,{key:1},[_(u,{modelValue:s.push_settings,"onUpdate:modelValue":e[1]||(e[1]=f=>s.push_settings=f),"label-position":"top"},{default:y(()=>[_(c,null,{default:y(()=>[_(l,{"true-value":"yes","false-value":"no",modelValue:s.push_settings.push_enabled,"onUpdate:modelValue":e[0]||(e[0]=f=>s.push_settings.push_enabled=f),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Enable push notifications for this community")),1)]),_:1},8,["modelValue"]),o.isPushEnabled?O("",!0):(v(),$("div",hst,[g("p",null,x(t.$t("When off, this community sends no push notifications. FluentNotify keeps working for everything else.")),1)]))]),_:1})]),_:1},8,["modelValue"]),o.isPushEnabled?(v(),$(J,{key:0},[_(d),g("div",fst,[g("h3",null,x(t.$t("Default Member Preferences")),1),g("p",null,x(t.$t("These apply to members who have not set their own preference. A member who changes a setting keeps their choice.")),1)]),_(u,{modelValue:s.push_settings,"onUpdate:modelValue":e[6]||(e[6]=f=>s.push_settings=f),"label-position":"top"},{default:y(()=>[_(c,null,{default:y(()=>[_(l,{"true-value":"yes","false-value":"no",modelValue:s.push_settings.com_my_post_push,"onUpdate:modelValue":e[2]||(e[2]=f=>s.push_settings.com_my_post_push=f),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Notify when someone comments on their post")),1)]),_:1},8,["modelValue"])]),_:1}),_(c,null,{default:y(()=>[_(l,{"true-value":"yes","false-value":"no",modelValue:s.push_settings.reply_my_com_push,"onUpdate:modelValue":e[3]||(e[3]=f=>s.push_settings.reply_my_com_push=f),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Notify when someone replies to their comment")),1)]),_:1},8,["modelValue"])]),_:1}),_(c,null,{default:y(()=>[_(l,{"true-value":"yes","false-value":"no",modelValue:s.push_settings.mention_push,"onUpdate:modelValue":e[4]||(e[4]=f=>s.push_settings.mention_push=f),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Notify when someone mentions them")),1)]),_:1},8,["modelValue"])]),_:1}),_(c,null,{default:y(()=>[_(l,{"true-value":"yes","false-value":"no",modelValue:s.push_settings.co_com_push,"onUpdate:modelValue":e[5]||(e[5]=f=>s.push_settings.co_com_push=f),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Notify when someone also comments on a post they commented on")),1)]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["modelValue"]),_(d),g("div",pst,[g("h3",null,x(t.$t("Prompt Placements")),1)]),_(u,{modelValue:s.push_settings,"onUpdate:modelValue":e[8]||(e[8]=f=>s.push_settings=f),"label-position":"top"},{default:y(()=>[_(c,null,{default:y(()=>[_(h,{modelValue:s.push_settings.prompt_placements,"onUpdate:modelValue":e[7]||(e[7]=f=>s.push_settings.prompt_placements=f)},{default:y(()=>[(v(!0),$(J,null,ye(o.placementOptions,f=>(v(),D(l,{key:f.value,value:f.value,disabled:f.upcoming,class:"fcom_checkbox"},{default:y(()=>[N(x(f.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["modelValue"])],64)):O("",!0),_(a,{class:"fcom_primary_button",loading:s.saving,disabled:s.saving,onClick:o.save},{default:y(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["loading","disabled","onClick"])],64)):(v(),$("div",Jnt,[g("ol",Qnt,[(v(!0),$(J,null,ye(o.setupTrack,f=>(v(),$("li",{key:f.key,class:q("is_"+f.status)},[g("span",est,[g("span",tst,[f.status==="done"?(v(),$("span",nst,"✓")):(v(),$("span",sst,x(f.position),1))])]),g("span",ist,[g("span",ost,x(f.name),1),g("span",rst,x(f.note),1)])],2))),128))]),g("div",ast,[o.setupAction==="activate"?(v(),D(a,{key:0,class:"fcom_primary_button",loading:s.installing,disabled:s.installing,onClick:o.installFluentNotify},{default:y(()=>[N(x(t.$t("Activate FluentNotify")),1)]),_:1},8,["loading","disabled","onClick"])):o.setupAction==="install"?(v(),D(a,{key:1,class:"fcom_primary_button",loading:s.installing,disabled:s.installing,onClick:o.installFluentNotify},{default:y(()=>[N(x(t.$t("Install FluentNotify")),1)]),_:1},8,["loading","disabled","onClick"])):o.setupAction==="configure"?(v(),D(a,{key:2,class:"fcom_primary_button",onClick:o.openFluentNotifySettings},{default:y(()=>[N(x(t.$t("Open FluentNotify Settings")),1)]),_:1},8,["onClick"])):o.setupAction==="guide"?(v(),$(J,{key:3},[g("a",{href:s.push_setup.learn_more_url,target:"_blank",rel:"noopener",class:"el-button fcom_primary_button"},x(t.$t("Get FluentNotify")),9,lst),g("p",cst,x(t.$t("Download and install FluentNotify, then come back here to finish the setup.")),1)],64)):o.isInactive?(v(),$("p",ust,x(t.$t("Ask a site administrator to activate FluentNotify.")),1)):(v(),$("p",dst,x(t.$t("Ask a site administrator to install FluentNotify.")),1))])]))])):(v(),$("div",mst,[g("h3",null,x(t.$t("Sorry, the settings could not be loaded. Please reload the page and try again.")),1)]))}const vst=ce(Knt,[["render",gst]]),_st={name:"Features",components:{UserBadgesConfig:wQe,LeaderBoardConfig:JJe,StorageSettings:IJe,Layout:yi,AppLayout:bi,UpgradeToProModal:Qd,SocialMediaLinkConfig:NQe,MessagingSettings:cet,FollowingConfigView:_et,FluentPlayerSettings:ent,CustomProfileFieldsConfig:Int,PwaConfig:Xnt,PushNotificationSettings:vst,Drawer:nu},data(){return{features:null,addOns:{},loading:!1,installingSlug:"",openGiphyUpgradeModal:!1,openEmojiUpgradeModal:!1,showMessagingSettings:!1,showFluentPlayerSettings:!1,showNotifySettings:!1,notifySettingsDirty:!1}},watch:{showNotifySettings(t){t||(this.notifySettingsDirty=!1,this.getFeatures())}},methods:{saveFeatures(t=!0){if(this.features.giphy_module==="yes"&&aU(this.features.giphy_api_key)){this.$handleError(this.$t("Giphy API Key is required"));return}this.$post("settings/features",{features:this.features}).then(e=>{t&&(this.$notify.success(e.message||this.$t("Settings saved successfully")),location.reload())}).catch(e=>{this.$handleError(e)})},getFeatures(){this.loading=!0,this.$get("settings/features").then(t=>{this.features=t.features,this.addOns=t.addOns}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},hasGuidedSetup(t){return t==="fluent-notify"},installPlugin(t){this.installingSlug||(this.installingSlug=t,this.$post("settings/install_plugin",{plugin:t}).then(e=>{e.is_installed?this.$notify.success(e.message):this.$notify.error(this.$t("Sorry, the selected plugins could not be installed")),this.getFeatures()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.installingSlug=""}))}},mounted(){this.getFeatures(),this.changeTitle(this.$t("Features Settings"))}},yst={class:"settings_router"},bst={key:0,class:"white_loaded"},wst={key:1,style:{"margin-bottom":"30px"}},kst={class:"fhr_content_layout_body"},Cst={class:"setting_header"},xst={class:"fcom_advanced_features"},Sst={key:0,class:"setting_body"},$st={class:"setting_item"},Ast={class:"setting_field_placeholder"},Est={class:"title"},Mst={class:"info"},Tst={class:"settings_field_data"},Pst={class:"align-right"},Ist={class:"setting_item"},Lst={class:"setting_field_placeholder"},Ost={class:"title"},Dst={class:"info"},Rst={class:"settings_field_data"},Vst={class:"align-right"},Fst={class:"setting_item"},Nst={class:"setting_field_placeholder"},Bst={class:"title"},zst={class:"info"},Hst={class:"settings_field_data"},Ust={class:"align-right"},jst={class:"setting_item"},Wst={class:"setting_field_placeholder"},Yst={class:"title"},qst={class:"info"},Gst={class:"settings_field_data"},Xst={class:"align-right"},Kst={class:"fcom_module_popover_content"},Zst={class:"setting_item"},Jst={class:"setting_field_placeholder"},Qst={class:"title"},eit={class:"info"},tit={class:"settings_field_data"},nit={class:"align-right"},sit={key:0,class:"fcom_giphy_api",style:{"margin-bottom":"5px"}},iit={class:"fcom_module_popover_content"},oit={class:"setting_item"},rit={class:"setting_field_placeholder"},ait={class:"title"},lit={class:"info"},cit={class:"settings_field_data"},uit={class:"align-right"},dit={class:"fcom_module_popover_content"},hit={class:"setting_item"},fit={class:"setting_field_placeholder"},pit={class:"title"},mit={class:"info"},git={class:"settings_field_data"},vit={class:"align-right"},_it={class:"setting_item"},yit={class:"setting_field_placeholder"},bit={class:"title"},wit={class:"info"},kit={class:"settings_field_data"},Cit={class:"align-right"},xit={class:"setting_item"},Sit={class:"setting_field_placeholder"},$it={class:"title"},Ait={class:"info"},Eit={class:"settings_field_data"},Mit={class:"align-right"},Tit={class:"setting_item"},Pit={class:"setting_field_placeholder"},Iit={class:"title"},Lit={class:"info"},Oit={class:"settings_field_data"},Dit={class:"align-right"},Rit={class:"fhr_content_layout_body"},Vit={class:"setting_header"},Fit={class:"fcom_advanced_features"},Nit={key:0,class:"white_loaded"},Bit={key:1,class:"setting_body"},zit={class:"setting_field_placeholder"},Hit={class:"title recommend_plugin",style:{display:"flex","align-items":"flex-start"}},Uit={class:"avatar",style:{"margin-right":"15px"}},jit=["src"],Wit=["href"],Yit={class:"info"},qit={class:"settings_field_data"},Git={class:"align-right"},Xit=["href"],Kit={key:0,class:"dialog_body"},Zit={key:0,class:"dialog_body fluent_player_settings_body"};function Jit(t,e,n,i,s,o){const r=Vt,a=qs,l=B("FollowingConfigView"),c=B("LeaderBoardConfig"),u=B("UserBadgesConfig"),d=qt,h=ze,f=Yo,p=ht,m=B("UpgradeToProModal"),b=B("storage-settings"),w=B("SocialMediaLinkConfig"),k=B("CustomProfileFieldsConfig"),C=B("PwaConfig"),A=B("messaging-settings"),S=Fa,M=B("push-notification-settings"),P=B("drawer"),T=B("fluent-player-settings"),I=B("layout"),L=B("app-layout");return v(),D(L,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:y(()=>[_(I,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Advanced Features & Addons")},{default:y(()=>[g("div",yst,[s.loading?(v(),$("div",bst,[_(r,{rows:5,animated:!0}),e[15]||(e[15]=g("hr",null,null,-1)),_(r,{rows:7,animated:!0})])):(v(),$("div",wst,[g("div",kst,[g("div",Cst,[g("h2",null,x(t.$t("Advanced Features")),1)]),g("div",xst,[s.features?(v(),$("div",Sst,[g("div",$st,[g("div",Ast,[g("div",Est,[N(x(t.$t("Follower Module"))+" ",1),t.has_pro?(v(),$(J,{key:0},[s.features.followers_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:y(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.followers_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:y(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",Mst,x(t.$t("Let your community users to follow each other and filter posts by their followings.")),1)]),g("div",Tst,[g("div",Pst,[_(l,{features:s.features},null,8,["features"])])])]),g("div",Ist,[g("div",Lst,[g("div",Ost,[N(x(t.$t("Leaderboards Module"))+" ",1),t.has_pro?(v(),$(J,{key:0},[s.features.leader_board_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:y(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.leader_board_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:y(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",Dst,x(t.$t("__LEADERBOARD_DESC")),1)]),g("div",Rst,[g("div",Vst,[_(c,{onSaveSettings:o.saveFeatures,features:s.features},null,8,["onSaveSettings","features"])])])]),g("div",Fst,[g("div",Nst,[g("div",Bst,[N(x(t.$t("User Badges"))+" ",1),t.has_pro?(v(),$(J,{key:0},[s.features.user_badge==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:y(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.user_badge==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:y(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",zst,x(t.$t("__USER_BADGE_DESC")),1)]),g("div",Hst,[g("div",Ust,[_(u,{onSaveSettings:o.saveFeatures,features:s.features},null,8,["onSaveSettings","features"])])])]),g("div",jst,[g("div",Wst,[g("div",Yst,[N(x(t.$t("Course Module"))+" ",1),s.features.course_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:y(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.course_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:y(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)]),g("div",qst,x(t.$t("__COURSE_STRUCTURED_LESSONS")),1)]),g("div",Gst,[g("div",Xst,[_(f,{persistent:!1,placement:"bottom",title:t.$t("Course Module Settings"),width:400,trigger:"click"},{reference:y(()=>[_(h,{size:"default",class:"fcom_secondary_button"},{default:y(()=>[N(x(t.$t("Settings")),1)]),_:1})]),default:y(()=>[g("div",Kst,[_(d,{modelValue:s.features.course_module,"onUpdate:modelValue":e[0]||(e[0]=R=>s.features.course_module=R),"true-value":"yes","false-value":"no",label:t.$t("Enable Course Module"),size:"large",class:"fcom_checkbox"},null,8,["modelValue","label"]),_(h,{class:"fcom_primary_button",size:"default",onClick:o.saveFeatures},{default:y(()=>[N(x(t.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])])])]),g("div",Zst,[g("div",Jst,[g("div",Qst,[N(x(t.$t("Giphy Module"))+" ",1),t.has_pro?(v(),$(J,{key:0},[s.features.giphy_module==="no"?(v(),D(a,{key:0,type:"info",size:"small",effect:"dark"},{default:y(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.giphy_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:y(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",eit,x(t.$t("Unlock potential by using Giphy when creating a new article, post, or comment")),1)]),g("div",tit,[g("div",nit,[s.openGiphyUpgradeModal?O("",!0):(v(),D(f,{key:0,persistent:!1,placement:"bottom",title:t.$t("Giphy Module Settings"),width:400,trigger:"click"},{reference:y(()=>[_(h,{size:"default",class:"fcom_secondary_button",onClick:e[3]||(e[3]=R=>!t.has_pro&&(s.openGiphyUpgradeModal=!0))},{default:y(()=>[N(x(t.$t("Settings")),1)]),_:1})]),default:y(()=>[s.features.giphy_module==="yes"?(v(),$("div",sit,[_(p,{modelValue:s.features.giphy_api_key,"onUpdate:modelValue":e[1]||(e[1]=R=>s.features.giphy_api_key=R),placeholder:t.$t("Giphy API Key")},null,8,["modelValue","placeholder"])])):O("",!0),g("div",iit,[_(d,{"true-value":"yes","false-value":"no",modelValue:s.features.giphy_module,"onUpdate:modelValue":e[2]||(e[2]=R=>s.features.giphy_module=R),label:t.$t("Enable Giphy Module"),size:"large",class:"fcom_checkbox"},null,8,["modelValue","label"]),_(h,{class:"fcom_primary_button",size:"default",onClick:o.saveFeatures},{default:y(()=>[N(x(t.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])),s.openGiphyUpgradeModal?(v(),D(m,{key:1,showModal:s.openGiphyUpgradeModal,onCloseModal:e[4]||(e[4]=R=>s.openGiphyUpgradeModal=!1),upgrade_module:"giphy_module"},null,8,["showModal"])):O("",!0)])])]),g("div",oit,[g("div",rit,[g("div",ait,[N(x(t.$t("Emoji Module"))+" ",1),t.has_pro?(v(),$(J,{key:0},[s.features.emoji_module==="no"?(v(),D(a,{key:0,type:"info",size:"small",effect:"dark"},{default:y(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.emoji_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:y(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",lit,x(t.$t("__EMOJIS_DESC")),1)]),g("div",cit,[g("div",uit,[s.openEmojiUpgradeModal?O("",!0):(v(),D(f,{key:0,persistent:!1,placement:"bottom",title:t.$t("Emoji Settings"),width:400,trigger:"click"},{reference:y(()=>[_(h,{size:"default",class:"fcom_secondary_button",onClick:e[6]||(e[6]=R=>!t.has_pro&&(s.openEmojiUpgradeModal=!0))},{default:y(()=>[N(x(t.$t("Settings")),1)]),_:1})]),default:y(()=>[g("div",dit,[_(d,{"true-value":"yes","false-value":"no",modelValue:s.features.emoji_module,"onUpdate:modelValue":e[5]||(e[5]=R=>s.features.emoji_module=R),label:t.$t("Enable Emoji"),size:"large",class:"fcom_checkbox"},null,8,["modelValue","label"]),_(h,{class:"fcom_primary_button",size:"default",onClick:o.saveFeatures},{default:y(()=>[N(x(t.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])),s.openEmojiUpgradeModal?(v(),D(m,{key:1,showModal:s.openEmojiUpgradeModal,onCloseModal:e[7]||(e[7]=R=>s.openEmojiUpgradeModal=!1),upgrade_module:"emoji_module"},null,8,["showModal"])):O("",!0)])])]),g("div",hit,[g("div",fit,[g("div",pit,[N(x(t.$t("Media Module"))+" ",1),s.features.cloud_storage==="yes"?(v(),D(a,{key:0,type:"success",size:"small",effect:"light"},{default:y(()=>[N(x(t.$t("Enabled")),1)]),_:1})):s.features.cloud_storage==="no"?(v(),D(a,{key:1,type:"info",size:"small"},{default:y(()=>[N(x(t.$t("Local")),1)]),_:1})):O("",!0)]),g("div",mit,x(t.$t("__CLOUD_STORAGE_DESC")),1)]),g("div",git,[g("div",vit,[_(b,{features:s.features},null,8,["features"])])])]),g("div",_it,[g("div",yit,[g("div",bit,x(t.$t("Profile Social Media Links")),1),g("div",wit,x(t.$t("Enable/Disable Social Media Links for profiles")),1)]),g("div",kit,[g("div",Cit,[_(w)])])]),g("div",xit,[g("div",Sit,[g("div",$it,[N(x(t.$t("Custom Profile Fields"))+" ",1),t.has_pro?(v(),$(J,{key:0},[s.features.custom_profile_fields==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:y(()=>[N(x(t.$t("Disabled")),1)]),_:1})):(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:y(()=>[N(x(t.$t("Enabled")),1)]),_:1}))],64)):O("",!0)]),g("div",Ait,x(t.$t("Add custom fields to member profiles like Gender, DOB, Designation, Blood Group and more.")),1)]),g("div",Eit,[g("div",Mit,[_(k,{features:s.features},null,8,["features"])])])]),g("div",Tit,[g("div",Pit,[g("div",Iit,[N(x(t.$t("Progressive Web App (PWA)"))+" ",1),t.has_pro?(v(),$(J,{key:0},[s.features.pwa_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:y(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.pwa_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:y(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",Lit,x(t.$t("Let members install your community as an app on their phone with your own name, icon and colors.")),1)]),g("div",Oit,[g("div",Dit,[_(C,{onSaveSettings:o.saveFeatures,features:s.features},null,8,["onSaveSettings","features"])])])])])):O("",!0)])])])),g("div",Rit,[g("div",Vit,[g("h2",null,x(t.$t("Recommended Plugins and Addons")),1)]),g("div",Fit,[s.loading?(v(),$("div",Nit,[_(r,{rows:6,animated:!0})])):s.features?(v(),$("div",Bit,[(v(!0),$(J,null,ye(s.addOns,(R,V)=>(v(),$("div",{key:V,class:"setting_item"},[g("div",zit,[g("div",Hit,[g("div",Uit,[g("img",{alt:"",src:R.logo,style:{width:"60px"}},null,8,jit)]),g("div",null,[g("a",{target:"_blank",href:R.learn_more_url},x(R.title),9,Wit),R.is_installed?(v(),D(a,{key:0,type:"success",size:"small",effect:"light",style:{"margin-left":"8px"}},{default:y(()=>[N(x(t.$t("Installed")),1)]),_:1})):O("",!0),g("div",Yit,x(R.description),1)])])]),g("div",qit,[g("div",Git,[!R.is_installed&&!o.hasGuidedSetup(V)?(v(),D(h,{key:0,class:"fcom_secondary_button",onClick:H=>o.installPlugin(V),loading:s.installingSlug===V,disabled:!!s.installingSlug&&s.installingSlug!==V},{default:y(()=>[N(x(R.action_text),1)]),_:2},1032,["onClick","loading","disabled"])):O("",!0),V==="fluent-messaging"?(v(),D(h,{key:1,onClick:e[8]||(e[8]=H=>s.showMessagingSettings=!0),class:"fcom_secondary_button"},{default:y(()=>[N(x(t.$t("Messaging Settings")),1)]),_:1})):o.hasGuidedSetup(V)?(v(),D(h,{key:2,onClick:e[9]||(e[9]=H=>s.showNotifySettings=!0),class:"fcom_secondary_button"},{default:y(()=>[N(x(R.is_installed?t.$t("View Settings"):t.$t("Set up FluentNotify")),1)]),_:2},1024)):V==="fluent-player"&&R.is_installed?(v(),D(h,{key:3,onClick:e[10]||(e[10]=H=>s.showFluentPlayerSettings=!0),class:"fcom_secondary_button"},{default:y(()=>[N(x(t.$t("Player Settings")),1)]),_:1})):R.settings_url?(v(),$("a",{key:4,href:R.settings_url,class:"el-button el-button--default fcom_secondary_button"},x(t.$t("View Settings")),9,Xit)):O("",!0)])])]))),128))])):O("",!0)])])]),_(S,{"modal-class":"fcom_common_dialog fcom_upgrade_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,size:t.dialogWidth,modelValue:s.showMessagingSettings,"onUpdate:modelValue":e[11]||(e[11]=R=>s.showMessagingSettings=R),direction:"rtl"},{header:y(({close:R})=>[g("h4",null,x(t.$t("Messaging Settings")),1)]),default:y(()=>[s.showMessagingSettings?(v(),$("div",Kit,[_(A)])):O("",!0)]),_:1},8,["size","modelValue"]),_(P,{modelValue:s.showNotifySettings,"onUpdate:modelValue":e[13]||(e[13]=R=>s.showNotifySettings=R),title:t.$t("Push Notification Settings"),size:t.drawerWidth,"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"has-close-confirmation":s.notifySettingsDirty,"close-confirmation-message":t.$t("You have unsaved changes. Are you sure you want to close?"),"modal-class":"fcom_common_dialog fcom_upgrade_dialog","body-class":"dialog_body",id:"fluent_notify_settings_drawer"},{default:y(()=>[_(M,{onDirtyChange:e[12]||(e[12]=R=>s.notifySettingsDirty=R)})]),_:1},8,["modelValue","title","size","has-close-confirmation","close-confirmation-message"]),_(S,{"modal-class":"fcom_common_dialog fcom_upgrade_dialog",id:"fluent_player_settings_drawer","close-on-click-modal":!1,"append-to-body":!0,size:"900px",modelValue:s.showFluentPlayerSettings,"onUpdate:modelValue":e[14]||(e[14]=R=>s.showFluentPlayerSettings=R),direction:"rtl"},{header:y(()=>[g("h4",null,x(t.$t("FluentPlayer Settings")),1)]),default:y(()=>[s.showFluentPlayerSettings?(v(),$("div",Zit,[_(T)])):O("",!0)]),_:1},8,["modelValue"])]),_:1},8,["title"])]),_:1})}const Qit=ce(_st,[["render",Jit]]),eot={name:"FComColorPicker",components:{InfoFilled:wl},props:["modelValue","label","help_msg"],emits:["update:modelValue","change"],data(){return{color:this.modelValue}},watch:{color(t){this.$emit("update:modelValue",t),this.$emit("change",t)}},methods:{showColorPicker(){this.$refs.colorPicker.show()}}},tot={class:"fcom_color_item"};function not(t,e,n,i,s,o){const r=eu,a=B("InfoFilled"),l=we,c=Ss;return v(),$("div",tot,[_(r,{predefine:t.appVars.suggestedColors,ref:"colorPicker",onActiveChange:e[0]||(e[0]=u=>{s.color=u}),modelValue:s.color,"onUpdate:modelValue":e[1]||(e[1]=u=>s.color=u)},null,8,["predefine","modelValue"]),g("label",{style:{cursor:"pointer"},class:"fcom_color_label",onClick:e[2]||(e[2]=(...u)=>o.showColorPicker&&o.showColorPicker(...u))},x(n.label),1),n.help_msg?(v(),D(c,{key:0,content:n.help_msg,placement:"right"},{default:y(()=>[_(l,{class:"fcom_tip"},{default:y(()=>[_(a)]),_:1})]),_:1},8,["content"])):O("",!0)])}const sot=ce(eot,[["render",not]]),iot={name:"AuthMeta",components:{BgImageUpload:Tp,CrepeEditor:uu,FComColorPicker:sot},props:["currentTab","settings","savingCount"],data(){return{editing:!1,editTab:"content",isDirty:!1,editingField:null,formField:"terms"}},watch:{currentTab(){this.editTab="content",this.editing=!1,this.editingField=null,this.isDirty=!1},savingCount(){this.editing=!1,this.editingField=null,this.isDirty=!1},editingField(){this.editTab="content"},"editingField.description"(t,e){t&&e&&t!==e&&!this.isDirty&&(this.isDirty=!0)}},computed:{getLabel(){return t=>({banner:this.$t("Banner"),form:this.$t("Form")})[t]||this.$t("Banner")},getFieldIcon(){return t=>({banner:"Picture",form:"Memo",fields:"Tickets"})[t.type]||"Picture"},sortedFields(){return Object.values(this.settings).sort((t,e)=>t.position==="left"?-1:e.position==="left"?1:0)},isBannerField(){return this.editingField.type=="banner"},isFormField(){return this.editingField.type=="form"}},methods:{toggleHidden(t){t.hidden=!t.hidden},updateField(t){this.editing=!0,this.editingField=t},backToFields(){this.editing=!1,this.editingField=null,this.isDirty=!1,this.editTab="content"},togglePosition(){var e,n;const t=(e=this.settings.banner)==null?void 0:e.position;this.settings.banner.position=(n=this.settings.form)==null?void 0:n.position,this.settings.form.position=t}}},oot={key:0,class:"fcom_lockscreen_meta"},rot={class:"fcom_meta_section lockscreen_meta"},aot={key:0,class:"fcom_description"},lot={key:1,class:"fcom_description"},cot={class:"fcom_meta_section lockscreen_meta"},uot={key:0,class:"fcom_meta_label"},dot={key:1,class:"fcom_meta_label"},hot={class:"fcom_meta_content"},fot={class:"fcom_meta_block"},pot={class:"fcom_block_label"},mot={class:"fcom_meta_sorting"},got={class:"fcom_block_action"},vot={key:1,class:"fcom_lockscreen_meta"},_ot={class:"fcom_edit_title"},yot={class:"fcom_edit_content"},bot={key:0,class:"fcom_help_text"},wot={key:0,class:"fcom_help_text"};function kot(t,e,n,i,s,o){const r=we,a=B("Top"),l=B("Bottom"),c=B("EditPen"),u=B("Hide"),d=B("View"),h=B("Back"),f=B("BgImageUpload"),p=tn,m=ht,b=B("crepe-editor"),w=nn,k=h2,C=B("FComColorPicker"),A=Li,S=ws,M=tu,P=LV,T=IV,I=d2;return s.editing?(v(),$("div",vot,[g("div",_ot,[_(r,{onClick:o.backToFields},{default:y(()=>[_(h)]),_:1},8,["onClick"]),g("p",null,x(s.editingField.label),1)]),g("div",yot,[o.isBannerField||o.isFormField?(v(),D(I,{key:0,modelValue:s.editTab,"onUpdate:modelValue":e[18]||(e[18]=L=>s.editTab=L)},{default:y(()=>[_(k,{label:t.$t("Content"),name:"content"},{default:y(()=>[_(w,{onSubmit:e[4]||(e[4]=Me(L=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:y(()=>[o.isBannerField?(v(),D(p,{key:0,label:t.$t("Logo"),class:"fcom_bg_image"},{default:y(()=>[_(f,{modelValue:s.editingField.logo,"onUpdate:modelValue":e[0]||(e[0]=L=>s.editingField.logo=L),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"])):O("",!0),_(p,{label:t.$t("Title")},{default:y(()=>[_(m,{modelValue:s.editingField.title,"onUpdate:modelValue":e[1]||(e[1]=L=>s.editingField.title=L),placeholder:t.$t("Title")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(p,{label:t.$t("Description")},{default:y(()=>[_(b,{modelValue:s.editingField.description,"onUpdate:modelValue":e[2]||(e[2]=L=>s.editingField.description=L)},null,8,["modelValue"]),s.isDirty?(v(),$("span",bot,x(t.$t("Please save the changes to update the view")),1)):O("",!0)]),_:1},8,["label"]),o.isFormField?(v(),D(p,{key:1,label:t.$t("Button Label")},{default:y(()=>[_(m,{modelValue:s.editingField.button_label,"onUpdate:modelValue":e[3]||(e[3]=L=>s.editingField.button_label=L),placeholder:t.$t("Button Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):O("",!0)]),_:1})]),_:1},8,["label"]),o.isBannerField?(v(),D(k,{key:0,label:t.$t("Design"),name:"design"},{default:y(()=>[_(w,{onSubmit:e[11]||(e[11]=Me(L=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:y(()=>[_(p,{label:t.$t("Background Image"),class:"fcom_bg_image"},{default:y(()=>[_(f,{modelValue:s.editingField.background_image,"onUpdate:modelValue":e[5]||(e[5]=L=>s.editingField.background_image=L),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"]),_(C,{help_msg:t.$t("The main background color of the form"),label:t.$t("Background Color"),modelValue:s.editingField.background_color,"onUpdate:modelValue":e[6]||(e[6]=L=>s.editingField.background_color=L)},null,8,["help_msg","label","modelValue"]),_(C,{help_msg:t.$t("The title color of the form"),label:t.$t("Title Color"),modelValue:s.editingField.title_color,"onUpdate:modelValue":e[7]||(e[7]=L=>s.editingField.title_color=L)},null,8,["help_msg","label","modelValue"]),_(C,{help_msg:t.$t("The text color of the form"),label:t.$t("Text Color"),modelValue:s.editingField.text_color,"onUpdate:modelValue":e[8]||(e[8]=L=>s.editingField.text_color=L)},null,8,["help_msg","label","modelValue"]),o.isFormField?(v(),D(C,{key:0,help_msg:t.$t("The button text color of the form"),label:t.$t("Button Text Color"),modelValue:s.editingField.button_label_color,"onUpdate:modelValue":e[9]||(e[9]=L=>s.editingField.button_label_color=L)},null,8,["help_msg","label","modelValue"])):O("",!0),o.isFormField?(v(),D(C,{key:1,help_msg:t.$t("The button background color of the form"),label:t.$t("Button Background"),modelValue:s.editingField.button_color,"onUpdate:modelValue":e[10]||(e[10]=L=>s.editingField.button_color=L)},null,8,["help_msg","label","modelValue"])):O("",!0)]),_:1})]),_:1},8,["label"])):O("",!0),o.isFormField&&s.editingField.fields.terms?(v(),D(k,{key:1,label:t.$t("Fields"),name:"fields"},{default:y(()=>[_(T,{modelValue:s.formField,"onUpdate:modelValue":e[17]||(e[17]=L=>s.formField=L),accordion:""},{default:y(()=>[_(P,{title:t.$t("Terms"),name:"terms"},{default:y(()=>[_(w,{onSubmit:e[15]||(e[15]=Me(L=>t.doNothing(),["prevent"])),onInput:e[16]||(e[16]=L=>s.isDirty=!0),"label-position":"top",class:"fcom_form_container"},{default:y(()=>[_(p,{label:t.$t("Label")},{default:y(()=>[_(b,{modelValue:s.editingField.fields.terms.label,"onUpdate:modelValue":e[12]||(e[12]=L=>s.editingField.fields.terms.label=L)},null,8,["modelValue"]),s.isDirty?(v(),$("span",wot,x(t.$t("Please save the changes to update the view")),1)):O("",!0)]),_:1},8,["label"]),_(p,{label:t.$t("Required")},{default:y(()=>[_(S,{modelValue:s.editingField.fields.terms.required,"onUpdate:modelValue":e[13]||(e[13]=L=>s.editingField.fields.terms.required=L)},{default:y(()=>[_(A,{value:!0},{default:y(()=>[N(x(t.$t("Yes")),1)]),_:1}),_(A,{value:!1},{default:y(()=>[N(x(t.$t("No")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(p,{label:t.$t("Disabled")},{default:y(()=>[_(M,{modelValue:s.editingField.fields.terms.disabled,"onUpdate:modelValue":e[14]||(e[14]=L=>s.editingField.fields.terms.disabled=L)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1},8,["title"])]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0)]),_:1},8,["modelValue"])):O("",!0)])])):(v(),$("div",oot,[g("div",rot,[n.currentTab=="login"?(v(),$("div",aot,[g("p",null,x(t.$t("Configure the appearance and behavior of your login form.")),1)])):O("",!0),n.currentTab=="signup"?(v(),$("div",lot,[g("p",null,x(t.$t("Configure the appearance and behavior of your signup form.")),1)])):O("",!0)]),g("div",cot,[n.currentTab=="login"?(v(),$("div",uot,x(t.$t("Customize Login")),1)):O("",!0),n.currentTab=="signup"?(v(),$("div",dot,x(t.$t("Customize Sign Up")),1)):O("",!0),g("div",hot,[g("ul",fot,[(v(!0),$(J,null,ye(o.sortedFields,L=>(v(),$("li",{class:q(["fcom_block_list",{block_hidden:L.hidden}])},[g("div",pot,[_(r,{class:"fcom_el_icon"},{default:y(()=>[(v(),D(Ct(o.getFieldIcon(L))))]),_:2},1024),g("p",null,x(o.getLabel(L.type)),1)]),g("div",mot,[_(r,{onClick:o.togglePosition},{default:y(()=>[_(a)]),_:1},8,["onClick"]),_(r,{onClick:o.togglePosition},{default:y(()=>[_(l)]),_:1},8,["onClick"])]),g("div",got,[_(r,{onClick:R=>o.updateField(L)},{default:y(()=>[_(c)]),_:1},8,["onClick"]),L.type=="banner"?(v(),$(J,{key:0},[L.hidden?(v(),D(r,{key:0,onClick:R=>o.toggleHidden(L)},{default:y(()=>[_(u)]),_:1},8,["onClick"])):(v(),D(r,{key:1,onClick:R=>o.toggleHidden(L)},{default:y(()=>[_(d)]),_:1},8,["onClick"]))],64)):O("",!0)])],2))),256))])])])]))}const Cot=ce(iot,[["render",kot]]),xot={name:"AuthEditor",emits:["updateAuthSettings"],props:["currentTab","savingCount","authSettings"],components:{AuthMeta:Cot},data(){return{settings:this.authSettings[this.currentTab]}},watch:{currentTab(){this.settings=this.authSettings[this.currentTab]},savingCount(){this.saveSettings()},authSettings(){this.settings=this.authSettings[this.currentTab]}},computed:{contentStyles(){var t;return{flexDirection:((t=this.settings.banner)==null?void 0:t.position)=="left"?"row":"row-reverse"}},backgroundStyles(){return t=>({backgroundSize:"cover",backgroundImage:`url(${t==null?void 0:t.background_image})`,backgroundColor:t==null?void 0:t.background_color})},titleStyles(){return t=>({color:t==null?void 0:t.title_color})},descriptionStyles(){return t=>({color:t==null?void 0:t.text_color})},buttonStyles(){return t=>({backgroundColor:t==null?void 0:t.button_color,color:t==null?void 0:t.button_label_color})}},methods:{updateTitle(t,e){e.title=t.target.innerText},updateButtonLabel(t,e){e.button_label=t.target.innerText},saveSettings(){this.saving=!0,this.$post("admin/auth-settings",{settings:this.authSettings}).then(t=>{this.$notify.success(t.message),this.$emit("updateAuthSettings",t.settings)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}}},Sot={class:"fcom_auth_content"},$ot={key:0,class:"fcom_auth_image"},Aot=["src","alt"],Eot={class:"fcom_auth_title"},Mot=["innerHTML"],Tot={class:"fcom_auth_content form_content"},Pot={class:"fcom_auth_form_header"},Iot={class:"fcom_auth_title"},Lot=["innerHTML"],Oot=["innerHTML"];function Dot(t,e,n,i,s,o){const r=B("auth-meta"),a=X1,l=ht,c=tn,u=qt,d=nn,h=ze,f=yo;return v(),$(J,null,[_(a,{class:"fcom_full_editor_side lockscreen_editor auth_editor",width:"300px"},{default:y(()=>[le(t.$slots,"before_meta"),_(r,{currentTab:n.currentTab,settings:s.settings,savingCount:n.savingCount},null,8,["currentTab","settings","savingCount"])]),_:3}),_(f,{class:"fcom_full_editor_main lockscreen_editor auth_editor"},{default:y(()=>{var p,m,b,w,k,C,A,S,M;return[g("div",{class:"fcom_editor_content",style:Xe(o.contentStyles)},[(p=s.settings.banner)!=null&&p.hidden?O("",!0):(v(),$("div",{key:0,class:"fcom_auth_wrap",style:Xe(o.backgroundStyles(s.settings.banner))},[g("div",Sot,[(m=s.settings.banner)!=null&&m.logo?(v(),$("div",$ot,[g("img",{src:(b=s.settings.banner)==null?void 0:b.logo,alt:(w=s.settings.banner)==null?void 0:w.title},null,8,Aot)])):O("",!0),g("div",Eot,[g("h2",{style:Xe(o.titleStyles(s.settings.banner)),contenteditable:"true",onBlur:e[0]||(e[0]=P=>o.updateTitle(P,s.settings.banner))},x((k=s.settings.banner)==null?void 0:k.title),37)]),(C=s.settings.banner)!=null&&C.description?(v(),$("div",{key:1,class:"fcom_auth_description",style:Xe(o.descriptionStyles(s.settings.banner))},[g("p",{innerHTML:s.settings.banner.description_rendered},null,8,Mot)],4)):O("",!0)])],4)),g("div",{class:"fcom_auth_wrap",style:Xe(o.backgroundStyles(s.settings.form))},[g("div",Tot,[g("div",Pot,[g("div",Iot,[g("h2",{style:Xe(o.titleStyles(s.settings.form)),contenteditable:"true",onBlur:e[1]||(e[1]=P=>o.updateTitle(P,s.settings.form))},x((A=s.settings.form)==null?void 0:A.title),37)]),(S=s.settings.form)!=null&&S.description?(v(),$("div",{key:0,class:"fcom_auth_description",style:Xe(o.descriptionStyles(s.settings.form))},[g("p",{innerHTML:s.settings.form.description_rendered},null,8,Lot)],4)):O("",!0)]),(M=s.settings.form)!=null&&M.fields?(v(),D(d,{key:0,"label-position":"top",class:"fcom_auth_form"},{default:y(()=>[(v(!0),$(J,null,ye(s.settings.form.fields,P=>(v(),$("div",{key:P.name},[["text","email","number","textarea","password"].includes(P.type)?(v(),D(c,{key:0,label:P.label},{default:y(()=>[_(l,{type:P.type,placeholder:P.placeholder},null,8,["type","placeholder"])]),_:2},1032,["label"])):O("",!0),P.type=="inline_checkbox"&&!P.disabled?(v(),D(c,{key:1},{default:y(()=>[_(u,{class:"fcom_checkbox"},{default:y(()=>[g("span",{innerHTML:P.inline_label},null,8,Oot)]),_:2},1024)]),_:2},1024)):O("",!0)]))),128))]),_:1})):O("",!0),_(h,{style:Xe(o.buttonStyles(s.settings.form)),contenteditable:"true",onBlur:e[2]||(e[2]=P=>o.updateButtonLabel(P,s.settings.form))},{default:y(()=>{var P;return[N(x((P=s.settings.form)==null?void 0:P.button_label),1)]}),_:1},8,["style"])])],4)],4)]}),_:1})],64)}const Rot=ce(xot,[["render",Dot]]),Vot={name:"AuthSettings",emits:["completed"],components:{AuthEditor:Rot},data(){return{saving:!1,loading:!1,currentTab:"login",savingCount:0,authSettings:{login:[],signup:[]},hasPro:window.fluentComAdmin.pro}},methods:{getSettings(){this.loading=!0,this.$get("admin/auth-settings").then(t=>{this.authSettings=t.settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveSettings(){if(!this.hasPro){this.$notify({title:this.$t("Pro Required"),message:this.$t("This feature is only available in the pro version."),type:"error"});return}this.savingCount++},updateAuthSettings(t){this.authSettings=t}},mounted(){this.getSettings()}},Fot={class:"fcom_full_editor"},Not={class:"fcom_full_editor_header"},Bot=["aria-label"],zot={class:"fcom_editor_menu object_menu"},Hot={class:"fcom_space_menu_ul"},Uot={class:"full_editor_actions"},jot={key:0},Wot={key:1};function Yot(t,e,n,i,s,o){const r=B("ArrowLeft"),a=we,l=ze,c=K1,u=B("auth-editor"),d=Vt,h=X1,f=yo,p=G1,m=xt("loading");return v(),$("div",Fot,[_(p,null,{default:y(()=>[_(c,{class:"fcom_full_editor_header_wrap"},{default:y(()=>[g("div",Not,[g("button",{type:"button",onClick:e[0]||(e[0]=b=>t.$emit("completed")),class:"fcom_back_header","aria-label":t.$t("Back to %s",t.$t("General Settings"))},[_(a,null,{default:y(()=>[_(r)]),_:1}),N(" "+x(t.$t("General Settings")),1)],8,Bot),g("div",zot,[g("ul",Hot,[g("li",{onClick:e[1]||(e[1]=b=>s.currentTab="login")},[g("a",{class:q({"router-link-exact-active":s.currentTab=="login"}),href:"#"},x(t.$t("Login")),3)]),g("li",{onClick:e[2]||(e[2]=b=>s.currentTab="signup")},[g("a",{class:q({"router-link-exact-active":s.currentTab=="signup"}),href:"#"},x(t.$t("Sign Up")),3)])])]),g("div",Uot,[Re((v(),D(l,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:y(()=>[s.hasPro?(v(),$("span",jot,x(t.$t("Save Changes")),1)):(v(),$("span",Wot,x(t.$t("Save Changes (Pro Required)")),1))]),_:1},8,["disabled","onClick"])),[[m,s.saving]])])])]),_:1}),_(p,{class:"fcom_full_editor_container"},{default:y(()=>[s.loading?(v(),$(J,{key:1},[_(h,{class:"fcom_full_editor_side lockscreen_editor"},{default:y(()=>[_(d,{animated:!0,rows:5})]),_:1}),_(f,{class:"fcom_full_editor_main lockscreen_editor"},{default:y(()=>[_(d,{animated:!0,rows:10})]),_:1})],64)):(v(),D(u,{key:0,currentTab:s.currentTab,savingCount:s.savingCount,"auth-settings":s.authSettings,onUpdateAuthSettings:o.updateAuthSettings},null,8,["currentTab","savingCount","auth-settings","onUpdateAuthSettings"]))]),_:1})]),_:1})])}const qot=ce(Vot,[["render",Yot]]),Got={name:"GeneralSettings",components:{ImageUploader:Ll,Layout:yi,AppLayout:bi,CopyDocument:gR,AuthSettings:qot},data(){return{settings:null,user_roles:{},loading:!1,saving:!1,users_can_register:!0,user_registration_enable_url:"",showCustomLoginForm:!1}},computed:{loginUrl(){return this.appVars.urls.portal_base+"?fcom_action=auth"},signupUrl(){return this.appVars.urls.portal_base+"?fcom_action=auth&form=register"},isRoleBase(){var t,e;return((e=(t=this.settings)==null?void 0:t.access)==null?void 0:e.acess_level)==="role_based"},isPublic(){var t,e;return((e=(t=this.settings)==null?void 0:t.access)==null?void 0:e.acess_level)==="public"},isDefaultLogin(){var t;return((t=this.settings)==null?void 0:t.auth_form_type)==="default"},isCustomLogin(){var t;return((t=this.settings)==null?void 0:t.auth_form_type)==="custom"},canManageAuthSettings(){return this.hasPermission("super_admin")}},methods:{openLoginCustomizeForm(){this.showCustomLoginForm=!0},copyToClipboard(t){this.$toClipboard(t,this.$t("Link copied to clipboard"))},getSettings(){this.loading=!0,this.$get("admin/general").then(t=>{this.settings=t.settings,this.user_roles=t.user_roles,this.users_can_register=t.users_can_register,this.user_registration_enable_url=t.user_registration_enable_url}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveSettings(){this.saving=!0,this.$post("admin/general",{settings:this.settings}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings(),this.changeTitle(this.$t("General Settings"))}},Xot={class:"settings_router"},Kot={class:"fhr_content_layout_body"},Zot={class:"setting_body"},Jot={class:"settings_title"},Qot={class:"settings_subtitle"},ert={class:"settings_title"},trt={class:"settings_subtitle"},nrt=["src"],srt={class:"settings_title"},irt={class:"settings_subtitle"},ort=["src"],rrt={class:"settings_title"},art={class:"settings_subtitle"},lrt={class:"settings_title"},crt={class:"settings_subtitle"},urt=["src"],drt={class:"settings_title"},hrt={class:"settings_subtitle"},frt={class:"fcom_help_text"},prt={class:"settings_title"},mrt={class:"settings_subtitle"},grt={class:"settings_title"},vrt={class:"settings_subtitle"},_rt={class:"help_text"},yrt={class:"settings_title"},brt={class:"settings_subtitle"},wrt={class:"settings_title"},krt={class:"settings_subtitle"},Crt={class:"fcom_help_text"},xrt={class:"settings_title"},Srt={class:"settings_subtitle"},$rt={class:"fcom_help_text"},Art=["href"],Ert={class:"settings_title"},Mrt={class:"settings_subtitle"},Trt={key:0};function Prt(t,e,n,i,s,o){const r=ze,a=jd,l=ht,c=tn,u=Ud,d=B("image-uploader"),h=Qc,f=ws,p=B("CopyDocument"),m=we,b=qt,w=Li,k=Zt,C=Wt,A=nn,S=Vt,M=B("auth-settings"),P=B("layout"),T=B("app-layout");return v(),D(T,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:y(()=>[_(P,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("General Settings")},{actions:y(()=>[_(r,{class:"fcom_primary_button",disabled:s.saving||s.loading,onClick:o.saveSettings},{default:y(()=>[g("span",null,x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),default:y(()=>[g("div",Xot,[g("div",Kot,[g("div",Zot,[s.settings?(v(),D(A,{key:0,onSubmit:e[19]||(e[19]=Me(I=>t.doNothing(),["prevent"])),"label-position":"top","label-width":"120px"},{default:y(()=>[_(u,{gutter:20,class:"setting_row"},{default:y(()=>[_(a,{sm:12},{default:y(()=>[g("p",Jot,x(t.$t("Community Title")),1),g("span",Qot,x(t.$t("This title will be used for the meta title and email notification references. It should match your site title.")),1)]),_:1}),_(a,{sm:12},{default:y(()=>[_(c,null,{default:y(()=>[_(l,{placeholder:t.$t("Community title"),type:"text",modelValue:s.settings.site_title,"onUpdate:modelValue":e[0]||(e[0]=I=>s.settings.site_title=I)},null,8,["placeholder","modelValue"])]),_:1})]),_:1})]),_:1}),_(u,{gutter:20,class:"setting_row"},{default:y(()=>[_(a,{sm:12},{default:y(()=>[g("p",ert,x(t.$t("Site Logo (For Light Background)")),1),g("span",trt,x(t.$t("Recommended dimensions: 480 x 120, 4:1 aspect ratio.")),1)]),_:1}),_(a,{sm:12},{default:y(()=>[_(c,null,{default:y(()=>[s.settings.logo?(v(),$("img",{key:0,alt:"",class:"settings_img",src:s.settings.logo},null,8,nrt)):O("",!0),_(d,{additionalData:{resize:!1,max_width:500,skip_convert:"yes"},button_text:s.settings.logo?t.$t("Change"):t.$t("Upload Logo"),can_remove:!!s.settings.logo,className:"setting_img_upload",isTextBtn:!1,removeIcon:!1,onUploaded:e[1]||(e[1]=I=>{s.settings.logo=I})},null,8,["button_text","can_remove"])]),_:1})]),_:1})]),_:1}),_(u,{gutter:30,class:"setting_row"},{default:y(()=>[_(a,{sm:12},{default:y(()=>[g("p",srt,x(t.$t("Site Logo (For Dark Mode)")),1),g("span",irt,x(t.$t("Recommended dimensions: 480 x 120, 4:1 aspect ratio.")),1)]),_:1}),_(a,{sm:12},{default:y(()=>[_(c,null,{default:y(()=>[s.settings.white_logo?(v(),$("img",{key:0,alt:"",class:"settings_img",src:s.settings.white_logo},null,8,ort)):O("",!0),_(d,{additionalData:{resize:!1,max_width:500,skip_convert:"yes"},button_text:s.settings.white_logo?t.$t("Change"):t.$t("Set Logo"),can_remove:!!s.settings.white_logo,className:"setting_img_upload",isTextBtn:!1,removeIcon:!1,onUploaded:e[2]||(e[2]=I=>{s.settings.white_logo=I})},null,8,["button_text","can_remove"])]),_:1})]),_:1})]),_:1}),_(u,{gutter:30,class:"setting_row"},{default:y(()=>[_(a,{sm:12},{default:y(()=>[g("p",rrt,x(t.$t("Logo Permalink")),1),g("span",art,x(t.$t("Define the permalink of the logo you want to use.")),1)]),_:1}),_(a,{sm:12},{default:y(()=>[_(c,null,{default:y(()=>[_(f,{style:{"flex-direction":"row"},modelValue:s.settings.logo_permalink_type,"onUpdate:modelValue":e[3]||(e[3]=I=>s.settings.logo_permalink_type=I),class:"fcom_radio_group"},{default:y(()=>[_(h,{value:"default"},{default:y(()=>[N(x(t.$t("Default")),1)]),_:1}),_(h,{value:"custom"},{default:y(()=>[N(x(t.$t("Custom")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1}),s.settings.logo_permalink_type=="default"?(v(),D(c,{key:0,class:"fcom_mt_20",label:t.$t("Default Permalink")},{default:y(()=>[_(l,{value:t.appVars.urls.portal_base,disabled:"",type:"url",placeholder:t.$t("Default Permalink")},{append:y(()=>[_(r,{onClick:e[4]||(e[4]=I=>o.copyToClipboard(t.appVars.urls.portal_base)),text:""},{default:y(()=>[_(m,null,{default:y(()=>[_(p)]),_:1}),g("span",null,x(t.$t("Copy")),1)]),_:1})]),_:1},8,["value","placeholder"])]),_:1},8,["label"])):O("",!0),s.settings.logo_permalink_type=="custom"?(v(),D(c,{key:1,class:"fcom_mt_20",label:t.$t("Custom Permalink")},{default:y(()=>[_(l,{modelValue:s.settings.logo_permalink,"onUpdate:modelValue":e[5]||(e[5]=I=>s.settings.logo_permalink=I),type:"url"},null,8,["modelValue"])]),_:1},8,["label"])):O("",!0)]),_:1})]),_:1}),_(u,{gutter:30,class:"setting_row"},{default:y(()=>[_(a,{sm:12},{default:y(()=>[g("p",lrt,x(t.$t("Default Open Graph Image")),1),g("span",crt,x(t.$t("This image will be used on social sharing preview. Recommended size: 1200 x 630 px")),1)]),_:1}),_(a,{sm:12},{default:y(()=>[_(c,null,{default:y(()=>[s.settings.featured_image?(v(),$("img",{key:0,alt:"",style:{"max-height":"100px"},class:"settings_img",src:s.settings.featured_image},null,8,urt)):O("",!0),_(d,{additionalData:{resize:!1,disable_convert:"yes",max_width:1600,skip_convert:"yes"},button_text:s.settings.featured_image?t.$t("Change"):t.$t("Set Open Graph Image"),can_remove:!!s.settings.featured_image,className:"setting_img_upload",isTextBtn:!1,removeIcon:!1,onUploaded:e[6]||(e[6]=I=>{s.settings.featured_image=I})},null,8,["button_text","can_remove"])]),_:1})]),_:1})]),_:1}),_(u,{gutter:30,class:"setting_row"},{default:y(()=>[_(a,{sm:12},{default:y(()=>[g("p",drt,x(t.$t("Global Post Status")),1),g("span",hrt,x(t.$t("Enable/disable Post Status")),1)]),_:1}),_(a,{sm:12},{default:y(()=>[_(c,null,{default:y(()=>[_(b,{modelValue:s.settings.disable_global_posts,"onUpdate:modelValue":e[7]||(e[7]=I=>s.settings.disable_global_posts=I),class:"fcom_checkbox","true-value":"no","false-value":"yes"},{default:y(()=>[N(x(t.$t("Enable Global Posts Status Form")),1)]),_:1},8,["modelValue"]),g("div",frt,[g("p",null,x(t.$t("If you enable this, then users can post globally without selecting a space, which will be available for everyone.")),1)])]),_:1})]),_:1})]),_:1}),_(u,{gutter:30,class:"setting_row"},{default:y(()=>[_(a,{sm:12},{default:y(()=>[g("p",prt,x(t.$t("Portal Access Settings")),1),g("span",mrt,x(t.$t("Who can access the portal.")),1)]),_:1}),_(a,{sm:12},{default:y(()=>[_(c,null,{default:y(()=>[_(f,{modelValue:s.settings.access.acess_level,"onUpdate:modelValue":e[8]||(e[8]=I=>s.settings.access.acess_level=I),class:"fcom_radio_group"},{default:y(()=>[_(w,{value:"public"},{default:y(()=>[N(x(t.$t("Everyone")),1)]),_:1}),_(w,{value:"logged_in"},{default:y(()=>[N(x(t.$t("Only Logged In Users")),1)]),_:1}),_(w,{value:"role_based"},{default:y(()=>[N(x(t.$t("Only Selected User Roles")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),o.isRoleBase?(v(),$(J,{key:0},[_(u,{gutter:30,class:"setting_row"},{default:y(()=>[_(a,{sm:12},{default:y(()=>[g("p",grt,x(t.$t("User Roles")),1),g("span",vrt,x(t.$t("Select user roles who can access the portal.")),1)]),_:1}),_(a,{sm:12},{default:y(()=>[_(c,null,{default:y(()=>[_(C,{placeholder:t.$t("Select Access Roles"),"allow-create":"",modelValue:s.settings.access.access_roles,"onUpdate:modelValue":e[9]||(e[9]=I=>s.settings.access.access_roles=I),multiple:""},{default:y(()=>[(v(!0),$(J,null,ye(s.user_roles,(I,L)=>(v(),D(k,{key:L,label:I,value:L},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"]),g("span",_rt,x(t.$t("__ALL_ADMIN_ACCESS_DESC")),1)]),_:1})]),_:1})]),_:1}),_(u,{gutter:30,class:"setting_row"},{default:y(()=>[_(a,{sm:12},{default:y(()=>[g("p",yrt,x(t.$t("Not Matched User Roles")),1),g("span",brt,x(t.$t("Message to show for users without matching roles.")),1)]),_:1}),_(a,{sm:12},{default:y(()=>[_(c,null,{default:y(()=>[_(l,{type:"textarea",rows:3,modelValue:s.settings.restricted_role_content,"onUpdate:modelValue":e[10]||(e[10]=I=>s.settings.restricted_role_content=I)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})],64)):O("",!0),!o.isPublic&&o.canManageAuthSettings?(v(),D(u,{key:1,gutter:30,class:"setting_row"},{default:y(()=>[_(a,{sm:12},{default:y(()=>[g("p",wrt,x(t.$t("Redirect URL")),1),g("span",krt,x(t.$t("Redirect URL for Public Users")),1)]),_:1}),_(a,{sm:12},{default:y(()=>[_(c,null,{default:y(()=>[_(l,{modelValue:s.settings.auth_url,"onUpdate:modelValue":e[11]||(e[11]=I=>s.settings.auth_url=I)},null,8,["modelValue"]),g("div",Crt,[g("p",null,x(t.$t("Do not use your community portal URL here. Maybe you can use your login/signup URL")),1)])]),_:1})]),_:1})]),_:1})):O("",!0),_(u,{gutter:30,class:"setting_row"},{default:y(()=>[_(a,{sm:12},{default:y(()=>[g("p",xrt,x(t.$t("Login / Registration URLs")),1),g("span",Srt,x(t.$t("Find the default Login/Registration Urls")),1)]),_:1}),_(a,{sm:12},{default:y(()=>[o.canManageAuthSettings?(v(),D(c,{key:0,label:t.$t("Login/Signup Form Type")},{default:y(()=>[_(f,{style:{"flex-direction":"row"},modelValue:s.settings.auth_form_type,"onUpdate:modelValue":e[12]||(e[12]=I=>s.settings.auth_form_type=I),class:"fcom_radio_group"},{default:y(()=>[_(h,{value:"default"},{default:y(()=>[N(x(t.$t("Use Default")),1)]),_:1}),_(h,{value:"custom"},{default:y(()=>[N(x(t.$t("Use Custom Login Page")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),o.isCustomLogin&&o.canManageAuthSettings?(v(),D(c,{key:1,label:t.$t("Please provide your custom Authentication Url"),class:"fcom_mt_20"},{default:y(()=>[_(l,{modelValue:s.settings.cutsom_auth_url,"onUpdate:modelValue":e[13]||(e[13]=I=>s.settings.cutsom_auth_url=I),type:"url",placeholder:t.$t("Custom Auth URL")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):O("",!0),_(c,{class:"fcom_mt_20",label:t.$t("Default Login URL")},{default:y(()=>[_(l,{disabled:"",value:o.loginUrl,placeholder:t.$t("Login URL for public Users")},{append:y(()=>[_(r,{onClick:e[14]||(e[14]=I=>o.copyToClipboard(o.loginUrl)),text:""},{default:y(()=>[_(m,null,{default:y(()=>[_(p)]),_:1}),g("span",null,x(t.$t("Copy")),1)]),_:1})]),_:1},8,["value","placeholder"])]),_:1},8,["label"]),_(c,{class:"fcom_mt_20",label:t.$t("Default Signup URL")},{default:y(()=>[_(l,{disabled:"",value:o.signupUrl,placeholder:t.$t("Registration URL for public Users")},{append:y(()=>[_(r,{onClick:e[15]||(e[15]=I=>o.copyToClipboard(o.signupUrl)),text:""},{default:y(()=>[_(m,null,{default:y(()=>[_(p)]),_:1}),g("span",null,x(t.$t("Copy")),1)]),_:1})]),_:1},8,["value","placeholder"]),s.users_can_register?O("",!0):(v(),$(J,{key:0},[g("div",$rt,[g("p",null,[N(x(t.$t("Global User registration is disabled for your site. Please enable from General Settings or override in FluentCommunity Settings."))+" ",1),g("a",{target:"_blank",rel:"noopener",href:s.user_registration_enable_url},x(t.$t("Go to General Settings.")),9,Art)])]),e[21]||(e[21]=g("div",{style:{width:"100%"}},[g("hr")],-1)),o.canManageAuthSettings?(v(),D(b,{key:0,modelValue:s.settings.explicit_registration,"onUpdate:modelValue":e[16]||(e[16]=I=>s.settings.explicit_registration=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Enable User Registration via FluentCommunity Signup Form")),1)]),_:1},8,["modelValue"])):O("",!0)],64))]),_:1},8,["label"]),s.settings.auth_form_type=="default"&&o.canManageAuthSettings?(v(),$(J,{key:2},[_(c,{class:"fcom_mt_20"},{default:y(()=>[_(b,{modelValue:s.settings.use_custom_signup_page,"onUpdate:modelValue":e[17]||(e[17]=I=>s.settings.use_custom_signup_page=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Use custom signup URL instead of default signup page")),1)]),_:1},8,["modelValue"])]),_:1}),s.settings.use_custom_signup_page=="yes"?(v(),D(c,{key:0,class:"fcom_mt_20",label:t.$t("Custom Signup URL (Required)")},{default:y(()=>[_(l,{placeholder:t.$t("Custom Signup URL (Required)"),modelValue:s.settings.custom_signup_url,"onUpdate:modelValue":e[18]||(e[18]=I=>s.settings.custom_signup_url=I)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])):O("",!0)],64)):O("",!0)]),_:1})]),_:1}),o.isDefaultLogin?(v(),D(u,{key:2,gutter:30,class:"setting_row"},{default:y(()=>[_(a,{sm:12},{default:y(()=>[g("p",Ert,x(t.$t("Customize Login/Signup Form")),1),g("span",Mrt,x(t.$t("Customize your login and registration form settings")),1)]),_:1}),_(a,{sm:12},{default:y(()=>[_(r,{class:"fcom_secondary_button",onClick:o.openLoginCustomizeForm},{default:y(()=>[N(x(t.$t("Customize")),1)]),_:1},8,["onClick"])]),_:1})]),_:1})):O("",!0),_(u,{gutter:30},{default:y(()=>[_(r,{class:"fcom_primary_button",disabled:s.saving||s.loading,onClick:o.saveSettings},{default:y(()=>[g("span",null,x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})):s.loading?(v(),D(S,{key:1,animated:!0,rows:10})):O("",!0)])])]),s.showCustomLoginForm?(v(),$("div",Trt,[(v(),D(na,{to:"body"},[_(M,{onCompleted:e[20]||(e[20]=I=>s.showCustomLoginForm=!1)})]))])):O("",!0)]),_:1},8,["title"])]),_:1})}const Irt=ce(Got,[["render",Prt]]),Lrt={name:"ContentDivider",props:{lineColor:{type:String,default:"var(--fcom-secondary-border, #e5e7eb)"},position:{type:String,default:"center",validator:t=>["center","left","right"].includes(t)}}},Ort={class:"fcom_content_divider__content"};function Drt(t,e,n,i,s,o){return v(),$("div",{class:q(["fcom_content_divider","fcom_content_divider--"+n.position])},[n.position!=="left"?(v(),$("span",{key:0,class:"fcom_content_divider__line",style:Xe({background:n.lineColor})},null,4)):O("",!0),g("div",Ort,[le(t.$slots,"default")]),n.position!=="right"?(v(),$("span",{key:1,class:"fcom_content_divider__line",style:Xe({background:n.lineColor})},null,4)):O("",!0)],2)}const Rrt=ce(Lrt,[["render",Drt]]),Vrt={name:"MenuGroupSettings",components:{SpaceCourseSelector:MS,FluentDnD:Tr,LogoEmojiSelector:sv,Drawer:nu,ActionPopover:aa,Lock:wR,View:s8,Hide:Q4,Edit:_R},data(){return{editingItem:null,originalItem:null,openEditLinkDrawer:!1,isDragging:!1,isSpaceDragging:!1,draggingIndex:null,draggedSpaceIndex:null,mode:null,urlErrors:[],validationAttempt:0}},computed:{isDirty(){return!this.editingItem||!this.originalItem?!1:JSON.stringify(this.editingItem)!==JSON.stringify(this.originalItem)},showLinkTypes(){var t;return!!this.page_options.length&&((t=this.editingItem)==null?void 0:t.is_system)!="yes"},showPagePicker(){var t;return this.showLinkTypes&&((t=this.editingItem)==null?void 0:t.link_type)==="space_page"},showDrawerDelete(){var t;return this.menu_rows&&this.mode==="edit"&&((t=this.editingItem)==null?void 0:t.is_system)!="yes"},systemLinkPath(){var e;const t=(e=this.editingItem)==null?void 0:e.route;if(!t)return"";try{return window.location.origin+this.$router.resolve(t).href}catch{return""}},showPlacement(){var t,e;return!!this.placement_options.length&&((t=this.editingItem)==null?void 0:t.is_system)!="yes"&&((e=this.editingItem)==null?void 0:e.link_type)!=="space_page"},enabledCount(){return this.menuItems.filter(t=>t.enabled!="no").length}},emits:["save","move"],props:{menuItems:{type:Array,required:!0},saving:{type:Boolean,default:!1},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},page_options:{type:Array,default:()=>[]},placement:{type:String,default:""},placement_options:{type:Array,default:()=>[]},source_labels:{type:Object,default:()=>({})},menu_rows:{type:Boolean,default:!1},min_enabled:{type:Number,default:0}},methods:{rowActionLabel(t,e){return t==="locked"?this.$t("%s cannot be hidden",e.title):t==="show"?this.$t("Show %s",e.title):t==="hide"?this.$t("Hide %s",e.title):this.$t("Edit %s",e.title)},sourceLabel(t){return this.source_labels[t.source]||""},toggleEnabled(t){if(this.saving||t.is_locked=="yes")return;const e=t.enabled!="no";if(e&&this.enabledCount<=this.min_enabled){this.$notify.info(this.$t("At least one menu item has to stay visible. Turn another one on first."));return}t.enabled=e?"no":"yes",this.saveMenuItems()},removeEditingLink(){const t=this.menuItems.findIndex(e=>e.slug===this.editingItem.slug);this.openEditLinkDrawer=!1,this.editingItem=null,this.originalItem=null,this.mode=null,t!==-1&&this.removeLink(t)},linkRowActions(t,e){const n=[{label:this.$t("Edit"),action:()=>this.initEditLink(t,"edit")}];return t.is_system!="yes"&&n.push({label:this.$t("Delete"),type:"danger",action:()=>this.removeLink(e)}),n},validateLinkForm(){return this.urlErrors=[],this.validationAttempt++,(!this.editingItem.title||!this.editingItem.title.trim())&&this.urlErrors.push(this.$t("Link title cannot be empty.")),this.showPagePicker?this.editingItem.page_slug||this.urlErrors.push(this.$t("Please select a page.")):this.editingItem.is_system!=="yes"&&(!this.editingItem.permalink||!this.editingItem.permalink.trim())&&this.urlErrors.push(this.$t("URL or path cannot be empty.")),this.urlErrors.length===0},initEditLink(t,e="create"){t.privacy||(t.privacy="public",t.membership_ids=t.membership_ids||[]),this.page_options.length&&t.is_system!="yes"&&!t.link_type&&(t.link_type="url"),this.placement_options.length&&t.is_system!="yes"&&!t.placement&&(t.placement=this.placement),this.mode=e,this.urlErrors=[],this.originalItem=t,this.editingItem=JSON.parse(JSON.stringify(t||{})),this.$nextTick(()=>{this.openEditLinkDrawer=!0})},removeLink(t){this.$confirm(this.$t("Are you sure you want to remove this link?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.menuItems.splice(t,1),this.saveMenuItems({customSuccessMessage:this.$t("Link deleted successfully.")})})},createOrUpdateLink(){if(this.saving||!this.validateLinkForm())return;const t=this.editingItem;if(this.showPagePicker?t.permalink="":this.page_options.length&&t.is_system!="yes"&&(t.link_type="url",t.page_slug=""),!t.slug)t.slug="fcom_custom_"+t.title.toLowerCase().replace(/[^a-z0-9]/g,"_"),t.is_custom="yes",this.menuItems.push(t);else{const e=this.menuItems.findIndex(n=>n.slug===t.slug);e!==-1?Object.assign(this.menuItems[e],t):this.menuItems.push(t)}if(this.openEditLinkDrawer=!1,this.editingItem=null,this.placement&&t.placement&&t.placement!==this.placement){const e=this.menuItems.findIndex(n=>n.slug===t.slug);e!==-1&&this.menuItems.splice(e,1),this.$emit("move",{item:t,to:t.placement});return}this.saveMenuItems()},saveMenuItems({customSuccessMessage:t=null}={}){this.$emit("save",{customSuccessMessage:t})},drop({index:t}){this.saving||(this.draggingIndex=null,this.saveMenuItems())},beforeCloseDrawer(t){if(this.saving){this.$notify.info(this.$t("Please wait to complete."));return}this.editingItem=null,this.originalItem=null,this.mode=null,t()}}},Frt={key:0,class:"fcom_section_primary fcom_menu_group_settings"},Nrt={class:"fcom_section_primary_item"},Brt={class:"fcom_section_primary_item_title"},zrt={class:"fcom_heading_item"},Hrt={class:"fcom_section_item_actions"},Urt={class:"fcom_section_items menu-items-container"},jrt={key:0,style:{padding:"1rem"}},Wrt={class:"fcom_section_item_title"},Yrt={class:"fcom_heading_item"},qrt={key:0,class:"fcom_menu_row_grip","aria-hidden":"true"},Grt={key:1,class:"fcom_drag_handle"},Xrt={key:2,class:"community_avatar"},Krt=["src"],Zrt={key:3,class:"fcom_emoji"},Jrt={key:4,class:"fcom_shape"},Qrt=["innerHTML"],eat={class:"fcom_section_item_actions"},tat=["aria-label"],nat=["disabled","aria-label","onClick"],sat=["disabled","aria-label","onClick"],iat={key:0},oat={key:1},rat={key:0},aat={class:"fcom_help_text"},lat={class:"fcom_help_text"},cat={key:0},uat={key:1},dat={key:2},hat={class:"fcom_help_text"};function fat(t,e,n,i,s,o){const r=ze,a=we,l=qs,c=B("Lock"),u=B("View"),d=B("Hide"),h=B("Edit"),f=B("action-popover"),p=B("FluentDnD"),m=B("logo-emoji-selector"),b=ht,w=tn,k=Li,C=ws,A=Zt,S=Wt,M=qt,P=B("SpaceCourseSelector"),T=oa,I=nn,L=B("drawer");return v(),$(J,null,[n.menuItems?(v(),$("div",Frt,[g("div",Nrt,[g("div",Brt,[g("div",zrt,[le(t.$slots,"title",{},()=>[g("h4",null,x(n.title),1)])])]),g("div",Hrt,[_(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=R=>o.initEditLink({enabled:"yes",privacy:"public",membership_ids:[],new_tab:"yes"}))},{default:y(()=>[N(x(t.$t("Add New")),1)]),_:1})])]),g("div",Urt,[n.menuItems.length?O("",!0):(v(),$("div",jrt,[g("p",null,x(t.$t("No link has been added for this section")),1)])),_(p,{items:n.menuItems,"row-key":"slug",onDrop:o.drop,draggable:!n.saving,"item-class":"fcom_section_item fcom_space_item_padding"+(n.saving?"":" fcom_cursor_move")},{item:y(({data:R,index:V})=>[g("div",Wrt,[g("p",Yrt,[n.use_icon_selector?(v(),$(J,{key:0},[n.menu_rows?(v(),$("span",qrt,[...e[16]||(e[16]=[g("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"currentColor"},[g("circle",{cx:"3.5",cy:"3",r:"1.4"}),g("circle",{cx:"8.5",cy:"3",r:"1.4"}),g("circle",{cx:"3.5",cy:"8",r:"1.4"}),g("circle",{cx:"8.5",cy:"8",r:"1.4"}),g("circle",{cx:"3.5",cy:"13",r:"1.4"}),g("circle",{cx:"8.5",cy:"13",r:"1.4"})],-1)])])):(v(),$("div",Grt," ⋮⋮ ")),R.icon_image?(v(),$("div",Xrt,[_(a,null,{default:y(()=>[g("img",{alt:"",style:{"max-width":"16px","max-height":"16px"},src:R.icon_image},null,8,Krt)]),_:2},1024)])):R.emoji?(v(),$("span",Zrt,x(R.emoji),1)):R.shape_svg?(v(),$("span",Jrt,[_(a,{innerHTML:R.shape_svg},null,8,["innerHTML"])])):O("",!0)],64)):R.icon_svg?(v(),D(a,{key:1},{default:y(()=>[g("span",{innerHTML:R.icon_svg},null,8,Qrt)]),_:2},1024)):O("",!0),g("span",null,x(R.title),1),o.sourceLabel(R)?(v(),D(l,{key:2,class:"fcom_menu_source_tag",type:"info",size:"small"},{default:y(()=>[N(x(o.sourceLabel(R)),1)]),_:2},1024)):O("",!0),R.is_unavailable=="yes"?(v(),D(l,{key:3,type:"danger"},{default:y(()=>[N(x(t.$t("unavailable")),1)]),_:1})):R.enabled=="yes"?(v(),D(l,{key:4,type:"success"},{default:y(()=>[N(x(t.$t("enabled")),1)]),_:1})):(v(),D(l,{key:5,type:"info"},{default:y(()=>[N(x(t.$t("disabled")),1)]),_:1}))])]),g("div",eat,[n.menu_rows?(v(),$(J,{key:0},[R.is_locked=="yes"?(v(),$("button",{key:0,type:"button",class:"fcom_menu_row_btn is_locked",disabled:"","aria-label":o.rowActionLabel("locked",R)},[_(a,null,{default:y(()=>[_(c)]),_:1})],8,tat)):(v(),$("button",{key:1,type:"button",class:"fcom_menu_row_btn",disabled:n.saving,"aria-label":o.rowActionLabel(R.enabled=="no"?"show":"hide",R),onClick:H=>o.toggleEnabled(R)},[_(a,null,{default:y(()=>[R.enabled!="no"?(v(),D(u,{key:0})):(v(),D(d,{key:1}))]),_:2},1024)],8,nat)),g("button",{type:"button",class:"fcom_menu_row_btn",disabled:n.saving,"aria-label":o.rowActionLabel("edit",R),onClick:H=>o.initEditLink(R,"edit")},[_(a,null,{default:y(()=>[_(h)]),_:1})],8,sat)],64)):(v(),D(f,{key:1,items:o.linkRowActions(R,V),placement:"bottom-end"},null,8,["items"]))])]),_:1},8,["items","onDrop","draggable","item-class"])])])):O("",!0),_(L,{modelValue:s.openEditLinkDrawer,"onUpdate:modelValue":e[15]||(e[15]=R=>s.openEditLinkDrawer=R),size:t.drawerWidth,"before-close":o.beforeCloseDrawer,id:"fluent_comminity_body","close-on-click-modal":!0,"has-close-confirmation":o.isDirty&&!n.saving,"close-confirmation-message":t.$t("Closing will discard your changes. Are you sure?")},{header:y(()=>[s.mode==="edit"?(v(),$("h4",iat,x(t.$t("Edit Link")),1)):(v(),$("h4",oat,x(t.$t("Add Custom Link")),1))]),default:y(()=>[s.editingItem?(v(),$("div",rat,[_(I,{onSubmit:e[14]||(e[14]=Me(R=>t.doNothing(),["prevent"])),"label-position":"top",disabled:n.saving},{default:y(()=>[_(w,{label:t.$t("Name of the Link")},{default:y(()=>[_(b,{disabled:n.saving,placeholder:t.$t("Public Name of the item"),modelValue:s.editingItem.title,"onUpdate:modelValue":e[2]||(e[2]=R=>s.editingItem.title=R)},hs({_:2},[n.use_icon_selector?{name:"prepend",fn:y(()=>[_(m,{custom_svg:n.custom_svg,fallback_mark:"<span style='font-size: 20px;'>☺</span>",onUpdate:e[1]||(e[1]=R=>{n.saving||(s.editingItem.emoji=R.emoji,s.editingItem.icon_image=R.logo,s.editingItem.shape_svg=R.shape_svg)}),config:{logo:s.editingItem.icon_image,emoji:s.editingItem.emoji||"",shape_svg:s.editingItem.shape_svg||""}},null,8,["custom_svg","config"])]),key:"0"}:void 0]),1032,["disabled","placeholder","modelValue"])]),_:1},8,["label"]),o.showLinkTypes?(v(),D(w,{key:0,label:t.$t("Link to")},{default:y(()=>[_(C,{disabled:n.saving,modelValue:s.editingItem.link_type,"onUpdate:modelValue":e[3]||(e[3]=R=>s.editingItem.link_type=R)},{default:y(()=>[_(k,{label:t.$t("Space Page"),value:"space_page"},null,8,["label"]),_(k,{label:t.$t("Custom URL"),value:"url"},null,8,["label"])]),_:1},8,["disabled","modelValue"])]),_:1},8,["label"])):O("",!0),o.showPagePicker?(v(),D(w,{key:1,label:t.$t("Space Page")},{default:y(()=>[_(S,{disabled:n.saving,modelValue:s.editingItem.page_slug,"onUpdate:modelValue":e[4]||(e[4]=R=>s.editingItem.page_slug=R),filterable:"",style:{width:"100%"},placeholder:t.$t("Select a page")},{default:y(()=>[(v(!0),$(J,null,ye(n.page_options,R=>(v(),D(A,{key:R.value,label:R.label,value:R.value},null,8,["label","value"]))),128))]),_:1},8,["disabled","modelValue","placeholder"]),g("div",aat,[g("p",null,x(t.$t("The page keeps its own visibility. Linking it here replaces its automatic menu entry, so it is never listed twice.")),1)])]),_:1},8,["label"])):(v(),D(w,{key:2,label:t.$t("URL")},{default:y(()=>[_(b,{disabled:n.saving||s.editingItem.is_system=="yes",type:"text",placeholder:t.$t("URL or path (e.g. https://example.com or /members)"),"model-value":s.editingItem.is_system=="yes"?o.systemLinkPath:s.editingItem.permalink,"onUpdate:modelValue":e[5]||(e[5]=R=>s.editingItem.permalink=R)},null,8,["disabled","placeholder","model-value"]),g("div",lat,[s.editingItem.is_system=="yes"&&s.editingItem.source==="space_page"?(v(),$("p",cat,x(t.$t("This is a page link, edit the page's slug to change the URL.")),1)):s.editingItem.is_system=="yes"?(v(),$("p",uat,x(t.$t("This is a built-in link, the URL can't be edited.")),1)):(v(),$("p",dat,x(t.$t("For internal links, start with / (e.g. /members).")),1))])]),_:1},8,["label"])),o.showPlacement?(v(),D(w,{key:3,label:t.$t("Placement")},{default:y(()=>[_(C,{disabled:n.saving,modelValue:s.editingItem.placement,"onUpdate:modelValue":e[6]||(e[6]=R=>s.editingItem.placement=R)},{default:y(()=>[(v(!0),$(J,null,ye(n.placement_options,R=>(v(),D(k,{key:R.value,label:R.label,value:R.value},null,8,["label","value"]))),128))]),_:1},8,["disabled","modelValue"])]),_:1},8,["label"])):O("",!0),n.has_svg?(v(),D(w,{key:4,label:t.$t("SVG Code for Icon (Simplified SVG Code) / Emoji")},{default:y(()=>[_(b,{disabled:n.saving,placeholder:t.$t("SVG Code. No url please / You can use emoji"),type:"textarea",rows:3,modelValue:s.editingItem.icon_svg,"onUpdate:modelValue":e[7]||(e[7]=R=>s.editingItem.icon_svg=R)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["label"])):O("",!0),n.has_enable_disable?(v(),D(w,{key:5,style:{"margin-bottom":"5px"}},{default:y(()=>[_(M,{disabled:n.saving,"true-value":"yes","false-value":"no",modelValue:s.editingItem.enabled,"onUpdate:modelValue":e[8]||(e[8]=R=>s.editingItem.enabled=R),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Enable this link")),1)]),_:1},8,["disabled","modelValue"])]),_:1})):O("",!0),s.editingItem.is_system!="yes"?(v(),D(w,{key:6},{default:y(()=>[_(M,{disabled:n.saving,"true-value":"yes","false-value":"no",modelValue:s.editingItem.new_tab,"onUpdate:modelValue":e[9]||(e[9]=R=>s.editingItem.new_tab=R),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Open this link in a new tab.")),1)]),_:1},8,["disabled","modelValue"])]),_:1})):O("",!0),_(w,{label:t.$t("Visibility")},{default:y(()=>[_(C,{disabled:n.saving,modelValue:s.editingItem.privacy,"onUpdate:modelValue":e[10]||(e[10]=R=>s.editingItem.privacy=R)},{default:y(()=>[_(k,{label:t.$t("Everyone"),value:"public"},null,8,["label"]),_(k,{label:t.$t("Logged-in only"),value:"logged_in"},null,8,["label"]),_(k,{label:t.$t("Public only"),value:"logged_out_only"},null,8,["label"]),_(k,{label:t.$t("By Space/Course Memberships"),value:"members_only"},null,8,["label"])]),_:1},8,["disabled","modelValue"]),g("div",hat,x(t.$t("Select who can see this link.")),1)]),_:1},8,["label"]),s.editingItem.privacy=="members_only"?(v(),D(w,{key:7,label:t.$t("Select Space/Course Memberships")},{default:y(()=>[_(P,{disabled:n.saving,modelValue:s.editingItem.membership_ids,"onUpdate:modelValue":e[11]||(e[11]=R=>s.editingItem.membership_ids=R),placeholder_text:t.$t("Select Memberships"),is_multiple:!0},null,8,["disabled","modelValue","placeholder_text"])]),_:1},8,["label"])):O("",!0),s.urlErrors.length?(v(),D(T,{key:s.validationAttempt,type:"warning",closable:!0,"show-icon":"",style:{margin:"8px 0"}},{title:y(()=>[g("div",null,[g("ul",null,[(v(!0),$(J,null,ye(s.urlErrors,(R,V)=>(v(),$("li",{style:{"margin-bottom":"0"},key:V},x(R),1))),128))])])]),_:1})):O("",!0),_(w,null,{default:y(()=>[_(r,{disabled:n.saving,class:"fcom_primary_button",onClick:e[12]||(e[12]=R=>o.createOrUpdateLink())},{default:y(()=>[N(x(n.saving?t.$t("Saving..."):t.$t("Save")),1)]),_:1},8,["disabled"]),o.showDrawerDelete?(v(),D(r,{key:0,disabled:n.saving,type:"danger",plain:"",onClick:e[13]||(e[13]=R=>o.removeEditingLink())},{default:y(()=>[N(x(t.$t("Delete")),1)]),_:1},8,["disabled"])):O("",!0)]),_:1})]),_:1},8,["disabled"])])):O("",!0)]),_:1},8,["modelValue","size","before-close","has-close-confirmation","close-confirmation-message"])],64)}const OS=ce(Vrt,[["render",fat]]),pat={name:"MenuSettings",components:{MenuGroupSettings:OS,Layout:yi,AppLayout:bi,ContentDivider:Rrt,ActionPopover:aa},data(){return{menuSettings:null,loading:!1,saving:!1,editingGroupSlug:null,editingGroupTitle:""}},methods:{fetchMenuItems(){this.loading||(this.loading=!0,this.$get("settings/menu-settings").then(t=>{this.menuSettings=t.menuSettings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1}))},isSaveBlocked(){return this.saving?(this.$notify.info(this.$t("Please wait for the current operation to complete.")),!0):!1},saveMenuItems({customSuccessMessage:t=null}={}){return this.isSaveBlocked()?Promise.reject():(this.saving=!0,this.$post("settings/menu-settings",{menuSettings:this.menuSettings}).then(e=>{this.$notify.success(t||e.message),this.$eventBus.emit("reloadMenu")}).catch(e=>{this.$handleError(e),this.fetchMenuItems()}).finally(()=>{this.saving=!1}))},addFooterGroup(){if(this.isSaveBlocked())return;const t="custom_footer_group_"+Date.now(),e={title:this.$t("Untitled Group"),slug:t,items:[]};this.menuSettings.afterCommunityLinkGroups.push(e),this.saveMenuItems({customSuccessMessage:this.$t("New group added successfully.")}).then(()=>{this.editingGroupSlug=t,this.editingGroupTitle=this.$t("Untitled Group")})},resetGroupEditState(){this.editingGroupSlug=null,this.editingGroupTitle=""},initiateEditGroupTitle(t){const e=this.menuSettings.afterCommunityLinkGroups[t];e&&(this.editingGroupSlug=e.slug,this.editingGroupTitle=e.title||"")},saveGroupTitle(t){if(this.isSaveBlocked())return;const e=this.menuSettings.afterCommunityLinkGroups[t];if(!e)return;const n=(this.editingGroupTitle||"").trim();if(!n)return this.deleteGroup(t);e.title=n,this.saveMenuItems({customSuccessMessage:this.$t("Group title updated successfully.")}).then(()=>{this.resetGroupEditState()})},deleteGroup(t){this.isSaveBlocked()||this.$confirm(this.$t("Are you sure you want to remove this group and all its links?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.menuSettings.afterCommunityLinkGroups.splice(t,1),this.saveMenuItems({customSuccessMessage:this.$t("Group deleted successfully.")})}).catch(()=>{})}},mounted(){this.fetchMenuItems()}},mat={class:"settings_router"},gat={key:0},vat={class:"fcom_card_sections"},_at={class:"fcom_card_sections"},yat={class:"fcom_card_sections"},bat={key:0,style:{display:"flex","align-items":"center",gap:"8px"}},wat={key:1,style:{display:"flex","align-items":"center",gap:"8px"}},kat={style:{margin:"0"}},Cat={style:{"margin-top":"20px","text-align":"center"}},xat={key:1,class:"fcom_card_sections",style:{padding:"30px","text-align":"center"}},Sat={style:{margin:"0 0 15px",color:"var(--fcom-secondary-text, #6b7280)"}},$at={key:1,class:"white_loaded"};function Aat(t,e,n,i,s,o){const r=ze,a=B("menu-group-settings"),l=B("content-divider"),c=ht,u=B("action-popover"),d=Vt,h=B("layout"),f=B("app-layout");return v(),D(f,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:y(()=>[_(h,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Menu Settings")},{actions:y(()=>[_(r,{class:"fcom_primary_button",disabled:s.saving||s.loading,onClick:e[0]||(e[0]=p=>o.saveMenuItems({customSuccessMessage:t.$t("Menu settings saved successfully.")}))},{default:y(()=>[g("span",null,x(t.$t("Save Settings")),1)]),_:1},8,["disabled"])]),default:y(()=>[g("div",mat,[s.menuSettings?(v(),$("div",gat,[g("div",vat,[s.menuSettings.mainMenuItems?(v(),D(a,{key:0,custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:o.saveMenuItems,title:t.$t("Primary Menu Items"),menuItems:s.menuSettings.mainMenuItems,saving:s.saving},null,8,["onSave","title","menuItems","saving"])):O("",!0)]),g("div",_at,[s.menuSettings.profileDropdownItems?(v(),D(a,{key:0,custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:o.saveMenuItems,title:t.$t("Profile Dropdown Items"),menuItems:s.menuSettings.profileDropdownItems,saving:s.saving},null,8,["onSave","title","menuItems","saving"])):O("",!0)]),g("div",yat,[s.menuSettings.beforeCommunityMenuItems?(v(),D(a,{key:0,custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:o.saveMenuItems,title:t.$t("Top Links (At Sidebar)"),menuItems:s.menuSettings.beforeCommunityMenuItems,saving:s.saving},null,8,["onSave","title","menuItems","saving"])):O("",!0)]),s.menuSettings.afterCommunityLinkGroups?(v(),$(J,{key:0},[_(l,null,{default:y(()=>[N(x(t.$t("Sidebar Bottom Link Groups")),1)]),_:1}),s.menuSettings.afterCommunityLinkGroups.length?(v(),$(J,{key:0},[(v(!0),$(J,null,ye(s.menuSettings.afterCommunityLinkGroups,(p,m)=>(v(),$("div",{class:"fcom_card_sections",key:p.slug},[_(a,{custom_svg:!0,has_svg:!1,use_icon_selector:!0,onSave:o.saveMenuItems,title:p.title||t.$t("Untitled Group"),menuItems:p.items,saving:s.saving},{title:y(()=>[s.editingGroupSlug===p.slug?(v(),$("div",bat,[_(c,{modelValue:s.editingGroupTitle,"onUpdate:modelValue":e[1]||(e[1]=b=>s.editingGroupTitle=b),disabled:s.saving,placeholder:t.$t("Group Title"),size:"default",onKeyup:ut(b=>o.saveGroupTitle(m),["enter"])},null,8,["modelValue","disabled","placeholder","onKeyup"]),_(r,{class:"fcom_primary_button",disabled:s.saving,onClick:b=>o.saveGroupTitle(m),style:{"padding-top":"18px","padding-bottom":"18px"}},{default:y(()=>[N(x(t.$t("Save")),1)]),_:1},8,["disabled","onClick"]),_(r,{class:"fcom_secondary_button",disabled:s.saving,style:{"margin-left":"0px","padding-top":"18px","padding-bottom":"18px"},onClick:o.resetGroupEditState},{default:y(()=>[N(x(t.$t("Cancel")),1)]),_:1},8,["disabled","onClick"])])):(v(),$("div",wat,[g("h4",kat,x(p.title||t.$t("Untitled Group")),1),s.saving?O("",!0):(v(),D(u,{key:0,items:[{label:t.$t("Edit Title"),action:()=>{o.initiateEditGroupTitle(m)}},{label:t.$t("Delete Group"),type:"danger",action:()=>{o.deleteGroup(m)}}]},null,8,["items"]))]))]),_:2},1032,["onSave","title","menuItems","saving"])]))),128)),g("div",Cat,[_(r,{disabled:s.saving,onClick:e[2]||(e[2]=p=>o.addFooterGroup()),class:"fcom_secondary_button"},{default:y(()=>[N(x(t.$t("Add Another Group")),1)]),_:1},8,["disabled"])])],64)):(v(),$("div",xat,[g("p",Sat,x(t.$t("No bottom link group has been created yet. Create one to add links to the sidebar bottom.")),1),_(r,{disabled:s.saving,onClick:e[3]||(e[3]=p=>o.addFooterGroup()),class:"fcom_primary_button"},{default:y(()=>[N(x(t.$t("Add Group")),1)]),_:1},8,["disabled"])]))],64)):O("",!0)])):(v(),$("div",$at,[_(d,{animated:!0,rows:10})]))])]),_:1},8,["title"])]),_:1})}const Eat=ce(pat,[["render",Aat]]),Mat={name:"ManagerForm",props:["modelValue"],emits:["completed"],data(){return{users:[],loading:!1,form:this.modelValue||{user_id:"",roles:[]},adding:!1}},methods:{fetchUsers(t=""){this.loading=!0,this.$get("admin/users",{context:"add_manager",search:t}).then(e=>{this.users=e.users.data}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},addManager(){if(!this.form.user_id||!this.form.roles.length){this.$notify.error(this.$t("Please select a user and role"));return}this.adding=!0,this.$post("admin/managers",{user_id:this.form.user_id,roles:this.form.roles}).then(t=>{this.$notify.success(t.message),this.$emit("completed")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.adding=!1})}},mounted(){this.form.roles||(this.form.roles=[]),this.modelValue.editing_user||this.fetchUsers()}},Tat={style:{float:"left"}},Pat={style:{float:"right",color:"#8492a6","font-size":"13px"}},Iat={key:1},Lat={class:"dialog_footer"},Oat={key:0},Dat={key:1};function Rat(t,e,n,i,s,o){const r=Zt,a=Wt,l=tn,c=oa,u=qt,d=o2,h=ze,f=nn,p=xt("loading");return v(),D(f,{onSubmit:e[3]||(e[3]=Me(m=>t.doNothing(),["prevent"])),"label-position":"top",modelValue:s.form,"onUpdate:modelValue":e[4]||(e[4]=m=>s.form=m),size:"large"},{default:y(()=>[s.form.editing_user?(v(),$("p",Iat,x(t.$t("Editing manager role for %s",s.form.editing_user.display_name)),1)):(v(),D(l,{key:0,label:t.$t("User")},{default:y(()=>[_(a,{class:"rich_select",filterable:"",remote:"",loading:s.loading,"remote-method":o.fetchUsers,placeholder:t.$t("Select User"),modelValue:s.form.user_id,"onUpdate:modelValue":e[0]||(e[0]=m=>s.form.user_id=m)},{default:y(()=>[(v(!0),$(J,null,ye(s.users,m=>(v(),D(r,{key:m.ID,label:m.display_name+" ("+m.user_email+")",value:m.ID},{default:y(()=>[g("span",Tat,x(m.display_name),1),g("span",Pat,x(m.user_email),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["loading","remote-method","placeholder","modelValue"])]),_:1},8,["label"])),_(c,{type:"info",closable:!1,class:"fcom_mb_10"},{default:y(()=>[N(x(t.$t("For course editor access, please make sure the selected user have contributor or higher user role.")),1)]),_:1}),_(l,{label:t.$t("Space Management Roles")},{default:y(()=>[_(d,{modelValue:s.form.roles,"onUpdate:modelValue":e[1]||(e[1]=m=>s.form.roles=m)},{default:y(()=>[_(u,{value:"admin",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Community Admin (All Access)")),1)]),_:1}),_(u,{disabled:s.form.roles.includes("admin"),value:"moderator",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Space Moderator")),1)]),_:1},8,["disabled"]),_(u,{disabled:s.form.roles.includes("admin"),value:"course_admin",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Course Admin")),1)]),_:1},8,["disabled"]),_(u,{disabled:s.form.roles.includes("admin")||s.form.roles.includes("course_admin"),value:"course_creator",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Course Creator")),1)]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),g("div",Lat,[le(t.$slots,"after_form",{},()=>[Re((v(),D(h,{class:"fcom_primary_button",disabled:s.adding,onClick:e[2]||(e[2]=m=>o.addManager())},{default:y(()=>[s.form.editing_user?(v(),$("span",Oat,x(t.$t("Update Role")),1)):(v(),$("span",Dat,x(t.$t("Add Manager")),1))]),_:1},8,["disabled"])),[[p,s.adding]])])])]),_:3},8,["modelValue"])}const Vat=ce(Mat,[["render",Rat]]),Fat={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 t=Mh(this.xprofile.total_points);return t?t.level:0},withCompletion(){var n;if(!this.with_completion||!((n=this.xprofile)!=null&&n.total_points))return!1;const t=Mh(this.xprofile.total_points),e=Mh(t.max_points+1);return t.level!==e.level},getOutlineStyle(){if(!this.withCompletion)return{};const t=Mh(this.xprofile.total_points),e=Mh(t.max_points+1),n=this.xprofile.total_points-t.min_points,i=e.min_points-t.min_points,o=n/i*100/100*360;return{backgroundImage:`conic-gradient(rgb(56, 117, 223) ${o}deg, #D9D9D9 ${o}deg)`}}},methods:{setAltImg(t){t.target.src=this.appVars.assets_url+"images/placeholder.png"}}},Nat=["src"],Bat={key:1,class:"fcom_no_image"},zat=["aria-label"];function Hat(t,e,n,i,s,o){return v(),$("div",{class:q([{fcom_avatar_is_rounded:n.is_rounded,is_member_online:n.is_online},"fcom_user_avatar"])},[g("span",{style:Xe(o.getOutlineStyle),class:q({fcom_compilation_avatar:o.withCompletion})},[n.xprofile?(v(),$("img",{key:0,onError:e[0]||(e[0]=(...r)=>o.setAltImg&&o.setAltImg(...r)),src:n.xprofile.avatar,alt:""},null,40,Nat)):(v(),$("span",Bat))],6),o.level||n.is_online?(v(),$("div",{key:0,role:"region","aria-label":t.$t("User Level"),class:"fcom_user_level_mark"},[g("span",null,x(o.level),1)],8,zat)):O("",!0)],2)}const q2=ce(Fat,[["render",Hat]]),Uat={name:"ModeratorSettings",components:{UserAvatar:q2,UserRouteLink:ua,ManagerForm:Vat,Layout:yi,AppLayout:bi},data(){return{managers:[],loading:!1,paginate:{page:1,per_page:20,total:0},search:"",bulkAction:"",showModal:!1,editing_manager:{user_id:"",roles:[]}}},methods:{applyBulkAction(){this.bulkAction=""},showForm(t){this.editing_manager=t?{user_id:t.ID,roles:t.community_role.value,editing_user:t}:{user_id:"",roles:[]},this.showModal=!0},fetch(){this.loading=!0,this.$get("admin/managers",{page:this.paginate.page,per_page:this.paginate.per_page,search:this.search}).then(t=>{this.managers=t.managers.data,this.paginate.total=t.total}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},removeManager(t){this.$confirm(this.$t("Are you sure you want to remove this manager?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Remove"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.working=!0,this.$del("admin/managers/"+t.ID).then(e=>{this.$notify.success(e.message),this.fetch()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})})},formatRoles(t){let e=[];return this.each(t,n=>{e.push(this.$labelize(n))}),e.join(", ")}},mounted(){this.has_pro&&this.fetch(),this.changeTitle(this.$t("Moderator Settings"))}},jat=["href"],Wat={class:"settings_router manager_section"},Yat={class:"fhr_content_layout_body"},qat={key:0,class:"setting_body"},Gat={class:"fcom_manager_actions"},Xat={class:"bulk_search"},Kat={class:"fcom_manager_table"},Zat={class:"user_col"},Jat={class:"user_info"},Qat={style:{display:"flex"}},elt={class:"user_id"},tlt={class:"user_email"},nlt={class:"fcom_table_action_col"},slt={key:1,class:"setting_body",style:{"text-align":"center"}},ilt={class:"promo_description"},olt=["href"],rlt={class:"dialog_header"},alt={class:"dialog_left"},llt={class:"dialog_body"};function clt(t,e,n,i,s,o){const r=B("Plus"),a=we,l=ze,c=ht,u=d8,d=B("user-route-link"),h=Il,f=Pl,p=B("layout"),m=B("app-layout"),b=B("manager-form"),w=$s,k=xt("loading");return v(),$(J,null,[_(m,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:y(()=>[_(p,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Community Managers")},{actions:y(()=>[t.has_pro?(v(),D(l,{key:0,class:"fcom_primary_button",onClick:e[0]||(e[0]=C=>o.showForm(null))},{default:y(()=>[_(a,null,{default:y(()=>[_(r)]),_:1}),g("span",null,x(t.$t("Add Manager")),1)]),_:1})):(v(),$("a",{key:1,target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_moderators"),class:"el-button el-button--danger"},x(t.$t("Upgrade to Pro")),9,jat))]),default:y(()=>[g("div",Wat,[g("div",Yat,[t.has_pro?(v(),$("div",qat,[g("div",Gat,[g("div",Xat,[_(c,{modelValue:s.search,"onUpdate:modelValue":e[1]||(e[1]=C=>s.search=C),onKeydown:ut(o.fetch,["enter"]),placeholder:t.$t("Search"),class:"el-input-round"},{prefix:y(()=>[...e[5]||(e[5]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[g("path",{d:"M14.5833 14.584L18.3333 18.334",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M16.6667 9.16699C16.6667 5.02486 13.3088 1.66699 9.16666 1.66699C5.02453 1.66699 1.66666 5.02486 1.66666 9.16699C1.66666 13.3091 5.02453 16.667 9.16666 16.667C13.3088 16.667 16.6667 13.3091 16.6667 9.16699Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})],-1)])]),_:1},8,["modelValue","onKeydown","placeholder"])])]),g("div",Kat,[Re((v(),D(f,{data:s.managers,"empty-text":t.$t("No Managers Found")},{default:y(()=>[_(h,{label:t.$t("Members"),sortable:"","min-width":"160"},{default:y(C=>[g("div",Zat,[_(u,{src:C.row.xprofile.avatar},null,8,["src"]),g("div",Jat,[g("div",Qat,[_(d,{xprofile:C.row.xprofile},null,8,["xprofile"]),g("span",elt,"#"+x(C.row.ID),1)]),g("span",tlt,x(C.row.user_email),1)])])]),_:1},8,["label"]),_(h,{label:t.$t("Role"),sortable:""},{default:y(C=>[g("span",null,x(o.formatRoles(C.row.community_role.value)),1)]),_:1},8,["label"]),_(h,null,{default:y(C=>[g("div",nlt,[_(l,{onClick:A=>o.showForm(C.row),size:"small"},{default:y(()=>[N(x(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(l,{onClick:A=>o.removeManager(C.row),type:"danger",plain:"",size:"small"},{default:y(()=>[N(x(t.$t("Remove")),1)]),_:1},8,["onClick"])])]),_:1})]),_:1},8,["data","empty-text"])),[[k,s.loading]])])])):(v(),$("div",slt,[g("p",ilt,x(t.$t("__MODERATOR_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_moderators"),class:"el-button el-button--danger"},x(t.$t("Upgrade to Pro")),9,olt)]))])])]),_:1},8,["title"])]),_:1}),_(w,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:s.showModal,"onUpdate:modelValue":e[4]||(e[4]=C=>s.showModal=C),direction:"rtl"},{header:y(({close:C})=>[g("div",rlt,[g("div",alt,[e[6]||(e[6]=g("div",{class:"header_icon"},[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[g("path",{d:"M11.5 11.689V13.2565C10.8212 13.0165 10.0947 12.9429 9.38155 13.0418C8.6684 13.1408 7.9894 13.4094 7.40157 13.8252C6.81375 14.2409 6.33426 14.7916 6.00337 15.4311C5.67249 16.0705 5.49986 16.78 5.5 17.5L4 17.4993C3.99977 16.5834 4.20919 15.6797 4.61222 14.8573C5.01526 14.0349 5.6012 13.3157 6.32516 12.7548C7.04912 12.1939 7.89188 11.8061 8.78887 11.6212C9.68585 11.4364 10.6132 11.4593 11.5 11.6883V11.689ZM10 10.75C7.51375 10.75 5.5 8.73625 5.5 6.25C5.5 3.76375 7.51375 1.75 10 1.75C12.4862 1.75 14.5 3.76375 14.5 6.25C14.5 8.73625 12.4862 10.75 10 10.75ZM10 9.25C11.6575 9.25 13 7.9075 13 6.25C13 4.5925 11.6575 3.25 10 3.25C8.3425 3.25 7 4.5925 7 6.25C7 7.9075 8.3425 9.25 10 9.25ZM14.5 13.75V11.5H16V13.75H18.25V15.25H16V17.5H14.5V15.25H12.25V13.75H14.5Z",fill:"currentColor"})])],-1)),g("div",null,[g("h4",null,x(t.$t(s.editing_manager.editing_user?"Update Role":"Add Manager")),1),g("p",null,x(t.$t("you can edit your role here")),1)])])])]),default:y(()=>[g("div",llt,[s.showModal?(v(),D(b,{key:0,onCompleted:e[2]||(e[2]=()=>{o.fetch(),s.showModal=!1}),modelValue:s.editing_manager,"onUpdate:modelValue":e[3]||(e[3]=C=>s.editing_manager=C)},null,8,["modelValue"])):O("",!0)])]),_:1},8,["width","modelValue"])],64)}const ult=ce(Uat,[["render",clt]]),dlt={name:"NestedReplyBox",mixins:[W2],components:{SingleComment:Y2,FeedTextComposer:bv,CommentReactions:yU,HeartIcon:U2},props:["comment","feed","checkPermission","show_reacts_only","defaultMentions","is_modal"],emits:["commented","copyLink"],data(){return{open:!1,composerOpen:!1,replyingToId:null,autofocusInput:!1,focusTick:0,composerKey:0,commentReply:{message:"",media_images:[]},submitting:!1}},computed:{canComment(){return this.hasCommentPermission(this.feed)||!this.checkPermission}},methods:{maybeSave(t){(t.metaKey||t.ctrlKey)&&t.keyCode===13&&this.addComment()},addComment(){var e,n,i;const t=((e=this.commentReply.media_images)==null?void 0:e.length)>0||((i=(n=this.commentReply.meta)==null?void 0:n.media_preview)==null?void 0:i.image);!this.commentReply.message&&!t||!this.comment.id||(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,meta:this.commentReply.meta}).then(s=>{var o;this.comment.comments||(this.comment.comments=[]),this.commentReply={message:"",media_images:[]},(o=this.$refs.composer)==null||o.clearContent(),this.comment.comments.push(s.comment),Array.isArray(this.feed.comments)&&this.feed.comments.push(s.comment),this.$emit("commented",s.comment),this.$eventBus.emit("recent_activities_refresh"),s.comment.status==="published"&&(this.feed.comments_count=parseInt(this.feed.comments_count)+1),this.$nextTick(()=>{this.scrollCommentIntoView(s.comment.id,this.comment.id)})}).catch(s=>{this.$handleError(s)}).finally(()=>{this.submitting=!1}))},toggleCommentBox(t,e=!0){var r;if(!this.hasCommentPermission(this.feed)){this.$notify({message:this.$t("Please join the Space to post a comment."),type:"warning"});return}const n=t==null?void 0:t.id,i=(r=t==null?void 0:t.xprofile)==null?void 0:r.username,s=e&&i&&t.user_id!=this.auth.user_id?i:"";if(!e){this.open=this.composerOpen=!this.open,this.replyingToId=null,this.autofocusInput=!1;return}if(this.composerOpen&&this.replyingToId===n){this.composerOpen=!1;return}const o=this.composerOpen;this.replyingToId=n,this.open=this.composerOpen=this.autofocusInput=!0,this.isComposerEmpty()?(this.commentReply.message=s?`@${s} `:"",o&&this.composerKey++):this.focusTick++},isComposerEmpty(){return!(this.commentReply.message||"").replace(/&#x20;|\u00A0/gi,"").trim()},handleCommentDelete(t){const e=this.comment.comments[t];this.comment.comments.splice(t,1),e!=null&&e.id&&Array.isArray(this.feed.comments)&&(this.feed.comments=this.feed.comments.filter(n=>n.id!==e.id)),this.feed.comments_count--},toggleLike(t){let e=!t.liked;this.$post("feeds/"+this.feed.id+"/comments/"+t.id+"/reactions",{state:e?1:0}).then(n=>{t.liked=n.liked,t.reactions_count=n.reactions_count}).catch(n=>{this.$handleError(n)})},emitCopyLink(t){this.$emit("copyLink",t)}}},hlt={key:0,class:"reply_box"},flt=["aria-expanded"],plt={class:"fcom_comments_react fcom_reaction_list"},mlt={class:"child_comments"},glt=["id"],vlt={key:0,class:"reply_box"},_lt=["onClick","aria-expanded"],ylt={class:"fcom_comments_react fcom_reaction_list"},blt={key:0,class:"child_reply_wrap"},wlt={class:"feed_commenting"},klt={class:"person_avatar"},Clt=["alt","src"];function xlt(t,e,n,i,s,o){var h;const r=B("HeartIcon"),a=we,l=B("CommentReactions"),c=B("single-comment"),u=ze,d=B("feed-text-composer");return v(),$(J,null,[o.canComment?(v(),$("div",hlt,[((h=n.feed.meta)==null?void 0:h.comments_disabled)!=="yes"?(v(),$("button",{key:0,type:"button",onClick:e[0]||(e[0]=f=>o.toggleCommentBox(n.comment)),class:"reply_btn","aria-expanded":s.composerOpen&&s.replyingToId===n.comment.id},x(t.$t("Reply")),9,flt)):O("",!0),g("span",{class:q([{fcom_is_liked:n.comment.liked},"reply_btn"])},[g("div",plt,[_(a,{role:"button",tabindex:"0","aria-label":t.$t("React"),"aria-pressed":!!n.comment.liked,class:q({user_reacted:n.comment.liked}),onClick:e[1]||(e[1]=f=>o.toggleLike(n.comment)),onKeydown:[e[2]||(e[2]=ut(Me(f=>o.toggleLike(n.comment),["prevent"]),["enter"])),e[3]||(e[3]=ut(Me(f=>o.toggleLike(n.comment),["prevent"]),["space"]))]},{default:y(()=>[_(r,{filled:n.comment.liked},null,8,["filled"])]),_:1},8,["aria-label","aria-pressed","class"]),parseInt(n.comment.reactions_count)?(v(),D(l,{key:0,comment:n.comment},null,8,["comment"])):O("",!0)])],2),le(t.$slots,"after_reply_box_text",{toggleOpen:()=>o.toggleCommentBox(n.comment,!1),open:s.open})])):O("",!0),!n.show_reacts_only||s.open?(v(),$(J,{key:1},[g("div",mlt,[(v(!0),$(J,null,ye(n.comment.comments,(f,p)=>(v(),$("div",{id:"comment_"+f.id,class:"each_comment"},[_(c,{onCopyLink:o.emitCopyLink,onDeleted:m=>o.handleCommentDelete(p),comment:f,show_report:!0},{after_comment_text:y(()=>{var m;return[o.canComment?(v(),$("div",vlt,[((m=n.feed.meta)==null?void 0:m.comments_disabled)!=="yes"?(v(),$("button",{key:0,type:"button",onClick:b=>o.toggleCommentBox(f),class:"reply_btn","aria-expanded":s.composerOpen&&s.replyingToId===f.id},x(t.$t("Reply")),9,_lt)):O("",!0),g("span",{class:q([{fcom_is_liked:f.liked},"reply_btn"])},[g("div",ylt,[_(a,{role:"button",tabindex:"0","aria-label":t.$t("React"),"aria-pressed":!!f.liked,class:q({user_reacted:f.liked}),onClick:b=>o.toggleLike(f),onKeydown:[ut(Me(b=>o.toggleLike(f),["prevent"]),["enter"]),ut(Me(b=>o.toggleLike(f),["prevent"]),["space"])]},{default:y(()=>[_(r,{filled:f.liked},null,8,["filled"])]),_:2},1032,["aria-label","aria-pressed","class","onClick","onKeydown"]),parseInt(f.reactions_count)?(v(),D(l,{key:0,comment:f},null,8,["comment"])):O("",!0)])],2)])):O("",!0)]}),_:2},1032,["onCopyLink","onDeleted","comment"])],8,glt))),256))]),s.composerOpen?(v(),$("div",blt,[g("div",wlt,[g("div",klt,[g("img",{alt:t.$t("Your Photo"),src:t.auth.avatar},null,8,Clt)]),g("div",{onKeydown:e[5]||(e[5]=ut((...f)=>o.maybeSave&&o.maybeSave(...f),["enter"])),class:"feed_comment_input comment_text"},[(v(),D(d,{ref:"composer",key:s.composerKey,config:{multipleMedia:!0},context:"comment",is_modal:n.is_modal,defaultMentions:n.defaultMentions?n.defaultMentions:[],disabled:s.submitting,autofocus:s.autofocusInput,autofocus_changed:s.focusTick,mentionQuery:{space_id:n.feed.space_id},content:s.commentReply,placeholder:t.$t("Leave a reply")},{default:y(()=>[_(u,{loading:s.submitting,disabled:s.submitting,onClick:e[4]||(e[4]=f=>o.addComment()),class:"fcom_primary_button"},{default:y(()=>[N(x(t.$t("Reply")),1)]),_:1},8,["loading","disabled"])]),_:1},8,["is_modal","defaultMentions","disabled","autofocus","autofocus_changed","mentionQuery","content","placeholder"]))],32)])])):O("",!0)],64)):O("",!0)],64)}const Slt=ce(dlt,[["render",xlt]]),$lt={name:"FeedComments",components:{SingleComment:Y2,NestedReplyBox:Slt},props:["feed","show_all","checkPermission","defaultMentions","sortBy","is_single","is_modal"],emits:["forceShowAll"],created(){this._lastSortBy=null,this._sortedTopLevelIds=null},data(){return{loading:!1}},computed:{_displayData(){const t=this.feed.comments;if(!t||!t.length)return{list:[],lastComment:null};const e={},n=[],i={};let s=null;for(let l=0;l<t.length;l++){const c=t[l];!s&&c.is_sticky&&(s=c),c.parent_id?(e[c.parent_id]||(e[c.parent_id]=[]),e[c.parent_id].push(c)):(n.push(c.id),i[c.id]=c)}for(const l of n)i[l].comments=e[l]||void 0;if(s&&i[s.id]){s=i[s.id];const l=n.indexOf(s.id);l!==-1&&n.splice(l,1),delete i[s.id]}const o=s||(n.length?i[n[n.length-1]]:null);if(!n.length&&!s)return{list:[],lastComment:null};const r=this.sortBy;if(this._lastSortBy!==r){let l=[...n];r==="oldest"||!r?l.sort((c,u)=>c-u):r==="latest"?l.sort((c,u)=>u-c):r==="popular"?l.sort((c,u)=>{var d,h;return(((d=i[u])==null?void 0:d.reactions_count)||0)-(((h=i[c])==null?void 0:h.reactions_count)||0)}):r==="most_replied"&&l.sort((c,u)=>{var d,h;return(((d=e[u])==null?void 0:d.length)||0)-(((h=e[c])==null?void 0:h.length)||0)}),this._sortedTopLevelIds=l,this._lastSortBy=r}let a;if(this._sortedTopLevelIds){const l=new Set(n),c=new Set(this._sortedTopLevelIds);a=this._sortedTopLevelIds.filter(u=>l.has(u)&&i[u]).map(u=>i[u]);for(let u=n.length-1;u>=0;u--)c.has(n[u])||a.unshift(i[n[u]])}else a=n.map(l=>i[l]);return s&&a.unshift(s),{list:a,lastComment:o}},displayComments(){return this._displayData.list},lastComment(){return this._displayData.lastComment}},methods:{fetchComments(){this.loading=!0,this.$get("feeds/"+this.feed.id+"/comments").then(t=>{this.feed.comments=t.comments}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},collectCommentIds(t){var i;const e=new Set([t.id]),n=t.comments?[...t.comments]:[];for(;n.length;){const s=n.pop();e.add(s.id),(i=s.comments)!=null&&i.length&&n.push(...s.comments)}return e},handleCommentDelete(t){const e=this.collectCommentIds(t);this.feed.comments=this.feed.comments.filter(n=>!e.has(n.id)),this.feed.comments_count-=e.size},handleStickyCommentDelete(){this.feed.sticky_comment=null,this.feed.comments_count--},copyCommentLink(t){let e={name:"single_feed",params:{feed_slug:this.feed.slug},query:{comment_id:t.id}};this.feed.course_id&&(e={name:"view_lesson",params:{lesson_slug:this.feed.slug},query:{comment_id:t.id}});let n=this.$router.resolve(e),i=this.appVars.urls.portal_base;i=i.replace(/\/$/,"");let s=i+n.fullPath;navigator.clipboard.writeText(s).then(()=>{this.$notify.success(this.$t("Link copied to clipboard"))}).catch(o=>{this.$notify.error(this.$t("Failed to copy the link"))})},maybeShowAllComments(){if(this.is_single||!this.hasFeature("show_post_modal")){this.$emit("forceShowAll");return}this.$eventBus.emit("showFeedModal",{feed:this.feed,view:"comments"})}},mounted(){!this.feed.comments&&this.feed.comments_count&&this.fetchComments()}},Alt={key:0,class:"feed_comments"},Elt=["id"],Mlt={key:1,class:"feed_comments"},Tlt=["id"],Plt=["onClick","aria-expanded"];function Ilt(t,e,n,i,s,o){const r=Vt,a=B("nested-reply-box"),l=B("single-comment");return n.show_all?(v(),$("div",Alt,[s.loading?(v(),D(r,{key:0,row:5,class:"feed_comments_skeleton"})):(v(),$(J,{key:1},[le(t.$slots,"before_comments_start"),(v(!0),$(J,null,ye(o.displayComments,(c,u)=>(v(),$("div",{class:"each_comment",key:c.id,id:"comment_"+c.id},[_(l,{comment:c,space_id:n.feed.space_id,show_report:!0,onCopyLink:o.copyCommentLink,onReload:o.fetchComments,onDeleted:d=>o.handleCommentDelete(c)},hs({_:2},[c.parent_id?void 0:{name:"after_comment_text",fn:y(()=>[_(a,{feed:n.feed,comment:c,checkPermission:n.checkPermission,defaultMentions:n.defaultMentions?n.defaultMentions:[],is_modal:n.is_modal,onCopyLink:o.copyCommentLink},null,8,["feed","comment","checkPermission","defaultMentions","is_modal","onCopyLink"])]),key:"0"}]),1032,["comment","space_id","onCopyLink","onReload","onDeleted"])],8,Elt))),128))],64))])):o.lastComment?(v(),$("div",Mlt,[g("div",{class:"each_comment",id:"comment_"+o.lastComment.id},[_(l,{comment:o.lastComment,space_id:n.feed.space_id,show_report:!0,onCopyLink:o.copyCommentLink,onDeleted:e[0]||(e[0]=c=>o.handleCommentDelete(o.lastComment))},hs({_:2},[o.lastComment.parent_id?void 0:{name:"after_comment_text",fn:y(()=>[_(a,{defaultMentions:n.defaultMentions?n.defaultMentions:[],onCopyLink:o.copyCommentLink,show_reacts_only:!0,checkPermission:n.checkPermission,feed:n.feed,comment:o.lastComment,is_modal:n.is_modal},{after_reply_box_text:y(({toggleOpen:c,open:u})=>[o.lastComment.comments&&o.lastComment.comments.length?(v(),$("button",{key:0,type:"button",onClick:d=>c(),class:"reply_btn last_comment_reply_txt","aria-expanded":u},x(t.$_n("%d reply","%d replies",o.lastComment.comments.length)),9,Plt)):O("",!0)]),_:1},8,["defaultMentions","onCopyLink","checkPermission","feed","comment","is_modal"])]),key:"0"}]),1032,["comment","space_id","onCopyLink"])],8,Tlt),n.feed.comments_count>1?(v(),$("div",{key:0,onClick:e[1]||(e[1]=c=>o.maybeShowAllComments()),class:"each_comment show_all_comments"},x(t.$t("View more comments")),1)):O("",!0)])):O("",!0)}const Llt=ce($lt,[["render",Ilt]]),Olt={name:"ReactedUsers",components:{UserRouteLink:ua},data(){return{centerDialogVisible:!1,reactions:null,loading:!1}},props:{feed:{type:Object,required:!0,default:()=>({})}},computed:{reactedProfiles(){let t=[],e=this.auth.user_id;return this.feed.has_user_react&&t.push({user_id:e,avatar:this.auth.avatar}),this.each(this.feed.reactions,n=>{n.user_id!=e&&n.xprofile&&t.push({user_id:n.user_id,avatar:n.xprofile.avatar})}),t.slice(0,3)}},methods:{getReactions(){this.reactions&&this.reactions.length===this.feed.reactions_count||(this.loading=!0,this.$get("feeds/"+this.feed.id+"/reactions").then(t=>{this.reactions=t.reactions,t.current_user_follows&&this.setFollowIds(t.current_user_follows),this.$nextTick(()=>{var e,n,i,s;(s=(i=(n=(e=this.$refs.reactedPopover)==null?void 0:e.popperRef)==null?void 0:n.popperInstanceRef)==null?void 0:i.update)==null||s.call(i)})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1}))}}},Dlt=["title"],Rlt={key:0,class:"reactions_avatars"},Vlt=["alt","src"],Flt={key:0},Nlt={key:1},Blt={class:"fcom_user_lists"},zlt={key:2};function Hlt(t,e,n,i,s,o){const r=Vt,a=B("UserAvatar"),l=B("UserRouteLink"),c=zs,u=Yo;return v(),D(u,{ref:"reactedPopover",persistent:!1,"popper-class":"fcom_feed_reacted_user_list",placement:"bottom",title:t.$t("Likes"),width:210,trigger:"click",onShow:o.getReactions},{reference:y(()=>[g("div",{title:t.$t("Click to view"),class:"fcom_reactions"},[o.reactedProfiles&&o.reactedProfiles.length?(v(),$("div",Rlt,[(v(!0),$(J,null,ye(o.reactedProfiles,d=>(v(),$("span",{key:d.id,class:"fcom_reaction_avatar fcom_avatar_is_rounded fcom_user_avatar"},[d!=null&&d.avatar?(v(),$("img",{key:0,alt:t.$t("Reacted Users"),src:d.avatar},null,8,Vlt)):O("",!0)]))),128))])):O("",!0),g("span",null,x(t.$_n("%s like","%s likes",n.feed.reactions_count)),1)],8,Dlt)]),default:y(()=>[s.loading?(v(),$("div",Flt,[_(r,{animated:!0,rows:3})])):s.reactions?(v(),$("div",Nlt,[_(c,{"max-height":"300px"},{default:y(()=>[g("ul",Blt,[(v(!0),$(J,null,ye(s.reactions,d=>(v(),$("li",null,[d.xprofile?(v(),$(J,{key:0},[_(a,{with_level:!1,xprofile:d.xprofile},null,8,["xprofile"]),_(l,{show_badge:!0,xprofile:d.xprofile,show_follow:!0},null,8,["xprofile"])],64)):O("",!0)]))),256))])]),_:1})])):(v(),$("div",zlt,[g("p",null,x(t.$t("Failed to load the list")),1)]))]),_:1},8,["title","onShow"])}const Ult=ce(Olt,[["render",Hlt]]);function jlt(){this.__data__=[],this.size=0}var Wlt=jlt;function Ylt(t,e){return t===e||t!==t&&e!==e}var AU=Ylt,qlt=AU;function Glt(t,e){for(var n=t.length;n--;)if(qlt(t[n][0],e))return n;return-1}var G2=Glt,Xlt=G2,Klt=Array.prototype,Zlt=Klt.splice;function Jlt(t){var e=this.__data__,n=Xlt(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():Zlt.call(e,n,1),--this.size,!0}var Qlt=Jlt,ect=G2;function tct(t){var e=this.__data__,n=ect(e,t);return n<0?void 0:e[n][1]}var nct=tct,sct=G2;function ict(t){return sct(this.__data__,t)>-1}var oct=ict,rct=G2;function act(t,e){var n=this.__data__,i=rct(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}var lct=act,cct=Wlt,uct=Qlt,dct=nct,hct=oct,fct=lct;function Pp(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}Pp.prototype.clear=cct;Pp.prototype.delete=uct;Pp.prototype.get=dct;Pp.prototype.has=hct;Pp.prototype.set=fct;var X2=Pp,pct=X2;function mct(){this.__data__=new pct,this.size=0}var gct=mct;function vct(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var _ct=vct;function yct(t){return this.__data__.get(t)}var bct=yct;function wct(t){return this.__data__.has(t)}var kct=wct,Cct=$p,xct=Cct(Object,"create"),K2=xct,kT=K2;function Sct(){this.__data__=kT?kT(null):{},this.size=0}var $ct=Sct;function Act(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Ect=Act,Mct=K2,Tct="__lodash_hash_undefined__",Pct=Object.prototype,Ict=Pct.hasOwnProperty;function Lct(t){var e=this.__data__;if(Mct){var n=e[t];return n===Tct?void 0:n}return Ict.call(e,t)?e[t]:void 0}var Oct=Lct,Dct=K2,Rct=Object.prototype,Vct=Rct.hasOwnProperty;function Fct(t){var e=this.__data__;return Dct?e[t]!==void 0:Vct.call(e,t)}var Nct=Fct,Bct=K2,zct="__lodash_hash_undefined__";function Hct(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Bct&&e===void 0?zct:e,this}var Uct=Hct,jct=$ct,Wct=Ect,Yct=Oct,qct=Nct,Gct=Uct;function Ip(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}Ip.prototype.clear=jct;Ip.prototype.delete=Wct;Ip.prototype.get=Yct;Ip.prototype.has=qct;Ip.prototype.set=Gct;var Xct=Ip,CT=Xct,Kct=X2,Zct=PS;function Jct(){this.size=0,this.__data__={hash:new CT,map:new(Zct||Kct),string:new CT}}var Qct=Jct;function eut(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var tut=eut,nut=tut;function sut(t,e){var n=t.__data__;return nut(e)?n[typeof e=="string"?"string":"hash"]:n.map}var Z2=sut,iut=Z2;function out(t){var e=iut(this,t).delete(t);return this.size-=e?1:0,e}var rut=out,aut=Z2;function lut(t){return aut(this,t).get(t)}var cut=lut,uut=Z2;function dut(t){return uut(this,t).has(t)}var hut=dut,fut=Z2;function put(t,e){var n=fut(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}var mut=put,gut=Qct,vut=rut,_ut=cut,yut=hut,but=mut;function Lp(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}Lp.prototype.clear=gut;Lp.prototype.delete=vut;Lp.prototype.get=_ut;Lp.prototype.has=yut;Lp.prototype.set=but;var DS=Lp,wut=X2,kut=PS,Cut=DS,xut=200;function Sut(t,e){var n=this.__data__;if(n instanceof wut){var i=n.__data__;if(!kut||i.length<xut-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new Cut(i)}return n.set(t,e),this.size=n.size,this}var $ut=Sut,Aut=X2,Eut=gct,Mut=_ct,Tut=bct,Put=kct,Iut=$ut;function Op(t){var e=this.__data__=new Aut(t);this.size=e.size}Op.prototype.clear=Eut;Op.prototype.delete=Mut;Op.prototype.get=Tut;Op.prototype.has=Put;Op.prototype.set=Iut;var EU=Op,Lut="__lodash_hash_undefined__";function Out(t){return this.__data__.set(t,Lut),this}var Dut=Out;function Rut(t){return this.__data__.has(t)}var Vut=Rut,Fut=DS,Nut=Dut,But=Vut;function tb(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Fut;++e<n;)this.add(t[e])}tb.prototype.add=tb.prototype.push=Nut;tb.prototype.has=But;var MU=tb;function zut(t,e){for(var n=-1,i=t==null?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}var Hut=zut;function Uut(t,e){return t.has(e)}var TU=Uut,jut=MU,Wut=Hut,Yut=TU,qut=1,Gut=2;function Xut(t,e,n,i,s,o){var r=n&qut,a=t.length,l=e.length;if(a!=l&&!(r&&l>a))return!1;var c=o.get(t),u=o.get(e);if(c&&u)return c==e&&u==t;var d=-1,h=!0,f=n&Gut?new jut:void 0;for(o.set(t,e),o.set(e,t);++d<a;){var p=t[d],m=e[d];if(i)var b=r?i(m,p,d,e,t,o):i(p,m,d,t,e,o);if(b!==void 0){if(b)continue;h=!1;break}if(f){if(!Wut(e,function(w,k){if(!Yut(f,k)&&(p===w||s(p,w,n,i,o)))return f.push(k)})){h=!1;break}}else if(!(p===m||s(p,m,n,i,o))){h=!1;break}}return o.delete(t),o.delete(e),h}var PU=Xut,Kut=Na,Zut=Kut.Uint8Array,Jut=Zut;function Qut(t){var e=-1,n=Array(t.size);return t.forEach(function(i,s){n[++e]=[s,i]}),n}var edt=Qut;function tdt(t){var e=-1,n=Array(t.size);return t.forEach(function(i){n[++e]=i}),n}var RS=tdt,xT=p2,ST=Jut,ndt=AU,sdt=PU,idt=edt,odt=RS,rdt=1,adt=2,ldt="[object Boolean]",cdt="[object Date]",udt="[object Error]",ddt="[object Map]",hdt="[object Number]",fdt="[object RegExp]",pdt="[object Set]",mdt="[object String]",gdt="[object Symbol]",vdt="[object ArrayBuffer]",_dt="[object DataView]",$T=xT?xT.prototype:void 0,U3=$T?$T.valueOf:void 0;function ydt(t,e,n,i,s,o,r){switch(n){case _dt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case vdt:return!(t.byteLength!=e.byteLength||!o(new ST(t),new ST(e)));case ldt:case cdt:case hdt:return ndt(+t,+e);case udt:return t.name==e.name&&t.message==e.message;case fdt:case mdt:return t==e+"";case ddt:var a=idt;case pdt:var l=i&rdt;if(a||(a=odt),t.size!=e.size&&!l)return!1;var c=r.get(t);if(c)return c==e;i|=adt,r.set(t,e);var u=sdt(a(t),a(e),i,s,o,r);return r.delete(t),u;case gdt:if(U3)return U3.call(t)==U3.call(e)}return!1}var bdt=ydt;function wdt(t,e){for(var n=-1,i=e.length,s=t.length;++n<i;)t[s+n]=e[n];return t}var kdt=wdt,Cdt=kdt,xdt=Ba;function Sdt(t,e,n){var i=e(t);return xdt(t)?i:Cdt(i,n(t))}var $dt=Sdt;function Adt(t,e){for(var n=-1,i=t==null?0:t.length,s=0,o=[];++n<i;){var r=t[n];e(r,n,t)&&(o[s++]=r)}return o}var Edt=Adt;function Mdt(){return[]}var Tdt=Mdt,Pdt=Edt,Idt=Tdt,Ldt=Object.prototype,Odt=Ldt.propertyIsEnumerable,AT=Object.getOwnPropertySymbols,Ddt=AT?function(t){return t==null?[]:(t=Object(t),Pdt(AT(t),function(e){return Odt.call(t,e)}))}:Idt,Rdt=Ddt,Vdt=$dt,Fdt=Rdt,Ndt=z8;function Bdt(t){return Vdt(t,Ndt,Fdt)}var zdt=Bdt,ET=zdt,Hdt=1,Udt=Object.prototype,jdt=Udt.hasOwnProperty;function Wdt(t,e,n,i,s,o){var r=n&Hdt,a=ET(t),l=a.length,c=ET(e),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in e:jdt.call(e,h)))return!1}var f=o.get(t),p=o.get(e);if(f&&p)return f==e&&p==t;var m=!0;o.set(t,e),o.set(e,t);for(var b=r;++d<l;){h=a[d];var w=t[h],k=e[h];if(i)var C=r?i(k,w,h,e,t,o):i(w,k,h,t,e,o);if(!(C===void 0?w===k||s(w,k,n,i,o):C)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var A=t.constructor,S=e.constructor;A!=S&&"constructor"in t&&"constructor"in e&&!(typeof A=="function"&&A instanceof A&&typeof S=="function"&&S instanceof S)&&(m=!1)}return o.delete(t),o.delete(e),m}var Ydt=Wdt,j3=EU,qdt=PU,Gdt=bdt,Xdt=Ydt,MT=rU,TT=Ba,PT=V8,Kdt=N8,Zdt=1,IT="[object Arguments]",LT="[object Array]",y_="[object Object]",Jdt=Object.prototype,OT=Jdt.hasOwnProperty;function Qdt(t,e,n,i,s,o){var r=TT(t),a=TT(e),l=r?LT:MT(t),c=a?LT:MT(e);l=l==IT?y_:l,c=c==IT?y_:c;var u=l==y_,d=c==y_,h=l==c;if(h&&PT(t)){if(!PT(e))return!1;r=!0,u=!1}if(h&&!u)return o||(o=new j3),r||Kdt(t)?qdt(t,e,n,i,s,o):Gdt(t,e,l,n,i,s,o);if(!(n&Zdt)){var f=u&&OT.call(t,"__wrapped__"),p=d&&OT.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,b=p?e.value():e;return o||(o=new j3),s(m,b,n,i,o)}}return h?(o||(o=new j3),Xdt(t,e,n,i,s,o)):!1}var eht=Qdt,tht=eht,DT=tv;function IU(t,e,n,i,s){return t===e?!0:t==null||e==null||!DT(t)&&!DT(e)?t!==t&&e!==e:tht(t,e,n,i,IU,s)}var LU=IU,nht=EU,sht=LU,iht=1,oht=2;function rht(t,e,n,i){var s=n.length,o=s,r=!i;if(t==null)return!o;for(t=Object(t);s--;){var a=n[s];if(r&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++s<o;){a=n[s];var l=a[0],c=t[l],u=a[1];if(r&&a[2]){if(c===void 0&&!(l in t))return!1}else{var d=new nht;if(i)var h=i(c,u,l,t,e,d);if(!(h===void 0?sht(u,c,iht|oht,i,d):h))return!1}}return!0}var aht=rht,lht=nv;function cht(t){return t===t&&!lht(t)}var OU=cht,uht=OU,dht=z8;function hht(t){for(var e=dht(t),n=e.length;n--;){var i=e[n],s=t[i];e[n]=[i,s,uht(s)]}return e}var fht=hht;function pht(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var DU=pht,mht=aht,ght=fht,vht=DU;function _ht(t){var e=ght(t);return e.length==1&&e[0][2]?vht(e[0][0],e[0][1]):function(n){return n===t||mht(n,t,e)}}var yht=_ht,bht=Ba,wht=j2,kht=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Cht=/^\w*$/;function xht(t,e){if(bht(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||wht(t)?!0:Cht.test(t)||!kht.test(t)||e!=null&&t in Object(e)}var VS=xht,RU=DS,Sht="Expected a function";function FS(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Sht);var n=function(){var i=arguments,s=e?e.apply(this,i):i[0],o=n.cache;if(o.has(s))return o.get(s);var r=t.apply(this,i);return n.cache=o.set(s,r)||o,r};return n.cache=new(FS.Cache||RU),n}FS.Cache=RU;var $ht=FS,Aht=$ht,Eht=500;function Mht(t){var e=Aht(t,function(i){return n.size===Eht&&n.clear(),i}),n=e.cache;return e}var Tht=Mht,Pht=Tht,Iht=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lht=/\\(\\)?/g,Oht=Pht(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Iht,function(n,i,s,o){e.push(s?o.replace(Lht,"$1"):i||n)}),e}),Dht=Oht;function Rht(t,e){for(var n=-1,i=t==null?0:t.length,s=Array(i);++n<i;)s[n]=e(t[n],n,t);return s}var Vht=Rht,RT=p2,Fht=Vht,Nht=Ba,Bht=j2,zht=1/0,VT=RT?RT.prototype:void 0,FT=VT?VT.toString:void 0;function VU(t){if(typeof t=="string")return t;if(Nht(t))return Fht(t,VU)+"";if(Bht(t))return FT?FT.call(t):"";var e=t+"";return e=="0"&&1/t==-zht?"-0":e}var Hht=VU,Uht=Hht;function jht(t){return t==null?"":Uht(t)}var Wht=jht,Yht=Ba,qht=VS,Ght=Dht,Xht=Wht;function Kht(t,e){return Yht(t)?t:qht(t,e)?[t]:Ght(Xht(t))}var FU=Kht,Zht=j2,Jht=1/0;function Qht(t){if(typeof t=="string"||Zht(t))return t;var e=t+"";return e=="0"&&1/t==-Jht?"-0":e}var J2=Qht,eft=FU,tft=J2;function nft(t,e){e=eft(e,t);for(var n=0,i=e.length;t!=null&&n<i;)t=t[tft(e[n++])];return n&&n==i?t:void 0}var NU=nft,sft=NU;function ift(t,e,n){var i=t==null?void 0:sft(t,e);return i===void 0?n:i}var oft=ift;function rft(t,e){return t!=null&&e in Object(t)}var aft=rft,lft=FU,cft=R8,uft=Ba,dft=NF,hft=F8,fft=J2;function pft(t,e,n){e=lft(e,t);for(var i=-1,s=e.length,o=!1;++i<s;){var r=fft(e[i]);if(!(o=t!=null&&n(t,r)))break;t=t[r]}return o||++i!=s?o:(s=t==null?0:t.length,!!s&&hft(s)&&dft(r,s)&&(uft(t)||cft(t)))}var mft=pft,gft=aft,vft=mft;function _ft(t,e){return t!=null&&vft(t,e,gft)}var yft=_ft,bft=LU,wft=oft,kft=yft,Cft=VS,xft=OU,Sft=DU,$ft=J2,Aft=1,Eft=2;function Mft(t,e){return Cft(t)&&xft(e)?Sft($ft(t),e):function(n){var i=wft(n,t);return i===void 0&&i===e?kft(n,t):bft(e,i,Aft|Eft)}}var Tft=Mft;function Pft(t){return function(e){return e==null?void 0:e[t]}}var Ift=Pft,Lft=NU;function Oft(t){return function(e){return Lft(e,t)}}var Dft=Oft,Rft=Ift,Vft=Dft,Fft=VS,Nft=J2;function Bft(t){return Fft(t)?Rft(Nft(t)):Vft(t)}var zft=Bft,Hft=yht,Uft=Tft,jft=UF,Wft=Ba,Yft=zft;function qft(t){return typeof t=="function"?t:t==null?jft:typeof t=="object"?Wft(t)?Uft(t[0],t[1]):Hft(t):Yft(t)}var Gft=qft;function Xft(t,e,n,i){for(var s=t.length,o=n+(i?1:-1);i?o--:++o<s;)if(e(t[o],o,t))return o;return-1}var Kft=Xft;function Zft(t){return t!==t}var Jft=Zft;function Qft(t,e,n){for(var i=n-1,s=t.length;++i<s;)if(t[i]===e)return i;return-1}var ept=Qft,tpt=Kft,npt=Jft,spt=ept;function ipt(t,e,n){return e===e?spt(t,e,n):tpt(t,npt,n)}var opt=ipt,rpt=opt;function apt(t,e){var n=t==null?0:t.length;return!!n&&rpt(t,e,0)>-1}var lpt=apt;function cpt(t,e,n){for(var i=-1,s=t==null?0:t.length;++i<s;)if(n(e,t[i]))return!0;return!1}var upt=cpt;function dpt(){}var hpt=dpt,W3=iU,fpt=hpt,ppt=RS,mpt=1/0,gpt=W3&&1/ppt(new W3([,-0]))[1]==mpt?function(t){return new W3(t)}:fpt,vpt=gpt,_pt=MU,ypt=lpt,bpt=upt,wpt=TU,kpt=vpt,Cpt=RS,xpt=200;function Spt(t,e,n){var i=-1,s=ypt,o=t.length,r=!0,a=[],l=a;if(n)r=!1,s=bpt;else if(o>=xpt){var c=e?null:kpt(t);if(c)return Cpt(c);r=!1,s=wpt,l=new _pt}else l=e?[]:a;e:for(;++i<o;){var u=t[i],d=e?e(u):u;if(u=n||u!==0?u:0,r&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;e&&l.push(d),a.push(u)}else s(l,d,n)||(l!==a&&l.push(d),a.push(u))}return a}var $pt=Spt,Apt=Gft,Ept=$pt;function Mpt(t,e){return t&&t.length?Ept(t,Apt(e)):[]}var Tpt=Mpt;const Ppt=_i(Tpt),Ipt={name:"FeedFooter",mixins:[W2],components:{ReactedUsers:Ult,FeedComments:Llt,FeedTextComposer:bv,ChatIcon:pU,HeartIcon:U2},props:["feed","is_single","space_slug","is_modal"],emits:["commented","joinSpace"],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:{maybeSave(t){(t.metaKey||t.ctrlKey)&&t.keyCode===13&&this.postComment()},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(t=>{var e;this.feed.comments||(this.feed.comments=[]),this.feed.comments.push(t.comment),t.comment.status==="published"&&(this.feed.comments_count=parseInt(this.feed.comments_count)+1),this.comment={message:"",media_images:[]},this.commenting=!1,(e=this.$refs.composer)==null||e.clearContent(),this.$notify.success(t.message),this.$nextTick(()=>{this.$emit("commented",t.comment),this.scrollCommentIntoView(t.comment.id)})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})},showCommentForm(){if(!this.is_single&&this.hasFeature("show_post_modal")){this.feed.auto_focus_comment=!0,this.$eventBus.emit("showFeedModal",{feed:this.feed,view:"comments",auto_focus_comment:!0});return}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()},maybeShowFeedModal(){if(this.is_single){this.showAll();return}if(!this.hasFeature("show_post_modal")){this.showAll();return}this.feed.auto_focus_comment=!1,this.$eventBus.emit("showFeedModal",{feed:this.feed,view:"comments",auto_focus_comment:!1})},toggleReact(){const t={react_type:"like"};this.feed.has_user_react&&(t.remove=!0);let e=!this.feed.has_user_react;this.$post("feeds/"+this.feed.id+"/react",t).then(n=>{this.feed.has_user_react=e,this.feed.reactions_count=n.new_count}).catch(n=>{this.$handleError(n)})},prepareDefaultMentions(){if(!this.auth.user_id||this.defaultMentions.length)return;let t=this.auth.user_id,e=[];this.feed.user_id!=t&&e.push(this.feed.xprofile);let n=this.feed.comments.slice(-30);this.each(n,i=>{i.user_id!=t&&e.push(i.xprofile)}),this.defaultMentions=Ppt(e,"user_id")},changeCommentsSortBy(){this.$storeLocalData("comments_sort_by",this.sortBy)}},mounted(){let t=this.feed.default_comment_sort_by||"oldest";this.sortBy=this.$getLocalData("comments_sort_by",t),this.is_single&&this.prepareDefaultMentions(),this.feed.auto_focus_comment&&setTimeout(()=>{this.commenting=!0,this.isAutoFocus=!0},100)}},Lpt={ref:"feed_footer",class:"feed_footer"},Opt={class:"fcom_feed_footer_actions"},Dpt=["aria-label","aria-pressed"],Rpt={class:"fcom_sr_only"},Vpt={class:"fcom_sr_only"},Fpt={class:"fcom_feed_footer_meta"},Npt={key:0},Bpt={key:0,class:"fcom_reactions_count feed_reaction_meta"},zpt={class:"feed_comment_count"},Hpt={key:2,class:"feed_reaction_meta"},Upt={key:0,ref:"fcom_comment_sorting",class:"fcom_comment_sorting"},jpt=["id"],Wpt={key:0,style:{padding:"0",margin:"0","text-align":"center"}},Ypt={key:1,class:"feed_commenting"},qpt={class:"person_avatar"},Gpt=["src"],Xpt={key:2,class:""},Kpt={style:{padding:"0",margin:"0","text-align":"center"}},Zpt={key:0,style:{margin:"10px 0"}},Jpt=["href"];function Qpt(t,e,n,i,s,o){var m,b,w,k;const r=B("HeartIcon"),a=we,l=B("ChatIcon"),c=B("ReactedUsers"),u=Zt,d=Wt,h=B("feed-comments"),f=ze,p=B("feed-text-composer");return v(),$(J,null,[g("div",Lpt,[g("div",Opt,[g("ul",null,[g("li",{class:q(["fcom_reaction fcom_reaction_list",{react_active:n.feed.has_user_react}]),role:"button",tabindex:"0","aria-label":t.$t("React"),"aria-pressed":!!n.feed.has_user_react,onClick:e[0]||(e[0]=C=>o.toggleReact()),onKeydown:[e[1]||(e[1]=ut(Me(C=>o.toggleReact(),["prevent"]),["enter"])),e[2]||(e[2]=ut(Me(C=>o.toggleReact(),["prevent"]),["space"]))]},[_(a,{class:q({user_reacted:n.feed.has_user_react})},{default:y(()=>[_(r,{filled:n.feed.has_user_react},null,8,["filled"])]),_:1},8,["class"]),g("span",null,[g("span",Rpt,x(t.$t("React")),1)])],42,Dpt),((m=n.feed.meta)==null?void 0:m.comments_disabled)!=="yes"?(v(),$("li",{key:0,class:"fcom_comment_btn_wrap",role:"button",tabindex:"0",onClick:e[3]||(e[3]=C=>o.showCommentForm()),onKeydown:[e[4]||(e[4]=ut(Me(C=>o.showCommentForm(),["prevent"]),["enter"])),e[5]||(e[5]=ut(Me(C=>o.showCommentForm(),["prevent"]),["space"]))]},[_(a,null,{default:y(()=>[_(l)]),_:1}),g("span",null,[g("span",Vpt,x(t.$t("Comment")),1)])],32)):O("",!0)])]),g("div",Fpt,[n.feed.reactions_count||n.feed.comments_count||((b=n.feed.meta)==null?void 0:b.comments_disabled)==="yes"?(v(),$("ul",Npt,[n.feed.reactions_count?(v(),$("li",Bpt,[_(c,{feed:n.feed},null,8,["feed"])])):O("",!0),n.feed.comments_count>0?(v(),$("li",{key:1,onClick:e[6]||(e[6]=(...C)=>o.maybeShowFeedModal&&o.maybeShowFeedModal(...C)),class:"feed_reaction_meta"},[g("div",zpt,x(t.$_n("%d comment","%d comments",n.feed.comments_count)),1)])):((w=n.feed.meta)==null?void 0:w.comments_disabled)==="yes"?(v(),$("li",Hpt,x(t.$t("comments disabled")),1)):O("",!0)])):O("",!0)])],512),_(h,{sortBy:s.sortBy,defaultMentions:s.defaultMentions,onForceShowAll:o.showAll,show_all:s.show_all_comments,feed:n.feed,is_single:n.is_single,is_modal:n.is_modal},{before_comments_start:y(()=>[n.feed.comments_count>=2?(v(),$("div",Upt,[_(d,{"aria-label":t.$t("Sort comments by"),onChange:e[7]||(e[7]=C=>o.changeCommentsSortBy()),modelValue:s.sortBy,"onUpdate:modelValue":e[8]||(e[8]=C=>s.sortBy=C),class:"fcom_off_color fcom_minimal_select","popper-class":"plain_select",placeholder:t.$t("Sort by")},{default:y(()=>[_(u,{value:"oldest",label:t.$t("Earliest")},null,8,["label"]),_(u,{value:"latest",label:t.$t("Latest")},null,8,["label"]),_(u,{value:"popular",label:t.$t("Popular")},null,8,["label"]),_(u,{value:"most_replied",label:t.$t("Most Replied")},null,8,["label"])]),_:1},8,["aria-label","modelValue","placeholder"])],512)):O("",!0)]),_:1},8,["sortBy","defaultMentions","onForceShowAll","show_all","feed","is_single","is_modal"]),s.commenting||n.is_single?(v(),$("div",{key:0,id:"feed_comment_form_"+n.feed.id,class:"feed_comment feed_commentbox_main"},[((k=n.feed.meta)==null?void 0:k.comments_disabled)==="yes"?(v(),$(J,{key:0},[n.feed.comments_count?(v(),$("p",Wpt,x(t.$t("Comments are disabled for this post.")),1)):O("",!0)],64)):t.hasCommentPermission(n.feed)?(v(),$("div",Ypt,[g("div",qpt,[g("img",{alt:"",src:t.auth.photo},null,8,Gpt)]),s.showCommentBox?(v(),$("div",{key:0,onKeydown:e[10]||(e[10]=ut((...C)=>o.maybeSave&&o.maybeSave(...C),["enter"])),class:"feed_comment_input"},[_(p,{ref:"composer",context:"comment",is_modal:n.is_modal,config:{multipleMedia:!0},mentionQuery:{space_id:n.feed.space_id},autofocus_changed:s.commenting,defaultMentions:s.defaultMentions,autofocus:s.isAutoFocus,disabled:s.saving,placeholder:t.$t("Write a comment"),content:s.comment},{default:y(()=>[_(f,{loading:s.saving,disabled:s.saving,class:"fcom_primary_button",onClick:e[9]||(e[9]=C=>o.postComment())},{default:y(()=>[N(x(t.$t("Post Comment")),1)]),_:1},8,["loading","disabled"])]),_:1},8,["is_modal","mentionQuery","autofocus_changed","defaultMentions","autofocus","disabled","placeholder","content"])],32)):O("",!0)])):(v(),$("div",Xpt,[g("p",Kpt,[N(x(t.$t("Please join the Space to post a comment."))+" ",1),t.appVars.auth.user_id?(v(),$("div",Zpt,[_(f,{class:"fcom_primary_button",onClick:e[11]||(e[11]=()=>{t.$emit("joinSpace")})},{default:y(()=>[N(x(t.$t("Join Space")),1)]),_:1})])):(v(),$("a",{key:1,href:t.getCurrentAuthUrl()},x(t.appVars.allow_signup?t.$t("Login / Signup"):t.$t("Login")),9,Jpt))])]))],8,jpt)):O("",!0)],64)}const emt=ce(Ipt,[["render",Qpt]]),tmt={name:"SingleLineTextarea",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},maxlength:{type:Number,default:500},isActive:{type:Boolean,default:!1}},emits:["update:modelValue","enter"],methods:{onInput(t){const e=t.target.value.replace(/\n/g,"");this.$emit("update:modelValue",e),this.$nextTick(this.adjustTextareaHeight)},adjustTextareaHeight(){const t=this.$refs.textarea;t.style.height="auto",t.style.height=t.scrollHeight+"px"}},mounted(){this.adjustTextareaHeight()},watch:{modelValue(){this.$nextTick(this.adjustTextareaHeight)},isActive(t){t&&setTimeout(()=>{this.$refs.textarea.focus()},100)}}},nmt=["value","maxlength","placeholder"];function smt(t,e,n,i,s,o){return v(),$("textarea",{value:n.modelValue,onInput:e[0]||(e[0]=(...r)=>o.onInput&&o.onInput(...r)),onKeydown:e[1]||(e[1]=ut(Me(r=>t.$emit("enter"),["prevent"]),["enter"])),ref:"textarea",maxlength:n.maxlength,class:"fcom_status_title_input",rows:"1",placeholder:n.placeholder},null,40,nmt)}const imt=ce(tmt,[["render",smt]]),omt={name:"EyeIcon"},rmt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function amt(t,e,n,i,s,o){return v(),$("svg",rmt,[...e[0]||(e[0]=[g("path",{d:"M17.9536 9.2035C18.207 9.55877 18.3337 9.7364 18.3337 9.99935C18.3337 10.2623 18.207 10.4399 17.9536 10.7952C16.8152 12.3915 13.908 15.8327 10.0003 15.8327C6.09264 15.8327 3.18541 12.3915 2.04703 10.7952C1.79367 10.4399 1.66699 10.2623 1.66699 9.99935C1.66699 9.7364 1.79367 9.55877 2.04703 9.2035C3.18541 7.60722 6.09264 4.16602 10.0003 4.16602C13.908 4.16602 16.8152 7.60722 17.9536 9.2035Z",stroke:"currentColor","stroke-width":"1.5"},null,-1),g("path",{d:"M12.5 10C12.5 8.61929 11.3807 7.5 10 7.5C8.61929 7.5 7.5 8.61929 7.5 10C7.5 11.3807 8.61929 12.5 10 12.5C11.3807 12.5 12.5 11.3807 12.5 10Z",stroke:"currentColor","stroke-width":"1.5"},null,-1)])])}const lmt=ce(omt,[["render",amt]]),cmt={name:"CalendarIcon"},umt={width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function dmt(t,e,n,i,s,o){return v(),$("svg",umt,[...e[0]||(e[0]=[xr('<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)])])}const hmt=ce(cmt,[["render",dmt]]),fmt={name:"CreateStatusForm",emits:["updatePost","added"],props:{space:{type:String,default:""},btn_text:{type:String,default:"Post"},editing_feed:{type:Object,default:()=>({title:"",type:"text",message:"",media_image:"",topic_ids:[],send_announcement_email:"no",status:"published"})},defaultState:{type:String,default:"idle"},disableSpace:{type:Boolean,default:!1},default_placeholder:{type:String,default:""},initial_placeholder:{type:String,default:""},disableUpload:{type:Boolean,default:!1},saving:{type:Boolean,default:!1},author:{type:Object,default:()=>({})}},components:{SpaceIcon:Sp,FeedTextComposer:bv,SingleLineTextarea:imt,EyeIcon:lmt,CalendarIcon:hmt},data(){return{feed:this.editing_feed,isAutoFocus:!1,state:this.defaultState,posting:!1,doingOembed:!1,oembed:null,postableSpaces:[],autofocus_changed:!1,globalDisabled:this.appVars.features.disable_global_posts,hasPostTitle:this.hasFeature("has_post_title"),scheduleModalVisible:!1,scheduleForm:{date:null,time:null},editorReady:!1}},watch:{"scheduleForm.date":{handler(t){this.scheduleForm.time=null}}},computed:{...j0e(H2,["spacesBySlug"]),allSpaces(){return this.space&&this.spacesBySlug[this.space]?{...this.appVars.auth.spaces,[this.space]:this.spacesBySlug[this.space]}:this.appVars.auth.spaces},isEditing(){var t;return(t=this.editing_feed)==null?void 0:t.id},isScheduleDisabled(){return!this.scheduleForm.date||!this.scheduleForm.time},showScheduleInfo(){return this.feed.scheduled_at&&!this.isEditing},showScheduleIcon(){return(this.isAdmin()||this.isCurrentSpaceAdmin)&&!this.isEditing&&this.has_pro},isDateDisabled(){return t=>t<new Date().setHours(0,0,0,0)},getPlaceholder(){const t=this.appVars.topicsConfig.max_topics_per_post;return this.isTopicRequired?this.$_n("Select a topic","Choose up to %s topics",t):this.$_n("Select a topic","Choose up to %s topics (optional)",t)},getButtonLabel(){return this.feed.scheduled_at&&!this.isEditing?this.$t("Schedule"):this.btn_text},getScheduleLabel(){return this.$t("Scheduled for %1$s at %2$s",this.formattedDate(this.feed.scheduled_at),this.formattedTime(this.feed.scheduled_at))},getStartTime(){if(!this.scheduleForm.date||!this.isToday(this.scheduleForm.date))return"00:00";const e=this.dayjs().add(30,"minute");if(!this.isToday(e.toDate()))return"23:50";const n=e.format("HH");let i=parseInt(e.format("mm"),10);return i=Math.ceil(i/10)*10,i===60?this.dayjs(e).add(1,"hour").format("HH")+":00":n+":"+(i<10?"0":"")+i},getPostTitle(){return this.isEditing?this.author.name||"":this.$t("Create Post")},canPost(){var t,e;return this.space?(e=(t=this.allSpaces[this.space])==null?void 0:t.permissions)==null?void 0:e.can_create_post:this.appVars.auth.user_id},isTopicRequired(){var t,e;return this.currentSpaceSlug?((e=(t=this.allSpaces[this.currentSpaceSlug])==null?void 0:t.settings)==null?void 0:e.topic_required)=="yes":!1},isStateActive(){return this.state=="active"},isCurrentSpaceAdmin(){var t,e;return this.currentSpaceSlug?(e=(t=this.allSpaces[this.currentSpaceSlug])==null?void 0:t.permissions)==null?void 0:e.community_moderator:!1},isCommunityAdmin(){return this.isAdmin()},currentPlaceHolder(){return this.isStateActive?this.default_placeholder?this.default_placeholder:this.$t("Write something here..."):this.initial_placeholder?this.initial_placeholder:this.$t("What's happening, %s",this.auth.first_name)},currentTopics(){var n;let t=this.currentSpaceSlug;if(!t)return[];let e=((n=this.allSpaces[t])==null?void 0:n.topics)||[];return e=Object.values(e),this.isModerator(t)?e:e.filter(i=>i.admin_only!="yes")},canUploadDoc(){var t,e;return this.currentSpaceSlug?(e=(t=this.allSpaces[this.currentSpaceSlug])==null?void 0:t.permissions)==null?void 0:e.can_upload_documents:!1},currentSpaceSlug(){if(this.space)return this.space;let t=this.feed.space;return t&&typeof t=="object"?t==null?void 0:t.slug:t},currentSpaceId(){var t;return this.currentSpaceSlug?(t=this.allSpaces[this.currentSpaceSlug])==null?void 0:t.id:null},feedContext(){const t=this.space||this.currentSpaceSlug;return t&&t!=="__self__post__"?`space-${t}`:"global"}},methods:{...W0e(mT,["createFeed"]),changeAutoFocus(){this.feed.title=this.feed.title.replace(/\n/g,""),this.updateAutofocus()},updateAutofocus(){this.autofocus_changed=!1,setTimeout(()=>{this.autofocus_changed=!0},100)},openScheduleModal(){this.scheduleModalVisible=!0},makeActive(){this.editorReady=!0,this.$nextTick(()=>{this.prepareData(),this.state="active",this.hasPostTitle||this.updateAutofocus()})},cancelPost(){this.state="idle",this.postableSpaces=[]},cancelSchedule(){this.scheduleModalVisible=!1,this.scheduleForm.date=null,this.scheduleForm.time=null,this.feed.scheduled_at=null},previewPost(){const t={...this.feed,space:this.space||this.feed.space,is_editing:this.isEditing,author:this.author};this.$eventBus.emit("showPreviewPostModal",t)},initFeed(){return{type:"text",message:"",media_image:"",topic_ids:[],scheduled_at:null,send_announcement_email:"no",status:"published"}},schedulePost(){if(this.scheduleModalVisible=!1,!this.scheduleForm.date||!this.scheduleForm.time){this.feed.scheduled_at=null;return}const t=this.convertTo24Hour(this.scheduleForm.time);this.feed.scheduled_at=`${this.scheduleForm.date} ${t}:00`},post(){if(!this.isStateActive)return;if(this.feed.id){this.$emit("updatePost",this.feed);return}const t=this.feed;if(this.space&&(t.space=this.space),!t.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}if(t.space!="__self__post__"&&t.send_announcement_email=="yes"){let e=this.$t("Are you sure you want to send email to everyone? An automated email will be sent to all the members of the space after 5 minutes of this post");t.scheduled_at&&(e=this.$t("Are you sure you want to send email to everyone? An automated email will be sent to all the members of the space. The email will be sent at the scheduled time.")),this.$confirm(e,this.$t("Sending email to all members?"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("No"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.postStatus(t)}).catch(()=>{this.feed.send_announcement_email="no",this.state="active",this.$notify({title:this.$t("Cancelled"),message:this.$t("You have cancelled the action."),type:"info"})})}else this.postStatus(t)},feedSpaceChanged(){this.$refs.fcom_posting_space_select.blur(),this.feed.topic_ids=""},goToCreatedFeed(t){if(!(t!=null&&t.slug))return;if(this.hasFeature("show_post_modal")){this.$eventBus.emit("showFeedModal",{feed:t});return}const e=t.space?{name:"space_feed",params:{feed_slug:t.slug,space:t.space.slug}}:{name:"single_feed",params:{feed_slug:t.slug}};this.$router.push(e)},async postStatus(t){var e,n;this.posting=!0;try{const s=await mT().createFeed(this.feedContext,t);if(s.scheduled_at||(this.$notify.success(s.message),this.$emit("added",s.feed),((e=s.feed)==null?void 0:e.status)==="unlisted"?this.goToCreatedFeed(s.feed):this.$nextTick(()=>{const o=document.getElementById("feed_id_"+s.feed.id);o&&(o.classList.add("fcom_highlight_glow"),setTimeout(()=>{o.classList.remove("fcom_highlight_glow")},4500))})),this.feed=this.initFeed(),this.state="idle",s.scheduled_at){const o=this.formattedDateTime(s.scheduled_at);this.$notify.success(this.$t("Your post has been scheduled for %s. Please find the scheduled post from your profile",o))}this.editorReady=!1}catch(i){this.$handleError(i),(n=i==null?void 0:i.shakes)!=null&&n.topic_ids&&(this.$refs.fcom_topics_input.classList.add("fcon_shake"),setTimeout(()=>{this.$refs.fcom_topics_input.classList.remove("fcon_shake")},500))}finally{this.posting=!1}},prepareData(){var r;if(this.space)return[];let t=Object.values(this.allSpaces),e=this.appVars.space_groups,n=[],i=[];this.each(e,a=>{let l=t.filter(c=>{let u=c.parent_id==a.id&&c.permissions&&c.permissions.can_create_post;return u&&i.push(c.slug),u});l.length&&n.push({label:a.title,spaces:l})});let s=t.filter(a=>!a.parent_id&&a.permissions&&a.permissions.can_create_post);s&&s.length&&n.push({label:this.$t("Others"),spaces:s}),this.globalDisabled||n.unshift({label:"",spaces:[{title:this.$t("On my profile"),slug:"__self__post__"}]}),this.postableSpaces=n;const o=this.appVars.default_post_space;!this.feed.space&&o&&["all_feeds","user_profile_feeds"].includes((r=this.$route)==null?void 0:r.name)&&this.postableSpaces.some(a=>a.spaces.some(l=>l.slug===o))&&(this.feed.space=o)}},mounted(){(this.editing_feed.id||this.defaultState=="active")&&(this.editorReady=!0)}},pmt={class:"person_avatar"},mmt=["alt","src"],gmt={class:"create_header_content"},vmt={key:0,class:"fcom_create_status_box_header"},_mt={class:"user_infos"},ymt={class:"feed_user_name"},bmt={class:"feed_meta_info"},wmt={key:1,class:"feed_timestamp"},kmt={class:"create_header_action"},Cmt={key:0,ref:"fcom_topics_input",class:"fcom_topics_input"},xmt={style:{margin:"0",display:"block",width:"100%",padding:"5px 0","font-weight":"500"}},Smt={key:0,class:"fcom_meta_text"},$mt={class:"fcom_post_actions"},Amt={key:0,class:"fcom_post_space_name"},Emt={class:"target_label"},Mmt={ref:"fcom_posting_space",style:{"margin-right":"10px"}},Tmt={key:0,class:"fcom_space_title"},Pmt={key:1},Imt={class:"fcom_empty_spaces_dropdown"},Lmt={key:0,class:"fcom_composer_admin_actions"},Omt={key:0},Dmt={class:"dialog_header"},Rmt={class:"dialog_left schedule_header_left"},Vmt={class:"dialog_body"},Fmt={class:"fcom_input_help"},Nmt={class:"dialog_footer"};function Bmt(t,e,n,i,s,o){const r=B("EditPen"),a=we,l=B("CalendarIcon"),c=ze,u=B("EyeIcon"),d=B("Close"),h=B("SingleLineTextarea"),f=Zt,p=Wt,m=B("SpaceIcon"),b=q1,w=qt,k=B("feed-text-composer"),C=Wd,A=tn,S=D8,M=nn,P=$s;return o.canPost?(v(),$("div",{key:0,class:q([{state_active:o.isStateActive},"create_status_holder"])},[g("div",{class:q(["create_header",{state_active:o.isStateActive}])},[g("div",pmt,[g("img",{alt:n.author.name||t.$t("Your Photo"),src:n.author.avatar||t.auth.avatar},null,8,mmt)]),g("div",gmt,[o.isStateActive?O("",!0):(v(),$("div",{key:0,onClick:e[0]||(e[0]=(...T)=>o.makeActive&&o.makeActive(...T)),class:"form_placeholder"},x(o.currentPlaceHolder),1)),g("div",{class:q([{fcom_editor_with_title:s.hasPostTitle,"is-active":o.isStateActive},"fcom_create_status_box"])},[o.isStateActive?(v(),$("div",vmt,[g("div",_mt,[g("div",ymt,x(o.getPostTitle),1),g("div",bmt,[!n.editing_feed.id&&o.showScheduleInfo?(v(),$("div",{key:0,onClick:e[1]||(e[1]=(...T)=>o.openScheduleModal&&o.openScheduleModal(...T)),class:"feed_scheduled_info"},[g("span",null,x(o.getScheduleLabel),1),_(a,null,{default:y(()=>[_(r)]),_:1})])):(v(),$("span",wmt,x(n.editing_feed.id?t.humanDateDiff(n.editing_feed.created_at):t.dayjs().format(t.siteDateTimeFormat)),1))])]),g("div",kmt,[o.showScheduleIcon?(v(),D(c,{key:0,"aria-label":t.$t("Schedule post"),onClick:o.openScheduleModal,text:""},{default:y(()=>[_(a,null,{default:y(()=>[_(l)]),_:1})]),_:1},8,["aria-label","onClick"])):O("",!0),_(c,{"aria-label":t.$t("Preview"),onClick:o.previewPost,text:""},{default:y(()=>[_(a,null,{default:y(()=>[_(u)]),_:1})]),_:1},8,["aria-label","onClick"]),o.isEditing?O("",!0):(v(),D(c,{key:1,"aria-label":t.$t("Close"),class:"close_btn",onClick:o.cancelPost,text:""},{default:y(()=>[_(a,null,{default:y(()=>[_(d)]),_:1})]),_:1},8,["aria-label","onClick"]))])])):O("",!0),s.editorReady?(v(),D(k,{key:1,context:"feed",placeholder:o.currentPlaceHolder,config:{surveyApp:!0,space_id:o.currentSpaceId,is_admin:o.isCurrentSpaceAdmin||o.isCommunityAdmin,spaceSlug:o.currentSpaceSlug,disableUpload:n.disableUpload,multipleMedia:!0,documentsApp:o.canUploadDoc,videoApp:!0},autofocus:s.isAutoFocus||!s.hasPostTitle,onEditorCreated:e[9]||(e[9]=()=>{s.isAutoFocus=!0}),mentionQuery:o.currentSpaceSlug&&o.currentSpaceSlug!=="__self__post__"?{space:o.currentSpaceSlug}:{},disabled:s.posting,autofocus_changed:s.autofocus_changed,is_editing:!!o.isEditing,content:s.feed},{before_input:y(()=>[s.hasPostTitle?(v(),D(h,{key:0,maxlength:120,autofocus:!0,isActive:o.isStateActive,modelValue:s.feed.title,"onUpdate:modelValue":e[2]||(e[2]=T=>s.feed.title=T),onEnter:e[3]||(e[3]=T=>o.changeAutoFocus()),placeholder:s.hasPostTitle=="required"?t.$t("Short title of this post"):t.$t("Title (optional)")},null,8,["isActive","modelValue","placeholder"])):O("",!0)]),before_composer_footer:y(()=>[le(t.$slots,"before_footer")]),after_input:y(()=>[t.has_pro&&o.currentTopics.length?(v(),$("div",Cmt,[_(p,{"popper-class":"fcom_topics_select","multiple-limit":t.appVars.topicsConfig.max_topics_per_post,modelValue:s.feed.topic_ids,"onUpdate:modelValue":e[4]||(e[4]=T=>s.feed.topic_ids=T),multiple:t.appVars.topicsConfig.max_topics_per_post>1,placeholder:o.getPlaceholder},{default:y(()=>[(v(!0),$(J,null,ye(o.currentTopics,T=>(v(),D(f,{key:T.slug,label:T.title,value:T.id},{default:y(()=>[g("span",xmt,x(T.title),1),T.description?(v(),$("span",Smt,x(T.description),1)):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["multiple-limit","modelValue","multiple","placeholder"])],512)):O("",!0)]),after_composer_footer:y(()=>[t.hasFeature("mention_mail")&&o.isCurrentSpaceAdmin&&s.feed.send_announcement_email?(v(),$("div",Lmt,[_(w,{disabled:!t.has_pro,"true-value":"yes","false-value":"no",modelValue:s.feed.send_announcement_email,"onUpdate:modelValue":e[8]||(e[8]=T=>s.feed.send_announcement_email=T),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Send announcement email to space members"))+" ",1),t.has_pro?O("",!0):(v(),$("span",Omt,"("+x(t.$t("Require Pro"))+")",1))]),_:1},8,["disabled","modelValue"])])):O("",!0)]),default:y(()=>[g("div",$mt,[n.space&&o.isStateActive?(v(),$("div",Amt,[g("span",null,"#"+x(n.space),1)])):O("",!0),!n.space&&!n.disableSpace?(v(),$(J,{key:1},[g("span",Emt,x(t.$t("Posting in:")),1),g("span",Mmt,[_(p,{modelValue:s.feed.space,"onUpdate:modelValue":e[5]||(e[5]=T=>s.feed.space=T),style:{width:"170px"},ref:"fcom_posting_space_select",class:"fcom_minimal_select","popper-class":"fcom_posting_space_select",placeholder:t.$t("Select Space"),onChange:e[6]||(e[6]=T=>o.feedSpaceChanged())},{empty:y(()=>[g("p",Imt,x(Object.keys(o.allSpaces).length?t.$t("No spaces to post in"):t.$t("Join a space to post")),1)]),default:y(()=>[(v(!0),$(J,null,ye(s.postableSpaces,T=>(v(),D(b,{key:T.label,label:T.label},{default:y(()=>[(v(!0),$(J,null,ye(T.spaces,I=>(v(),D(f,{key:I.slug,label:I.title,value:I.slug},{default:y(()=>[I.id?(v(),$("span",Tmt,[_(m,{space_profile:I},null,8,["space_profile"]),g("span",null,x(t.getExcerpt(I.title,30)),1)])):(v(),$("span",Pmt,x(t.getExcerpt(I.title,30)),1))]),_:2},1032,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","placeholder"])],512)],64)):O("",!0),le(t.$slots,"before_submit_btn"),_(c,{onClick:e[7]||(e[7]=T=>o.post()),disabled:s.posting||o.isEditing&&n.saving,loading:o.isEditing?n.saving:s.posting,class:q(["fcom_primary_button",{fcom_update_button:o.isEditing}])},{default:y(()=>[N(x(o.getButtonLabel),1)]),_:1},8,["disabled","loading","class"])])]),_:3},8,["placeholder","config","autofocus","mentionQuery","disabled","autofocus_changed","is_editing","content"])):O("",!0),le(t.$slots,"after_composer")],2)])],2),_(P,{modelValue:s.scheduleModalVisible,"onUpdate:modelValue":e[12]||(e[12]=T=>s.scheduleModalVisible=T),width:t.modalWidth,"modal-class":"fcom_common_dialog","append-to-body":!0,"close-on-click-modal":!1},{header:y(()=>[g("div",Dmt,[g("div",Rmt,[g("h4",null,x(t.$t("Schedule Post")),1),g("p",null,x(t.$t("Choose a date and time in the future when you want your post to be published")),1)])])]),footer:y(()=>[g("div",Nmt,[_(c,{class:"fcom_secondary_button",onClick:o.cancelSchedule},{default:y(()=>[N(x(t.$t("Remove Schedule")),1)]),_:1},8,["onClick"]),_(c,{class:"fcom_primary_button",disabled:o.isScheduleDisabled,onClick:o.schedulePost},{default:y(()=>[N(x(t.$t("Select Schedule")),1)]),_:1},8,["disabled","onClick"])])]),default:y(()=>[g("div",Vmt,[_(M,{"label-position":"top",class:"fcom_schedule_form"},{default:y(()=>[_(A,{label:t.$t("Date")},{default:y(()=>[_(C,{modelValue:s.scheduleForm.date,"onUpdate:modelValue":e[10]||(e[10]=T=>s.scheduleForm.date=T),type:"date","value-format":"YYYY-MM-DD",format:t.siteDateFormat,placeholder:t.$t("Select Date"),"disabled-date":o.isDateDisabled},null,8,["modelValue","format","placeholder","disabled-date"])]),_:1},8,["label"]),_(A,{label:t.$t("Time")},{default:y(()=>[_(S,{modelValue:s.scheduleForm.time,"onUpdate:modelValue":e[11]||(e[11]=T=>s.scheduleForm.time=T),disabled:!s.scheduleForm.date,style:{width:"210px"},step:"00:10",format:t.siteTimeFormat,start:o.getStartTime,end:"23:59",placeholder:t.$t("Select Time")},null,8,["modelValue","disabled","format","start","placeholder"])]),_:1},8,["label"])]),_:1}),_(A,null,{default:y(()=>[g("p",Fmt,x(t.$t("The date and time is based on your site's Timezone")),1)]),_:1})])]),_:1},8,["modelValue","width"])],2)):O("",!0)}const zmt=ce(fmt,[["render",Bmt]]),Hmt={name:"EditFeed",components:{SpaceIcon:Sp,CreateStatusForm:zmt},data(){return{loading:!1,saving:!1,localDialogVisible:this.dialogVisible,feed:{},autofocus_changed:!1,hasPostTitle:this.hasFeature("has_post_title"),changeSpace:!1,newSpaceId:null,makeUnlisted:!1}},props:{dialogVisible:{type:Boolean,required:!0},feedSlug:{type:String,required:!0},hide_create_form:{type:Boolean,default:!1},author:{type:Object,default:()=>({})}},computed:{canMovePost(){return this.has_pro&&this.hasSpaceModeratorAccess(this.feed.space)},profileOptionLabel(){return this.auth&&this.feed.user_id&&this.auth.user_id==this.feed.user_id?this.$t("On my profile"):this.$t("On author's profile")}},methods:{getFeed(){this.loading=!0,this.$get("feeds/"+this.feedSlug+"/by-slug",{context:"edit"}).then(t=>{this.feed=t.feed,this.makeUnlisted=t.feed.status==="unlisted"}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},handleUpdatePost(t){var n;let e={id:t.id,title:t.title,message:t.message,space:(n=t==null?void 0:t.space)==null?void 0:n.slug,meta:t.meta,content_type:t.content_type,document_ids:t.document_ids,media:t.media,media_images:t.media_images,survey:t.survey,topic_ids:t.topic_ids,send_announcement_email:t.send_announcement_email};this.changeSpace&&this.newSpaceId&&(this.newSpaceId==="profile"?e.move_to_profile=1:e.new_space_id=this.newSpaceId),["published","unlisted"].includes(this.feed.status)&&(e.status=this.makeUnlisted?"unlisted":"published"),this.saving=!0,this.$post(`feeds/${t.id}`,e).then(i=>{this.$notify.success(i.message),this.$emit("updated",i.feed),this.handleClose()}).catch(i=>{this.$handleError(i)}).finally(()=>{this.saving=!1})},handleClose(){this.localDialogVisible=!1,this.$emit("close")}},mounted(){this.getFeed()}},Umt={class:"fcom_feed_edit"},jmt={class:"fcom_feed_edit_dialog_header"},Wmt={key:0,class:"fcom_feed_edit_dialog_body"},Ymt={key:0},qmt={key:0,style:{"margin-top":"5px"}},Gmt={class:"fcom_space_title"};function Xmt(t,e,n,i,s,o){const r=B("Close"),a=we,l=qt,c=Zt,u=B("SpaceIcon"),d=Wt,h=Ss,f=B("create-status-form"),p=Vt,m=$s,b=xt("loading");return v(),$("div",Umt,[_(m,{class:"fcom_feed_edit_dialog",modelValue:s.localDialogVisible,"onUpdate:modelValue":e[3]||(e[3]=w=>s.localDialogVisible=w),width:t.dialogWidth,"append-to-body":!0,overflow:"","before-close":()=>{},"show-close":!1},{default:y(()=>{var w,k;return[Re((v(),$("div",null,[g("div",jmt,[g("span",null,x(t.$t("Edit Feed")),1),_(a,{onClick:o.handleClose},{default:y(()=>[_(r)]),_:1},8,["onClick"])]),s.feed.id?(v(),$("div",Wmt,[!(n.hide_create_form&&t.auth.user_id)||t.canEditFeed(s.feed)?(v(),D(f,{key:0,"default-state":"active",btn_text:t.$t("Update"),editing_feed:s.feed,author:n.author,onUpdatePost:o.handleUpdatePost,saving:s.saving,disableSpace:!0,space:(k=(w=s.feed)==null?void 0:w.space)==null?void 0:k.slug},{after_composer:y(()=>[o.canMovePost?(v(),$("div",Ymt,[_(l,{modelValue:s.changeSpace,"onUpdate:modelValue":e[0]||(e[0]=C=>s.changeSpace=C),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Move to a different space")),1)]),_:1},8,["modelValue"]),s.changeSpace?(v(),$("div",qmt,[_(d,{modelValue:s.newSpaceId,"onUpdate:modelValue":e[1]||(e[1]=C=>s.newSpaceId=C),placeholder:t.$t("Select destination"),style:{width:"100%"}},{default:y(()=>[_(c,{value:"profile",label:o.profileOptionLabel,disabled:!s.feed.space_id},{default:y(()=>[g("span",null,x(o.profileOptionLabel),1)]),_:1},8,["label","disabled"]),(v(!0),$(J,null,ye(t.appVars.auth.spaces,C=>(v(),D(c,{disabled:s.feed.space_id==C.id,key:C.id,label:C.title,value:C.id},{default:y(()=>[g("span",Gmt,[_(u,{space_profile:C},null,8,["space_profile"]),g("span",null,x(t.getExcerpt(C.title,30)),1)])]),_:2},1032,["disabled","label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])):O("",!0)])):O("",!0)]),before_submit_btn:y(()=>[t.has_pro&&t.isCommunityModerator()&&["published","unlisted"].includes(s.feed.status)?(v(),D(h,{key:0,content:t.$t("Hidden from all feeds and listings. Only reachable by its direct link."),placement:"top"},{default:y(()=>[_(l,{modelValue:s.makeUnlisted,"onUpdate:modelValue":e[2]||(e[2]=C=>s.makeUnlisted=C),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Make unlisted")),1)]),_:1},8,["modelValue"])]),_:1},8,["content"])):O("",!0)]),_:1},8,["btn_text","editing_feed","author","onUpdatePost","saving","space"])):O("",!0)])):(v(),D(p,{key:1,rows:5,animated:!0}))])),[[b,s.loading]])]}),_:1},8,["modelValue","width"])])}const BU=ce(Hmt,[["render",Xmt]]),Kmt={name:"SurveyVoters",props:["feed","option","options","totalCount"],components:{UserRouteLink:ua,UserAvatar:q2},data(){return{voters:[],loading:!1,showVotersDialog:!0,cache:{},requestId:0}},watch:{option(){this.loadVoters()}},computed:{getVotePercentage(){return this.option.vote_counts?Math.floor(this.option.vote_counts/this.totalCount*100)+"%":"0%"}},methods:{switchOption(t){this.$emit("updateOption",t)},closeDialog(){this.showVotersDialog=!1,this.$emit("close")},loadVoters(){var i;const t=(i=this.option)==null?void 0:i.slug;if(!t)return;const e=++this.requestId,n=this.cache[t];n&&(this.voters=n),this.loading=!n,this.$get(`feeds/${this.feed.id}/apps/survey-voters/${t}`).then(({voters:s})=>{this.cache[t]=s,e===this.requestId&&(this.voters=s)}).catch(s=>{n||this.$handleError(s)}).finally(()=>{e===this.requestId&&(this.loading=!1)})}},mounted(){this.loadVoters()}},Zmt={class:"dialog_header"},Jmt={class:"fcom_filter_menu"},Qmt={class:"fcom_filter_menu_ul"},egt=["onClick"],tgt={key:1},ngt={class:"feed_meta_info survey_voters_meta"},sgt={class:"meta_line"},igt={class:"meta_line"},ogt={class:"voters_list"},rgt={class:"voter_avatar"},agt={class:"voter_info"},lgt=["title"],cgt={key:2,class:"not_found"};function ugt(t,e,n,i,s,o){const r=Vt,a=B("UserAvatar"),l=B("UserRouteLink"),c=zs,u=$s;return v(),D(u,{modelValue:s.showVotersDialog,"onUpdate:modelValue":e[0]||(e[0]=d=>s.showVotersDialog=d),"modal-class":"fcom_common_dialog menu_dialog","close-on-click-modal":!0,"append-to-body":!0,width:t.dialogWidth,style:{"max-width":"800px"},direction:"rtl",onClose:o.closeDialog},{header:y(({close:d})=>[g("div",Zmt,[g("div",Jmt,[g("ul",Qmt,[(v(!0),$(J,null,ye(n.options,h=>(v(),$("li",{key:h.slug},[g("a",{onClick:Me(f=>o.switchOption(h.slug),["prevent"]),class:q({"router-link-exact-active":n.option.slug==h.slug}),href:"#"},x(h.label),11,egt)]))),128))])])])]),default:y(()=>[s.loading?(v(),D(r,{key:0,animated:"",rows:4})):s.voters.length?(v(),$("div",tgt,[g("div",ngt,[g("span",sgt,x(o.getVotePercentage),1),g("span",igt,x(t.$_n("%s Vote","%s Votes",n.option.vote_counts)),1)]),_(c,{"max-height":"800px"},{default:y(()=>[g("div",ogt,[(v(!0),$(J,null,ye(s.voters,d=>(v(),$("div",{key:d.id,class:"voter_item"},[d.xprofile?(v(),$(J,{key:0},[g("div",rgt,[_(a,{with_level:!1,xprofile:d.xprofile},null,8,["xprofile"])]),g("div",agt,[_(l,{show_badge:!0,xprofile:d.xprofile},null,8,["xprofile"]),d.xprofile.created_at?(v(),$("div",{key:0,title:d.xprofile.created_at,class:"voter_time"},x(t.$t("Joined %s",t.humanDateDiff(d.xprofile.created_at))),9,lgt)):O("",!0)])],64)):O("",!0)]))),128))])]),_:1})])):(v(),$("div",cgt,[g("p",null,x(t.$t("No voters yet")),1)]))]),_:1},8,["modelValue","width","onClose"])}const dgt=ce(Kmt,[["render",ugt]]),hgt={name:"SurveyRenderer",props:{feed:{type:Object,required:!0},is_preview:{type:Boolean,default:!1},hasTopMedia:{type:Boolean,default:!1},isChildFeed:{type:Boolean,default:!1}},components:{SurveyVoters:dgt},data(){var t,e;return{inputType:(e=(t=this.feed.meta)==null?void 0:t.survey_config)==null?void 0:e.type,formattedOptions:[],working:!1,totalCount:0,showVotersDialog:!1,selectedOption:null,endingDate:null}},watch:{"feed.meta.survey_config":{handler(t,e){JSON.stringify(t)!==JSON.stringify(e)&&(this.inputType=e.type,this.setupData())},deep:!0}},computed:{isEnded(){return this.endingDate&&this.isPastDate(this.endingDate)},endedDateLabel(){return this.$t("ended %s",this.humanDateDiff(this.endingDate))},endingDateLabel(){return this.$t("ending %s",this.humanDateDiff(this.endingDate))},shouldHideBorder(){var t,e;return!this.hasTopMedia&&(((t=this.feed.meta)==null?void 0:t.media_items)||((e=this.feed.meta)==null?void 0:e.media_preview))||this.isChildFeed}},methods:{getVoteStyle(t){const e=t?t/this.totalCount*100:0,n={width:e+"%"};return e>0&&e<100&&(n["border-top-right-radius"]=0,n["border-bottom-right-radius"]=0),n},showVoters(t){this.selectedOption=t,this.showVotersDialog=!0},updateOption(t){this.selectedOption=this.formattedOptions.find(e=>e.slug===t)},toggleVote(t){if(this.isEnded){this.$notify.error(this.$t("This poll has ended."));return}if(this.showVotersDialog)return;let e=this.formattedOptions[t].voted;this.inputType=="single_choice"&&this.each(this.formattedOptions,n=>{n.voted=!1}),this.formattedOptions[t].voted=!e,this.syncVotes()},syncVotes(){if(this.is_preview)return;let t=[];this.each(this.formattedOptions,e=>{e.voted&&t.push(e.slug)}),this.working=!0,this.$post(`feeds/${this.feed.id}/apps/survey-vote`,{vote_indexes:t}).then(e=>{this.feed.meta.survey_config=e.survey_config,this.setupData()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})},setupData(){let t=[],e=0;this.feed.meta.survey_config&&(this.each(this.feed.meta.survey_config.options,n=>{t.push(n),n.vote_counts&&(e+=parseInt(n.vote_counts))}),this.formattedOptions=t,this.totalCount=e,this.endingDate=this.feed.meta.survey_config.end_date)}},mounted(){this.setupData()}},fgt={class:"fcom_app_options"},pgt=["onClick"],mgt={class:"fcom_app_text"},ggt={class:"fcom_app_input_wrap"},vgt={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 6"},_gt={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8 8"},ygt=["onClick"],bgt={key:0},wgt={class:"feed_meta_info"},kgt={key:0,class:"meta_line"},Cgt=["title"],xgt=["title"];function Sgt(t,e,n,i,s,o){const r=B("ArrowRight"),a=we,l=B("SurveyVoters");return v(),$(J,null,[g("div",{class:q(["fcom_app_render",{"no-border":o.shouldHideBorder}])},[g("div",fgt,[(v(!0),$(J,null,ye(s.formattedOptions,(c,u)=>(v(),$("div",{key:c.slug,onClick:d=>o.toggleVote(u),class:q([c.voted?"fcom_is_voted":"","fcom_app_option"])},[g("div",mgt,[g("span",ggt,[g("span",{class:q("fcom_input_"+s.inputType)},[s.inputType=="single_choice"?(v(),$("svg",vgt,[...e[1]||(e[1]=[g("circle",{cx:"3",cy:"3",r:"2.5",fill:"currentColor"},null,-1)])])):(v(),$("svg",_gt,[...e[2]||(e[2]=[g("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)])]))],2)]),g("span",null,x(c.label),1)]),g("div",{class:"fcom_app_counts",onClick:d=>o.showVoters(c)},[N(x(c.vote_counts?Math.floor(c.vote_counts/s.totalCount*100)+"%":"")+" ",1),c.vote_counts?(v(),$("span",bgt,"("+x(c.vote_counts)+")",1)):O("",!0),c.vote_counts?(v(),D(a,{key:1,class:"fcom_arrow_icon"},{default:y(()=>[_(r)]),_:1})):O("",!0)],8,ygt),s.totalCount?(v(),$("span",{key:0,style:Xe(o.getVoteStyle(c.vote_counts)),class:"fc_app_shadow"},null,4)):O("",!0)],10,pgt))),128))]),g("div",wgt,[s.totalCount?(v(),$("span",kgt,x(t.$_n("%d vote","%d votes",s.totalCount)),1)):O("",!0),s.endingDate?(v(),$(J,{key:1},[o.isEnded?(v(),$("span",{key:0,title:t.$t("Ended at: %s",s.endingDate),class:"meta_line"},x(o.endedDateLabel),9,Cgt)):(v(),$("span",{key:1,title:t.$t("Will end at: %s",s.endingDate),class:"meta_line"},x(o.endingDateLabel),9,xgt))],64)):O("",!0)])],2),s.showVotersDialog?(v(),D(l,{key:0,feed:n.feed,option:s.selectedOption,options:s.formattedOptions,totalCount:s.totalCount,onUpdateOption:o.updateOption,onClose:e[0]||(e[0]=c=>s.showVotersDialog=!1)},null,8,["feed","option","options","totalCount","onUpdateOption"])):O("",!0)],64)}const zU=ce(hgt,[["render",Sgt]]),$gt={name:"BookmarkIcon",props:["is_active"]},Agt={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"},Egt={key:1,width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Mgt(t,e,n,i,s,o){return n.is_active?(v(),$("svg",Agt,[...e[0]||(e[0]=[g("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)])])):(v(),$("svg",Egt,[...e[1]||(e[1]=[g("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)])]))}const Tgt=ce($gt,[["render",Mgt]]),Pgt={name:"RenderChildPost",components:{ImageCarousel:IS,SurveyRenderer:zU,DocumentLists:yv,UserRouteLink:ua,MediaPreview:Ep,FeedMdContent:Mp},props:["feed_id"],data(){return{feed:null,loading:!1,notFound:null,in_space:this.$route.params.space,hasOverflowContent:!1}},computed:{hasTopMedia(){var e,n,i,s,o,r;if(this.appVars.features.post_layout!="modern"||!this.feed)return!1;let t=["oembed","iframe_html"].includes((n=(e=this.feed.meta)==null?void 0:e.media_preview)==null?void 0:n.type);return t||(t=(s=(i=this.feed.meta)==null?void 0:i.media_preview)==null?void 0:s.is_uploaded),t||(t=((r=(o=this.feed.meta)==null?void 0:o.media_items)==null?void 0:r.length)==1),t},feedClasses(){if(!this.feed)return[];let t=["feed_single"];return t.push("feed_type_"+this.feed.type),this.hasTopMedia&&t.push("feed_modern_layout"),t}},methods:{getFeed(){this.loading=!0,this.$get("feeds/"+this.feed_id+"/by-id").then(t=>{this.feed=t.feed,this.appVars.last_feed_id<t.feed.id&&(this.appVars.last_feed_id=t.feed.id),this.$nextTick(()=>{this.setOverFlow()})}).catch(t=>{typeof t=="object"&&t.xhr_status==404?this.notFound=!0:this.$handleError(t)}).finally(()=>{this.loading=!1})},handleFeedClick(t){t.preventDefault()&&t.stopPropagation();let e={name:"single_feed",params:{feed_slug:this.feed.slug}};this.feed.space&&(e={name:"space_feed",params:{feed_slug:this.feed.slug,space:this.feed.space.slug}}),this.$router.push(e)},setOverFlow(){let t=this.$refs.feed_body;if(!t)return;t.scrollHeight>400&&(this.hasOverflowContent=!0)}},mounted(){this.getFeed()}},Igt=["id"],Lgt={key:0,class:"fcom_top_media"},Ogt={class:"fcom_feed_header_wrap"},Dgt={class:"feed_header"},Rgt={key:0,class:"feed_user"},Vgt={class:"feed_user_name"},Fgt={class:"feed_meta_info"},Ngt={key:0,class:"meta_line"},Bgt=["title","href"],zgt={key:1,class:"feed_timestamp"},Hgt={key:0,class:"feed_title"},Ugt={class:"feed_title_heading"},jgt={key:1,class:"expand-button"};function Wgt(t,e,n,i,s,o){var p,m,b,w,k,C,A,S,M,P,T;const r=B("media-preview"),a=B("UserAvatar"),l=B("UserRouteLink"),c=B("FeedMdContent"),u=ze,d=B("DocumentLists"),h=B("SurveyRenderer"),f=B("ImageCarousel");return s.feed?(v(),$("div",{key:0,onClick:e[0]||(e[0]=(...I)=>o.handleFeedClick&&o.handleFeedClick(...I)),class:"fcom_child_feed"},[g("div",{id:"feed_id_"+s.feed.id,class:q([o.feedClasses,"feed"])},[o.hasTopMedia?(v(),$("div",Lgt,[s.feed.meta&&s.feed.meta.media_preview?(v(),D(r,{key:0,feed:s.feed},null,8,["feed"])):O("",!0)])):O("",!0),g("div",Ogt,[g("div",Dgt,[s.feed.xprofile?(v(),$("div",Rgt,[_(a,{with_level:!1,xprofile:s.feed.xprofile},null,8,["xprofile"]),g("div",null,[g("div",Vgt,[_(l,{show_badge:!0,xprofile:s.feed.xprofile,show_follow:!0},null,8,["xprofile"])]),g("div",Fgt,[s.feed.content_type=="survey"&&((w=(b=(m=(p=s.feed)==null?void 0:p.meta)==null?void 0:m.survey_config)==null?void 0:b.options)!=null&&w.length)?(v(),$("span",Ngt,x(t.$t("created a poll")),1)):O("",!0),g("a",{title:s.feed.created_at,href:s.feed.permalink,class:"feed_timestamp"},x(t.humanDateDiff(s.feed.created_at)),9,Bgt),!s.in_space&&s.feed.space?(v(),$("span",zgt,x(t.$t("Posted in %s",t.getExcerpt(s.feed.space.title,30))),1)):O("",!0)])])])):O("",!0)])]),g("div",{ref:"feed_body",class:q([{feed_is_overflow_content:s.hasOverflowContent},"feed_body"])},[s.feed.title?(v(),$("div",Hgt,[g("h2",Ugt,x(s.feed.title),1)])):O("",!0),_(c,{class_name:"feed_texts",content:s.feed.message_rendered},null,8,["content"]),s.hasOverflowContent?(v(),$("div",jgt,[_(u,{class:"btn_expand"},{default:y(()=>[N(x(t.$t("Show More")),1)]),_:1})])):O("",!0)],2),s.feed.content_type=="document"?(v(),D(d,{key:1,document_lists:((C=(k=s.feed)==null?void 0:k.meta)==null?void 0:C.document_lists)||[]},null,8,["document_lists"])):(v(),$(J,{key:2},[s.feed.content_type=="survey"&&((P=(M=(S=(A=s.feed)==null?void 0:A.meta)==null?void 0:S.survey_config)==null?void 0:M.options)!=null&&P.length)?(v(),D(h,{key:0,feed:s.feed,isChildFeed:!0},null,8,["feed"])):O("",!0),s.feed.meta?(v(),$(J,{key:1},[s.feed.meta.media_items?(v(),D(f,{key:0,feed:s.feed},null,8,["feed"])):!o.hasTopMedia&&(s.feed.meta.media_preview||(T=s.feed.meta.audio_medias)!=null&&T.length)?(v(),D(r,{key:1,feed:s.feed},null,8,["feed"])):O("",!0)],64)):O("",!0)],64))],10,Igt)])):O("",!0)}const Ygt=ce(Pgt,[["render",Wgt]]),qgt={name:"CustomAppMeta",components:{RenderChildPost:Ygt},props:{feed:{type:Object,required:!0}}},Ggt={ref:"fcom_custom_app"},Xgt={key:0},Kgt=["innerHTML"];function Zgt(t,e,n,i,s,o){const r=B("RenderChildPost");return v(),$("div",Ggt,[n.feed.meta.custom_app_preview.app_name=="child_post"&&n.feed.meta.custom_app_preview.feed_id?(v(),$("div",Xgt,[_(r,{feed_id:n.feed.meta.custom_app_preview.feed_id},null,8,["feed_id"])])):n.feed.meta.custom_app_preview.custom_html?(v(),$("div",{key:1,innerHTML:n.feed.meta.custom_app_preview.custom_html},null,8,Kgt)):O("",!0)],512)}const Jgt=ce(qgt,[["render",Zgt]]),Qgt={name:"FeedAction",components:{EditFeed:BU},props:{feed:{type:Object,required:!0},hide_create_form:{type:Boolean,default:!1}},emits:["updated","deleted"],data(){return{isEdit:!1,working:!1}},computed:{isReportEnabled(){return this.has_pro&&this.appVars.moderationConfig.is_enabled},showReportOption(){var e,n;return!(((e=this.feed)==null?void 0:e.user_id)==((n=this.auth)==null?void 0:n.user_id))&&this.auth.user_id&&this.isReportEnabled}},methods:{editItem(){this.$refs.popover.hide(),this.isEdit=!0},handleUpdate(t){this.$emit("updated",t);const e=document.getElementById("feed_id_"+t.id);e&&(e.classList.add("fcom_highlight_glow"),setTimeout(()=>{e.classList.remove("fcom_highlight_glow")},4500))},reportPost(){this.$refs.popover.hide(),this.$eventBus.emit("showReportContentModal",{reportConfig:this.feed,type:"post"})},copyFeedLink(){navigator.clipboard.writeText(this.feed.permalink).then(()=>{this.$notify.success(this.$t("Link copied to clipboard")),this.$refs.popover.hide()}).catch(t=>{this.$notify.error(this.$t("Failed to copy"))})},toggleSticky(){!this.feed.space_id||this.working||(this.working=!0,this.feed.is_sticky=!this.feed.is_sticky,this.$patch("feeds/"+this.feed.id,{is_sticky:this.feed.is_sticky?1:0}).then(t=>{this.feed.is_sticky=t.feed.is_sticky,this.$emit("reload")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1}))},toggleSidebarPin(){!this.feed.space_id||this.working||(this.$refs.popover.hide(),this.working=!0,this.feed.priority=!this.feed.priority,this.$patch("feeds/"+this.feed.id,{priority:this.feed.priority?1:0}).then(t=>{this.$notify.success(t.feed.priority?this.$t("Pinned to sidebar"):this.$t("Unpinned from sidebar")),this.feed.priority=t.feed.priority,this.$eventBus.emit("updateSpaceSidebar",this.feed.space_id)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1}))},toggleUnlist(){if(this.working)return;const t=this.feed.status!=="unlisted";this.$refs.popover.hide(),this.working=!0,this.$patch("feeds/"+this.feed.id,{status:t?"unlisted":"published"}).then(e=>{this.feed.status=e.feed.status,this.$notify.success(e.feed.status==="unlisted"?this.$t("Post has been unlisted."):this.$t("Post has been listed.")),this.$emit("updated",e.feed)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})},toggleCommentStatus(){var e;if(this.working)return;let t=((e=this.feed.meta)==null?void 0:e.comments_disabled)=="yes";this.$refs.popover.hide(),this.working=!0,this.$patch("feeds/"+this.feed.id,{comments_disabled:t?0:1}).then(n=>{var s;let i=((s=n.feed.meta)==null?void 0:s.comments_disabled)=="yes";this.$notify.success(i?this.$t("Comments have been disabled."):this.$t("Comments have been enabled.")),this.feed.meta.comments_disabled=n.feed.meta.comments_disabled}).catch(n=>{this.$handleError(n)}).finally(()=>{this.working=!1})},removePreview(){this.$refs.popover.hide(),this.$confirm(this.$t("Are you sure you want to remove the preview image? This action cannot be undone."),this.$t("Remove Preview"),{confirmButtonText:this.$t("Remove"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.working=!0,this.$del("feeds/"+this.feed.id+"/media-preview").then(t=>{this.feed.meta.media_preview=null}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1})}).catch(()=>{})},deleteItem(){this.working||(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"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.working||(this.working=!0,this.$emit("deleted"),this.working=!1)}).catch(()=>{}))}}},e1t={class:"actions_items"},t1t={key:0},n1t={key:1},s1t={key:0},i1t={key:1},o1t={key:0},r1t={key:1},a1t={key:0},l1t={key:1};function c1t(t,e,n,i,s,o){var d,h;const r=B("MoreFilled"),a=we,l=ze,c=Yo,u=B("EditFeed");return v(),$(J,null,[_(c,{persistent:!1,ref:"popover",placement:"bottom",width:200,trigger:"click",teleported:!1,"popper-class":"fcom_menu_below_nav"},{reference:y(()=>[_(l,{"aria-label":t.$t("View Post actions"),class:"fcom_dot_menu",size:"small",text:""},{default:y(()=>[_(a,null,{default:y(()=>[_(r)]),_:1})]),_:1},8,["aria-label"])]),default:y(()=>{var f,p;return[g("ul",e1t,[le(t.$slots,"before_feed_actions_pop"),g("li",{onClick:e[0]||(e[0]=m=>o.copyFeedLink())},x(t.$t("Copy Link")),1),o.showReportOption?(v(),$("li",{key:0,onClick:e[1]||(e[1]=m=>o.reportPost())},x(t.$t("Report Post")),1)):O("",!0),t.canEditFeed(n.feed)?(v(),$(J,{key:1},[g("li",{onClick:e[2]||(e[2]=m=>o.editItem())},x(t.$t("Edit")),1),t.has_pro&&t.isCommunityModerator()&&["published","unlisted"].includes(n.feed.status)?(v(),$("li",{key:0,onClick:e[3]||(e[3]=m=>o.toggleUnlist())},[n.feed.status=="unlisted"?(v(),$("span",t1t,x(t.$t("List Post")),1)):(v(),$("span",n1t,x(t.$t("Unlist Post")),1))])):O("",!0),n.feed.space&&t.hasSpaceAdminAccess(n.feed.space)?(v(),$(J,{key:1},[g("li",{onClick:e[4]||(e[4]=m=>o.toggleSticky())},[n.feed.is_sticky?(v(),$("span",s1t,x(t.$t("Unpin from Top")),1)):(v(),$("span",i1t,x(t.$t("Pin to top")),1))]),g("li",{onClick:e[5]||(e[5]=m=>o.toggleSidebarPin())},[n.feed.priority?(v(),$("span",r1t,x(t.$t("Unpin from sidebar")),1)):(v(),$("span",o1t,x(t.$t("Pin to sidebar")),1))])],64)):O("",!0),(f=n.feed.meta)!=null&&f.media_preview?(v(),$("li",{key:2,onClick:e[6]||(e[6]=m=>o.removePreview())},x(t.$t("Remove Preview")),1)):O("",!0),t.hasSpaceAdminAccess(n.feed.space)?(v(),$("li",{key:3,onClick:e[7]||(e[7]=m=>o.toggleCommentStatus())},[((p=n.feed.meta)==null?void 0:p.comments_disabled)=="yes"?(v(),$("span",a1t,x(t.$t("Enable comments")),1)):(v(),$("span",l1t,x(t.$t("Disable comments")),1))])):O("",!0)],64)):O("",!0),t.canDeleteFeed(n.feed)?(v(),$("li",{key:2,onClick:e[8]||(e[8]=m=>o.deleteItem())},x(t.$t("Delete")),1)):O("",!0),le(t.$slots,"after_feed_actions_pop")])]}),_:3},512),s.isEdit?(v(),D(u,{key:0,feedSlug:n.feed.slug,dialogVisible:s.isEdit,hide_create_form:n.hide_create_form,author:{name:(d=n.feed.xprofile)==null?void 0:d.display_name,avatar:(h=n.feed.xprofile)==null?void 0:h.avatar},onUpdated:o.handleUpdate,onClose:e[9]||(e[9]=f=>s.isEdit=!1)},null,8,["feedSlug","dialogVisible","hide_create_form","author","onUpdated"])):O("",!0)],64)}const u1t=ce(Qgt,[["render",c1t]]),d1t={name:"Feed",components:{DocumentLists:yv,CustomAppMeta:Jgt,BookmarkIcon:Tgt,StickyIcon:wU,UserRouteLink:ua,EditFeed:BU,FeedFooter:emt,MediaPreview:Ep,ImageCarousel:IS,SurveyRenderer:zU,ReportReview:bU,FeedAction:u1t,FeedMdContent:Mp},emits:["updated","deleted","removed","reload","commented"],props:{feed:{type:Object,required:!0},is_single:{type:Boolean,default:!1},is_route:{type:Boolean,default:!1},show_footer:{type:Boolean,default:!0},show_header:{type:Boolean,default:!0},show_report:{type:Boolean,default:!1},hide_create_form:{type:Boolean,default:!1},is_preview:{type:Boolean,default:!1},show_actions:{type:Boolean,default:!0},is_modal:{type:Boolean,default:!1},isSingleSpacePage:{type:Boolean,default:!1}},data(){return{in_space:this.$route.params.space,working:!1,hasOverflowContent:!1,isExpanded:!1,joiningSpace:!1}},computed:{isReportEnabled(){return this.has_pro&&this.appVars.moderationConfig.is_enabled},showReport(){var t;return this.hasSpaceModeratorAccess(this.feed.space)&&this.isReportEnabled&&this.show_report&&(this.feed.status=="pending"||((t=this.feed.meta)==null?void 0:t.reports_count))},space_slug(){let t=!1;return this.feed.space?t=this.feed.space.slug:this.$route.params.space&&(t=this.$route.params.space),t},feedClasses(){let t=[];return t.push("feed_type_"+this.feed.type),this.feed.type=="article"&&t.push(this.feed.featured_image?"feed_has_image":"feed_no_image"),this.is_preview&&t.push("feed_preview"),this.is_single?t.push("feed_single"):t.push("feed_list_item"),this.hasTopMedia&&t.push("feed_modern_layout"),t},feedRoute(){let t={name:"single_feed",params:{feed_slug:this.feed.slug}};return this.space_slug&&(t={name:"space_feed",params:{feed_slug:this.feed.slug,space:this.space_slug}}),t},hasTopMedia(){var e,n,i,s,o,r;if(this.appVars.features.post_layout!="modern")return!1;let t=["oembed","iframe_html"].includes((n=(e=this.feed.meta)==null?void 0:e.media_preview)==null?void 0:n.type);return t||(t=(s=(i=this.feed.meta)==null?void 0:i.media_preview)==null?void 0:s.is_uploaded),t||(t=((r=(o=this.feed.meta)==null?void 0:o.media_items)==null?void 0:r.length)==1),t},parsedMessage(){return this.parseMessage(this.feed.message_rendered)}},methods:{getTopicRoute(t){return this.space_slug?{name:"space_feeds",params:{space:this.space_slug},query:{topic:t}}:{name:"all_feeds",query:{topic:t}}},getScheduledTime(t){return this.$t("%1$s at %2$s",this.formattedDate(t),this.formattedTime(t))},gotoTopicUrl(t){let e=this.getTopicRoute(t);this.$router.push(e)},gotoFeed(t){t&&(t.metaKey||t.ctrlKey)||(t&&(t.preventDefault(),t.stopPropagation()),window.__showing_feed=this.feed,this.$router.push(this.feedRoute))},getSpaceRoute(t){return{name:"space_feeds",params:{space:t}}},getFeedContent(){return this.feed.title},expandInline(){this.hasOverflowContent=!1,this.isExpanded=!0},showFullContent(t){if(!this.hasFeature("show_post_modal")){this.expandInline();return}t&&t.stopPropagation(),this.$eventBus.emit("showFeedModal",{feed:this.feed})},parseMessage(t){if(!t)return"";const e=this.$route.params.space?`${this.appVars.urls.portal_base}space/${this.$route.params.space}/home`:this.appVars.urls.global_search;let n=t.replace(/<a\s(?:(?!target="_blank")[^>])*>|<[^>]+>|#([\p{L}\p{M}\p{N}_-]+)/gu,(s,o,r,a)=>s.startsWith("<a")&&!s.includes('target="_blank"')?s.includes(window.location.origin)?s:s.replace("<a",'<a target="_blank" rel="noopener noreferrer nofollow"'):o&&!this.isInsideHtmlTag(a,r)?`<a onclick="window.FluentCommunityUtil.handleSearchClick(event)" href="${e}?search=%23${o}">#${o}</a>`:s);return n.indexOf('<span class="fcom_dynamic_prop" data-type="timestamp"')===-1?n:(s=>s.replace(/<span class="fcom_dynamic_prop" data-type="timestamp" data-timestamp="(\d+)">([^<]+)<\/span>/g,(o,r,a)=>{try{const l=this.dayjs(r*1e3);if(!l.isValid())return o;const u=l.local().format(this.siteDateTimeFormat)+" ("+this.currentTimeZoneName+")";return`<span class="fcom_timestamp" title="${a}">${u}</span>`}catch{return o}}))(n)},isInsideHtmlTag(t,e){let n=!1;for(let i=0;i<e;i++)t[i]==="<"&&(n=!0),t[i]===">"&&(n=!1);return n},handleUpdate(t){this.$emit("updated",t),Object.assign(this.feed,t)},handleDelete(){this.$emit("deleted")},handleRemoveBookmark(){this.$emit("deleted")},toggleBookmark(){const t={react_type:"bookmark"};this.feed.bookmarked&&(t.remove=!0),this.feed.bookmarked=!this.feed.bookmarked,this.$post("feeds/"+this.feed.id+"/react",t).then(e=>{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(e=>{this.$handleError(e),this.feed.bookmarked=!this.feed.bookmarked})},toggleSticky(){this.feed.space_id&&(this.feed.is_sticky=!this.feed.is_sticky,this.$patch("feeds/"+this.feed.id,{is_sticky:this.feed.is_sticky?1:0}).then(t=>{this.feed.is_sticky=t.feed.is_sticky,this.$emit("reload")}).catch(t=>{this.$handleError(t)}))},joinSpace(){this.joiningSpace=!0,this.$post("spaces/"+this.feed.space.slug+"/join").then(t=>{this.appVars.user_membership_slugs.push(this.feed.space.slug),this.$notify.success(t.message),document.location.href=this.feed.permalink}).catch(t=>{this.$handleError(t)}).finally(()=>{this.joiningSpace=!1})},onModReport(t){var e,n;((e=t.content)==null?void 0:e.id)==((n=this.feed)==null?void 0:n.id)&&(t.action==="unpublished"&&t.type!=="comment"?this.$emit("removed"):(this.feed.meta={...this.feed.meta,...t.content.meta},t.content.status&&(this.feed.status=t.content.status)))}},created(){this.$eventBus.on("updateModerationReport",this.onModReport)},beforeUnmount(){this.$eventBus.off("updateModerationReport",this.onModReport)},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 t=this.$refs.feed_body;if(!t)return;t.scrollHeight>400&&(this.hasOverflowContent=!0)}},h1t=["id"],f1t={key:1,class:"fcom_top_media"},p1t={key:2,class:"fcom_feed_header_wrap"},m1t={class:"feed_actions fcom_concat_buttons"},g1t={key:0,class:"fcom_feed_topics"},v1t={class:"feed_header"},_1t={key:0,class:"feed_user"},y1t={class:"feed_user_info"},b1t={class:"feed_user_name"},w1t={key:0,class:"feed_status"},k1t={key:1,class:"feed_status"},C1t={key:2,class:"feed_status"},x1t={class:"feed_meta_info"},S1t={key:0,class:"meta_line"},$1t=["title","href"],A1t=["title","href"],E1t={key:3},M1t={key:0,class:"feed_title"},T1t={key:0,class:"feed_title_heading"},P1t=["href"],I1t={key:1,class:"feed_title_heading"};function L1t(t,e,n,i,s,o){var T,I,L,R,V,H,F,U,Y,z,X,Z,G,Q,ne;const r=B("report-review"),a=B("media-preview"),l=ze,c=B("StickyIcon"),u=we,d=B("BookmarkIcon"),h=B("FeedAction"),f=B("router-link"),p=B("UserAvatar"),m=B("UserRouteLink"),b=qs,w=B("FeedMdContent"),k=B("SurveyRenderer"),C=B("ImageCarousel"),A=B("DocumentLists"),S=B("CustomAppMeta"),M=B("feed-footer"),P=xt("loading");return Re((v(),$("div",{id:"feed_id_"+((T=n.feed)==null?void 0:T.id),class:q([o.feedClasses,"feed"])},[o.showReport?(v(),D(r,{key:0,feed:n.feed},null,8,["feed"])):O("",!0),o.hasTopMedia?(v(),$("div",f1t,[n.feed.meta&&n.feed.meta.media_preview?(v(),D(a,{key:0,feed:n.feed,is_preview:n.is_preview},null,8,["feed","is_preview"])):O("",!0)])):O("",!0),n.show_header?(v(),$("div",p1t,[g("div",m1t,[t.auth.user_id&&!t.hasSpaceAccess((I=n.feed.space)==null?void 0:I.slug)&&!n.is_single&&!n.isSingleSpacePage?(v(),D(l,{key:0,loading:s.joiningSpace,class:"fcom_secondary_button join_button",onClick:e[0]||(e[0]=K=>o.joinSpace())},{default:y(()=>[N(x(t.$t("Join")),1)]),_:1},8,["loading"])):O("",!0),n.show_actions?(v(),$(J,{key:1},[n.feed.is_sticky&&s.in_space?(v(),D(l,{key:0,onClick:e[1]||(e[1]=K=>o.toggleSticky()),"aria-label":t.$t("Toggle Sticky"),class:"no_pad_btn",text:"",size:"small"},{default:y(()=>[_(u,{class:"fcom_sticky"},{default:y(()=>[_(c)]),_:1})]),_:1},8,["aria-label"])):O("",!0),t.auth.user_id?(v(),D(l,{key:1,"aria-label":t.$t("Toggle Bookmark"),size:"small",text:"",onClick:e[2]||(e[2]=K=>o.toggleBookmark()),class:q([{bookmark_active:n.feed.bookmarked},"feed_bookmark no_pad_btn"]),title:n.feed.bookmarked?t.$t("Remove From Bookmark"):t.$t("Bookmark this post")},{default:y(()=>[_(u,{style:{"font-size":"14px"}},{default:y(()=>[_(d,{is_active:n.feed.bookmarked},null,8,["is_active"])]),_:1})]),_:1},8,["aria-label","class","title"])):O("",!0),_(h,{feed:n.feed,hide_create_form:n.hide_create_form,onUpdated:o.handleUpdate,onDeleted:o.handleDelete},{before_feed_actions_pop:y(()=>[n.is_route?(v(),$("li",{key:0,onClick:e[3]||(e[3]=K=>t.$emit("reload"))},x(t.$t("Refresh")),1)):O("",!0)]),_:1},8,["feed","hide_create_form","onUpdated","onDeleted"])],64)):O("",!0),le(t.$slots,"after_feed_actions")]),((L=t.appVars.topicsConfig)==null?void 0:L.show_on_post_card)=="yes"&&n.feed.terms&&n.feed.terms.length?(v(),$("div",g1t,[(v(!0),$(J,null,ye(n.feed.terms,K=>(v(),D(f,{onClick:Me(ae=>o.gotoTopicUrl(K.slug),["prevent"]),key:K.slug,to:o.getTopicRoute(K.slug),class:"feed_timestamp"},{default:y(()=>[N("#"+x(K.title),1)]),_:2},1032,["onClick","to"]))),128))])):O("",!0),g("div",v1t,[n.feed.xprofile?(v(),$("div",_1t,[_(p,{with_level:!1,xprofile:n.feed.xprofile},null,8,["xprofile"]),g("div",y1t,[g("div",b1t,[_(m,{show_badge:!0,xprofile:n.feed.xprofile,show_follow:!0},null,8,["xprofile"]),n.feed.status=="pending"?(v(),$("span",w1t,[_(b,{type:"warning"},{default:y(()=>[N(x(t.$t("In Review")),1)]),_:1})])):O("",!0),n.feed.status=="scheduled"?(v(),$("span",k1t,[_(b,{type:"warning"},{default:y(()=>[N(x(t.$t("Scheduled")),1)]),_:1})])):O("",!0),n.feed.status=="unlisted"&&!n.is_single?(v(),$("span",C1t,[_(b,{class:"fcom_unlisted_tag"},{default:y(()=>[N(x(t.$t("Unlisted")),1)]),_:1})])):O("",!0)]),g("div",x1t,[n.feed.content_type=="survey"&&((F=(H=(V=(R=n.feed)==null?void 0:R.meta)==null?void 0:V.survey_config)==null?void 0:H.options)!=null&&F.length)?(v(),$("span",S1t,x(t.$t("created a poll")),1)):O("",!0),n.feed.status=="scheduled"?(v(),$("a",{key:1,title:n.feed.scheduled_at,onClick:e[4]||(e[4]=(...K)=>o.gotoFeed&&o.gotoFeed(...K)),href:n.feed.permalink,class:"feed_timestamp"},x(o.getScheduledTime(n.feed.scheduled_at)),9,$1t)):(v(),$("a",{key:2,title:n.feed.created_at,onClick:e[5]||(e[5]=(...K)=>o.gotoFeed&&o.gotoFeed(...K)),href:n.feed.permalink,class:"feed_timestamp"},x(t.humanDateDiff(n.feed.created_at)),9,A1t)),!s.in_space&&n.feed.space?(v(),$("span",E1t,[_(f,{to:o.getSpaceRoute(n.feed.space.slug),class:"feed_timestamp"},{default:y(()=>[N(x(t.$t("Posted in %s",t.getExcerpt(n.feed.space.title,30))),1)]),_:1},8,["to"])])):O("",!0)])])])):O("",!0),le(t.$slots,"after_feed_header")])])):O("",!0),g("div",{ref:"feed_body",class:q([{feed_is_overflow_content:s.hasOverflowContent},"feed_body"])},[n.feed.title?(v(),$("div",M1t,[n.is_single?(v(),$("h2",I1t,x(n.feed.title),1)):(v(),$("h2",T1t,[g("a",{onClick:e[6]||(e[6]=Me((...K)=>o.showFullContent&&o.showFullContent(...K),["prevent"])),href:n.feed.permalink},x(n.feed.title),9,P1t)]))])):O("",!0),_(w,{class_name:"feed_texts",content:o.parsedMessage},null,8,["content"]),s.hasOverflowContent&&!s.isExpanded?(v(),$("div",{key:1,onClick:e[7]||(e[7]=K=>o.expandInline()),class:"expand-button"},[_(l,{class:"btn_expand"},{default:y(()=>[N(x(t.$t("Show More")),1)]),_:1})])):O("",!0)],2),n.feed.content_type=="survey"&&((X=(z=(Y=(U=n.feed)==null?void 0:U.meta)==null?void 0:Y.survey_config)==null?void 0:z.options)!=null&&X.length)?(v(),$(J,{key:3},[_(k,{feed:n.feed,is_preview:n.is_preview,hasTopMedia:o.hasTopMedia},null,8,["feed","is_preview","hasTopMedia"]),n.feed.meta.media_items?(v(),D(C,{key:0,is_single:n.is_single,feed:n.feed},null,8,["is_single","feed"])):!o.hasTopMedia&&(n.feed.meta.media_preview||(Z=n.feed.meta.audio_medias)!=null&&Z.length)?(v(),D(a,{key:1,feed:n.feed},null,8,["feed"])):O("",!0)],64)):n.feed.content_type=="document"?(v(),D(A,{key:4,document_lists:((Q=(G=n.feed)==null?void 0:G.meta)==null?void 0:Q.document_lists)||[]},null,8,["document_lists"])):n.feed.meta?(v(),$(J,{key:5},[n.feed.meta.media_items?(v(),D(C,{key:0,is_single:n.is_single,feed:n.feed},null,8,["is_single","feed"])):!o.hasTopMedia&&(n.feed.meta.media_preview||(ne=n.feed.meta.audio_medias)!=null&&ne.length)?(v(),D(a,{key:1,feed:n.feed},null,8,["feed"])):O("",!0),n.feed.meta.custom_app_preview?(v(),D(S,{key:2,feed:n.feed},null,8,["feed"])):O("",!0)],64)):O("",!0),n.show_footer?(v(),D(M,{key:6,feed:n.feed,is_modal:n.is_modal,is_single:n.is_single,space_slug:o.space_slug,onJoinSpace:e[8]||(e[8]=()=>{o.joinSpace()}),onCommented:e[9]||(e[9]=K=>{t.$emit("commented",K)})},null,8,["feed","is_modal","is_single","space_slug"])):O("",!0),le(t.$slots,"after_feed_footer")],10,h1t)),[[P,s.working]])}const O1t=ce(d1t,[["render",L1t]]),D1t={name:"ReportDetails",components:{Feed:O1t,SingleComent:Y2,Pagination:du},props:["is_open","report","status"],data(){return{loading:!1,isOpen:this.is_open,currentTab:"details",postReports:[],pagination:{page:1,per_page:5,total:0}}},watch:{is_open(t){this.isOpen=t},isOpen(t){t||this.$emit("close")}},computed:{isCommentReport(){return t=>t.content_type=="comment"},getReason(){return t=>this.appVars.report_reasons[t]},getPermalink(){return t=>{var n,i;const e=(n=t.post)==null?void 0:n.permalink;return t.content_type=="comment"?`${e}?comment_id=${(i=t.comment)==null?void 0:i.id}`:e}},getAuthorProfile(){return t=>t.content_type=="comment"?t.comment.xprofile:t.post.xprofile},getIgnoreBtnText(){return t=>t.status=="unpublished"?this.$t("Publish")+" "+this.$t(this.ucFirst(t.content_type)):this.$t("Dismiss Reports")},getUnpublishBtnText(){return t=>t.status=="unpublished"?this.$t("Publish")+" "+this.$t(this.ucFirst(t.content_type)):this.$t("Unpublish")+" "+this.$t(this.ucFirst(t.content_type))}},methods:{switchOption(t){this.currentTab=t},getPostReports(){this.loading=!0;let t={page:this.pagination.page,per_page:this.pagination.per_page,content_type:this.report.content_type};this.report.content_type=="comment"?t.parent_id=this.report.parent_id:t.post_id=this.report.post_id,this.$get("moderation/reports",t).then(e=>{this.postReports=e.reports.data,this.pagination.total=e.reports.total}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},ignoreReport(t){this.isOpen=!1,this.$emit("close"),this.$emit("ignore",t)},unpublishReport(t){this.isOpen=!1,this.$emit("close"),this.$emit("unpublish",t)},deleteReport(t){this.isOpen=!1,this.$emit("close"),this.$emit("delete",t)}},mounted(){this.currentTab="details",this.getPostReports()}},R1t={class:"dialog_header report_details_header"},V1t={class:"report_details_header_left"},F1t={class:"report_details_header_right"},N1t=["href"],B1t=["href"],z1t=["href"],H1t=["href"],U1t={class:"meta_line"},j1t=["href","title"],W1t={key:0,class:"dialog_body"},Y1t={class:"fcom_filter_menu"},q1t={class:"fcom_filter_menu_ul"},G1t={key:0,class:"report_details"},X1t={key:1,class:"report_details"},K1t={class:"report_details_header"},Z1t={class:"report_details_header_left"},J1t={class:"report_details_header_right"},Q1t={key:0},evt={key:1},tvt={key:1},nvt={class:"report_reason"},svt=["title"],ivt={key:0,class:"report_details_body"},ovt=["textContent"],rvt=["aria-label"],avt={class:"dialog_footer report_footer"};function lvt(t,e,n,i,s,o){const r=B("UserAvatar"),a=B("UserRouteLink"),l=B("SingleComent"),c=B("Feed"),u=Vt,d=B("Pagination"),h=ze,f=$s;return v(),D(f,{modelValue:s.isOpen,"onUpdate:modelValue":e[6]||(e[6]=p=>s.isOpen=p),"modal-class":"fcom_common_dialog",id:"fluent_comminity_body",title:t.$t("Review Report"),width:t.dialogWidth,"append-to-body":!0,"close-on-click-modal":!1,direction:"rtl"},{header:y(()=>{var p,m,b,w,k,C,A,S,M,P,T,I,L;return[g("div",R1t,[g("div",V1t,[_(r,{with_level:!1,xprofile:o.getAuthorProfile(n.report)},null,8,["xprofile"])]),g("div",F1t,[g("div",null,[_(a,{show_verified:!1,xprofile:o.getAuthorProfile(n.report)},null,8,["xprofile"]),o.isCommentReport(n.report)?(v(),$("a",{key:0,href:o.getPermalink(n.report)},x(t.$t("commented ")),9,N1t)):(v(),$("a",{key:1,href:o.getPermalink(n.report)},x(t.$t("posted ")),9,B1t)),g("span",null,x(t.$t("in ")),1),o.isCommentReport(n.report)?(v(),$("a",{key:2,href:(m=(p=n.report)==null?void 0:p.post)==null?void 0:m.permalink},x(((w=(b=n.report)==null?void 0:b.post)==null?void 0:w.title)||((A=(C=(k=n.report)==null?void 0:k.post)==null?void 0:C.space)==null?void 0:A.title)),9,z1t)):(v(),$("a",{key:3,href:t.$getRouteLink("s/:slug",{slug:(P=(M=(S=n.report)==null?void 0:S.post)==null?void 0:M.space)==null?void 0:P.slug})},x((L=(I=(T=n.report)==null?void 0:T.post)==null?void 0:I.space)==null?void 0:L.title),9,H1t))]),g("div",U1t,[g("a",{href:o.getPermalink(n.report),title:n.report.created_at},x(t.$t("Reported at ")+t.humanDateDiff(n.report.created_at)),9,j1t)])])])]}),footer:y(()=>[g("div",avt,[n.status!="ignored"?(v(),D(h,{key:0,class:"fcom_secondary_button",onClick:e[3]||(e[3]=p=>o.ignoreReport(n.report))},{default:y(()=>[N(x(o.getIgnoreBtnText(n.report)),1)]),_:1})):O("",!0),n.status!="unpublished"?(v(),D(h,{key:1,class:"fcom_primary_button",onClick:e[4]||(e[4]=p=>o.unpublishReport(n.report))},{default:y(()=>[N(x(o.getUnpublishBtnText(n.report)),1)]),_:1})):O("",!0),["pending","flagged"].includes(n.status)?O("",!0):(v(),D(h,{key:2,class:"el-button el-button--danger",onClick:e[5]||(e[5]=p=>o.deleteReport(n.report))},{default:y(()=>[N(x(t.$t("Delete Report")),1)]),_:1}))])]),default:y(()=>[n.report?(v(),$("div",W1t,[g("div",Y1t,[g("ul",q1t,[g("li",null,[g("a",{onClick:e[0]||(e[0]=Me(p=>o.switchOption("details"),["prevent"])),class:q({"router-link-exact-active":s.currentTab=="details"}),href:"#"},x(t.$t("Details")),3)]),g("li",null,[g("a",{onClick:e[1]||(e[1]=Me(p=>o.switchOption("reports"),["prevent"])),class:q({"router-link-exact-active":s.currentTab=="reports"}),href:"#"},x(t.$t("Reports")+" "+n.report.reports_count),3)])])]),s.currentTab=="details"?(v(),$("div",G1t,[o.isCommentReport(n.report)&&n.report.comment?(v(),D(l,{key:0,comment:n.report.comment,show_header:!1},null,8,["comment"])):n.report.post?(v(),D(c,{key:1,feed:n.report.post,show_header:!1,show_footer:!1},null,8,["feed"])):O("",!0)])):O("",!0),s.currentTab=="reports"?(v(),$("div",X1t,[s.loading?(v(),D(u,{key:1,rows:5,animated:!0})):(v(!0),$(J,{key:0},ye(s.postReports,p=>(v(),$("div",{key:p.id,class:"report_details_item"},[g("div",K1t,[g("div",Z1t,[p.reporter?(v(),D(r,{key:0,with_level:!1,xprofile:p.reporter},null,8,["xprofile"])):O("",!0)]),g("div",J1t,[!p.reporter&&!o.getReason(p.reason)?(v(),$("div",Q1t,x(t.$t("Flagged automatically by the site rule")),1)):(v(),$("div",evt,[p.reporter?(v(),D(a,{key:0,show_verified:!1,xprofile:p.reporter},null,8,["xprofile"])):(v(),$("span",tvt,x(t.$t("By System ")),1)),o.getReason(p.reason)?(v(),$(J,{key:2},[g("span",null,x(t.$t("reported for ")),1),g("span",nvt,x(o.getReason(p.reason)),1)],64)):O("",!0)])),g("div",{title:p.created_at,class:"meta_line"},x(t.humanDateDiff(p.created_at)),9,svt)])]),p.explanation?(v(),$("div",ivt,[g("div",{textContent:x(p.explanation)},null,8,ovt)])):O("",!0)]))),128)),s.pagination.total?(v(),$("div",{key:2,role:"region","aria-label":t.$t("Pagination"),class:"pagination_wrap"},[_(d,{hide_on_single:!0,onFetch:e[2]||(e[2]=p=>o.getPostReports()),pagination:s.pagination},null,8,["pagination"])],8,rvt)):O("",!0)])):O("",!0)])):O("",!0)]),_:1},8,["modelValue","title","width"])}const cvt=ce(D1t,[["render",lvt]]),uvt={name:"ModerationConfig",components:{Drawer:nu},props:{is_open:{type:Boolean,required:!0},moderation_config:{type:Object,required:!0},saving:{type:Boolean,default:!1}},data(){const t=JSON.parse(JSON.stringify(this.moderation_config||{}));return Array.isArray(t.flag_all_new_posts_spaces)||(t.flag_all_new_posts_spaces=[]),{showConfig:this.is_open,config:t,isDirty:!1,dirtyReady:!1}},watch:{is_open(t){this.showConfig=t},showConfig(t){t||(this.isDirty=!1,this.$emit("closeConfig"))},config:{deep:!0,handler(){this.dirtyReady&&(this.isDirty=!0)}}},methods:{saveConfig(){this.$emit("saveConfig",this.config)},handleCancel(){if(!this.isDirty){this.showConfig=!1;return}this.$confirm(this.$t("You have unsaved changes. Are you sure you want to close this?"),this.$t("Confirm"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.showConfig=!1}).catch(()=>{})}},mounted(){this.$nextTick(()=>{this.dirtyReady=!0})}},dvt={class:"fcom_moderation_settings"},hvt={class:"fcom_moderation_section"},fvt={class:"fcom_input_wrap"},pvt={class:"fcom_moderation_section"},mvt={class:"fcom_moderation_section_head"},gvt={class:"help_text"},vvt={class:"fcom_moderation_section"},_vt={class:"fcom_moderation_section_head"},yvt={class:"fcom_inline_field"},bvt={class:"fcom_inline_row"},wvt={class:"fcom_inline_field"},kvt={class:"fcom_inline_row"},Cvt={class:"fcom_inline_field"},xvt={class:"fcom_inline_row"},Svt={class:"fcom_moderation_section"},$vt={class:"fcom_moderation_section_head"},Avt={class:"fcom_input_wrap"},Evt={class:"fcom_input_wrap"},Mvt={class:"fcom_input_wrap"},Tvt={class:"help_text"},Pvt={class:"fcom_moderation_footer"};function Ivt(t,e,n,i,s,o){const r=B("InfoFilled"),a=we,l=Ss,c=qt,u=ht,d=tn,h=l2,f=oa,p=Zt,m=Wt,b=nn,w=ze,k=B("Drawer");return v(),D(k,{modelValue:s.showConfig,"onUpdate:modelValue":e[14]||(e[14]=C=>s.showConfig=C),size:t.dialogWidth,title:t.$t("Moderation Settings"),"append-to-body":!0,"close-on-click-modal":!0,"has-close-confirmation":s.isDirty,"close-confirmation-message":t.$t("You have unsaved changes. Are you sure you want to close this?"),"modal-class":"fcom_common_dialog fcom_moderation_settings",id:"fluent_comminity_body"},{footer:y(()=>[g("div",Pvt,[_(w,{class:"fcom_secondary_button",onClick:o.handleCancel},{default:y(()=>[N(x(t.$t("Cancel")),1)]),_:1},8,["onClick"]),_(w,{class:"fcom_primary_button",loading:n.saving,disabled:n.saving,onClick:o.saveConfig},{default:y(()=>[N(x(t.$t("Update")),1)]),_:1},8,["loading","disabled","onClick"])])]),default:y(()=>[g("div",dvt,[_(b,{onSubmit:e[13]||(e[13]=Me(C=>t.doNothing(),["prevent"])),"label-position":"top"},{default:y(()=>[g("div",hvt,[g("div",fvt,[_(c,{modelValue:s.config.is_enabled,"onUpdate:modelValue":e[1]||(e[1]=C=>s.config.is_enabled=C),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Enable Content Moderation"))+" ",1),_(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("When enabled, reported and pending content will appear here for review.")},{default:y(()=>[_(a,{class:"fcom_label_tooltip",onClick:e[0]||(e[0]=Me(()=>{},["stop"])),role:"button",tabindex:"0","aria-label":t.$t("When enabled, reported and pending content will appear here for review.")},{default:y(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])]),_:1},8,["modelValue"])])]),s.config.is_enabled=="yes"?(v(),$(J,{key:0},[g("div",pvt,[g("div",mvt,[g("h4",null,x(t.$t("Content Filtering")),1),g("p",null,x(t.$t("Add the blocked words that you want to use for content filtering.")),1)]),_(d,{label:t.$t("Profanity Filter")},{default:y(()=>[_(u,{modelValue:s.config.profanity_filter,"onUpdate:modelValue":e[2]||(e[2]=C=>s.config.profanity_filter=C),placeholder:t.$t("bad, words, here")},null,8,["modelValue","placeholder"]),g("span",gvt,x(t.$t("Use comma-separated words. If these words found then the content will go in review state.")),1)]),_:1},8,["label"])]),g("div",vvt,[g("div",_vt,[g("h4",null,x(t.$t("Automatic Moderation")),1),g("p",null,x(t.$t("Automatically act on content and members once a threshold is reached.")),1)]),g("div",yvt,[g("div",bvt,[g("span",null,x(t.$t("1. Flag a post or comment after it's reported")),1),_(h,{modelValue:s.config.flag_after_threshold,"onUpdate:modelValue":e[3]||(e[3]=C=>s.config.flag_after_threshold=C),min:0,max:100,step:1,size:"small","aria-label":t.$t("Flag a post or comment after it's reported X times")},null,8,["modelValue","aria-label"]),g("span",null,x(t.$t("times")),1),_(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("__FLAG_AFTER_THRESHOLD_DESC")},{default:y(()=>[_(a,{class:"fcom_label_tooltip",role:"button",tabindex:"0","aria-label":t.$t("__FLAG_AFTER_THRESHOLD_DESC")},{default:y(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])])]),g("div",wvt,[g("div",kvt,[g("span",null,x(t.$t("2. Moderate a member after")),1),_(h,{modelValue:s.config.auto_flag_user_reject_threshold,"onUpdate:modelValue":e[4]||(e[4]=C=>s.config.auto_flag_user_reject_threshold=C),min:0,max:100,step:1,size:"small","aria-label":t.$t("Moderate a member after X of their posts or comments are rejected")},null,8,["modelValue","aria-label"]),g("span",null,x(t.$t("of their posts or comments are rejected")),1),_(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("__AUTO_FLAG_USER_REJECT_THRESHOLD_DESC")},{default:y(()=>[_(a,{class:"fcom_label_tooltip",role:"button",tabindex:"0","aria-label":t.$t("__AUTO_FLAG_USER_REJECT_THRESHOLD_DESC")},{default:y(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])])]),g("div",Cvt,[g("div",xvt,[g("span",null,x(t.$t("3. Moderate a member after")),1),_(h,{modelValue:s.config.auto_flag_user_report_threshold,"onUpdate:modelValue":e[5]||(e[5]=C=>s.config.auto_flag_user_report_threshold=C),min:0,max:100,step:1,size:"small","aria-label":t.$t("Moderate a member after X of their posts or comments are reported")},null,8,["modelValue","aria-label"]),g("span",null,x(t.$t("of their posts or comments are reported")),1),_(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("__AUTO_FLAG_USER_REPORT_THRESHOLD_DESC")},{default:y(()=>[_(a,{class:"fcom_label_tooltip",role:"button",tabindex:"0","aria-label":t.$t("__AUTO_FLAG_USER_REPORT_THRESHOLD_DESC")},{default:y(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])])]),_(f,{class:"fcom_moderation_note",type:"primary",title:t.$t("Note: Keep 0 to disable a rule."),closable:!1},null,8,["title"])]),g("div",Svt,[g("div",$vt,[g("h4",null,x(t.$t("New Content Approval")),1),g("p",null,x(t.$t("Require approval before new posts or comments become visible.")),1)]),g("div",Avt,[_(c,{modelValue:s.config.flag_all_new_posts,"onUpdate:modelValue":e[7]||(e[7]=C=>s.config.flag_all_new_posts=C),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Mark all new posts as Pending"))+" ",1),_(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("__FLAG_ALL_NEW_POSTS_DESC")},{default:y(()=>[_(a,{class:"fcom_label_tooltip",onClick:e[6]||(e[6]=Me(()=>{},["stop"])),role:"button",tabindex:"0","aria-label":t.$t("__FLAG_ALL_NEW_POSTS_DESC")},{default:y(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])]),_:1},8,["modelValue"])]),g("div",Evt,[_(c,{modelValue:s.config.first_post_approval,"onUpdate:modelValue":e[9]||(e[9]=C=>s.config.first_post_approval=C),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Require approval for first post"))+" ",1),_(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("__FIRST_POST_APPROVAL_DESC")},{default:y(()=>[_(a,{class:"fcom_label_tooltip",onClick:e[8]||(e[8]=Me(()=>{},["stop"])),role:"button",tabindex:"0","aria-label":t.$t("__FIRST_POST_APPROVAL_DESC")},{default:y(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])]),_:1},8,["modelValue"])]),g("div",Mvt,[_(c,{modelValue:s.config.first_comment_approval,"onUpdate:modelValue":e[11]||(e[11]=C=>s.config.first_comment_approval=C),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Require approval for first comment"))+" ",1),_(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("__FIRST_COMMENT_APPROVAL_DESC")},{default:y(()=>[_(a,{class:"fcom_label_tooltip",onClick:e[10]||(e[10]=Me(()=>{},["stop"])),role:"button",tabindex:"0","aria-label":t.$t("__FIRST_COMMENT_APPROVAL_DESC")},{default:y(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])]),_:1},8,["modelValue"])]),_(d,{label:t.$t("Mark all new posts as Pending in the given spaces")},{default:y(()=>[_(m,{modelValue:s.config.flag_all_new_posts_spaces,"onUpdate:modelValue":e[12]||(e[12]=C=>s.config.flag_all_new_posts_spaces=C),placeholder:t.$t("Select Spaces"),filterable:"",clearable:"",multiple:""},{default:y(()=>[(v(!0),$(J,null,ye(t.appVars.auth.spaces,C=>(v(),D(p,{key:C.id,label:C.title,value:C.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),g("span",Tvt,x(t.$t("__FLAG_ALL_NEW_POSTS_SPACES_DESC")),1)]),_:1},8,["label"])])],64)):O("",!0)]),_:1})])]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"])}const Lvt=ce(uvt,[["render",Ivt]]),Ovt={name:"Moderation",components:{Layout:yi,AppLayout:bi,Pagination:du,ReportDetails:cvt,ModerationConfigDrawer:Lvt},data(){return{status:"pending",loading:!1,saving:!1,reports:[],reportDetails:null,showConfig:!1,isOpenReportDetails:!1,moderationConfig:this.appVars.moderationConfig,pagination:{page:1,per_page:10,total:0}}},computed:{getReason(){return t=>this.appVars.report_reasons[t]},getTitle(){return t=>{var e,n;return t.content_type=="post"?(e=t.post)==null?void 0:e.title:(n=t.comment)==null?void 0:n.title}},getAuthorProfile(){return t=>t.content_type=="post"?t.post.xprofile:t.comment.xprofile},getIgnoreBtnText(){return t=>this.isContentLive(t)?this.$t("Dismiss Reports"):this.$t("Approve")+" "+this.$t(this.ucFirst(t.content_type))},getUnpublishBtnText(){return t=>this.isContentLive(t)?this.$t("Unpublish")+" "+this.$t(this.ucFirst(t.content_type)):this.$t("Publish")+" "+this.$t(this.ucFirst(t.content_type))}},methods:{getReports(){this.loading=!0,this.$get("moderation/reports",{status:this.status,page:this.pagination.page,per_page:this.pagination.per_page}).then(t=>{this.reports=t.reports.data,this.pagination.total=t.reports.total}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveConfig(t){this.saving=!0,this.$post("moderation/config",{config:t}).then(e=>{this.$notify.success(e.message),this.appVars.moderationConfig=e.config,this.moderationConfig=e.config,this.showConfig=!1}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},isContentLive(t){const e=t.content_type=="comment"?t.comment:t.post;return(e==null?void 0:e.status)=="published"},confirmAndIgnoreReport(t){const e=this.isContentLive(t),n=e?this.$t("Dismiss Reports"):this.$t("Approve Content"),i=e?this.$t("This will dismiss all reports and keep the content published. Continue?"):this.$t("This will approve the content and make it visible to the community. Continue?"),s=e?this.$t("Yes, Dismiss"):this.$t("Yes, Approve");this.$confirm(i,n,{confirmButtonText:s,cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.ignoreReport(t)})},confirmAndUnpublishReport(t){const e=this.isContentLive(t),n=e?this.$t("Unpublish Content"):this.$t("Publish Content"),i=e?this.$t("This will unpublish the content from public view. Continue?"):this.$t("This will publish the content and make it visible to the community. Continue?"),s=e?this.$t("Yes, Unpublish"):this.$t("Yes, Publish");this.$confirm(i,n,{confirmButtonText:s,cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.unpublishReport(t)})},ignoreReport(t){this.$put("moderation/reports/"+t.id,{status:"ignored"}).then(e=>{this.$notify.success(e.message),this.getReports()}).catch(e=>{this.$handleError(e)})},unpublishReport(t){this.$put("moderation/reports/"+t.id,{status:"unpublished"}).then(e=>{this.$notify.success(e.message),this.getReports()}).catch(e=>{this.$handleError(e)})},openReportDetails(t){this.reportDetails=t,this.isOpenReportDetails=!0},closeReportDetails(){this.isOpenReportDetails=!1,this.reportDetails=null},deleteReport(t){this.$confirm(this.$t("Are you sure you want to delete this report?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button"}).then(()=>{this.$del("moderation/reports/"+t.id).then(e=>{this.$notify.success(e.message),this.getReports()}).catch(e=>{this.$handleError(e)})})}},mounted(){this.has_pro&&this.moderationConfig.is_enabled=="yes"&&this.getReports(),this.changeTitle(this.$t("Moderation"))}},Dvt=["href"],Rvt={style:{padding:"20px"},class:"fhr_content_layout_body moderation_layout"},Vvt={key:0,class:"card_header"},Fvt=["aria-label"],Nvt={key:1,class:q("fcom_dir_layout fcom_dir_layout_classic")},Bvt={key:0,class:"loading"},zvt={key:1,class:"fcom_moderation_table"},Hvt={class:"moderation_table"},Uvt={class:"moderation_table_header"},jvt={style:{"min-width":"100px"}},Wvt={class:"moderation_table_body"},Yvt=["onClick"],qvt={key:0,class:"user_avatar moderation_avatar"},Gvt={class:"feed_user_name"},Xvt={key:1},Kvt={key:2,class:"no_reports"},Zvt=["aria-label"],Jvt={key:2,style:{"max-width":"800px",margin:"0 auto"},class:"setting_body white_loaded"},Qvt={style:{"text-align":"center"}},e_t={style:{"font-size":"18px","margin-bottom":"10px"}},t_t={class:"promo_description"},n_t={key:1,class:"setting_body",style:{"text-align":"center"}},s_t={class:"promo_description"},i_t=["href"];function o_t(t,e,n,i,s,o){const r=B("Operation"),a=we,l=ze,c=Qc,u=ws,d=Vt,h=B("UserAvatar"),f=B("UserRouteLink"),p=B("MoreFilled"),m=Ar,b=Er,w=$r,k=B("Pagination"),C=B("layout"),A=B("app-layout"),S=B("report-details"),M=B("moderation-config-drawer");return v(),$(J,null,[_(A,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_full_layout"},{default:y(()=>[_(C,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Moderation")},{actions:y(()=>[t.has_pro?(v(),D(l,{key:0,onClick:e[0]||(e[0]=P=>s.showConfig=!0),class:"fcom_secondary_button"},{default:y(()=>[_(a,null,{default:y(()=>[_(r)]),_:1}),g("span",null,x(t.$t("Settings")),1)]),_:1})):(v(),$("a",{key:1,target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_moderation"),class:"el-button el-button--danger"},x(t.$t("Upgrade to Pro")),9,Dvt))]),default:y(()=>[g("div",Rvt,[t.has_pro?(v(),$(J,{key:0},[s.moderationConfig.is_enabled=="yes"?(v(),$("div",Vvt,[g("div",{role:"region","aria-label":t.$t("Member Navigation"),class:"member_status"},[_(u,{onChange:e[1]||(e[1]=P=>o.getReports()),modelValue:s.status,"onUpdate:modelValue":e[2]||(e[2]=P=>s.status=P),class:"status_group"},{default:y(()=>[_(c,{value:"pending"},{default:y(()=>[N(x(t.$t("Pending")),1)]),_:1}),_(c,{value:"flagged"},{default:y(()=>[N(x(t.$t("Flagged")),1)]),_:1}),_(c,{value:"ignored"},{default:y(()=>[N(x(t.$t("Dismissed")),1)]),_:1}),_(c,{value:"unpublished"},{default:y(()=>[N(x(t.$t("Unpublished")),1)]),_:1})]),_:1},8,["modelValue"])],8,Fvt)])):O("",!0),s.moderationConfig.is_enabled=="yes"?(v(),$("div",Nvt,[s.loading?(v(),$("div",Bvt,[_(d,{class:"white_loaded",rows:3,animated:!0})])):s.reports.length?(v(),$("div",zvt,[g("table",Hvt,[g("thead",Uvt,[g("tr",null,[g("th",null,x(t.$t("Title")),1),g("th",null,x(t.$t("Type")),1),g("th",null,x(t.$t("Reporter")),1),g("th",jvt,x(t.$t("Date")),1),g("th",null,x(t.$t("Reports")),1)])]),g("tbody",Wvt,[(v(!0),$(J,null,ye(s.reports,P=>{var T,I;return v(),$("tr",{key:P.id},[g("td",{onClick:L=>o.openReportDetails(P),class:"report_reason"},x(o.getTitle(P)),9,Yvt),g("td",null,x(P.content_type),1),g("td",null,[P.reporter?(v(),$("div",qvt,[_(h,{xprofile:P.reporter},null,8,["xprofile"]),g("div",Gvt,[_(f,{xprofile:P.reporter},null,8,["xprofile"])])])):(T=P.meta)!=null&&T.flagged_by?(v(),$("div",Xvt,x((I=P.meta)==null?void 0:I.flagged_by),1)):O("",!0)]),g("td",null,x(t.humanDateDiff(P.created_at)),1),g("td",null,x(P.reports_count),1),g("td",null,[_(w,{trigger:"click"},{dropdown:y(()=>[_(b,null,{default:y(()=>[_(m,null,{default:y(()=>[_(l,{"aria-label":t.$t("Review report"),class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:L=>o.openReportDetails(P)},{default:y(()=>[N(x(t.$t("Review Report")),1)]),_:1},8,["aria-label","onClick"])]),_:2},1024),P.status!="ignored"?(v(),D(m,{key:0},{default:y(()=>[_(l,{class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:L=>o.confirmAndIgnoreReport(P)},{default:y(()=>[N(x(o.getIgnoreBtnText(P)),1)]),_:2},1032,["onClick"])]),_:2},1024)):O("",!0),P.status!="unpublished"?(v(),D(m,{key:1},{default:y(()=>[_(l,{class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:L=>o.confirmAndUnpublishReport(P)},{default:y(()=>[N(x(o.getUnpublishBtnText(P)),1)]),_:2},1032,["onClick"])]),_:2},1024)):O("",!0),P.status!="pending"?(v(),D(m,{key:2},{default:y(()=>[_(l,{class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:L=>o.deleteReport(P)},{default:y(()=>[N(x(t.$t("Delete Report")),1)]),_:1},8,["onClick"])]),_:2},1024)):O("",!0)]),_:2},1024)]),default:y(()=>[_(l,{class:"fcom_dot_menu edit_action",size:"small",text:""},{default:y(()=>[_(a,null,{default:y(()=>[_(p)]),_:1})]),_:1})]),_:2},1024)])])}),128))])])])):(v(),$("div",Kvt,x(t.$t("No reports to review")),1)),s.pagination.total?(v(),$("div",{key:3,role:"region","aria-label":t.$t("Pagination"),class:"pagination_wrap"},[_(k,{hide_on_single:!0,onFetch:e[3]||(e[3]=P=>o.getReports()),pagination:s.pagination},null,8,["pagination"])],8,Zvt)):O("",!0)])):(v(),$("div",Jvt,[g("div",Qvt,[g("h3",e_t,x(t.$t("Content Moderation is disabled")),1),g("p",t_t,x(t.$t("__MODERATION_DISABLED_DESC")),1),_(l,{loading:s.saving,class:"el-button fcom_primary_button",onClick:e[4]||(e[4]=P=>o.saveConfig({is_enabled:"yes"}))},{default:y(()=>[N(x(t.$t("Enable Content Moderation")),1)]),_:1},8,["loading"])])]))],64)):(v(),$("div",n_t,[g("p",s_t,x(t.$t("__REPORT_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_moderation"),class:"el-button el-button--danger"},x(t.$t("Upgrade to Pro")),9,i_t)]))])]),_:1},8,["title"])]),_:1}),s.reportDetails?(v(),D(S,{key:0,report:s.reportDetails,is_open:s.isOpenReportDetails,status:s.status,onIgnore:o.ignoreReport,onUnpublish:o.unpublishReport,onDelete:o.deleteReport,onClose:e[5]||(e[5]=P=>o.closeReportDetails())},null,8,["report","is_open","status","onIgnore","onUnpublish","onDelete"])):O("",!0),s.showConfig?(v(),D(M,{key:1,is_open:s.showConfig,moderation_config:s.moderationConfig,saving:s.saving,onCloseConfig:e[6]||(e[6]=P=>s.showConfig=!1),onSaveConfig:o.saveConfig},null,8,["is_open","moderation_config","saving","onSaveConfig"])):O("",!0)],64)}const r_t=ce(Ovt,[["render",o_t]]),a_t={name:"Tools",components:{Layout:yi,AppLayout:bi},computed:{sitemapUrl(){return this.appVars.urls.portal_base+"site-maps/index.xml"},isPublicPortal(){return this.appVars.access_level==="public"}}},l_t=["href"],c_t={class:"settings_router"},u_t={class:"fhr_content_layout_body"},d_t={class:"setting_header"},h_t={key:0,class:"setting_body tools_body"},f_t={key:0,class:"sitemap_configured"},p_t={class:"sitemap_header"},m_t={class:"sitemap_body"},g_t=["href"],v_t={key:1,class:"setting_body",style:{"text-align":"center"}},__t={class:"promo_description"},y_t=["href"];function b_t(t,e,n,i,s,o){const r=we,a=oa,l=B("layout"),c=B("app-layout");return v(),D(c,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:y(()=>[_(l,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Tools")},{actions:y(()=>[t.has_pro?O("",!0):(v(),$("a",{key:0,target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_tools"),class:"el-button el-button--danger"},x(t.$t("Upgrade to Pro")),9,l_t))]),default:y(()=>[g("div",c_t,[g("div",u_t,[g("div",d_t,[g("h2",null,x(t.$t("Sitemap Configuration")),1)]),t.has_pro?(v(),$("div",h_t,[o.isPublicPortal?(v(),$("div",f_t,[g("div",p_t,[_(r,null,{default:y(()=>[...e[0]||(e[0]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"}),g("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"})],-1)])]),_:1}),g("h4",null,x(t.$t("Sitemap is configured and will be generated automatically.")),1)]),g("div",m_t,[_(a,{type:"warning",closable:!1,style:{"margin-top":"15px"},title:t.$t("The sitemap includes only public content. If you are using the default WordPress sitemap, it will be automatically included. For other sitemap plugins, please add this URL in the plugin settings.")},null,8,["title"]),g("p",null,[g("strong",null,x(t.$t("Sitemap URL : ")),1),g("a",{href:o.sitemapUrl,target:"_blank",rel:"noopener"},x(o.sitemapUrl),9,g_t)])])])):(v(),D(a,{key:1,type:"warning",closable:!1,title:t.$t("Your portal feeds are not public so no sitemap entry will be generated.")},null,8,["title"]))])):(v(),$("div",v_t,[g("p",__t,x(t.$t("__SITEMAP_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_tools"),class:"el-button el-button--danger"},x(t.$t("Upgrade to Pro")),9,y_t)]))])])]),_:1},8,["title"])]),_:1})}const w_t=ce(a_t,[["render",b_t]]),k_t={name:"PrivacySettings",components:{Layout:yi,AppLayout:bi},data(){return{loading:!1,saving:!1,settings:null}},methods:{getSettings(){this.loading=!0,this.$get("settings/privacy-settings").then(t=>{this.settings=t.settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},save(){this.saving=!0,this.$post("settings/privacy-settings",{settings:this.settings}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings(),this.changeTitle(this.$t("Privacy Settings"))}},C_t={class:"settings_router"},x_t={key:0,class:"white_loaded"},S_t={key:1,class:"fhr_content_layout_body"},$_t={class:"setting_body"},A_t={class:"fcom_help_text fcom_mt_10"},E_t={class:"fcom_help_text fcom_mt_10"},M_t={class:"fcom_help_text fcom_mt_10"},T_t={class:"fcom_help_text fcom_mt_10"},P_t={class:"fcom_input_wrap"},I_t={key:0},L_t={class:"fcom_input_wrap"},O_t={key:0},D_t={class:"fcom_input_wrap"},R_t={class:"fcom_input_wrap"},V_t={key:0},F_t={class:"fcom_input_wrap"},N_t={class:"fcom_input_wrap"},B_t={key:0,class:"fcom_input_wrap"},z_t={class:"fcom_input_wrap"},H_t={class:"fcom_input_wrap"},U_t={style:{"margin-top":"50px"},class:"fcom_input_wrap"},j_t={key:2};function W_t(t,e,n,i,s,o){const r=ze,a=Vt,l=$8,c=Li,u=ws,d=tn,h=qt,f=nn,p=B("layout"),m=B("app-layout"),b=xt("loading");return v(),D(m,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:y(()=>[_(p,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Privacy Settings")},{actions:y(()=>[Re((v(),D(r,{class:"fcom_primary_button",onClick:o.save},{default:y(()=>[g("span",null,x(t.$t("Save Settings")),1)]),_:1},8,["onClick"])),[[b,s.saving]])]),default:y(()=>[g("div",C_t,[s.loading?(v(),$("div",x_t,[_(a,{rows:5,animated:!0})])):s.settings?(v(),$("div",S_t,[g("div",$_t,[g("p",null,x(t.$t("Customize the privacy and compliance settings as per your needs.")),1),_(l),_(f,{onSubmit:e[13]||(e[13]=Me(w=>t.doNothing(),["prevent"])),modelValue:s.settings,"onUpdate:modelValue":e[14]||(e[14]=w=>s.settings=w),"label-position":"top"},{default:y(()=>[_(d,{label:t.$t("Who can view all members page?")},{default:y(()=>[_(u,{modelValue:s.settings.members_page_status,"onUpdate:modelValue":e[0]||(e[0]=w=>s.settings.members_page_status=w),class:"fcom_radio_group"},{default:y(()=>[_(c,{border:"",value:"everybody"},{default:y(()=>[N(x(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:y(()=>[N(x(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:y(()=>[N(x(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",A_t,[g("p",null,x(t.$t("Choose whether the all-members page should be public, private, or admin/moderator only.")),1)])]),_:1},8,["label"]),_(d,{label:t.$t("Who can view user profile page?")},{default:y(()=>[_(u,{modelValue:s.settings.profile_page_visibility,"onUpdate:modelValue":e[1]||(e[1]=w=>s.settings.profile_page_visibility=w),class:"fcom_radio_group"},{default:y(()=>[_(c,{border:"",value:"everybody"},{default:y(()=>[N(x(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:y(()=>[N(x(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:y(()=>[N(x(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",E_t,[g("p",null,x(t.$t("Choose whether individual user profile page should be public, private, or admin/moderator only. Users can always view their own profile.")),1)])]),_:1},8,["label"]),_(d,{label:t.$t("Who can view leaderboard top members?")},{default:y(()=>[_(u,{modelValue:s.settings.leaderboard_members_visibility,"onUpdate:modelValue":e[2]||(e[2]=w=>s.settings.leaderboard_members_visibility=w),class:"fcom_radio_group"},{default:y(()=>[_(c,{border:"",value:"everybody"},{default:y(()=>[N(x(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:y(()=>[N(x(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:y(()=>[N(x(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",M_t,[g("p",null,x(t.$t("Choose whether the leaderboard top members should be public, private, or admin/moderator only.")),1)])]),_:1},8,["label"]),_(d,{label:t.$t("Who can view spaces and courses on the user profile page.")},{default:y(()=>[_(u,{modelValue:s.settings.user_space_visibility,"onUpdate:modelValue":e[3]||(e[3]=w=>s.settings.user_space_visibility=w),class:"fcom_radio_group"},{default:y(()=>[_(c,{border:"",value:"everybody"},{default:y(()=>[N(x(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:y(()=>[N(x(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:y(()=>[N(x(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",T_t,[g("p",null,x(t.$t("Choose the privacy settings for the Spaces and Courses tabs of a member profile.")),1)])]),_:1},8,["label"]),g("div",P_t,[_(h,{modelValue:s.settings.can_customize_username,"onUpdate:modelValue":e[4]||(e[4]=w=>s.settings.can_customize_username=w),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Allow users to change their community username"))+" ",1),t.has_pro?O("",!0):(v(),$("span",I_t,"("+x(t.$t("This feature is available on the pro version of FluentCommunity"))+")",1))]),_:1},8,["modelValue","disabled"]),g("p",null,x(t.$t("When enabled, members can change their username on their own. Otherwise, an admin or moderator can change the username.")),1)]),g("div",L_t,[_(h,{modelValue:s.settings.can_change_email,"onUpdate:modelValue":e[5]||(e[5]=w=>s.settings.can_change_email=w),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Allow users to change their account email address"))+" ",1),t.has_pro?O("",!0):(v(),$("span",O_t,"("+x(t.$t("This feature is available on the pro version of FluentCommunity"))+")",1))]),_:1},8,["modelValue","disabled"]),g("p",null,x(t.$t("When enabled, members can change their email address of the account (WordPress User account).")),1)]),g("div",D_t,[_(h,{modelValue:s.settings.can_change_password,"onUpdate:modelValue":e[6]||(e[6]=w=>s.settings.can_change_password=w),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Allow users to change their password from profile")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("When enabled, members can change their password from their profile settings. Disable this if you enforce a strong password policy elsewhere.")),1)]),g("div",R_t,[_(h,{modelValue:s.settings.email_auto_login,"onUpdate:modelValue":e[7]||(e[7]=w=>s.settings.email_auto_login=w),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Automatically login the user to the portal (secure with signed URL) from email notification links"))+" ",1),t.has_pro?O("",!0):(v(),$("span",V_t,"("+x(t.$t("This feature is available on the pro version of FluentCommunity"))+")",1))]),_:1},8,["modelValue","disabled"]),g("p",null,x(t.$t("When enabled, users will be automatically logged in to the portal when they click on the email notification links. This feature is secure and uses signed URLs. User with post edit access will not be logged in automatically.")),1)]),g("div",F_t,[_(h,{modelValue:s.settings.enable_gravatar,"onUpdate:modelValue":e[8]||(e[8]=w=>s.settings.enable_gravatar=w),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Use Gravatar Photo Service for default user photo")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("When enabled, the Gravatar Photo Service automatically fetches user avatars based on their email address. Gravatar is a built-in feature of WP and powered by WordPress.com")),1)]),g("div",N_t,[_(h,{modelValue:s.settings.enable_user_sync,"onUpdate:modelValue":e[9]||(e[9]=w=>s.settings.enable_user_sync=w),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Sync Community Profile with WordPress User Data")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("When enabled, updates to a community user's profile will automatically sync with their WordPress user data. Disable this to prevent automatic syncing. Enabling this is recommended.")),1)]),t.appVars.has_fluentcrm?(v(),$("div",B_t,[_(h,{modelValue:s.settings.skip_crm_undeliverable_emails,"onUpdate:modelValue":e[10]||(e[10]=w=>s.settings.skip_crm_undeliverable_emails=w),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Do not send emails to contacts marked as Bounced, Complained, or Spammed in FluentCRM")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("When enabled, FluentCommunity will skip email notifications for members whose FluentCRM contact status is bounced, complained, or spammed.")),1)])):O("",!0),g("div",z_t,[_(h,{"true-value":"yes","false-value":"no",modelValue:s.settings.show_last_activity,"onUpdate:modelValue":e[11]||(e[11]=w=>s.settings.show_last_activity=w),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Show last activity of a user on the profile card")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("If unchecked, then the last activity will be shown to only admins/moderators")),1)]),g("div",H_t,[_(h,{"true-value":"yes","false-value":"no",modelValue:s.settings.can_deactive_account,"onUpdate:modelValue":e[12]||(e[12]=w=>s.settings.can_deactive_account=w),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Allow users to deactivate their account directly from their profile settings")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("When enabled, this option allows users to deactivate their account directly from their profile settings.")),1)]),g("div",U_t,[Re((v(),D(r,{onClick:o.save,disabled:s.saving,class:"fcom_primary_button"},{default:y(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[b,s.saving]])])]),_:1},8,["modelValue"])])])):(v(),$("div",j_t,[g("p",null,x(t.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const Y_t=ce(k_t,[["render",W_t]]),q_t={name:"SettingsRoute",components:{},data(){return{loading:!1}}};function G_t(t,e,n,i,s,o){const r=B("router-view");return v(),D(r)}const X_t=ce(q_t,[["render",G_t]]),K_t={name:"CreateGroupForm",emits:["completed","dirty"],components:{ImageUploader:Ll,SlugInput:Yd,ErrorAlerts:iv},props:{group:{required:!1,default:{title:"",slug:"",description:"",settings:{always_show_spaces:"yes"}}}},data(){return{saving:!1,form:{},initialized:!1,errors:[]}},watch:{form:{deep:!0,handler(){this.initialized&&this.$emit("dirty")}}},methods:{validate(){return this.errors=[],(!this.form.title||!this.form.title.trim())&&this.errors.push(this.$t("Group title cannot be empty.")),this.form.id||(!this.form.slug||!this.form.slug.trim())&&this.errors.push(this.$t("Slug cannot be empty.")),this.errors.length===0},submit(){if(!this.validate())return;this.saving=!0;let t="spaces/space_groups",e={title:this.form.title,description:this.form.description,settings:this.form.settings,slug:this.form.slug},n=this.$post;this.form.id&&(t+="/"+this.form.id,n=this.$put),n(t,e).then(i=>{this.$eventBus.emit("reloadMenu"),this.form={},this.$notify.success(i.message),this.$emit("completed",i.group)}).catch(i=>{this.$handleError(i)}).finally(()=>{this.saving=!1})}},mounted(){this.group&&this.group.id?this.form=this.group:this.form={title:"",slug:"",description:"",settings:{always_show_spaces:"yes"}},this.$nextTick(()=>{this.initialized=!0})}},Z_t={key:0},J_t={key:1};function Q_t(t,e,n,i,s,o){const r=ht,a=tn,l=B("slug-input"),c=qt,u=B("error-alerts"),d=ze,h=nn;return v(),D(h,{onSubmit:e[5]||(e[5]=Me(f=>t.doNothing(),["prevent"])),modelValue:s.form,"onUpdate:modelValue":e[6]||(e[6]=f=>s.form=f),"label-position":"top"},{default:y(()=>[_(a,{label:t.$t("Group Title")},{default:y(()=>[_(r,{type:"text",placeholder:t.$t("Your Group Title"),modelValue:s.form.title,"onUpdate:modelValue":e[0]||(e[0]=f=>s.form.title=f)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),_(a,{label:t.$t("Slug")},{default:y(()=>[_(l,{modelValue:s.form.slug,"onUpdate:modelValue":e[1]||(e[1]=f=>s.form.slug=f),disabled:!!s.form.id,placeholder:t.$t("Group Slug (no spaces or special characters)"),is_inital_inactive:!!s.form.id,prefix:"#"},null,8,["modelValue","disabled","placeholder","is_inital_inactive"])]),_:1},8,["label"]),_(a,{label:t.$t("Description")},{default:y(()=>[_(r,{type:"textarea",rows:3,placeholder:t.$t("Group Description"),modelValue:s.form.description,"onUpdate:modelValue":e[2]||(e[2]=f=>s.form.description=f)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),s.form.settings?(v(),D(a,{key:0,label:t.$t("Appearance")},{default:y(()=>[_(c,{"true-value":"yes","false-value":"no",modelValue:s.form.settings.always_show_spaces,"onUpdate:modelValue":e[3]||(e[3]=f=>s.form.settings.always_show_spaces=f),class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Show Spaces even if the user is not a member of any space")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),_(u,{errors:s.errors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),_(a,null,{default:y(()=>[_(d,{class:"fcom_primary_button",disabled:s.saving,onClick:e[4]||(e[4]=f=>o.submit()),loading:s.saving},{default:y(()=>[s.form.id?(v(),$("span",Z_t,x(t.$t("Update Info")),1)):(v(),$("span",J_t,x(t.$t("Create")),1))]),_:1},8,["disabled","loading"])]),_:1})]),_:1},8,["modelValue"])}const eyt=ce(K_t,[["render",Q_t]]),tyt={name:"MoveGroupPopup",components:{ActionPopover:aa},props:{groups:{type:Array,default:()=>[]},currentSpace:{type:[Array,Object],default:null}},emits:["moved"],data(){return{selectedGroupId:null,working:!1}},computed:{filteredGroups(){return this.groups.filter(t=>{var e;return t.id!=((e=this.currentSpace)==null?void 0:e.parent_id)})}},methods:{moveSpace(t){this.working=!0,this.$patch("spaces/space_groups/move-space",{space_id:this.currentSpace.id,group_id:this.selectedGroupId}).then(e=>{this.$notify.success(e.message),this.$emit("moved"),t()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})}}},nyt={style:{display:"inline-block",cursor:"pointer",width:"100%","text-align":"left"}};function syt(t,e,n,i,s,o){const r=Zt,a=Wt,l=tn,c=ze,u=nn,d=B("action-popover"),h=xt("loading");return v(),D(d,{placement:"bottom",width:350},{trigger:y(()=>[g("span",nyt,x(t.$t("Move")),1)]),default:y(({hide:f})=>[_(u,{onSubmit:e[1]||(e[1]=Me(p=>t.doNothing(),["prevent"])),"label-position":"top"},{default:y(()=>[_(l,{label:t.$t("Move to a different Group")},{default:y(()=>[_(a,{placeholder:t.$t("Select Group"),modelValue:s.selectedGroupId,"onUpdate:modelValue":e[0]||(e[0]=p=>s.selectedGroupId=p)},{default:y(()=>[(v(!0),$(J,null,ye(o.filteredGroups,p=>(v(),D(r,{key:p.id,label:p.title,value:p.id},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),Re((v(),D(c,{disabled:!s.selectedGroupId||s.working,onClick:p=>o.moveSpace(f),class:"fcom_primary_button"},{default:y(()=>[N(x(t.$t("Move Space")),1)]),_:1},8,["disabled","onClick"])),[[h,s.working]])]),_:2},1024)]),_:1})}const iyt=ce(tyt,[["render",syt]]),oyt={name:"SpaceLinkEditModal",components:{SidebarLinkForm:tU},emits:["completed"],props:["link"],data(){return{showModal:!0}}};function ryt(t,e,n,i,s,o){const r=B("SidebarLinkForm"),a=$s;return v(),D(a,{"modal-class":"fcom_common_dialog","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:s.showModal,"onUpdate:modelValue":e[1]||(e[1]=l=>s.showModal=l),direction:"rtl",onClose:e[2]||(e[2]=l=>t.$emit("completed")),title:t.$t("Edit Link")},{default:y(()=>[_(r,{onCompleted:e[0]||(e[0]=l=>t.$emit("completed")),link:n.link},null,8,["link"])]),_:1},8,["width","modelValue","title"])}const ayt=ce(oyt,[["render",ryt]]),lyt={name:"SpaceGroups",components:{FluentDnD:Tr,ActionPopover:aa,ArrowDownBold:aae,Drawer:nu,CreateSpaceForm:W8,CreateGroupForm:eyt,Layout:yi,AppLayout:bi,MoveGroupPopup:iyt,SpaceLinkEditModal:ayt},data(){return{groups:[],loading:!0,joining:!1,editSpace:null,showGroupDrawer:!1,isGroupFormDirty:!1,editingGroup:null,draggingIndexGroup:null,draggingIndexSpace:null,collapsedGroups:[],orphanedSpaces:[]}},watch:{showGroupDrawer(t){t||(this.isGroupFormDirty=!1)}},computed:{communityCounts(){let t=this.groups.reduce((e,n)=>{var i;return e+(((i=n.spaces)==null?void 0:i.length)||0)},0);return this.orphanedSpaces&&this.orphanedSpaces.length&&(t+=this.orphanedSpaces.length),t}},methods:{toggleGroup(t){this.collapsedGroups.includes(t.id)?this.collapsedGroups=this.collapsedGroups.filter(e=>e!==t.id):this.collapsedGroups.push(t.id)},openEditSpace(t){if(t.type==="course"){this.$router.push({name:"course_settings_general",params:{course_id:t.id}});return}if(t.type==="community"){this.$router.push({name:"space_settings_general",params:{space:t.slug}});return}this.editSpace=t},initDeleteSpace(t){let e=this.$t("space");t.type=="course"?e=this.$t("course"):t.type=="sidebar_link"&&(e=this.$t("link")),this.$confirm(this.$t("Are you sure you want to delete this %s?",e),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete the %s",e),cancelButtonText:this.$t("No"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{if(t.type=="sidebar_link"){this.deleteSpace(t);return}let n=this.$t("Please Type %s to confirm. Please note, all the posts, comments, activities of this Space will be delete.",'"DELETE"');t.type=="course"&&(n=this.$t("Please Type %s to confirm. Please note, all the lessons, topics, students progress will be deleted.",'"DELETE"')),this.$promt(this.$t(n),this.$t("Delete %s",e),{confirmButtonText:this.$t("Confirm Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button"}).then(i=>{i.value==="DELETE"?this.deleteSpace(t):this.$notify.error(this.$t("The verification string does not match"))})})},deleteSpace(t){let e="spaces/"+t.id+"/by-id";t.type=="course"?e="admin/courses/"+t.id:t.type=="sidebar_link"&&(e="admin/links/"+t.id),this.$del(e).then(n=>{this.$notify.success(n.message),this.getGroups()}).catch(n=>{this.$handleError(n)})},getGroups(){this.loading=!0,this.editingGroup=null,this.$get("spaces/space_groups").then(t=>{this.groups=t.groups,this.orphanedSpaces=t.orphaned_spaces;const e=[];this.groups.forEach(n=>{e.push({id:n.id,title:n.title})}),this.appVars.space_groups=e}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},initEditGroup(t){this.editingGroup=t,this.showGroupDrawer=!0},initCreateGroup(){this.editingGroup=null,this.showGroupDrawer=!0},resetGroupsIndexes(t){const e={};Mc(this.groups,(n,i)=>{e[n.id]=i+1}),this.$patch("spaces/space_groups/re-index",{indexes:e}).then(n=>{this.$notify.success(n.message)}).catch(n=>{this.$handleError(n),this.groups=t}).finally(()=>{this.$eventBus.emit("reloadMenu")})},resetSpaceIndexes(t,e,n){this.$patch("spaces/space_groups/re-index-spaces",{indexes:t}).then(i=>{this.$notify.success(i.message)}).catch(i=>{this.$handleError(i);const s=this.groups.find(o=>Number(o.id)===Number(n));s&&(s.spaces=e)}).finally(()=>{this.$eventBus.emit("reloadMenu")})},removeGroup(t){if(t&&t.spaces.length){this.$messageBox({title:this.$t("Cannot be deleted"),message:this.$t("You cannot delete a group with spaces. Please move the spaces to a different group first."),type:"warning",confirmButtonText:this.$t("Got it!")});return}this.$confirm(this.$t("Are you sure you want to remove this group?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete this group"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.$del("spaces/space_groups/"+t.id).then(()=>{this.getGroups(),this.$eventBus.emit("reloadMenu")}).catch(e=>{this.$handleError(e)})})},getTypeTitle(t){return t=="community"?this.$labelize("space").toLowerCase():this.$labelize(t).toLowerCase()},dropGroup({index:t}){const e=[...this.groups],n=this.groups.splice(t,1)[0];this.groups.splice(t,0,n),this.resetGroupsIndexes(e),this.draggingIndexGroup=null},dropSpace({newItems:t,index:e}){const n=t[0].parent_id;let i=this.groups.find(a=>Number(a.id)===Number(n)).spaces||[];const s=[...i],o=i.splice(e,1)[0];i.splice(e,0,o);let r=[];Mc(i,(a,l)=>{r.push(a.id)}),this.resetSpaceIndexes(r,s,n),this.draggingIndexSpace=null},openCreateSpaceModal(t){window.fluentFrameworkApp.$eventBus.emit("createSpaceModal",{parent_id:t.id.toString(),disable_redirect:!0})}},mounted(){this.getGroups(),this.$eventBus.on("spaceCreated",this.getGroups)},beforeDestroy(){this.$eventBus.off("spaceCreated",this.getGroups)}},cyt={class:"settings_router"},uyt={class:"fcom_communities"},dyt={class:"fcom_card_sections",style:{"margin-bottom":"16px"}},hyt={class:"fcom_card_section_heading"},fyt={key:1},pyt={class:"fcom_card_sections",style:{"margin-bottom":"0"}},myt={class:"fcom_section_primary_item_title"},gyt={class:"fcom_heading_item"},vyt={class:"fcom_space_counts"},_yt={class:"fcom_section_item_actions"},yyt={key:0,class:"fcom_section_items"},byt={class:"fcom_section_item_title"},wyt={class:"fcom_heading_item"},kyt={class:"fcom_section_item_actions"},Cyt=["href"],xyt={class:"actions_items"},Syt=["onClick"],$yt=["onClick"],Ayt={key:0,class:"fcom_card_sections",style:{"margin-top":"16px"}},Eyt={class:"fcom_section_primary_item fcom_no_top_border"},Myt={class:"fcom_heading_item"},Tyt={class:"fcom_section_items"},Pyt={class:"fcom_section_item"},Iyt={class:"fcom_section_item_title"},Lyt={class:"fcom_heading_item"},Oyt={class:"fcom_section_item_actions"},Dyt=["href"],Ryt={class:"actions_items"},Vyt=["onClick"],Fyt=["onClick"],Nyt={key:0};function Byt(t,e,n,i,s,o){const r=ze,a=Vt,l=B("ArrowDownBold"),c=we,u=B("Plus"),d=B("action-popover"),h=qs,f=B("MoveGroupPopup"),p=B("FluentDnD"),m=B("layout"),b=B("app-layout"),w=B("create-group-form"),k=B("drawer"),C=B("SpaceLinkEditModal"),A=xt("loading");return v(),$(J,null,[_(b,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:y(()=>[_(m,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("All Space Groups")},{actions:y(()=>[_(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=S=>o.initCreateGroup())},{default:y(()=>[N(x(t.$t("Create New Group")),1)]),_:1})]),default:y(()=>[g("div",cyt,[Re((v(),$("div",uyt,[g("div",dyt,[g("div",hyt,[g("h3",null,x(t.$_n("%d Group","%d Groups",s.groups.length))+" • "+x(t.$_n("%d Space","%d Spaces",o.communityCounts)),1)])]),s.loading?(v(),D(a,{key:0,class:"white_loaded",animated:!0,rows:5})):(v(),$("div",fyt,[_(p,{items:s.groups,onDrop:o.dropGroup,"item-class":"fcom_cursor_move",gap:"16px"},{item:y(({data:S})=>[g("div",pyt,[g("div",{class:q([{fcom_collapsed_group:s.collapsedGroups.indexOf(S.id)!==-1},"fcom_section_primary_item fcom_no_top_border"])},[g("div",myt,[e[6]||(e[6]=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)),g("div",gyt,[g("h4",null,x(t.$t("Group:"))+" "+x(S.title),1),g("div",null,[S.spaces&&S.spaces.length?(v(),D(r,{key:0,style:{"background-color":"var(--el-fill-color-light)"},class:"fcom_collapse_btn",onClick:M=>o.toggleGroup(S),size:"small",text:""},{default:y(()=>[_(c,null,{default:y(()=>[_(l)]),_:1}),g("span",vyt,x(t.$t("%s items",S.spaces.length)),1)]),_:2},1032,["onClick"])):O("",!0),_(r,{onClick:M=>o.openCreateSpaceModal(S),style:{"margin-left":"5px","background-color":"var(--el-fill-color-light)"},size:"small",text:""},{default:y(()=>[_(c,null,{default:y(()=>[_(u)]),_:1})]),_:1},8,["onClick"])])])]),g("div",_yt,[_(d,{items:[{label:t.$t("Add new space"),action:()=>{o.openCreateSpaceModal(S)}},{label:t.$t("Edit Group Info"),action:()=>{o.initEditGroup(S)}},{label:t.$t("Delete Group"),type:"danger",action:()=>{o.removeGroup(S)}}]},null,8,["items"])])],2),S.spaces&&S.spaces.length&&s.collapsedGroups.indexOf(S.id)===-1?(v(),$("div",yyt,[_(p,{items:S.spaces,"item-class":"fcom_section_item cursor-move fcom_space_item_padding",onDrop:o.dropSpace},{item:y(({data:M,index:P})=>[g("div",byt,[e[7]||(e[7]=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)),g("p",wyt,[N(x(M.title)+" ",1),M.status!="published"?(v(),D(h,{key:0,type:"info"},{default:y(()=>[N(x(t.$labelize(M.status)),1)]),_:2},1024)):O("",!0),_(h,null,{default:y(()=>[N(x(o.getTypeTitle(M.type)),1)]),_:2},1024),M.type=="sidebar_link"?(v(),D(h,{key:1,type:"info",class:"fcom_hover_show"},{default:y(()=>[N(x(M.settings.permalink),1)]),_:2},1024)):(v(),D(h,{key:2,type:"info",class:"fcom_hover_show"},{default:y(()=>[N("ID: "+x(M.id),1)]),_:2},1024))])]),g("div",kyt,[g("a",{target:"_blank",class:"el-button el-button--small el-button--secondary",href:M.permalink},x(t.$t("View")),9,Cyt),_(d,null,{default:y(({hide:T})=>[g("ul",xyt,[g("li",null,[_(f,{groups:s.groups,currentSpace:M,onMoved:I=>{T(),o.getGroups()}},null,8,["groups","currentSpace","onMoved"])]),g("li",{onClick:I=>{T(),o.openEditSpace(M)}},x(t.$t("Edit")),9,Syt),g("li",{class:"fcom_action_popover_item fcom_action_popover_item_danger",onClick:I=>{T(),o.initDeleteSpace(M)}},x(t.$t("Delete")),9,$yt)])]),_:2},1024)])]),_:1},8,["items","onDrop"])])):O("",!0)])]),_:1},8,["items","onDrop"]),s.orphanedSpaces&&s.orphanedSpaces.length?(v(),$("div",Ayt,[g("div",Eyt,[g("div",Myt,[g("h4",null,x(t.$t("Other Spaces - No Assigned Group")),1)])]),g("div",Tyt,[(v(!0),$(J,null,ye(s.orphanedSpaces,S=>(v(),$("div",Pyt,[g("div",Iyt,[g("p",Lyt,[N(x(S.title)+" ",1),S.status!="published"?(v(),D(h,{key:0,type:"info"},{default:y(()=>[N(x(t.$labelize(S.status)),1)]),_:2},1024)):O("",!0),_(h,null,{default:y(()=>[N(x(o.getTypeTitle(S.type)),1)]),_:2},1024),_(h,{type:"info",class:"fcom_hover_show"},{default:y(()=>[N(" ID: "+x(S.id),1)]),_:2},1024)])]),g("div",Oyt,[g("a",{class:"el-button el-button--small el-button--secondary",target:"_blank",href:S.permalink},x(t.$t("View")),9,Dyt),_(d,null,{default:y(({hide:M})=>[g("ul",Ryt,[g("li",null,[_(f,{groups:s.groups,currentSpace:S,onMoved:P=>{M(),o.getGroups()}},null,8,["groups","currentSpace","onMoved"])]),g("li",{onClick:P=>{M(),o.openEditSpace(S)}},x(t.$t("Edit")),9,Vyt),g("li",{class:"fcom_action_popover_item fcom_action_popover_item_danger",onClick:P=>{M(),o.initDeleteSpace(S)}},x(t.$t("Delete")),9,Fyt)])]),_:2},1024)])]))),256))])])):O("",!0)]))])),[[A,s.loading]])])]),_:1},8,["title"])]),_:1}),_(k,{id:"fluent_comminity_body",modelValue:s.showGroupDrawer,"onUpdate:modelValue":e[3]||(e[3]=S=>s.showGroupDrawer=S),size:t.drawerWidth,title:s.editingGroup?t.$t("Edit Group"):t.$t("Create a new Group"),"close-on-click-modal":!0,"has-close-confirmation":s.isGroupFormDirty,"close-confirmation-message":t.$t("Closing will discard your changes. Are you sure?")},{default:y(()=>[s.showGroupDrawer?(v(),D(w,{key:0,group:s.editingGroup,onDirty:e[1]||(e[1]=S=>s.isGroupFormDirty=!0),onCompleted:e[2]||(e[2]=S=>{s.showGroupDrawer=!1,o.getGroups()})},null,8,["group"])):O("",!0)]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"]),s.editSpace?(v(),$("div",Nyt,[(v(),D(na,{to:"body"},[_(C,{link:s.editSpace,onClose:e[4]||(e[4]=S=>s.editSpace=null),onCompleted:e[5]||(e[5]=S=>{s.editSpace=null,o.getGroups()})},null,8,["link"])]))])):O("",!0)],64)}const zyt=ce(lyt,[["render",Byt]]),Hyt={name:"CustomizerShell",inheritAttrs:!1,emits:["back","save"],props:{back_title:{type:String,required:!0},tabs:{type:Array,default:()=>[]},saving:{type:Boolean,default:!1},save_label:{type:String,default:""},show_save:{type:Boolean,default:!0},show_close:{type:Boolean,default:!0},header_class:{type:String,default:""},container_class:{type:String,default:""}}},Uyt={class:"fcom_full_editor"},jyt=["aria-label"],Wyt={class:"fcom_editor_menu object_menu"},Yyt={class:"fcom_space_menu_ul"},qyt={class:"full_editor_actions"};function Gyt(t,e,n,i,s,o){const r=B("ArrowLeft"),a=we,l=B("router-link"),c=ze,u=K1,d=G1;return v(),D(na,{to:"body"},[g("div",Uyt,[_(d,null,{default:y(()=>[_(u,{class:"fcom_full_editor_header_wrap"},{default:y(()=>[g("div",{class:q([n.header_class,"fcom_full_editor_header"])},[g("button",{type:"button",onClick:e[0]||(e[0]=h=>t.$emit("back")),class:"fcom_back_header","aria-label":t.$t("Back to %s",n.back_title)},[_(a,null,{default:y(()=>[_(r)]),_:1}),N(" "+x(n.back_title),1)],8,jyt),g("div",Wyt,[g("ul",Yyt,[(v(!0),$(J,null,ye(n.tabs,h=>(v(),$("li",{key:h.name},[_(l,{to:h.route},{default:y(()=>[N(x(h.title),1)]),_:2},1032,["to"])]))),128))])]),g("div",qyt,[_(c,{class:q([{fcom_save_hidden:!n.show_save},"fcom_primary_button"]),size:t.isMobile?"small":"default",disabled:n.saving||!n.show_save,loading:n.saving,onClick:e[1]||(e[1]=h=>t.$emit("save"))},{default:y(()=>[N(x(n.save_label||t.$t("Save Changes")),1)]),_:1},8,["class","size","disabled","loading"]),n.show_close?(v(),D(c,{key:0,"aria-label":t.$t("Close"),onClick:e[2]||(e[2]=h=>t.$emit("back")),text:""},{default:y(()=>[...e[3]||(e[3]=[N(" X ",-1)])]),_:1},8,["aria-label"])):O("",!0)])],2)]),_:1}),_(d,{class:q([n.container_class,"fcom_full_editor_container"])},{default:y(()=>[le(t.$slots,"default")]),_:3},8,["class"])]),_:3})])])}const HU=ce(Hyt,[["render",Gyt]]),UU={data(){return{originRoute:null}},beforeRouteEnter(t,e,n){n(i=>i.rememberOrigin(t,e))},methods:{rememberOrigin(t,e){var i;if(!e||!e.name)return;const n=(i=t.matched[0])==null?void 0:i.path;n&&e.matched.some(s=>s.path===n)||(this.originRoute={name:e.name,params:e.params,query:e.query})},goBackToOrigin(t){this.$router.push(this.originRoute||t)}}},Xyt={name:"SpaceSettingsRoute",inheritAttrs:!1,mixins:[UU],components:{CustomizerShell:HU},setup(){return{spaceStore:H2()}},props:["space"],data(){return{saving:!1,savingCount:0,space_profile:null}},computed:{hasLockScreenTab(){var t,e,n;return((t=this.space_profile)==null?void 0:t.privacy)=="private"&&((n=(e=this.space_profile)==null?void 0:e.settings)==null?void 0:n.custom_lock_screen)=="yes"},hasPagesTab(){var t,e;return!this.has_pro||!!((e=(t=this.space_profile)==null?void 0:t.permissions)!=null&&e.can_manage_pages)},isPagesTab(){return this.$route.name=="space_settings_pages"},isMenuTab(){return this.$route.name=="space_settings_links"},isPaywallsTab(){return this.$route.name=="space_settings_paywalls"},tabs(){const t={space:this.space},e=[{name:"general",title:this.$t("General"),route:{name:"space_settings_general",params:t}},{name:"paywalls",title:this.$t("Paywalls"),route:{name:"space_settings_paywalls",params:t}}];return this.hasLockScreenTab&&e.push({name:"lock_screen",title:this.$t("Lock Screen"),route:{name:"space_settings_lockscreen",params:t}}),e.push({name:"manage_links",title:this.$t("Menu"),route:{name:"space_settings_links",params:t}}),this.hasPagesTab&&e.push({name:"manage_pages",title:this.$t("Pages"),route:{name:"space_settings_pages",params:t}}),e},isLockScreenTab(){return this.$route.name=="space_settings_lockscreen"},saveLabel(){return!this.has_pro&&this.isLockScreenTab?this.$t("Save Changes (Pro Required)"):this.$t("Save Changes")},childProps(){return this.$route.name=="space_settings_general"?{savingCount:this.savingCount,community:this.space_profile}:{savingCount:this.savingCount,spaceProfile:this.space_profile}},childListeners(){return this.$route.name=="space_settings_general"?{completed:this.spaceUpdated}:{close:this.goBack}}},watch:{space(){this.fetchSpace()},hasLockScreenTab(t){!t&&this.isLockScreenTab&&this.$router.replace({name:"space_settings_general",params:{space:this.space}})},hasPagesTab(t){!t&&this.isPagesTab&&this.$router.replace({name:"space_settings_general",params:{space:this.space}})}},methods:{async fetchSpace(){try{const t=await this.spaceStore.fetchSpace(this.space,!0);if(!this.hasSpaceAdminAccess(t)){this.$notify.error(this.$t("You do not have permission to manage this space")),this.goBack();return}this.space_profile=t,this.changeTitle(t.title),this.isLockScreenTab&&!this.hasLockScreenTab&&this.$router.replace({name:"space_settings_general",params:{space:this.space}})}catch(t){this.$handleError(t),this.goBack()}},saveChanges(){if(!this.has_pro&&this.isLockScreenTab){this.$notify({title:this.$t("Pro Required"),message:this.$t("This feature is only available in the pro version."),type:"error"});return}this.savingCount=this.savingCount+1},async spaceUpdated(t){if(t!=null&&t.slug&&t.slug!=this.space){this.$router.replace({name:this.$route.name,params:{...this.$route.params,space:t.slug}});return}this.spaceStore.invalidateSpace(this.space);try{this.space_profile=await this.spaceStore.fetchSpace(this.space,!0)}catch{t&&(this.space_profile=t)}},goBack(){const t=this.$route.meta.back_route||"space_feeds",e=this.$route.meta.back_with_space===!1?{}:{space:this.space};this.goBackToOrigin({name:t,params:e})}},mounted(){this.fetchSpace()},beforeUnmount(){this.spaceStore.clearCurrentSpace()}};function Kyt(t,e,n,i,s,o){const r=B("router-view"),a=B("customizer-shell");return s.space_profile?(v(),D(a,{key:0,back_title:s.space_profile.title,tabs:o.tabs,saving:s.saving,save_label:o.saveLabel,show_save:!o.isPagesTab&&!o.isMenuTab&&!o.isPaywallsTab,header_class:"fcom_space_settings_nav",container_class:"editor_customizer_container",onBack:e[0]||(e[0]=l=>o.goBack()),onSave:e[1]||(e[1]=l=>o.saveChanges())},{default:y(()=>[_(r,null,{default:y(({Component:l})=>[(v(),D(Ct(l),Yt(o.childProps,Mb(o.childListeners)),null,16))]),_:1})]),_:1},8,["back_title","tabs","saving","save_label","show_save"])):O("",!0)}const Zyt=ce(Xyt,[["render",Kyt]]),Jyt={name:"CourseSettingsRoute",inheritAttrs:!1,mixins:[UU],components:{CustomizerShell:HU},props:["course_id"],data(){return{saving:!1,savingCount:0,course:{}}},computed:{hasLockScreenTab(){var t,e,n;return((t=this.course)==null?void 0:t.privacy)=="private"&&((n=(e=this.course)==null?void 0:e.settings)==null?void 0:n.custom_lock_screen)=="yes"},tabs(){const t={course_id:this.course_id},e=[{name:"general",title:this.$t("General Settings"),route:{name:"course_settings_general",params:t}},{name:"paywalls",title:this.$t("Paywalls"),route:{name:"course_settings_paywalls",params:t}}];return this.hasLockScreenTab&&e.push({name:"lock_screen",title:this.$t("Lock Screen"),route:{name:"course_settings_lockscreen",params:t}}),e.push({name:"welcome_banner",title:this.$t("Welcome Banner"),route:{name:"course_settings_welcome_banner",params:t}}),e.push({name:"manage_links",title:this.$t("Course Links"),route:{name:"course_settings_links",params:t}}),e},isProTab(){return["course_settings_lockscreen","course_settings_welcome_banner"].includes(this.$route.name)},saveLabel(){return!this.has_pro&&this.isProTab?this.$t("Save Changes (Pro Required)"):this.$t("Save Changes")},childProps(){const t=this.$route.name;return t=="course_settings_general"?{savingCount:this.savingCount,course:this.course}:t=="course_settings_welcome_banner"?{savingCount:this.savingCount,course:this.course,hasPro:this.has_pro}:{savingCount:this.savingCount,spaceProfile:this.course}},childListeners(){const t=this.$route.name;return t=="course_settings_general"?{completed:this.courseUpdated}:t=="course_settings_welcome_banner"?{}:{close:this.goBack}}},watch:{course_id(){this.fetchCourse()},hasLockScreenTab(t){!t&&this.$route.name=="course_settings_lockscreen"&&this.$router.replace({name:"course_settings_general",params:{course_id:this.course_id}})}},methods:{fetchCourse(){this.$get("admin/courses/"+this.course_id).then(t=>{this.course=t.course,this.changeTitle(this.course.title),this.$route.name=="course_settings_lockscreen"&&!this.hasLockScreenTab&&this.$router.replace({name:"course_settings_general",params:{course_id:this.course_id}})}).catch(t=>{this.$handleError(t),this.goBack()})},saveChanges(){if(!this.has_pro&&this.isProTab){this.$notify({title:this.$t("Pro Required"),message:this.$t("This feature is only available in the pro version."),type:"error"});return}this.savingCount=this.savingCount+1},courseUpdated(t){t&&(this.course=t)},goBack(){this.goBackToOrigin({name:"course_overview",params:{course_id:this.course_id}})}},mounted(){if(!this.hasCourseCreatorAccess()){this.$router.replace({name:"manage_courses"});return}this.fetchCourse()}};function Qyt(t,e,n,i,s,o){const r=B("router-view"),a=B("customizer-shell");return s.course.id?(v(),D(a,{key:0,back_title:s.course.title,tabs:o.tabs,saving:s.saving,save_label:o.saveLabel,container_class:"editor_customizer_container",onBack:e[0]||(e[0]=l=>o.goBack()),onSave:e[1]||(e[1]=l=>o.saveChanges())},{default:y(()=>[_(r,null,{default:y(({Component:l})=>[(v(),D(Ct(l),Yt(o.childProps,Mb(o.childListeners)),null,16))]),_:1})]),_:1},8,["back_title","tabs","saving","save_label"])):O("",!0)}const e0t=ce(Jyt,[["render",Qyt]]),t0t={name:"WebhookForm",components:{SpaceIcon:Sp},props:["modelValue","courses","spaces"],emits:["completed"],data(){return{loading:!1,form:this.modelValue||{title:"",courses_ids:[],remove_course_ids:[],space_ids:[],remove_space_ids:[],send_wp_welcome_email:"yes"},adding:!1,mapFields:[{field:"Email (required)",key:"email"},{field:"First Name (optional)",key:"first_name"},{field:"Last Name (optional)",key:"last_name"},{field:"Username (optional)",key:"user_login"},{field:"Password (optional)",key:"user_password"}]}},methods:{addWebhook(){if(!this.form.title){this.$notify.error(this.$t("Please select a user and role"));return}this.adding=!0,this.$post("admin/webhooks",this.form).then(t=>{this.$notify.success(t.message),this.form.id?this.$emit("completed"):(this.form.id=t.webhook.id,this.form.webhook_url=t.webhook.webhook_url)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.adding=!1})}}},n0t={key:0,class:"fcom_highlight_block"},s0t={style:{color:"#E6A23C"}},i0t={target:"_blank",rel:"noopener",href:"https://github.com/WPManageNinja/fluent-community-docs/blob/master/incoming-webhook-config.md"},o0t={key:0,class:"fcom_space_title"},r0t={key:0,class:"fcom_space_title"},a0t={key:0,class:"fcom_space_title"},l0t={key:0,class:"fcom_space_title"},c0t={class:"dialog_footer fcom_mt_20"},u0t={key:0},d0t={key:1};function h0t(t,e,n,i,s,o){const r=B("CopyDocument"),a=we,l=ze,c=ht,u=oa,d=Il,h=Pl,f=tn,p=B("SpaceIcon"),m=Zt,b=Wt,w=jd,k=Ud,C=qt,A=nn,S=xt("loading");return v(),D(A,{onSubmit:e[8]||(e[8]=Me(M=>t.doNothing(),["prevent"])),"label-position":"top",modelValue:s.form,"onUpdate:modelValue":e[9]||(e[9]=M=>s.form=M),size:"large"},{default:y(()=>[s.form.webhook_url?(v(),$("div",n0t,[g("p",null,x(t.$t("You can use this Webhook URL to send POST request to trigger the actions")),1),_(c,{class:"fcom_mb_20",size:"small",value:s.form.webhook_url,readonly:""},{append:y(()=>[_(l,{"aria-label":t.$t("Copy webhook URL"),onClick:e[0]||(e[0]=M=>t.$toClipboard(s.form.webhook_url,this.$t("Link copied to clipboard")))},{default:y(()=>[_(a,null,{default:y(()=>[_(r)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["value"]),_(u,{type:"info",closable:!1,class:"fcom_mb_20"},{default:y(()=>[N(x(t.$t("Copy the keys in the right column and paste it into the app you want to use for sending the POST request."))+" ",1),g("span",s0t,x(t.$t("The email address is required!")),1),e[10]||(e[10]=N()),g("a",i0t,x(t.$t("Read the documentation")),1)]),_:1}),_(h,{style:{margin:"20px 0"},"empty-text":t.$t("No Data Found"),border:"",stripe:"",height:"250",data:s.mapFields},{default:y(()=>[_(d,{label:t.$t("Input Data Label"),prop:"field",width:"300"},null,8,["label"]),_(d,{label:t.$t("Key"),prop:"key"},null,8,["label"])]),_:1},8,["empty-text","data"])])):O("",!0),_(f,{label:t.$t("Title")},{default:y(()=>[_(c,{modelValue:s.form.title,"onUpdate:modelValue":e[1]||(e[1]=M=>s.form.title=M),placeholder:t.$t("Your Webhook Title")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(k,{gutter:20},{default:y(()=>[_(w,{sm:24,md:12},{default:y(()=>[_(f,{label:t.$t("Add to Spaces")},{default:y(()=>[_(b,{modelValue:s.form.space_ids,"onUpdate:modelValue":e[2]||(e[2]=M=>s.form.space_ids=M),multiple:"",placeholder:t.$t("Select Spaces"),style:{width:"100%"}},{default:y(()=>[(v(!0),$(J,null,ye(n.spaces,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:y(()=>[M.id?(v(),$("span",o0t,[_(p,{space_profile:M},null,8,["space_profile"]),g("span",null,x(t.getExcerpt(M.title,50)),1)])):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),_(w,{sm:24,md:12},{default:y(()=>[_(f,{label:t.$t("Remove from Spaces")},{default:y(()=>[_(b,{modelValue:s.form.remove_space_ids,"onUpdate:modelValue":e[3]||(e[3]=M=>s.form.remove_space_ids=M),multiple:"",placeholder:t.$t("Select Spaces that you want to remove from the user"),style:{width:"100%"}},{default:y(()=>[(v(!0),$(J,null,ye(n.spaces,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:y(()=>[M.id?(v(),$("span",r0t,[_(p,{space_profile:M},null,8,["space_profile"]),g("span",null,x(t.getExcerpt(M.title,50)),1)])):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),n.courses?(v(),D(k,{key:1,gutter:20},{default:y(()=>[_(w,{sm:24,md:12},{default:y(()=>[_(f,{label:t.$t("Add to Courses")},{default:y(()=>[_(b,{modelValue:s.form.course_ids,"onUpdate:modelValue":e[4]||(e[4]=M=>s.form.course_ids=M),multiple:"",placeholder:t.$t("Select Courses"),style:{width:"100%"}},{default:y(()=>[(v(!0),$(J,null,ye(n.courses,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:y(()=>[M.id?(v(),$("span",a0t,[_(p,{space_profile:M},null,8,["space_profile"]),g("span",null,x(t.getExcerpt(M.title,50)),1)])):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),_(w,{sm:24,md:12},{default:y(()=>[_(f,{label:t.$t("Remove from Courses")},{default:y(()=>[_(b,{modelValue:s.form.remove_course_ids,"onUpdate:modelValue":e[5]||(e[5]=M=>s.form.remove_course_ids=M),multiple:"",placeholder:t.$t("Select Courses that you want to remove from the user"),style:{width:"100%"}},{default:y(()=>[(v(!0),$(J,null,ye(n.courses,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:y(()=>[M.id?(v(),$("span",l0t,[_(p,{space_profile:M},null,8,["space_profile"]),g("span",null,x(t.getExcerpt(M.title,50)),1)])):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})):O("",!0),_(C,{modelValue:s.form.send_wp_welcome_email,"onUpdate:modelValue":e[6]||(e[6]=M=>s.form.send_wp_welcome_email=M),"true-value":"yes","false-value":"no"},{default:y(()=>[N(x(t.$t("Send default WordPress welcome email for new users")),1)]),_:1},8,["modelValue"]),g("div",c0t,[le(t.$slots,"after_form",{},()=>[Re((v(),D(l,{class:"fcom_primary_button",disabled:s.adding,onClick:e[7]||(e[7]=M=>o.addWebhook())},{default:y(()=>[s.form.id?(v(),$("span",u0t,x(t.$t("Update Webhook")),1)):(v(),$("span",d0t,x(t.$t("Add Webhook")),1))]),_:1},8,["disabled"])),[[S,s.adding]])])])]),_:3},8,["modelValue"])}const f0t=ce(t0t,[["render",h0t]]),p0t={name:"IncomingWebhooks",components:{Pagination:du,UserAvatar:q2,UserRouteLink:ua,WebhookForm:f0t,Layout:yi,AppLayout:bi},data(){return{webhooks:[],loading:!1,spaces:[],courses:null,paginate:{page:1,per_page:10,total:0},search:"",bulkAction:"",showModal:!1,editing_webhook:{title:"",courses_ids:[],remove_course_ids:[],space_ids:[],remove_space_ids:[],send_wp_welcome_email:"yes"}}},methods:{applyBulkAction(){this.bulkAction=""},showForm(t){this.editing_webhook=t?{id:t.id,title:t.value.title,course_ids:t.value.course_ids,remove_course_ids:t.value.remove_course_ids,space_ids:t.value.space_ids,remove_space_ids:t.value.remove_space_ids,send_wp_welcome_email:t.value.send_wp_welcome_email,webhook_url:t.webhook_url}:{title:"",course_ids:[],remove_course_ids:[],space_ids:[],remove_space_ids:[],send_wp_welcome_email:"yes"},this.showModal=!0},copyToClipboard(t){this.$toClipboard(t,this.$t("Link copied to clipboard"))},fetch(){this.loading=!0,this.$get("admin/webhooks",{page:this.paginate.page,per_page:this.paginate.per_page,search:this.search}).then(t=>{t.spaces&&(this.spaces=t.spaces,this.courses=t.courses),this.webhooks=t.webhooks.data,this.paginate.total=t.webhooks.total}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},removeWebhook(t){this.$confirm(this.$t("Are you sure you want to remove this webhook?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Remove"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.working=!0,this.$del("admin/webhooks/"+t.id).then(e=>{this.$notify.success(e.message),this.fetch()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})})}},mounted(){this.has_pro&&this.fetch(),this.changeTitle(this.$t("Incoming Webhooks"))}},m0t=["href"],g0t={class:"settings_router manager_section"},v0t={class:"fhr_content_layout_body"},_0t={key:0,class:"setting_body"},y0t={class:"fcom_manager_actions"},b0t={class:"bulk_search"},w0t={class:"fcom_manager_table"},k0t={class:"fcom_webhook_url"},C0t={class:"fcom_table_action_col"},x0t=["aria-label"],S0t={key:1,class:"setting_body",style:{"text-align":"center"}},$0t=["href"],A0t={class:"dialog_header"},E0t={class:"dialog_body"};function M0t(t,e,n,i,s,o){const r=B("Plus"),a=we,l=ze,c=ht,u=qs,d=Il,h=B("CopyDocument"),f=Pl,p=B("Pagination"),m=B("layout"),b=B("app-layout"),w=B("webhook-form"),k=$s,C=xt("loading");return v(),$(J,null,[_(b,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:y(()=>[_(m,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Incoming Webhooks")},{actions:y(()=>[t.has_pro?(v(),D(l,{key:0,class:"fcom_primary_button",onClick:e[0]||(e[0]=A=>o.showForm(null))},{default:y(()=>[_(a,null,{default:y(()=>[_(r)]),_:1}),g("span",null,x(t.$t("Add New Webhook")),1)]),_:1})):(v(),$("a",{key:1,target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_incoming_webhooks"),class:"el-button el-button--danger"},x(t.$t("Upgrade to Pro")),9,m0t))]),default:y(()=>[g("div",g0t,[g("div",v0t,[t.has_pro?(v(),$("div",_0t,[g("div",y0t,[g("div",b0t,[_(c,{modelValue:s.search,"onUpdate:modelValue":e[1]||(e[1]=A=>s.search=A),onKeydown:ut(o.fetch,["enter"]),placeholder:t.$t("Search"),class:"el-input-round"},{prefix:y(()=>[...e[6]||(e[6]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[g("path",{d:"M14.5833 14.584L18.3333 18.334",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M16.6667 9.16699C16.6667 5.02486 13.3088 1.66699 9.16666 1.66699C5.02453 1.66699 1.66666 5.02486 1.66666 9.16699C1.66666 13.3091 5.02453 16.667 9.16666 16.667C13.3088 16.667 16.6667 13.3091 16.6667 9.16699Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})],-1)])]),_:1},8,["modelValue","onKeydown","placeholder"])])]),g("div",w0t,[Re((v(),D(f,{data:s.webhooks,"empty-text":t.$t("No Webhooks Found")},{default:y(()=>[_(d,{label:t.$t("Title"),sortable:"","min-width":"160"},{default:y(A=>[N(x(A.row.value.title)+" ",1),A.row.value.running_count?(v(),D(u,{key:0,title:t.$t("Ran count"),size:"small"},{default:y(()=>[N(x(A.row.value.running_count),1)]),_:2},1032,["title"])):O("",!0)]),_:1},8,["label"]),_(d,{label:t.$t("Webhook URL"),sortable:""},{default:y(A=>[g("div",k0t,[_(c,{size:"small",value:A.row.webhook_url,readonly:""},{append:y(()=>[_(l,{"aria-label":t.$t("Copy webhook URL"),onClick:S=>o.copyToClipboard(A.row.webhook_url),size:"small"},{default:y(()=>[_(a,null,{default:y(()=>[_(h)]),_:1})]),_:1},8,["aria-label","onClick"])]),_:2},1032,["value"])])]),_:1},8,["label"]),_(d,{label:t.$t("Actions"),width:150},{default:y(A=>[g("div",C0t,[_(l,{onClick:S=>o.showForm(A.row),size:"small"},{default:y(()=>[N(x(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(l,{onClick:S=>o.removeWebhook(A.row),type:"danger",plain:"",size:"small"},{default:y(()=>[N(x(t.$t("Remove")),1)]),_:1},8,["onClick"])])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])),[[C,s.loading]])]),g("div",{role:"region","aria-label":t.$t("Pagination"),class:"pagination_wrap"},[_(p,{hide_on_single:!1,onFetch:e[2]||(e[2]=A=>o.fetch()),pagination:s.paginate},null,8,["pagination"])],8,x0t)])):(v(),$("div",S0t,[e[7]||(e[7]=g("p",null,null,-1)),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_incoming_webhooks"),class:"el-button el-button--danger"},x(t.$t("Upgrade to Pro")),9,$0t)]))])])]),_:1},8,["title"])]),_:1}),_(k,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:s.showModal,"onUpdate:modelValue":e[5]||(e[5]=A=>s.showModal=A),direction:"rtl"},{header:y(({close:A})=>[g("div",A0t,[g("h4",null,x(t.$t(s.editing_webhook.id?"Update Webhook":"Add Webhook")),1)])]),default:y(()=>[g("div",E0t,[s.showModal?(v(),D(w,{key:0,onCompleted:e[3]||(e[3]=()=>{o.fetch(),s.showModal=!1}),modelValue:s.editing_webhook,"onUpdate:modelValue":e[4]||(e[4]=A=>s.editing_webhook=A),courses:s.courses,spaces:s.spaces},null,8,["modelValue","courses","spaces"])):O("",!0)])]),_:1},8,["width","modelValue"])],64)}const T0t=ce(p0t,[["render",M0t]]),P0t={name:"Overview",components:{AppLayout:bi,Layout:yi},data(){return{analyticsNavigations:[{title:this.$t("Overview"),route:"analytics_overview"},{title:this.$t("Members"),route:"analytics_members"},{title:this.$t("Spaces"),route:"analytics_spaces"}]}},mounted(){this.changeTitle(this.$t("Reports"))}},I0t={class:"object_menu"},L0t={class:"fcom_space_menu_ul"};function O0t(t,e,n,i,s,o){const r=B("router-link"),a=B("RouterView"),l=B("layout"),c=B("app-layout");return v(),D(c,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:y(()=>[_(l,{wrapper_class:"no_bg_layout",title:t.$t("Reports")+" (Beta)"},{actions:y(()=>[g("div",I0t,[g("ul",L0t,[(v(!0),$(J,null,ye(s.analyticsNavigations,(u,d)=>(v(),$("li",{key:`analytics-navigation-${d}`},[_(r,{to:{name:u.route}},{default:y(()=>[N(x(t.$t(u.title)),1)]),_:2},1032,["to"])]))),128))])])]),default:y(()=>[_(a)]),_:1},8,["title"])]),_:1})}const D0t=ce(P0t,[["render",O0t]]),R0t={name:"CheckProStatus"},V0t={class:"upgrade-pro-wrapper"},F0t={class:"upgrade-text"},N0t={class:"upgrade-button"},B0t=["href"];function z0t(t,e,n,i,s,o){return v(),$("div",V0t,[g("div",F0t,[g("h2",null,x(t.$t("This Feature is [Pro] Only")),1),g("p",null,x(t.$t("Upgrade to Pro and unlock this feature and many others!")),1)]),g("div",N0t,[g("a",{href:t.$upgradeUrl("feature_lock_analytics"),class:"button",target:"_blank"},x(t.$t("Upgrade Now")),9,B0t)])])}const NS=ce(R0t,[["render",z0t],["__scopeId","data-v-492a58f0"]]),H0t={name:"AnalyticsHeader",props:["predefinedDate","predefinedDates","dateRanges"],emits:["update:date-ranges","update:predefined-date"],data(){return{localPredefinedDate:this.predefinedDate,localDateRanges:this.dateRanges}},methods:{setDateRange(t){if(!t||t===""){this.$nextTick(()=>{this.$refs.datePickerRef.focus()});return}const e=new Date;e.setDate(e.getDate()-parseInt(t));const n=e.toISOString().split("T")[0],i=new Date().toISOString().split("T")[0];this.localDateRanges=[n,i],this.$emit("update:date-ranges",this.localDateRanges),this.$emit("update:predefined-date",this.localPredefinedDate)},disabledDate(t){return t.getTime()>Date.now()}},watch:{localDateRanges(t){this.$emit("update:date-ranges",t)}}},U0t={class:"fcom-report-header"},j0t={class:"fcom-report-header-action"};function W0t(t,e,n,i,s,o){const r=Zt,a=Wt,l=Wd;return v(),$("div",U0t,[g("h4",null,x(t.$t("Overview")),1),g("div",j0t,[_(a,{modelValue:s.localPredefinedDate,"onUpdate:modelValue":e[0]||(e[0]=c=>s.localPredefinedDate=c),onChange:o.setDateRange,class:"date-selector"},{default:y(()=>[(v(!0),$(J,null,ye(n.predefinedDates,(c,u)=>(v(),D(r,{key:`date-shortcut-${u}`,label:c.label,value:c.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"]),_(l,{modelValue:s.localDateRanges,"onUpdate:modelValue":e[1]||(e[1]=c=>s.localDateRanges=c),ref:"datePickerRef",type:"daterange","range-separator":"-",clearable:!1,"disabled-date":o.disabledDate,"start-placeholder":t.$t("Start date"),"end-placeholder":t.$t("End date"),format:t.siteDateFormat,"value-format":"YYYY-MM-DD",onChange:o.setDateRange},null,8,["modelValue","disabled-date","start-placeholder","end-placeholder","format","onChange"])])])}const Y0t=ce(H0t,[["render",W0t]]),q0t={name:"Loading",props:{section:{type:Number,default:()=>1}}};function G0t(t,e,n,i,s,o){const r=Vt;return v(!0),$(J,null,ye(n.section,a=>(v(),$("div",{class:"fcom-loading",key:`loading-spinner-item-${a}`},[_(r,{rows:5,loading:"",animated:""})]))),128)}const Ha=ce(q0t,[["render",G0t]]),X0t={name:"AnalyticsWidgets",components:{Loading:Ha},props:["dateRanges"],data(){return{loading:!1,widgets:[]}},watch:{dateRanges:"fetchData"},methods:{fetchData(){this.loading=!0,this.$get("analytics/overview/widget",{start_date:this.dateRanges[0],end_date:this.dateRanges[1]}).then(t=>{let e=Object.values(t.data).map(n=>{const i=typeof(n==null?void 0:n.comparison)=="string"&&n.comparison.startsWith("-");return{...n,down:i}});this.widgets=e}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.fetchData()}},K0t={key:1,class:"fcom-report-stat-widgets"},Z0t={class:"stat-title"};function J0t(t,e,n,i,s,o){const r=B("Loading");return s.loading?(v(),D(r,{key:0,section:1})):(v(),$("div",K0t,[(v(!0),$(J,null,ye(s.widgets,(a,l)=>(v(),$("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",Z0t,x(a.title),1),g("h3",null,[N(x(a.total_records)+" ",1),g("span",{class:q(["stat-percent",{"stat-down":a.down}])},x(a.comparison),3)])]))),128))]))}const Q0t=ce(X0t,[["render",J0t]]);/*!
136 + * ApexCharts v4.3.0
137 + * (c) 2018-2024 ApexCharts
138 + * Released under the MIT License.
139 + */function zx(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function jU(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function lt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function NT(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,qU(i.key),i)}}function ct(t,e,n){return e&&NT(t.prototype,e),n&&NT(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Pm(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=BS(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var i=0,s=function(){};return{s,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
140 +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,r=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var l=n.next();return r=l.done,l},e:function(l){a=!0,o=l},f:function(){try{r||n.return==null||n.return()}finally{if(a)throw o}}}}function wv(t){var e=WU();return function(){var n,i=sb(t);if(e){var s=sb(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return function(o,r){if(r&&(typeof r=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jU(o)}(this,n)}}function nb(t,e,n){return(e=qU(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sb(t){return sb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sb(t)}function kv(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Hx(t,e)}function WU(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WU=function(){return!!t})()}function BT(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,i)}return n}function tt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?BT(Object(n),!0).forEach(function(i){nb(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):BT(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Hx(t,e){return Hx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Hx(t,e)}function YU(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,i){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var o,r,a,l,c=[],u=!0,d=!1;try{if(a=(s=s.call(n)).next,i===0){if(Object(s)!==s)return;u=!1}else for(;!(u=(o=a.call(s)).done)&&(c.push(o.value),c.length!==i);u=!0);}catch(h){d=!0,r=h}finally{try{if(!u&&s.return!=null&&(l=s.return(),Object(l)!==l))return}finally{if(d)throw r}}return c}}(t,e)||BS(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
141 +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ns(t){return function(e){if(Array.isArray(e))return zx(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||BS(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
142 +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function qU(t){var e=function(n,i){if(typeof n!="object"||!n)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var o=s.call(n,i||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}(t,"string");return typeof e=="symbol"?e:e+""}function tp(t){return tp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tp(t)}function BS(t,e){if(t){if(typeof t=="string")return zx(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zx(t,e):void 0}}var he=function(){function t(){lt(this,t)}return ct(t,[{key:"shadeRGBColor",value:function(e,n){var i=n.split(","),s=e<0?0:255,o=e<0?-1*e:e,r=parseInt(i[0].slice(4),10),a=parseInt(i[1],10),l=parseInt(i[2],10);return"rgb("+(Math.round((s-r)*o)+r)+","+(Math.round((s-a)*o)+a)+","+(Math.round((s-l)*o)+l)+")"}},{key:"shadeHexColor",value:function(e,n){var i=parseInt(n.slice(1),16),s=e<0?0:255,o=e<0?-1*e:e,r=i>>16,a=i>>8&255,l=255&i;return"#"+(16777216+65536*(Math.round((s-r)*o)+r)+256*(Math.round((s-a)*o)+a)+(Math.round((s-l)*o)+l)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,n){return t.isColorHex(n)?this.shadeHexColor(e,n):this.shadeRGBColor(e,n)}}],[{key:"bind",value:function(e,n){return function(){return e.apply(n,arguments)}}},{key:"isObject",value:function(e){return e&&tp(e)==="object"&&!Array.isArray(e)&&e!=null}},{key:"is",value:function(e,n){return Object.prototype.toString.call(n)==="[object "+e+"]"}},{key:"listToArray",value:function(e){var n,i=[];for(n=0;n<e.length;n++)i[n]=e[n];return i}},{key:"extend",value:function(e,n){var i=this;typeof Object.assign!="function"&&(Object.assign=function(o){if(o==null)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(o),a=1;a<arguments.length;a++){var l=arguments[a];if(l!=null)for(var c in l)l.hasOwnProperty(c)&&(r[c]=l[c])}return r});var s=Object.assign({},e);return this.isObject(e)&&this.isObject(n)&&Object.keys(n).forEach(function(o){i.isObject(n[o])&&o in e?s[o]=i.extend(e[o],n[o]):Object.assign(s,nb({},o,n[o]))}),s}},{key:"extendArray",value:function(e,n){var i=[];return e.map(function(s){i.push(t.extend(n,s))}),e=i}},{key:"monthMod",value:function(e){return e%12}},{key:"clone",value:function(e){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(e===null||tp(e)!=="object")return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){n=[],i.set(e,n);for(var s=0;s<e.length;s++)n[s]=this.clone(e[s],i)}else if(e instanceof Date)n=new Date(e.getTime());else for(var o in n={},i.set(e,n),e)e.hasOwnProperty(o)&&(n[o]=this.clone(e[o],i));return n}},{key:"log10",value:function(e){return Math.log(e)/Math.LN10}},{key:"roundToBase10",value:function(e){return Math.pow(10,Math.floor(Math.log10(e)))}},{key:"roundToBase",value:function(e,n){return Math.pow(n,Math.floor(Math.log(e)/Math.log(n)))}},{key:"parseNumber",value:function(e){return e===null?e:parseFloat(e)}},{key:"stripNumber",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return Number.isInteger(e)?e:parseFloat(e.toPrecision(n))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(e){return e.toString().includes("e")?Math.round(e):e}},{key:"elementExists",value:function(e){return!(!e||!e.isConnected)}},{key:"getDimensions",value:function(e){var n=getComputedStyle(e,null),i=e.clientHeight,s=e.clientWidth;return i-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),[s-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),i]}},{key:"getBoundingClientRect",value:function(e){var n=e.getBoundingClientRect();return{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:e.clientWidth,height:e.clientHeight,x:n.left,y:n.top}}},{key:"getLargestStringFromArr",value:function(e){return e.reduce(function(n,i){return Array.isArray(i)&&(i=i.reduce(function(s,o){return s.length>o.length?s:o})),n.length>i.length?n:i},0)}},{key:"hexToRgba",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"#999999",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.6;e.substring(0,1)!=="#"&&(e="#999999");var i=e.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var s=0;s<i.length;s++)i[s]=parseInt(i[s].length===1?i[s]+i[s]:i[s],16);return n!==void 0&&i.push(n),"rgba("+i.join(",")+")"}},{key:"getOpacityFromRGBA",value:function(e){return parseFloat(e.replace(/^.*,(.+)\)/,"$1"))}},{key:"rgb2hex",value:function(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&e.length===4?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""}},{key:"isColorHex",value:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}},{key:"getPolygonPos",value:function(e,n){for(var i=[],s=2*Math.PI/n,o=0;o<n;o++){var r={};r.x=e*Math.sin(o*s),r.y=-e*Math.cos(o*s),i.push(r)}return i}},{key:"polarToCartesian",value:function(e,n,i,s){var o=(s-90)*Math.PI/180;return{x:e+i*Math.cos(o),y:n+i*Math.sin(o)}}},{key:"escapeString",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x",i=e.toString().slice();return i=i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,n)}},{key:"negToZero",value:function(e){return e<0?0:e}},{key:"moveIndexInArray",value:function(e,n,i){if(i>=e.length)for(var s=i-e.length+1;s--;)e.push(void 0);return e.splice(i,0,e.splice(n,1)[0]),e}},{key:"extractNumber",value:function(e){return parseFloat(e.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(e,n){for(;(e=e.parentElement)&&!e.classList.contains(n););return e}},{key:"setELstyles",value:function(e,n){for(var i in n)n.hasOwnProperty(i)&&(e.style.key=n[i])}},{key:"preciseAddition",value:function(e,n){var i=(String(e).split(".")[1]||"").length,s=(String(n).split(".")[1]||"").length,o=Math.pow(10,Math.max(i,s));return(Math.round(e*o)+Math.round(n*o))/o}},{key:"isNumber",value:function(e){return!isNaN(e)&&parseFloat(Number(e))===e&&!isNaN(parseInt(e,10))}},{key:"isFloat",value:function(e){return Number(e)===e&&e%1!=0}},{key:"isMsEdge",value:function(){var e=window.navigator.userAgent,n=e.indexOf("Edge/");return n>0&&parseInt(e.substring(n+5,e.indexOf(".",n)),10)}},{key:"getGCD",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,s=Math.pow(10,i-Math.floor(Math.log10(Math.max(e,n))));for(e=Math.round(Math.abs(e)*s),n=Math.round(Math.abs(n)*s);n;){var o=n;n=e%n,e=o}return e/s}},{key:"getPrimeFactors",value:function(e){for(var n=[],i=2;e>=2;)e%i==0?(n.push(i),e/=i):i++;return n}},{key:"mod",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,s=Math.pow(10,i-Math.floor(Math.log10(Math.max(e,n))));return(e=Math.round(Math.abs(e)*s))%(n=Math.round(Math.abs(n)*s))/s}}]),t}(),Dp=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"animateLine",value:function(e,n,i,s){e.attr(n).animate(s).attr(i)}},{key:"animateMarker",value:function(e,n,i,s){e.attr({opacity:0}).animate(n).attr({opacity:1}).after(function(){s()})}},{key:"animateRect",value:function(e,n,i,s,o){e.attr(n).animate(s).attr(i).after(function(){return o()})}},{key:"animatePathsGradually",value:function(e){var n=e.el,i=e.realIndex,s=e.j,o=e.fill,r=e.pathFrom,a=e.pathTo,l=e.speed,c=e.delay,u=this.w,d=0;u.config.chart.animations.animateGradually.enabled&&(d=u.config.chart.animations.animateGradually.delay),u.config.chart.animations.dynamicAnimation.enabled&&u.globals.dataChanged&&u.config.chart.type!=="bar"&&(d=0),this.morphSVG(n,i,s,u.config.chart.type!=="line"||u.globals.comboCharts?o:"stroke",r,a,l,c*d)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach(function(e){var n=e.el;n.classList.remove("apexcharts-element-hidden"),n.classList.add("apexcharts-hidden-element-shown")})}},{key:"animationCompleted",value:function(e){var n=this.w;n.globals.animationEnded||(n.globals.animationEnded=!0,this.showDelayedElements(),typeof n.config.chart.events.animationEnd=="function"&&n.config.chart.events.animationEnd(this.ctx,{el:e,w:n}))}},{key:"morphSVG",value:function(e,n,i,s,o,r,a,l){var c=this,u=this.w;o||(o=e.attr("pathFrom")),r||(r=e.attr("pathTo"));var d=function(h){return u.config.chart.type==="radar"&&(a=1),"M 0 ".concat(u.globals.gridHeight)};(!o||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=d()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=d()),u.globals.shouldAnimate||(a=1),e.plot(o).animate(1,l).plot(o).animate(a,l).plot(r).after(function(){he.isNumber(i)?i===u.globals.series[u.globals.maxValsInArrayIndex].length-2&&u.globals.shouldAnimate&&c.animationCompleted(e):s!=="none"&&u.globals.shouldAnimate&&(!u.globals.comboCharts&&n===u.globals.series.length-1||u.globals.comboCharts)&&c.animationCompleted(e),c.showDelayedElements()})}}]),t}();const Ux={},GU=[];function Qt(t,e){if(Array.isArray(t))for(const n of t)Qt(n,e);else if(typeof t!="object")XU(Object.getOwnPropertyNames(e)),Ux[t]=Object.assign(Ux[t]||{},e);else for(const n in t)Qt(n,t[n])}function to(t){return Ux[t]||{}}function XU(t){GU.push(...t)}function zS(t,e){let n;const i=t.length,s=[];for(n=0;n<i;n++)s.push(e(t[n]));return s}function Y3(t){return t%360*Math.PI/180}function Rp(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Vp(t,e,n,i){return e!=null&&n!=null||(i=i||t.bbox(),e==null?e=i.width/i.height*n:n==null&&(n=i.height/i.width*e)),{width:e,height:n}}function jx(t,e){const n=t.origin;let i=t.ox!=null?t.ox:t.originX!=null?t.originX:"center",s=t.oy!=null?t.oy:t.originY!=null?t.originY:"center";n!=null&&([i,s]=Array.isArray(n)?n:typeof n=="object"?[n.x,n.y]:[n,n]);const o=typeof i=="string",r=typeof s=="string";if(o||r){const{height:a,width:l,x:c,y:u}=e.bbox();o&&(i=i.includes("left")?c:i.includes("right")?c+l:c+l/2),r&&(s=s.includes("top")?u:s.includes("bottom")?u+a:u+a/2)}return[i,s]}const ebt=new Set(["desc","metadata","title"]),Wx=t=>ebt.has(t.nodeName),KU=(t,e,n={})=>{const i={...e};for(const s in i)i[s].valueOf()===n[s]&&delete i[s];Object.keys(i).length?t.node.setAttribute("data-svgjs",JSON.stringify(i)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},HS="http://www.w3.org/2000/svg",q3="http://www.w3.org/2000/xmlns/",Fp="http://www.w3.org/1999/xlink",vn={window:typeof window>"u"?null:window,document:typeof document>"u"?null:document};function Cv(){return vn.window}let US=class{};const ud={},jS="___SYMBOL___ROOT___";function w1(t,e=HS){return vn.document.createElementNS(e,t)}function Ui(t,e=!1){if(t instanceof US)return t;if(typeof t=="object")return G3(t);if(t==null)return new ud[jS];if(typeof t=="string"&&t.charAt(0)!=="<")return G3(vn.document.querySelector(t));const n=e?vn.document.createElement("div"):w1("svg");return n.innerHTML=t,t=G3(n.firstChild),n.removeChild(n.firstChild),t}function Bn(t,e){return e&&(e instanceof vn.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:w1(t)}function sr(t){if(!t)return null;if(t.instance instanceof US)return t.instance;if(t.nodeName==="#document-fragment")return new ud.Fragment(t);let e=Rp(t.nodeName||"Dom");return e==="LinearGradient"||e==="RadialGradient"?e="Gradient":ud[e]||(e="Dom"),new ud[e](t)}let G3=sr;function yn(t,e=t.name,n=!1){return ud[e]=t,n&&(ud[jS]=t),XU(Object.getOwnPropertyNames(t.prototype)),t}let tbt=1e3;function ZU(t){return"Svgjs"+Rp(t)+tbt++}function JU(t){for(let e=t.children.length-1;e>=0;e--)JU(t.children[e]);return t.id&&(t.id=ZU(t.nodeName)),t}function At(t,e){let n,i;for(i=(t=Array.isArray(t)?t:[t]).length-1;i>=0;i--)for(n in e)t[i].prototype[n]=e[n]}function Nn(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}Qt("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=Ui(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=Ui(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=Ui(t)).before(this),this},insertAfter:function(t){return(t=Ui(t)).after(this),this}});const QU=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,nbt=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,sbt=/rgb\((\d+),(\d+),(\d+)\)/,ibt=/(#[a-z_][a-z0-9\-_]*)/i,obt=/\)\s*,?\s*/,rbt=/\s/g,zT=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,HT=/^rgb\(/,UT=/^(\s+)?$/,jT=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,abt=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Rl=/[\s,]+/,WS=/[MLHVCSQTAZ]/i;function lbt(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return n.length===1?"0"+n:n}function mh(t,e){for(let n=e.length;n--;)if(t[e[n]]==null)return!1;return!0}function X3(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}Qt("Dom",{classes:function(){const t=this.attr("class");return t==null?[]:t.trim().split(Rl)},hasClass:function(t){return this.classes().indexOf(t)!==-1},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter(function(e){return e!==t}).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),Qt("Dom",{css:function(t,e){const n={};if(arguments.length===0)return this.node.style.cssText.split(/\s*;\s*/).filter(function(i){return!!i.length}).forEach(function(i){const s=i.split(/\s*:\s*/);n[s[0]]=s[1]}),n;if(arguments.length<2){if(Array.isArray(t)){for(const i of t){const s=i;n[i]=this.node.style.getPropertyValue(s)}return n}if(typeof t=="string")return this.node.style.getPropertyValue(t);if(typeof t=="object")for(const i in t)this.node.style.setProperty(i,t[i]==null||UT.test(t[i])?"":t[i])}return arguments.length===2&&this.node.style.setProperty(t,e==null||UT.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return this.css("display")!=="none"}}),Qt("Dom",{data:function(t,e,n){if(t==null)return this.data(zS(function(i,s){let o;const r=i.length,a=[];for(o=0;o<r;o++)s(i[o])&&a.push(i[o]);return a}(this.node.attributes,i=>i.nodeName.indexOf("data-")===0),i=>i.nodeName.slice(5)));if(t instanceof Array){const i={};for(const s of t)i[s]=this.data(s);return i}if(typeof t=="object")for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch{return this.attr("data-"+t)}else this.attr("data-"+t,e===null?null:n===!0||typeof e=="string"||typeof e=="number"?e:JSON.stringify(e));return this}}),Qt("Dom",{remember:function(t,e){if(typeof arguments[0]=="object")for(const n in t)this.remember(n,t[n]);else{if(arguments.length===1)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(arguments.length===0)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class Ln{constructor(...e){this.init(...e)}static isColor(e){return e&&(e instanceof Ln||this.isRgb(e)||this.test(e))}static isRgb(e){return e&&typeof e.r=="number"&&typeof e.g=="number"&&typeof e.b=="number"}static random(e="vibrant",n){const{random:i,round:s,sin:o,PI:r}=Math;if(e==="vibrant"){const a=24*i()+57,l=38*i()+45,c=360*i();return new Ln(a,l,c,"lch")}if(e==="sine"){const a=s(80*o(2*r*(n=n??i())/.5+.01)+150),l=s(50*o(2*r*n/.5+4.6)+200),c=s(100*o(2*r*n/.5+2.3)+150);return new Ln(a,l,c)}if(e==="pastel"){const a=8*i()+86,l=17*i()+9,c=360*i();return new Ln(a,l,c,"lch")}if(e==="dark"){const a=10+10*i(),l=50*i()+86,c=360*i();return new Ln(a,l,c,"lch")}if(e==="rgb"){const a=255*i(),l=255*i(),c=255*i();return new Ln(a,l,c)}if(e==="lab"){const a=100*i(),l=256*i()-128,c=256*i()-128;return new Ln(a,l,c,"lab")}if(e==="grey"){const a=255*i();return new Ln(a,a,a)}throw new Error("Unsupported random color mode")}static test(e){return typeof e=="string"&&(zT.test(e)||HT.test(e))}cmyk(){const{_a:e,_b:n,_c:i}=this.rgb(),[s,o,r]=[e,n,i].map(l=>l/255),a=Math.min(1-s,1-o,1-r);return a===1?new Ln(0,0,0,1,"cmyk"):new Ln((1-s-a)/(1-a),(1-o-a)/(1-a),(1-r-a)/(1-a),a,"cmyk")}hsl(){const{_a:e,_b:n,_c:i}=this.rgb(),[s,o,r]=[e,n,i].map(h=>h/255),a=Math.max(s,o,r),l=Math.min(s,o,r),c=(a+l)/2,u=a===l,d=a-l;return new Ln(360*(u?0:a===s?((o-r)/d+(o<r?6:0))/6:a===o?((r-s)/d+2)/6:a===r?((s-o)/d+4)/6:0),100*(u?0:c>.5?d/(2-a-l):d/(a+l)),100*c,"hsl")}init(e=0,n=0,i=0,s=0,o="rgb"){if(e=e||0,this.space)for(const d in this.space)delete this[this.space[d]];if(typeof e=="number")o=typeof s=="string"?s:o,s=typeof s=="string"?0:s,Object.assign(this,{_a:e,_b:n,_c:i,_d:s,space:o});else if(e instanceof Array)this.space=n||(typeof e[3]=="string"?e[3]:e[4])||"rgb",Object.assign(this,{_a:e[0],_b:e[1],_c:e[2],_d:e[3]||0});else if(e instanceof Object){const d=function(h,f){const p=mh(h,"rgb")?{_a:h.r,_b:h.g,_c:h.b,_d:0,space:"rgb"}:mh(h,"xyz")?{_a:h.x,_b:h.y,_c:h.z,_d:0,space:"xyz"}:mh(h,"hsl")?{_a:h.h,_b:h.s,_c:h.l,_d:0,space:"hsl"}:mh(h,"lab")?{_a:h.l,_b:h.a,_c:h.b,_d:0,space:"lab"}:mh(h,"lch")?{_a:h.l,_b:h.c,_c:h.h,_d:0,space:"lch"}:mh(h,"cmyk")?{_a:h.c,_b:h.m,_c:h.y,_d:h.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return p.space=f||p.space,p}(e,n);Object.assign(this,d)}else if(typeof e=="string")if(HT.test(e)){const d=e.replace(rbt,""),[h,f,p]=sbt.exec(d).slice(1,4).map(m=>parseInt(m));Object.assign(this,{_a:h,_b:f,_c:p,_d:0,space:"rgb"})}else{if(!zT.test(e))throw Error("Unsupported string format, can't construct Color");{const d=m=>parseInt(m,16),[,h,f,p]=nbt.exec(function(m){return m.length===4?["#",m.substring(1,2),m.substring(1,2),m.substring(2,3),m.substring(2,3),m.substring(3,4),m.substring(3,4)].join(""):m}(e)).map(d);Object.assign(this,{_a:h,_b:f,_c:p,_d:0,space:"rgb"})}}const{_a:r,_b:a,_c:l,_d:c}=this,u=this.space==="rgb"?{r,g:a,b:l}:this.space==="xyz"?{x:r,y:a,z:l}:this.space==="hsl"?{h:r,s:a,l}:this.space==="lab"?{l:r,a,b:l}:this.space==="lch"?{l:r,c:a,h:l}:this.space==="cmyk"?{c:r,m:a,y:l,k:c}:{};Object.assign(this,u)}lab(){const{x:e,y:n,z:i}=this.xyz();return new Ln(116*n-16,500*(e-n),200*(n-i),"lab")}lch(){const{l:e,a:n,b:i}=this.lab(),s=Math.sqrt(n**2+i**2);let o=180*Math.atan2(i,n)/Math.PI;return o<0&&(o*=-1,o=360-o),new Ln(e,s,o,"lch")}rgb(){if(this.space==="rgb")return this;if((e=this.space)==="lab"||e==="xyz"||e==="lch"){let{x:n,y:i,z:s}=this;if(this.space==="lab"||this.space==="lch"){let{l:f,a:p,b:m}=this;if(this.space==="lch"){const{c:M,h:P}=this,T=Math.PI/180;p=M*Math.cos(T*P),m=M*Math.sin(T*P)}const b=(f+16)/116,w=p/500+b,k=b-m/200,C=16/116,A=.008856,S=7.787;n=.95047*(w**3>A?w**3:(w-C)/S),i=1*(b**3>A?b**3:(b-C)/S),s=1.08883*(k**3>A?k**3:(k-C)/S)}const o=3.2406*n+-1.5372*i+-.4986*s,r=-.9689*n+1.8758*i+.0415*s,a=.0557*n+-.204*i+1.057*s,l=Math.pow,c=.0031308,u=o>c?1.055*l(o,1/2.4)-.055:12.92*o,d=r>c?1.055*l(r,1/2.4)-.055:12.92*r,h=a>c?1.055*l(a,1/2.4)-.055:12.92*a;return new Ln(255*u,255*d,255*h)}if(this.space==="hsl"){let{h:n,s:i,l:s}=this;if(n/=360,i/=100,s/=100,i===0)return s*=255,new Ln(s,s,s);const o=s<.5?s*(1+i):s+i-s*i,r=2*s-o,a=255*X3(r,o,n+1/3),l=255*X3(r,o,n),c=255*X3(r,o,n-1/3);return new Ln(a,l,c)}if(this.space==="cmyk"){const{c:n,m:i,y:s,k:o}=this,r=255*(1-Math.min(1,n*(1-o)+o)),a=255*(1-Math.min(1,i*(1-o)+o)),l=255*(1-Math.min(1,s*(1-o)+o));return new Ln(r,a,l)}return this;var e}toArray(){const{_a:e,_b:n,_c:i,_d:s,space:o}=this;return[e,n,i,s,o]}toHex(){const[e,n,i]=this._clamped().map(lbt);return`#${e}${n}${i}`}toRgb(){const[e,n,i]=this._clamped();return`rgb(${e},${n},${i})`}toString(){return this.toHex()}xyz(){const{_a:e,_b:n,_c:i}=this.rgb(),[s,o,r]=[e,n,i].map(b=>b/255),a=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,l=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,c=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,u=(.4124*a+.3576*l+.1805*c)/.95047,d=(.2126*a+.7152*l+.0722*c)/1,h=(.0193*a+.1192*l+.9505*c)/1.08883,f=u>.008856?Math.pow(u,1/3):7.787*u+16/116,p=d>.008856?Math.pow(d,1/3):7.787*d+16/116,m=h>.008856?Math.pow(h,1/3):7.787*h+16/116;return new Ln(f,p,m,"xyz")}_clamped(){const{_a:e,_b:n,_c:i}=this.rgb(),{max:s,min:o,round:r}=Math;return[e,n,i].map(a=>s(0,o(r(a),255)))}}let Dn=class ej{constructor(...e){this.init(...e)}clone(){return new ej(this)}init(e,n){const o=Array.isArray(e)?{x:e[0],y:e[1]}:typeof e=="object"?{x:e.x,y:e.y}:{x:e,y:n};return this.x=o.x==null?0:o.x,this.y=o.y==null?0:o.y,this}toArray(){return[this.x,this.y]}transform(e){return this.clone().transformO(e)}transformO(e){ln.isMatrixLike(e)||(e=new ln(e));const{x:n,y:i}=this;return this.x=e.a*n+e.c*i+e.e,this.y=e.b*n+e.d*i+e.f,this}};function gh(t,e,n){return Math.abs(e-t)<(n||1e-6)}let ln=class Ds{constructor(...e){this.init(...e)}static formatTransforms(e){const n=e.flip==="both"||e.flip===!0,i=e.flip&&(n||e.flip==="x")?-1:1,s=e.flip&&(n||e.flip==="y")?-1:1,o=e.skew&&e.skew.length?e.skew[0]:isFinite(e.skew)?e.skew:isFinite(e.skewX)?e.skewX:0,r=e.skew&&e.skew.length?e.skew[1]:isFinite(e.skew)?e.skew:isFinite(e.skewY)?e.skewY:0,a=e.scale&&e.scale.length?e.scale[0]*i:isFinite(e.scale)?e.scale*i:isFinite(e.scaleX)?e.scaleX*i:i,l=e.scale&&e.scale.length?e.scale[1]*s:isFinite(e.scale)?e.scale*s:isFinite(e.scaleY)?e.scaleY*s:s,c=e.shear||0,u=e.rotate||e.theta||0,d=new Dn(e.origin||e.around||e.ox||e.originX,e.oy||e.originY),h=d.x,f=d.y,p=new Dn(e.position||e.px||e.positionX||NaN,e.py||e.positionY||NaN),m=p.x,b=p.y,w=new Dn(e.translate||e.tx||e.translateX,e.ty||e.translateY),k=w.x,C=w.y,A=new Dn(e.relative||e.rx||e.relativeX,e.ry||e.relativeY);return{scaleX:a,scaleY:l,skewX:o,skewY:r,shear:c,theta:u,rx:A.x,ry:A.y,tx:k,ty:C,ox:h,oy:f,px:m,py:b}}static fromArray(e){return{a:e[0],b:e[1],c:e[2],d:e[3],e:e[4],f:e[5]}}static isMatrixLike(e){return e.a!=null||e.b!=null||e.c!=null||e.d!=null||e.e!=null||e.f!=null}static matrixMultiply(e,n,i){const s=e.a*n.a+e.c*n.b,o=e.b*n.a+e.d*n.b,r=e.a*n.c+e.c*n.d,a=e.b*n.c+e.d*n.d,l=e.e+e.a*n.e+e.c*n.f,c=e.f+e.b*n.e+e.d*n.f;return i.a=s,i.b=o,i.c=r,i.d=a,i.e=l,i.f=c,i}around(e,n,i){return this.clone().aroundO(e,n,i)}aroundO(e,n,i){const s=e||0,o=n||0;return this.translateO(-s,-o).lmultiplyO(i).translateO(s,o)}clone(){return new Ds(this)}decompose(e=0,n=0){const i=this.a,s=this.b,o=this.c,r=this.d,a=this.e,l=this.f,c=i*r-s*o,u=c>0?1:-1,d=u*Math.sqrt(i*i+s*s),h=Math.atan2(u*s,u*i),f=180/Math.PI*h,p=Math.cos(h),m=Math.sin(h),b=(i*o+s*r)/c,w=o*d/(b*i-s)||r*d/(b*s+i);return{scaleX:d,scaleY:w,shear:b,rotate:f,translateX:a-e+e*p*d+n*(b*p*d-m*w),translateY:l-n+e*m*d+n*(b*m*d+p*w),originX:e,originY:n,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(e){if(e===this)return!0;const n=new Ds(e);return gh(this.a,n.a)&&gh(this.b,n.b)&&gh(this.c,n.c)&&gh(this.d,n.d)&&gh(this.e,n.e)&&gh(this.f,n.f)}flip(e,n){return this.clone().flipO(e,n)}flipO(e,n){return e==="x"?this.scaleO(-1,1,n,0):e==="y"?this.scaleO(1,-1,0,n):this.scaleO(-1,-1,e,n||e)}init(e){const n=Ds.fromArray([1,0,0,1,0,0]);return e=e instanceof mi?e.matrixify():typeof e=="string"?Ds.fromArray(e.split(Rl).map(parseFloat)):Array.isArray(e)?Ds.fromArray(e):typeof e=="object"&&Ds.isMatrixLike(e)?e:typeof e=="object"?new Ds().transform(e):arguments.length===6?Ds.fromArray([].slice.call(arguments)):n,this.a=e.a!=null?e.a:n.a,this.b=e.b!=null?e.b:n.b,this.c=e.c!=null?e.c:n.c,this.d=e.d!=null?e.d:n.d,this.e=e.e!=null?e.e:n.e,this.f=e.f!=null?e.f:n.f,this}inverse(){return this.clone().inverseO()}inverseO(){const e=this.a,n=this.b,i=this.c,s=this.d,o=this.e,r=this.f,a=e*s-n*i;if(!a)throw new Error("Cannot invert "+this);const l=s/a,c=-n/a,u=-i/a,d=e/a,h=-(l*o+u*r),f=-(c*o+d*r);return this.a=l,this.b=c,this.c=u,this.d=d,this.e=h,this.f=f,this}lmultiply(e){return this.clone().lmultiplyO(e)}lmultiplyO(e){const n=e instanceof Ds?e:new Ds(e);return Ds.matrixMultiply(n,this,this)}multiply(e){return this.clone().multiplyO(e)}multiplyO(e){const n=e instanceof Ds?e:new Ds(e);return Ds.matrixMultiply(this,n,this)}rotate(e,n,i){return this.clone().rotateO(e,n,i)}rotateO(e,n=0,i=0){e=Y3(e);const s=Math.cos(e),o=Math.sin(e),{a:r,b:a,c:l,d:c,e:u,f:d}=this;return this.a=r*s-a*o,this.b=a*s+r*o,this.c=l*s-c*o,this.d=c*s+l*o,this.e=u*s-d*o+i*o-n*s+n,this.f=d*s+u*o-n*o-i*s+i,this}scale(){return this.clone().scaleO(...arguments)}scaleO(e,n=e,i=0,s=0){arguments.length===3&&(s=i,i=n,n=e);const{a:o,b:r,c:a,d:l,e:c,f:u}=this;return this.a=o*e,this.b=r*n,this.c=a*e,this.d=l*n,this.e=c*e-i*e+i,this.f=u*n-s*n+s,this}shear(e,n,i){return this.clone().shearO(e,n,i)}shearO(e,n=0,i=0){const{a:s,b:o,c:r,d:a,e:l,f:c}=this;return this.a=s+o*e,this.c=r+a*e,this.e=l+c*e-i*e,this}skew(){return this.clone().skewO(...arguments)}skewO(e,n=e,i=0,s=0){arguments.length===3&&(s=i,i=n,n=e),e=Y3(e),n=Y3(n);const o=Math.tan(e),r=Math.tan(n),{a,b:l,c,d:u,e:d,f:h}=this;return this.a=a+l*o,this.b=l+a*r,this.c=c+u*o,this.d=u+c*r,this.e=d+h*o-s*o,this.f=h+d*r-i*r,this}skewX(e,n,i){return this.skew(e,0,n,i)}skewY(e,n,i){return this.skew(0,e,n,i)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(e){if(Ds.isMatrixLike(e))return new Ds(e).multiplyO(this);const n=Ds.formatTransforms(e),{x:i,y:s}=new Dn(n.ox,n.oy).transform(this),o=new Ds().translateO(n.rx,n.ry).lmultiplyO(this).translateO(-i,-s).scaleO(n.scaleX,n.scaleY).skewO(n.skewX,n.skewY).shearO(n.shear).rotateO(n.theta).translateO(i,s);if(isFinite(n.px)||isFinite(n.py)){const r=new Dn(i,s).transform(o),a=isFinite(n.px)?n.px-r.x:0,l=isFinite(n.py)?n.py-r.y:0;o.translateO(a,l)}return o.translateO(n.tx,n.ty),o}translate(e,n){return this.clone().translateO(e,n)}translateO(e,n){return this.e+=e||0,this.f+=n||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}};function _c(){if(!_c.nodes){const t=Ui().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;_c.nodes={svg:t,path:e}}if(!_c.nodes.svg.node.parentNode){const t=vn.document.body||vn.document.documentElement;_c.nodes.svg.addTo(t)}return _c.nodes}function tj(t){return!(t.width||t.height||t.x||t.y)}yn(ln,"Matrix");let Ys=class Sy{constructor(...e){this.init(...e)}addOffset(){return this.x+=vn.window.pageXOffset,this.y+=vn.window.pageYOffset,new Sy(this)}init(e){return e=typeof e=="string"?e.split(Rl).map(parseFloat):Array.isArray(e)?e:typeof e=="object"?[e.left!=null?e.left:e.x,e.top!=null?e.top:e.y,e.width,e.height]:arguments.length===4?[].slice.call(arguments):[0,0,0,0],this.x=e[0]||0,this.y=e[1]||0,this.width=this.w=e[2]||0,this.height=this.h=e[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return tj(this)}merge(e){const n=Math.min(this.x,e.x),i=Math.min(this.y,e.y),s=Math.max(this.x+this.width,e.x+e.width)-n,o=Math.max(this.y+this.height,e.y+e.height)-i;return new Sy(n,i,s,o)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(e){e instanceof ln||(e=new ln(e));let n=1/0,i=-1/0,s=1/0,o=-1/0;return[new Dn(this.x,this.y),new Dn(this.x2,this.y),new Dn(this.x,this.y2),new Dn(this.x2,this.y2)].forEach(function(r){r=r.transform(e),n=Math.min(n,r.x),i=Math.max(i,r.x),s=Math.min(s,r.y),o=Math.max(o,r.y)}),new Sy(n,s,i-n,o-s)}};function WT(t,e,n){let i;try{if(i=e(t.node),tj(i)&&(s=t.node)!==vn.document&&!(vn.document.documentElement.contains||function(o){for(;o.parentNode;)o=o.parentNode;return o===vn.document}).call(vn.document.documentElement,s))throw new Error("Element not in the dom")}catch{i=n(t)}var s;return i}Qt({viewbox:{viewbox(t,e,n,i){return t==null?new Ys(this.attr("viewBox")):this.attr("viewBox",new Ys(t,e,n,i))},zoom(t,e){let{width:n,height:i}=this.attr(["width","height"]);if((n||i)&&typeof n!="string"&&typeof i!="string"||(n=this.node.clientWidth,i=this.node.clientHeight),!n||!i)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const s=this.viewbox(),o=n/s.width,r=i/s.height,a=Math.min(o,r);if(t==null)return a;let l=a/t;l===1/0&&(l=Number.MAX_SAFE_INTEGER/100),e=e||new Dn(n/2/o+s.x,i/2/r+s.y);const c=new Ys(s).transform(new ln({scale:l,origin:e}));return this.viewbox(c)}}}),yn(Ys,"Box");let Md=class extends Array{constructor(e=[],...n){if(super(e,...n),typeof e=="number")return this;this.length=0,this.push(...e)}};At([Md],{each(t,...e){return typeof t=="function"?this.map((n,i,s)=>t.call(n,n,i,s)):this.map(n=>n[t](...e))},toArray(){return Array.prototype.concat.apply([],this)}});const cbt=["toArray","constructor","each"];function eh(t,e){return new Md(zS((e||vn.document).querySelectorAll(t),function(n){return sr(n)}))}Md.extend=function(t){t=t.reduce((e,n)=>(cbt.includes(n)||n[0]==="_"||(n in Array.prototype&&(e["$"+n]=Array.prototype[n]),e[n]=function(...i){return this.each(n,...i)}),e),{}),At([Md],t)};let ubt=0;const nj={};function sj(t){let e=t.getEventHolder();return e===vn.window&&(e=nj),e.events||(e.events={}),e.events}function YS(t){return t.getEventTarget()}function cl(t,e,n,i,s){const o=n.bind(i||t),r=Ui(t),a=sj(r),l=YS(r);e=Array.isArray(e)?e:e.split(Rl),n._svgjsListenerId||(n._svgjsListenerId=++ubt),e.forEach(function(c){const u=c.split(".")[0],d=c.split(".")[1]||"*";a[u]=a[u]||{},a[u][d]=a[u][d]||{},a[u][d][n._svgjsListenerId]=o,l.addEventListener(u,o,s||!1)})}function dr(t,e,n,i){const s=Ui(t),o=sj(s),r=YS(s);(typeof n!="function"||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Rl)).forEach(function(a){const l=a&&a.split(".")[0],c=a&&a.split(".")[1];let u,d;if(n)o[l]&&o[l][c||"*"]&&(r.removeEventListener(l,o[l][c||"*"][n],i||!1),delete o[l][c||"*"][n]);else if(l&&c){if(o[l]&&o[l][c]){for(d in o[l][c])dr(r,[l,c].join("."),d);delete o[l][c]}}else if(c)for(a in o)for(u in o[a])c===u&&dr(r,[a,c].join("."));else if(l){if(o[l]){for(u in o[l])dr(r,[l,u].join("."));delete o[l]}}else{for(a in o)dr(r,a);(function(h){let f=h.getEventHolder();f===vn.window&&(f=nj),f.events&&(f.events={})})(s)}})}class xv extends US{addEventListener(){}dispatch(e,n,i){return function(s,o,r,a){const l=YS(s);return o instanceof vn.window.Event||(o=new vn.window.CustomEvent(o,{detail:r,cancelable:!0,...a})),l.dispatchEvent(o),o}(this,e,n,i)}dispatchEvent(e){const n=this.getEventHolder().events;if(!n)return!0;const i=n[e.type];for(const s in i)for(const o in i[s])i[s][o](e);return!e.defaultPrevented}fire(e,n,i){return this.dispatch(e,n,i),this}getEventHolder(){return this}getEventTarget(){return this}off(e,n,i){return dr(this,e,n,i),this}on(e,n,i,s){return cl(this,e,n,i,s),this}removeEventListener(){}}function YT(){}yn(xv,"EventTarget");const K3=400,dbt=">",hbt=0,fbt={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Td extends Array{constructor(...e){super(...e),this.init(...e)}clone(){return new this.constructor(this)}init(e){return typeof e=="number"||(this.length=0,this.push(...this.parse(e))),this}parse(e=[]){return e instanceof Array?e:e.trim().split(Rl).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const e=[];return e.push(...this),e}}class Ht{constructor(...e){this.init(...e)}convert(e){return new Ht(this.value,e)}divide(e){return e=new Ht(e),new Ht(this/e,this.unit||e.unit)}init(e,n){return n=Array.isArray(e)?e[1]:n,e=Array.isArray(e)?e[0]:e,this.value=0,this.unit=n||"",typeof e=="number"?this.value=isNaN(e)?0:isFinite(e)?e:e<0?-34e37:34e37:typeof e=="string"?(n=e.match(QU))&&(this.value=parseFloat(n[1]),n[5]==="%"?this.value/=100:n[5]==="s"&&(this.value*=1e3),this.unit=n[5]):e instanceof Ht&&(this.value=e.valueOf(),this.unit=e.unit),this}minus(e){return e=new Ht(e),new Ht(this-e,this.unit||e.unit)}plus(e){return e=new Ht(e),new Ht(this+e,this.unit||e.unit)}times(e){return e=new Ht(e),new Ht(this*e,this.unit||e.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return(this.unit==="%"?~~(1e8*this.value)/1e6:this.unit==="s"?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const pbt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),ij=[];class Wc extends xv{constructor(e,n){super(),this.node=e,this.type=e.nodeName,n&&e!==n&&this.attr(n)}add(e,n){return(e=Ui(e)).removeNamespace&&this.node instanceof vn.window.SVGElement&&e.removeNamespace(),n==null?this.node.appendChild(e.node):e.node!==this.node.childNodes[n]&&this.node.insertBefore(e.node,this.node.childNodes[n]),this}addTo(e,n){return Ui(e).put(this,n)}children(){return new Md(zS(this.node.children,function(e){return sr(e)}))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(e=!0,n=!0){this.writeDataToDom();let i=this.node.cloneNode(e);return n&&(i=JU(i)),new this.constructor(i)}each(e,n){const i=this.children();let s,o;for(s=0,o=i.length;s<o;s++)e.apply(i[s],[s,i]),n&&i[s].each(e,n);return this}element(e,n){return this.put(new Wc(w1(e),n))}first(){return sr(this.node.firstChild)}get(e){return sr(this.node.childNodes[e])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(e){return this.index(e)>=0}html(e,n){return this.xml(e,n,"http://www.w3.org/1999/xhtml")}id(e){return e!==void 0||this.node.id||(this.node.id=ZU(this.type)),this.attr("id",e)}index(e){return[].slice.call(this.node.childNodes).indexOf(e.node)}last(){return sr(this.node.lastChild)}matches(e){const n=this.node,i=n.matches||n.matchesSelector||n.msMatchesSelector||n.mozMatchesSelector||n.webkitMatchesSelector||n.oMatchesSelector||null;return i&&i.call(n,e)}parent(e){let n=this;if(!n.node.parentNode)return null;if(n=sr(n.node.parentNode),!e)return n;do if(typeof e=="string"?n.matches(e):n instanceof e)return n;while(n=sr(n.node.parentNode));return n}put(e,n){return e=Ui(e),this.add(e,n),e}putIn(e,n){return Ui(e).add(this,n)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(e){return this.node.removeChild(e.node),this}replace(e){return e=Ui(e),this.node.parentNode&&this.node.parentNode.replaceChild(e.node,this.node),e}round(e=2,n=null){const i=10**e,s=this.attr(n);for(const o in s)typeof s[o]=="number"&&(s[o]=Math.round(s[o]*i)/i);return this.attr(s),this}svg(e,n){return this.xml(e,n,HS)}toString(){return this.id()}words(e){return this.node.textContent=e,this}wrap(e){const n=this.parent();if(!n)return this.addTo(e);const i=n.index(this);return n.put(e,i).put(this)}writeDataToDom(){return this.each(function(){this.writeDataToDom()}),this}xml(e,n,i){if(typeof e=="boolean"&&(i=n,n=e,e=null),e==null||typeof e=="function"){n=n==null||n,this.writeDataToDom();let a=this;if(e!=null){if(a=sr(a.node.cloneNode(!0)),n){const l=e(a);if(a=l||a,l===!1)return""}a.each(function(){const l=e(this),c=l||this;l===!1?this.remove():l&&this!==c&&this.replace(c)},!0)}return n?a.node.outerHTML:a.node.innerHTML}n=n!=null&&n;const s=w1("wrapper",i),o=vn.document.createDocumentFragment();s.innerHTML=e;for(let a=s.children.length;a--;)o.appendChild(s.firstElementChild);const r=this.parent();return n?this.replace(o)&&r:this.add(o)}}At(Wc,{attr:function(t,e,n){if(t==null){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=jT.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return t}if(t instanceof Array)return t.reduce((i,s)=>(i[s]=this.attr(s),i),{});if(typeof t=="object"&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(e===null)this.node.removeAttribute(t);else{if(e==null)return(e=this.node.getAttribute(t))==null?fbt[t]:jT.test(e)?parseFloat(e):e;typeof(e=ij.reduce((i,s)=>s(t,i,this),e))=="number"?e=new Ht(e):pbt.has(t)&&Ln.isColor(e)?e=new Ln(e):e.constructor===Array&&(e=new Td(e)),t==="leading"?this.leading&&this.leading(e):typeof n=="string"?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||t!=="font-size"&&t!=="x"||this.rebuild()}return this},find:function(t){return eh(t,this.node)},findOne:function(t){return sr(this.node.querySelector(t))}}),yn(Wc,"Dom");let mi=class extends Wc{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return t==null?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return t==null?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new Ht(t).plus(this.x()))}dy(t=0){return this.y(new Ht(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e=typeof t=="string";e||(t=Ui(t));const n=new Md;let i=this;for(;(i=i.parent())&&i.node!==vn.document&&i.nodeName!=="#document-fragment"&&(n.push(i),e||i.node!==t.node)&&(!e||!i.matches(t));)if(i.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(ibt);return e?Ui(e[1]):null}root(){const t=this.parent(function(e){return ud[e]}(jS));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=Vp(this,t,e);return this.width(new Ht(n.width)).height(new Ht(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return KU(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}};At(mi,{bbox:function(){const t=WT(this,e=>e.getBBox(),e=>{try{const n=e.clone().addTo(_c().svg).show(),i=n.node.getBBox();return n.remove(),i}catch(n){throw new Error(`Getting bbox of element "${e.node.nodeName}" is not possible: ${n.toString()}`)}});return new Ys(t)},rbox:function(t){const e=WT(this,i=>i.getBoundingClientRect(),i=>{throw new Error(`Getting rbox of element "${i.node.nodeName}" is not possible`)}),n=new Ys(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new Dn(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new ln(this.node.getCTM())},screenCTM:function(){try{if(typeof this.isRoot=="function"&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new ln(e)}return new ln(this.node.getScreenCTM())}catch{return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new ln}}}),yn(mi,"Element");const sm={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return e==="color"?t:t+"-"+e}};["fill","stroke"].forEach(function(t){const e={};let n;e[t]=function(i){if(i===void 0)return this.attr(t);if(typeof i=="string"||i instanceof Ln||Ln.isRgb(i)||i instanceof mi)this.attr(t,i);else for(n=sm[t].length-1;n>=0;n--)i[sm[t][n]]!=null&&this.attr(sm.prefix(t,sm[t][n]),i[sm[t][n]]);return this},Qt(["Element","Runner"],e)}),Qt(["Element","Runner"],{matrix:function(t,e,n,i,s,o){return t==null?new ln(this):this.attr("transform",new ln(t,e,n,i,s,o))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,i){return arguments.length===1||arguments.length===3?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:i},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,i){return arguments.length===1||arguments.length===3?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:i},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return"xybothtrue".indexOf(t)===-1&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),Qt("radius",{radius:function(t,e=t){return(this._element||this).type==="radialGradient"?this.attr("r",new Ht(t)):this.rx(t).ry(e)}}),Qt("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Dn(this.node.getPointAtLength(t))}}),Qt(["Element","Runner"],{font:function(t,e){if(typeof t=="object"){for(e in t)this.font(e,t[e]);return this}return t==="leading"?this.leading(e):t==="anchor"?this.attr("text-anchor",e):t==="size"||t==="family"||t==="weight"||t==="stretch"||t==="variant"||t==="style"?this.attr("font-"+t,e):this.attr(t,e)}});Qt("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce(function(t,e){return t[e]=function(n){return n===null?this.off(e):this.on(e,n),this},t},{})),Qt("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(obt).slice(0,-1).map(function(e){const n=e.trim().split("(");return[n[0],n[1].split(Rl).map(function(i){return parseFloat(i)})]}).reverse().reduce(function(e,n){return n[0]==="matrix"?e.lmultiply(ln.fromArray(n[1])):e[n[0]].apply(e,n[1])},new ln)},toParent:function(t,e){if(this===t)return this;if(Wx(this.node))return this.addTo(t,e);const n=this.screenCTM(),i=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(i.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(t==null||typeof t=="string"){const i=new ln(this).decompose();return t==null?i:i[t]}ln.isMatrixLike(t)||(t={...t,origin:jx(t,this)});const n=new ln(e===!0?this:e||!1).transform(t);return this.attr("transform",n)}});class Ji extends mi{flatten(){return this.each(function(){if(this instanceof Ji)return this.flatten().ungroup()}),this}ungroup(e=this.parent(),n=e.index(this)){return n=n===-1?e.children().length:n,this.each(function(i,s){return s[s.length-i-1].toParent(e,n)}),this.remove()}}yn(Ji,"Container");class Q2 extends Ji{constructor(e,n=e){super(Bn("defs",e),n)}flatten(){return this}ungroup(){return this}}yn(Q2,"Defs");class Xo extends mi{}function qS(t){return this.attr("rx",t)}function GS(t){return this.attr("ry",t)}function oj(t){return t==null?this.cx()-this.rx():this.cx(t+this.rx())}function rj(t){return t==null?this.cy()-this.ry():this.cy(t+this.ry())}function aj(t){return this.attr("cx",t)}function lj(t){return this.attr("cy",t)}function cj(t){return t==null?2*this.rx():this.rx(new Ht(t).divide(2))}function uj(t){return t==null?2*this.ry():this.ry(new Ht(t).divide(2))}yn(Xo,"Shape");var mbt=Object.freeze({__proto__:null,cx:aj,cy:lj,height:uj,rx:qS,ry:GS,width:cj,x:oj,y:rj});class $y extends Xo{constructor(e,n=e){super(Bn("ellipse",e),n)}size(e,n){const i=Vp(this,e,n);return this.rx(new Ht(i.width).divide(2)).ry(new Ht(i.height).divide(2))}}At($y,mbt),Qt("Container",{ellipse:Nn(function(t=0,e=t){return this.put(new $y).size(t,e).move(0,0)})}),yn($y,"Ellipse");class dj extends Wc{constructor(e=vn.document.createDocumentFragment()){super(e)}xml(e,n,i){if(typeof e=="boolean"&&(i=n,n=e,e=null),e==null||typeof e=="function"){const s=new Wc(w1("wrapper",i));return s.add(this.node.cloneNode(!0)),s.xml(!1,i)}return super.xml(e,!1,i)}}function hj(t,e){return(this._element||this).type==="radialGradient"?this.attr({fx:new Ht(t),fy:new Ht(e)}):this.attr({x1:new Ht(t),y1:new Ht(e)})}function fj(t,e){return(this._element||this).type==="radialGradient"?this.attr({cx:new Ht(t),cy:new Ht(e)}):this.attr({x2:new Ht(t),y2:new Ht(e)})}yn(dj,"Fragment");var gbt=Object.freeze({__proto__:null,from:hj,to:fj});class wg extends Ji{constructor(e,n){super(Bn(e+"Gradient",typeof e=="string"?null:e),n)}attr(e,n,i){return e==="transform"&&(e="gradientTransform"),super.attr(e,n,i)}bbox(){return new Ys}targets(){return eh("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(e){return this.clear(),typeof e=="function"&&e.call(this,this),this}url(){return"url(#"+this.id()+")"}}At(wg,gbt),Qt({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:Nn(function(t,e){return this.put(new wg(t)).update(e)})}}),yn(wg,"Gradient");class k1 extends Ji{constructor(e,n=e){super(Bn("pattern",e),n)}attr(e,n,i){return e==="transform"&&(e="patternTransform"),super.attr(e,n,i)}bbox(){return new Ys}targets(){return eh("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(e){return this.clear(),typeof e=="function"&&e.call(this,this),this}url(){return"url(#"+this.id()+")"}}Qt({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:Nn(function(t,e,n){return this.put(new k1).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})})}}),yn(k1,"Pattern");let Ay=class extends Xo{constructor(t,e=t){super(Bn("image",t),e)}load(t,e){if(!t)return this;const n=new vn.window.Image;return cl(n,"load",function(i){const s=this.parent(k1);this.width()===0&&this.height()===0&&this.size(n.width,n.height),s instanceof k1&&s.width()===0&&s.height()===0&&s.size(this.width(),this.height()),typeof e=="function"&&e.call(this,i)},this),cl(n,"load error",function(){dr(n)}),this.attr("href",n.src=t,Fp)}};var qT;qT=function(t,e,n){return t!=="fill"&&t!=="stroke"||abt.test(e)&&(e=n.root().defs().image(e)),e instanceof Ay&&(e=n.root().defs().pattern(0,0,i=>{i.add(e)})),e},ij.push(qT),Qt({Container:{image:Nn(function(t,e){return this.put(new Ay).size(0,0).load(t,e)})}}),yn(Ay,"Image");class Yc extends Td{bbox(){let e=-1/0,n=-1/0,i=1/0,s=1/0;return this.forEach(function(o){e=Math.max(o[0],e),n=Math.max(o[1],n),i=Math.min(o[0],i),s=Math.min(o[1],s)}),new Ys(i,s,e-i,n-s)}move(e,n){const i=this.bbox();if(e-=i.x,n-=i.y,!isNaN(e)&&!isNaN(n))for(let s=this.length-1;s>=0;s--)this[s]=[this[s][0]+e,this[s][1]+n];return this}parse(e=[0,0]){const n=[];(e=e instanceof Array?Array.prototype.concat.apply([],e):e.trim().split(Rl).map(parseFloat)).length%2!=0&&e.pop();for(let i=0,s=e.length;i<s;i+=2)n.push([e[i],e[i+1]]);return n}size(e,n){let i;const s=this.bbox();for(i=this.length-1;i>=0;i--)s.width&&(this[i][0]=(this[i][0]-s.x)*e/s.width+s.x),s.height&&(this[i][1]=(this[i][1]-s.y)*n/s.height+s.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const e=[];for(let n=0,i=this.length;n<i;n++)e.push(this[n].join(","));return e.join(" ")}transform(e){return this.clone().transformO(e)}transformO(e){ln.isMatrixLike(e)||(e=new ln(e));for(let n=this.length;n--;){const[i,s]=this[n];this[n][0]=e.a*i+e.c*s+e.e,this[n][1]=e.b*i+e.d*s+e.f}return this}}const vbt=Yc;var XS=Object.freeze({__proto__:null,MorphArray:vbt,height:function(t){const e=this.bbox();return t==null?e.height:this.size(e.width,t)},width:function(t){const e=this.bbox();return t==null?e.width:this.size(t,e.height)},x:function(t){return t==null?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return t==null?this.bbox().y:this.move(this.bbox().x,t)}});let ju=class extends Xo{constructor(t,e=t){super(Bn("line",t),e)}array(){return new Yc([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,i){return t==null?this.array():(t=e!==void 0?{x1:t,y1:e,x2:n,y2:i}:new Yc(t).toLine(),this.attr(t))}size(t,e){const n=Vp(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}};At(ju,XS),Qt({Container:{line:Nn(function(...t){return ju.prototype.plot.apply(this.put(new ju),t[0]!=null?t:[0,0,0,0])})}}),yn(ju,"Line");let Ey=class extends Ji{constructor(t,e=t){super(Bn("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),typeof t=="function"&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}};function Xh(t,e){return function(n){return n==null?this[t]:(this[t]=n,e&&e.call(this),this)}}Qt({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:Nn(function(t,e,n){return this.put(new Ey).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)})},marker:{marker(t,e,n,i){let s=["marker"];return t!=="all"&&s.push(t),s=s.join("-"),t=arguments[1]instanceof Ey?arguments[1]:this.defs().marker(e,n,i),this.attr(s,t)}}}),yn(Ey,"Marker");const _bt={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,i){return function(s){return s<0?t>0?e/t*s:n>0?i/n*s:0:s>1?n<1?(1-i)/(1-n)*s+(i-n)/(1-n):t<1?(1-e)/(1-t)*s+(e-t)/(1-t):1:3*s*(1-s)**2*e+3*s**2*(1-s)*i+s**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return e==="none"?--n:e==="both"&&++n,(i,s=!1)=>{let o=Math.floor(i*t);const r=i*o%1==0;return e!=="start"&&e!=="both"||++o,s&&r&&--o,i>=0&&o<0&&(o=0),i<=1&&o>n&&(o=n),o/n}}};class KS{done(){return!1}}class Yx extends KS{constructor(e=dbt){super(),this.ease=_bt[e]||e}step(e,n,i){return typeof e!="number"?i<1?e:n:e+(n-e)*this.ease(i)}}class ib extends KS{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,n,i,s){return this.stepper(e,n,i,s)}}function GT(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,i=Math.log(e/100+1e-10),s=-i/Math.sqrt(n*n+i*i),o=3.9/(s*t);this.d=2*s*o,this.k=o*o}At(class extends ib{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,i){if(typeof t=="string")return t;if(i.done=n===1/0,n===1/0)return e;if(n===0)return t;n>100&&(n=16),n/=1e3;const s=i.velocity||0,o=-this.d*s-this.k*(t-e),r=t+s*n+o*n*n/2;return i.velocity=s+o*n,i.done=Math.abs(e-r)+Math.abs(s)<.002,i.done?e:r}},{duration:Xh("_duration",GT),overshoot:Xh("_overshoot",GT)});At(class extends ib{constructor(t=.1,e=.01,n=0,i=1e3){super(),this.p(t).i(e).d(n).windup(i)}step(t,e,n,i){if(typeof t=="string")return t;if(i.done=n===1/0,n===1/0)return e;if(n===0)return t;const s=e-t;let o=(i.integral||0)+s*n;const r=(s-(i.error||0))/n,a=this._windup;return a!==!1&&(o=Math.max(-a,Math.min(o,a))),i.error=s,i.integral=o,i.done=Math.abs(s)<.001,i.done?e:t+(this.P*s+this.I*o+this.D*r)}},{windup:Xh("_windup"),p:Xh("P"),i:Xh("I"),d:Xh("D")});const ybt={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},qx={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Z3="mlhvqtcsaz".split("");for(let t=0,e=Z3.length;t<e;++t)qx[Z3[t]]=function(n){return function(i,s,o){if(n==="H")i[0]=i[0]+s.x;else if(n==="V")i[0]=i[0]+s.y;else if(n==="A")i[5]=i[5]+s.x,i[6]=i[6]+s.y;else for(let r=0,a=i.length;r<a;++r)i[r]=i[r]+(r%2?s.y:s.x);return qx[n](i,s,o)}}(Z3[t].toUpperCase());function Gx(t){return t.segment.length&&t.segment.length-1===ybt[t.segment[0].toUpperCase()]}function bbt(t,e){t.inNumber&&Tu(t,!1);const n=WS.test(e);if(n)t.segment=[e];else{const i=t.lastCommand,s=i.toLowerCase(),o=i===s;t.segment=[s==="m"?o?"l":"L":i]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function Tu(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,Gx(t)&&Xx(t)}function Xx(t){t.inSegment=!1,t.absolute&&(t.segment=function(e){const n=e.segment[0];return qx[n](e.segment.slice(1),e.p,e.p0)}(t)),t.segments.push(t.segment)}function wbt(t){if(!t.segment.length)return!1;const e=t.segment[0].toUpperCase()==="A",n=t.segment.length;return e&&(n===4||n===5)}function kbt(t){return t.lastToken.toUpperCase()==="E"}const Cbt=new Set([" ",","," ",`
143 +`,"\r","\f"]);class Vr extends Td{bbox(){return _c().path.setAttribute("d",this.toString()),new Ys(_c.nodes.path.getBBox())}move(e,n){const i=this.bbox();if(e-=i.x,n-=i.y,!isNaN(e)&&!isNaN(n))for(let s,o=this.length-1;o>=0;o--)s=this[o][0],s==="M"||s==="L"||s==="T"?(this[o][1]+=e,this[o][2]+=n):s==="H"?this[o][1]+=e:s==="V"?this[o][1]+=n:s==="C"||s==="S"||s==="Q"?(this[o][1]+=e,this[o][2]+=n,this[o][3]+=e,this[o][4]+=n,s==="C"&&(this[o][5]+=e,this[o][6]+=n)):s==="A"&&(this[o][6]+=e,this[o][7]+=n);return this}parse(e="M0 0"){return Array.isArray(e)&&(e=Array.prototype.concat.apply([],e).toString()),function(n,i=!0){let s=0,o="";const r={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:i,p0:new Dn,p:new Dn};for(;r.lastToken=o,o=n.charAt(s++);)if(r.inSegment||!bbt(r,o))if(o!==".")if(isNaN(parseInt(o)))if(Cbt.has(o))r.inNumber&&Tu(r,!1);else if(o!=="-"&&o!=="+")if(o.toUpperCase()!=="E"){if(WS.test(o)){if(r.inNumber)Tu(r,!1);else{if(!Gx(r))throw new Error("parser Error");Xx(r)}--s}}else r.number+=o,r.hasExponent=!0;else{if(r.inNumber&&!kbt(r)){Tu(r,!1),--s;continue}r.number+=o,r.inNumber=!0}else{if(r.number==="0"||wbt(r)){r.inNumber=!0,r.number=o,Tu(r,!0);continue}r.inNumber=!0,r.number+=o}else{if(r.pointSeen||r.hasExponent){Tu(r,!1),--s;continue}r.inNumber=!0,r.pointSeen=!0,r.number+=o}return r.inNumber&&Tu(r,!1),r.inSegment&&Gx(r)&&Xx(r),r.segments}(e)}size(e,n){const i=this.bbox();let s,o;for(i.width=i.width===0?1:i.width,i.height=i.height===0?1:i.height,s=this.length-1;s>=0;s--)o=this[s][0],o==="M"||o==="L"||o==="T"?(this[s][1]=(this[s][1]-i.x)*e/i.width+i.x,this[s][2]=(this[s][2]-i.y)*n/i.height+i.y):o==="H"?this[s][1]=(this[s][1]-i.x)*e/i.width+i.x:o==="V"?this[s][1]=(this[s][1]-i.y)*n/i.height+i.y:o==="C"||o==="S"||o==="Q"?(this[s][1]=(this[s][1]-i.x)*e/i.width+i.x,this[s][2]=(this[s][2]-i.y)*n/i.height+i.y,this[s][3]=(this[s][3]-i.x)*e/i.width+i.x,this[s][4]=(this[s][4]-i.y)*n/i.height+i.y,o==="C"&&(this[s][5]=(this[s][5]-i.x)*e/i.width+i.x,this[s][6]=(this[s][6]-i.y)*n/i.height+i.y)):o==="A"&&(this[s][1]=this[s][1]*e/i.width,this[s][2]=this[s][2]*n/i.height,this[s][6]=(this[s][6]-i.x)*e/i.width+i.x,this[s][7]=(this[s][7]-i.y)*n/i.height+i.y);return this}toString(){return function(e){let n="";for(let i=0,s=e.length;i<s;i++)n+=e[i][0],e[i][1]!=null&&(n+=e[i][1],e[i][2]!=null&&(n+=" ",n+=e[i][2],e[i][3]!=null&&(n+=" ",n+=e[i][3],n+=" ",n+=e[i][4],e[i][5]!=null&&(n+=" ",n+=e[i][5],n+=" ",n+=e[i][6],e[i][7]!=null&&(n+=" ",n+=e[i][7])))));return n+" "}(this)}}const pj=t=>{const e=typeof t;return e==="number"?Ht:e==="string"?Ln.isColor(t)?Ln:Rl.test(t)?WS.test(t)?Vr:Td:QU.test(t)?Ht:Kx:Zx.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Td:e==="object"?C1:Kx};class Pu{constructor(e){this._stepper=e||new Yx("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(e){return this._morphObj.morph(this._from,this._to,e,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce(function(e,n){return e&&n},!0)}from(e){return e==null?this._from:(this._from=this._set(e),this)}stepper(e){return e==null?this._stepper:(this._stepper=e,this)}to(e){return e==null?this._to:(this._to=this._set(e),this)}type(e){return e==null?this._type:(this._type=e,this)}_set(e){this._type||this.type(pj(e));let n=new this._type(e);return this._type===Ln&&(n=this._to?n[this._to[4]]():this._from?n[this._from[4]]():n),this._type===C1&&(n=this._to?n.align(this._to):this._from?n.align(this._from):n),n=n.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(n.length)).map(Object).map(function(i){return i.done=!0,i}),n}}class Kx{constructor(...e){this.init(...e)}init(e){return e=Array.isArray(e)?e[0]:e,this.value=e,this}toArray(){return[this.value]}valueOf(){return this.value}}class Sv{constructor(...e){this.init(...e)}init(e){return Array.isArray(e)&&(e={scaleX:e[0],scaleY:e[1],shear:e[2],rotate:e[3],translateX:e[4],translateY:e[5],originX:e[6],originY:e[7]}),Object.assign(this,Sv.defaults,e),this}toArray(){const e=this;return[e.scaleX,e.scaleY,e.shear,e.rotate,e.translateX,e.translateY,e.originX,e.originY]}}Sv.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const xbt=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class C1{constructor(...e){this.init(...e)}align(e){const n=this.values;for(let i=0,s=n.length;i<s;++i){if(n[i+1]===e[i+1]){if(n[i+1]===Ln&&e[i+7]!==n[i+7]){const a=e[i+7],l=new Ln(this.values.splice(i+3,5))[a]().toArray();this.values.splice(i+3,0,...l)}i+=n[i+2]+2;continue}if(!e[i+1])return this;const o=new e[i+1]().toArray(),r=n[i+2]+3;n.splice(i,r,e[i],e[i+1],e[i+2],...o),i+=n[i+2]+2}return this}init(e){if(this.values=[],Array.isArray(e))return void(this.values=e.slice());e=e||{};const n=[];for(const i in e){const s=pj(e[i]),o=new s(e[i]).toArray();n.push([i,s,o.length,...o])}return n.sort(xbt),this.values=n.reduce((i,s)=>i.concat(s),[]),this}toArray(){return this.values}valueOf(){const e={},n=this.values;for(;n.length;){const i=n.shift(),s=n.shift(),o=n.shift(),r=n.splice(0,o);e[i]=new s(r)}return e}}const Zx=[Kx,Sv,C1];class bf extends Xo{constructor(e,n=e){super(Bn("path",e),n)}array(){return this._array||(this._array=new Vr(this.attr("d")))}clear(){return delete this._array,this}height(e){return e==null?this.bbox().height:this.size(this.bbox().width,e)}move(e,n){return this.attr("d",this.array().move(e,n))}plot(e){return e==null?this.array():this.clear().attr("d",typeof e=="string"?e:this._array=new Vr(e))}size(e,n){const i=Vp(this,e,n);return this.attr("d",this.array().size(i.width,i.height))}width(e){return e==null?this.bbox().width:this.size(e,this.bbox().height)}x(e){return e==null?this.bbox().x:this.move(e,this.bbox().y)}y(e){return e==null?this.bbox().y:this.move(this.bbox().x,e)}}bf.prototype.MorphArray=Vr,Qt({Container:{path:Nn(function(t){return this.put(new bf).plot(t||new Vr)})}}),yn(bf,"Path");var mj=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new Yc(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return t==null?this.array():this.clear().attr("points",typeof t=="string"?t:this._array=new Yc(t))},size:function(t,e){const n=Vp(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}});class Wu extends Xo{constructor(e,n=e){super(Bn("polygon",e),n)}}Qt({Container:{polygon:Nn(function(t){return this.put(new Wu).plot(t||new Yc)})}}),At(Wu,XS),At(Wu,mj),yn(Wu,"Polygon");class Yu extends Xo{constructor(e,n=e){super(Bn("polyline",e),n)}}Qt({Container:{polyline:Nn(function(t){return this.put(new Yu).plot(t||new Yc)})}}),At(Yu,XS),At(Yu,mj),yn(Yu,"Polyline");class My extends Xo{constructor(e,n=e){super(Bn("rect",e),n)}}At(My,{rx:qS,ry:GS}),Qt({Container:{rect:Nn(function(t,e){return this.put(new My).size(t,e)})}}),yn(My,"Rect");class J3{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(e){const n=e.next!==void 0?e:{value:e,next:null,prev:null};return this._last?(n.prev=this._last,this._last.next=n,this._last=n):(this._last=n,this._first=n),n}remove(e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e===this._last&&(this._last=e.prev),e===this._first&&(this._first=e.next),e.prev=null,e.next=null}shift(){const e=this._first;return e?(this._first=e.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,e.value):null}}const Tn={nextDraw:null,frames:new J3,timeouts:new J3,immediates:new J3,timer:()=>vn.window.performance||vn.window.Date,transforms:[],frame(t){const e=Tn.frames.push({run:t});return Tn.nextDraw===null&&(Tn.nextDraw=vn.window.requestAnimationFrame(Tn._draw)),e},timeout(t,e){e=e||0;const n=Tn.timer().now()+e,i=Tn.timeouts.push({run:t,time:n});return Tn.nextDraw===null&&(Tn.nextDraw=vn.window.requestAnimationFrame(Tn._draw)),i},immediate(t){const e=Tn.immediates.push(t);return Tn.nextDraw===null&&(Tn.nextDraw=vn.window.requestAnimationFrame(Tn._draw)),e},cancelFrame(t){t!=null&&Tn.frames.remove(t)},clearTimeout(t){t!=null&&Tn.timeouts.remove(t)},cancelImmediate(t){t!=null&&Tn.immediates.remove(t)},_draw(t){let e=null;const n=Tn.timeouts.last();for(;(e=Tn.timeouts.shift())&&(t>=e.time?e.run():Tn.timeouts.push(e),e!==n););let i=null;const s=Tn.frames.last();for(;i!==s&&(i=Tn.frames.shift());)i.run(t);let o=null;for(;o=Tn.immediates.shift();)o();Tn.nextDraw=Tn.timeouts.first()||Tn.frames.first()?vn.window.requestAnimationFrame(Tn._draw):null}},Sbt=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},$bt=function(){const t=vn.window;return(t.performance||t.Date).now()};class gj extends xv{constructor(e=$bt){super(),this._timeSource=e,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const e=this.getLastRunnerInfo(),n=e?e.runner.duration():0;return(e?e.start:this._time)+n}getEndTimeOfTimeline(){const e=this._runners.map(n=>n.start+n.runner.duration());return Math.max(0,...e)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(e){return this._runners[this._runnerIds.indexOf(e)]||null}pause(){return this._paused=!0,this._continue()}persist(e){return e==null?this._persist:(this._persist=e,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(e){const n=this.speed();if(e==null)return this.speed(-n);const i=Math.abs(n);return this.speed(e?-i:i)}schedule(e,n,i){if(e==null)return this._runners.map(Sbt);let s=0;const o=this.getEndTime();if(n=n||0,i==null||i==="last"||i==="after")s=o;else if(i==="absolute"||i==="start")s=n,n=0;else if(i==="now")s=this._time;else if(i==="relative"){const l=this.getRunnerInfoById(e.id);l&&(s=l.start+n,n=0)}else{if(i!=="with-last")throw new Error('Invalid value for the "when" parameter');{const l=this.getLastRunnerInfo();s=l?l.start:this._time}}e.unschedule(),e.timeline(this);const r=e.persist(),a={persist:r===null?this._persist:r,start:s+n,runner:e};return this._lastRunnerId=e.id,this._runners.push(a),this._runners.sort((l,c)=>l.start-c.start),this._runnerIds=this._runners.map(l=>l.runner.id),this.updateTime()._continue(),this}seek(e){return this.time(this._time+e)}source(e){return e==null?this._timeSource:(this._timeSource=e,this)}speed(e){return e==null?this._speed:(this._speed=e,this)}stop(){return this.time(0),this.pause()}time(e){return e==null?this._time:(this._time=e,this._continue(!0))}unschedule(e){const n=this._runnerIds.indexOf(e.id);return n<0||(this._runners.splice(n,1),this._runnerIds.splice(n,1),e.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(e=!1){return Tn.cancelFrame(this._nextFrame),this._nextFrame=null,e?this._stepImmediate():(this._paused||(this._nextFrame=Tn.frame(this._step)),this)}_stepFn(e=!1){const n=this._timeSource();let i=n-this._lastSourceTime;e&&(i=0);const s=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=n,e||(this._time+=s,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let r=this._runners.length;r--;){const a=this._runners[r],l=a.runner;this._time-a.start<=0&&l.reset()}let o=!1;for(let r=0,a=this._runners.length;r<a;r++){const l=this._runners[r],c=l.runner;let u=s;const d=this._time-l.start;if(d<=0){o=!0;continue}d<u&&(u=d),c.active()&&(c.step(u).done?l.persist!==!0&&c.duration()-c.time()+this._time+l.persist<this._time&&(c.unschedule(),--r,--a):o=!0)}return o&&!(this._speed<0&&this._time===0)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}Qt({Element:{timeline:function(t){return t==null?(this._timeline=this._timeline||new gj,this._timeline):(this._timeline=t,this)}}});class zo extends xv{constructor(e){super(),this.id=zo.id++,e=typeof(e=e??K3)=="function"?new ib(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration=typeof e=="number"&&e,this._isDeclarative=e instanceof ib,this._stepper=this._isDeclarative?e:new Yx,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new ln,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(e,n,i){let s=1,o=!1,r=0;return n=n??hbt,i=i||"last",typeof(e=e??K3)!="object"||e instanceof KS||(n=e.delay??n,i=e.when??i,o=e.swing||o,s=e.times??s,r=e.wait??r,e=e.duration??K3),{duration:e,delay:n,swing:o,times:s,wait:r,when:i}}active(e){return e==null?this.enabled:(this.enabled=e,this)}addTransform(e){return this.transforms.lmultiplyO(e),this}after(e){return this.on("finished",e)}animate(e,n,i){const s=zo.sanitise(e,n,i),o=new zo(s.duration);return this._timeline&&o.timeline(this._timeline),this._element&&o.element(this._element),o.loop(s).schedule(s.delay,s.when)}clearTransform(){return this.transforms=new ln,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter(e=>!e.isTransform))}delay(e){return this.animate(0,e)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(e){return this.queue(null,e)}ease(e){return this._stepper=new Yx(e),this}element(e){return e==null?this._element:(this._element=e,e._prepareRunner(),this)}finish(){return this.step(1/0)}loop(e,n,i){return typeof e=="object"&&(n=e.swing,i=e.wait,e=e.times),this._times=e||1/0,this._swing=n||!1,this._wait=i||0,this._times===!0&&(this._times=1/0),this}loops(e){const n=this._duration+this._wait;if(e==null){const o=Math.floor(this._time/n),r=(this._time-o*n)/this._duration;return Math.min(o+r,this._times)}const i=e%1,s=n*Math.floor(e)+this._duration*i;return this.time(s)}persist(e){return e==null?this._persist:(this._persist=e,this)}position(e){const n=this._time,i=this._duration,s=this._wait,o=this._times,r=this._swing,a=this._reverse;let l;if(e==null){const d=function(f){const p=r*Math.floor(f%(2*(s+i))/(s+i)),m=p&&!a||!p&&a,b=Math.pow(-1,m)*(f%(s+i))/i+m;return Math.max(Math.min(b,1),0)},h=o*(s+i)-s;return l=n<=0?Math.round(d(1e-5)):n<h?d(n):Math.round(d(h-1e-5)),l}const c=Math.floor(this.loops()),u=r&&c%2==0;return l=c+(u&&!a||a&&u?e:1-e),this.loops(l)}progress(e){return e==null?Math.min(1,this._time/this.duration()):this.time(e*this.duration())}queue(e,n,i,s){return this._queue.push({initialiser:e||YT,runner:n||YT,retarget:i,isTransform:s,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(e){return this._reverse=e??!this._reverse,this}schedule(e,n,i){if(e instanceof gj||(i=n,n=e,e=this.timeline()),!e)throw Error("Runner cannot be scheduled without timeline");return e.schedule(this,n,i),this}step(e){if(!this.enabled)return this;e=e??16,this._time+=e;const n=this.position(),i=this._lastPosition!==n&&this._time>=0;this._lastPosition=n;const s=this.duration(),o=this._lastTime<=0&&this._time>0,r=this._lastTime<s&&this._time>=s;this._lastTime=this._time,o&&this.fire("start",this);const a=this._isDeclarative;this.done=!a&&!r&&this._time>=s,this._reseted=!1;let l=!1;return(i||a)&&(this._initialise(i),this.transforms=new ln,l=this._run(a?e:n),this.fire("step",this)),this.done=this.done||l&&a,r&&this.fire("finished",this),this}time(e){if(e==null)return this._time;const n=e-this._time;return this.step(n),this}timeline(e){return e===void 0?this._timeline:(this._timeline=e,this)}unschedule(){const e=this.timeline();return e&&e.unschedule(this),this}_initialise(e){if(e||this._isDeclarative)for(let n=0,i=this._queue.length;n<i;++n){const s=this._queue[n],o=this._isDeclarative||!s.initialised&&e;e=!s.finished,o&&e&&(s.initialiser.call(this),s.initialised=!0)}}_rememberMorpher(e,n){if(this._history[e]={morpher:n,caller:this._queue[this._queue.length-1]},this._isDeclarative){const i=this.timeline();i&&i.play()}}_run(e){let n=!0;for(let i=0,s=this._queue.length;i<s;++i){const o=this._queue[i],r=o.runner.call(this,e);o.finished=o.finished||r===!0,n=n&&o.finished}return n}_tryRetarget(e,n,i){if(this._history[e]){if(!this._history[e].caller.initialised){const o=this._queue.indexOf(this._history[e].caller);return this._queue.splice(o,1),!1}this._history[e].caller.retarget?this._history[e].caller.retarget.call(this,n,i):this._history[e].morpher.to(n),this._history[e].caller.finished=!1;const s=this.timeline();return s&&s.play(),!0}return!1}}zo.id=0;class ob{constructor(e=new ln,n=-1,i=!0){this.transforms=e,this.id=n,this.done=i}clearTransformsFromQueue(){}}At([zo,ob],{mergeWith(t){return new ob(t.transforms.lmultiply(this.transforms),t.id)}});const vj=(t,e)=>t.lmultiplyO(e),_j=t=>t.transforms;function Abt(){const t=this._transformationRunners.runners.map(_j).reduce(vj,new ln);this.transform(t),this._transformationRunners.merge(),this._transformationRunners.length()===1&&(this._frameId=null)}class Ebt{constructor(){this.runners=[],this.ids=[]}add(e){if(this.runners.includes(e))return;const n=e.id+1;return this.runners.push(e),this.ids.push(n),this}clearBefore(e){const n=this.ids.indexOf(e+1)||1;return this.ids.splice(0,n,0),this.runners.splice(0,n,new ob).forEach(i=>i.clearTransformsFromQueue()),this}edit(e,n){const i=this.ids.indexOf(e+1);return this.ids.splice(i,1,e+1),this.runners.splice(i,1,n),this}getByID(e){return this.runners[this.ids.indexOf(e+1)]}length(){return this.ids.length}merge(){let e=null;for(let n=0;n<this.runners.length;++n){const i=this.runners[n];if(e&&i.done&&e.done&&(!i._timeline||!i._timeline._runnerIds.includes(i.id))&&(!e._timeline||!e._timeline._runnerIds.includes(e.id))){this.remove(i.id);const s=i.mergeWith(e);this.edit(e.id,s),e=s,--n}else e=i}return this}remove(e){const n=this.ids.indexOf(e+1);return this.ids.splice(n,1),this.runners.splice(n,1),this}}Qt({Element:{animate(t,e,n){const i=zo.sanitise(t,e,n),s=this.timeline();return new zo(i.duration).loop(i).element(this).timeline(s.play()).schedule(i.delay,i.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter(e=>e.id<=t.id).map(_j).reduce(vj,new ln)},_addRunner(t){this._transformationRunners.add(t),Tn.cancelImmediate(this._frameId),this._frameId=Tn.immediate(Abt.bind(this))},_prepareRunner(){this._frameId==null&&(this._transformationRunners=new Ebt().add(new ob(new ln(this))))}}});At(zo,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if(typeof e=="string")return this.styleAttr(t,{[e]:n});let i=e;if(this._tryRetarget(t,i))return this;let s=new Pu(this._stepper).to(i),o=Object.keys(i);return this.queue(function(){s=s.from(this.element()[t](o))},function(r){return this.element()[t](s.at(r).valueOf()),s.done()},function(r){const a=Object.keys(r),l=(c=o,a.filter(d=>!c.includes(d)));var c;if(l.length){const d=this.element()[t](l),h=new C1(s.from()).valueOf();Object.assign(h,d),s.from(h)}const u=new C1(s.to()).valueOf();Object.assign(u,r),s.to(u),o=a,i=r}),this._rememberMorpher(t,s),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new Pu(this._stepper).to(new Ht(t));return this.queue(function(){n=n.from(this.element().zoom())},function(i){return this.element().zoom(n.at(i),e),n.done()},function(i,s){e=s,n.to(i)}),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const i=ln.isMatrixLike(t);n=t.affine!=null?t.affine:n??!i;const s=new Pu(this._stepper).type(n?Sv:ln);let o,r,a,l,c;return this.queue(function(){r=r||this.element(),o=o||jx(t,r),c=new ln(e?void 0:r),r._addRunner(this),e||r._clearTransformRunnersBefore(this)},function(u){e||this.clearTransform();const{x:d,y:h}=new Dn(o).transform(r._currentTransform(this));let f=new ln({...t,origin:[d,h]}),p=this._isDeclarative&&a?a:c;if(n){f=f.decompose(d,h),p=p.decompose(d,h);const b=f.rotate,w=p.rotate,k=[b-360,b,b+360],C=k.map(M=>Math.abs(M-w)),A=Math.min(...C),S=C.indexOf(A);f.rotate=k[S]}e&&(i||(f.rotate=t.rotate||0),this._isDeclarative&&l&&(p.rotate=l)),s.from(p),s.to(f);const m=s.at(u);return l=m.rotate,a=new ln(m),this.addTransform(a),r._addRunner(this),s.done()},function(u){(u.origin||"center").toString()!==(t.origin||"center").toString()&&(o=jx(u,r)),t={...u,origin:o}},!0),this._isDeclarative&&this._rememberMorpher("transform",s),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new Ht(e),this._tryRetarget(t,e))return this;const n=new Pu(this._stepper).to(e);let i=null;return this.queue(function(){i=this.element()[t](),n.from(i),n.to(i+e)},function(s){return this.element()[t](n.at(s)),n.done()},function(s){n.to(i+new Ht(s))}),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new Pu(this._stepper).to(e);return this.queue(function(){n.from(this.element()[t]())},function(i){return this.element()[t](n.at(i)),n.done()}),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new Ht(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,i){if(arguments.length===4)return this.plot([t,e,n,i]);if(this._tryRetarget("plot",t))return this;const s=new Pu(this._stepper).type(this._element.MorphArray).to(t);return this.queue(function(){s.from(this._element.array())},function(o){return this._element.plot(s.at(o)),s.done()}),this._rememberMorpher("plot",s),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,i){return this._queueObject("viewbox",new Ys(t,e,n,i))},update(t){return typeof t!="object"?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(t.opacity!=null&&this.attr("stop-opacity",t.opacity),t.color!=null&&this.attr("stop-color",t.color),t.offset!=null&&this.attr("offset",t.offset),this)}}),At(zo,{rx:qS,ry:GS,from:hj,to:fj}),yn(zo,"Runner");class Jx extends Ji{constructor(e,n=e){super(Bn("svg",e),n),this.namespace()}defs(){return this.isRoot()?sr(this.node.querySelector("defs"))||this.put(new Q2):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof vn.window.SVGElement)&&this.node.parentNode.nodeName!=="#document-fragment"}namespace(){return this.isRoot()?this.attr({xmlns:HS,version:"1.1"}).attr("xmlns:xlink",Fp,q3):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,q3).attr("xmlns:svgjs",null,q3)}root(){return this.isRoot()?this:super.root()}}Qt({Container:{nested:Nn(function(){return this.put(new Jx)})}}),yn(Jx,"Svg",!0);let Qx=class extends Ji{constructor(t,e=t){super(Bn("symbol",t),e)}};Qt({Container:{symbol:Nn(function(){return this.put(new Qx)})}}),yn(Qx,"Symbol");var yj=Object.freeze({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)},cx:function(t,e=this.bbox()){return t==null?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return t==null?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,n=this.bbox()){return this.x(t,n).y(e,n)},plain:function(t){return this._build===!1&&this.clear(),this.node.appendChild(vn.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return t==null?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return t==null?e.y:this.attr("y",this.attr("y")+t-e.y)}});class Fr extends Xo{constructor(e,n=e){super(Bn("text",e),n),this.dom.leading=this.dom.leading??new Ht(1.3),this._rebuild=!0,this._build=!1}leading(e){return e==null?this.dom.leading:(this.dom.leading=new Ht(e),this.rebuild())}rebuild(e){if(typeof e=="boolean"&&(this._rebuild=e),this._rebuild){const n=this;let i=0;const s=this.dom.leading;this.each(function(o){if(Wx(this.node))return;const r=vn.window.getComputedStyle(this.node).getPropertyValue("font-size"),a=s*new Ht(r);this.dom.newLined&&(this.attr("x",n.attr("x")),this.text()===`
144 +`?i+=a:(this.attr("dy",o?a+i:0),i=0))}),this.fire("rebuild")}return this}setData(e){return this.dom=e,this.dom.leading=new Ht(e.leading||1.3),this}writeDataToDom(){return KU(this,this.dom,{leading:1.3}),this}text(e){if(e===void 0){const n=this.node.childNodes;let i=0;e="";for(let s=0,o=n.length;s<o;++s)n[s].nodeName==="textPath"||Wx(n[s])?s===0&&(i=s+1):(s!==i&&n[s].nodeType!==3&&sr(n[s]).dom.newLined===!0&&(e+=`
145 +`),e+=n[s].textContent);return e}if(this.clear().build(!0),typeof e=="function")e.call(this,this);else for(let n=0,i=(e=(e+"").split(`
146 +`)).length;n<i;n++)this.newLine(e[n]);return this.build(!1).rebuild()}}At(Fr,yj),Qt({Container:{text:Nn(function(t=""){return this.put(new Fr).text(t)}),plain:Nn(function(t=""){return this.put(new Fr).plain(t)})}}),yn(Fr,"Text");class Ty extends Xo{constructor(e,n=e){super(Bn("tspan",e),n),this._build=!1}dx(e){return this.attr("dx",e)}dy(e){return this.attr("dy",e)}newLine(){this.dom.newLined=!0;const e=this.parent();if(!(e instanceof Fr))return this;const n=e.index(this),i=vn.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=e.dom.leading*new Ht(i);return this.dy(n?s:0).attr("x",e.x())}text(e){return e==null?this.node.textContent+(this.dom.newLined?`
147 +`:""):(typeof e=="function"?(this.clear().build(!0),e.call(this,this),this.build(!1)):this.plain(e),this)}}At(Ty,yj),Qt({Tspan:{tspan:Nn(function(t=""){const e=new Ty;return this._build||this.clear(),this.put(e).text(t)})},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),yn(Ty,"Tspan");class Q3 extends Xo{constructor(e,n=e){super(Bn("circle",e),n)}radius(e){return this.attr("r",e)}rx(e){return this.attr("r",e)}ry(e){return this.rx(e)}size(e){return this.radius(new Ht(e).divide(2))}}At(Q3,{x:oj,y:rj,cx:aj,cy:lj,width:cj,height:uj}),Qt({Container:{circle:Nn(function(t=0){return this.put(new Q3).size(t).move(0,0)})}}),yn(Q3,"Circle");class ek extends Ji{constructor(e,n=e){super(Bn("clipPath",e),n)}remove(){return this.targets().forEach(function(e){e.unclip()}),super.remove()}targets(){return eh("svg [clip-path*="+this.id()+"]")}}Qt({Container:{clip:Nn(function(){return this.defs().put(new ek)})},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof ek?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),yn(ek,"ClipPath");class XT extends mi{constructor(e,n=e){super(Bn("foreignObject",e),n)}}Qt({Container:{foreignObject:Nn(function(t,e){return this.put(new XT).size(t,e)})}}),yn(XT,"ForeignObject");var bj=Object.freeze({__proto__:null,dmove:function(t,e){return this.children().forEach(n=>{let i;try{i=n.node instanceof Cv().SVGSVGElement?new Ys(n.attr(["x","y","width","height"])):n.bbox()}catch{return}const s=new ln(n),o=s.translate(t,e).transform(s.inverse()),r=new Dn(i.x,i.y).transform(o);n.move(r.x,r.y)}),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return t==null?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,n=this.bbox()){const i=t-n.x,s=e-n.y;return this.dmove(i,s)},size:function(t,e,n=this.bbox()){const i=Vp(this,t,e,n),s=i.width/n.width,o=i.height/n.height;return this.children().forEach(r=>{const a=new Dn(n).transform(new ln(r).inverse());r.scale(s,o,a.x,a.y)}),this},width:function(t,e=this.bbox()){return t==null?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return t==null?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return t==null?e.y:this.move(e.x,t,e)}});class Oc extends Ji{constructor(e,n=e){super(Bn("g",e),n)}}At(Oc,bj),Qt({Container:{group:Nn(function(){return this.put(new Oc)})}}),yn(Oc,"G");class b_ extends Ji{constructor(e,n=e){super(Bn("a",e),n)}target(e){return this.attr("target",e)}to(e){return this.attr("href",e,Fp)}}At(b_,bj),Qt({Container:{link:Nn(function(t){return this.put(new b_).to(t)})},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new b_,this.wrap(e)),typeof t=="function"?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&t.node.nodeName.toLowerCase()==="a"?t:null}}}),yn(b_,"A");class tk extends Ji{constructor(e,n=e){super(Bn("mask",e),n)}remove(){return this.targets().forEach(function(e){e.unmask()}),super.remove()}targets(){return eh("svg [mask*="+this.id()+"]")}}Qt({Container:{mask:Nn(function(){return this.defs().put(new tk)})},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof tk?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),yn(tk,"Mask");class KT extends mi{constructor(e,n=e){super(Bn("stop",e),n)}update(e){return(typeof e=="number"||e instanceof Ht)&&(e={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),e.opacity!=null&&this.attr("stop-opacity",e.opacity),e.color!=null&&this.attr("stop-color",e.color),e.offset!=null&&this.attr("offset",new Ht(e.offset)),this}}Qt({Gradient:{stop:function(t,e,n){return this.put(new KT).update(t,e,n)}}}),yn(KT,"Stop");class nk extends mi{constructor(e,n=e){super(Bn("style",e),n)}addText(e=""){return this.node.textContent+=e,this}font(e,n,i={}){return this.rule("@font-face",{fontFamily:e,src:n,...i})}rule(e,n){return this.addText(function(i,s){if(!i)return"";if(!s)return i;let o=i+"{";for(const r in s)o+=r.replace(/([A-Z])/g,function(a,l){return"-"+l.toLowerCase()})+":"+s[r]+";";return o+="}",o}(e,n))}}Qt("Dom",{style(t,e){return this.put(new nk).rule(t,e)},fontface(t,e,n){return this.put(new nk).font(t,e,n)}}),yn(nk,"Style");class sk extends Fr{constructor(e,n=e){super(Bn("textPath",e),n)}array(){const e=this.track();return e?e.array():null}plot(e){const n=this.track();let i=null;return n&&(i=n.plot(e)),e==null?i:this}track(){return this.reference("href")}}Qt({Container:{textPath:Nn(function(t,e){return t instanceof Fr||(t=this.text(t)),t.path(e)})},Text:{path:Nn(function(t,e=!0){const n=new sk;let i;if(t instanceof bf||(t=this.defs().path(t)),n.attr("href","#"+t,Fp),e)for(;i=this.node.firstChild;)n.node.appendChild(i);return this.put(n)}),textPath(){return this.findOne("textPath")}},Path:{text:Nn(function(t){return t instanceof Fr||(t=new Fr().addTo(this.parent()).text(t)),t.path(this)}),targets(){return eh("svg textPath").filter(t=>(t.attr("href")||"").includes(this.id()))}}}),sk.prototype.MorphArray=Vr,yn(sk,"TextPath");class ZT extends Xo{constructor(e,n=e){super(Bn("use",e),n)}use(e,n){return this.attr("href",(n||"")+"#"+e,Fp)}}Qt({Container:{use:Nn(function(t,e){return this.put(new ZT).use(t,e)})}}),yn(ZT,"Use");const Mbt=Ui;At([Jx,Qx,Ay,k1,Ey],to("viewbox")),At([ju,Yu,Wu,bf],to("marker")),At(Fr,to("Text")),At(bf,to("Path")),At(Q2,to("Defs")),At([Fr,Ty],to("Tspan")),At([My,$y,wg,zo],to("radius")),At(xv,to("EventTarget")),At(Wc,to("Dom")),At(mi,to("Element")),At(Xo,to("Shape")),At([Ji,dj],to("Container")),At(wg,to("Gradient")),At(zo,to("Runner")),Md.extend([...new Set(GU)]),function(t=[]){Zx.push(...[].concat(t))}([Ht,Ln,Ys,ln,Td,Yc,Vr,Dn]),At(Zx,{to(t){return new Pu().type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,i,s){return this.fromArray(t.map(function(o,r){return i.step(o,e[r],n,s[r],s)}))}});class Xn extends mi{constructor(e){super(Bn("filter",e),e),this.$source="SourceGraphic",this.$sourceAlpha="SourceAlpha",this.$background="BackgroundImage",this.$backgroundAlpha="BackgroundAlpha",this.$fill="FillPaint",this.$stroke="StrokePaint",this.$autoSetIn=!0}put(e,n){return!(e=super.put(e,n)).attr("in")&&this.$autoSetIn&&e.attr("in",this.$source),e.attr("result")||e.attr("result",e.id()),e}remove(){return this.targets().each("unfilter"),super.remove()}targets(){return eh('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class ZS extends mi{constructor(e,n){super(e,n),this.result(this.id())}in(e){if(e==null){const n=this.attr("in");return this.parent()&&this.parent().find(`[result="${n}"]`)[0]||n}return this.attr("in",e)}result(e){return this.attr("result",e)}toString(){return this.result()}}const Jo=t=>function(...e){for(let n=t.length;n--;)e[n]!=null&&this.attr(t[n],e[n])},Tbt={blend:Jo(["in","in2","mode"]),colorMatrix:Jo(["type","values"]),composite:Jo(["in","in2","operator"]),convolveMatrix:function(t){t=new Td(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Jo(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Jo(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Jo(["in","dx","dy","stdDeviation"]),flood:Jo(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,Fp)},morphology:Jo(["operator","radius"]),offset:Jo(["dx","dy"]),specularLighting:Jo(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Jo([]),turbulence:Jo(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach(t=>{const e=Rp(t),n=Tbt[t];Xn[e+"Effect"]=class extends ZS{constructor(i){super(Bn("fe"+e,i),i)}update(i){return n.apply(this,i),this}},Xn.prototype[t]=Nn(function(i,...s){const o=new Xn[e+"Effect"];return i==null?this.put(o):(typeof i=="function"?i.call(o,o):s.unshift(i),this.put(o).update(s))})}),At(Xn,{merge(t){const e=this.put(new Xn.MergeEffect);return typeof t=="function"?(t.call(e,e),e):((t instanceof Array?t:[...arguments]).forEach(n=>{n instanceof Xn.MergeNode?e.put(n):e.mergeNode(n)}),e)},componentTransfer(t={}){const e=this.put(new Xn.ComponentTransferEffect);if(typeof t=="function")return t.call(e,e),e;t.r||t.g||t.b||t.a||(t={r:t,g:t,b:t,a:t});for(const n in t)e.add(new Xn["Func"+n.toUpperCase()](t[n]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach(t=>{const e=Rp(t);Xn[e]=class extends ZS{constructor(n){super(Bn("fe"+e,n),n)}}});["funcR","funcG","funcB","funcA"].forEach(function(t){const e=Xn[Rp(t)],n=Nn(function(){return this.put(new e)});Xn.ComponentTransferEffect.prototype[t]=n});["distantLight","pointLight","spotLight"].forEach(t=>{const e=Xn[Rp(t)],n=Nn(function(){return this.put(new e)});Xn.DiffuseLightingEffect.prototype[t]=n,Xn.SpecularLightingEffect.prototype[t]=n}),At(Xn.MergeEffect,{mergeNode(t){return this.put(new Xn.MergeNode).attr("in",t)}}),At(Q2,{filter:function(t){const e=this.put(new Xn);return typeof t=="function"&&t.call(e,e),e}}),At(Ji,{filter:function(t){return this.defs().filter(t)}}),At(mi,{filterWith:function(t){const e=t instanceof Xn?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const Pbt={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,n,i){return this.parent()&&this.parent().diffuseLighting(t,n,i).in(this)},displacementMap:function(t,e,n,i){return this.parent()&&this.parent().displacementMap(this,t,e,n,i)},dropShadow:function(t,e,n){return this.parent()&&this.parent().dropShadow(this,t,e,n).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){return t=t instanceof Array?t:[...t],this.parent()&&this.parent().merge(this,...t)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,n,i,s){return this.parent()&&this.parent().specularLighting(t,n,i,s).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,n,i,s){return this.parent()&&this.parent().turbulence(t,e,n,i,s).in(this)}};At(ZS,Pbt),At(Xn.MergeEffect,{in:function(t){return t instanceof Xn.MergeNode?this.add(t,0):this.add(new Xn.MergeNode().in(t),0),this}}),At([Xn.CompositeEffect,Xn.BlendEffect,Xn.DisplacementMapEffect],{in2:function(t){if(t==null){const e=this.attr("in2");return this.parent()&&this.parent().find(`[result="${e}"]`)[0]||e}return this.attr("in2",t)}}),Xn.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var di=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"getDefaultFilter",value:function(e,n){var i=this.w;e.unfilter(!0),new Xn().size("120%","180%","-5%","-40%"),i.config.chart.dropShadow.enabled&&this.dropShadow(e,i.config.chart.dropShadow,n)}},{key:"applyFilter",value:function(e,n,i){var s,o=this,r=this.w;if(e.unfilter(!0),i!=="none"){var a,l,c=r.config.chart.dropShadow,u=i==="lighten"?2:.3;e.filterWith(function(d){d.colorMatrix({type:"matrix",values:`
148 + `.concat(u,` 0 0 0 0
149 + 0 `).concat(u,` 0 0 0
150 + 0 0 `).concat(u,` 0 0
151 + 0 0 0 1 0
152 + `),in:"SourceGraphic",result:"brightness"}),c.enabled&&o.addShadow(d,n,c,"brightness")}),!c.noUserSpaceOnUse&&((a=e.filterer())===null||a===void 0||(l=a.node)===null||l===void 0||l.setAttribute("filterUnits","userSpaceOnUse")),this._scaleFilterSize((s=e.filterer())===null||s===void 0?void 0:s.node)}else this.getDefaultFilter(e,n)}},{key:"addShadow",value:function(e,n,i,s){var o,r=this.w,a=i.blur,l=i.top,c=i.left,u=i.color,d=i.opacity;if(u=Array.isArray(u)?u[n]:u,((o=r.config.chart.dropShadow.enabledOnSeries)===null||o===void 0?void 0:o.length)>0&&r.config.chart.dropShadow.enabledOnSeries.indexOf(n)===-1)return e;e.offset({in:s,dx:c,dy:l,result:"offset"}),e.gaussianBlur({in:"offset",stdDeviation:a,result:"blur"}),e.flood({"flood-color":u,"flood-opacity":d,result:"flood"}),e.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),e.merge(["shadow",s])}},{key:"dropShadow",value:function(e,n){var i,s,o,r,a,l=this,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,u=this.w;return e.unfilter(!0),he.isMsEdge()&&u.config.chart.type==="radialBar"||((i=u.config.chart.dropShadow.enabledOnSeries)===null||i===void 0?void 0:i.length)>0&&((o=u.config.chart.dropShadow.enabledOnSeries)===null||o===void 0?void 0:o.indexOf(c))===-1?e:(e.filterWith(function(d){l.addShadow(d,c,n,"SourceGraphic")}),n.noUserSpaceOnUse||(r=e.filterer())===null||r===void 0||(a=r.node)===null||a===void 0||a.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((s=e.filterer())===null||s===void 0?void 0:s.node),e)}},{key:"setSelectionFilter",value:function(e,n,i){var s=this.w;if(s.globals.selectedDataPoints[n]!==void 0&&s.globals.selectedDataPoints[n].indexOf(i)>-1){e.node.setAttribute("selected",!0);var o=s.config.states.active.filter;o!=="none"&&this.applyFilter(e,n,o.type)}}},{key:"_scaleFilterSize",value:function(e){e&&function(n){for(var i in n)n.hasOwnProperty(i)&&e.setAttribute(i,n[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),t}(),Ne=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"roundPathCorners",value:function(e,n){function i(T,I,L){var R=I.x-T.x,V=I.y-T.y,H=Math.sqrt(R*R+V*V);return s(T,I,Math.min(1,L/H))}function s(T,I,L){return{x:T.x+(I.x-T.x)*L,y:T.y+(I.y-T.y)*L}}function o(T,I){T.length>2&&(T[T.length-2]=I.x,T[T.length-1]=I.y)}function r(T){return{x:parseFloat(T[T.length-2]),y:parseFloat(T[T.length-1])}}e.indexOf("NaN")>-1&&(e="");var a=e.split(/[,\s]/).reduce(function(T,I){var L=I.match("([a-zA-Z])(.+)");return L?(T.push(L[1]),T.push(L[2])):T.push(I),T},[]).reduce(function(T,I){return parseFloat(I)==I&&T.length?T[T.length-1].push(I):T.push([I]),T},[]),l=[];if(a.length>1){var c=r(a[0]),u=null;a[a.length-1][0]=="Z"&&a[0].length>2&&(u=["L",c.x,c.y],a[a.length-1]=u),l.push(a[0]);for(var d=1;d<a.length;d++){var h=l[l.length-1],f=a[d],p=f==u?a[1]:a[d+1];if(p&&h&&h.length>2&&f[0]=="L"&&p.length>2&&p[0]=="L"){var m,b,w=r(h),k=r(f),C=r(p);m=i(k,w,n),b=i(k,C,n),o(f,m),f.origPoint=k,l.push(f);var A=s(m,k,.5),S=s(k,b,.5),M=["C",A.x,A.y,S.x,S.y,b.x,b.y];M.origPoint=k,l.push(M)}else l.push(f)}if(u){var P=r(l[l.length-1]);l.push(["Z"]),o(l[0],P)}}else l=a;return l.reduce(function(T,I){return T+I.join(" ")+" "},"")}},{key:"drawLine",value:function(e,n,i,s){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"#a8a8a8",r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:e,y1:n,x2:i,y2:s,stroke:o,"stroke-dasharray":r,"stroke-width":a,"stroke-linecap":l})}},{key:"drawRect",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"#fefefe",a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:1,l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:null,c=arguments.length>8&&arguments[8]!==void 0?arguments[8]:null,u=arguments.length>9&&arguments[9]!==void 0?arguments[9]:0,d=this.w.globals.dom.Paper.rect();return d.attr({x:e,y:n,width:i>0?i:0,height:s>0?s:0,rx:o,ry:o,opacity:a,"stroke-width":l!==null?l:0,stroke:c!==null?c:"none","stroke-dasharray":u}),d.node.setAttribute("fill",r),d}},{key:"drawPolygon",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"#e1e1e1",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(e).attr({fill:s,stroke:n,"stroke-width":i})}},{key:"drawCircle",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;e<0&&(e=0);var i=this.w.globals.dom.Paper.circle(2*e);return n!==null&&i.attr(n),i}},{key:"drawPath",value:function(e){var n=e.d,i=n===void 0?"":n,s=e.stroke,o=s===void 0?"#a8a8a8":s,r=e.strokeWidth,a=r===void 0?1:r,l=e.fill,c=e.fillOpacity,u=c===void 0?1:c,d=e.strokeOpacity,h=d===void 0?1:d,f=e.classes,p=e.strokeLinecap,m=p===void 0?null:p,b=e.strokeDashArray,w=b===void 0?0:b,k=this.w;return m===null&&(m=k.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(k.globals.gridHeight)),k.globals.dom.Paper.path(i).attr({fill:l,"fill-opacity":u,stroke:o,"stroke-opacity":h,"stroke-linecap":m,"stroke-width":a,"stroke-dasharray":w,class:f})}},{key:"group",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=this.w.globals.dom.Paper.group();return e!==null&&n.attr(e),n}},{key:"move",value:function(e,n){var i=["M",e,n].join(" ");return i}},{key:"line",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,s=null;return i===null?s=[" L",e,n].join(" "):i==="H"?s=[" H",e].join(" "):i==="V"&&(s=[" V",n].join(" ")),s}},{key:"curve",value:function(e,n,i,s,o,r){var a=["C",e,n,i,s,o,r].join(" ");return a}},{key:"quadraticCurve",value:function(e,n,i,s){return["Q",e,n,i,s].join(" ")}},{key:"arc",value:function(e,n,i,s,o,r,a){var l="A";arguments.length>7&&arguments[7]!==void 0&&arguments[7]&&(l="a");var c=[l,e,n,i,s,o,r,a].join(" ");return c}},{key:"renderPaths",value:function(e){var n,i=e.j,s=e.realIndex,o=e.pathFrom,r=e.pathTo,a=e.stroke,l=e.strokeWidth,c=e.strokeLinecap,u=e.fill,d=e.animationDelay,h=e.initialSpeed,f=e.dataChangeSpeed,p=e.className,m=e.chartType,b=e.shouldClipToGrid,w=b===void 0||b,k=e.bindEventsOnPaths,C=k===void 0||k,A=e.drawShadow,S=A===void 0||A,M=this.w,P=new di(this.ctx),T=new Dp(this.ctx),I=this.w.config.chart.animations.enabled,L=I&&this.w.config.chart.animations.dynamicAnimation.enabled,R=!!(I&&!M.globals.resized||L&&M.globals.dataChanged&&M.globals.shouldAnimate);R?n=o:(n=r,M.globals.animationEnded=!0);var V=M.config.stroke.dashArray,H=0;H=Array.isArray(V)?V[s]:M.config.stroke.dashArray;var F=this.drawPath({d:n,stroke:a,strokeWidth:l,fill:u,fillOpacity:1,classes:p,strokeLinecap:c,strokeDashArray:H});F.attr("index",s),w&&(m==="bar"&&!M.globals.isHorizontal||M.globals.comboCharts?F.attr({"clip-path":"url(#gridRectBarMask".concat(M.globals.cuid,")")}):F.attr({"clip-path":"url(#gridRectMask".concat(M.globals.cuid,")")})),M.config.chart.dropShadow.enabled&&S&&P.dropShadow(F,M.config.chart.dropShadow,s),C&&(F.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,F)),F.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,F)),F.node.addEventListener("mousedown",this.pathMouseDown.bind(this,F))),F.attr({pathTo:r,pathFrom:o});var U={el:F,j:i,realIndex:s,pathFrom:o,pathTo:r,fill:u,strokeWidth:l,delay:d};return!I||M.globals.resized||M.globals.dataChanged?!M.globals.resized&&M.globals.dataChanged||T.showDelayedElements():T.animatePathsGradually(tt(tt({},U),{},{speed:h})),M.globals.dataChanged&&L&&R&&T.animatePathsGradually(tt(tt({},U),{},{speed:f})),F}},{key:"drawPattern",value:function(e,n,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"#a8a8a8",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;return this.w.globals.dom.Paper.pattern(n,i,function(r){e==="horizontalLines"?r.line(0,0,i,0).stroke({color:s,width:o+1}):e==="verticalLines"?r.line(0,0,0,n).stroke({color:s,width:o+1}):e==="slantedLines"?r.line(0,0,n,i).stroke({color:s,width:o}):e==="squares"?r.rect(n,i).fill("none").stroke({color:s,width:o}):e==="circles"&&r.circle(n).fill("none").stroke({color:s,width:o})})}},{key:"drawGradient",value:function(e,n,i,s,o){var r,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,c=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],u=arguments.length>8&&arguments[8]!==void 0?arguments[8]:0,d=this.w;n.length<9&&n.indexOf("#")===0&&(n=he.hexToRgba(n,s)),i.length<9&&i.indexOf("#")===0&&(i=he.hexToRgba(i,o));var h=0,f=1,p=1,m=null;l!==null&&(h=l[0]!==void 0?l[0]/100:0,f=l[1]!==void 0?l[1]/100:1,p=l[2]!==void 0?l[2]/100:1,m=l[3]!==void 0?l[3]/100:null);var b=!(d.config.chart.type!=="donut"&&d.config.chart.type!=="pie"&&d.config.chart.type!=="polarArea"&&d.config.chart.type!=="bubble");if(r=c&&c.length!==0?d.globals.dom.Paper.gradient(b?"radial":"linear",function(C){(Array.isArray(c[u])?c[u]:c).forEach(function(A){C.stop(A.offset/100,A.color,A.opacity)})}):d.globals.dom.Paper.gradient(b?"radial":"linear",function(C){C.stop(h,n,s),C.stop(f,i,o),C.stop(p,i,o),m!==null&&C.stop(m,n,s)}),b){var w=d.globals.gridWidth/2,k=d.globals.gridHeight/2;d.config.chart.type!=="bubble"?r.attr({gradientUnits:"userSpaceOnUse",cx:w,cy:k,r:a}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else e==="vertical"?r.from(0,0).to(0,1):e==="diagonal"?r.from(0,0).to(1,1):e==="horizontal"?r.from(0,1).to(1,1):e==="diagonal2"&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(e){var n=e.text,i=e.maxWidth,s=e.fontSize,o=e.fontFamily,r=this.getTextRects(n,s,o),a=r.width/n.length,l=Math.floor(i/a);return i<r.width?n.slice(0,l-3)+"...":n}},{key:"drawText",value:function(e){var n=this,i=e.x,s=e.y,o=e.text,r=e.textAnchor,a=e.fontSize,l=e.fontFamily,c=e.fontWeight,u=e.foreColor,d=e.opacity,h=e.maxWidth,f=e.cssClass,p=f===void 0?"":f,m=e.isPlainText,b=m===void 0||m,w=e.dominantBaseline,k=w===void 0?"auto":w,C=this.w;o===void 0&&(o="");var A=o;r||(r="start"),u&&u.length||(u=C.config.chart.foreColor),l=l||C.config.chart.fontFamily,c=c||"regular";var S,M={maxWidth:h,fontSize:a=a||"11px",fontFamily:l};return Array.isArray(o)?S=C.globals.dom.Paper.text(function(P){for(var T=0;T<o.length;T++)A=o[T],h&&(A=n.getTextBasedOnMaxWidth(tt({text:o[T]},M))),T===0?P.tspan(A):P.tspan(A).newLine()}):(h&&(A=this.getTextBasedOnMaxWidth(tt({text:o},M))),S=b?C.globals.dom.Paper.plain(o):C.globals.dom.Paper.text(function(P){return P.tspan(A)})),S.attr({x:i,y:s,"text-anchor":r,"dominant-baseline":k,"font-size":a,"font-family":l,"font-weight":c,fill:u,class:"apexcharts-text "+p}),S.node.style.fontFamily=l,S.node.style.opacity=d,S}},{key:"getMarkerPath",value:function(e,n,i,s){var o="";switch(i){case"cross":o="M ".concat(e-(s/=1.4)," ").concat(n-s," L ").concat(e+s," ").concat(n+s," M ").concat(e-s," ").concat(n+s," L ").concat(e+s," ").concat(n-s);break;case"plus":o="M ".concat(e-(s/=1.12)," ").concat(n," L ").concat(e+s," ").concat(n," M ").concat(e," ").concat(n-s," L ").concat(e," ").concat(n+s);break;case"star":case"sparkle":var r=5;s*=1.15,i==="sparkle"&&(s/=1.1,r=4);for(var a=Math.PI/r,l=0;l<=2*r;l++){var c=l*a,u=l%2==0?s:s/2;o+=(l===0?"M":"L")+(e+u*Math.sin(c))+","+(n-u*Math.cos(c))}o+="Z";break;case"triangle":o="M ".concat(e," ").concat(n-s,`
153 + L `).concat(e+s," ").concat(n+s,`
154 + L `).concat(e-s," ").concat(n+s,`
155 + Z`);break;case"square":case"rect":o="M ".concat(e-(s/=1.125)," ").concat(n-s,`
156 + L `).concat(e+s," ").concat(n-s,`
157 + L `).concat(e+s," ").concat(n+s,`
158 + L `).concat(e-s," ").concat(n+s,`
159 + Z`);break;case"diamond":s*=1.05,o="M ".concat(e," ").concat(n-s,`
160 + L `).concat(e+s," ").concat(n,`
161 + L `).concat(e," ").concat(n+s,`
162 + L `).concat(e-s," ").concat(n,`
163 + Z`);break;case"line":o="M ".concat(e-(s/=1.1)," ").concat(n,`
164 + L `).concat(e+s," ").concat(n);break;default:s*=2,o="M ".concat(e,", ").concat(n,`
165 + m -`).concat(s/2,`, 0
166 + a `).concat(s/2,",").concat(s/2," 0 1,0 ").concat(s,`,0
167 + a `).concat(s/2,",").concat(s/2," 0 1,0 -").concat(s,",0")}return o}},{key:"drawMarkerShape",value:function(e,n,i,s,o){var r=this.drawPath({d:this.getMarkerPath(e,n,i,s,o),stroke:o.pointStrokeColor,strokeDashArray:o.pointStrokeDashArray,strokeWidth:o.pointStrokeWidth,fill:o.pointFillColor,fillOpacity:o.pointFillOpacity,strokeOpacity:o.pointStrokeOpacity});return r.attr({cx:e,cy:n,shape:o.shape,class:o.class?o.class:""}),r}},{key:"drawMarker",value:function(e,n,i){e=e||0;var s=i.pSize||0;return he.isNumber(n)||(s=0,n=0),this.drawMarkerShape(e,n,i==null?void 0:i.shape,s,tt(tt({},i),i.shape==="line"||i.shape==="plus"||i.shape==="cross"?{pointStrokeColor:i.pointFillColor,pointStrokeOpacity:i.pointFillOpacity}:{}))}},{key:"pathMouseEnter",value:function(e,n){var i=this.w,s=new di(this.ctx),o=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10);if(typeof i.config.chart.events.dataPointMouseEnter=="function"&&i.config.chart.events.dataPointMouseEnter(n,this.ctx,{seriesIndex:o,dataPointIndex:r,w:i}),this.ctx.events.fireEvent("dataPointMouseEnter",[n,this.ctx,{seriesIndex:o,dataPointIndex:r,w:i}]),(i.config.states.active.filter.type==="none"||e.node.getAttribute("selected")!=="true")&&i.config.states.hover.filter.type!=="none"&&!i.globals.isTouchDevice){var a=i.config.states.hover.filter;s.applyFilter(e,o,a.type)}}},{key:"pathMouseLeave",value:function(e,n){var i=this.w,s=new di(this.ctx),o=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10);typeof i.config.chart.events.dataPointMouseLeave=="function"&&i.config.chart.events.dataPointMouseLeave(n,this.ctx,{seriesIndex:o,dataPointIndex:r,w:i}),this.ctx.events.fireEvent("dataPointMouseLeave",[n,this.ctx,{seriesIndex:o,dataPointIndex:r,w:i}]),i.config.states.active.filter.type!=="none"&&e.node.getAttribute("selected")==="true"||i.config.states.hover.filter.type!=="none"&&s.getDefaultFilter(e,o)}},{key:"pathMouseDown",value:function(e,n){var i=this.w,s=new di(this.ctx),o=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10),a="false";if(e.node.getAttribute("selected")==="true"){if(e.node.setAttribute("selected","false"),i.globals.selectedDataPoints[o].indexOf(r)>-1){var l=i.globals.selectedDataPoints[o].indexOf(r);i.globals.selectedDataPoints[o].splice(l,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var c=i.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),u=i.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),d=function(p){Array.prototype.forEach.call(p,function(m){m.node.setAttribute("selected","false"),s.getDefaultFilter(m,o)})};d(c),d(u)}e.node.setAttribute("selected","true"),a="true",i.globals.selectedDataPoints[o]===void 0&&(i.globals.selectedDataPoints[o]=[]),i.globals.selectedDataPoints[o].push(r)}if(a==="true"){var h=i.config.states.active.filter;if(h!=="none")s.applyFilter(e,o,h.type);else if(i.config.states.hover.filter!=="none"&&!i.globals.isTouchDevice){var f=i.config.states.hover.filter;s.applyFilter(e,o,f.type)}}else i.config.states.active.filter.type!=="none"&&(i.config.states.hover.filter.type==="none"||i.globals.isTouchDevice?s.getDefaultFilter(e,o):(f=i.config.states.hover.filter,s.applyFilter(e,o,f.type)));typeof i.config.chart.events.dataPointSelection=="function"&&i.config.chart.events.dataPointSelection(n,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:o,dataPointIndex:r,w:i}),n&&this.ctx.events.fireEvent("dataPointSelection",[n,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:o,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(e){var n={};return e&&typeof e.getBBox=="function"&&(n=e.getBBox()),{x:n.x+n.width/2,y:n.y+n.height/2}}},{key:"getTextRects",value:function(e,n,i,s){var o=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],r=this.w,a=this.drawText({x:-200,y:-200,text:e,textAnchor:"start",fontSize:n,fontFamily:i,foreColor:"#fff",opacity:0});s&&a.attr("transform",s),r.globals.dom.Paper.add(a);var l=a.bbox();return o||(l=a.node.getBoundingClientRect()),a.remove(),{width:l.width,height:l.height}}},{key:"placeTextWithEllipsis",value:function(e,n,i){if(typeof e.getComputedTextLength=="function"&&(e.textContent=n,n.length>0&&e.getComputedTextLength()>=i/1.1)){for(var s=n.length-3;s>0;s-=3)if(e.getSubStringLength(0,s)<=i/1.1)return void(e.textContent=n.substring(0,s)+"...");e.textContent="."}}}],[{key:"setAttrs",value:function(e,n){for(var i in n)n.hasOwnProperty(i)&&e.setAttribute(i,n[i])}}]),t}(),ys=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"getStackedSeriesTotals",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=this.w,i=[];if(n.globals.series.length===0)return i;for(var s=0;s<n.globals.series[n.globals.maxValsInArrayIndex].length;s++){for(var o=0,r=0;r<n.globals.series.length;r++)n.globals.series[r][s]!==void 0&&e.indexOf(r)===-1&&(o+=n.globals.series[r][s]);i.push(o)}return i}},{key:"getSeriesTotalByIndex",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return e===null?this.w.config.series.reduce(function(n,i){return n+i},0):this.w.globals.series[e].reduce(function(n,i){return n+i},0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var e=this,n=this.w,i=[];return n.globals.seriesGroups.forEach(function(s){var o=[];n.config.series.forEach(function(a,l){s.indexOf(n.globals.seriesNames[l])>-1&&o.push(l)});var r=n.globals.series.map(function(a,l){return o.indexOf(l)===-1?l:-1}).filter(function(a){return a!==-1});i.push(e.getStackedSeriesTotals(r))}),i}},{key:"setSeriesYAxisMappings",value:function(){var e=this.w.globals,n=this.w.config,i=[],s=[],o=[],r=e.series.length>n.yaxis.length||n.yaxis.some(function(d){return Array.isArray(d.seriesName)});n.series.forEach(function(d,h){o.push(h),s.push(null)}),n.yaxis.forEach(function(d,h){i[h]=[]});var a=[];n.yaxis.forEach(function(d,h){var f=!1;if(d.seriesName){var p=[];Array.isArray(d.seriesName)?p=d.seriesName:p.push(d.seriesName),p.forEach(function(m){n.series.forEach(function(b,w){if(b.name===m){var k=w;h===w||r?!r||o.indexOf(w)>-1?i[h].push([h,w]):console.warn("Series '"+b.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[w].push([w,h]),k=h),f=!0,(k=o.indexOf(k))!==-1&&o.splice(k,1)}})})}f||a.push(h)}),i=i.map(function(d,h){var f=[];return d.forEach(function(p){s[p[1]]=p[0],f.push(p[1])}),f});for(var l=n.yaxis.length-1,c=0;c<a.length&&(l=a[c],i[l]=[],o);c++){var u=o[0];o.shift(),i[l].push(u),s[u]=l}o.forEach(function(d){i[l].push(d),s[d]=l}),e.seriesYAxisMap=i.map(function(d){return d}),e.seriesYAxisReverseMap=s.map(function(d){return d}),e.seriesYAxisMap.forEach(function(d,h){d.forEach(function(f){n.series[f]&&n.series[f].group===void 0&&(n.series[f].group="apexcharts-axis-".concat(h.toString()))})})}},{key:"isSeriesNull",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return(e===null?this.w.config.series.filter(function(n){return n!==null}):this.w.config.series[e].data.filter(function(n){return n!==null})).length===0}},{key:"seriesHaveSameValues",value:function(e){return this.w.globals.series[e].every(function(n,i,s){return n===s[0]})}},{key:"getCategoryLabels",value:function(e){var n=this.w,i=e.slice();return n.config.xaxis.convertedCatToNumeric&&(i=e.map(function(s,o){return n.config.xaxis.labels.formatter(s-n.globals.minX+1)})),i}},{key:"getLargestSeries",value:function(){var e=this.w;e.globals.maxValsInArrayIndex=e.globals.series.map(function(n){return n.length}).indexOf(Math.max.apply(Math,e.globals.series.map(function(n){return n.length})))}},{key:"getLargestMarkerSize",value:function(){var e=this.w,n=0;return e.globals.markers.size.forEach(function(i){n=Math.max(n,i)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(function(i){n=Math.max(n,i.size)}),n>0&&(e.config.markers.hover.size>0?n=e.config.markers.hover.size:n+=e.config.markers.hover.sizeOffset),e.globals.markers.largestSize=n,n}},{key:"getSeriesTotals",value:function(){var e=this.w;e.globals.seriesTotals=e.globals.series.map(function(n,i){var s=0;if(Array.isArray(n))for(var o=0;o<n.length;o++)s+=n[o];else s+=n;return s})}},{key:"getSeriesTotalsXRange",value:function(e,n){var i=this.w;return i.globals.series.map(function(s,o){for(var r=0,a=0;a<s.length;a++)i.globals.seriesX[o][a]>e&&i.globals.seriesX[o][a]<n&&(r+=s[a]);return r})}},{key:"getPercentSeries",value:function(){var e=this.w;e.globals.seriesPercent=e.globals.series.map(function(n,i){var s=[];if(Array.isArray(n))for(var o=0;o<n.length;o++){var r=e.globals.stackedSeriesTotals[o],a=0;r&&(a=100*n[o]/r),s.push(a)}else{var l=100*n/e.globals.seriesTotals.reduce(function(c,u){return c+u},0);s.push(l)}return s})}},{key:"getCalculatedRatios",value:function(){var e,n,i,s=this,o=this.w,r=o.globals,a=[],l=0,c=[],u=.1,d=0;if(r.yRange=[],r.isMultipleYAxis)for(var h=0;h<r.minYArr.length;h++)r.yRange.push(Math.abs(r.minYArr[h]-r.maxYArr[h])),c.push(0);else r.yRange.push(Math.abs(r.minY-r.maxY));r.xRange=Math.abs(r.maxX-r.minX),r.zRange=Math.abs(r.maxZ-r.minZ);for(var f=0;f<r.yRange.length;f++)a.push(r.yRange[f]/r.gridHeight);if(n=r.xRange/r.gridWidth,e=r.yRange/r.gridWidth,i=r.xRange/r.gridHeight,(l=r.zRange/r.gridHeight*16)||(l=1),r.minY!==Number.MIN_VALUE&&Math.abs(r.minY)!==0&&(r.hasNegs=!0),o.globals.seriesYAxisReverseMap.length>0){var p=function(b,w){var k=o.config.yaxis[o.globals.seriesYAxisReverseMap[w]],C=b<0?-1:1;return b=Math.abs(b),k.logarithmic&&(b=s.getBaseLog(k.logBase,b)),-C*b/a[w]};if(r.isMultipleYAxis){c=[];for(var m=0;m<a.length;m++)c.push(p(r.minYArr[m],m))}else(c=[]).push(p(r.minY,0)),r.minY!==Number.MIN_VALUE&&Math.abs(r.minY)!==0&&(u=-r.minY/e,d=r.minX/n)}else(c=[]).push(0),u=0,d=0;return{yRatio:a,invertedYRatio:e,zRatio:l,xRatio:n,invertedXRatio:i,baseLineInvertedY:u,baseLineY:c,baseLineX:d}}},{key:"getLogSeries",value:function(e){var n=this,i=this.w;return i.globals.seriesLog=e.map(function(s,o){var r=i.globals.seriesYAxisReverseMap[o];return i.config.yaxis[r]&&i.config.yaxis[r].logarithmic?s.map(function(a){return a===null?null:n.getLogVal(i.config.yaxis[r].logBase,a,o)}):s}),i.globals.invalidLogScale?e:i.globals.seriesLog}},{key:"getLogValAtSeriesIndex",value:function(e,n){if(e===null)return null;var i=this.w,s=i.globals.seriesYAxisReverseMap[n];return i.config.yaxis[s]&&i.config.yaxis[s].logarithmic?this.getLogVal(i.config.yaxis[s].logBase,e,n):e}},{key:"getBaseLog",value:function(e,n){return Math.log(n)/Math.log(e)}},{key:"getLogVal",value:function(e,n,i){if(n<=0)return 0;var s=this.w,o=s.globals.minYArr[i]===0?-1:this.getBaseLog(e,s.globals.minYArr[i]),r=(s.globals.maxYArr[i]===0?0:this.getBaseLog(e,s.globals.maxYArr[i]))-o;return n<1?n/r:(this.getBaseLog(e,n)-o)/r}},{key:"getLogYRatios",value:function(e){var n=this,i=this.w,s=this.w.globals;return s.yLogRatio=e.slice(),s.logYRange=s.yRange.map(function(o,r){var a=i.globals.seriesYAxisReverseMap[r];if(i.config.yaxis[a]&&n.w.config.yaxis[a].logarithmic){var l,c=-Number.MAX_VALUE,u=Number.MIN_VALUE;return s.seriesLog.forEach(function(d,h){d.forEach(function(f){i.config.yaxis[h]&&i.config.yaxis[h].logarithmic&&(c=Math.max(f,c),u=Math.min(f,u))})}),l=Math.pow(s.yRange[r],Math.abs(u-c)/s.yRange[r]),s.yLogRatio[r]=l/s.gridHeight,l}}),s.invalidLogScale?e.slice():s.yLogRatio}},{key:"drawSeriesByGroup",value:function(e,n,i,s){var o=this.w,r=[];return e.series.length>0&&n.forEach(function(a){var l=[],c=[];e.i.forEach(function(u,d){o.config.series[u].group===a&&(l.push(e.series[d]),c.push(u))}),l.length>0&&r.push(s.draw(l,i,c))}),r}}],[{key:"checkComboSeries",value:function(e,n){var i=!1,s=0,o=0;return n===void 0&&(n="line"),e.length&&e[0].type!==void 0&&e.forEach(function(r){r.type!=="bar"&&r.type!=="column"&&r.type!=="candlestick"&&r.type!=="boxPlot"||s++,r.type!==void 0&&r.type!==n&&o++}),o>0&&(i=!0),{comboBarCount:s,comboCharts:i}}},{key:"extendArrayProps",value:function(e,n,i){var s,o,r,a,l,c;return(s=n)!==null&&s!==void 0&&s.yaxis&&(n=e.extendYAxis(n,i)),(o=n)!==null&&o!==void 0&&o.annotations&&(n.annotations.yaxis&&(n=e.extendYAxisAnnotations(n)),(r=n)!==null&&r!==void 0&&(a=r.annotations)!==null&&a!==void 0&&a.xaxis&&(n=e.extendXAxisAnnotations(n)),(l=n)!==null&&l!==void 0&&(c=l.annotations)!==null&&c!==void 0&&c.points&&(n=e.extendPointAnnotations(n))),n}}]),t}(),ew=function(){function t(e){lt(this,t),this.w=e.w,this.annoCtx=e}return ct(t,[{key:"setOrientations",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,i=this.w;if(e.label.orientation==="vertical"){var s=n!==null?n:0,o=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(s,"']"));if(o!==null){var r=o.getBoundingClientRect();o.setAttribute("x",parseFloat(o.getAttribute("x"))-r.height+4);var a=e.label.position==="top"?r.width:-r.width;o.setAttribute("y",parseFloat(o.getAttribute("y"))+a);var l=this.annoCtx.graphics.rotateAroundCenter(o),c=l.x,u=l.y;o.setAttribute("transform","rotate(-90 ".concat(c," ").concat(u,")"))}}}},{key:"addBackgroundToAnno",value:function(e,n){var i=this.w;if(!e||!n.label.text||!String(n.label.text).trim())return null;var s=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),o=e.getBoundingClientRect(),r=n.label.style.padding,a=r.left,l=r.right,c=r.top,u=r.bottom;if(n.label.orientation==="vertical"){var d=[a,l,c,u];c=d[0],u=d[1],a=d[2],l=d[3]}var h=o.left-s.left-a,f=o.top-s.top-c,p=this.annoCtx.graphics.drawRect(h-i.globals.barPadForNumericAxis,f,o.width+a+l,o.height+c+u,n.label.borderRadius,n.label.style.background,1,n.label.borderWidth,n.label.borderColor,0);return n.id&&p.node.classList.add(n.id),p}},{key:"annotationsBackground",value:function(){var e=this,n=this.w,i=function(s,o,r){var a=n.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations .apexcharts-").concat(r,"-annotation-label[rel='").concat(o,"']"));if(a){var l=a.parentNode,c=e.addBackgroundToAnno(a,s);c&&(l.insertBefore(c.node,a),s.label.mouseEnter&&c.node.addEventListener("mouseenter",s.label.mouseEnter.bind(e,s)),s.label.mouseLeave&&c.node.addEventListener("mouseleave",s.label.mouseLeave.bind(e,s)),s.label.click&&c.node.addEventListener("click",s.label.click.bind(e,s)))}};n.config.annotations.xaxis.forEach(function(s,o){return i(s,o,"xaxis")}),n.config.annotations.yaxis.forEach(function(s,o){return i(s,o,"yaxis")}),n.config.annotations.points.forEach(function(s,o){return i(s,o,"point")})}},{key:"getY1Y2",value:function(e,n){var i,s=this.w,o=e==="y1"?n.y:n.y2,r=!1;if(this.annoCtx.invertAxis){var a=s.config.xaxis.convertedCatToNumeric?s.globals.categoryLabels:s.globals.labels,l=a.indexOf(o),c=s.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(l+1,")"));i=c?parseFloat(c.getAttribute("y")):(s.globals.gridHeight/a.length-1)*(l+1)-s.globals.barHeight,n.seriesIndex!==void 0&&s.globals.barHeight&&(i-=s.globals.barHeight/2*(s.globals.series.length-1)-s.globals.barHeight*n.seriesIndex)}else{var u,d=s.globals.seriesYAxisMap[n.yAxisIndex][0],h=s.config.yaxis[n.yAxisIndex].logarithmic?new ys(this.annoCtx.ctx).getLogVal(s.config.yaxis[n.yAxisIndex].logBase,o,d)/s.globals.yLogRatio[d]:(o-s.globals.minYArr[d])/(s.globals.yRange[d]/s.globals.gridHeight);i=s.globals.gridHeight-Math.min(Math.max(h,0),s.globals.gridHeight),r=h>s.globals.gridHeight||h<0,!n.marker||n.y!==void 0&&n.y!==null||(i=0),(u=s.config.yaxis[n.yAxisIndex])!==null&&u!==void 0&&u.reversed&&(i=h)}return typeof o=="string"&&o.includes("px")&&(i=parseFloat(o)),{yP:i,clipped:r}}},{key:"getX1X2",value:function(e,n){var i=this.w,s=e==="x1"?n.x:n.x2,o=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,r=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,a=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,l=!1,c=this.annoCtx.inversedReversedAxis?(r-s)/(a/i.globals.gridWidth):(s-o)/(a/i.globals.gridWidth);return i.config.xaxis.type!=="category"&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||i.config.chart.sparkline.enabled||(c=this.getStringX(s)),typeof s=="string"&&s.includes("px")&&(c=parseFloat(s)),s==null&&n.marker&&(c=i.globals.gridWidth),n.seriesIndex!==void 0&&i.globals.barWidth&&!this.annoCtx.invertAxis&&(c-=i.globals.barWidth/2*(i.globals.series.length-1)-i.globals.barWidth*n.seriesIndex),c>i.globals.gridWidth?(c=i.globals.gridWidth,l=!0):c<0&&(c=0,l=!0),{x:c,clipped:l}}},{key:"getStringX",value:function(e){var n=this.w,i=e;n.config.xaxis.convertedCatToNumeric&&n.globals.categoryLabels.length&&(e=n.globals.categoryLabels.indexOf(e)+1);var s=n.globals.labels.map(function(r){return Array.isArray(r)?r.join(" "):r}).indexOf(e),o=n.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(s+1,")"));return o&&(i=parseFloat(o.getAttribute("x"))),i}}]),t}(),Ibt=function(){function t(e){lt(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new ew(this.annoCtx)}return ct(t,[{key:"addXaxisAnnotation",value:function(e,n,i){var s,o=this.w,r=this.helpers.getX1X2("x1",e),a=r.x,l=r.clipped,c=!0,u=e.label.text,d=e.strokeDashArray;if(he.isNumber(a)){if(e.x2===null||e.x2===void 0){if(!l){var h=this.annoCtx.graphics.drawLine(a+e.offsetX,0+e.offsetY,a+e.offsetX,o.globals.gridHeight+e.offsetY,e.borderColor,d,e.borderWidth);n.appendChild(h.node),e.id&&h.node.classList.add(e.id)}}else{var f=this.helpers.getX1X2("x2",e);if(s=f.x,c=f.clipped,!l||!c){if(s<a){var p=a;a=s,s=p}var m=this.annoCtx.graphics.drawRect(a+e.offsetX,0+e.offsetY,s-a,o.globals.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,d);m.node.classList.add("apexcharts-annotation-rect"),m.attr("clip-path","url(#gridRectMask".concat(o.globals.cuid,")")),n.appendChild(m.node),e.id&&m.node.classList.add(e.id)}}if(!l||!c){var b=this.annoCtx.graphics.getTextRects(u,parseFloat(e.label.style.fontSize)),w=e.label.position==="top"?4:e.label.position==="center"?o.globals.gridHeight/2+(e.label.orientation==="vertical"?b.width/2:0):o.globals.gridHeight,k=this.annoCtx.graphics.drawText({x:a+e.label.offsetX,y:w+e.label.offsetY-(e.label.orientation==="vertical"?e.label.position==="top"?b.width/2-12:-b.width/2:0),text:u,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-xaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});k.attr({rel:i}),n.appendChild(k.node),this.annoCtx.helpers.setOrientations(e,i)}}}},{key:"drawXAxisAnnotations",value:function(){var e=this,n=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return n.config.annotations.xaxis.map(function(s,o){e.addXaxisAnnotation(s,i.node,o)}),i}}]),t}(),ri=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return ct(t,[{key:"isValidDate",value:function(e){return typeof e!="number"&&!isNaN(this.parseDate(e))}},{key:"getTimeStamp",value:function(e){return Date.parse(e)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime():e}},{key:"getDate",value:function(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}},{key:"parseDate",value:function(e){var n=Date.parse(e);if(!isNaN(n))return this.getTimeStamp(e);var i=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return i=this.getTimeStamp(i)}},{key:"parseDateWithTimezone",value:function(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(e,n){var i=this.w.globals.locale,s=this.w.config.xaxis.labels.datetimeUTC,o=["\0"].concat(Ns(i.months)),r=[""].concat(Ns(i.shortMonths)),a=[""].concat(Ns(i.days)),l=[""].concat(Ns(i.shortDays));function c(T,I){var L=T+"";for(I=I||2;L.length<I;)L="0"+L;return L}var u=s?e.getUTCFullYear():e.getFullYear();n=(n=(n=n.replace(/(^|[^\\])yyyy+/g,"$1"+u)).replace(/(^|[^\\])yy/g,"$1"+u.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+u);var d=(s?e.getUTCMonth():e.getMonth())+1;n=(n=(n=(n=n.replace(/(^|[^\\])MMMM+/g,"$1"+o[0])).replace(/(^|[^\\])MMM/g,"$1"+r[0])).replace(/(^|[^\\])MM/g,"$1"+c(d))).replace(/(^|[^\\])M/g,"$1"+d);var h=s?e.getUTCDate():e.getDate();n=(n=(n=(n=n.replace(/(^|[^\\])dddd+/g,"$1"+a[0])).replace(/(^|[^\\])ddd/g,"$1"+l[0])).replace(/(^|[^\\])dd/g,"$1"+c(h))).replace(/(^|[^\\])d/g,"$1"+h);var f=s?e.getUTCHours():e.getHours(),p=f>12?f-12:f===0?12:f;n=(n=(n=(n=n.replace(/(^|[^\\])HH+/g,"$1"+c(f))).replace(/(^|[^\\])H/g,"$1"+f)).replace(/(^|[^\\])hh+/g,"$1"+c(p))).replace(/(^|[^\\])h/g,"$1"+p);var m=s?e.getUTCMinutes():e.getMinutes();n=(n=n.replace(/(^|[^\\])mm+/g,"$1"+c(m))).replace(/(^|[^\\])m/g,"$1"+m);var b=s?e.getUTCSeconds():e.getSeconds();n=(n=n.replace(/(^|[^\\])ss+/g,"$1"+c(b))).replace(/(^|[^\\])s/g,"$1"+b);var w=s?e.getUTCMilliseconds():e.getMilliseconds();n=n.replace(/(^|[^\\])fff+/g,"$1"+c(w,3)),w=Math.round(w/10),n=n.replace(/(^|[^\\])ff/g,"$1"+c(w)),w=Math.round(w/10);var k=f<12?"AM":"PM";n=(n=(n=n.replace(/(^|[^\\])f/g,"$1"+w)).replace(/(^|[^\\])TT+/g,"$1"+k)).replace(/(^|[^\\])T/g,"$1"+k.charAt(0));var C=k.toLowerCase();n=(n=n.replace(/(^|[^\\])tt+/g,"$1"+C)).replace(/(^|[^\\])t/g,"$1"+C.charAt(0));var A=-e.getTimezoneOffset(),S=s||!A?"Z":A>0?"+":"-";if(!s){var M=(A=Math.abs(A))%60;S+=c(Math.floor(A/60))+":"+c(M)}n=n.replace(/(^|[^\\])K/g,"$1"+S);var P=(s?e.getUTCDay():e.getDay())+1;return n=(n=(n=(n=(n=n.replace(new RegExp(a[0],"g"),a[P])).replace(new RegExp(l[0],"g"),l[P])).replace(new RegExp(o[0],"g"),o[d])).replace(new RegExp(r[0],"g"),r[d])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(e,n,i){var s=this.w;s.config.xaxis.min!==void 0&&(e=s.config.xaxis.min),s.config.xaxis.max!==void 0&&(n=s.config.xaxis.max);var o=this.getDate(e),r=this.getDate(n),a=this.formatDate(o,"yyyy MM dd HH mm ss fff").split(" "),l=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(l[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(l[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(l[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(l[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(l[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(l[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(l[0],10)}}},{key:"isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"calculcateLastDaysOfMonth",value:function(e,n,i){return this.determineDaysOfMonths(e,n)-i}},{key:"determineDaysOfYear",value:function(e){var n=365;return this.isLeapYear(e)&&(n=366),n}},{key:"determineRemainingDaysOfYear",value:function(e,n,i){var s=this.daysCntOfYear[n]+i;return n>1&&this.isLeapYear()&&s++,s}},{key:"determineDaysOfMonths",value:function(e,n){var i=30;switch(e=he.monthMod(e),!0){case this.months30.indexOf(e)>-1:e===2&&(i=this.isLeapYear(n)?29:28);break;case this.months31.indexOf(e)>-1:default:i=31}return i}}]),t}(),$v=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return ct(t,[{key:"xLabelFormat",value:function(e,n,i,s){var o=this.w;if(o.config.xaxis.type==="datetime"&&o.config.xaxis.labels.formatter===void 0&&o.config.tooltip.x.formatter===void 0){var r=new ri(this.ctx);return r.formatDate(r.getDate(n),o.config.tooltip.x.format)}return e(n,i,s)}},{key:"defaultGeneralFormatter",value:function(e){return Array.isArray(e)?e.map(function(n){return n}):e}},{key:"defaultYFormatter",value:function(e,n,i){var s=this.w;if(he.isNumber(e))if(s.globals.yValueDecimal!==0)e=e.toFixed(n.decimalsInFloat!==void 0?n.decimalsInFloat:s.globals.yValueDecimal);else{var o=e.toFixed(0);e=e==o?o:e.toFixed(1)}return e}},{key:"setLabelFormatters",value:function(){var e=this,n=this.w;return n.globals.xaxisTooltipFormatter=function(i){return e.defaultGeneralFormatter(i)},n.globals.ttKeyFormatter=function(i){return e.defaultGeneralFormatter(i)},n.globals.ttZFormatter=function(i){return i},n.globals.legendFormatter=function(i){return e.defaultGeneralFormatter(i)},n.config.xaxis.labels.formatter!==void 0?n.globals.xLabelFormatter=n.config.xaxis.labels.formatter:n.globals.xLabelFormatter=function(i){if(he.isNumber(i)){if(!n.config.xaxis.convertedCatToNumeric&&n.config.xaxis.type==="numeric"){if(he.isNumber(n.config.xaxis.decimalsInFloat))return i.toFixed(n.config.xaxis.decimalsInFloat);var s=n.globals.maxX-n.globals.minX;return s>0&&s<100?i.toFixed(1):i.toFixed(0)}return n.globals.isBarHorizontal&&n.globals.maxY-n.globals.minYArr<4?i.toFixed(1):i.toFixed(0)}return i},typeof n.config.tooltip.x.formatter=="function"?n.globals.ttKeyFormatter=n.config.tooltip.x.formatter:n.globals.ttKeyFormatter=n.globals.xLabelFormatter,typeof n.config.xaxis.tooltip.formatter=="function"&&(n.globals.xaxisTooltipFormatter=n.config.xaxis.tooltip.formatter),(Array.isArray(n.config.tooltip.y)||n.config.tooltip.y.formatter!==void 0)&&(n.globals.ttVal=n.config.tooltip.y),n.config.tooltip.z.formatter!==void 0&&(n.globals.ttZFormatter=n.config.tooltip.z.formatter),n.config.legend.formatter!==void 0&&(n.globals.legendFormatter=n.config.legend.formatter),n.config.yaxis.forEach(function(i,s){i.labels.formatter!==void 0?n.globals.yLabelFormatters[s]=i.labels.formatter:n.globals.yLabelFormatters[s]=function(o){return n.globals.xyCharts?Array.isArray(o)?o.map(function(r){return e.defaultYFormatter(r,i,s)}):e.defaultYFormatter(o,i,s):o}}),n.globals}},{key:"heatmapLabelFormatters",value:function(){var e=this.w;if(e.config.chart.type==="heatmap"){e.globals.yAxisScale[0].result=e.globals.seriesNames.slice();var n=e.globals.seriesNames.reduce(function(i,s){return i.length>s.length?i:s},0);e.globals.yAxisScale[0].niceMax=n,e.globals.yAxisScale[0].niceMin=n}}}]),t}(),qc=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"getLabel",value:function(e,n,i,s){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"12px",a=!(arguments.length>6&&arguments[6]!==void 0)||arguments[6],l=this.w,c=e[s]===void 0?"":e[s],u=c,d=l.globals.xLabelFormatter,h=l.config.xaxis.labels.formatter,f=!1,p=new $v(this.ctx),m=c;a&&(u=p.xLabelFormat(d,c,m,{i:s,dateFormatter:new ri(this.ctx).formatDate,w:l}),h!==void 0&&(u=h(c,e[s],{i:s,dateFormatter:new ri(this.ctx).formatDate,w:l})));var b,w;n.length>0?(b=n[s].unit,w=null,n.forEach(function(S){S.unit==="month"?w="year":S.unit==="day"?w="month":S.unit==="hour"?w="day":S.unit==="minute"&&(w="hour")}),f=w===b,i=n[s].position,u=n[s].value):l.config.xaxis.type==="datetime"&&h===void 0&&(u=""),u===void 0&&(u=""),u=Array.isArray(u)?u:u.toString();var k=new Ne(this.ctx),C={};C=l.globals.rotateXLabels&&a?k.getTextRects(u,parseInt(r,10),null,"rotate(".concat(l.config.xaxis.labels.rotate," 0 0)"),!1):k.getTextRects(u,parseInt(r,10));var A=!l.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(u)&&(String(u)==="NaN"||o.indexOf(u)>=0&&A)&&(u=""),{x:i,text:u,textRect:C,isBold:f}}},{key:"checkLabelBasedOnTickamount",value:function(e,n,i){var s=this.w,o=s.config.xaxis.tickAmount;return o==="dataPoints"&&(o=Math.round(s.globals.gridWidth/120)),o>i||e%Math.round(i/(o+1))==0||(n.text=""),n}},{key:"checkForOverflowingLabels",value:function(e,n,i,s,o){var r=this.w;if(e===0&&r.globals.skipFirstTimelinelabel&&(n.text=""),e===i-1&&r.globals.skipLastTimelinelabel&&(n.text=""),r.config.xaxis.labels.hideOverlappingLabels&&s.length>0){var a=o[o.length-1];n.x<a.textRect.width/(r.globals.rotateXLabels?Math.abs(r.config.xaxis.labels.rotate)/12:1.01)+a.x&&(n.text="")}return n}},{key:"checkForReversedLabels",value:function(e,n){var i=this.w;return i.config.yaxis[e]&&i.config.yaxis[e].reversed&&n.reverse(),n}},{key:"yAxisAllSeriesCollapsed",value:function(e){var n=this.w.globals;return!n.seriesYAxisMap[e].some(function(i){return n.collapsedSeriesIndices.indexOf(i)===-1})}},{key:"translateYAxisIndex",value:function(e){var n=this.w,i=n.globals,s=n.config.yaxis;return i.series.length>s.length||s.some(function(o){return Array.isArray(o.seriesName)})?e:i.seriesYAxisReverseMap[e]}},{key:"isYAxisHidden",value:function(e){var n=this.w,i=n.config.yaxis[e];if(!i.show||this.yAxisAllSeriesCollapsed(e))return!0;if(!i.showForNullSeries){var s=n.globals.seriesYAxisMap[e],o=new ys(this.ctx);return s.every(function(r){return o.isSeriesNull(r)})}return!1}},{key:"getYAxisForeColor",value:function(e,n){var i=this.w;return Array.isArray(e)&&i.globals.yAxisScale[n]&&this.ctx.theme.pushExtraColors(e,i.globals.yAxisScale[n].result.length,!1),e}},{key:"drawYAxisTicks",value:function(e,n,i,s,o,r,a){var l=this.w,c=new Ne(this.ctx),u=l.globals.translateY+l.config.yaxis[o].labels.offsetY;if(l.globals.isBarHorizontal?u=0:l.config.chart.type==="heatmap"&&(u+=r/2),s.show&&n>0){l.config.yaxis[o].opposite===!0&&(e+=s.width);for(var d=n;d>=0;d--){var h=c.drawLine(e+i.offsetX-s.width+s.offsetX,u+s.offsetY,e+i.offsetX+s.offsetX,u+s.offsetY,s.color);a.add(h),u+=r}}}}]),t}(),Lbt=function(){function t(e){lt(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new ew(this.annoCtx),this.axesUtils=new qc(this.annoCtx)}return ct(t,[{key:"addYaxisAnnotation",value:function(e,n,i){var s,o=this.w,r=e.strokeDashArray,a=this.helpers.getY1Y2("y1",e),l=a.yP,c=a.clipped,u=!0,d=!1,h=e.label.text;if(e.y2===null||e.y2===void 0){if(!c){d=!0;var f=this.annoCtx.graphics.drawLine(0+e.offsetX,l+e.offsetY,this._getYAxisAnnotationWidth(e),l+e.offsetY,e.borderColor,r,e.borderWidth);n.appendChild(f.node),e.id&&f.node.classList.add(e.id)}}else{if(s=(a=this.helpers.getY1Y2("y2",e)).yP,u=a.clipped,s>l){var p=l;l=s,s=p}if(!c||!u){d=!0;var m=this.annoCtx.graphics.drawRect(0+e.offsetX,s+e.offsetY,this._getYAxisAnnotationWidth(e),l-s,0,e.fillColor,e.opacity,1,e.borderColor,r);m.node.classList.add("apexcharts-annotation-rect"),m.attr("clip-path","url(#gridRectMask".concat(o.globals.cuid,")")),n.appendChild(m.node),e.id&&m.node.classList.add(e.id)}}if(d){var b=e.label.position==="right"?o.globals.gridWidth:e.label.position==="center"?o.globals.gridWidth/2:0,w=this.annoCtx.graphics.drawText({x:b+e.label.offsetX,y:(s??l)+e.label.offsetY-3,text:h,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});w.attr({rel:i}),n.appendChild(w.node)}}},{key:"_getYAxisAnnotationWidth",value:function(e){var n=this.w;return n.globals.gridWidth,(e.width.indexOf("%")>-1?n.globals.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10))+e.offsetX}},{key:"drawYAxisAnnotations",value:function(){var e=this,n=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return n.config.annotations.yaxis.forEach(function(s,o){s.yAxisIndex=e.axesUtils.translateYAxisIndex(s.yAxisIndex),e.axesUtils.isYAxisHidden(s.yAxisIndex)&&e.axesUtils.yAxisAllSeriesCollapsed(s.yAxisIndex)||e.addYaxisAnnotation(s,i.node,o)}),i}}]),t}(),Obt=function(){function t(e){lt(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new ew(this.annoCtx)}return ct(t,[{key:"addPointAnnotation",value:function(e,n,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)){var s=this.helpers.getX1X2("x1",e),o=s.x,r=s.clipped,a=(s=this.helpers.getY1Y2("y1",e)).yP,l=s.clipped;if(he.isNumber(o)&&!l&&!r){var c={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:"apexcharts-point-annotation-marker ".concat(e.marker.cssClass," ").concat(e.id?e.id:"")},u=this.annoCtx.graphics.drawMarker(o+e.marker.offsetX,a+e.marker.offsetY,c);n.appendChild(u.node);var d=e.label.text?e.label.text:"",h=this.annoCtx.graphics.drawText({x:o+e.label.offsetX,y:a+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:d,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});if(h.attr({rel:i}),n.appendChild(h.node),e.customSVG.SVG){var f=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});f.attr({transform:"translate(".concat(o+e.customSVG.offsetX,", ").concat(a+e.customSVG.offsetY,")")}),f.node.innerHTML=e.customSVG.SVG,n.appendChild(f.node)}if(e.image.path){var p=e.image.width?e.image.width:20,m=e.image.height?e.image.height:20;u=this.annoCtx.addImage({x:o+e.image.offsetX-p/2,y:a+e.image.offsetY-m/2,width:p,height:m,path:e.image.path,appendTo:".apexcharts-point-annotations"})}e.mouseEnter&&u.node.addEventListener("mouseenter",e.mouseEnter.bind(this,e)),e.mouseLeave&&u.node.addEventListener("mouseleave",e.mouseLeave.bind(this,e)),e.click&&u.node.addEventListener("click",e.click.bind(this,e))}}}},{key:"drawPointAnnotations",value:function(){var e=this,n=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return n.config.annotations.points.map(function(s,o){e.addPointAnnotation(s,i.node,o)}),i}}]),t}(),wj={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},Du=function(){function t(){lt(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return ct(t,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[wj],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(e){return e}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(e){return e+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(n,i){return n+i},0)/e.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(e){return e},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(e){return e}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(e){return e}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(n,i){return n+i},0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(e){return e!==null?e:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:"vertical",labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(e){return e?e+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),Dbt=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.graphics=new Ne(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new ew(this),this.xAxisAnnotations=new Ibt(this),this.yAxisAnnotations=new Lbt(this),this.pointsAnnotations=new Obt(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return ct(t,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts&&e.globals.dataPoints){for(var n=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),s=this.pointsAnnotations.drawPointAnnotations(),o=e.config.chart.animations.enabled,r=[n,i,s],a=[i.node,n.node,s.node],l=0;l<3;l++)e.globals.dom.elGraphical.add(r[l]),!o||e.globals.resized||e.globals.dataChanged||e.config.chart.type!=="scatter"&&e.config.chart.type!=="bubble"&&e.globals.dataPoints>1&&a[l].classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:a[l],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var e=this;this.w.config.annotations.images.map(function(n,i){e.addImage(n,i)})}},{key:"drawTextAnnos",value:function(){var e=this;this.w.config.annotations.texts.map(function(n,i){e.addText(n,i)})}},{key:"addXaxisAnnotation",value:function(e,n,i){this.xAxisAnnotations.addXaxisAnnotation(e,n,i)}},{key:"addYaxisAnnotation",value:function(e,n,i){this.yAxisAnnotations.addYaxisAnnotation(e,n,i)}},{key:"addPointAnnotation",value:function(e,n,i){this.pointsAnnotations.addPointAnnotation(e,n,i)}},{key:"addText",value:function(e,n){var i=e.x,s=e.y,o=e.text,r=e.textAnchor,a=e.foreColor,l=e.fontSize,c=e.fontFamily,u=e.fontWeight,d=e.cssClass,h=e.backgroundColor,f=e.borderWidth,p=e.strokeDashArray,m=e.borderRadius,b=e.borderColor,w=e.appendTo,k=w===void 0?".apexcharts-svg":w,C=e.paddingLeft,A=C===void 0?4:C,S=e.paddingRight,M=S===void 0?4:S,P=e.paddingBottom,T=P===void 0?2:P,I=e.paddingTop,L=I===void 0?2:I,R=this.w,V=this.graphics.drawText({x:i,y:s,text:o,textAnchor:r||"start",fontSize:l||"12px",fontWeight:u||"regular",fontFamily:c||R.config.chart.fontFamily,foreColor:a||R.config.chart.foreColor,cssClass:d}),H=R.globals.dom.baseEl.querySelector(k);H&&H.appendChild(V.node);var F=V.bbox();if(o){var U=this.graphics.drawRect(F.x-A,F.y-L,F.width+A+M,F.height+T+L,m,h||"transparent",1,f,b,p);H.insertBefore(U.node,V.node)}}},{key:"addImage",value:function(e,n){var i=this.w,s=e.path,o=e.x,r=o===void 0?0:o,a=e.y,l=a===void 0?0:a,c=e.width,u=c===void 0?20:c,d=e.height,h=d===void 0?20:d,f=e.appendTo,p=f===void 0?".apexcharts-svg":f,m=i.globals.dom.Paper.image(s);m.size(u,h).move(r,l);var b=i.globals.dom.baseEl.querySelector(p);return b&&b.appendChild(m.node),m}},{key:"addXaxisAnnotationExternal",value:function(e,n,i){return this.addAnnotationExternal({params:e,pushToMemory:n,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(e,n,i){return this.addAnnotationExternal({params:e,pushToMemory:n,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(e,n,i){return this.invertAxis===void 0&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:n,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(e){var n=e.params,i=e.pushToMemory,s=e.context,o=e.type,r=e.contextMethod,a=s,l=a.w,c=l.globals.dom.baseEl.querySelector(".apexcharts-".concat(o,"-annotations")),u=c.childNodes.length+1,d=new Du,h=Object.assign({},o==="xaxis"?d.xAxisAnnotation:o==="yaxis"?d.yAxisAnnotation:d.pointAnnotation),f=he.extend(h,n);switch(o){case"xaxis":this.addXaxisAnnotation(f,c,u);break;case"yaxis":this.addYaxisAnnotation(f,c,u);break;case"point":this.addPointAnnotation(f,c,u)}var p=l.globals.dom.baseEl.querySelector(".apexcharts-".concat(o,"-annotations .apexcharts-").concat(o,"-annotation-label[rel='").concat(u,"']")),m=this.helpers.addBackgroundToAnno(p,f);return m&&c.insertBefore(m.node,p),i&&l.globals.memory.methodsToExec.push({context:a,id:f.id?f.id:he.randomId(),method:r,label:"addAnnotation",params:n}),s}},{key:"clearAnnotations",value:function(e){for(var n=e.w,i=n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),s=n.globals.memory.methodsToExec.length-1;s>=0;s--)n.globals.memory.methodsToExec[s].label!=="addText"&&n.globals.memory.methodsToExec[s].label!=="addAnnotation"||n.globals.memory.methodsToExec.splice(s,1);i=he.listToArray(i),Array.prototype.forEach.call(i,function(o){for(;o.firstChild;)o.removeChild(o.firstChild)})}},{key:"removeAnnotation",value:function(e,n){var i=e.w,s=i.globals.dom.baseEl.querySelectorAll(".".concat(n));s&&(i.globals.memory.methodsToExec.map(function(o,r){o.id===n&&i.globals.memory.methodsToExec.splice(r,1)}),Array.prototype.forEach.call(s,function(o){o.parentElement.removeChild(o)}))}}]),t}(),ik=function(t){var e,n=t.isTimeline,i=t.ctx,s=t.seriesIndex,o=t.dataPointIndex,r=t.y1,a=t.y2,l=t.w,c=l.globals.seriesRangeStart[s][o],u=l.globals.seriesRangeEnd[s][o],d=l.globals.labels[o],h=l.config.series[s].name?l.config.series[s].name:"",f=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,m={w:l,seriesIndex:s,dataPointIndex:o,start:c,end:u};typeof p=="function"&&(h=p(h,m)),(e=l.config.series[s].data[o])!==null&&e!==void 0&&e.x&&(d=l.config.series[s].data[o].x),n||l.config.xaxis.type==="datetime"&&(d=new $v(i).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new ri(i).formatDate,w:l})),typeof f=="function"&&(d=f(d,m)),Number.isFinite(r)&&Number.isFinite(a)&&(c=r,u=a);var b="",w="",k=l.globals.colors[s];if(l.config.tooltip.x.formatter===void 0)if(l.config.xaxis.type==="datetime"){var C=new ri(i);b=C.formatDate(C.getDate(c),l.config.tooltip.x.format),w=C.formatDate(C.getDate(u),l.config.tooltip.x.format)}else b=c,w=u;else b=l.config.tooltip.x.formatter(c),w=l.config.tooltip.x.formatter(u);return{start:c,end:u,startVal:b,endVal:w,ylabel:d,color:k,seriesName:h}},ok=function(t){var e=t.color,n=t.seriesName,i=t.ylabel,s=t.start,o=t.end,r=t.seriesIndex,a=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(r);s=l.yLbFormatter(s),o=l.yLbFormatter(o);var c=l.yLbFormatter(t.w.globals.series[r][a]),u=`<span class="value start-value">
168 + `.concat(s,`
169 + </span> <span class="separator">-</span> <span class="value end-value">
170 + `).concat(o,`
171 + </span>`);return'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e+'">'+(n||"")+'</span></div><div> <span class="category">'+i+": </span> "+(t.w.globals.comboCharts?t.w.config.series[r].type==="rangeArea"||t.w.config.series[r].type==="rangeBar"?u:"<span>".concat(c,"</span>"):u)+" </div></div>"},x1=function(){function t(e){lt(this,t),this.opts=e}return ct(t,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(e){return this.hideYAxis(),he.extend(e,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(e,n){var i=n.w.config.series[n.seriesIndex].name;return e!==null?i+": "+e:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),tt(tt({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var e=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(n){var i=n.seriesIndex,s=n.dataPointIndex,o=n.w;return e._getBoxTooltip(o,i,s,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var e=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(n){var i=n.seriesIndex,s=n.dataPointIndex,o=n.w;return e._getBoxTooltip(o,i,s,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(e,n){n.ctx;var i=n.seriesIndex,s=n.dataPointIndex,o=n.w,r=function(){var a=o.globals.seriesRangeStart[i][s];return o.globals.seriesRangeEnd[i][s]-a};return o.globals.comboCharts?o.config.series[i].type==="rangeBar"||o.config.series[i].type==="rangeArea"?r():e:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(e){return e.w.config.plotOptions&&e.w.config.plotOptions.bar&&e.w.config.plotOptions.bar.horizontal?function(n){var i=ik(tt(tt({},n),{},{isTimeline:!0})),s=i.color,o=i.seriesName,r=i.ylabel,a=i.startVal,l=i.endVal;return ok(tt(tt({},n),{},{color:s,seriesName:o,ylabel:r,start:a,end:l}))}(e):function(n){var i=ik(n),s=i.color,o=i.seriesName,r=i.ylabel,a=i.start,l=i.end;return ok(tt(tt({},n),{},{color:s,seriesName:o,ylabel:r,start:a,end:l}))}(e)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(e){var n,i;return(n=e.plotOptions.bar)!==null&&n!==void 0&&n.barHeight||(e.plotOptions.bar.barHeight=2),(i=e.plotOptions.bar)!==null&&i!==void 0&&i.columnWidth||(e.plotOptions.bar.columnWidth=2),e}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(e){return function(n){var i=ik(n),s=i.color,o=i.seriesName,r=i.ylabel,a=i.start,l=i.end;return ok(tt(tt({},n),{},{color:s,seriesName:o,ylabel:r,start:a,end:l}))}(e)}}}}},{key:"brush",value:function(e){return he.extend(e,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;var n=e.dataLabels.formatter;return e.yaxis.forEach(function(i,s){e.yaxis[s].min=0,e.yaxis[s].max=100}),e.chart.type==="bar"&&(e.dataLabels.formatter=n||function(i){return typeof i=="number"&&i?i.toFixed(0)+"%":i}),e}},{key:"stackedBars",value:function(){var e=this.bar();return tt(tt({},e),{},{plotOptions:tt(tt({},e.plotOptions),{},{bar:tt(tt({},e.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(e){return e.xaxis.convertedCatToNumeric=!0,e}},{key:"convertCatToNumericXaxis",value:function(e,n,i){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(r){return he.isNumber(r)?Math.floor(r):r};var s=e.xaxis.labels.formatter,o=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return i&&i.length&&(o=i.map(function(r){return Array.isArray(r)?r:String(r)})),o&&o.length&&(e.xaxis.labels.formatter=function(r){return he.isNumber(r)?s(o[Math.floor(r)-1]):s(r)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(e){return e},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(e,n,i,s,o){var r=e.globals.seriesCandleO[n][i],a=e.globals.seriesCandleH[n][i],l=e.globals.seriesCandleM[n][i],c=e.globals.seriesCandleL[n][i],u=e.globals.seriesCandleC[n][i];return e.config.series[n].type&&e.config.series[n].type!==o?`<div class="apexcharts-custom-tooltip">
172 + `.concat(e.config.series[n].name?e.config.series[n].name:"series-"+(n+1),": <strong>").concat(e.globals.series[n][i],`</strong>
173 + </div>`):'<div class="apexcharts-tooltip-box apexcharts-tooltip-'.concat(e.config.chart.type,'">')+"<div>".concat(s[0],': <span class="value">')+r+"</span></div>"+"<div>".concat(s[1],': <span class="value">')+a+"</span></div>"+(l?"<div>".concat(s[2],': <span class="value">')+l+"</span></div>":"")+"<div>".concat(s[3],': <span class="value">')+c+"</span></div>"+"<div>".concat(s[4],': <span class="value">')+u+"</span></div></div>"}}]),t}(),S1=function(){function t(e){lt(this,t),this.opts=e}return ct(t,[{key:"init",value:function(e){var n=e.responsiveOverride,i=this.opts,s=new Du,o=new x1(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=s.init(),a={};if(i&&tp(i)==="object"){var l,c,u,d,h,f,p,m,b,w,k={};k=["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)!==-1?o[i.chart.type]():o.line(),(l=i.plotOptions)!==null&&l!==void 0&&(c=l.bar)!==null&&c!==void 0&&c.isFunnel&&(k=o.funnel()),i.chart.stacked&&i.chart.type==="bar"&&(k=o.stackedBars()),(u=i.chart.brush)!==null&&u!==void 0&&u.enabled&&(k=o.brush(k)),(d=i.plotOptions)!==null&&d!==void 0&&(h=d.line)!==null&&h!==void 0&&h.isSlopeChart&&(k=o.slope()),i.chart.stacked&&i.chart.stackType==="100%"&&(i=o.stacked100(i)),(f=i.plotOptions)!==null&&f!==void 0&&(p=f.bar)!==null&&p!==void 0&&p.isDumbbell&&(i=o.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},n||(i.xaxis.convertedCatToNumeric=!1),((m=(i=this.checkForCatToNumericXAxis(this.chartType,k,i)).chart.sparkline)!==null&&m!==void 0&&m.enabled||(b=window.Apex.chart)!==null&&b!==void 0&&(w=b.sparkline)!==null&&w!==void 0&&w.enabled)&&(k=o.sparkline(k)),a=he.extend(r,k)}var C=he.extend(a,window.Apex);return r=he.extend(C,i),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(e,n,i){var s,o,r=new x1(i),a=(e==="bar"||e==="boxPlot")&&((s=i.plotOptions)===null||s===void 0||(o=s.bar)===null||o===void 0?void 0:o.horizontal),l=e==="pie"||e==="polarArea"||e==="donut"||e==="radar"||e==="radialBar"||e==="heatmap",c=i.xaxis.type!=="datetime"&&i.xaxis.type!=="numeric",u=i.xaxis.tickPlacement?i.xaxis.tickPlacement:n.xaxis&&n.xaxis.tickPlacement;return a||l||!c||u==="between"||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(e,n){var i=new Du;(e.yaxis===void 0||!e.yaxis||Array.isArray(e.yaxis)&&e.yaxis.length===0)&&(e.yaxis={}),e.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(e.yaxis=he.extend(e.yaxis,window.Apex.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[he.extend(i.yAxis,e.yaxis)]:e.yaxis=he.extendArray(e.yaxis,i.yAxis);var s=!1;e.yaxis.forEach(function(r){r.logarithmic&&(s=!0)});var o=e.series;return n&&!o&&(o=n.config.series),s&&o.length!==e.yaxis.length&&o.length&&(e.yaxis=o.map(function(r,a){if(r.name||(o[a].name="series-".concat(a+1)),e.yaxis[a])return e.yaxis[a].seriesName=o[a].name,e.yaxis[a];var l=he.extend(i.yAxis,e.yaxis[0]);return l.show=!1,l})),s&&o.length>1&&o.length!==e.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),e}},{key:"extendAnnotations",value:function(e){return e.annotations===void 0&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),e=this.extendPointAnnotations(e)}},{key:"extendYAxisAnnotations",value:function(e){var n=new Du;return e.annotations.yaxis=he.extendArray(e.annotations.yaxis!==void 0?e.annotations.yaxis:[],n.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var n=new Du;return e.annotations.xaxis=he.extendArray(e.annotations.xaxis!==void 0?e.annotations.xaxis:[],n.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var n=new Du;return e.annotations.points=he.extendArray(e.annotations.points!==void 0?e.annotations.points:[],n.pointAnnotation),e}},{key:"checkForDarkTheme",value:function(e){e.theme&&e.theme.mode==="dark"&&(e.tooltip||(e.tooltip={}),e.tooltip.theme!=="light"&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.theme.palette||(e.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(e){var n=e;if(n.tooltip.shared&&n.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if(n.chart.type==="bar"&&n.plotOptions.bar.horizontal){if(n.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");n.yaxis[0].reversed&&(n.yaxis[0].opposite=!0),n.xaxis.tooltip.enabled=!1,n.yaxis[0].tooltip.enabled=!1,n.chart.zoom.enabled=!1}return n.chart.type!=="bar"&&n.chart.type!=="rangeBar"||n.tooltip.shared&&n.xaxis.crosshairs.width==="barWidth"&&n.series.length>1&&(n.xaxis.crosshairs.width="tickWidth"),n.chart.type!=="candlestick"&&n.chart.type!=="boxPlot"||n.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(n.chart.type," chart is not supported.")),n.yaxis[0].reversed=!1),n}}]),t}(),kj=function(){function t(){lt(this,t)}return ct(t,[{key:"initGlobalVars",value:function(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.barGroups=[],e.lineGroups=[],e.areaGroups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.lastWheelExecution=0,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0}},{key:"globalVars",value:function(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:e.chart.toolbar.autoSelected==="zoom"&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:e.chart.toolbar.autoSelected==="pan"&&e.chart.toolbar.tools.pan,selectionEnabled:e.chart.toolbar.autoSelected==="selection"&&e.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:e.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(e){var n=this.globalVars(e);return this.initGlobalVars(n),n.initialConfig=he.extend({},e),n.initialSeries=he.clone(e.series),n.lastXAxis=he.clone(n.initialConfig.xaxis),n.lastYAxis=he.clone(n.initialConfig.yaxis),n}}]),t}(),Rbt=function(){function t(e){lt(this,t),this.opts=e}return ct(t,[{key:"init",value:function(){var e=new S1(this.opts).init({responsiveOverride:!1});return{config:e,globals:new kj().init(e)}}}]),t}(),Xr=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return ct(t,[{key:"clippedImgArea",value:function(e){var n=this.w,i=n.config,s=parseInt(n.globals.gridWidth,10),o=parseInt(n.globals.gridHeight,10),r=s>o?s:o,a=e.image,l=0,c=0;e.width===void 0&&e.height===void 0?i.fill.image.width!==void 0&&i.fill.image.height!==void 0?(l=i.fill.image.width+1,c=i.fill.image.height):(l=r+1,c=r):(l=e.width,c=e.height);var u=document.createElementNS(n.globals.SVGNS,"pattern");Ne.setAttrs(u,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:l+"px",height:c+"px"});var d=document.createElementNS(n.globals.SVGNS,"image");u.appendChild(d),d.setAttributeNS(window.SVG.xlink,"href",a),Ne.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:l+"px",height:c+"px"}),d.style.opacity=e.opacity,n.globals.dom.elDefs.node.appendChild(u)}},{key:"getSeriesIndex",value:function(e){var n=this.w,i=n.config.chart.type;return(i==="bar"||i==="rangeBar")&&n.config.plotOptions.bar.distributed||i==="heatmap"||i==="treemap"?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%n.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(e,n){var i,s=this.w,o=null,r=null,a=Pm(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;l>=n.threshold?(o===null||l>o)&&(o=l):(r===null||l<r)&&(r=l)}}catch(d){a.e(d)}finally{a.f()}o===null&&(o=n.threshold),r===null&&(r=n.threshold);var c=o-n.threshold+(n.threshold-r);c===0&&(c=1);var u=100-(n.threshold-r)/c*100;return[{offset:u=Math.max(0,Math.min(u,100)),color:n.colorAboveThreshold,opacity:s.config.fill.opacity},{offset:0,color:n.colorBelowThreshold,opacity:s.config.fill.opacity}]}},{key:"fillPath",value:function(e){var n,i,s,o=this.w;this.opts=e;var r,a,l,c=this.w.config;this.seriesIndex=this.getSeriesIndex(e);var u=c.plotOptions.line.colors.colorAboveThreshold&&c.plotOptions.line.colors.colorBelowThreshold,d=this.getFillColors()[this.seriesIndex];o.globals.seriesColors[this.seriesIndex]!==void 0&&(d=o.globals.seriesColors[this.seriesIndex]),typeof d=="function"&&(d=d({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:o}));var h,f,p,m=e.fillType?e.fillType:this.getFillType(this.seriesIndex),b=Array.isArray(c.fill.opacity)?c.fill.opacity[this.seriesIndex]:c.fill.opacity,w=m==="gradient"||u;e.color&&(d=e.color),(n=o.config.series[this.seriesIndex])!==null&&n!==void 0&&(i=n.data)!==null&&i!==void 0&&(s=i[e.dataPointIndex])!==null&&s!==void 0&&s.fillColor&&(d=(h=o.config.series[this.seriesIndex])===null||h===void 0||(f=h.data)===null||f===void 0||(p=f[e.dataPointIndex])===null||p===void 0?void 0:p.fillColor),d||(d="#fff",console.warn("undefined color - ApexCharts"));var k=d;if(d.indexOf("rgb")===-1?d.indexOf("#")===-1?k=d:d.length<9&&(k=he.hexToRgba(d,b)):d.indexOf("rgba")>-1?b=he.getOpacityFromRGBA(d):k=he.hexToRgba(he.rgb2hex(d),b),e.opacity&&(b=e.opacity),m==="pattern"&&(a=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:a,fillColor:d,fillOpacity:b,defaultColor:k})),w){var C=Ns(c.fill.gradient.colorStops)||[],A=c.fill.gradient.type;u&&(C[this.seriesIndex]=this.computeColorStops(o.globals.series[this.seriesIndex],c.plotOptions.line.colors),A="vertical"),l=this.handleGradientFill({type:A,fillConfig:e.fillConfig,fillColor:d,fillOpacity:b,colorStops:C,i:this.seriesIndex})}if(m==="image"){var S=c.fill.image.src,M=e.patternID?e.patternID:"",P="pattern".concat(o.globals.cuid).concat(e.seriesNumber+1).concat(M);this.patternIDs.indexOf(P)===-1&&(this.clippedImgArea({opacity:b,image:Array.isArray(S)?e.seriesNumber<S.length?S[e.seriesNumber]:S[0]:S,width:e.width?e.width:void 0,height:e.height?e.height:void 0,patternUnits:e.patternUnits,patternID:P}),this.patternIDs.push(P)),r="url(#".concat(P,")")}else r=w?l:m==="pattern"?a:k;return e.solid&&(r=k),r}},{key:"getFillType",value:function(e){var n=this.w;return Array.isArray(n.config.fill.type)?n.config.fill.type[e]:n.config.fill.type}},{key:"getFillColors",value:function(){var e=this.w,n=e.config,i=this.opts,s=[];return e.globals.comboCharts?e.config.series[this.seriesIndex].type==="line"?Array.isArray(e.globals.stroke.colors)?s=e.globals.stroke.colors:s.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?s=e.globals.fill.colors:s.push(e.globals.fill.colors):n.chart.type==="line"?Array.isArray(e.globals.stroke.colors)?s=e.globals.stroke.colors:s.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?s=e.globals.fill.colors:s.push(e.globals.fill.colors),i.fillColors!==void 0&&(s=[],Array.isArray(i.fillColors)?s=i.fillColors.slice():s.push(i.fillColors)),s}},{key:"handlePatternFill",value:function(e){var n=e.fillConfig,i=e.patternFill,s=e.fillColor,o=e.fillOpacity,r=e.defaultColor,a=this.w.config.fill;n&&(a=n);var l=this.opts,c=new Ne(this.ctx),u=Array.isArray(a.pattern.strokeWidth)?a.pattern.strokeWidth[this.seriesIndex]:a.pattern.strokeWidth,d=s;return Array.isArray(a.pattern.style)?i=a.pattern.style[l.seriesNumber]!==void 0?c.drawPattern(a.pattern.style[l.seriesNumber],a.pattern.width,a.pattern.height,d,u,o):r:i=c.drawPattern(a.pattern.style,a.pattern.width,a.pattern.height,d,u,o),i}},{key:"handleGradientFill",value:function(e){var n=e.type,i=e.fillColor,s=e.fillOpacity,o=e.fillConfig,r=e.colorStops,a=e.i,l=this.w.config.fill;o&&(l=tt(tt({},l),o));var c=this.opts,u=new Ne(this.ctx),d=new he;n=n||l.gradient.type;var h,f=i,p=l.gradient.opacityFrom===void 0?s:Array.isArray(l.gradient.opacityFrom)?l.gradient.opacityFrom[a]:l.gradient.opacityFrom;f.indexOf("rgba")>-1&&(p=he.getOpacityFromRGBA(f));var m=l.gradient.opacityTo===void 0?s:Array.isArray(l.gradient.opacityTo)?l.gradient.opacityTo[a]:l.gradient.opacityTo;if(l.gradient.gradientToColors===void 0||l.gradient.gradientToColors.length===0)h=l.gradient.shade==="dark"?d.shadeColor(-1*parseFloat(l.gradient.shadeIntensity),i.indexOf("rgb")>-1?he.rgb2hex(i):i):d.shadeColor(parseFloat(l.gradient.shadeIntensity),i.indexOf("rgb")>-1?he.rgb2hex(i):i);else if(l.gradient.gradientToColors[c.seriesNumber]){var b=l.gradient.gradientToColors[c.seriesNumber];h=b,b.indexOf("rgba")>-1&&(m=he.getOpacityFromRGBA(b))}else h=i;if(l.gradient.gradientFrom&&(f=l.gradient.gradientFrom),l.gradient.gradientTo&&(h=l.gradient.gradientTo),l.gradient.inverseColors){var w=f;f=h,h=w}return f.indexOf("rgb")>-1&&(f=he.rgb2hex(f)),h.indexOf("rgb")>-1&&(h=he.rgb2hex(h)),u.drawGradient(n,f,h,p,m,c.size,l.gradient.stops,r,a)}}]),t}(),Np=function(){function t(e,n){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"setGlobalMarkerSize",value:function(){var e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length<e.globals.series.length+1)for(var n=0;n<=e.globals.series.length;n++)e.globals.markers.size[n]===void 0&&e.globals.markers.size.push(e.globals.markers.size[0])}else e.globals.markers.size=e.config.series.map(function(i){return e.config.markers.size})}},{key:"plotChartMarkers",value:function(e,n,i,s){var o=arguments.length>4&&arguments[4]!==void 0&&arguments[4],r=this.w,a=n,l=e,c=null,u=new Ne(this.ctx),d=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(l.x))for(var h=0;h<l.x.length;h++){var f=void 0,p=i,m=!he.isNumber(l.y[h]);i===1&&h===0&&(p=0),i===1&&h===1&&(p=1);var b="apexcharts-marker";if(r.config.chart.type!=="line"&&r.config.chart.type!=="area"||r.globals.comboCharts||r.config.tooltip.intersect||(b+=" no-pointer-events"),(Array.isArray(r.config.markers.size)?r.globals.markers.size[n]>0:r.config.markers.size>0)||o||d){m||(b+=" w".concat(he.randomId()));var w=this.getMarkerConfig({cssClass:b,seriesIndex:n,dataPointIndex:p});r.config.series[a].data[p]&&(r.config.series[a].data[p].fillColor&&(w.pointFillColor=r.config.series[a].data[p].fillColor),r.config.series[a].data[p].strokeColor&&(w.pointStrokeColor=r.config.series[a].data[p].strokeColor)),s!==void 0&&(w.pSize=s),(l.x[h]<-r.globals.markers.largestSize||l.x[h]>r.globals.gridWidth+r.globals.markers.largestSize||l.y[h]<-r.globals.markers.largestSize||l.y[h]>r.globals.gridHeight+r.globals.markers.largestSize)&&(w.pSize=0),!m&&((r.globals.markers.size[n]>0||o||d)&&!c&&(c=u.group({class:o||d?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),(f=u.drawMarker(l.x[h],l.y[h],w)).attr("rel",p),f.attr("j",p),f.attr("index",n),f.node.setAttribute("default-marker-size",w.pSize),new di(this.ctx).setSelectionFilter(f,n,p),this.addEvents(f),c&&c.add(f))}else r.globals.pointsArray[n]===void 0&&(r.globals.pointsArray[n]=[]),r.globals.pointsArray[n].push([l.x[h],l.y[h]])}return c}},{key:"getMarkerConfig",value:function(e){var n=e.cssClass,i=e.seriesIndex,s=e.dataPointIndex,o=s===void 0?null:s,r=e.radius,a=r===void 0?null:r,l=e.size,c=l===void 0?null:l,u=e.strokeWidth,d=u===void 0?null:u,h=this.w,f=this.getMarkerStyle(i),p=c===null?h.globals.markers.size[i]:c,m=h.config.markers;return o!==null&&m.discrete.length&&m.discrete.map(function(b){b.seriesIndex===i&&b.dataPointIndex===o&&(f.pointStrokeColor=b.strokeColor,f.pointFillColor=b.fillColor,p=b.size,f.pointShape=b.shape)}),{pSize:a===null?p:a,pRadius:a!==null?a:m.radius,pointStrokeWidth:d!==null?d:Array.isArray(m.strokeWidth)?m.strokeWidth[i]:m.strokeWidth,pointStrokeColor:f.pointStrokeColor,pointFillColor:f.pointFillColor,shape:f.pointShape||(Array.isArray(m.shape)?m.shape[i]:m.shape),class:n,pointStrokeOpacity:Array.isArray(m.strokeOpacity)?m.strokeOpacity[i]:m.strokeOpacity,pointStrokeDashArray:Array.isArray(m.strokeDashArray)?m.strokeDashArray[i]:m.strokeDashArray,pointFillOpacity:Array.isArray(m.fillOpacity)?m.fillOpacity[i]:m.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(e){var n=this.w,i=new Ne(this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,e)),e.node.addEventListener("click",n.config.markers.onClick),e.node.addEventListener("dblclick",n.config.markers.onDblClick),e.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,e),{passive:!0})}},{key:"getMarkerStyle",value:function(e){var n=this.w,i=n.globals.markers.colors,s=n.config.markers.strokeColor||n.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(s)?s[e]:s,pointFillColor:Array.isArray(i)?i[e]:i}}}]),t}(),Cj=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return ct(t,[{key:"draw",value:function(e,n,i){var s=this.w,o=new Ne(this.ctx),r=i.realIndex,a=i.pointsPos,l=i.zRatio,c=i.elParent,u=o.group({class:"apexcharts-series-markers apexcharts-series-".concat(s.config.chart.type)});if(u.attr("clip-path","url(#gridRectMarkerMask".concat(s.globals.cuid,")")),Array.isArray(a.x))for(var d=0;d<a.x.length;d++){var h=n+1,f=!0;n===0&&d===0&&(h=0),n===0&&d===1&&(h=1);var p=s.globals.markers.size[r];if(l!==1/0){var m=s.config.plotOptions.bubble;p=s.globals.seriesZ[r][h],m.zScaling&&(p/=l),m.minBubbleRadius&&p<m.minBubbleRadius&&(p=m.minBubbleRadius),m.maxBubbleRadius&&p>m.maxBubbleRadius&&(p=m.maxBubbleRadius)}var b=a.x[d],w=a.y[d];if(p=p||0,w!==null&&s.globals.series[r][h]!==void 0||(f=!1),f){var k=this.drawPoint(b,w,p,r,h,n);u.add(k)}c.add(u)}}},{key:"drawPoint",value:function(e,n,i,s,o,r){var a=this.w,l=s,c=new Dp(this.ctx),u=new di(this.ctx),d=new Xr(this.ctx),h=new Np(this.ctx),f=new Ne(this.ctx),p=h.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:o,radius:a.config.chart.type==="bubble"||a.globals.comboCharts&&a.config.series[s]&&a.config.series[s].type==="bubble"?i:null}),m=d.fillPath({seriesNumber:s,dataPointIndex:o,color:p.pointFillColor,patternUnits:"objectBoundingBox",value:a.globals.series[s][r]}),b=f.drawMarker(e,n,p);if(a.config.series[l].data[o]&&a.config.series[l].data[o].fillColor&&(m=a.config.series[l].data[o].fillColor),b.attr({fill:m}),a.config.chart.dropShadow.enabled){var w=a.config.chart.dropShadow;u.dropShadow(b,w,s)}if(!this.initialAnim||a.globals.dataChanged||a.globals.resized)a.globals.animationEnded=!0;else{var k=a.config.chart.animations.speed;c.animateMarker(b,k,a.globals.easing,function(){window.setTimeout(function(){c.animationCompleted(b)},100)})}return b.attr({rel:o,j:o,index:s,"default-marker-size":p.pSize}),u.setSelectionFilter(b,s,o),h.addEvents(b),b.node.classList.add("apexcharts-marker"),b}},{key:"centerTextInBubble",value:function(e){var n=this.w;return{y:e+=parseInt(n.config.dataLabels.style.fontSize,10)/4}}}]),t}(),np=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"dataLabelsCorrection",value:function(e,n,i,s,o,r,a){var l=this.w,c=!1,u=new Ne(this.ctx).getTextRects(i,a),d=u.width,h=u.height;n<0&&(n=0),n>l.globals.gridHeight+h&&(n=l.globals.gridHeight+h/2),l.globals.dataLabelsRects[s]===void 0&&(l.globals.dataLabelsRects[s]=[]),l.globals.dataLabelsRects[s].push({x:e,y:n,width:d,height:h});var f=l.globals.dataLabelsRects[s].length-2,p=l.globals.lastDrawnDataLabelsIndexes[s]!==void 0?l.globals.lastDrawnDataLabelsIndexes[s][l.globals.lastDrawnDataLabelsIndexes[s].length-1]:0;if(l.globals.dataLabelsRects[s][f]!==void 0){var m=l.globals.dataLabelsRects[s][p];(e>m.x+m.width||n>m.y+m.height||n+h<m.y||e+d<m.x)&&(c=!0)}return(o===0||r)&&(c=!0),{x:e,y:n,textRects:u,drawnextLabel:c}}},{key:"drawDataLabel",value:function(e){var n=this,i=e.type,s=e.pos,o=e.i,r=e.j,a=e.isRangeStart,l=e.strokeWidth,c=l===void 0?2:l,u=this.w,d=new Ne(this.ctx),h=u.config.dataLabels,f=0,p=0,m=r,b=null;if(u.globals.collapsedSeriesIndices.indexOf(o)!==-1||!h.enabled||!Array.isArray(s.x))return b;b=d.group({class:"apexcharts-data-labels"});for(var w=0;w<s.x.length;w++)if(f=s.x[w]+h.offsetX,p=s.y[w]+h.offsetY+c,!isNaN(f)){r===1&&w===0&&(m=0),r===1&&w===1&&(m=1);var k=u.globals.series[o][m];i==="rangeArea"&&(k=a?u.globals.seriesRangeStart[o][m]:u.globals.seriesRangeEnd[o][m]);var C="",A=function(M){return u.config.dataLabels.formatter(M,{ctx:n.ctx,seriesIndex:o,dataPointIndex:m,w:u})};u.config.chart.type==="bubble"?(C=A(k=u.globals.seriesZ[o][m]),p=s.y[w],p=new Cj(this.ctx).centerTextInBubble(p,o,m).y):k!==void 0&&(C=A(k));var S=u.config.dataLabels.textAnchor;u.globals.isSlopeChart&&(S=m===0?"end":m===u.config.series[o].data.length-1?"start":"middle"),this.plotDataLabelsText({x:f,y:p,text:C,i:o,j:m,parent:b,offsetCorrection:!0,dataLabelsConfig:u.config.dataLabels,textAnchor:S})}return b}},{key:"plotDataLabelsText",value:function(e){var n=this.w,i=new Ne(this.ctx),s=e.x,o=e.y,r=e.i,a=e.j,l=e.text,c=e.textAnchor,u=e.fontSize,d=e.parent,h=e.dataLabelsConfig,f=e.color,p=e.alwaysDrawDataLabel,m=e.offsetCorrection,b=e.className,w=null;if(Array.isArray(n.config.dataLabels.enabledOnSeries)&&n.config.dataLabels.enabledOnSeries.indexOf(r)<0)return w;var k={x:s,y:o,drawnextLabel:!0,textRects:null};m&&(k=this.dataLabelsCorrection(s,o,l,r,a,p,parseInt(h.style.fontSize,10))),n.globals.zoomed||(s=k.x,o=k.y),k.textRects&&(s<-20-k.textRects.width||s>n.globals.gridWidth+k.textRects.width+30)&&(l="");var C=n.globals.dataLabels.style.colors[r];((n.config.chart.type==="bar"||n.config.chart.type==="rangeBar")&&n.config.plotOptions.bar.distributed||n.config.dataLabels.distributed)&&(C=n.globals.dataLabels.style.colors[a]),typeof C=="function"&&(C=C({series:n.globals.series,seriesIndex:r,dataPointIndex:a,w:n})),f&&(C=f);var A=h.offsetX,S=h.offsetY;if(n.config.chart.type!=="bar"&&n.config.chart.type!=="rangeBar"||(A=0,S=0),n.globals.isSlopeChart&&(a!==0&&(A=-2*h.offsetX+5),a!==0&&a!==n.config.series[r].data.length-1&&(A=0)),k.drawnextLabel){if((w=i.drawText({width:100,height:parseInt(h.style.fontSize,10),x:s+A,y:o+S,foreColor:C,textAnchor:c||h.textAnchor,text:l,fontSize:u||h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight||"normal"})).attr({class:b||"apexcharts-datalabel",cx:s,cy:o}),h.dropShadow.enabled){var M=h.dropShadow;new di(this.ctx).dropShadow(w,M)}d.add(w),n.globals.lastDrawnDataLabelsIndexes[r]===void 0&&(n.globals.lastDrawnDataLabelsIndexes[r]=[]),n.globals.lastDrawnDataLabelsIndexes[r].push(a)}return w}},{key:"addBackgroundToDataLabel",value:function(e,n){var i=this.w,s=i.config.dataLabels.background,o=s.padding,r=s.padding/2,a=n.width,l=n.height,c=new Ne(this.ctx).drawRect(n.x-o,n.y-r/2,a+2*o,l+r,s.borderRadius,i.config.chart.background!=="transparent"&&i.config.chart.background?i.config.chart.background:"#fff",s.opacity,s.borderWidth,s.borderColor);return s.dropShadow.enabled&&new di(this.ctx).dropShadow(c,s.dropShadow),c}},{key:"dataLabelsBackground",value:function(){var e=this.w;if(e.config.chart.type!=="bubble")for(var n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i<n.length;i++){var s=n[i],o=s.getBBox(),r=null;if(o.width&&o.height&&(r=this.addBackgroundToDataLabel(s,o)),r){s.parentNode.insertBefore(r.node,s);var a=s.getAttribute("fill");e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?r.animate().attr({fill:a}):r.attr({fill:a}),s.setAttribute("fill",e.config.dataLabels.background.foreColor)}}}},{key:"bringForward",value:function(){for(var e=this.w,n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),i=e.globals.dom.baseEl.querySelector(".apexcharts-plot-series:last-child"),s=0;s<n.length;s++)i&&i.insertBefore(n[s],i.nextSibling)}}]),t}(),gr=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.legendInactiveClass="legend-mouseover-inactive"}return ct(t,[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series")}},{key:"getSeriesByName",value:function(e){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(he.escapeString(e),"']"))}},{key:"isSeriesHidden",value:function(e){var n=this.getSeriesByName(e),i=parseInt(n.getAttribute("data:realIndex"),10);return{isHidden:n.classList.contains("apexcharts-series-collapsed"),realIndex:i}}},{key:"addCollapsedClassToSeries",value:function(e,n){var i=this.w;function s(o){for(var r=0;r<o.length;r++)o[r].index===n&&e.node.classList.add("apexcharts-series-collapsed")}s(i.globals.collapsedSeries),s(i.globals.ancillaryCollapsedSeries)}},{key:"toggleSeries",value:function(e){var n=this.isSeriesHidden(e);return this.ctx.legend.legendHelpers.toggleDataSeries(n.realIndex,n.isHidden),n.isHidden}},{key:"showSeries",value:function(e){var n=this.isSeriesHidden(e);n.isHidden&&this.ctx.legend.legendHelpers.toggleDataSeries(n.realIndex,!0)}},{key:"hideSeries",value:function(e){var n=this.isSeriesHidden(e);n.isHidden||this.ctx.legend.legendHelpers.toggleDataSeries(n.realIndex,!1)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],s=this.w,o=he.clone(s.globals.initialSeries);s.globals.previousPaths=[],i?(s.globals.collapsedSeries=[],s.globals.ancillaryCollapsedSeries=[],s.globals.collapsedSeriesIndices=[],s.globals.ancillaryCollapsedSeriesIndices=[]):o=this.emptyCollapsedSeries(o),s.config.series=o,e&&(n&&(s.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(o,s.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(e){for(var n=this.w,i=0;i<e.length;i++)n.globals.collapsedSeriesIndices.indexOf(i)>-1&&(e[i].data=[]);return e}},{key:"highlightSeries",value:function(e){var n=this.w,i=this.getSeriesByName(e),s=parseInt(i==null?void 0:i.getAttribute("data:realIndex"),10),o=n.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),r=null,a=null,l=null;if(n.globals.axisCharts||n.config.chart.type==="radialBar")if(n.globals.axisCharts){r=n.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(s,"']")),a=n.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(s,"']"));var c=n.globals.seriesYAxisReverseMap[s];l=n.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(c,"']"))}else r=n.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(s+1,"']"));else r=n.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(s+1,"'] path"));for(var u=0;u<o.length;u++)o[u].classList.add(this.legendInactiveClass);if(r)n.globals.axisCharts||r.parentNode.classList.remove(this.legendInactiveClass),r.classList.remove(this.legendInactiveClass),a!==null&&a.classList.remove(this.legendInactiveClass),l!==null&&l.classList.remove(this.legendInactiveClass);else for(var d=0;d<o.length;d++)o[d].classList.remove(this.legendInactiveClass)}},{key:"toggleSeriesOnHover",value:function(e,n){var i=this.w;n||(n=e.target);var s=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if(e.type==="mousemove"){var o=parseInt(n.getAttribute("rel"),10)-1;this.highlightSeries(i.globals.seriesNames[o])}else if(e.type==="mouseout")for(var r=0;r<s.length;r++)s[r].classList.remove(this.legendInactiveClass)}},{key:"highlightRangeInSeries",value:function(e,n){var i=this,s=this.w,o=s.globals.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),r=function(c){for(var u=0;u<o.length;u++)o[u].classList[c](i.legendInactiveClass)};if(e.type==="mousemove"){var a=parseInt(n.getAttribute("rel"),10)-1;r("add");var l=s.config.plotOptions.heatmap.colorScale.ranges;(function(c,u){for(var d=0;d<o.length;d++){var h=Number(o[d].getAttribute("val"));h>=c.from&&(h<c.to||c.to===u&&h===u)&&o[d].classList.remove(i.legendInactiveClass)}})(l[a],l.reduce(function(c,u){return Math.max(c,u.to)},0))}else e.type==="mouseout"&&r("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"asc",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=this.w,s=0;if(i.config.series.length>1){for(var o=i.config.series.map(function(a,l){return a.data&&a.data.length>0&&i.globals.collapsedSeriesIndices.indexOf(l)===-1&&(!i.globals.comboCharts||n.length===0||n.length&&n.indexOf(i.config.series[l].type)>-1)?l:-1}),r=e==="asc"?0:o.length-1;e==="asc"?r<o.length:r>=0;e==="asc"?r++:r--)if(o[r]!==-1){s=o[r];break}}return s}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map(function(e,n){return e.type==="bar"||e.type==="column"?n:-1}).filter(function(e){return e!==-1}):this.w.config.series.map(function(e,n){return n})}},{key:"getPreviousPaths",value:function(){var e=this.w;function n(r,a,l){for(var c=r[a].childNodes,u={type:l,paths:[],realIndex:r[a].getAttribute("data:realIndex")},d=0;d<c.length;d++)if(c[d].hasAttribute("pathTo")){var h=c[d].getAttribute("pathTo");u.paths.push({d:h})}e.globals.previousPaths.push(u)}e.globals.previousPaths=[],["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(function(r){for(var a,l=(a=r,e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(a,"-series .apexcharts-series"))),c=0;c<l.length;c++)n(l,c,r)});var i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series"));if(i.length>0)for(var s=function(r){for(var a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(r,"'] rect")),l=[],c=function(d){var h=function(p){return a[d].getAttribute(p)},f={x:parseFloat(h("x")),y:parseFloat(h("y")),width:parseFloat(h("width")),height:parseFloat(h("height"))};l.push({rect:f,color:a[d].getAttribute("color")})},u=0;u<a.length;u++)c(u);e.globals.previousPaths.push(l)},o=0;o<i.length;o++)s(o);e.globals.axisCharts||(e.globals.previousPaths=e.globals.series)}},{key:"clearPreviousPaths",value:function(){var e=this.w;e.globals.previousPaths=[],e.globals.allSeriesCollapsed=!1}},{key:"handleNoData",value:function(){var e=this.w,n=e.config.noData,i=new Ne(this.ctx),s=e.globals.svgWidth/2,o=e.globals.svgHeight/2,r="middle";if(e.globals.noData=!0,e.globals.animationEnded=!0,n.align==="left"?(s=10,r="start"):n.align==="right"&&(s=e.globals.svgWidth-10,r="end"),n.verticalAlign==="top"?o=50:n.verticalAlign==="bottom"&&(o=e.globals.svgHeight-50),s+=n.offsetX,o=o+parseInt(n.style.fontSize,10)+2+n.offsetY,n.text!==void 0&&n.text!==""){var a=i.drawText({x:s,y:o,text:n.text,textAnchor:r,fontSize:n.style.fontSize,fontFamily:n.style.fontFamily,foreColor:n.style.color,opacity:1,class:"apexcharts-text-nodata"});e.globals.dom.Paper.add(a)}}},{key:"setNullSeriesToZeroValues",value:function(e){for(var n=this.w,i=0;i<e.length;i++)if(e[i].length===0)for(var s=0;s<e[n.globals.maxValsInArrayIndex].length;s++)e[i].push(0);return e}},{key:"hasAllSeriesEqualX",value:function(){for(var e=!0,n=this.w,i=this.filteredSeriesX(),s=0;s<i.length-1;s++)if(i[s][0]!==i[s+1][0]){e=!1;break}return n.globals.allSeriesHasEqualX=e,e}},{key:"filteredSeriesX",value:function(){var e=this.w.globals.seriesX.map(function(n){return n.length>0?n:[]});return e}}]),t}(),JS=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new ys(this.ctx)}return ct(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),n=new gr(this.ctx);if(this.activeSeriesIndex=n.getActiveConfigSeriesIndex(),e[this.activeSeriesIndex].data!==void 0&&e[this.activeSeriesIndex].data.length>0&&e[this.activeSeriesIndex].data[0]!==null&&e[this.activeSeriesIndex].data[0].x!==void 0&&e[this.activeSeriesIndex].data[0]!==null)return!0}},{key:"isFormat2DArray",value:function(){var e=this.w.config.series.slice(),n=new gr(this.ctx);if(this.activeSeriesIndex=n.getActiveConfigSeriesIndex(),e[this.activeSeriesIndex].data!==void 0&&e[this.activeSeriesIndex].data.length>0&&e[this.activeSeriesIndex].data[0]!==void 0&&e[this.activeSeriesIndex].data[0]!==null&&e[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(e,n){for(var i=this.w.config,s=this.w.globals,o=i.chart.type==="boxPlot"||i.series[n].type==="boxPlot",r=0;r<e[n].data.length;r++)if(e[n].data[r][1]!==void 0&&(Array.isArray(e[n].data[r][1])&&e[n].data[r][1].length===4&&!o?this.twoDSeries.push(he.parseNumber(e[n].data[r][1][3])):e[n].data[r].length>=5?this.twoDSeries.push(he.parseNumber(e[n].data[r][4])):this.twoDSeries.push(he.parseNumber(e[n].data[r][1])),s.dataFormatXNumeric=!0),i.xaxis.type==="datetime"){var a=new Date(e[n].data[r][0]);a=new Date(a).getTime(),this.twoDSeriesX.push(a)}else this.twoDSeriesX.push(e[n].data[r][0]);for(var l=0;l<e[n].data.length;l++)e[n].data[l][2]!==void 0&&(this.threeDSeries.push(e[n].data[l][2]),s.isDataXYZ=!0)}},{key:"handleFormatXY",value:function(e,n){var i=this.w.config,s=this.w.globals,o=new ri(this.ctx),r=n;s.collapsedSeriesIndices.indexOf(n)>-1&&(r=this.activeSeriesIndex);for(var a=0;a<e[n].data.length;a++)e[n].data[a].y!==void 0&&(Array.isArray(e[n].data[a].y)?this.twoDSeries.push(he.parseNumber(e[n].data[a].y[e[n].data[a].y.length-1])):this.twoDSeries.push(he.parseNumber(e[n].data[a].y))),e[n].data[a].goals!==void 0&&Array.isArray(e[n].data[a].goals)?(this.seriesGoals[n]===void 0&&(this.seriesGoals[n]=[]),this.seriesGoals[n].push(e[n].data[a].goals)):(this.seriesGoals[n]===void 0&&(this.seriesGoals[n]=[]),this.seriesGoals[n].push(null));for(var l=0;l<e[r].data.length;l++){var c=typeof e[r].data[l].x=="string",u=Array.isArray(e[r].data[l].x),d=!u&&!!o.isValidDate(e[r].data[l].x);if(c||d)if(c||i.xaxis.convertedCatToNumeric){var h=s.isBarHorizontal&&s.isRangeData;i.xaxis.type!=="datetime"||h?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[r].data[l].x),isNaN(e[r].data[l].x)||this.w.config.xaxis.type==="category"||typeof e[r].data[l].x=="string"||(s.isXNumeric=!0)):this.twoDSeriesX.push(o.parseDate(e[r].data[l].x))}else i.xaxis.type==="datetime"?this.twoDSeriesX.push(o.parseDate(e[r].data[l].x.toString())):(s.dataFormatXNumeric=!0,s.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(e[r].data[l].x)));else u?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[r].data[l].x)):(s.isXNumeric=!0,s.dataFormatXNumeric=!0,this.twoDSeriesX.push(e[r].data[l].x))}if(e[n].data[0]&&e[n].data[0].z!==void 0){for(var f=0;f<e[n].data.length;f++)this.threeDSeries.push(e[n].data[f].z);s.isDataXYZ=!0}}},{key:"handleRangeData",value:function(e,n){var i=this.w.globals,s={};return this.isFormat2DArray()?s=this.handleRangeDataFormat("array",e,n):this.isFormatXY()&&(s=this.handleRangeDataFormat("xy",e,n)),i.seriesRangeStart.push(s.start===void 0?[]:s.start),i.seriesRangeEnd.push(s.end===void 0?[]:s.end),i.seriesRange.push(s.rangeUniques),i.seriesRange.forEach(function(o,r){o&&o.forEach(function(a,l){a.y.forEach(function(c,u){for(var d=0;d<a.y.length;d++)if(u!==d){var h=c.y1,f=c.y2,p=a.y[d].y1;h<=a.y[d].y2&&p<=f&&(a.overlaps.indexOf(c.rangeName)<0&&a.overlaps.push(c.rangeName),a.overlaps.indexOf(a.y[d].rangeName)<0&&a.overlaps.push(a.y[d].rangeName))}})})}),s}},{key:"handleCandleStickBoxData",value:function(e,n){var i=this.w.globals,s={};return this.isFormat2DArray()?s=this.handleCandleStickBoxDataFormat("array",e,n):this.isFormatXY()&&(s=this.handleCandleStickBoxDataFormat("xy",e,n)),i.seriesCandleO[n]=s.o,i.seriesCandleH[n]=s.h,i.seriesCandleM[n]=s.m,i.seriesCandleL[n]=s.l,i.seriesCandleC[n]=s.c,s}},{key:"handleRangeDataFormat",value:function(e,n,i){var s=[],o=[],r=n[i].data.filter(function(u,d,h){return d===h.findIndex(function(f){return f.x===u.x})}).map(function(u,d){return{x:u.x,overlaps:[],y:[]}});if(e==="array")for(var a=0;a<n[i].data.length;a++)Array.isArray(n[i].data[a])?(s.push(n[i].data[a][1][0]),o.push(n[i].data[a][1][1])):(s.push(n[i].data[a]),o.push(n[i].data[a]));else if(e==="xy")for(var l=function(u){var d=Array.isArray(n[i].data[u].y),h=he.randomId(),f=n[i].data[u].x,p={y1:d?n[i].data[u].y[0]:n[i].data[u].y,y2:d?n[i].data[u].y[1]:n[i].data[u].y,rangeName:h};n[i].data[u].rangeName=h;var m=r.findIndex(function(b){return b.x===f});r[m].y.push(p),s.push(p.y1),o.push(p.y2)},c=0;c<n[i].data.length;c++)l(c);return{start:s,end:o,rangeUniques:r}}},{key:"handleCandleStickBoxDataFormat",value:function(e,n,i){var s=this.w,o=s.config.chart.type==="boxPlot"||s.config.series[i].type==="boxPlot",r=[],a=[],l=[],c=[],u=[];if(e==="array")if(o&&n[i].data[0].length===6||!o&&n[i].data[0].length===5)for(var d=0;d<n[i].data.length;d++)r.push(n[i].data[d][1]),a.push(n[i].data[d][2]),o?(l.push(n[i].data[d][3]),c.push(n[i].data[d][4]),u.push(n[i].data[d][5])):(c.push(n[i].data[d][3]),u.push(n[i].data[d][4]));else for(var h=0;h<n[i].data.length;h++)Array.isArray(n[i].data[h][1])&&(r.push(n[i].data[h][1][0]),a.push(n[i].data[h][1][1]),o?(l.push(n[i].data[h][1][2]),c.push(n[i].data[h][1][3]),u.push(n[i].data[h][1][4])):(c.push(n[i].data[h][1][2]),u.push(n[i].data[h][1][3])));else if(e==="xy")for(var f=0;f<n[i].data.length;f++)Array.isArray(n[i].data[f].y)&&(r.push(n[i].data[f].y[0]),a.push(n[i].data[f].y[1]),o?(l.push(n[i].data[f].y[2]),c.push(n[i].data[f].y[3]),u.push(n[i].data[f].y[4])):(c.push(n[i].data[f].y[2]),u.push(n[i].data[f].y[3])));return{o:r,h:a,m:l,l:c,c:u}}},{key:"parseDataAxisCharts",value:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.ctx,s=this.w.config,o=this.w.globals,r=new ri(i),a=s.labels.length>0?s.labels.slice():s.xaxis.categories.slice();o.isRangeBar=s.chart.type==="rangeBar"&&o.isBarHorizontal,o.hasXaxisGroups=s.xaxis.type==="category"&&s.xaxis.group.groups.length>0,o.hasXaxisGroups&&(o.groups=s.xaxis.group.groups),e.forEach(function(f,p){f.name!==void 0?o.seriesNames.push(f.name):o.seriesNames.push("series-"+parseInt(p+1,10))}),this.coreUtils.setSeriesYAxisMappings();var l=[],c=Ns(new Set(s.series.map(function(f){return f.group})));s.series.forEach(function(f,p){var m=c.indexOf(f.group);l[m]||(l[m]=[]),l[m].push(o.seriesNames[p])}),o.seriesGroups=l;for(var u=function(){for(var f=0;f<a.length;f++)if(typeof a[f]=="string"){if(!r.isValidDate(a[f]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");n.twoDSeriesX.push(r.parseDate(a[f]))}else n.twoDSeriesX.push(a[f])},d=0;d<e.length;d++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],e[d].data===void 0)return void console.error("It is a possibility that you may have not included 'data' property in series.");if(s.chart.type!=="rangeBar"&&s.chart.type!=="rangeArea"&&e[d].type!=="rangeBar"&&e[d].type!=="rangeArea"||(o.isRangeData=!0,s.chart.type!=="rangeBar"&&s.chart.type!=="rangeArea"||this.handleRangeData(e,d)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(e,d):this.isFormatXY()&&this.handleFormatXY(e,d),s.chart.type!=="candlestick"&&e[d].type!=="candlestick"&&s.chart.type!=="boxPlot"&&e[d].type!=="boxPlot"||this.handleCandleStickBoxData(e,d),o.series.push(this.twoDSeries),o.labels.push(this.twoDSeriesX),o.seriesX.push(this.twoDSeriesX),o.seriesGoals=this.seriesGoals,d!==this.activeSeriesIndex||this.fallbackToCategory||(o.isXNumeric=!0);else{s.xaxis.type==="datetime"?(o.isXNumeric=!0,u(),o.seriesX.push(this.twoDSeriesX)):s.xaxis.type==="numeric"&&(o.isXNumeric=!0,a.length>0&&(this.twoDSeriesX=a,o.seriesX.push(this.twoDSeriesX))),o.labels.push(this.twoDSeriesX);var h=e[d].data.map(function(f){return he.parseNumber(f)});o.series.push(h)}o.seriesZ.push(this.threeDSeries),e[d].color!==void 0?o.seriesColors.push(e[d].color):o.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(e){var n=this.w.globals,i=this.w.config;n.series=e.slice(),n.seriesNames=i.labels.slice();for(var s=0;s<n.series.length;s++)n.seriesNames[s]===void 0&&n.seriesNames.push("series-"+(s+1));return this.w}},{key:"handleExternalLabelsData",value:function(e){var n=this.w.config,i=this.w.globals;n.xaxis.categories.length>0?i.labels=n.xaxis.categories:n.labels.length>0?i.labels=n.labels.slice():this.fallbackToCategory?(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map(function(s){s.forEach(function(o){i.labels.indexOf(o.x)<0&&o.x&&i.labels.push(o.x)})}),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),n.xaxis.convertedCatToNumeric&&(new x1(n).convertCatToNumericXaxis(n,this.ctx,i.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}},{key:"_generateExternalLabels",value:function(e){var n=this.w.globals,i=this.w.config,s=[];if(n.axisCharts){if(n.series.length>0)if(this.isFormatXY())for(var o=i.series.map(function(d,h){return d.data.filter(function(f,p,m){return m.findIndex(function(b){return b.x===f.x})===p})}),r=o.reduce(function(d,h,f,p){return p[d].length>h.length?d:f},0),a=0;a<o[r].length;a++)s.push(a+1);else for(var l=0;l<n.series[n.maxValsInArrayIndex].length;l++)s.push(l+1);n.seriesX=[];for(var c=0;c<e.length;c++)n.seriesX.push(s);this.w.globals.isBarHorizontal||(n.isXNumeric=!0)}if(s.length===0){s=n.axisCharts?[]:n.series.map(function(d,h){return h+1});for(var u=0;u<e.length;u++)n.seriesX.push(s)}n.labels=s,i.xaxis.convertedCatToNumeric&&(n.categoryLabels=s.map(function(d){return i.xaxis.labels.formatter(d)})),n.noLabelsProvided=!0}},{key:"parseData",value:function(e){var n=this.w,i=n.config,s=n.globals;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.ctx.core.resetGlobals(),this.ctx.core.isMultipleY(),s.axisCharts?(this.parseDataAxisCharts(e),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(e),i.chart.stacked){var o=new gr(this.ctx);s.series=o.setNullSeriesToZeroValues(s.series)}this.coreUtils.getSeriesTotals(),s.axisCharts&&(s.stackedSeriesTotals=this.coreUtils.getStackedSeriesTotals(),s.stackedSeriesTotalsByGroups=this.coreUtils.getStackedSeriesTotalsByGroups()),this.coreUtils.getPercentSeries(),s.dataFormatXNumeric||s.isXNumeric&&(i.xaxis.type!=="numeric"||i.labels.length!==0||i.xaxis.categories.length!==0)||this.handleExternalLabelsData(e);for(var r=this.coreUtils.getCategoryLabels(s.labels),a=0;a<r.length;a++)if(Array.isArray(r[a])){s.isMultiLineX=!0;break}}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var e=this.w,n=[];e.globals.seriesYAxisMap.forEach(function(i,s){var o=0;i.forEach(function(r){e.globals.collapsedSeriesIndices.indexOf(r)!==-1&&o++}),o>0&&o==i.length&&n.push(s)}),e.globals.ignoreYAxisIndexes=n.map(function(i){return i})}}]),t}(),rb=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"scaleSvgNode",value:function(e,n){var i=parseFloat(e.getAttributeNS(null,"width")),s=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",i*n),e.setAttributeNS(null,"height",s*n),e.setAttributeNS(null,"viewBox","0 0 "+i+" "+s)}},{key:"getSvgString",value:function(){var e=this;return new Promise(function(n){var i=e.w,s=i.config.chart.toolbar.export.width,o=i.config.chart.toolbar.export.scale||s/i.globals.svgWidth;o||(o=1);var r=e.w.globals.dom.Paper.svg(),a=e.w.globals.dom.Paper.node.cloneNode(!0);o!==1&&e.scaleSvgNode(a,o),e.convertImagesToBase64(a).then(function(){r=new XMLSerializer().serializeToString(a),n(r.replace(/&nbsp;/g,"&#160;"))})})}},{key:"convertImagesToBase64",value:function(e){var n=this,i=e.getElementsByTagName("image"),s=Array.from(i).map(function(o){var r=o.getAttributeNS("http://www.w3.org/1999/xlink","href");return r&&!r.startsWith("data:")?n.getBase64FromUrl(r).then(function(a){o.setAttributeNS("http://www.w3.org/1999/xlink","href",a)}).catch(function(a){console.error("Error converting image to base64:",a)}):Promise.resolve()});return Promise.all(s)}},{key:"getBase64FromUrl",value:function(e){return new Promise(function(n,i){var s=new Image;s.crossOrigin="Anonymous",s.onload=function(){var o=document.createElement("canvas");o.width=s.width,o.height=s.height,o.getContext("2d").drawImage(s,0,0),n(o.toDataURL())},s.onerror=i,s.src=e})}},{key:"cleanup",value:function(){var e=this.w,n=e.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=e.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(s,function(o){o.setAttribute("width",0)}),n&&n[0]&&(n[0].setAttribute("x",-500),n[0].setAttribute("x1",-500),n[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var e=this;return new Promise(function(n){e.cleanup(),e.getSvgString().then(function(i){var s=new Blob([i],{type:"image/svg+xml;charset=utf-8"});n(URL.createObjectURL(s))})})}},{key:"dataURI",value:function(e){var n=this;return new Promise(function(i){var s=n.w,o=e?e.scale||e.width/s.globals.svgWidth:1;n.cleanup();var r=document.createElement("canvas");r.width=s.globals.svgWidth*o,r.height=parseInt(s.globals.dom.elWrap.style.height,10)*o;var a=s.config.chart.background!=="transparent"&&s.config.chart.background?s.config.chart.background:"#fff",l=r.getContext("2d");l.fillStyle=a,l.fillRect(0,0,r.width*o,r.height*o),n.getSvgString().then(function(c){var u="data:image/svg+xml,"+encodeURIComponent(c),d=new Image;d.crossOrigin="anonymous",d.onload=function(){if(l.drawImage(d,0,0),r.msToBlob){var h=r.msToBlob();i({blob:h})}else{var f=r.toDataURL("image/png");i({imgURI:f})}},d.src=u})})}},{key:"exportToSVG",value:function(){var e=this;this.svgUrl().then(function(n){e.triggerDownload(n,e.w.config.chart.toolbar.export.svg.filename,".svg")})}},{key:"exportToPng",value:function(){var e=this,n=this.w.config.chart.toolbar.export.scale,i=this.w.config.chart.toolbar.export.width,s=n?{scale:n}:i?{width:i}:void 0;this.dataURI(s).then(function(o){var r=o.imgURI,a=o.blob;a?navigator.msSaveOrOpenBlob(a,e.w.globals.chartID+".png"):e.triggerDownload(r,e.w.config.chart.toolbar.export.png.filename,".png")})}},{key:"exportToCSV",value:function(e){var n=this,i=e.series,s=e.fileName,o=e.columnDelimiter,r=o===void 0?",":o,a=e.lineDelimiter,l=a===void 0?`
174 +`:a,c=this.w;i||(i=c.config.series);var u=[],d=[],h="",f=c.globals.series.map(function(S,M){return c.globals.collapsedSeriesIndices.indexOf(M)===-1?S:[]}),p=function(S){return typeof c.config.chart.toolbar.export.csv.categoryFormatter=="function"?c.config.chart.toolbar.export.csv.categoryFormatter(S):c.config.xaxis.type==="datetime"&&String(S).length>=10?new Date(S).toDateString():he.isNumber(S)?S:S.split(r).join("")},m=function(S){return typeof c.config.chart.toolbar.export.csv.valueFormatter=="function"?c.config.chart.toolbar.export.csv.valueFormatter(S):S},b=Math.max.apply(Math,Ns(i.map(function(S){return S.data?S.data.length:0}))),w=new JS(this.ctx),k=new qc(this.ctx),C=function(S){var M="";if(c.globals.axisCharts){if(c.config.xaxis.type==="category"||c.config.xaxis.convertedCatToNumeric)if(c.globals.isBarHorizontal){var P=c.globals.yLabelFormatters[0],T=new gr(n.ctx).getActiveConfigSeriesIndex();M=P(c.globals.labels[S],{seriesIndex:T,dataPointIndex:S,w:c})}else M=k.getLabel(c.globals.labels,c.globals.timescaleLabels,0,S).text;c.config.xaxis.type==="datetime"&&(c.config.xaxis.categories.length?M=c.config.xaxis.categories[S]:c.config.labels.length&&(M=c.config.labels[S]))}else M=c.config.labels[S];return M===null?"nullvalue":(Array.isArray(M)&&(M=M.join(" ")),he.isNumber(M)?M:M.split(r).join(""))},A=function(S,M){if(u.length&&M===0&&d.push(u.join(r)),S.data){S.data=S.data.length&&S.data||Ns(Array(b)).map(function(){return""});for(var P=0;P<S.data.length;P++){u=[];var T=C(P);if(T!=="nullvalue"){if(T||(w.isFormatXY()?T=i[M].data[P].x:w.isFormat2DArray()&&(T=i[M].data[P]?i[M].data[P][0]:"")),M===0){u.push(p(T));for(var I=0;I<c.globals.series.length;I++){var L,R=w.isFormatXY()?(L=i[I].data[P])===null||L===void 0?void 0:L.y:f[I][P];u.push(m(R))}}(c.config.chart.type==="candlestick"||S.type&&S.type==="candlestick")&&(u.pop(),u.push(c.globals.seriesCandleO[M][P]),u.push(c.globals.seriesCandleH[M][P]),u.push(c.globals.seriesCandleL[M][P]),u.push(c.globals.seriesCandleC[M][P])),(c.config.chart.type==="boxPlot"||S.type&&S.type==="boxPlot")&&(u.pop(),u.push(c.globals.seriesCandleO[M][P]),u.push(c.globals.seriesCandleH[M][P]),u.push(c.globals.seriesCandleM[M][P]),u.push(c.globals.seriesCandleL[M][P]),u.push(c.globals.seriesCandleC[M][P])),c.config.chart.type==="rangeBar"&&(u.pop(),u.push(c.globals.seriesRangeStart[M][P]),u.push(c.globals.seriesRangeEnd[M][P])),u.length&&d.push(u.join(r))}}}};u.push(c.config.chart.toolbar.export.csv.headerCategory),c.config.chart.type==="boxPlot"?(u.push("minimum"),u.push("q1"),u.push("median"),u.push("q3"),u.push("maximum")):c.config.chart.type==="candlestick"?(u.push("open"),u.push("high"),u.push("low"),u.push("close")):c.config.chart.type==="rangeBar"?(u.push("minimum"),u.push("maximum")):i.map(function(S,M){var P=(S.name?S.name:"series-".concat(M))+"";c.globals.axisCharts&&u.push(P.split(r).join("")?P.split(r).join(""):"series-".concat(M))}),c.globals.axisCharts||(u.push(c.config.chart.toolbar.export.csv.headerValue),d.push(u.join(r))),c.globals.allSeriesHasEqualX||!c.globals.axisCharts||c.config.xaxis.categories.length||c.config.labels.length?i.map(function(S,M){c.globals.axisCharts?A(S,M):((u=[]).push(p(c.globals.labels[M])),u.push(m(f[M])),d.push(u.join(r)))}):function(){var S=new Set,M={};i.forEach(function(P,T){P==null||P.data.forEach(function(I){var L,R;if(w.isFormatXY())L=I.x,R=I.y;else{if(!w.isFormat2DArray())return;L=I[0],R=I[1]}M[L]||(M[L]=Array(i.length).fill("")),M[L][T]=m(R),S.add(L)})}),u.length&&d.push(u.join(r)),Array.from(S).sort().forEach(function(P){d.push([p(P),M[P].join(r)])})}(),h+=d.join(l),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\uFEFF"+h),s||c.config.chart.toolbar.export.csv.filename,".csv")}},{key:"triggerDownload",value:function(e,n,i){var s=document.createElement("a");s.href=e,s.download=(n||this.w.globals.chartID)+i,document.body.appendChild(s),s.click(),document.body.removeChild(s)}}]),t}(),$1=function(){function t(e,n){lt(this,t),this.ctx=e,this.elgrid=n,this.w=e.w;var i=this.w;this.axesUtils=new qc(e),this.xaxisLabels=i.globals.labels.slice(),i.globals.timescaleLabels.length>0&&!i.globals.isBarHorizontal&&(this.xaxisLabels=i.globals.timescaleLabels.slice()),i.config.xaxis.overwriteCategories&&(this.xaxisLabels=i.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],i.config.xaxis.position==="top"?this.offY=0:this.offY=i.globals.gridHeight,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=i.config.chart.type==="bar"&&i.config.plotOptions.bar.horizontal,this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.xaxisBorderWidth=i.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=i.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=i.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=i.config.xaxis.axisBorder.height,this.yaxis=i.config.yaxis[0]}return ct(t,[{key:"drawXaxis",value:function(){var e=this.w,n=new Ne(this.ctx),i=n.group({class:"apexcharts-xaxis",transform:"translate(".concat(e.config.xaxis.offsetX,", ").concat(e.config.xaxis.offsetY,")")}),s=n.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});i.add(s);for(var o=[],r=0;r<this.xaxisLabels.length;r++)o.push(this.xaxisLabels[r]);if(this.drawXAxisLabelAndGroup(!0,n,s,o,e.globals.isXNumeric,function(p,m){return m}),e.globals.hasXaxisGroups){var a=e.globals.groups;o=[];for(var l=0;l<a.length;l++)o.push(a[l].title);var c={};e.config.xaxis.group.style&&(c.xaxisFontSize=e.config.xaxis.group.style.fontSize,c.xaxisFontFamily=e.config.xaxis.group.style.fontFamily,c.xaxisForeColors=e.config.xaxis.group.style.colors,c.fontWeight=e.config.xaxis.group.style.fontWeight,c.cssClass=e.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,n,s,o,!1,function(p,m){return a[p].cols*m},c)}if(e.config.xaxis.title.text!==void 0){var u=n.group({class:"apexcharts-xaxis-title"}),d=n.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(e.config.xaxis.position==="bottom"?e.globals.xAxisLabelsHeight:-e.globals.xAxisLabelsHeight-10)+e.config.xaxis.title.offsetY,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});u.add(d),i.add(u)}if(e.config.xaxis.axisBorder.show){var h=e.globals.barPadForNumericAxis,f=n.drawLine(e.globals.padHorizontal+e.config.xaxis.axisBorder.offsetX-h,this.offY,this.xaxisBorderWidth+h,this.offY,e.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(f):i.add(f)}return i}},{key:"drawXAxisLabelAndGroup",value:function(e,n,i,s,o,r){var a,l=this,c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:{},u=[],d=[],h=this.w,f=c.xaxisFontSize||this.xaxisFontSize,p=c.xaxisFontFamily||this.xaxisFontFamily,m=c.xaxisForeColors||this.xaxisForeColors,b=c.fontWeight||h.config.xaxis.labels.style.fontWeight,w=c.cssClass||h.config.xaxis.labels.style.cssClass,k=h.globals.padHorizontal,C=s.length,A=h.config.xaxis.type==="category"?h.globals.dataPoints:C;if(A===0&&C>A&&(A=C),o){var S=Math.max(Number(h.config.xaxis.tickAmount)||1,A>1?A-1:A);a=h.globals.gridWidth/Math.min(S,C-1),k=k+r(0,a)/2+h.config.xaxis.labels.offsetX}else a=h.globals.gridWidth/A,k=k+r(0,a)+h.config.xaxis.labels.offsetX;for(var M=function(T){var I=k-r(T,a)/2+h.config.xaxis.labels.offsetX;T===0&&C===1&&a/2===k&&A===1&&(I=h.globals.gridWidth/2);var L=l.axesUtils.getLabel(s,h.globals.timescaleLabels,I,T,u,f,e),R=28;if(h.globals.rotateXLabels&&e&&(R=22),h.config.xaxis.title.text&&h.config.xaxis.position==="top"&&(R+=parseFloat(h.config.xaxis.title.style.fontSize)+2),e||(R=R+parseFloat(f)+(h.globals.xAxisLabelsHeight-h.globals.xAxisGroupLabelsHeight)+(h.globals.rotateXLabels?10:0)),L=h.config.xaxis.tickAmount!==void 0&&h.config.xaxis.tickAmount!=="dataPoints"&&h.config.xaxis.type!=="datetime"?l.axesUtils.checkLabelBasedOnTickamount(T,L,C):l.axesUtils.checkForOverflowingLabels(T,L,C,u,d),h.config.xaxis.labels.show){var V=n.drawText({x:L.x,y:l.offY+h.config.xaxis.labels.offsetY+R-(h.config.xaxis.position==="top"?h.globals.xAxisHeight+h.config.xaxis.axisTicks.height-2:0),text:L.text,textAnchor:"middle",fontWeight:L.isBold?600:b,fontSize:f,fontFamily:p,foreColor:Array.isArray(m)?e&&h.config.xaxis.convertedCatToNumeric?m[h.globals.minX+T-1]:m[T]:m,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+w});if(i.add(V),V.on("click",function(F){if(typeof h.config.chart.events.xAxisLabelClick=="function"){var U=Object.assign({},h,{labelIndex:T});h.config.chart.events.xAxisLabelClick(F,l.ctx,U)}}),e){var H=document.createElementNS(h.globals.SVGNS,"title");H.textContent=Array.isArray(L.text)?L.text.join(" "):L.text,V.node.appendChild(H),L.text!==""&&(u.push(L.text),d.push(L))}}T<C-1&&(k+=r(T+1,a))},P=0;P<=C-1;P++)M(P)}},{key:"drawXaxisInversed",value:function(e){var n,i,s=this,o=this.w,r=new Ne(this.ctx),a=o.config.yaxis[0].opposite?o.globals.translateYAxisX[e]:0,l=r.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:e}),c=r.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+a+", 0)"});l.add(c);var u=[];if(o.config.yaxis[e].show)for(var d=0;d<this.xaxisLabels.length;d++)u.push(this.xaxisLabels[d]);n=o.globals.gridHeight/u.length,i=-n/2.2;var h=o.globals.yLabelFormatters[0],f=o.config.yaxis[0].labels;if(f.show)for(var p=function(S){var M=u[S]===void 0?"":u[S];M=h(M,{seriesIndex:e,dataPointIndex:S,w:o});var P=s.axesUtils.getYAxisForeColor(f.style.colors,e),T=0;Array.isArray(M)&&(T=M.length/2*parseInt(f.style.fontSize,10));var I=f.offsetX-15,L="end";s.yaxis.opposite&&(L="start"),o.config.yaxis[0].labels.align==="left"?(I=f.offsetX,L="start"):o.config.yaxis[0].labels.align==="center"?(I=f.offsetX,L="middle"):o.config.yaxis[0].labels.align==="right"&&(L="end");var R=r.drawText({x:I,y:i+n+f.offsetY-T,text:M,textAnchor:L,foreColor:Array.isArray(P)?P[S]:P,fontSize:f.style.fontSize,fontFamily:f.style.fontFamily,fontWeight:f.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+f.style.cssClass,maxWidth:f.maxWidth});c.add(R),R.on("click",function(F){if(typeof o.config.chart.events.xAxisLabelClick=="function"){var U=Object.assign({},o,{labelIndex:S});o.config.chart.events.xAxisLabelClick(F,s.ctx,U)}});var V=document.createElementNS(o.globals.SVGNS,"title");if(V.textContent=Array.isArray(M)?M.join(" "):M,R.node.appendChild(V),o.config.yaxis[e].labels.rotate!==0){var H=r.rotateAroundCenter(R.node);R.node.setAttribute("transform","rotate(".concat(o.config.yaxis[e].labels.rotate," 0 ").concat(H.y,")"))}i+=n},m=0;m<=u.length-1;m++)p(m);if(o.config.yaxis[0].title.text!==void 0){var b=r.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+a+", 0)"}),w=r.drawText({x:o.config.yaxis[0].title.offsetX,y:o.globals.gridHeight/2+o.config.yaxis[0].title.offsetY,text:o.config.yaxis[0].title.text,textAnchor:"middle",foreColor:o.config.yaxis[0].title.style.color,fontSize:o.config.yaxis[0].title.style.fontSize,fontWeight:o.config.yaxis[0].title.style.fontWeight,fontFamily:o.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+o.config.yaxis[0].title.style.cssClass});b.add(w),l.add(b)}var k=0;this.isCategoryBarHorizontal&&o.config.yaxis[0].opposite&&(k=o.globals.gridWidth);var C=o.config.xaxis.axisBorder;if(C.show){var A=r.drawLine(o.globals.padHorizontal+C.offsetX+k,1+C.offsetY,o.globals.padHorizontal+C.offsetX+k,o.globals.gridHeight+C.offsetY,C.color,0);this.elgrid&&this.elgrid.elGridBorders&&o.config.grid.show?this.elgrid.elGridBorders.add(A):l.add(A)}return o.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(k,u.length,o.config.yaxis[0].axisBorder,o.config.yaxis[0].axisTicks,0,n,l),l}},{key:"drawXaxisTicks",value:function(e,n,i){var s=this.w,o=e;if(!(e<0||e-2>s.globals.gridWidth)){var r=this.offY+s.config.xaxis.axisTicks.offsetY;if(n=n+r+s.config.xaxis.axisTicks.height,s.config.xaxis.position==="top"&&(n=r-s.config.xaxis.axisTicks.height),s.config.xaxis.axisTicks.show){var a=new Ne(this.ctx).drawLine(e+s.config.xaxis.axisTicks.offsetX,r+s.config.xaxis.offsetY,o+s.config.xaxis.axisTicks.offsetX,n+s.config.xaxis.offsetY,s.config.xaxis.axisTicks.color);i.add(a),a.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var e=this.w,n=[],i=this.xaxisLabels.length,s=e.globals.padHorizontal;if(e.globals.timescaleLabels.length>0)for(var o=0;o<i;o++)s=this.xaxisLabels[o].position,n.push(s);else for(var r=i,a=0;a<r;a++){var l=r;e.globals.isXNumeric&&e.config.chart.type!=="bar"&&(l-=1),s+=e.globals.gridWidth/l,n.push(s)}return n}},{key:"xAxisLabelCorrections",value:function(){var e=this.w,n=new Ne(this.ctx),i=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(e.globals.rotateXLabels||e.config.xaxis.labels.rotateAlways)for(var a=0;a<s.length;a++){var l=n.rotateAroundCenter(s[a]);l.y=l.y-1,l.x=l.x+1,s[a].setAttribute("transform","rotate(".concat(e.config.xaxis.labels.rotate," ").concat(l.x," ").concat(l.y,")")),s[a].setAttribute("text-anchor","end"),i.setAttribute("transform","translate(0, ".concat(-10,")"));var c=s[a].childNodes;e.config.xaxis.labels.trim&&Array.prototype.forEach.call(c,function(f){n.placeTextWithEllipsis(f,f.textContent,e.globals.xAxisLabelsHeight-(e.config.legend.position==="bottom"?20:10))})}else(function(){for(var f=e.globals.gridWidth/(e.globals.labels.length+1),p=0;p<s.length;p++){var m=s[p].childNodes;e.config.xaxis.labels.trim&&e.config.xaxis.type!=="datetime"&&Array.prototype.forEach.call(m,function(b){n.placeTextWithEllipsis(b,b.textContent,f)})}})();if(o.length>0){var u=o[o.length-1].getBBox(),d=o[0].getBBox();u.x<-20&&o[o.length-1].parentNode.removeChild(o[o.length-1]),d.x+d.width>e.globals.gridWidth&&!e.globals.isBarHorizontal&&o[0].parentNode.removeChild(o[0]);for(var h=0;h<r.length;h++)n.placeTextWithEllipsis(r[h],r[h].textContent,e.config.yaxis[0].labels.maxWidth-(e.config.yaxis[0].title.text?2*parseFloat(e.config.yaxis[0].title.style.fontSize):0)-15)}}}]),t}(),xj=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.xaxisLabels=n.globals.labels.slice(),this.axesUtils=new qc(e),this.isRangeBar=n.globals.seriesRange.length&&n.globals.isBarHorizontal,n.globals.timescaleLabels.length>0&&(this.xaxisLabels=n.globals.timescaleLabels.slice())}return ct(t,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=this.w,i=new Ne(this.ctx);e||(e=i.group({class:"apexcharts-grid"}));var s=i.drawLine(n.globals.padHorizontal,1,n.globals.padHorizontal,n.globals.gridHeight,"transparent"),o=i.drawLine(n.globals.padHorizontal,n.globals.gridHeight,n.globals.gridWidth,n.globals.gridHeight,"transparent");return e.add(o),e.add(s),e}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var e=this.renderGrid();return this.drawGridArea(e.el),e}return null}},{key:"createGridMask",value:function(){var e=this.w,n=e.globals,i=new Ne(this.ctx),s=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,Ns(e.config.stroke.width)):e.config.stroke.width,o=function(u){var d=document.createElementNS(n.SVGNS,"clipPath");return d.setAttribute("id",u),d};n.dom.elGridRectMask=o("gridRectMask".concat(n.cuid)),n.dom.elGridRectBarMask=o("gridRectBarMask".concat(n.cuid)),n.dom.elGridRectMarkerMask=o("gridRectMarkerMask".concat(n.cuid)),n.dom.elForecastMask=o("forecastMask".concat(n.cuid)),n.dom.elNonForecastMask=o("nonForecastMask".concat(n.cuid));var r=0,a=0;(["bar","rangeBar","candlestick","boxPlot"].includes(e.config.chart.type)||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&(r=Math.max(e.config.grid.padding.left,n.barPadForNumericAxis),a=Math.max(e.config.grid.padding.right,n.barPadForNumericAxis)),n.dom.elGridRect=i.drawRect(0,0,n.gridWidth,n.gridHeight,0,"#fff"),n.dom.elGridRectBar=i.drawRect(-s/2-r-2,-s/2-2,n.gridWidth+s+a+r+4,n.gridHeight+s+4,0,"#fff");var l=e.globals.markers.largestSize;n.dom.elGridRectMarker=i.drawRect(-l,-l,n.gridWidth+2*l,n.gridHeight+2*l,0,"#fff"),n.dom.elGridRectMask.appendChild(n.dom.elGridRect.node),n.dom.elGridRectBarMask.appendChild(n.dom.elGridRectBar.node),n.dom.elGridRectMarkerMask.appendChild(n.dom.elGridRectMarker.node);var c=n.dom.baseEl.querySelector("defs");c.appendChild(n.dom.elGridRectMask),c.appendChild(n.dom.elGridRectBarMask),c.appendChild(n.dom.elGridRectMarkerMask),c.appendChild(n.dom.elForecastMask),c.appendChild(n.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(e){var n=e.i,i=e.x1,s=e.y1,o=e.x2,r=e.y2,a=e.xCount,l=e.parent,c=this.w;if(!(n===0&&c.globals.skipFirstTimelinelabel||n===a-1&&c.globals.skipLastTimelinelabel&&!c.config.xaxis.labels.formatter||c.config.chart.type==="radar")){c.config.grid.xaxis.lines.show&&this._drawGridLine({i:n,x1:i,y1:s,x2:o,y2:r,xCount:a,parent:l});var u=0;if(c.globals.hasXaxisGroups&&c.config.xaxis.tickPlacement==="between"){var d=c.globals.groups;if(d){for(var h=0,f=0;h<n&&f<d.length;f++)h+=d[f].cols;h===n&&(u=.6*c.globals.xAxisLabelsHeight)}}new $1(this.ctx).drawXaxisTicks(i,u,c.globals.dom.elGraphical)}}},{key:"_drawGridLine",value:function(e){var n=e.i,i=e.x1,s=e.y1,o=e.x2,r=e.y2,a=e.xCount,l=e.parent,c=this.w,u=l.node.classList.contains("apexcharts-gridlines-horizontal"),d=c.globals.barPadForNumericAxis,h=s===0&&r===0||i===0&&o===0||s===c.globals.gridHeight&&r===c.globals.gridHeight||c.globals.isBarHorizontal&&(n===0||n===a-1),f=new Ne(this).drawLine(i-(u?d:0),s,o+(u?d:0),r,c.config.grid.borderColor,c.config.grid.strokeDashArray);f.node.classList.add("apexcharts-gridline"),h&&c.config.grid.show?this.elGridBorders.add(f):l.add(f)}},{key:"_drawGridBandRect",value:function(e){var n=e.c,i=e.x1,s=e.y1,o=e.x2,r=e.y2,a=e.type,l=this.w,c=new Ne(this.ctx),u=l.globals.barPadForNumericAxis,d=l.config.grid[a].colors[n],h=c.drawRect(i-(a==="row"?u:0),s,o+(a==="row"?2*u:0),r,0,d,l.config.grid[a].opacity);this.elg.add(h),h.attr("clip-path","url(#gridRectMask".concat(l.globals.cuid,")")),h.node.classList.add("apexcharts-grid-".concat(a))}},{key:"_drawXYLines",value:function(e){var n=this,i=e.xCount,s=e.tickAmount,o=this.w;if(o.config.grid.xaxis.lines.show||o.config.xaxis.axisTicks.show){var r,a=o.globals.padHorizontal,l=o.globals.gridHeight;o.globals.timescaleLabels.length?function(p){for(var m=p.xC,b=p.x1,w=p.y1,k=p.x2,C=p.y2,A=0;A<m;A++)b=n.xaxisLabels[A].position,k=n.xaxisLabels[A].position,n._drawGridLines({i:A,x1:b,y1:w,x2:k,y2:C,xCount:i,parent:n.elgridLinesV})}({xC:i,x1:a,y1:0,x2:r,y2:l}):(o.globals.isXNumeric&&(i=o.globals.xAxisScale.result.length),function(p){for(var m=p.xC,b=p.x1,w=p.y1,k=p.x2,C=p.y2,A=0;A<m+(o.globals.isXNumeric?0:1);A++)A===0&&m===1&&o.globals.dataPoints===1&&(k=b=o.globals.gridWidth/2),n._drawGridLines({i:A,x1:b,y1:w,x2:k,y2:C,xCount:i,parent:n.elgridLinesV}),k=b+=o.globals.gridWidth/(o.globals.isXNumeric?m-1:m)}({xC:i,x1:a,y1:0,x2:r,y2:l}))}if(o.config.grid.yaxis.lines.show){var c=0,u=0,d=o.globals.gridWidth,h=s+1;this.isRangeBar&&(h=o.globals.labels.length);for(var f=0;f<h+(this.isRangeBar?1:0);f++)this._drawGridLine({i:f,xCount:h+(this.isRangeBar?1:0),x1:0,y1:c,x2:d,y2:u,parent:this.elgridLinesH}),u=c+=o.globals.gridHeight/(this.isRangeBar?h:s)}}},{key:"_drawInvertedXYLines",value:function(e){var n=e.xCount,i=this.w;if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show)for(var s,o=i.globals.padHorizontal,r=i.globals.gridHeight,a=0;a<n+1;a++)i.config.grid.xaxis.lines.show&&this._drawGridLine({i:a,xCount:n+1,x1:o,y1:0,x2:s,y2:r,parent:this.elgridLinesV}),new $1(this.ctx).drawXaxisTicks(o,0,i.globals.dom.elGraphical),s=o+=i.globals.gridWidth/n;if(i.config.grid.yaxis.lines.show)for(var l=0,c=0,u=i.globals.gridWidth,d=0;d<i.globals.dataPoints+1;d++)this._drawGridLine({i:d,xCount:i.globals.dataPoints+1,x1:0,y1:l,x2:u,y2:c,parent:this.elgridLinesH}),c=l+=i.globals.gridHeight/i.globals.dataPoints}},{key:"renderGrid",value:function(){var e=this.w,n=e.globals,i=new Ne(this.ctx);this.elg=i.group({class:"apexcharts-grid"}),this.elgridLinesH=i.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=i.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=i.group({class:"apexcharts-grid-borders"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),e.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());for(var s=0;s<n.seriesYAxisMap.length&&n.ignoreYAxisIndexes.includes(s);)s++;s===n.seriesYAxisMap.length&&(s=0);var o,r=n.yAxisScale[s].result.length-1;if(!n.isBarHorizontal||this.isRangeBar){var a,l,c;o=this.xaxisLabels.length,this.isRangeBar&&(r=n.labels.length,e.config.xaxis.tickAmount&&e.config.xaxis.labels.formatter&&(o=e.config.xaxis.tickAmount),((a=n.yAxisScale)===null||a===void 0||(l=a[s])===null||l===void 0||(c=l.result)===null||c===void 0?void 0:c.length)>0&&e.config.xaxis.type!=="datetime"&&(o=n.yAxisScale[s].result.length-1)),this._drawXYLines({xCount:o,tickAmount:r})}else o=r,r=n.xTickAmount,this._drawInvertedXYLines({xCount:o,tickAmount:r});return this.drawGridBands(o,r),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:n.gridWidth/o}}},{key:"drawGridBands",value:function(e,n){var i,s,o=this,r=this.w;if(((i=r.config.grid.row.colors)===null||i===void 0?void 0:i.length)>0&&function(p,m,b,w,k,C){for(var A=0,S=0;A<m;A++,S++)S>=r.config.grid[p].colors.length&&(S=0),o._drawGridBandRect({c:S,x1:b,y1:w,x2:k,y2:C,type:p}),w+=r.globals.gridHeight/n}("row",n,0,0,r.globals.gridWidth,r.globals.gridHeight/n),((s=r.config.grid.column.colors)===null||s===void 0?void 0:s.length)>0){var a=r.globals.isBarHorizontal||r.config.xaxis.tickPlacement!=="on"||r.config.xaxis.type!=="category"&&!r.config.xaxis.convertedCatToNumeric?e:e-1;r.globals.isXNumeric&&(a=r.globals.xAxisScale.result.length-1);for(var l=r.globals.padHorizontal,c=r.globals.padHorizontal+r.globals.gridWidth/a,u=r.globals.gridHeight,d=0,h=0;d<e;d++,h++){var f;h>=r.config.grid.column.colors.length&&(h=0),r.config.xaxis.type==="datetime"&&(l=this.xaxisLabels[d].position,c=(((f=this.xaxisLabels[d+1])===null||f===void 0?void 0:f.position)||r.globals.gridWidth)-this.xaxisLabels[d].position),this._drawGridBandRect({c:h,x1:l,y1:0,x2:c,y2:u,type:"column"}),l+=r.globals.gridWidth/a}}}}]),t}(),Sj=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new ys(this.ctx)}return ct(t,[{key:"niceScale",value:function(e,n){var i,s,o,r,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,l=1e-11,c=this.w,u=c.globals;u.isBarHorizontal?(i=c.config.xaxis,s=Math.max((u.svgWidth-100)/25,2)):(i=c.config.yaxis[a],s=Math.max((u.svgHeight-100)/15,2)),he.isNumber(s)||(s=10),o=i.min!==void 0&&i.min!==null,r=i.max!==void 0&&i.min!==null;var d=i.stepSize!==void 0&&i.stepSize!==null,h=i.tickAmount!==void 0&&i.tickAmount!==null,f=h?i.tickAmount:u.niceScaleDefaultTicks[Math.min(Math.round(s/2),u.niceScaleDefaultTicks.length-1)];if(u.isMultipleYAxis&&!h&&u.multiAxisTickAmount>0&&(f=u.multiAxisTickAmount,h=!0),f=f==="dataPoints"?u.dataPoints-1:Math.abs(Math.round(f)),(e===Number.MIN_VALUE&&n===0||!he.isNumber(e)&&!he.isNumber(n)||e===Number.MIN_VALUE&&n===-Number.MAX_VALUE)&&(e=he.isNumber(i.min)?i.min:0,n=he.isNumber(i.max)?i.max:e+f,u.allSeriesCollapsed=!1),e>n){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var p=n;n=e,e=p}else e===n&&(e=e===0?0:e-1,n=n===0?2:n+1);var m=[];f<1&&(f=1);var b=f,w=Math.abs(n-e);!o&&e>0&&e/w<.15&&(e=0,o=!0),!r&&n<0&&-n/w<.15&&(n=0,r=!0);var k=(w=Math.abs(n-e))/b,C=k,A=Math.floor(Math.log10(C)),S=Math.pow(10,A),M=Math.ceil(C/S);if(k=C=(M=u.niceScaleAllowedMagMsd[u.yValueDecimal===0?0:1][M])*S,u.isBarHorizontal&&i.stepSize&&i.type!=="datetime"?(k=i.stepSize,d=!0):d&&(k=i.stepSize),d&&i.forceNiceScale){var P=Math.floor(Math.log10(k));k*=Math.pow(10,A-P)}if(o&&r){var T=w/b;if(h)if(d)if(he.mod(w,k)!=0){var I=he.getGCD(k,T);k=T/I<10?I:T}else he.mod(k,T)==0?k=T:(T=k,h=!1);else k=T;else if(d)he.mod(w,k)==0?T=k:k=T;else if(he.mod(w,k)==0)T=k;else{T=w/(b=Math.ceil(w/k));var L=he.getGCD(w,k);w/L<s&&(T=L),k=T}b=Math.round(w/k)}else{if(o||r){if(r)if(h)e=n-k*b;else{var R=e;e=k*Math.floor(e/k),Math.abs(n-e)/he.getGCD(w,k)>s&&(e=n-k*f,e+=k*Math.floor((R-e)/k))}else if(o)if(h)n=e+k*b;else{var V=n;n=k*Math.ceil(n/k),Math.abs(n-e)/he.getGCD(w,k)>s&&(n=e+k*f,n+=k*Math.ceil((V-n)/k))}}else if(u.isMultipleYAxis&&h){var H=k*Math.floor(e/k),F=H+k*b;F<n&&(k*=2),F=n,n=(e=H)+k*b,w=Math.abs(n-e),e>0&&e<Math.abs(F-n)&&(e=0,n=k*b),n<0&&-n<Math.abs(H-e)&&(n=0,e=-k*b)}else e=k*Math.floor(e/k),n=k*Math.ceil(n/k);w=Math.abs(n-e),k=he.getGCD(w,k),b=Math.round(w/k)}if(h||o||r||(b=Math.ceil((w-l)/(k+l)))>16&&he.getPrimeFactors(b).length<2&&b++,!h&&i.forceNiceScale&&u.yValueDecimal===0&&b>w&&(b=w,k=Math.round(w/b)),b>s&&(!h&&!d||i.forceNiceScale)){var U=he.getPrimeFactors(b),Y=U.length-1,z=b;e:for(var X=0;X<Y;X++)for(var Z=0;Z<=Y-X;Z++){for(var G=Math.min(Z+X,Y),Q=z,ne=1,K=Z;K<=G;K++)ne*=U[K];if((Q/=ne)<s){z=Q;break e}}k=z===b?w:w/z,b=Math.round(w/k)}u.isMultipleYAxis&&u.multiAxisTickAmount==0&&u.ignoreYAxisIndexes.indexOf(a)<0&&(u.multiAxisTickAmount=b);var ae=e-k,ge=k*l;do ae+=k,m.push(he.stripNumber(ae,7));while(n-ae>ge);return{result:m,niceMin:m[0],niceMax:m[m.length-1]}}},{key:"linearScale",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:void 0,r=Math.abs(n-e),a=[];if(e===n)return{result:a=[e],niceMin:a[0],niceMax:a[a.length-1]};(i=this._adjustTicksForSmallRange(i,s,r))==="dataPoints"&&(i=this.w.globals.dataPoints-1),o||(o=r/i),o=Math.round(10*(o+Number.EPSILON))/10,i===Number.MAX_VALUE&&(i=5,o=1);for(var l=e;i>=0;)a.push(l),l=he.preciseAddition(l,o),i-=1;return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScaleNice",value:function(e,n,i){n<=0&&(n=Math.max(e,i)),e<=0&&(e=Math.min(n,i));for(var s=[],o=Math.ceil(Math.log(n)/Math.log(i)+1),r=Math.floor(Math.log(e)/Math.log(i));r<o;r++)s.push(Math.pow(i,r));return{result:s,niceMin:s[0],niceMax:s[s.length-1]}}},{key:"logarithmicScale",value:function(e,n,i){n<=0&&(n=Math.max(e,i)),e<=0&&(e=Math.min(n,i));for(var s=[],o=Math.log(n)/Math.log(i),r=Math.log(e)/Math.log(i),a=o-r,l=Math.round(a),c=a/l,u=0,d=r;u<l;u++,d+=c)s.push(Math.pow(i,d));return s.push(Math.pow(i,o)),{result:s,niceMin:e,niceMax:n}}},{key:"_adjustTicksForSmallRange",value:function(e,n,i){var s=e;if(n!==void 0&&this.w.config.yaxis[n].labels.formatter&&this.w.config.yaxis[n].tickAmount===void 0){var o=Number(this.w.config.yaxis[n].labels.formatter(1));he.isNumber(o)&&this.w.globals.yValueDecimal===0&&(s=Math.ceil(i))}return s<e?s:e}},{key:"setYScaleForIndex",value:function(e,n,i){var s=this.w.globals,o=this.w.config,r=s.isBarHorizontal?o.xaxis:o.yaxis[e];s.yAxisScale[e]===void 0&&(s.yAxisScale[e]=[]);var a=Math.abs(i-n);r.logarithmic&&a<=5&&(s.invalidLogScale=!0),r.logarithmic&&a>5?(s.allSeriesCollapsed=!1,s.yAxisScale[e]=r.forceNiceScale?this.logarithmicScaleNice(n,i,r.logBase):this.logarithmicScale(n,i,r.logBase)):i!==-Number.MAX_VALUE&&he.isNumber(i)&&n!==Number.MAX_VALUE&&he.isNumber(n)?(s.allSeriesCollapsed=!1,s.yAxisScale[e]=this.niceScale(n,i,e)):s.yAxisScale[e]=this.niceScale(Number.MIN_VALUE,0,e)}},{key:"setXScale",value:function(e,n){var i=this.w,s=i.globals,o=Math.abs(n-e);if(n!==-Number.MAX_VALUE&&he.isNumber(n)){var r=s.xTickAmount;o<10&&o>1&&(r=o),s.xAxisScale=this.linearScale(e,n,r,0,i.config.xaxis.stepSize)}else s.xAxisScale=this.linearScale(0,10,10);return s.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var e=this,n=this.w.config,i=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var s=i.seriesYAxisMap,o=i.minYArr,r=i.maxYArr;i.allSeriesCollapsed=!0,i.barGroups=[],s.forEach(function(a,l){var c=[];a.forEach(function(u){var d=n.series[u].group;c.indexOf(d)<0&&c.push(d)}),a.length>0?function(){var u,d,h=Number.MAX_VALUE,f=-Number.MAX_VALUE,p=h,m=f;if(n.chart.stacked)(function(){var k=new Array(i.dataPoints).fill(0),C=[],A=[],S=[];c.forEach(function(){C.push(k.map(function(){return Number.MIN_VALUE})),A.push(k.map(function(){return Number.MIN_VALUE})),S.push(k.map(function(){return Number.MIN_VALUE}))});for(var M=function(T){!u&&n.series[a[T]].type&&(u=n.series[a[T]].type);var I=a[T];d=n.series[I].group?n.series[I].group:"axis-".concat(l),!(i.collapsedSeriesIndices.indexOf(I)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(I)<0)||(i.allSeriesCollapsed=!1,c.forEach(function(L,R){if(n.series[I].group===L)for(var V=0;V<i.series[I].length;V++){var H=i.series[I][V];H>=0?A[R][V]+=H:S[R][V]+=H,C[R][V]+=H,p=Math.min(p,H),m=Math.max(m,H)}})),u!=="bar"&&u!=="column"||i.barGroups.push(d)},P=0;P<a.length;P++)M(P);u||(u=n.chart.type),u==="bar"||u==="column"?c.forEach(function(T,I){h=Math.min(h,Math.min.apply(null,S[I])),f=Math.max(f,Math.max.apply(null,A[I]))}):(c.forEach(function(T,I){p=Math.min(p,Math.min.apply(null,C[I])),m=Math.max(m,Math.max.apply(null,C[I]))}),h=p,f=m),h===Number.MIN_VALUE&&f===Number.MIN_VALUE&&(f=-Number.MAX_VALUE)})();else for(var b=0;b<a.length;b++){var w=a[b];h=Math.min(h,o[w]),f=Math.max(f,r[w]),!(i.collapsedSeriesIndices.indexOf(w)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(w)<0)||(i.allSeriesCollapsed=!1)}n.yaxis[l].min!==void 0&&(h=typeof n.yaxis[l].min=="function"?n.yaxis[l].min(h):n.yaxis[l].min),n.yaxis[l].max!==void 0&&(f=typeof n.yaxis[l].max=="function"?n.yaxis[l].max(f):n.yaxis[l].max),i.barGroups=i.barGroups.filter(function(k,C,A){return A.indexOf(k)===C}),e.setYScaleForIndex(l,h,f),a.forEach(function(k){o[k]=i.yAxisScale[l].niceMin,r[k]=i.yAxisScale[l].niceMax})}():e.setYScaleForIndex(l,0,-Number.MAX_VALUE)})}}]),t}(),e6=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.scales=new Sj(e)}return ct(t,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-Number.MAX_VALUE,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,o=this.w.config,r=this.w.globals,a=-Number.MAX_VALUE,l=Number.MIN_VALUE;s===null&&(s=e+1);var c=r.series,u=c,d=c;o.chart.type==="candlestick"?(u=r.seriesCandleL,d=r.seriesCandleH):o.chart.type==="boxPlot"?(u=r.seriesCandleO,d=r.seriesCandleC):r.isRangeData&&(u=r.seriesRangeStart,d=r.seriesRangeEnd);var h=!1;if(r.seriesX.length>=s){var f,p=(f=r.brushSource)===null||f===void 0?void 0:f.w.config.chart.brush;(o.chart.zoom.enabled&&o.chart.zoom.autoScaleYaxis||p!=null&&p.enabled&&p!=null&&p.autoScaleYaxis)&&(h=!0)}for(var m=e;m<s;m++){r.dataPoints=Math.max(r.dataPoints,c[m].length);var b=o.series[m].type;r.categoryLabels.length&&(r.dataPoints=r.categoryLabels.filter(function(S){return S!==void 0}).length),r.labels.length&&o.xaxis.type!=="datetime"&&r.series.reduce(function(S,M){return S+M.length},0)!==0&&(r.dataPoints=Math.max(r.dataPoints,r.labels.length));var w=0,k=c[m].length-1;if(h){if(o.xaxis.min)for(;w<k&&r.seriesX[m][w]<o.xaxis.min;w++);if(o.xaxis.max)for(;k>w&&r.seriesX[m][k]>o.xaxis.max;k--);}for(var C=w;C<=k&&C<r.series[m].length;C++){var A=c[m][C];if(A!==null&&he.isNumber(A)){switch(d[m][C]!==void 0&&(a=Math.max(a,d[m][C]),n=Math.min(n,d[m][C])),u[m][C]!==void 0&&(n=Math.min(n,u[m][C]),i=Math.max(i,u[m][C])),b){case"candlestick":r.seriesCandleC[m][C]!==void 0&&(a=Math.max(a,r.seriesCandleH[m][C]),n=Math.min(n,r.seriesCandleL[m][C]));break;case"boxPlot":r.seriesCandleC[m][C]!==void 0&&(a=Math.max(a,r.seriesCandleC[m][C]),n=Math.min(n,r.seriesCandleO[m][C]))}b&&b!=="candlestick"&&b!=="boxPlot"&&b!=="rangeArea"&&b!=="rangeBar"&&(a=Math.max(a,r.series[m][C]),n=Math.min(n,r.series[m][C])),r.seriesGoals[m]&&r.seriesGoals[m][C]&&Array.isArray(r.seriesGoals[m][C])&&r.seriesGoals[m][C].forEach(function(S){a=Math.max(a,S.value),n=Math.min(n,S.value)}),i=a,he.isFloat(A)&&(A=he.noExponents(A),r.yValueDecimal=Math.max(r.yValueDecimal,A.toString().split(".")[1].length)),l>u[m][C]&&u[m][C]<0&&(l=u[m][C])}else r.hasNullValues=!0}b!=="bar"&&b!=="column"||(l<0&&a<0&&(a=0,i=Math.max(i,0)),l===Number.MIN_VALUE&&(l=0,n=Math.min(n,0)))}return o.chart.type==="rangeBar"&&r.seriesRangeStart.length&&r.isBarHorizontal&&(l=n),o.chart.type==="bar"&&(l<0&&a<0&&(a=0),l===Number.MIN_VALUE&&(l=0)),{minY:l,maxY:a,lowestY:n,highestY:i}}},{key:"setYRange",value:function(){var e=this.w.globals,n=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;var i,s=Number.MAX_VALUE;if(e.isMultipleYAxis){s=Number.MAX_VALUE;for(var o=0;o<e.series.length;o++)i=this.getMinYMaxY(o),e.minYArr[o]=i.lowestY,e.maxYArr[o]=i.highestY,s=Math.min(s,i.lowestY)}return i=this.getMinYMaxY(0,s,null,e.series.length),n.chart.type==="bar"?(e.minY=i.minY,e.maxY=i.maxY):(e.minY=i.lowestY,e.maxY=i.highestY),s=i.lowestY,n.chart.stacked&&this._setStackedMinMax(),n.chart.type==="line"||n.chart.type==="area"||n.chart.type==="scatter"||n.chart.type==="candlestick"||n.chart.type==="boxPlot"||n.chart.type==="rangeBar"&&!e.isBarHorizontal?e.minY===Number.MIN_VALUE&&s!==-Number.MAX_VALUE&&s!==e.maxY&&(e.minY=s):e.minY=e.minY!==Number.MIN_VALUE?Math.min(i.minY,e.minY):i.minY,n.yaxis.forEach(function(r,a){r.max!==void 0&&(typeof r.max=="number"?e.maxYArr[a]=r.max:typeof r.max=="function"&&(e.maxYArr[a]=r.max(e.isMultipleYAxis?e.maxYArr[a]:e.maxY)),e.maxY=e.maxYArr[a]),r.min!==void 0&&(typeof r.min=="number"?e.minYArr[a]=r.min:typeof r.min=="function"&&(e.minYArr[a]=r.min(e.isMultipleYAxis?e.minYArr[a]===Number.MIN_VALUE?0:e.minYArr[a]:e.minY)),e.minY=e.minYArr[a])}),e.isBarHorizontal&&["min","max"].forEach(function(r){n.xaxis[r]!==void 0&&typeof n.xaxis[r]=="number"&&(r==="min"?e.minY=n.xaxis[r]:e.maxY=n.xaxis[r])}),e.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),e.minY=s):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.minY,e.maxYArr[0]=e.maxY),e.barGroups=[],e.lineGroups=[],e.areaGroups=[],n.series.forEach(function(r){switch(r.type||n.chart.type){case"bar":case"column":e.barGroups.push(r.group);break;case"line":e.lineGroups.push(r.group);break;case"area":e.areaGroups.push(r.group)}}),e.barGroups=e.barGroups.filter(function(r,a,l){return l.indexOf(r)===a}),e.lineGroups=e.lineGroups.filter(function(r,a,l){return l.indexOf(r)===a}),e.areaGroups=e.areaGroups.filter(function(r,a,l){return l.indexOf(r)===a}),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}},{key:"setXRange",value:function(){var e=this.w.globals,n=this.w.config,i=n.xaxis.type==="numeric"||n.xaxis.type==="datetime"||n.xaxis.type==="category"&&!e.noLabelsProvided||e.noLabelsProvided||e.isXNumeric;if(e.isXNumeric&&function(){for(var l=0;l<e.series.length;l++)if(e.labels[l])for(var c=0;c<e.labels[l].length;c++)e.labels[l][c]!==null&&he.isNumber(e.labels[l][c])&&(e.maxX=Math.max(e.maxX,e.labels[l][c]),e.initialMaxX=Math.max(e.maxX,e.labels[l][c]),e.minX=Math.min(e.minX,e.labels[l][c]),e.initialMinX=Math.min(e.minX,e.labels[l][c]))}(),e.noLabelsProvided&&n.xaxis.categories.length===0&&(e.maxX=e.labels[e.labels.length-1],e.initialMaxX=e.labels[e.labels.length-1],e.minX=1,e.initialMinX=1),e.isXNumeric||e.noLabelsProvided||e.dataFormatXNumeric){var s=10;if(n.xaxis.tickAmount===void 0)s=Math.round(e.svgWidth/150),n.xaxis.type==="numeric"&&e.dataPoints<30&&(s=e.dataPoints-1),s>e.dataPoints&&e.dataPoints!==0&&(s=e.dataPoints-1);else if(n.xaxis.tickAmount==="dataPoints"){if(e.series.length>1&&(s=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric){var o=e.maxX-e.minX;o<30&&(s=o-1)}}else s=n.xaxis.tickAmount;if(e.xTickAmount=s,n.xaxis.max!==void 0&&typeof n.xaxis.max=="number"&&(e.maxX=n.xaxis.max),n.xaxis.min!==void 0&&typeof n.xaxis.min=="number"&&(e.minX=n.xaxis.min),n.xaxis.range!==void 0&&(e.minX=e.maxX-n.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(n.xaxis.convertedCatToNumeric&&!e.dataFormatXNumeric){for(var r=[],a=e.minX-1;a<e.maxX;a++)r.push(a+1);e.xAxisScale={result:r,niceMin:r[0],niceMax:r[r.length-1]}}else e.xAxisScale=this.scales.setXScale(e.minX,e.maxX);else e.xAxisScale=this.scales.linearScale(0,s,s,0,n.xaxis.stepSize),e.noLabelsProvided&&e.labels.length>0&&(e.xAxisScale=this.scales.linearScale(1,e.labels.length,s-1,0,n.xaxis.stepSize),e.seriesX=e.labels.slice());i&&(e.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&e.labels.length&&(e.xTickAmount=e.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}},{key:"setZRange",value:function(){var e=this.w.globals;if(e.isDataXYZ){for(var n=0;n<e.series.length;n++)if(e.seriesZ[n]!==void 0)for(var i=0;i<e.seriesZ[n].length;i++)e.seriesZ[n][i]!==null&&he.isNumber(e.seriesZ[n][i])&&(e.maxZ=Math.max(e.maxZ,e.seriesZ[n][i]),e.minZ=Math.min(e.minZ,e.seriesZ[n][i]))}}},{key:"_handleSingleDataPoint",value:function(){var e=this.w.globals,n=this.w.config;if(e.minX===e.maxX){var i=new ri(this.ctx);if(n.xaxis.type==="datetime"){var s=i.getDate(e.minX);n.xaxis.labels.datetimeUTC?s.setUTCDate(s.getUTCDate()-2):s.setDate(s.getDate()-2),e.minX=new Date(s).getTime();var o=i.getDate(e.maxX);n.xaxis.labels.datetimeUTC?o.setUTCDate(o.getUTCDate()+2):o.setDate(o.getDate()+2),e.maxX=new Date(o).getTime()}else(n.xaxis.type==="numeric"||n.xaxis.type==="category"&&!e.noLabelsProvided)&&(e.minX=e.minX-2,e.initialMinX=e.minX,e.maxX=e.maxX+2,e.initialMaxX=e.maxX)}}},{key:"_getMinXDiff",value:function(){var e=this.w.globals;e.isXNumeric&&e.seriesX.forEach(function(n,i){if(n.length){n.length===1&&n.push(e.seriesX[e.maxValsInArrayIndex][e.seriesX[e.maxValsInArrayIndex].length-1]);var s=n.slice();s.sort(function(o,r){return o-r}),s.forEach(function(o,r){if(r>0){var a=o-s[r-1];a>0&&(e.minXDiff=Math.min(a,e.minXDiff))}}),e.dataPoints!==1&&e.minXDiff!==Number.MAX_VALUE||(e.minXDiff=.5)}})}},{key:"_setStackedMinMax",value:function(){var e=this,n=this.w.globals;if(n.series.length){var i=n.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map(function(r){return r})]);var s={},o={};i.forEach(function(r){s[r]=[],o[r]=[],e.w.config.series.map(function(a,l){return r.indexOf(n.seriesNames[l])>-1?l:null}).filter(function(a){return a!==null}).forEach(function(a){for(var l=0;l<n.series[n.maxValsInArrayIndex].length;l++){var c,u,d,h;s[r][l]===void 0&&(s[r][l]=0,o[r][l]=0),(e.w.config.chart.stacked&&!n.comboCharts||e.w.config.chart.stacked&&n.comboCharts&&(!e.w.config.chart.stackOnlyBar||((c=e.w.config.series)===null||c===void 0||(u=c[a])===null||u===void 0?void 0:u.type)==="bar"||((d=e.w.config.series)===null||d===void 0||(h=d[a])===null||h===void 0?void 0:h.type)==="column"))&&n.series[a][l]!==null&&he.isNumber(n.series[a][l])&&(n.series[a][l]>0?s[r][l]+=parseFloat(n.series[a][l])+1e-4:o[r][l]+=parseFloat(n.series[a][l]))}})}),Object.entries(s).forEach(function(r){var a=YU(r,1)[0];s[a].forEach(function(l,c){n.maxY=Math.max(n.maxY,s[a][c]),n.minY=Math.min(n.minY,o[a][c])})})}}}]),t}(),QS=function(){function t(e,n){lt(this,t),this.ctx=e,this.elgrid=n,this.w=e.w;var i=this.w;this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.axisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=i.config.chart.type==="bar"&&i.config.plotOptions.bar.horizontal,this.xAxisoffX=i.config.xaxis.position==="bottom"?i.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new qc(e)}return ct(t,[{key:"drawYaxis",value:function(e){var n=this.w,i=new Ne(this.ctx),s=n.config.yaxis[e].labels.style,o=s.fontSize,r=s.fontFamily,a=s.fontWeight,l=i.group({class:"apexcharts-yaxis",rel:e,transform:"translate(".concat(n.globals.translateYAxisX[e],", 0)")});if(this.axesUtils.isYAxisHidden(e))return l;var c=i.group({class:"apexcharts-yaxis-texts-g"});l.add(c);var u=n.globals.yAxisScale[e].result.length-1,d=n.globals.gridHeight/u,h=n.globals.yLabelFormatters[e],f=this.axesUtils.checkForReversedLabels(e,n.globals.yAxisScale[e].result.slice());if(n.config.yaxis[e].labels.show){var p=n.globals.translateY+n.config.yaxis[e].labels.offsetY;n.globals.isBarHorizontal?p=0:n.config.chart.type==="heatmap"&&(p-=d/2),p+=parseInt(o,10)/3;for(var m=u;m>=0;m--){var b=h(f[m],m,n),w=n.config.yaxis[e].labels.padding;n.config.yaxis[e].opposite&&n.config.yaxis.length!==0&&(w*=-1);var k=this.getTextAnchor(n.config.yaxis[e].labels.align,n.config.yaxis[e].opposite),C=this.axesUtils.getYAxisForeColor(s.colors,e),A=Array.isArray(C)?C[m]:C,S=he.listToArray(n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-label tspan"))).map(function(P){return P.textContent}),M=i.drawText({x:w,y:p,text:S.includes(b)&&!n.config.yaxis[e].labels.showDuplicates?"":b,textAnchor:k,fontSize:o,fontFamily:r,fontWeight:a,maxWidth:n.config.yaxis[e].labels.maxWidth,foreColor:A,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(s.cssClass)});c.add(M),this.addTooltip(M,b),n.config.yaxis[e].labels.rotate!==0&&this.rotateLabel(i,M,firstLabel,n.config.yaxis[e].labels.rotate),p+=d}}return this.addYAxisTitle(i,l,e),this.addAxisBorder(i,l,e,u,d),l}},{key:"getTextAnchor",value:function(e,n){return e==="left"?"start":e==="center"?"middle":e==="right"?"end":n?"start":"end"}},{key:"addTooltip",value:function(e,n){var i=document.createElementNS(this.w.globals.SVGNS,"title");i.textContent=Array.isArray(n)?n.join(" "):n,e.node.appendChild(i)}},{key:"rotateLabel",value:function(e,n,i,s){var o=e.rotateAroundCenter(i.node),r=e.rotateAroundCenter(n.node);n.node.setAttribute("transform","rotate(".concat(s," ").concat(o.x," ").concat(r.y,")"))}},{key:"addYAxisTitle",value:function(e,n,i){var s=this.w;if(s.config.yaxis[i].title.text!==void 0){var o=e.group({class:"apexcharts-yaxis-title"}),r=s.config.yaxis[i].opposite?s.globals.translateYAxisX[i]:0,a=e.drawText({x:r,y:s.globals.gridHeight/2+s.globals.translateY+s.config.yaxis[i].title.offsetY,text:s.config.yaxis[i].title.text,textAnchor:"end",foreColor:s.config.yaxis[i].title.style.color,fontSize:s.config.yaxis[i].title.style.fontSize,fontWeight:s.config.yaxis[i].title.style.fontWeight,fontFamily:s.config.yaxis[i].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(s.config.yaxis[i].title.style.cssClass)});o.add(a),n.add(o)}}},{key:"addAxisBorder",value:function(e,n,i,s,o){var r=this.w,a=r.config.yaxis[i].axisBorder,l=31+a.offsetX;if(r.config.yaxis[i].opposite&&(l=-31-a.offsetX),a.show){var c=e.drawLine(l,r.globals.translateY+a.offsetY-2,l,r.globals.gridHeight+r.globals.translateY+a.offsetY+2,a.color,0,a.width);n.add(c)}r.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(l,s,a,r.config.yaxis[i].axisTicks,i,o,n)}},{key:"drawYaxisInversed",value:function(e){var n=this.w,i=new Ne(this.ctx),s=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),o=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(n.globals.translateXAxisX,", ").concat(n.globals.translateXAxisY,")")});s.add(o);var r=n.globals.yAxisScale[e].result.length-1,a=n.globals.gridWidth/r+.1,l=a+n.config.xaxis.labels.offsetX,c=n.globals.xLabelFormatter,u=this.axesUtils.checkForReversedLabels(e,n.globals.yAxisScale[e].result.slice()),d=n.globals.timescaleLabels;if(d.length>0&&(this.xaxisLabels=d.slice(),r=(u=d.slice()).length),n.config.xaxis.labels.show)for(var h=d.length?0:r;d.length?h<d.length:h>=0;d.length?h++:h--){var f=c(u[h],h,n),p=n.globals.gridWidth+n.globals.padHorizontal-(l-a+n.config.xaxis.labels.offsetX);if(d.length){var m=this.axesUtils.getLabel(u,d,p,h,this.drawnLabels,this.xaxisFontSize);p=m.x,f=m.text,this.drawnLabels.push(m.text),h===0&&n.globals.skipFirstTimelinelabel&&(f=""),h===u.length-1&&n.globals.skipLastTimelinelabel&&(f="")}var b=i.drawText({x:p,y:this.xAxisoffX+n.config.xaxis.labels.offsetY+30-(n.config.xaxis.position==="top"?n.globals.xAxisHeight+n.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:n.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(n.config.xaxis.labels.style.cssClass)});o.add(b),b.tspan(f),this.addTooltip(b,f),l+=a}return this.inversedYAxisTitleText(s),this.inversedYAxisBorder(s),s}},{key:"inversedYAxisBorder",value:function(e){var n=this.w,i=new Ne(this.ctx),s=n.config.xaxis.axisBorder;if(s.show){var o=0;n.config.chart.type==="bar"&&n.globals.isXNumeric&&(o-=15);var r=i.drawLine(n.globals.padHorizontal+o+s.offsetX,this.xAxisoffX,n.globals.gridWidth,this.xAxisoffX,s.color,0,s.height);this.elgrid&&this.elgrid.elGridBorders&&n.config.grid.show?this.elgrid.elGridBorders.add(r):e.add(r)}}},{key:"inversedYAxisTitleText",value:function(e){var n=this.w,i=new Ne(this.ctx);if(n.config.xaxis.title.text!==void 0){var s=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),o=i.drawText({x:n.globals.gridWidth/2+n.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(n.config.xaxis.title.style.fontSize)+n.config.xaxis.title.offsetY+20,text:n.config.xaxis.title.text,textAnchor:"middle",fontSize:n.config.xaxis.title.style.fontSize,fontFamily:n.config.xaxis.title.style.fontFamily,fontWeight:n.config.xaxis.title.style.fontWeight,foreColor:n.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(n.config.xaxis.title.style.cssClass)});s.add(o),e.add(s)}}},{key:"yAxisTitleRotate",value:function(e,n){var i=this.w,s=new Ne(this.ctx),o=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g")),r=o?o.getBoundingClientRect():{width:0,height:0},a=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-title text")),l=a?a.getBoundingClientRect():{width:0,height:0};if(a){var c=this.xPaddingForYAxisTitle(e,r,l,n);a.setAttribute("x",c.xPos-(n?10:0));var u=s.rotateAroundCenter(a);a.setAttribute("transform","rotate(".concat(n?-1*i.config.yaxis[e].title.rotate:i.config.yaxis[e].title.rotate," ").concat(u.x," ").concat(u.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(e,n,i,s){var o=this.w,r=0,a=10;return o.config.yaxis[e].title.text===void 0||e<0?{xPos:r,padd:0}:(s?r=n.width+o.config.yaxis[e].title.offsetX+i.width/2+a/2:(r=-1*n.width+o.config.yaxis[e].title.offsetX+a/2+i.width/2,o.globals.isBarHorizontal&&(a=25,r=-1*n.width-o.config.yaxis[e].title.offsetX-a)),{xPos:r,padd:a})}},{key:"setYAxisXPosition",value:function(e,n){var i=this.w,s=0,o=0,r=18,a=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach(function(l,c){var u=i.globals.ignoreYAxisIndexes.includes(c)||!l.show||l.floating||e[c].width===0,d=e[c].width+n[c].width;l.opposite?i.globals.isBarHorizontal?(o=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[c]=o-l.labels.offsetX):(o=i.globals.gridWidth+i.globals.translateX+a,u||(a+=d+20),i.globals.translateYAxisX[c]=o-l.labels.offsetX+20):(s=i.globals.translateX-r,u||(r+=d+20),i.globals.translateYAxisX[c]=s+l.labels.offsetX)})}},{key:"setYAxisTextAlignments",value:function(){var e=this.w;he.listToArray(e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach(function(n,i){var s=e.config.yaxis[i];if(s&&!s.floating&&s.labels.align!==void 0){var o=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=he.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"))),a=o.getBoundingClientRect();r.forEach(function(l){l.setAttribute("text-anchor",s.labels.align)}),s.labels.align!=="left"||s.opposite?s.labels.align==="center"?o.setAttribute("transform","translate(".concat(a.width/2*(s.opposite?1:-1),", 0)")):s.labels.align==="right"&&s.opposite&&o.setAttribute("transform","translate(".concat(a.width,", 0)")):o.setAttribute("transform","translate(-".concat(a.width,", 0)"))}})}}]),t}(),Vbt=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.documentEvent=he.bind(this.documentEvent,this)}return ct(t,[{key:"addEventListener",value:function(e,n){var i=this.w;i.globals.events.hasOwnProperty(e)?i.globals.events[e].push(n):i.globals.events[e]=[n]}},{key:"removeEventListener",value:function(e,n){var i=this.w;if(i.globals.events.hasOwnProperty(e)){var s=i.globals.events[e].indexOf(n);s!==-1&&i.globals.events[e].splice(s,1)}}},{key:"fireEvent",value:function(e,n){var i=this.w;if(i.globals.events.hasOwnProperty(e)){n&&n.length||(n=[]);for(var s=i.globals.events[e],o=s.length,r=0;r<o;r++)s[r].apply(null,n)}}},{key:"setupEventHandlers",value:function(){var e=this,n=this.w,i=this.ctx,s=n.globals.dom.baseEl.querySelector(n.globals.chartClass);this.ctx.eventList.forEach(function(o){s.addEventListener(o,function(r){var a=Object.assign({},n,{seriesIndex:n.globals.axisCharts?n.globals.capturedSeriesIndex:0,dataPointIndex:n.globals.capturedDataPointIndex});r.type==="mousemove"||r.type==="touchmove"?typeof n.config.chart.events.mouseMove=="function"&&n.config.chart.events.mouseMove(r,i,a):r.type==="mouseleave"||r.type==="touchleave"?typeof n.config.chart.events.mouseLeave=="function"&&n.config.chart.events.mouseLeave(r,i,a):(r.type==="mouseup"&&r.which===1||r.type==="touchend")&&(typeof n.config.chart.events.click=="function"&&n.config.chart.events.click(r,i,a),i.ctx.events.fireEvent("click",[r,i,a]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(function(o){n.globals.dom.baseEl.addEventListener(o,e.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}},{key:"documentEvent",value:function(e){var n=this.w,i=e.target.className;if(e.type==="click"){var s=n.globals.dom.baseEl.querySelector(".apexcharts-menu");s&&s.classList.contains("apexcharts-menu-open")&&i!=="apexcharts-menu-icon"&&s.classList.remove("apexcharts-menu-open")}n.globals.clientX=e.type==="touchmove"?e.touches[0].clientX:e.clientX,n.globals.clientY=e.type==="touchmove"?e.touches[0].clientY:e.clientY}}]),t}(),Fbt=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"setCurrentLocaleValues",value:function(e){var n=this.w.config.chart.locales;window.Apex.chart&&window.Apex.chart.locales&&window.Apex.chart.locales.length>0&&(n=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=n.filter(function(o){return o.name===e})[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var s=he.extend(wj,i);this.w.globals.locale=s.options}}]),t}(),Nbt=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"drawAxis",value:function(e,n){var i,s,o=this,r=this.w.globals,a=this.w.config,l=new $1(this.ctx,n),c=new QS(this.ctx,n);r.axisCharts&&e!=="radar"&&(r.isBarHorizontal?(s=c.drawYaxisInversed(0),i=l.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(s)):(i=l.drawXaxis(),r.dom.elGraphical.add(i),a.yaxis.map(function(u,d){if(r.ignoreYAxisIndexes.indexOf(d)===-1&&(s=c.drawYaxis(d),r.dom.Paper.add(s),o.w.config.grid.position==="back")){var h=r.dom.Paper.children()[1];h.remove(),r.dom.Paper.add(h)}})))}}]),t}(),t6=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"drawXCrosshairs",value:function(){var e=this.w,n=new Ne(this.ctx),i=new di(this.ctx),s=e.config.xaxis.crosshairs.fill.gradient,o=e.config.xaxis.crosshairs.dropShadow,r=e.config.xaxis.crosshairs.fill.type,a=s.colorFrom,l=s.colorTo,c=s.opacityFrom,u=s.opacityTo,d=s.stops,h=o.enabled,f=o.left,p=o.top,m=o.blur,b=o.color,w=o.opacity,k=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){r==="gradient"&&(k=n.drawGradient("vertical",a,l,c,u,null,d,null));var C=n.drawRect();e.config.xaxis.crosshairs.width===1&&(C=n.drawLine());var A=e.globals.gridHeight;(!he.isNumber(A)||A<0)&&(A=0);var S=e.config.xaxis.crosshairs.width;(!he.isNumber(S)||S<0)&&(S=0),C.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:A,width:S,height:A,fill:k,filter:"none","fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),h&&(C=i.dropShadow(C,{left:f,top:p,blur:m,color:b,opacity:w})),e.globals.dom.elGraphical.add(C)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,n=new Ne(this.ctx),i=e.config.yaxis[0].crosshairs,s=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var o=n.drawLine(-s,0,e.globals.gridWidth+s,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);o.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(o)}var r=n.drawLine(-s,0,e.globals.gridWidth+s,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(r)}}]),t}(),Bbt=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"checkResponsiveConfig",value:function(e){var n=this,i=this.w,s=i.config;if(s.responsive.length!==0){var o=s.responsive.slice();o.sort(function(c,u){return c.breakpoint>u.breakpoint?1:u.breakpoint>c.breakpoint?-1:0}).reverse();var r=new S1({}),a=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=o[0].breakpoint,d=window.innerWidth>0?window.innerWidth:screen.width;if(d>u){var h=he.clone(i.globals.initialConfig);h.series=he.clone(i.config.series);var f=ys.extendArrayProps(r,h,i);c=he.extend(f,c),c=he.extend(i.config,c),n.overrideResponsiveOptions(c)}else for(var p=0;p<o.length;p++)d<o[p].breakpoint&&(c=ys.extendArrayProps(r,o[p].options,i),c=he.extend(i.config,c),n.overrideResponsiveOptions(c))};if(e){var l=ys.extendArrayProps(r,e,i);l=he.extend(i.config,l),a(l=he.extend(l,e))}else a({})}}},{key:"overrideResponsiveOptions",value:function(e){var n=new S1(e).init({responsiveOverride:!0});this.w.config=n}}]),t}(),zbt=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed()}return ct(t,[{key:"checkHeatmapDistributed",value:function(){var e=this.w.config,n=e.chart,i=e.plotOptions;return n.type==="treemap"&&i.treemap&&i.treemap.distributed||n.type==="heatmap"&&i.heatmap&&i.heatmap.distributed}},{key:"checkBarDistributed",value:function(){var e=this.w.config,n=e.chart,i=e.plotOptions;return i.bar&&i.bar.distributed&&(n.type==="bar"||n.type==="rangeBar")}},{key:"init",value:function(){this.setDefaultColors()}},{key:"setDefaultColors",value:function(){var e=this.w,n=new he;e.globals.dom.elWrap.classList.add("apexcharts-theme-".concat(e.config.theme.mode));var i=Ns(e.config.colors||e.config.fill.colors||[]);e.globals.colors=this.getColors(i),this.applySeriesColors(e.globals.seriesColors,e.globals.colors),e.config.theme.monochrome.enabled&&(e.globals.colors=this.getMonochromeColors(e.config.theme.monochrome,e.globals.series,n));var s=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],s),this.applyDataLabelsColors(s),this.applyRadarPolygonsColors(),this.applyMarkersColors(s)}},{key:"getColors",value:function(e){var n=this,i=this.w;return e&&e.length!==0?Array.isArray(e)&&e.length>0&&typeof e[0]=="function"?(this.isColorFn=!0,i.config.series.map(function(s,o){var r=e[o]||e[0];return typeof r=="function"?r({value:i.globals.axisCharts?i.globals.series[o][0]||0:i.globals.series[o],seriesIndex:o,dataPointIndex:o,w:n.w}):r})):e:this.predefined()}},{key:"applySeriesColors",value:function(e,n){e.forEach(function(i,s){i&&(n[s]=i)})}},{key:"getMonochromeColors",value:function(e,n,i){var s=e.color,o=e.shadeIntensity,r=e.shadeTo,a=this.isBarDistributed||this.isHeatmapDistributed?n[0].length*n.length:n.length,l=1/(a/o),c=0;return Array.from({length:a},function(){var u=r==="dark"?i.shadeColor(-1*c,s):i.shadeColor(c,s);return c+=l,u})}},{key:"applyColorTypes",value:function(e,n){var i=this,s=this.w;e.forEach(function(o){s.globals[o].colors=s.config[o].colors===void 0?i.isColorFn?s.config.colors:n:s.config[o].colors.slice(),i.pushExtraColors(s.globals[o].colors)})}},{key:"applyDataLabelsColors",value:function(e){var n=this.w;n.globals.dataLabels.style.colors=n.config.dataLabels.style.colors===void 0?e:n.config.dataLabels.style.colors.slice(),this.pushExtraColors(n.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var e=this.w;e.globals.radarPolygons.fill.colors=e.config.plotOptions.radar.polygons.fill.colors===void 0?[e.config.theme.mode==="dark"?"#424242":"none"]:e.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(e.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(e){var n=this.w;n.globals.markers.colors=n.config.markers.colors===void 0?e:n.config.markers.colors.slice(),this.pushExtraColors(n.globals.markers.colors)}},{key:"pushExtraColors",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,s=this.w,o=n||s.globals.series.length;if(i===null&&(i=this.isBarDistributed||this.isHeatmapDistributed||s.config.chart.type==="heatmap"&&s.config.plotOptions.heatmap&&s.config.plotOptions.heatmap.colorScale.inverse),i&&s.globals.series.length&&(o=s.globals.series[s.globals.maxValsInArrayIndex].length*s.globals.series.length),e.length<o)for(var r=o-e.length,a=0;a<r;a++)e.push(e[a])}},{key:"updateThemeOptions",value:function(e){e.chart=e.chart||{},e.tooltip=e.tooltip||{};var n=e.theme.mode,i=n==="dark"?"palette4":n==="light"?"palette1":e.theme.palette||"palette1",s=n==="dark"?"#f6f7f8":n==="light"?"#373d3f":e.chart.foreColor||"#373d3f";return e.tooltip.theme=n||"light",e.chart.foreColor=s,e.theme.palette=i,e}},{key:"predefined",value:function(){var e={palette1:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"],palette2:["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#FF9800"],palette3:["#33b2df","#546E7A","#d4526e","#13d8aa","#A5978B"],palette4:["#4ecdc4","#c7f464","#81D4FA","#fd6a6a","#546E7A"],palette5:["#2b908f","#f9a3a4","#90ee7e","#fa4443","#69d2e7"],palette6:["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"],palette7:["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"],palette8:["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"],palette9:["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"],palette10:["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"],default:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"]};return e[this.w.config.theme.palette]||e.default}}]),t}(),Hbt=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"draw",value:function(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}},{key:"drawTitleSubtitle",value:function(e){var n=this.w,i=e==="title"?n.config.title:n.config.subtitle,s=n.globals.svgWidth/2,o=i.offsetY,r="middle";if(i.align==="left"?(s=10,r="start"):i.align==="right"&&(s=n.globals.svgWidth-10,r="end"),s+=i.offsetX,o=o+parseInt(i.style.fontSize,10)+i.margin/2,i.text!==void 0){var a=new Ne(this.ctx).drawText({x:s,y:o,text:i.text,textAnchor:r,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,foreColor:i.style.color,opacity:1});a.node.setAttribute("class","apexcharts-".concat(e,"-text")),n.globals.dom.Paper.add(a)}}}]),t}(),Ubt=function(){function t(e){lt(this,t),this.w=e.w,this.dCtx=e}return ct(t,[{key:"getTitleSubtitleCoords",value:function(e){var n=this.w,i=0,s=0,o=e==="title"?n.config.title.floating:n.config.subtitle.floating,r=n.globals.dom.baseEl.querySelector(".apexcharts-".concat(e,"-text"));if(r!==null&&!o){var a=r.getBoundingClientRect();i=a.width,s=n.globals.axisCharts?a.height+5:a.height}return{width:i,height:s}}},{key:"getLegendsRect",value:function(){var e=this.w,n=e.globals.dom.elLegendWrap;e.config.legend.height||e.config.legend.position!=="top"&&e.config.legend.position!=="bottom"||(n.style.maxHeight=e.globals.svgHeight/2+"px");var i=Object.assign({},he.getBoundingClientRect(n));return n!==null&&!e.config.legend.floating&&e.config.legend.show?this.dCtx.lgRect={x:i.x,y:i.y,height:i.height,width:i.height===0?0:i.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},e.config.legend.position!=="left"&&e.config.legend.position!=="right"||1.5*this.dCtx.lgRect.width>e.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var e=this,n=this.w,i=[];n.config.series.forEach(function(l,c){l.data.forEach(function(u,d){var h;h=n.globals.series[c][d],s=n.config.dataLabels.formatter(h,{ctx:e.dCtx.ctx,seriesIndex:c,dataPointIndex:d,w:n}),i.push(s)})});var s=he.getLargestStringFromArr(i),o=new Ne(this.dCtx.ctx),r=n.config.dataLabels.style,a=o.getTextRects(s,parseInt(r.fontSize),r.fontFamily);return{width:1.05*a.width,height:a.height}}},{key:"getLargestStringFromMultiArr",value:function(e,n){var i=e;if(this.w.globals.isMultiLineX){var s=n.map(function(r,a){return Array.isArray(r)?r.length:1}),o=Math.max.apply(Math,Ns(s));i=n[s.indexOf(o)]}return i}}]),t}(),jbt=function(){function t(e){lt(this,t),this.w=e.w,this.dCtx=e}return ct(t,[{key:"getxAxisLabelsCoords",value:function(){var e,n=this.w,i=n.globals.labels.slice();if(n.config.xaxis.convertedCatToNumeric&&i.length===0&&(i=n.globals.categoryLabels),n.globals.timescaleLabels.length>0){var s=this.getxAxisTimeScaleLabelsCoords();e={width:s.width,height:s.height},n.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=n.config.legend.position!=="left"&&n.config.legend.position!=="right"||n.config.legend.floating?0:this.dCtx.lgRect.width;var o=n.globals.xLabelFormatter,r=he.getLargestStringFromArr(i),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);n.globals.isBarHorizontal&&(a=r=n.globals.yAxisScale[0].result.reduce(function(p,m){return p.length>m.length?p:m},0));var l=new $v(this.dCtx.ctx),c=r;r=l.xLabelFormat(o,r,c,{i:void 0,dateFormatter:new ri(this.dCtx.ctx).formatDate,w:n}),a=l.xLabelFormat(o,a,c,{i:void 0,dateFormatter:new ri(this.dCtx.ctx).formatDate,w:n}),(n.config.xaxis.convertedCatToNumeric&&r===void 0||String(r).trim()==="")&&(a=r="1");var u=new Ne(this.dCtx.ctx),d=u.getTextRects(r,n.config.xaxis.labels.style.fontSize),h=d;if(r!==a&&(h=u.getTextRects(a,n.config.xaxis.labels.style.fontSize)),(e={width:d.width>=h.width?d.width:h.width,height:d.height>=h.height?d.height:h.height}).width*i.length>n.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&n.config.xaxis.labels.rotate!==0||n.config.xaxis.labels.rotateAlways){if(!n.globals.isBarHorizontal){n.globals.rotateXLabels=!0;var f=function(p){return u.getTextRects(p,n.config.xaxis.labels.style.fontSize,n.config.xaxis.labels.style.fontFamily,"rotate(".concat(n.config.xaxis.labels.rotate," 0 0)"),!1)};d=f(r),r!==a&&(h=f(a)),e.height=(d.height>h.height?d.height:h.height)/1.5,e.width=d.width>h.width?d.width:h.width}}else n.globals.rotateXLabels=!1}return n.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var e,n=this.w;if(!n.globals.hasXaxisGroups)return{width:0,height:0};var i,s=((e=n.config.xaxis.group.style)===null||e===void 0?void 0:e.fontSize)||n.config.xaxis.labels.style.fontSize,o=n.globals.groups.map(function(d){return d.title}),r=he.getLargestStringFromArr(o),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,o),l=new Ne(this.dCtx.ctx),c=l.getTextRects(r,s),u=c;return r!==a&&(u=l.getTextRects(a,s)),i={width:c.width>=u.width?c.width:u.width,height:c.height>=u.height?c.height:u.height},n.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var e=this.w,n=0,i=0;if(e.config.xaxis.title.text!==void 0){var s=new Ne(this.dCtx.ctx).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);n=s.width,i=s.height}return{width:n,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var e,n=this.w;this.dCtx.timescaleLabels=n.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map(function(o){return o.value}),s=i.reduce(function(o,r){return o===void 0?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):o.length>r.length?o:r},0);return 1.05*(e=new Ne(this.dCtx.ctx).getTextRects(s,n.config.xaxis.labels.style.fontSize)).width*i.length>n.globals.gridWidth&&n.config.xaxis.labels.rotate!==0&&(n.globals.overlappingXLabels=!0),e}},{key:"additionalPaddingXLabels",value:function(e){var n=this,i=this.w,s=i.globals,o=i.config,r=o.xaxis.type,a=e.width;s.skipLastTimelinelabel=!1,s.skipFirstTimelinelabel=!1;var l=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,c=function(u,d){o.yaxis.length>1&&function(h){return s.collapsedSeriesIndices.indexOf(h)!==-1}(d)||function(h){if(n.dCtx.timescaleLabels&&n.dCtx.timescaleLabels.length){var f=n.dCtx.timescaleLabels[0],p=n.dCtx.timescaleLabels[n.dCtx.timescaleLabels.length-1].position+a/1.75-n.dCtx.yAxisWidthRight,m=f.position-a/1.75+n.dCtx.yAxisWidthLeft,b=i.config.legend.position==="right"&&n.dCtx.lgRect.width>0?n.dCtx.lgRect.width:0;p>s.svgWidth-s.translateX-b&&(s.skipLastTimelinelabel=!0),m<-(h.show&&!h.floating||o.chart.type!=="bar"&&o.chart.type!=="candlestick"&&o.chart.type!=="rangeBar"&&o.chart.type!=="boxPlot"?10:a/1.75)&&(s.skipFirstTimelinelabel=!0)}else r==="datetime"?n.dCtx.gridPad.right<a&&!s.rotateXLabels&&(s.skipLastTimelinelabel=!0):r!=="datetime"&&n.dCtx.gridPad.right<a/2-n.dCtx.yAxisWidthRight&&!s.rotateXLabels&&!i.config.xaxis.labels.trim&&(n.dCtx.xPadRight=a/2+1)}(u)};o.yaxis.forEach(function(u,d){l?(n.dCtx.gridPad.left<a&&(n.dCtx.xPadLeft=a/2+1),n.dCtx.xPadRight=a/2+1):c(u,d)})}}]),t}(),Wbt=function(){function t(e){lt(this,t),this.w=e.w,this.dCtx=e}return ct(t,[{key:"getyAxisLabelsCoords",value:function(){var e=this,n=this.w,i=[],s=10,o=new qc(this.dCtx.ctx);return n.config.yaxis.map(function(r,a){var l={seriesIndex:a,dataPointIndex:-1,w:n},c=n.globals.yAxisScale[a],u=0;if(!o.isYAxisHidden(a)&&r.labels.show&&r.labels.minWidth!==void 0&&(u=r.labels.minWidth),!o.isYAxisHidden(a)&&r.labels.show&&c.result.length){var d=n.globals.yLabelFormatters[a],h=c.niceMin===Number.MIN_VALUE?0:c.niceMin,f=c.result.reduce(function(A,S){var M,P;return((M=String(d(A,l)))===null||M===void 0?void 0:M.length)>((P=String(d(S,l)))===null||P===void 0?void 0:P.length)?A:S},h),p=f=d(f,l);if(f!==void 0&&f.length!==0||(f=c.niceMax),n.globals.isBarHorizontal){s=0;var m=n.globals.labels.slice();f=he.getLargestStringFromArr(m),f=d(f,{seriesIndex:a,dataPointIndex:-1,w:n}),p=e.dCtx.dimHelpers.getLargestStringFromMultiArr(f,m)}var b=new Ne(e.dCtx.ctx),w="rotate(".concat(r.labels.rotate," 0 0)"),k=b.getTextRects(f,r.labels.style.fontSize,r.labels.style.fontFamily,w,!1),C=k;f!==p&&(C=b.getTextRects(p,r.labels.style.fontSize,r.labels.style.fontFamily,w,!1)),i.push({width:(u>C.width||u>k.width?u:C.width>k.width?C.width:k.width)+s,height:C.height>k.height?C.height:k.height})}else i.push({width:0,height:0})}),i}},{key:"getyAxisTitleCoords",value:function(){var e=this,n=this.w,i=[];return n.config.yaxis.map(function(s,o){if(s.show&&s.title.text!==void 0){var r=new Ne(e.dCtx.ctx),a="rotate(".concat(s.title.rotate," 0 0)"),l=r.getTextRects(s.title.text,s.title.style.fontSize,s.title.style.fontFamily,a,!1);i.push({width:l.width,height:l.height})}else i.push({width:0,height:0})}),i}},{key:"getTotalYAxisWidth",value:function(){var e=this.w,n=0,i=0,s=0,o=e.globals.yAxisScale.length>1?10:0,r=new qc(this.dCtx.ctx),a=function(l,c){var u=e.config.yaxis[c].floating,d=0;l.width>0&&!u?(d=l.width+o,function(h){return e.globals.ignoreYAxisIndexes.indexOf(h)>-1}(c)&&(d=d-l.width-o)):d=u||r.isYAxisHidden(c)?0:5,e.config.yaxis[c].opposite?s+=d:i+=d,n+=d};return e.globals.yLabelsCoords.map(function(l,c){a(l,c)}),e.globals.yTitleCoords.map(function(l,c){a(l,c)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(n=e.globals.yLabelsCoords[0].width+e.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=s,n}}]),t}(),Ybt=function(){function t(e){lt(this,t),this.w=e.w,this.dCtx=e}return ct(t,[{key:"gridPadForColumnsInNumericAxis",value:function(e){var n=this.w,i=n.config,s=n.globals;if(s.noData||s.collapsedSeries.length+s.ancillaryCollapsedSeries.length===i.series.length)return 0;var o=function(f){return["bar","rangeBar","candlestick","boxPlot"].includes(f)},r=i.chart.type,a=0,l=o(r)?i.series.length:1;s.comboBarCount>0&&(l=s.comboBarCount),s.collapsedSeries.forEach(function(f){o(f.type)&&(l-=1)}),i.chart.stacked&&(l=1);var c=o(r)||s.comboBarCount>0,u=Math.abs(s.initialMaxX-s.initialMinX);if(c&&s.isXNumeric&&!s.isBarHorizontal&&l>0&&u!==0){u<=3&&(u=s.dataPoints);var d=u/e,h=s.minXDiff&&s.minXDiff/d>0?s.minXDiff/d:0;h>e/2&&(h/=2),(a=h*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(a=1),s.barPadForNumericAxis=a}return a}},{key:"gridPadFortitleSubtitle",value:function(){var e=this,n=this.w,i=n.globals,s=this.dCtx.isSparkline||!i.axisCharts?0:10;["title","subtitle"].forEach(function(a){n.config[a].text!==void 0?s+=n.config[a].margin:s+=e.dCtx.isSparkline||!i.axisCharts?0:5}),!n.config.legend.show||n.config.legend.position!=="bottom"||n.config.legend.floating||i.axisCharts||(s+=10);var o=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight-=o.height+r.height+s,i.translateY+=o.height+r.height+s}},{key:"setGridXPosForDualYAxis",value:function(e,n){var i=this.w,s=new qc(this.dCtx.ctx);i.config.yaxis.forEach(function(o,r){i.globals.ignoreYAxisIndexes.indexOf(r)!==-1||o.floating||s.isYAxisHidden(r)||(o.opposite&&(i.globals.translateX-=n[r].width+e[r].width+parseInt(o.labels.style.fontSize,10)/1.2+12),i.globals.translateX<2&&(i.globals.translateX=2))})}}]),t}(),ab=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new Ubt(this),this.dimYAxis=new Wbt(this),this.dimXAxis=new jbt(this),this.dimGrid=new Ybt(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return ct(t,[{key:"plotCoords",value:function(){var e=this,n=this.w,i=n.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var s=Array.isArray(n.config.stroke.width)?Math.max.apply(Math,Ns(n.config.stroke.width)):n.config.stroke.width;this.isSparkline&&((n.config.markers.discrete.length>0||n.config.markers.size>0)&&Object.entries(this.gridPad).forEach(function(r){var a=YU(r,2),l=a[0],c=a[1];e.gridPad[l]=Math.max(c,e.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(s/2,this.gridPad.top),this.gridPad.bottom=Math.max(s/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var o=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*o,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(o>0?o:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var e=this,n=this.w,i=n.globals,s=this.dimYAxis.getyAxisLabelsCoords(),o=this.dimYAxis.getyAxisTitleCoords();i.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),n.globals.yLabelsCoords=[],n.globals.yTitleCoords=[],n.config.yaxis.map(function(f,p){n.globals.yLabelsCoords.push({width:s[p].width,index:p}),n.globals.yTitleCoords.push({width:o[p].width,index:p})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),l=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,l,a),i.translateXAxisY=n.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=n.globals.rotateXLabels&&n.globals.isXNumeric&&n.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,n.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(n.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+n.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+n.config.xaxis.labels.offsetX;var c=this.yAxisWidth,u=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-l.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var d=10;(n.config.chart.type==="radar"||this.isSparkline)&&(c=0,u=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||n.config.chart.type==="treemap")&&(c=0,u=0,d=0),this.isSparkline||n.config.chart.type==="treemap"||this.dimXAxis.additionalPaddingXLabels(r);var h=function(){i.translateX=c+e.datalabelsCoords.width,i.gridHeight=i.svgHeight-e.lgRect.height-u-(e.isSparkline||n.config.chart.type==="treemap"?0:n.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-c-2*e.datalabelsCoords.width};switch(n.config.xaxis.position==="top"&&(d=i.xAxisHeight-n.config.xaxis.axisTicks.height-5),n.config.legend.position){case"bottom":i.translateY=d,h();break;case"top":i.translateY=this.lgRect.height+d,h();break;case"left":i.translateY=d,i.translateX=this.lgRect.width+c+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-u-12,i.gridWidth=i.svgWidth-this.lgRect.width-c-2*this.datalabelsCoords.width;break;case"right":i.translateY=d,i.translateX=c+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-u-12,i.gridWidth=i.svgWidth-this.lgRect.width-c-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(o,s),new QS(this.ctx).setYAxisXPosition(s,o)}},{key:"setDimensionsForNonAxisCharts",value:function(){var e=this.w,n=e.globals,i=e.config,s=0;e.config.legend.show&&!e.config.legend.floating&&(s=20);var o=i.chart.type==="pie"||i.chart.type==="polarArea"||i.chart.type==="donut"?"pie":"radialBar",r=i.plotOptions[o].offsetY,a=i.plotOptions[o].offsetX;if(!i.legend.show||i.legend.floating){n.gridHeight=n.svgHeight;var l=n.dom.elWrap.getBoundingClientRect().width;return n.gridWidth=Math.min(l,n.gridHeight),n.translateY=r,void(n.translateX=a+(n.svgWidth-n.gridWidth)/2)}switch(i.legend.position){case"bottom":n.gridHeight=n.svgHeight-this.lgRect.height,n.gridWidth=n.svgWidth,n.translateY=r-10,n.translateX=a+(n.svgWidth-n.gridWidth)/2;break;case"top":n.gridHeight=n.svgHeight-this.lgRect.height,n.gridWidth=n.svgWidth,n.translateY=this.lgRect.height+r+10,n.translateX=a+(n.svgWidth-n.gridWidth)/2;break;case"left":n.gridWidth=n.svgWidth-this.lgRect.width-s,n.gridHeight=i.chart.height!=="auto"?n.svgHeight:n.gridWidth,n.translateY=r,n.translateX=a+this.lgRect.width+s;break;case"right":n.gridWidth=n.svgWidth-this.lgRect.width-s-5,n.gridHeight=i.chart.height!=="auto"?n.svgHeight:n.gridWidth,n.translateY=r,n.translateX=a+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(e,n,i){var s=this.w,o=s.globals.hasXaxisGroups?2:1,r=i.height+e.height+n.height,a=s.globals.isMultiLineX?1.2:s.globals.LINE_HEIGHT_RATIO,l=s.globals.rotateXLabels?22:10,c=s.globals.rotateXLabels&&s.config.legend.position==="bottom"?10:0;this.xAxisHeight=r*a+o*l+c,this.xAxisWidth=e.width,this.xAxisHeight-n.height>s.config.xaxis.labels.maxHeight&&(this.xAxisHeight=s.config.xaxis.labels.maxHeight),s.config.xaxis.labels.minHeight&&this.xAxisHeight<s.config.xaxis.labels.minHeight&&(this.xAxisHeight=s.config.xaxis.labels.minHeight),s.config.xaxis.floating&&(this.xAxisHeight=0);var u=0,d=0;s.config.yaxis.forEach(function(h){u+=h.labels.minWidth,d+=h.labels.maxWidth}),this.yAxisWidth<u&&(this.yAxisWidth=u),this.yAxisWidth>d&&(this.yAxisWidth=d)}}]),t}(),qbt=function(){function t(e){lt(this,t),this.w=e.w,this.lgCtx=e}return ct(t,[{key:"getLegendStyles",value:function(){var e,n,i,s=document.createElement("style");s.setAttribute("type","text/css");var o=((e=this.lgCtx.ctx)===null||e===void 0||(n=e.opts)===null||n===void 0||(i=n.chart)===null||i===void 0?void 0:i.nonce)||this.w.config.chart.nonce;o&&s.setAttribute("nonce",o);var r=document.createTextNode(`
175 + .apexcharts-flip-y {
176 + transform: scaleY(-1) translateY(-100%);
177 + transform-origin: top;
178 + transform-box: fill-box;
179 + }
180 + .apexcharts-flip-x {
181 + transform: scaleX(-1);
182 + transform-origin: center;
183 + transform-box: fill-box;
184 + }
185 + .apexcharts-legend {
186 + display: flex;
187 + overflow: auto;
188 + padding: 0 10px;
189 + }
190 + .apexcharts-legend.apexcharts-legend-group-horizontal {
191 + flex-direction: column;
192 + }
193 + .apexcharts-legend-group {
194 + display: flex;
195 + }
196 + .apexcharts-legend-group-vertical {
197 + flex-direction: column-reverse;
198 + }
199 + .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {
200 + flex-wrap: wrap
201 + }
202 + .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
203 + flex-direction: column;
204 + bottom: 0;
205 + }
206 + .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
207 + justify-content: flex-start;
208 + align-items: flex-start;
209 + }
210 + .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {
211 + justify-content: center;
212 + align-items: center;
213 + }
214 + .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {
215 + justify-content: flex-end;
216 + align-items: flex-end;
217 + }
218 + .apexcharts-legend-series {
219 + cursor: pointer;
220 + line-height: normal;
221 + display: flex;
222 + align-items: center;
223 + }
224 + .apexcharts-legend-text {
225 + position: relative;
226 + font-size: 14px;
227 + }
228 + .apexcharts-legend-text *, .apexcharts-legend-marker * {
229 + pointer-events: none;
230 + }
231 + .apexcharts-legend-marker {
232 + position: relative;
233 + display: flex;
234 + align-items: center;
235 + justify-content: center;
236 + cursor: pointer;
237 + margin-right: 1px;
238 + }
239 +
240 + .apexcharts-legend-series.apexcharts-no-click {
241 + cursor: auto;
242 + }
243 + .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {
244 + display: none !important;
245 + }
246 + .apexcharts-inactive-legend {
247 + opacity: 0.45;
248 + }
249 +
250 + `);return s.appendChild(r),s}},{key:"getLegendDimensions",value:function(){var e=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),n=e.width;return{clwh:e.height,clww:n}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(e,n){var i=this,s=this.w;if(s.globals.axisCharts||s.config.chart.type==="radialBar"){s.globals.resized=!0;var o=null,r=null;s.globals.risingSeries=[],s.globals.axisCharts?(o=s.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),r=parseInt(o.getAttribute("data:realIndex"),10)):(o=s.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),r=parseInt(o.getAttribute("rel"),10)-1),n?[{cs:s.globals.collapsedSeries,csi:s.globals.collapsedSeriesIndices},{cs:s.globals.ancillaryCollapsedSeries,csi:s.globals.ancillaryCollapsedSeriesIndices}].forEach(function(u){i.riseCollapsedSeries(u.cs,u.csi,r)}):this.hideSeries({seriesEl:o,realIndex:r})}else{var a=s.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(e+1,"'] path")),l=s.config.chart.type;if(l==="pie"||l==="polarArea"||l==="donut"){var c=s.config.plotOptions.pie.donut.labels;new Ne(this.lgCtx.ctx).pathMouseDown(a,null),this.lgCtx.ctx.pie.printDataLabelsInner(a.node,c)}a.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(e){var n=e.realIndex,i=this.w,s=i.globals,o=he.clone(i.config.series);if(s.axisCharts){var r=i.config.yaxis[s.seriesYAxisReverseMap[n]],a={index:n,data:o[n].data.slice(),type:o[n].type||i.config.chart.type};if(r&&r.show&&r.showAlways)s.ancillaryCollapsedSeriesIndices.indexOf(n)<0&&(s.ancillaryCollapsedSeries.push(a),s.ancillaryCollapsedSeriesIndices.push(n));else if(s.collapsedSeriesIndices.indexOf(n)<0){s.collapsedSeries.push(a),s.collapsedSeriesIndices.push(n);var l=s.risingSeries.indexOf(n);s.risingSeries.splice(l,1)}}else s.collapsedSeries.push({index:n,data:o[n]}),s.collapsedSeriesIndices.push(n);return s.allSeriesCollapsed=s.collapsedSeries.length+s.ancillaryCollapsedSeries.length===i.config.series.length,this._getSeriesBasedOnCollapsedState(o)}},{key:"hideSeries",value:function(e){for(var n=e.seriesEl,i=e.realIndex,s=this.w,o=this.getSeriesAfterCollapsing({realIndex:i}),r=n.childNodes,a=0;a<r.length;a++)r[a].classList.contains("apexcharts-series-markers-wrap")&&(r[a].classList.contains("apexcharts-hide")?r[a].classList.remove("apexcharts-hide"):r[a].classList.add("apexcharts-hide"));this.lgCtx.ctx.updateHelpers._updateSeries(o,s.config.chart.animations.dynamicAnimation.enabled)}},{key:"riseCollapsedSeries",value:function(e,n,i){var s=this.w,o=he.clone(s.config.series);if(e.length>0){for(var r=0;r<e.length;r++)e[r].index===i&&(s.globals.axisCharts?o[i].data=e[r].data.slice():o[i]=e[r].data,typeof o[i]!="number"&&(o[i].hidden=!1),e.splice(r,1),n.splice(r,1),s.globals.risingSeries.push(i));o=this._getSeriesBasedOnCollapsedState(o),this.lgCtx.ctx.updateHelpers._updateSeries(o,s.config.chart.animations.dynamicAnimation.enabled)}}},{key:"_getSeriesBasedOnCollapsedState",value:function(e){var n=this.w,i=0;return n.globals.axisCharts?e.forEach(function(s,o){n.globals.collapsedSeriesIndices.indexOf(o)<0&&n.globals.ancillaryCollapsedSeriesIndices.indexOf(o)<0||(e[o].data=[],i++)}):e.forEach(function(s,o){!n.globals.collapsedSeriesIndices.indexOf(o)<0&&(e[o]=0,i++)}),n.globals.allSeriesCollapsed=i===e.length,e}}]),t}(),$j=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed=this.w.config.chart.type==="bar"&&this.w.config.plotOptions.bar.distributed&&this.w.config.series.length===1,this.legendHelpers=new qbt(this)}return ct(t,[{key:"init",value:function(){var e=this.w,n=e.globals,i=e.config,s=i.legend.showForSingleSeries&&n.series.length===1||this.isBarsDistributed||n.series.length>1;if(this.legendHelpers.appendToForeignObject(),(s||!n.axisCharts)&&i.legend.show){for(;n.dom.elLegendWrap.firstChild;)n.dom.elLegendWrap.removeChild(n.dom.elLegendWrap.firstChild);this.drawLegends(),i.legend.position==="bottom"||i.legend.position==="top"?this.legendAlignHorizontal():i.legend.position!=="right"&&i.legend.position!=="left"||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(e){var n=e.i,i=e.fillcolor,s=this.w,o=document.createElement("span");o.classList.add("apexcharts-legend-marker");var r=s.config.legend.markers.shape||s.config.markers.shape,a=r;Array.isArray(r)&&(a=r[n]);var l=Array.isArray(s.config.legend.markers.size)?parseFloat(s.config.legend.markers.size[n]):parseFloat(s.config.legend.markers.size),c=Array.isArray(s.config.legend.markers.offsetX)?parseFloat(s.config.legend.markers.offsetX[n]):parseFloat(s.config.legend.markers.offsetX),u=Array.isArray(s.config.legend.markers.offsetY)?parseFloat(s.config.legend.markers.offsetY[n]):parseFloat(s.config.legend.markers.offsetY),d=Array.isArray(s.config.legend.markers.strokeWidth)?parseFloat(s.config.legend.markers.strokeWidth[n]):parseFloat(s.config.legend.markers.strokeWidth),h=o.style;if(h.height=2*(l+d)+"px",h.width=2*(l+d)+"px",h.left=c+"px",h.top=u+"px",s.config.legend.markers.customHTML)h.background="transparent",h.color=i[n],Array.isArray(s.config.legend.markers.customHTML)?s.config.legend.markers.customHTML[n]&&(o.innerHTML=s.config.legend.markers.customHTML[n]()):o.innerHTML=s.config.legend.markers.customHTML();else{var f=new Np(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(a),seriesIndex:n,strokeWidth:d,size:l}),p=window.SVG().addTo(o).size("100%","100%"),m=new Ne(this.ctx).drawMarker(0,0,tt(tt({},f),{},{pointFillColor:Array.isArray(i)?i[n]:f.pointFillColor,shape:a}));s.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach(function(b){b.node.classList.contains("apexcharts-marker-triangle")?b.node.style.transform="translate(50%, 45%)":b.node.style.transform="translate(50%, 50%)"}),p.add(m)}return o}},{key:"drawLegends",value:function(){var e=this,n=this,i=this.w,s=i.config.legend.fontFamily,o=i.globals.seriesNames,r=i.config.legend.markers.fillColors?i.config.legend.markers.fillColors.slice():i.globals.colors.slice();if(i.config.chart.type==="heatmap"){var a=i.config.plotOptions.heatmap.colorScale.ranges;o=a.map(function(f){return f.name?f.name:f.from+" - "+f.to}),r=a.map(function(f){return f.color})}else this.isBarsDistributed&&(o=i.globals.labels.slice());i.config.legend.customLegendItems.length&&(o=i.config.legend.customLegendItems);var l=i.globals.legendFormatter,c=i.config.legend.inverseOrder,u=[];i.globals.seriesGroups.length>1&&i.config.legend.clusterGroupedSeries&&i.globals.seriesGroups.forEach(function(f,p){u[p]=document.createElement("div"),u[p].classList.add("apexcharts-legend-group","apexcharts-legend-group-".concat(p)),i.config.legend.clusterGroupedSeriesOrientation==="horizontal"?i.globals.dom.elLegendWrap.classList.add("apexcharts-legend-group-horizontal"):u[p].classList.add("apexcharts-legend-group-vertical")});for(var d=function(f){var p,m=l(o[f],{seriesIndex:f,w:i}),b=!1,w=!1;if(i.globals.collapsedSeries.length>0)for(var k=0;k<i.globals.collapsedSeries.length;k++)i.globals.collapsedSeries[k].index===f&&(b=!0);if(i.globals.ancillaryCollapsedSeriesIndices.length>0)for(var C=0;C<i.globals.ancillaryCollapsedSeriesIndices.length;C++)i.globals.ancillaryCollapsedSeriesIndices[C]===f&&(w=!0);var A=e.createLegendMarker({i:f,fillcolor:r});Ne.setAttrs(A,{rel:f+1,"data:collapsed":b||w}),(b||w)&&A.classList.add("apexcharts-inactive-legend");var S=document.createElement("div"),M=document.createElement("span");M.classList.add("apexcharts-legend-text"),M.innerHTML=Array.isArray(m)?m.join(" "):m;var P=i.config.legend.labels.useSeriesColors?i.globals.colors[f]:Array.isArray(i.config.legend.labels.colors)?(p=i.config.legend.labels.colors)===null||p===void 0?void 0:p[f]:i.config.legend.labels.colors;P||(P=i.config.chart.foreColor),M.style.color=P,M.style.fontSize=parseFloat(i.config.legend.fontSize)+"px",M.style.fontWeight=i.config.legend.fontWeight,M.style.fontFamily=s||i.config.chart.fontFamily,Ne.setAttrs(M,{rel:f+1,i:f,"data:default-text":encodeURIComponent(m),"data:collapsed":b||w}),S.appendChild(A),S.appendChild(M);var T=new ys(e.ctx);i.config.legend.showForZeroSeries||T.getSeriesTotalByIndex(f)===0&&T.seriesHaveSameValues(f)&&!T.isSeriesNull(f)&&i.globals.collapsedSeriesIndices.indexOf(f)===-1&&i.globals.ancillaryCollapsedSeriesIndices.indexOf(f)===-1&&S.classList.add("apexcharts-hidden-zero-series"),i.config.legend.showForNullSeries||T.isSeriesNull(f)&&i.globals.collapsedSeriesIndices.indexOf(f)===-1&&i.globals.ancillaryCollapsedSeriesIndices.indexOf(f)===-1&&S.classList.add("apexcharts-hidden-null-series"),u.length?i.globals.seriesGroups.forEach(function(I,L){var R;I.includes((R=i.config.series[f])===null||R===void 0?void 0:R.name)&&(i.globals.dom.elLegendWrap.appendChild(u[L]),u[L].appendChild(S))}):i.globals.dom.elLegendWrap.appendChild(S),i.globals.dom.elLegendWrap.classList.add("apexcharts-align-".concat(i.config.legend.horizontalAlign)),i.globals.dom.elLegendWrap.classList.add("apx-legend-position-"+i.config.legend.position),S.classList.add("apexcharts-legend-series"),S.style.margin="".concat(i.config.legend.itemMargin.vertical,"px ").concat(i.config.legend.itemMargin.horizontal,"px"),i.globals.dom.elLegendWrap.style.width=i.config.legend.width?i.config.legend.width+"px":"",i.globals.dom.elLegendWrap.style.height=i.config.legend.height?i.config.legend.height+"px":"",Ne.setAttrs(S,{rel:f+1,seriesName:he.escapeString(o[f]),"data:collapsed":b||w}),(b||w)&&S.classList.add("apexcharts-inactive-legend"),i.config.legend.onItemClick.toggleDataSeries||S.classList.add("apexcharts-no-click")},h=c?o.length-1:0;c?h>=0:h<=o.length-1;c?h--:h++)d(h);i.globals.dom.elWrap.addEventListener("click",n.onLegendClick,!0),i.config.legend.onItemHover.highlightDataSeries&&i.config.legend.customLegendItems.length===0&&(i.globals.dom.elWrap.addEventListener("mousemove",n.onLegendHovered,!0),i.globals.dom.elWrap.addEventListener("mouseout",n.onLegendHovered,!0))}},{key:"setLegendWrapXY",value:function(e,n){var i=this.w,s=i.globals.dom.elLegendWrap,o=s.clientHeight,r=0,a=0;if(i.config.legend.position==="bottom")a=i.globals.svgHeight-Math.min(o,i.globals.svgHeight/2)-5;else if(i.config.legend.position==="top"){var l=new ab(this.ctx),c=l.dimHelpers.getTitleSubtitleCoords("title").height,u=l.dimHelpers.getTitleSubtitleCoords("subtitle").height;a=(c>0?c-10:0)+(u>0?u-10:0)}s.style.position="absolute",r=r+e+i.config.legend.offsetX,a=a+n+i.config.legend.offsetY,s.style.left=r+"px",s.style.top=a+"px",i.config.legend.position==="right"&&(s.style.left="auto",s.style.right=25+i.config.legend.offsetX+"px"),["width","height"].forEach(function(d){s.style[d]&&(s.style[d]=parseInt(i.config.legend[d],10)+"px")})}},{key:"legendAlignHorizontal",value:function(){var e=this.w;e.globals.dom.elLegendWrap.style.right=0;var n=new ab(this.ctx),i=n.dimHelpers.getTitleSubtitleCoords("title"),s=n.dimHelpers.getTitleSubtitleCoords("subtitle"),o=0;e.config.legend.position==="top"&&(o=i.height+s.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,o)}},{key:"legendAlignVertical",value:function(){var e=this.w,n=this.legendHelpers.getLegendDimensions(),i=0;e.config.legend.position==="left"&&(i=20),e.config.legend.position==="right"&&(i=e.globals.svgWidth-n.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(e){var n=this.w,i=e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker");if(n.config.chart.type==="heatmap"||this.isBarsDistributed){if(i){var s=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,s,this.w]),new gr(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&i&&new gr(this.ctx).toggleSeriesOnHover(e,e.target)}},{key:"onLegendClick",value:function(e){var n=this.w;if(!n.config.legend.customLegendItems.length&&(e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(e.target.getAttribute("rel"),10)-1,s=e.target.getAttribute("data:collapsed")==="true",o=this.w.config.chart.events.legendClick;typeof o=="function"&&o(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;typeof r=="function"&&e.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),n.config.chart.type!=="treemap"&&n.config.chart.type!=="heatmap"&&!this.isBarsDistributed&&n.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,s)}}}]),t}(),Aj=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=n.globals.minX,this.maxX=n.globals.maxX}return ct(t,[{key:"createToolbar",value:function(){var e=this,n=this.w,i=function(){return document.createElement("div")},s=i();if(s.setAttribute("class","apexcharts-toolbar"),s.style.top=n.config.chart.toolbar.offsetY+"px",s.style.right=3-n.config.chart.toolbar.offsetX+"px",n.globals.dom.elWrap.appendChild(s),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=n.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var o=0;o<this.t.customIcons.length;o++)this.elCustomIcons.push(i());var r=[],a=function(d,h,f){var p=d.toLowerCase();e.t[p]&&n.config.chart.zoom.enabled&&r.push({el:h,icon:typeof e.t[p]=="string"?e.t[p]:f,title:e.localeValues[d],class:"apexcharts-".concat(p,"-icon")})};a("zoomIn",this.elZoomIn,`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
251 + <path d="M0 0h24v24H0z" fill="none"/>
252 + <path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
253 +</svg>
254 +`),a("zoomOut",this.elZoomOut,`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
255 + <path d="M0 0h24v24H0z" fill="none"/>
256 + <path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
257 +</svg>
258 +`);var l=function(d){e.t[d]&&n.config.chart[d].enabled&&r.push({el:d==="zoom"?e.elZoom:e.elSelection,icon:typeof e.t[d]=="string"?e.t[d]:d==="zoom"?`<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24">
259 + <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>
260 + <path d="M0 0h24v24H0V0z" fill="none"/>
261 + <path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/>
262 +</svg>`:`<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
263 + <path d="M0 0h24v24H0z" fill="none"/>
264 + <path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z"/>
265 +</svg>`,title:e.localeValues[d==="zoom"?"selectionZoom":"selection"],class:n.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(d,"-icon")})};l("zoom"),l("selection"),this.t.pan&&n.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:typeof this.t.pan=="string"?this.t.pan:`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24">
266 + <defs>
267 + <path d="M0 0h24v24H0z" id="a"/>
268 + </defs>
269 + <clipPath id="b">
270 + <use overflow="visible" xlink:href="#a"/>
271 + </clipPath>
272 + <path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/>
273 +</svg>`,title:this.localeValues.pan,class:n.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),a("reset",this.elZoomReset,`<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
274 + <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
275 + <path d="M0 0h24v24H0z" fill="none"/>
276 +</svg>`),this.t.download&&r.push({el:this.elMenuIcon,icon:typeof this.t.download=="string"?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var c=0;c<this.elCustomIcons.length;c++)r.push({el:this.elCustomIcons[c],icon:this.t.customIcons[c].icon,title:this.t.customIcons[c].title,index:this.t.customIcons[c].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[c].class});r.forEach(function(d,h){d.index&&he.moveIndexInArray(r,h,d.index)});for(var u=0;u<r.length;u++)Ne.setAttrs(r[u].el,{class:r[u].class,title:r[u].title}),r[u].el.innerHTML=r[u].icon,s.appendChild(r[u].el);this._createHamburgerMenu(s),n.globals.zoomEnabled?this.elZoom.classList.add(this.selectedClass):n.globals.panEnabled?this.elPan.classList.add(this.selectedClass):n.globals.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}},{key:"_createHamburgerMenu",value:function(e){this.elMenuItems=[],e.appendChild(this.elMenu),Ne.setAttrs(this.elMenu,{class:"apexcharts-menu"});for(var n=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}],i=0;i<n.length;i++)this.elMenuItems.push(document.createElement("div")),this.elMenuItems[i].innerHTML=n[i].title,Ne.setAttrs(this.elMenuItems[i],{class:"apexcharts-menu-item ".concat(n[i].name),title:n[i].title}),this.elMenu.appendChild(this.elMenuItems[i])}},{key:"addToolbarEventListeners",value:function(){var e=this;this.elZoomReset.addEventListener("click",this.handleZoomReset.bind(this)),this.elSelection.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),this.elZoom.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),this.elZoomIn.addEventListener("click",this.handleZoomIn.bind(this)),this.elZoomOut.addEventListener("click",this.handleZoomOut.bind(this)),this.elPan.addEventListener("click",this.togglePanning.bind(this)),this.elMenuIcon.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach(function(i){i.classList.contains("exportSVG")?i.addEventListener("click",e.handleDownload.bind(e,"svg")):i.classList.contains("exportPNG")?i.addEventListener("click",e.handleDownload.bind(e,"png")):i.classList.contains("exportCSV")&&i.addEventListener("click",e.handleDownload.bind(e,"csv"))});for(var n=0;n<this.t.customIcons.length;n++)this.elCustomIcons[n].addEventListener("click",this.t.customIcons[n].click.bind(this,this.ctx,this.ctx.w))}},{key:"toggleZoomSelection",value:function(e){this.ctx.getSyncedCharts().forEach(function(n){n.ctx.toolbar.toggleOtherControls();var i=e==="selection"?n.ctx.toolbar.elSelection:n.ctx.toolbar.elZoom,s=e==="selection"?"selectionEnabled":"zoomEnabled";n.w.globals[s]=!n.w.globals[s],i.classList.contains(n.ctx.toolbar.selectedClass)?i.classList.remove(n.ctx.toolbar.selectedClass):i.classList.add(n.ctx.toolbar.selectedClass)})}},{key:"getToolbarIconsReference",value:function(){var e=this.w;this.elZoom||(this.elZoom=e.globals.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=e.globals.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=e.globals.dom.baseEl.querySelector(".apexcharts-selection-icon"))}},{key:"enableZoomPanFromToolbar",value:function(e){this.toggleOtherControls(),e==="pan"?this.w.globals.panEnabled=!0:this.w.globals.zoomEnabled=!0;var n=e==="pan"?this.elPan:this.elZoom,i=e==="pan"?this.elZoom:this.elPan;n&&n.classList.add(this.selectedClass),i&&i.classList.remove(this.selectedClass)}},{key:"togglePanning",value:function(){this.ctx.getSyncedCharts().forEach(function(e){e.ctx.toolbar.toggleOtherControls(),e.w.globals.panEnabled=!e.w.globals.panEnabled,e.ctx.toolbar.elPan.classList.contains(e.ctx.toolbar.selectedClass)?e.ctx.toolbar.elPan.classList.remove(e.ctx.toolbar.selectedClass):e.ctx.toolbar.elPan.classList.add(e.ctx.toolbar.selectedClass)})}},{key:"toggleOtherControls",value:function(){var e=this,n=this.w;n.globals.panEnabled=!1,n.globals.zoomEnabled=!1,n.globals.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach(function(i){i&&i.classList.remove(e.selectedClass)})}},{key:"handleZoomIn",value:function(){var e=this.w;e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY);var n=(this.minX+this.maxX)/2,i=(this.minX+n)/2,s=(this.maxX+n)/2,o=this._getNewMinXMaxX(i,s);e.globals.disableZoomIn||this.zoomUpdateOptions(o.minX,o.maxX)}},{key:"handleZoomOut",value:function(){var e=this.w;if(e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY),!(e.config.xaxis.type==="datetime"&&new Date(this.minX).getUTCFullYear()<1e3)){var n=(this.minX+this.maxX)/2,i=this.minX-(n-this.minX),s=this.maxX-(n-this.maxX),o=this._getNewMinXMaxX(i,s);e.globals.disableZoomOut||this.zoomUpdateOptions(o.minX,o.maxX)}}},{key:"_getNewMinXMaxX",value:function(e,n){var i=this.w.config.xaxis.convertedCatToNumeric;return{minX:i?Math.floor(e):e,maxX:i?Math.floor(n):n}}},{key:"zoomUpdateOptions",value:function(e,n){var i=this.w;if(e!==void 0||n!==void 0){if(!(i.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,n=i.globals.dataPoints),n-e<2))){var s={min:e,max:n},o=this.getBeforeZoomRange(s);o&&(s=o.xaxis);var r={xaxis:s},a=he.clone(i.globals.initialConfig.yaxis);i.config.chart.group||(r.yaxis=a),this.w.globals.zoomed=!0,this.ctx.updateHelpers._updateOptions(r,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(s,a)}}else this.handleZoomReset()}},{key:"zoomCallback",value:function(e,n){typeof this.ev.zoomed=="function"&&this.ev.zoomed(this.ctx,{xaxis:e,yaxis:n})}},{key:"getBeforeZoomRange",value:function(e,n){var i=null;return typeof this.ev.beforeZoom=="function"&&(i=this.ev.beforeZoom(this,{xaxis:e,yaxis:n})),i}},{key:"toggleMenu",value:function(){var e=this;window.setTimeout(function(){e.elMenu.classList.contains("apexcharts-menu-open")?e.elMenu.classList.remove("apexcharts-menu-open"):e.elMenu.classList.add("apexcharts-menu-open")},0)}},{key:"handleDownload",value:function(e){var n=this.w,i=new rb(this.ctx);switch(e){case"svg":i.exportToSVG(this.ctx);break;case"png":i.exportToPng(this.ctx);break;case"csv":i.exportToCSV({series:n.config.series,columnDelimiter:n.config.chart.toolbar.export.csv.columnDelimiter})}}},{key:"handleZoomReset",value:function(e){this.ctx.getSyncedCharts().forEach(function(n){var i=n.w;if(i.globals.lastXAxis.min=i.globals.initialConfig.xaxis.min,i.globals.lastXAxis.max=i.globals.initialConfig.xaxis.max,n.updateHelpers.revertDefaultAxisMinMax(),typeof i.config.chart.events.beforeResetZoom=="function"){var s=i.config.chart.events.beforeResetZoom(n,i);s&&n.updateHelpers.revertDefaultAxisMinMax(s)}typeof i.config.chart.events.zoomed=="function"&&n.ctx.toolbar.zoomCallback({min:i.config.xaxis.min,max:i.config.xaxis.max}),i.globals.zoomed=!1;var o=n.ctx.series.emptyCollapsedSeries(he.clone(i.globals.initialSeries));n.updateHelpers._updateSeries(o,i.config.chart.animations.dynamicAnimation.enabled)})}},{key:"destroy",value:function(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}}]),t}(),Gbt=function(t){kv(n,Aj);var e=wv(n);function n(i){var s;return lt(this,n),(s=e.call(this,i)).ctx=i,s.w=i.w,s.dragged=!1,s.graphics=new Ne(s.ctx),s.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend","wheel"],s.clientX=0,s.clientY=0,s.startX=0,s.endX=0,s.dragX=0,s.startY=0,s.endY=0,s.dragY=0,s.moveDirection="none",s.debounceTimer=null,s.debounceDelay=100,s.wheelDelay=400,s}return ct(n,[{key:"init",value:function(i){var s=this,o=i.xyRatios,r=this.w,a=this;this.xyRatios=o,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=r.globals.dom.baseEl.querySelector(".apexcharts-grid"),this.constraints=new Ys(0,0,r.globals.gridWidth,r.globals.gridHeight),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),r.globals.dom.Paper.add(this.zoomRect),r.globals.dom.Paper.add(this.selectionRect),r.config.chart.selection.type==="x"?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:r.globals.gridWidth,maxY:r.globals.gridHeight}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):r.config.chart.selection.type==="y"?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:r.globals.gridWidth}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=r.globals.dom.baseEl.querySelector("".concat(r.globals.chartClass," .apexcharts-svg")),this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach(function(l){s.hoverArea.addEventListener(l,a.svgMouseEvents.bind(a,o),{capture:!1,passive:!0})}),r.config.chart.zoom.enabled&&r.config.chart.zoom.allowMouseWheelZoom&&this.hoverArea.addEventListener("wheel",a.mouseWheelEvent.bind(a),{capture:!1,passive:!1})}},{key:"destroy",value:function(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}},{key:"svgMouseEvents",value:function(i,s){var o=this.w,r=this.ctx.toolbar,a=o.globals.zoomEnabled?o.config.chart.zoom.type:o.config.chart.selection.type,l=o.config.chart.toolbar.autoSelected;if(s.shiftKey?(this.shiftWasPressed=!0,r.enableZoomPanFromToolbar(l==="pan"?"zoom":"pan")):this.shiftWasPressed&&(r.enableZoomPanFromToolbar(l),this.shiftWasPressed=!1),s.target){var c,u=s.target.classList;if(s.target.parentNode&&s.target.parentNode!==null&&(c=s.target.parentNode.classList),!(u.contains("apexcharts-legend-marker")||u.contains("apexcharts-legend-text")||c&&c.contains("apexcharts-toolbar"))){if(this.clientX=s.type==="touchmove"||s.type==="touchstart"?s.touches[0].clientX:s.type==="touchend"?s.changedTouches[0].clientX:s.clientX,this.clientY=s.type==="touchmove"||s.type==="touchstart"?s.touches[0].clientY:s.type==="touchend"?s.changedTouches[0].clientY:s.clientY,s.type==="mousedown"&&s.which===1||s.type==="touchstart"){var d=this.gridRect.getBoundingClientRect();this.startX=this.clientX-d.left-o.globals.barPadForNumericAxis,this.startY=this.clientY-d.top,this.dragged=!1,this.w.globals.mousedown=!0}(s.type==="mousemove"&&s.which===1||s.type==="touchmove")&&(this.dragged=!0,o.globals.panEnabled?(o.globals.selection=null,this.w.globals.mousedown&&this.panDragging({context:this,zoomtype:a,xyRatios:i})):(this.w.globals.mousedown&&o.globals.zoomEnabled||this.w.globals.mousedown&&o.globals.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:a}))),s.type!=="mouseup"&&s.type!=="touchend"&&s.type!=="mouseleave"||this.handleMouseUp({zoomtype:a}),this.makeSelectionRectDraggable()}}}},{key:"handleMouseUp",value:function(i){var s,o=i.zoomtype,r=i.isResized,a=this.w,l=(s=this.gridRect)===null||s===void 0?void 0:s.getBoundingClientRect();l&&(this.w.globals.mousedown||r)&&(this.endX=this.clientX-l.left-a.globals.barPadForNumericAxis,this.endY=this.clientY-l.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(a.globals.zoomEnabled||a.globals.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:o}),a.globals.panEnabled&&a.config.xaxis.convertedCatToNumeric&&this.delayedPanScrolled()),a.globals.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.globals.mousedown=!1}},{key:"mouseWheelEvent",value:function(i){var s=this,o=this.w;i.preventDefault();var r=Date.now();r-o.globals.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(i),o.globals.lastWheelExecution=r),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){r-o.globals.lastWheelExecution>s.wheelDelay&&(s.executeMouseWheelZoom(i),o.globals.lastWheelExecution=r)},this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(i){var s,o=this.w;this.minX=o.globals.isRangeBar?o.globals.minY:o.globals.minX,this.maxX=o.globals.isRangeBar?o.globals.maxY:o.globals.maxX;var r=(s=this.gridRect)===null||s===void 0?void 0:s.getBoundingClientRect();if(r){var a,l,c,u=(i.clientX-r.left)/r.width,d=this.minX,h=this.maxX,f=h-d;if(i.deltaY<0){var p=d+u*f;l=p-(a=.5*f)/2,c=p+a/2}else l=d-(a=1.5*f)/2,c=h+a/2;if(!o.globals.isRangeBar){l=Math.max(l,o.globals.initialMinX),c=Math.min(c,o.globals.initialMaxX);var m=.01*(o.globals.initialMaxX-o.globals.initialMinX);if(c-l<m){var b=(l+c)/2;l=b-m/2,c=b+m/2}}var w=this._getNewMinXMaxX(l,c);isNaN(w.minX)||isNaN(w.maxX)||this.zoomUpdateOptions(w.minX,w.maxX)}}},{key:"makeSelectionRectDraggable",value:function(){var i=this,s=this.w;if(this.selectionRect){var o=this.selectionRect.node.getBoundingClientRect();o.width>0&&o.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(r,a,l,c,u){return u==="l"||u==="r"?r.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):r.circle(0)},updateHandle:function(r,a){return r.center(a[0],a[1])}}).resize().on("resize",function(){var r=s.globals.zoomEnabled?s.config.chart.zoom.type:s.config.chart.selection.type;i.handleMouseUp({zoomtype:r,isResized:!0})}))}}},{key:"preselectedSelection",value:function(){var i=this.w,s=this.xyRatios;if(!i.globals.zoomEnabled){if(i.globals.selection!==void 0&&i.globals.selection!==null)this.drawSelectionRect(tt(tt({},i.globals.selection),{},{translateX:i.globals.translateX,translateY:i.globals.translateY}));else if(i.config.chart.selection.xaxis.min!==void 0&&i.config.chart.selection.xaxis.max!==void 0){var o=(i.config.chart.selection.xaxis.min-i.globals.minX)/s.xRatio,r=i.globals.gridWidth-(i.globals.maxX-i.config.chart.selection.xaxis.max)/s.xRatio-o;i.globals.isRangeBar&&(o=(i.config.chart.selection.xaxis.min-i.globals.yAxisScale[0].niceMin)/s.invertedYRatio,r=(i.config.chart.selection.xaxis.max-i.config.chart.selection.xaxis.min)/s.invertedYRatio);var a={x:o,y:0,width:r,height:i.globals.gridHeight,translateX:i.globals.translateX,translateY:i.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(a),this.makeSelectionRectDraggable(),typeof i.config.chart.events.selection=="function"&&i.config.chart.events.selection(this.ctx,{xaxis:{min:i.config.chart.selection.xaxis.min,max:i.config.chart.selection.xaxis.max},yaxis:{}})}}}},{key:"drawSelectionRect",value:function(i){var s=i.x,o=i.y,r=i.width,a=i.height,l=i.translateX,c=l===void 0?0:l,u=i.translateY,d=u===void 0?0:u,h=this.w,f=this.zoomRect,p=this.selectionRect;if(this.dragged||h.globals.selection!==null){var m={transform:"translate("+c+", "+d+")"};h.globals.zoomEnabled&&this.dragged&&(r<0&&(r=1),f.attr({x:s,y:o,width:r,height:a,fill:h.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":h.config.chart.zoom.zoomedArea.fill.opacity,stroke:h.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":h.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":h.config.chart.zoom.zoomedArea.stroke.opacity}),Ne.setAttrs(f.node,m)),h.globals.selectionEnabled&&(p.attr({x:s,y:o,width:r>0?r:0,height:a>0?a:0,fill:h.config.chart.selection.fill.color,"fill-opacity":h.config.chart.selection.fill.opacity,stroke:h.config.chart.selection.stroke.color,"stroke-width":h.config.chart.selection.stroke.width,"stroke-dasharray":h.config.chart.selection.stroke.dashArray,"stroke-opacity":h.config.chart.selection.stroke.opacity}),Ne.setAttrs(p.node,m))}}},{key:"hideSelectionRect",value:function(i){i&&i.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(i){var s=i.context,o=i.zoomtype,r=this.w,a=s,l=this.gridRect.getBoundingClientRect(),c=a.startX-1,u=a.startY,d=!1,h=!1,f=a.clientX-l.left-r.globals.barPadForNumericAxis,p=a.clientY-l.top,m=f-c,b=p-u,w={translateX:r.globals.translateX,translateY:r.globals.translateY};return Math.abs(m+c)>r.globals.gridWidth?m=r.globals.gridWidth-c:f<0&&(m=c),c>f&&(d=!0,m=Math.abs(m)),u>p&&(h=!0,b=Math.abs(b)),w=tt(tt({},w=o==="x"?{x:d?c-m:c,y:0,width:m,height:r.globals.gridHeight}:o==="y"?{x:0,y:h?u-b:u,width:r.globals.gridWidth,height:b}:{x:d?c-m:c,y:h?u-b:u,width:m,height:b}),{},{translateX:r.globals.translateX,translateY:r.globals.translateY}),a.drawSelectionRect(w),a.selectionDragging("resizing"),w}},{key:"selectionDragging",value:function(i,s){var o=this,r=this.w;if(s){s.preventDefault();var a=s.detail,l=a.handler,c=a.box,u=c.x,d=c.y;u<this.constraints.x&&(u=this.constraints.x),d<this.constraints.y&&(d=this.constraints.y),c.x2>this.constraints.x2&&(u=this.constraints.x2-c.w),c.y2>this.constraints.y2&&(d=this.constraints.y2-c.h),l.move(u,d);var h=this.xyRatios,f=this.selectionRect,p=0;i==="resizing"&&(p=30);var m=function(w){return parseFloat(f.node.getAttribute(w))},b={x:m("x"),y:m("y"),width:m("width"),height:m("height")};r.globals.selection=b,typeof r.config.chart.events.selection=="function"&&r.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var w,k,C,A,S=o.gridRect.getBoundingClientRect(),M=f.node.getBoundingClientRect();r.globals.isRangeBar?(w=r.globals.yAxisScale[0].niceMin+(M.left-S.left)*h.invertedYRatio,k=r.globals.yAxisScale[0].niceMin+(M.right-S.left)*h.invertedYRatio,C=0,A=1):(w=r.globals.xAxisScale.niceMin+(M.left-S.left)*h.xRatio,k=r.globals.xAxisScale.niceMin+(M.right-S.left)*h.xRatio,C=r.globals.yAxisScale[0].niceMin+(S.bottom-M.bottom)*h.yRatio[0],A=r.globals.yAxisScale[0].niceMax-(M.top-S.top)*h.yRatio[0]);var P={xaxis:{min:w,max:k},yaxis:{min:C,max:A}};r.config.chart.events.selection(o.ctx,P),r.config.chart.brush.enabled&&r.config.chart.events.brushScrolled!==void 0&&r.config.chart.events.brushScrolled(o.ctx,P)},p))}}},{key:"selectionDrawn",value:function(i){var s=i.context,o=i.zoomtype,r=this.w,a=s,l=this.xyRatios,c=this.ctx.toolbar;if(a.startX>a.endX){var u=a.startX;a.startX=a.endX,a.endX=u}if(a.startY>a.endY){var d=a.startY;a.startY=a.endY,a.endY=d}var h=void 0,f=void 0;r.globals.isRangeBar?(h=r.globals.yAxisScale[0].niceMin+a.startX*l.invertedYRatio,f=r.globals.yAxisScale[0].niceMin+a.endX*l.invertedYRatio):(h=r.globals.xAxisScale.niceMin+a.startX*l.xRatio,f=r.globals.xAxisScale.niceMin+a.endX*l.xRatio);var p=[],m=[];if(r.config.yaxis.forEach(function(M,P){var T=r.globals.seriesYAxisMap[P][0];p.push(r.globals.yAxisScale[P].niceMax-l.yRatio[T]*a.startY),m.push(r.globals.yAxisScale[P].niceMax-l.yRatio[T]*a.endY)}),a.dragged&&(a.dragX>10||a.dragY>10)&&h!==f){if(r.globals.zoomEnabled){var b=he.clone(r.globals.initialConfig.yaxis),w=he.clone(r.globals.initialConfig.xaxis);if(r.globals.zoomed=!0,r.config.xaxis.convertedCatToNumeric&&(h=Math.floor(h),f=Math.floor(f),h<1&&(h=1,f=r.globals.dataPoints),f-h<2&&(f=h+1)),o!=="xy"&&o!=="x"||(w={min:h,max:f}),o!=="xy"&&o!=="y"||b.forEach(function(M,P){b[P].min=m[P],b[P].max=p[P]}),c){var k=c.getBeforeZoomRange(w,b);k&&(w=k.xaxis?k.xaxis:w,b=k.yaxis?k.yaxis:b)}var C={xaxis:w};r.config.chart.group||(C.yaxis=b),a.ctx.updateHelpers._updateOptions(C,!1,a.w.config.chart.animations.dynamicAnimation.enabled),typeof r.config.chart.events.zoomed=="function"&&c.zoomCallback(w,b)}else if(r.globals.selectionEnabled){var A,S=null;A={min:h,max:f},o!=="xy"&&o!=="y"||(S=he.clone(r.config.yaxis)).forEach(function(M,P){S[P].min=m[P],S[P].max=p[P]}),r.globals.selection=a.selection,typeof r.config.chart.events.selection=="function"&&r.config.chart.events.selection(a.ctx,{xaxis:A,yaxis:S})}}}},{key:"panDragging",value:function(i){var s=i.context,o=this.w,r=s;if(o.globals.lastClientPosition.x!==void 0){var a=o.globals.lastClientPosition.x-r.clientX,l=o.globals.lastClientPosition.y-r.clientY;Math.abs(a)>Math.abs(l)&&a>0?this.moveDirection="left":Math.abs(a)>Math.abs(l)&&a<0?this.moveDirection="right":Math.abs(l)>Math.abs(a)&&l>0?this.moveDirection="up":Math.abs(l)>Math.abs(a)&&l<0&&(this.moveDirection="down")}o.globals.lastClientPosition={x:r.clientX,y:r.clientY};var c=o.globals.isRangeBar?o.globals.minY:o.globals.minX,u=o.globals.isRangeBar?o.globals.maxY:o.globals.maxX;o.config.xaxis.convertedCatToNumeric||r.panScrolled(c,u)}},{key:"delayedPanScrolled",value:function(){var i=this.w,s=i.globals.minX,o=i.globals.maxX,r=(i.globals.maxX-i.globals.minX)/2;this.moveDirection==="left"?(s=i.globals.minX+r,o=i.globals.maxX+r):this.moveDirection==="right"&&(s=i.globals.minX-r,o=i.globals.maxX-r),s=Math.floor(s),o=Math.floor(o),this.updateScrolledChart({xaxis:{min:s,max:o}},s,o)}},{key:"panScrolled",value:function(i,s){var o=this.w,r=this.xyRatios,a=he.clone(o.globals.initialConfig.yaxis),l=r.xRatio,c=o.globals.minX,u=o.globals.maxX;o.globals.isRangeBar&&(l=r.invertedYRatio,c=o.globals.minY,u=o.globals.maxY),this.moveDirection==="left"?(i=c+o.globals.gridWidth/15*l,s=u+o.globals.gridWidth/15*l):this.moveDirection==="right"&&(i=c-o.globals.gridWidth/15*l,s=u-o.globals.gridWidth/15*l),o.globals.isRangeBar||(i<o.globals.initialMinX||s>o.globals.initialMaxX)&&(i=c,s=u);var d={xaxis:{min:i,max:s}};o.config.chart.group||(d.yaxis=a),this.updateScrolledChart(d,i,s)}},{key:"updateScrolledChart",value:function(i,s,o){var r=this.w;this.ctx.updateHelpers._updateOptions(i,!1,!1),typeof r.config.chart.events.scrolled=="function"&&r.config.chart.events.scrolled(this.ctx,{xaxis:{min:s,max:o}})}}]),n}(),Ej=function(){function t(e){lt(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return ct(t,[{key:"getNearestValues",value:function(e){var n=e.hoverArea,i=e.elGrid,s=e.clientX,o=e.clientY,r=this.w,a=i.getBoundingClientRect(),l=a.width,c=a.height,u=l/(r.globals.dataPoints-1),d=c/r.globals.dataPoints,h=this.hasBars();!r.globals.comboCharts&&!h||r.config.xaxis.convertedCatToNumeric||(u=l/r.globals.dataPoints);var f=s-a.left-r.globals.barPadForNumericAxis,p=o-a.top;f<0||p<0||f>l||p>c?(n.classList.remove("hovering-zoom"),n.classList.remove("hovering-pan")):r.globals.zoomEnabled?(n.classList.remove("hovering-pan"),n.classList.add("hovering-zoom")):r.globals.panEnabled&&(n.classList.remove("hovering-zoom"),n.classList.add("hovering-pan"));var m=Math.round(f/u),b=Math.floor(p/d);h&&!r.config.xaxis.convertedCatToNumeric&&(m=Math.ceil(f/u),m-=1);var w=null,k=null,C=r.globals.seriesXvalues.map(function(T){return T.filter(function(I){return he.isNumber(I)})}),A=r.globals.seriesYvalues.map(function(T){return T.filter(function(I){return he.isNumber(I)})});if(r.globals.isXNumeric){var S=this.ttCtx.getElGrid().getBoundingClientRect(),M=f*(S.width/l),P=p*(S.height/c);w=(k=this.closestInMultiArray(M,P,C,A)).index,m=k.j,w!==null&&r.globals.hasNullValues&&(C=r.globals.seriesXvalues[w],m=(k=this.closestInArray(M,C)).j)}return r.globals.capturedSeriesIndex=w===null?-1:w,(!m||m<1)&&(m=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=b:r.globals.capturedDataPointIndex=m,{capturedSeries:w,j:r.globals.isBarHorizontal?b:m,hoverX:f,hoverY:p}}},{key:"getFirstActiveXArray",value:function(e){for(var n=this.w,i=0,s=e.map(function(r,a){return r.length>0?a:-1}),o=0;o<s.length;o++)if(s[o]!==-1&&n.globals.collapsedSeriesIndices.indexOf(o)===-1&&n.globals.ancillaryCollapsedSeriesIndices.indexOf(o)===-1){i=s[o];break}return i}},{key:"closestInMultiArray",value:function(e,n,i,s){for(var o,r=this.w,a=1/0,l=null,c=null,u=0;u<i.length;u++)if(o=u,r.globals.collapsedSeriesIndices.indexOf(o)===-1&&r.globals.ancillaryCollapsedSeriesIndices.indexOf(o)===-1)for(var d=i[u],h=s[u],f=Math.min(d.length,h.length),p=0;p<f;p++){var m=e-d[p],b=n-h[p],w=Math.sqrt(m*m+b*b);w<a&&(a=w,l=u,c=p)}return{index:l,j:c}}},{key:"closestInArray",value:function(e,n){for(var i=n[0],s=null,o=Math.abs(e-i),r=0;r<n.length;r++){var a=Math.abs(e-n[r]);a<o&&(o=a,s=r)}return{j:s}}},{key:"isXoverlap",value:function(e){var n=[],i=this.w.globals.seriesX.filter(function(o){return o[0]!==void 0});if(i.length>0)for(var s=0;s<i.length-1;s++)i[s][e]!==void 0&&i[s+1][e]!==void 0&&i[s][e]!==i[s+1][e]&&n.push("unEqual");return n.length===0}},{key:"isInitialSeriesSameLen",value:function(){for(var e=!0,n=this.w.globals.initialSeries,i=0;i<n.length-1;i++)if(n[i].data.length!==n[i+1].data.length){e=!1;break}return e}},{key:"getBarsHeight",value:function(e){return Ns(e).reduce(function(n,i){return n+i.getBBox().height},0)}},{key:"getElMarkers",value:function(e){return typeof e=="number"?this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-series-markers-wrap > *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0&&arguments[0],i=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");i=Ns(i),n&&(i=i.filter(function(o){var r=Number(o.getAttribute("data:realIndex"));return e.w.globals.collapsedSeriesIndices.indexOf(r)===-1})),i.sort(function(o,r){var a=Number(o.getAttribute("data:realIndex")),l=Number(r.getAttribute("data:realIndex"));return l<a?1:l>a?-1:0});var s=[];return i.forEach(function(o){s.push(o.querySelector(".apexcharts-marker"))}),s}},{key:"hasMarkers",value:function(e){return this.getElMarkers(e).length>0}},{key:"getPathFromPoint",value:function(e,n){var i=Number(e.getAttribute("cx")),s=Number(e.getAttribute("cy")),o=e.getAttribute("shape");return new Ne(this.ctx).getMarkerPath(i,s,o,n)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(e){var n=this.w,i=n.config.markers.hover.size;return i===void 0&&(i=n.globals.markers.size[e]+n.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var n=this.w,i=this.ttCtx;i.allTooltipSeriesGroups.length===0&&(i.allTooltipSeriesGroups=n.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var s=i.allTooltipSeriesGroups,o=0;o<s.length;o++)e==="enable"?(s[o].classList.add("apexcharts-active"),s[o].style.display=n.config.tooltip.items.display):(s[o].classList.remove("apexcharts-active"),s[o].style.display="none")}}]),t}(),Xbt=function(){function t(e){lt(this,t),this.w=e.w,this.ctx=e.ctx,this.ttCtx=e,this.tooltipUtil=new Ej(e)}return ct(t,[{key:"drawSeriesTexts",value:function(e){var n=e.shared,i=n===void 0||n,s=e.ttItems,o=e.i,r=o===void 0?0:o,a=e.j,l=a===void 0?null:a,c=e.y1,u=e.y2,d=e.e,h=this.w;h.config.tooltip.custom!==void 0?this.handleCustomTooltip({i:r,j:l,y1:c,y2:u,w:h}):this.toggleActiveInactiveSeries(i,r);var f=this.getValuesToPrint({i:r,j:l});this.printLabels({i:r,j:l,values:f,ttItems:s,shared:i,e:d});var p=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=p.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=p.getBoundingClientRect().height}},{key:"printLabels",value:function(e){var n,i=this,s=e.i,o=e.j,r=e.values,a=e.ttItems,l=e.shared,c=e.e,u=this.w,d=[],h=function(S){return u.globals.seriesGoals[S]&&u.globals.seriesGoals[S][o]&&Array.isArray(u.globals.seriesGoals[S][o])},f=r.xVal,p=r.zVal,m=r.xAxisTTVal,b="",w=u.globals.colors[s];o!==null&&u.config.plotOptions.bar.distributed&&(w=u.globals.colors[o]);for(var k=function(S,M){var P=i.getFormatters(s);b=i.getSeriesName({fn:P.yLbTitleFormatter,index:s,seriesIndex:s,j:o}),u.config.chart.type==="treemap"&&(b=P.yLbTitleFormatter(String(u.config.series[s].data[o].x),{series:u.globals.series,seriesIndex:s,dataPointIndex:o,w:u}));var T=u.config.tooltip.inverseOrder?M:S;if(u.globals.axisCharts){var I=function(V){var H,F,U,Y;return u.globals.isRangeData?P.yLbFormatter((H=u.globals.seriesRangeStart)===null||H===void 0||(F=H[V])===null||F===void 0?void 0:F[o],{series:u.globals.seriesRangeStart,seriesIndex:V,dataPointIndex:o,w:u})+" - "+P.yLbFormatter((U=u.globals.seriesRangeEnd)===null||U===void 0||(Y=U[V])===null||Y===void 0?void 0:Y[o],{series:u.globals.seriesRangeEnd,seriesIndex:V,dataPointIndex:o,w:u}):P.yLbFormatter(u.globals.series[V][o],{series:u.globals.series,seriesIndex:V,dataPointIndex:o,w:u})};if(l)P=i.getFormatters(T),b=i.getSeriesName({fn:P.yLbTitleFormatter,index:T,seriesIndex:s,j:o}),w=u.globals.colors[T],n=I(T),h(T)&&(d=u.globals.seriesGoals[T][o].map(function(V){return{attrs:V,val:P.yLbFormatter(V.value,{seriesIndex:T,dataPointIndex:o,w:u})}}));else{var L,R=c==null||(L=c.target)===null||L===void 0?void 0:L.getAttribute("fill");R&&(R.indexOf("url")!==-1?R.indexOf("Pattern")!==-1&&(w=u.globals.dom.baseEl.querySelector(R.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke")):w=R),n=I(s),h(s)&&Array.isArray(u.globals.seriesGoals[s][o])&&(d=u.globals.seriesGoals[s][o].map(function(V){return{attrs:V,val:P.yLbFormatter(V.value,{seriesIndex:s,dataPointIndex:o,w:u})}}))}}o===null&&(n=P.yLbFormatter(u.globals.series[s],tt(tt({},u),{},{seriesIndex:s,dataPointIndex:s}))),i.DOMHandling({i:s,t:T,j:o,ttItems:a,values:{val:n,goalVals:d,xVal:f,xAxisTTVal:m,zVal:p},seriesName:b,shared:l,pColor:w})},C=0,A=u.globals.series.length-1;C<u.globals.series.length;C++,A--)k(C,A)}},{key:"getFormatters",value:function(e){var n,i=this.w,s=i.globals.yLabelFormatters[e];return i.globals.ttVal!==void 0?Array.isArray(i.globals.ttVal)?(s=i.globals.ttVal[e]&&i.globals.ttVal[e].formatter,n=i.globals.ttVal[e]&&i.globals.ttVal[e].title&&i.globals.ttVal[e].title.formatter):(s=i.globals.ttVal.formatter,typeof i.globals.ttVal.title.formatter=="function"&&(n=i.globals.ttVal.title.formatter)):n=i.config.tooltip.y.title.formatter,typeof s!="function"&&(s=i.globals.yLabelFormatters[0]?i.globals.yLabelFormatters[0]:function(o){return o}),typeof n!="function"&&(n=function(o){return o?o+": ":""}),{yLbFormatter:s,yLbTitleFormatter:n}}},{key:"getSeriesName",value:function(e){var n=e.fn,i=e.index,s=e.seriesIndex,o=e.j,r=this.w;return n(String(r.globals.seriesNames[i]),{series:r.globals.series,seriesIndex:s,dataPointIndex:o,w:r})}},{key:"DOMHandling",value:function(e){e.i;var n=e.t,i=e.j,s=e.ttItems,o=e.values,r=e.seriesName,a=e.shared,l=e.pColor,c=this.w,u=this.ttCtx,d=o.val,h=o.goalVals,f=o.xVal,p=o.xAxisTTVal,m=o.zVal,b=null;b=s[n].children,c.config.tooltip.fillSeriesColor&&(s[n].style.backgroundColor=l,b[0].style.display="none"),u.showTooltipTitle&&(u.tooltipTitle===null&&(u.tooltipTitle=c.globals.dom.baseEl.querySelector(".apexcharts-tooltip-title")),u.tooltipTitle.innerHTML=f),u.isXAxisTooltipEnabled&&(u.xaxisTooltipText.innerHTML=p!==""?p:f);var w=s[n].querySelector(".apexcharts-tooltip-text-y-label");w&&(w.innerHTML=r||"");var k=s[n].querySelector(".apexcharts-tooltip-text-y-value");k&&(k.innerHTML=d!==void 0?d:""),b[0]&&b[0].classList.contains("apexcharts-tooltip-marker")&&(c.config.tooltip.marker.fillColors&&Array.isArray(c.config.tooltip.marker.fillColors)&&(l=c.config.tooltip.marker.fillColors[n]),b[0].style.backgroundColor=l),c.config.tooltip.marker.show||(b[0].style.display="none");var C=s[n].querySelector(".apexcharts-tooltip-text-goals-label"),A=s[n].querySelector(".apexcharts-tooltip-text-goals-value");if(h.length&&c.globals.seriesGoals[n]){var S=function(){var T="<div >",I="<div>";h.forEach(function(L,R){T+=' <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: '.concat(L.attrs.strokeColor,'; height: 3px; border-radius: 0; top: 5px;"></span> ').concat(L.attrs.name,"</div>"),I+="<div>".concat(L.val,"</div>")}),C.innerHTML=T+"</div>",A.innerHTML=I+"</div>"};a?c.globals.seriesGoals[n][i]&&Array.isArray(c.globals.seriesGoals[n][i])?S():(C.innerHTML="",A.innerHTML=""):S()}else C.innerHTML="",A.innerHTML="";if(m!==null&&(s[n].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=c.config.tooltip.z.title,s[n].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=m!==void 0?m:""),a&&b[0]){if(c.config.tooltip.hideEmptySeries){var M=s[n].querySelector(".apexcharts-tooltip-marker"),P=s[n].querySelector(".apexcharts-tooltip-text");parseFloat(d)==0?(M.style.display="none",P.style.display="none"):(M.style.display="block",P.style.display="block")}d==null||c.globals.ancillaryCollapsedSeriesIndices.indexOf(n)>-1||c.globals.collapsedSeriesIndices.indexOf(n)>-1||Array.isArray(u.tConfig.enabledOnSeries)&&u.tConfig.enabledOnSeries.indexOf(n)===-1?b[0].parentNode.style.display="none":b[0].parentNode.style.display=c.config.tooltip.items.display}else Array.isArray(u.tConfig.enabledOnSeries)&&u.tConfig.enabledOnSeries.indexOf(n)===-1&&(b[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(e,n){var i=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var s=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(n));s&&(s.classList.add("apexcharts-active"),s.style.display=i.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var n=e.i,i=e.j,s=this.w,o=this.ctx.series.filteredSeriesX(),r="",a="",l=null,c=null,u={series:s.globals.series,seriesIndex:n,dataPointIndex:i,w:s},d=s.globals.ttZFormatter;i===null?c=s.globals.series[n]:s.globals.isXNumeric&&s.config.chart.type!=="treemap"?(r=o[n][i],o[n].length===0&&(r=o[this.tooltipUtil.getFirstActiveXArray(o)][i])):r=new JS(this.ctx).isFormatXY()?s.config.series[n].data[i]!==void 0?s.config.series[n].data[i].x:"":s.globals.labels[i]!==void 0?s.globals.labels[i]:"";var h=r;return s.globals.isXNumeric&&s.config.xaxis.type==="datetime"?r=new $v(this.ctx).xLabelFormat(s.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new ri(this.ctx).formatDate,w:this.w}):r=s.globals.isBarHorizontal?s.globals.yLabelFormatters[0](h,u):s.globals.xLabelFormatter(h,u),s.config.tooltip.x.formatter!==void 0&&(r=s.globals.ttKeyFormatter(h,u)),s.globals.seriesZ.length>0&&s.globals.seriesZ[n].length>0&&(l=d(s.globals.seriesZ[n][i],s)),a=typeof s.config.xaxis.tooltip.formatter=="function"?s.globals.xaxisTooltipFormatter(h,u):r,{val:Array.isArray(c)?c.join(" "):c,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(a)?a.join(" "):a,zVal:l}}},{key:"handleCustomTooltip",value:function(e){var n=e.i,i=e.j,s=e.y1,o=e.y2,r=e.w,a=this.ttCtx.getElTooltip(),l=r.config.tooltip.custom;Array.isArray(l)&&l[n]&&(l=l[n]);var c=l({ctx:this.ctx,series:r.globals.series,seriesIndex:n,dataPointIndex:i,y1:s,y2:o,w:r});typeof c=="string"?a.innerHTML=c:(c instanceof Element||typeof c.nodeName=="string")&&(a.innerHTML="",a.appendChild(c))}}]),t}(),Mj=function(){function t(e){lt(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return ct(t,[{key:"moveXCrosshairs",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,i=this.ttCtx,s=this.w,o=i.getElXCrosshairs(),r=e-i.xcrosshairsWidth/2,a=s.globals.labels.slice().length;if(n!==null&&(r=s.globals.gridWidth/a*n),o===null||s.globals.isBarHorizontal||(o.setAttribute("x",r),o.setAttribute("x1",r),o.setAttribute("x2",r),o.setAttribute("y2",s.globals.gridHeight),o.classList.add("apexcharts-active")),r<0&&(r=0),r>s.globals.gridWidth&&(r=s.globals.gridWidth),i.isXAxisTooltipEnabled){var l=r;s.config.xaxis.crosshairs.width!=="tickWidth"&&s.config.xaxis.crosshairs.width!=="barWidth"||(l=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(l)}}},{key:"moveYCrosshairs",value:function(e){var n=this.ttCtx;n.ycrosshairs!==null&&Ne.setAttrs(n.ycrosshairs,{y1:e,y2:e}),n.ycrosshairsHidden!==null&&Ne.setAttrs(n.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var n=this.w,i=this.ttCtx;if(i.xaxisTooltip!==null&&i.xcrosshairsWidth!==0){i.xaxisTooltip.classList.add("apexcharts-active");var s=i.xaxisOffY+n.config.xaxis.tooltip.offsetY+n.globals.translateY+1+n.config.xaxis.offsetY;if(e-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(e)){e+=n.globals.translateX;var o;o=new Ne(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=o.width+"px",i.xaxisTooltip.style.left=e+"px",i.xaxisTooltip.style.top=s+"px"}}}},{key:"moveYAxisTooltip",value:function(e){var n=this.w,i=this.ttCtx;i.yaxisTTEls===null&&(i.yaxisTTEls=n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var s=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),o=n.globals.translateY+s,r=i.yaxisTTEls[e].getBoundingClientRect().height,a=n.globals.translateYAxisX[e]-2;n.config.yaxis[e].opposite&&(a-=26),o-=r/2,n.globals.ignoreYAxisIndexes.indexOf(e)===-1?(i.yaxisTTEls[e].classList.add("apexcharts-active"),i.yaxisTTEls[e].style.top=o+"px",i.yaxisTTEls[e].style.left=a+n.config.yaxis[e].tooltip.offsetX+"px"):i.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,s=this.w,o=this.ttCtx,r=o.getElTooltip(),a=o.tooltipRect,l=i!==null?parseFloat(i):1,c=parseFloat(e)+l+5,u=parseFloat(n)+l/2;if(c>s.globals.gridWidth/2&&(c=c-a.ttWidth-l-10),c>s.globals.gridWidth-a.ttWidth-10&&(c=s.globals.gridWidth-a.ttWidth),c<-20&&(c=-20),s.config.tooltip.followCursor){var d=o.getElGrid().getBoundingClientRect();(c=o.e.clientX-d.left)>s.globals.gridWidth/2&&(c-=o.tooltipRect.ttWidth),(u=o.e.clientY+s.globals.translateY-d.top)>s.globals.gridHeight/2&&(u-=o.tooltipRect.ttHeight)}else s.globals.isBarHorizontal||a.ttHeight/2+u>s.globals.gridHeight&&(u=s.globals.gridHeight-a.ttHeight+s.globals.translateY);isNaN(c)||(c+=s.globals.translateX,r.style.left=c+"px",r.style.top=u+"px")}},{key:"moveMarkers",value:function(e,n){var i=this.w,s=this.ttCtx;if(i.globals.markers.size[e]>0)for(var o=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),r=0;r<o.length;r++)parseInt(o[r].getAttribute("rel"),10)===n&&(s.marker.resetPointsSize(),s.marker.enlargeCurrentPoint(n,o[r]));else s.marker.resetPointsSize(),this.moveDynamicPointOnHover(n,e)}},{key:"moveDynamicPointOnHover",value:function(e,n){var i,s,o,r,a=this.w,l=this.ttCtx,c=new Ne(this.ctx),u=a.globals.pointsArray,d=l.tooltipUtil.getHoverMarkerSize(n),h=a.config.series[n].type;if(!h||h!=="column"&&h!=="candlestick"&&h!=="boxPlot"){o=(i=u[n][e])===null||i===void 0?void 0:i[0],r=((s=u[n][e])===null||s===void 0?void 0:s[1])||0;var f=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(n,"'] .apexcharts-series-markers path"));if(f&&r<a.globals.gridHeight&&r>0){var p=f.getAttribute("shape"),m=c.getMarkerPath(o,r,p,1.5*d);f.setAttribute("d",m)}this.moveXCrosshairs(o),l.fixedTooltip||this.moveTooltip(o,r,d)}}},{key:"moveDynamicPointsOnHover",value:function(e){var n,i=this.ttCtx,s=i.w,o=0,r=0,a=s.globals.pointsArray,l=new gr(this.ctx),c=new Ne(this.ctx);n=l.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var u=i.tooltipUtil.getHoverMarkerSize(n);if(a[n]&&(o=a[n][e][0],r=a[n][e][1]),!isNaN(o)){var d=i.tooltipUtil.getAllMarkers();if(d.length)for(var h=0;h<s.globals.series.length;h++){var f=a[h];if(s.globals.comboCharts&&f===void 0&&d.splice(h,0,null),f&&f.length){var p=a[h][e][1],m=void 0;d[h].setAttribute("cx",o);var b=d[h].getAttribute("shape");if(s.config.chart.type==="rangeArea"&&!s.globals.comboCharts){var w=e+s.globals.series[h].length;m=a[h][w][1],p-=Math.abs(p-m)/2}if(p!==null&&!isNaN(p)&&p<s.globals.gridHeight+u&&p+u>0){var k=c.getMarkerPath(o,p,b,u);d[h].setAttribute("d",k)}else d[h].setAttribute("d","")}}this.moveXCrosshairs(o),i.fixedTooltip||this.moveTooltip(o,r||s.globals.gridHeight,u)}}},{key:"moveStickyTooltipOverBars",value:function(e,n){var i=this.w,s=this.ttCtx,o=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=o>=2&&o%2==0?Math.floor(o/2):Math.floor(o/2)+1;i.globals.isBarHorizontal&&(r=new gr(this.ctx).getActiveConfigSeriesIndex("desc")+1);var a=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"']"));a||typeof n!="number"||(a=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(n,"'] path[j='").concat(e,`'],
277 + .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(e,`'],
278 + .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(e,`'],
279 + .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(e,"']")));var l=a?parseFloat(a.getAttribute("cx")):0,c=a?parseFloat(a.getAttribute("cy")):0,u=a?parseFloat(a.getAttribute("barWidth")):0,d=s.getElGrid().getBoundingClientRect(),h=a&&(a.classList.contains("apexcharts-candlestick-area")||a.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(a&&!h&&(l-=o%2!=0?u/2:0),a&&h&&(l-=u/2)):i.globals.isBarHorizontal||(l=s.xAxisTicksPositions[e-1]+s.dataPointsDividedWidth/2,isNaN(l)&&(l=s.xAxisTicksPositions[e]-s.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?c-=s.tooltipRect.ttHeight:i.config.tooltip.followCursor?c=s.e.clientY-d.top-s.tooltipRect.ttHeight/2:c+s.tooltipRect.ttHeight+15>i.globals.gridHeight&&(c=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(l),s.fixedTooltip||this.moveTooltip(l,c||i.globals.gridHeight)}}]),t}(),Kbt=function(){function t(e){lt(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new Mj(e)}return ct(t,[{key:"drawDynamicPoints",value:function(){var e=this.w,n=new Ne(this.ctx),i=new Np(this.ctx),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");s=Ns(s),e.config.chart.stacked&&s.sort(function(d,h){return parseFloat(d.getAttribute("data:realIndex"))-parseFloat(h.getAttribute("data:realIndex"))});for(var o=0;o<s.length;o++){var r=s[o].querySelector(".apexcharts-series-markers-wrap");if(r!==null){var a=void 0,l="apexcharts-marker w".concat((Math.random()+1).toString(36).substring(4));e.config.chart.type!=="line"&&e.config.chart.type!=="area"||e.globals.comboCharts||e.config.tooltip.intersect||(l+=" no-pointer-events");var c=i.getMarkerConfig({cssClass:l,seriesIndex:Number(r.getAttribute("data:realIndex"))});(a=n.drawMarker(0,0,c)).node.setAttribute("default-marker-size",0);var u=document.createElementNS(e.globals.SVGNS,"g");u.classList.add("apexcharts-series-markers"),u.appendChild(a.node),r.appendChild(u)}}}},{key:"enlargeCurrentPoint",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,o=this.w;o.config.chart.type!=="bubble"&&this.newPointSize(e,n);var r=n.getAttribute("cx"),a=n.getAttribute("cy");if(i!==null&&s!==null&&(r=i,a=s),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if(o.config.chart.type==="radar"){var l=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-l.left}this.tooltipPosition.moveTooltip(r,a,o.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var n=this.w,i=this,s=this.ttCtx,o=e,r=n.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),a=n.config.markers.hover.size,l=0;l<r.length;l++){var c=r[l].getAttribute("rel"),u=r[l].getAttribute("index");if(a===void 0&&(a=n.globals.markers.size[u]+n.config.markers.hover.sizeOffset),o===parseInt(c,10)){i.newPointSize(o,r[l]);var d=r[l].getAttribute("cx"),h=r[l].getAttribute("cy");i.tooltipPosition.moveXCrosshairs(d),s.fixedTooltip||i.tooltipPosition.moveTooltip(d,h,a)}else i.oldPointSize(r[l])}}},{key:"newPointSize",value:function(e,n){var i=this.w,s=i.config.markers.hover.size,o=e===0?n.parentNode.firstChild:n.parentNode.lastChild;if(o.getAttribute("default-marker-size")!=="0"){var r=parseInt(o.getAttribute("index"),10);s===void 0&&(s=i.globals.markers.size[r]+i.config.markers.hover.sizeOffset),s<0&&(s=0);var a=this.ttCtx.tooltipUtil.getPathFromPoint(n,s);n.setAttribute("d",a)}}},{key:"oldPointSize",value:function(e){var n=parseFloat(e.getAttribute("default-marker-size")),i=this.ttCtx.tooltipUtil.getPathFromPoint(e,n);e.setAttribute("d",i)}},{key:"resetPointsSize",value:function(){for(var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=0;n<e.length;n++){var i=parseFloat(e[n].getAttribute("default-marker-size"));if(he.isNumber(i)&&i>0){var s=this.ttCtx.tooltipUtil.getPathFromPoint(e[n],i);e[n].setAttribute("d",s)}else e[n].setAttribute("d","M0,0")}}}]),t}(),Zbt=function(){function t(e){lt(this,t),this.w=e.w;var n=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!n.globals.isBarHorizontal&&n.config.chart.type==="rangeBar"&&n.config.plotOptions.bar.rangeBarGroupRows}return ct(t,[{key:"getAttr",value:function(e,n){return parseFloat(e.target.getAttribute(n))}},{key:"handleHeatTreeTooltip",value:function(e){var n=e.e,i=e.opt,s=e.x,o=e.y,r=e.type,a=this.ttCtx,l=this.w;if(n.target.classList.contains("apexcharts-".concat(r,"-rect"))){var c=this.getAttr(n,"i"),u=this.getAttr(n,"j"),d=this.getAttr(n,"cx"),h=this.getAttr(n,"cy"),f=this.getAttr(n,"width"),p=this.getAttr(n,"height");if(a.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:c,j:u,shared:!1,e:n}),l.globals.capturedSeriesIndex=c,l.globals.capturedDataPointIndex=u,s=d+a.tooltipRect.ttWidth/2+f,o=h+a.tooltipRect.ttHeight/2-p/2,a.tooltipPosition.moveXCrosshairs(d+f/2),s>l.globals.gridWidth/2&&(s=d-a.tooltipRect.ttWidth/2+f),a.w.config.tooltip.followCursor){var m=l.globals.dom.elWrap.getBoundingClientRect();s=l.globals.clientX-m.left-(s>l.globals.gridWidth/2?a.tooltipRect.ttWidth:0),o=l.globals.clientY-m.top-(o>l.globals.gridHeight/2?a.tooltipRect.ttHeight:0)}}return{x:s,y:o}}},{key:"handleMarkerTooltip",value:function(e){var n,i,s=e.e,o=e.opt,r=e.x,a=e.y,l=this.w,c=this.ttCtx;if(s.target.classList.contains("apexcharts-marker")){var u=parseInt(o.paths.getAttribute("cx"),10),d=parseInt(o.paths.getAttribute("cy"),10),h=parseFloat(o.paths.getAttribute("val"));if(i=parseInt(o.paths.getAttribute("rel"),10),n=parseInt(o.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,c.intersect){var f=he.findAncestor(o.paths,"apexcharts-series");f&&(n=parseInt(f.getAttribute("data:realIndex"),10))}if(c.tooltipLabels.drawSeriesTexts({ttItems:o.ttItems,i:n,j:i,shared:!c.showOnIntersect&&l.config.tooltip.shared,e:s}),s.type==="mouseup"&&c.markerClick(s,n,i),l.globals.capturedSeriesIndex=n,l.globals.capturedDataPointIndex=i,r=u,a=d+l.globals.translateY-1.4*c.tooltipRect.ttHeight,c.w.config.tooltip.followCursor){var p=c.getElGrid().getBoundingClientRect();a=c.e.clientY+l.globals.translateY-p.top}h<0&&(a=d),c.marker.enlargeCurrentPoint(i,o.paths,r,a)}return{x:r,y:a}}},{key:"handleBarTooltip",value:function(e){var n,i,s=e.e,o=e.opt,r=this.w,a=this.ttCtx,l=a.getElTooltip(),c=0,u=0,d=0,h=this.getBarTooltipXY({e:s,opt:o});if(h.j!==null||h.barHeight!==0||h.barWidth!==0){n=h.i;var f=h.j;if(r.globals.capturedSeriesIndex=n,r.globals.capturedDataPointIndex=f,r.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||!r.config.tooltip.shared?(u=h.x,d=h.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[n]:r.config.stroke.width,c=u):r.globals.comboCharts||r.config.tooltip.shared||(c/=2),isNaN(d)&&(d=r.globals.svgHeight-a.tooltipRect.ttHeight),parseInt(o.paths.parentNode.getAttribute("data:realIndex"),10),u+a.tooltipRect.ttWidth>r.globals.gridWidth?u-=a.tooltipRect.ttWidth:u<0&&(u=0),a.w.config.tooltip.followCursor){var p=a.getElGrid().getBoundingClientRect();d=a.e.clientY-p.top}a.tooltip===null&&(a.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?a.tooltipPosition.moveXCrosshairs(c+i/2):a.tooltipPosition.moveXCrosshairs(c)),!a.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&a.tooltipUtil.hasBars())&&(d=d+r.globals.translateY-a.tooltipRect.ttHeight/2,l.style.left=u+r.globals.translateX+"px",l.style.top=d+"px")}}},{key:"getBarTooltipXY",value:function(e){var n=this,i=e.e,s=e.opt,o=this.w,r=null,a=this.ttCtx,l=0,c=0,u=0,d=0,h=0,f=i.target.classList;if(f.contains("apexcharts-bar-area")||f.contains("apexcharts-candlestick-area")||f.contains("apexcharts-boxPlot-area")||f.contains("apexcharts-rangebar-area")){var p=i.target,m=p.getBoundingClientRect(),b=s.elGrid.getBoundingClientRect(),w=m.height;h=m.height;var k=m.width,C=parseInt(p.getAttribute("cx"),10),A=parseInt(p.getAttribute("cy"),10);d=parseFloat(p.getAttribute("barWidth"));var S=i.type==="touchmove"?i.touches[0].clientX:i.clientX;r=parseInt(p.getAttribute("j"),10),l=parseInt(p.parentNode.getAttribute("rel"),10)-1;var M=p.getAttribute("data-range-y1"),P=p.getAttribute("data-range-y2");o.globals.comboCharts&&(l=parseInt(p.parentNode.getAttribute("data:realIndex"),10));var T=function(L){return o.globals.isXNumeric?C-k/2:n.isVerticalGroupedRangeBar?C+k/2:C-a.dataPointsDividedWidth+k/2},I=function(){return A-a.dataPointsDividedHeight+w/2-a.tooltipRect.ttHeight/2};a.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:l,j:r,y1:M?parseInt(M,10):null,y2:P?parseInt(P,10):null,shared:!a.showOnIntersect&&o.config.tooltip.shared,e:i}),o.config.tooltip.followCursor?o.globals.isBarHorizontal?(c=S-b.left+15,u=I()):(c=T(),u=i.clientY-b.top-a.tooltipRect.ttHeight/2-15):o.globals.isBarHorizontal?((c=C)<a.xyRatios.baseLineInvertedY&&(c=C-a.tooltipRect.ttWidth),u=I()):(c=T(),u=A)}return{x:c,y:u,barHeight:h,barWidth:d,i:l,j:r}}}]),t}(),Jbt=function(){function t(e){lt(this,t),this.w=e.w,this.ttCtx=e}return ct(t,[{key:"drawXaxisTooltip",value:function(){var e=this.w,n=this.ttCtx,i=e.config.xaxis.position==="bottom";n.xaxisOffY=i?e.globals.gridHeight+1:-e.globals.xAxisHeight-e.config.xaxis.axisTicks.height+3;var s=i?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",o=e.globals.dom.elWrap;n.isXAxisTooltipEnabled&&e.globals.dom.baseEl.querySelector(".apexcharts-xaxistooltip")===null&&(n.xaxisTooltip=document.createElement("div"),n.xaxisTooltip.setAttribute("class",s+" apexcharts-theme-"+e.config.tooltip.theme),o.appendChild(n.xaxisTooltip),n.xaxisTooltipText=document.createElement("div"),n.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),n.xaxisTooltipText.style.fontFamily=e.config.xaxis.tooltip.style.fontFamily||e.config.chart.fontFamily,n.xaxisTooltipText.style.fontSize=e.config.xaxis.tooltip.style.fontSize,n.xaxisTooltip.appendChild(n.xaxisTooltipText))}},{key:"drawYaxisTooltip",value:function(){for(var e=this.w,n=this.ttCtx,i=0;i<e.config.yaxis.length;i++){var s=e.config.yaxis[i].opposite||e.config.yaxis[i].crosshairs.opposite;n.yaxisOffX=s?e.globals.gridWidth+1:1;var o="apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i,s?" apexcharts-yaxistooltip-right":" apexcharts-yaxistooltip-left"),r=e.globals.dom.elWrap;e.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i))===null&&(n.yaxisTooltip=document.createElement("div"),n.yaxisTooltip.setAttribute("class",o+" apexcharts-theme-"+e.config.tooltip.theme),r.appendChild(n.yaxisTooltip),i===0&&(n.yaxisTooltipText=[]),n.yaxisTooltipText[i]=document.createElement("div"),n.yaxisTooltipText[i].classList.add("apexcharts-yaxistooltip-text"),n.yaxisTooltip.appendChild(n.yaxisTooltipText[i]))}}},{key:"setXCrosshairWidth",value:function(){var e=this.w,n=this.ttCtx,i=n.getElXCrosshairs();if(n.xcrosshairsWidth=parseInt(e.config.xaxis.crosshairs.width,10),e.globals.comboCharts){var s=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(s!==null&&e.config.xaxis.crosshairs.width==="barWidth"){var o=parseFloat(s.getAttribute("barWidth"));n.xcrosshairsWidth=o}else if(e.config.xaxis.crosshairs.width==="tickWidth"){var r=e.globals.labels.length;n.xcrosshairsWidth=e.globals.gridWidth/r}}else if(e.config.xaxis.crosshairs.width==="tickWidth"){var a=e.globals.labels.length;n.xcrosshairsWidth=e.globals.gridWidth/a}else if(e.config.xaxis.crosshairs.width==="barWidth"){var l=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(l!==null){var c=parseFloat(l.getAttribute("barWidth"));n.xcrosshairsWidth=c}else n.xcrosshairsWidth=1}e.globals.isBarHorizontal&&(n.xcrosshairsWidth=0),i!==null&&n.xcrosshairsWidth>0&&i.setAttribute("width",n.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var e=this.w,n=this.ttCtx;n.ycrosshairs=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),n.ycrosshairsHidden=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(e,n,i){var s=this.ttCtx,o=this.w,r=o.globals,a=r.seriesYAxisMap[e];if(s.yaxisTooltips[e]&&a.length>0){var l=r.yLabelFormatters[e],c=s.getElGrid().getBoundingClientRect(),u=a[0],d=0;i.yRatio.length>1&&(d=u);var h=(n-c.top)*i.yRatio[d],f=r.maxYArr[u]-r.minYArr[u],p=r.minYArr[u]+(f-h);o.config.yaxis[e].reversed&&(p=r.maxYArr[u]-(f-h)),s.tooltipPosition.moveYCrosshairs(n-c.top),s.yaxisTooltipText[e].innerHTML=l(p),s.tooltipPosition.moveYAxisTooltip(e)}}}]),t}(),JT=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.tConfig=n.config.tooltip,this.tooltipUtil=new Ej(this),this.tooltipLabels=new Xbt(this),this.tooltipPosition=new Mj(this),this.marker=new Kbt(this),this.intersect=new Zbt(this),this.axesTooltip=new Jbt(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!n.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return ct(t,[{key:"getElTooltip",value:function(e){return e||(e=this),e.w.globals.dom.baseEl?e.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(e){var n=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=n.config.xaxis.tooltip.enabled&&n.globals.axisCharts,this.yaxisTooltips=n.config.yaxis.map(function(r,a){return!!(r.show&&r.tooltip.enabled&&n.globals.axisCharts)}),this.allTooltipSeriesGroups=[],n.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),n.config.tooltip.cssClass&&i.classList.add(n.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),n.globals.dom.elWrap.appendChild(i),n.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var s=new $1(this.ctx);this.xAxisTicksPositions=s.getXAxisTicksPositions()}if(!n.globals.comboCharts&&!this.tConfig.intersect&&n.config.chart.type!=="rangeBar"||this.tConfig.shared||(this.showOnIntersect=!0),n.config.markers.size!==0&&n.globals.markers.largestSize!==0||this.marker.drawDynamicPoints(this),n.globals.collapsedSeries.length!==n.globals.series.length){this.dataPointsDividedHeight=n.globals.gridHeight/n.globals.dataPoints,this.dataPointsDividedWidth=n.globals.gridWidth/n.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||n.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var o=n.globals.series.length;(n.globals.xyCharts||n.globals.comboCharts)&&this.tConfig.shared&&(o=this.showOnIntersect?1:n.globals.series.length),this.legendLabels=n.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(o),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var n=this,i=this.w,s=[],o=this.getElTooltip(),r=function(l){var c=document.createElement("div");c.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(l)),c.style.order=i.config.tooltip.inverseOrder?e-l:l+1;var u=document.createElement("span");u.classList.add("apexcharts-tooltip-marker"),u.style.backgroundColor=i.globals.colors[l],c.appendChild(u);var d=document.createElement("div");d.classList.add("apexcharts-tooltip-text"),d.style.fontFamily=n.tConfig.style.fontFamily||i.config.chart.fontFamily,d.style.fontSize=n.tConfig.style.fontSize,["y","goals","z"].forEach(function(h){var f=document.createElement("div");f.classList.add("apexcharts-tooltip-".concat(h,"-group"));var p=document.createElement("span");p.classList.add("apexcharts-tooltip-text-".concat(h,"-label")),f.appendChild(p);var m=document.createElement("span");m.classList.add("apexcharts-tooltip-text-".concat(h,"-value")),f.appendChild(m),d.appendChild(f)}),c.appendChild(d),o.appendChild(c),s.push(c)},a=0;a<e;a++)r(a);return s}},{key:"addSVGEvents",value:function(){var e=this.w,n=e.config.chart.type,i=this.getElTooltip(),s=!(n!=="bar"&&n!=="candlestick"&&n!=="boxPlot"&&n!=="rangeBar"),o=n==="area"||n==="line"||n==="scatter"||n==="bubble"||n==="radar",r=e.globals.dom.Paper.node,a=this.getElGrid();a&&(this.seriesBound=a.getBoundingClientRect());var l,c=[],u=[],d={hoverArea:r,elGrid:a,tooltipEl:i,tooltipY:c,tooltipX:u,ttItems:this.ttItems};if(e.globals.axisCharts&&(o?l=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):s?l=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area"):n!=="heatmap"&&n!=="treemap"||(l=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),l&&l.length))for(var h=0;h<l.length;h++)c.push(l[h].getAttribute("cy")),u.push(l[h].getAttribute("cx"));if(e.globals.xyCharts&&!this.showOnIntersect||e.globals.comboCharts&&!this.showOnIntersect||s&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([r],d);else if(s&&!e.globals.comboCharts||o&&this.showOnIntersect)this.addDatapointEventsListeners(d);else if(!e.globals.axisCharts||n==="heatmap"||n==="treemap"){var f=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(f,d)}if(this.showOnIntersect){var p=e.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");p.length>0&&this.addPathsEventListeners(p,d),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(d)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,n=this.getElTooltip(),i=n.getBoundingClientRect(),s=i.width+10,o=i.height+10,r=this.tConfig.fixed.offsetX,a=this.tConfig.fixed.offsetY,l=this.tConfig.fixed.position.toLowerCase();return l.indexOf("right")>-1&&(r=r+e.globals.svgWidth-s+10),l.indexOf("bottom")>-1&&(a=a+e.globals.svgHeight-o-10),n.style.left=r+"px",n.style.top=a+"px",{x:r,y:a,ttWidth:s,ttHeight:o}}},{key:"addDatapointEventsListeners",value:function(e){var n=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(n,e)}},{key:"addPathsEventListeners",value:function(e,n){for(var i=this,s=function(r){var a={paths:e[r],tooltipEl:n.tooltipEl,tooltipY:n.tooltipY,tooltipX:n.tooltipX,elGrid:n.elGrid,hoverArea:n.hoverArea,ttItems:n.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(function(l){return e[r].addEventListener(l,i.onSeriesHover.bind(i,a),{capture:!1,passive:!0})})},o=0;o<e.length;o++)s(o)}},{key:"onSeriesHover",value:function(e,n){var i=this,s=Date.now()-this.lastHoverTime;s>=20?this.seriesHover(e,n):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){i.seriesHover(e,n)},20-s))}},{key:"seriesHover",value:function(e,n){var i=this;this.lastHoverTime=Date.now();var s=[],o=this.w;o.config.chart.group&&(s=this.ctx.getGroupedCharts()),o.globals.axisCharts&&(o.globals.minX===-1/0&&o.globals.maxX===1/0||o.globals.dataPoints===0)||(s.length?s.forEach(function(r){var a=i.getElTooltip(r),l={paths:e.paths,tooltipEl:a,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:r.w.globals.tooltip.ttItems};r.w.globals.minX===i.w.globals.minX&&r.w.globals.maxX===i.w.globals.maxX&&r.w.globals.tooltip.seriesHoverByContext({chartCtx:r,ttCtx:r.w.globals.tooltip,opt:l,e:n})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:n}))}},{key:"seriesHoverByContext",value:function(e){var n=e.chartCtx,i=e.ttCtx,s=e.opt,o=e.e,r=n.w,a=this.getElTooltip(n);a&&(i.tooltipRect={x:0,y:0,ttWidth:a.getBoundingClientRect().width,ttHeight:a.getBoundingClientRect().height},i.e=o,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new gr(n).toggleSeriesOnHover(o,o.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:o,opt:s,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:o,opt:s,tooltipRect:i.tooltipRect}))}},{key:"axisChartsTooltips",value:function(e){var n,i,s=e.e,o=e.opt,r=this.w,a=o.elGrid.getBoundingClientRect(),l=s.type==="touchmove"?s.touches[0].clientX:s.clientX,c=s.type==="touchmove"?s.touches[0].clientY:s.clientY;if(this.clientY=c,this.clientX=l,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,c<a.top||c>a.top+a.height)this.handleMouseOut(o);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var u=parseInt(o.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(u)<0)return void this.handleMouseOut(o)}var d=this.getElTooltip(),h=this.getElXCrosshairs(),f=[];r.config.chart.group&&(f=this.ctx.getSyncedCharts());var p=r.globals.xyCharts||r.config.chart.type==="bar"&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if(s.type==="mousemove"||s.type==="touchmove"||s.type==="mouseup"){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;h!==null&&h.classList.add("apexcharts-active");var m=this.yaxisTooltips.filter(function(k){return k===!0});if(this.ycrosshairs!==null&&m.length&&this.ycrosshairs.classList.add("apexcharts-active"),p&&!this.showOnIntersect||f.length>1)this.handleStickyTooltip(s,l,c,o);else if(r.config.chart.type==="heatmap"||r.config.chart.type==="treemap"){var b=this.intersect.handleHeatTreeTooltip({e:s,opt:o,x:n,y:i,type:r.config.chart.type});n=b.x,i=b.y,d.style.left=n+"px",d.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:s,opt:o}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:s,opt:o,x:n,y:i});if(this.yaxisTooltips.length)for(var w=0;w<r.config.yaxis.length;w++)this.axesTooltip.drawYaxisTooltipText(w,c,this.xyRatios);r.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),o.tooltipEl.classList.add("apexcharts-active")}else s.type!=="mouseout"&&s.type!=="touchend"||this.handleMouseOut(o)}}},{key:"nonAxisChartsTooltips",value:function(e){var n=e.e,i=e.opt,s=e.tooltipRect,o=this.w,r=i.paths.getAttribute("rel"),a=this.getElTooltip(),l=o.globals.dom.elWrap.getBoundingClientRect();if(n.type==="mousemove"||n.type==="touchmove"){o.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),a.classList.add("apexcharts-active"),this.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:parseInt(r,10)-1,shared:!1});var c=o.globals.clientX-l.left-s.ttWidth/2,u=o.globals.clientY-l.top-s.ttHeight-10;if(a.style.left=c+"px",a.style.top=u+"px",o.config.legend.tooltipHoverFormatter){var d=r-1,h=(0,o.config.legend.tooltipHoverFormatter)(this.legendLabels[d].getAttribute("data:default-text"),{seriesIndex:d,dataPointIndex:d,w:o});this.legendLabels[d].innerHTML=h}}else n.type!=="mouseout"&&n.type!=="touchend"||(a.classList.remove("apexcharts-active"),o.globals.dom.baseEl.classList.remove("apexcharts-tooltip-active"),o.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(function(f){var p=f.getAttribute("data:default-text");f.innerHTML=decodeURIComponent(p)}))}},{key:"handleStickyTooltip",value:function(e,n,i,s){var o=this.w,r=this.tooltipUtil.getNearestValues({context:this,hoverArea:s.hoverArea,elGrid:s.elGrid,clientX:n,clientY:i}),a=r.j,l=r.capturedSeries;o.globals.collapsedSeriesIndices.includes(l)&&(l=null);var c=s.elGrid.getBoundingClientRect();if(r.hoverX<0||r.hoverX>c.width)this.handleMouseOut(s);else if(l!==null)this.handleStickyCapturedSeries(e,l,s,a);else if(this.tooltipUtil.isXoverlap(a)||o.globals.isBarHorizontal){var u=o.globals.series.findIndex(function(d,h){return!o.globals.collapsedSeriesIndices.includes(h)});this.create(e,this,u,a,s.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(e,n,i,s){var o=this.w;if(!this.tConfig.shared&&o.globals.series[n][s]===null)return void this.handleMouseOut(i);if(o.globals.series[n][s]!==void 0)this.tConfig.shared&&this.tooltipUtil.isXoverlap(s)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,n,s,i.ttItems):this.create(e,this,n,s,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(s)){var r=o.globals.series.findIndex(function(a,l){return!o.globals.collapsedSeriesIndices.includes(l)});this.create(e,this,r,s,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,n=new Ne(this.ctx),i=e.globals.dom.Paper.find(".apexcharts-bar-area"),s=0;s<i.length;s++)n.pathMouseLeave(i[s])}},{key:"handleMouseOut",value:function(e){var n=this.w,i=this.getElXCrosshairs();if(n.globals.dom.baseEl.classList.remove("apexcharts-tooltip-active"),e.tooltipEl.classList.remove("apexcharts-active"),this.deactivateHoverFilter(),n.config.chart.type!=="bubble"&&this.marker.resetPointsSize(),i!==null&&i.classList.remove("apexcharts-active"),this.ycrosshairs!==null&&this.ycrosshairs.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&this.xaxisTooltip.classList.remove("apexcharts-active"),this.yaxisTooltips.length){this.yaxisTTEls===null&&(this.yaxisTTEls=n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));for(var s=0;s<this.yaxisTTEls.length;s++)this.yaxisTTEls[s].classList.remove("apexcharts-active")}n.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(function(o){var r=o.getAttribute("data:default-text");o.innerHTML=decodeURIComponent(r)})}},{key:"markerClick",value:function(e,n,i){var s=this.w;typeof s.config.chart.events.markerClick=="function"&&s.config.chart.events.markerClick(e,this.ctx,{seriesIndex:n,dataPointIndex:i,w:s}),this.ctx.events.fireEvent("markerClick",[e,this.ctx,{seriesIndex:n,dataPointIndex:i,w:s}])}},{key:"create",value:function(e,n,i,s,o){var r,a,l,c,u,d,h,f,p,m,b,w,k,C,A,S,M=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,P=this.w,T=n;e.type==="mouseup"&&this.markerClick(e,i,s),M===null&&(M=this.tConfig.shared);var I=this.tooltipUtil.hasMarkers(i),L=this.tooltipUtil.getElBars(),R=function(){P.globals.markers.largestSize>0?T.marker.enlargePoints(s):T.tooltipPosition.moveDynamicPointsOnHover(s)};if(P.config.legend.tooltipHoverFormatter){var V=P.config.legend.tooltipHoverFormatter,H=Array.from(this.legendLabels);H.forEach(function(K){var ae=K.getAttribute("data:default-text");K.innerHTML=decodeURIComponent(ae)});for(var F=0;F<H.length;F++){var U=H[F],Y=parseInt(U.getAttribute("i"),10),z=decodeURIComponent(U.getAttribute("data:default-text")),X=V(z,{seriesIndex:M?Y:i,dataPointIndex:s,w:P});if(M)U.innerHTML=P.globals.collapsedSeriesIndices.indexOf(Y)<0?X:z;else if(U.innerHTML=Y===i?X:z,i===Y)break}}var Z=tt(tt({ttItems:o,i,j:s},((r=P.globals.seriesRange)===null||r===void 0||(a=r[i])===null||a===void 0||(l=a[s])===null||l===void 0||(c=l.y[0])===null||c===void 0?void 0:c.y1)!==void 0&&{y1:(u=P.globals.seriesRange)===null||u===void 0||(d=u[i])===null||d===void 0||(h=d[s])===null||h===void 0||(f=h.y[0])===null||f===void 0?void 0:f.y1}),((p=P.globals.seriesRange)===null||p===void 0||(m=p[i])===null||m===void 0||(b=m[s])===null||b===void 0||(w=b.y[0])===null||w===void 0?void 0:w.y2)!==void 0&&{y2:(k=P.globals.seriesRange)===null||k===void 0||(C=k[i])===null||C===void 0||(A=C[s])===null||A===void 0||(S=A.y[0])===null||S===void 0?void 0:S.y2});if(M){if(T.tooltipLabels.drawSeriesTexts(tt(tt({},Z),{},{shared:!this.showOnIntersect&&this.tConfig.shared})),I)R();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var G=new Ne(this.ctx),Q=P.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(s,"']"));this.deactivateHoverFilter(),T.tooltipPosition.moveStickyTooltipOverBars(s,i),T.tooltipUtil.getAllMarkers(!0).length&&R();for(var ne=0;ne<Q.length;ne++)G.pathMouseEnter(Q[ne])}}else T.tooltipLabels.drawSeriesTexts(tt({shared:!1},Z)),this.tooltipUtil.hasBars()&&T.tooltipPosition.moveStickyTooltipOverBars(s,i),I&&T.tooltipPosition.moveMarkers(i,s)}}]),t}(),Qbt=function(){function t(e){lt(this,t),this.w=e.w,this.barCtx=e,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}return ct(t,[{key:"handleBarDataLabels",value:function(e){var n,i,s=e.x,o=e.y,r=e.y1,a=e.y2,l=e.i,c=e.j,u=e.realIndex,d=e.columnGroupIndex,h=e.series,f=e.barHeight,p=e.barWidth,m=e.barXPosition,b=e.barYPosition,w=e.visibleSeries,k=e.renderedPath,C=this.w,A=new Ne(this.barCtx.ctx),S=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[u]:this.barCtx.strokeWidth;C.globals.isXNumeric&&!C.globals.isBarHorizontal?(n=s+parseFloat(p*(w+1)),i=o+parseFloat(f*(w+1))-S):(n=s+parseFloat(p*w),i=o+parseFloat(f*w));var M,P=null,T=s,I=o,L={},R=C.config.dataLabels,V=this.barCtx.barOptions.dataLabels,H=this.barCtx.barOptions.dataLabels.total;b!==void 0&&this.barCtx.isRangeBar&&(i=b,I=b),m!==void 0&&this.barCtx.isVerticalGroupedRangeBar&&(n=m,T=m);var F=R.offsetX,U=R.offsetY,Y={width:0,height:0};if(C.config.dataLabels.enabled){var z=C.globals.series[l][c];Y=A.getTextRects(C.config.dataLabels.formatter?C.config.dataLabels.formatter(z,tt(tt({},C),{},{seriesIndex:l,dataPointIndex:c,w:C})):C.globals.yLabelFormatters[0](z),parseFloat(R.style.fontSize))}var X={x:s,y:o,i:l,j:c,realIndex:u,columnGroupIndex:d,renderedPath:k,bcx:n,bcy:i,barHeight:f,barWidth:p,textRects:Y,strokeWidth:S,dataLabelsX:T,dataLabelsY:I,dataLabelsConfig:R,barDataLabelsConfig:V,barTotalDataLabelsConfig:H,offX:F,offY:U};return L=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(X):this.calculateColumnsDataLabelsPosition(X),k.attr({cy:L.bcy,cx:L.bcx,j:c,val:C.globals.series[l][c],barHeight:f,barWidth:p}),M=this.drawCalculatedDataLabels({x:L.dataLabelsX,y:L.dataLabelsY,val:this.barCtx.isRangeBar?[r,a]:C.config.chart.stackType==="100%"?h[u][c]:C.globals.series[u][c],i:u,j:c,barWidth:p,barHeight:f,textRects:Y,dataLabelsConfig:R}),C.config.chart.stacked&&H.enabled&&(P=this.drawTotalDataLabels({x:L.totalDataLabelsX,y:L.totalDataLabelsY,barWidth:p,barHeight:f,realIndex:u,textAnchor:L.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:u,j:c}),dataLabelsConfig:R,barTotalDataLabelsConfig:H})),{dataLabels:M,totalDataLabels:P}}},{key:"getStackedTotalDataLabel",value:function(e){var n=e.realIndex,i=e.j,s=this.w,o=this.barCtx.stackedSeriesTotals[i];return this.totalFormatter&&(o=this.totalFormatter(o,tt(tt({},s),{},{seriesIndex:n,dataPointIndex:i,w:s}))),o}},{key:"calculateColumnsDataLabelsPosition",value:function(e){var n=this.w,i=e.i,s=e.j,o=e.realIndex;e.columnGroupIndex;var r,a,l=e.y,c=e.bcx,u=e.barWidth,d=e.barHeight,h=e.textRects,f=e.dataLabelsX,p=e.dataLabelsY,m=e.dataLabelsConfig,b=e.barDataLabelsConfig,w=e.barTotalDataLabelsConfig,k=e.strokeWidth,C=e.offX,A=e.offY,S=c;d=Math.abs(d);var M=n.config.plotOptions.bar.dataLabels.orientation==="vertical",P=this.barCtx.barHelpers.getZeroValueEncounters({i,j:s}).zeroEncounters;c-=k/2;var T=n.globals.gridWidth/n.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?f+=u/2:(f=n.globals.isXNumeric?c-u/2+C:c-T+u/2+C,P>0&&n.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f-=u*P)),M&&(f=f+h.height/2-k/2-2);var I=n.globals.series[i][s]<0,L=l;switch(this.barCtx.isReversed&&(L=l+(I?d:-d)),b.position){case"center":p=M?I?L-d/2+A:L+d/2-A:I?L-d/2+h.height/2+A:L+d/2+h.height/2-A;break;case"bottom":p=M?I?L-d+A:L+d-A:I?L-d+h.height+k+A:L+d-h.height/2+k-A;break;case"top":p=M?I?L+A:L-A:I?L-h.height/2-A:L+h.height+A}if(this.barCtx.lastActiveBarSerieIndex===o&&w.enabled){var R=new Ne(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:s}),m.fontSize);r=I?L-R.height/2-A-w.offsetY+18:L+R.height+A+w.offsetY-18;var V=T;a=S+(n.globals.isXNumeric?-u*n.globals.barGroups.length/2:n.globals.barGroups.length*u/2-(n.globals.barGroups.length-1)*u-V)+w.offsetX}return n.config.chart.stacked||(p<0?p=0+k:p+h.height/3>n.globals.gridHeight&&(p=n.globals.gridHeight-k)),{bcx:c,bcy:l,dataLabelsX:f,dataLabelsY:p,totalDataLabelsX:a,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var n=this.w,i=e.x,s=e.i,o=e.j,r=e.realIndex,a=e.bcy,l=e.barHeight,c=e.barWidth,u=e.textRects,d=e.dataLabelsX,h=e.strokeWidth,f=e.dataLabelsConfig,p=e.barDataLabelsConfig,m=e.barTotalDataLabelsConfig,b=e.offX,w=e.offY,k=n.globals.gridHeight/n.globals.dataPoints;c=Math.abs(c);var C,A,S=a-(this.barCtx.isRangeBar?0:k)+l/2+u.height/2+w-3,M="start",P=n.globals.series[s][o]<0,T=i;switch(this.barCtx.isReversed&&(T=i+(P?-c:c),M=P?"start":"end"),p.position){case"center":d=P?T+c/2-b:Math.max(u.width/2,T-c/2)+b;break;case"bottom":d=P?T+c-h-b:T-c+h+b;break;case"top":d=P?T-h-b:T-h+b}if(this.barCtx.lastActiveBarSerieIndex===r&&m.enabled){var I=new Ne(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:o}),f.fontSize);P?(C=T-h-b-m.offsetX,M="end"):C=T+b+m.offsetX+(this.barCtx.isReversed?-(c+h):h),A=S-u.height/2+I.height/2+m.offsetY+h}return n.config.chart.stacked||(f.textAnchor==="start"?d-u.width<0?d=P?u.width+h:h:d+u.width>n.globals.gridWidth&&(d=P?n.globals.gridWidth-h:n.globals.gridWidth-u.width-h):f.textAnchor==="middle"?d-u.width/2<0?d=u.width/2+h:d+u.width/2>n.globals.gridWidth&&(d=n.globals.gridWidth-u.width/2-h):f.textAnchor==="end"&&(d<1?d=u.width+h:d+1>n.globals.gridWidth&&(d=n.globals.gridWidth-u.width-h))),{bcx:i,bcy:a,dataLabelsX:d,dataLabelsY:S,totalDataLabelsX:C,totalDataLabelsY:A,totalDataLabelsAnchor:M}}},{key:"drawCalculatedDataLabels",value:function(e){var n=e.x,i=e.y,s=e.val,o=e.i,r=e.j,a=e.textRects,l=e.barHeight,c=e.barWidth,u=e.dataLabelsConfig,d=this.w,h="rotate(0)";d.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(h="rotate(-90, ".concat(n,", ").concat(i,")"));var f=new np(this.barCtx.ctx),p=new Ne(this.barCtx.ctx),m=u.formatter,b=null,w=d.globals.collapsedSeriesIndices.indexOf(o)>-1;if(u.enabled&&!w){b=p.group({class:"apexcharts-data-labels",transform:h});var k="";s!==void 0&&(k=m(s,tt(tt({},d),{},{seriesIndex:o,dataPointIndex:r,w:d}))),!s&&d.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(k="");var C=d.globals.series[o][r]<0,A=d.config.plotOptions.bar.dataLabels.position;d.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(A==="top"&&(u.textAnchor=C?"end":"start"),A==="center"&&(u.textAnchor="middle"),A==="bottom"&&(u.textAnchor=C?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&c<p.getTextRects(k,parseFloat(u.style.fontSize)).width&&(k=""),d.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?a.width/1.6>Math.abs(c)&&(k=""):a.height/1.6>Math.abs(l)&&(k=""));var S=tt({},u);this.barCtx.isHorizontal&&s<0&&(u.textAnchor==="start"?S.textAnchor="end":u.textAnchor==="end"&&(S.textAnchor="start")),f.plotDataLabelsText({x:n,y:i,text:k,i:o,j:r,parent:b,dataLabelsConfig:S,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return b}},{key:"drawTotalDataLabels",value:function(e){var n=e.x,i=e.y,s=e.val,o=e.realIndex,r=e.textAnchor,a=e.barTotalDataLabelsConfig;this.w;var l,c=new Ne(this.barCtx.ctx);return a.enabled&&n!==void 0&&i!==void 0&&this.barCtx.lastActiveBarSerieIndex===o&&(l=c.drawText({x:n,y:i,foreColor:a.style.color,text:s,textAnchor:r,fontFamily:a.style.fontFamily,fontSize:a.style.fontSize,fontWeight:a.style.fontWeight})),l}}]),t}(),e2t=function(){function t(e){lt(this,t),this.w=e.w,this.barCtx=e}return ct(t,[{key:"initVariables",value:function(e){var n=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i<e.length;i++)if(e[i].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[i].length),n.globals.isXNumeric)for(var s=0;s<e[i].length;s++)n.globals.seriesX[i][s]>n.globals.minX&&n.globals.seriesX[i][s]<n.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=n.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(n.globals.series),this.barCtx.seriesLen===0&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],n.globals.comboCharts||this.checkZeroSeries({series:e})}},{key:"initialPositions",value:function(){var e,n,i,s,o,r,a,l,c=this.w,u=c.globals.dataPoints;this.barCtx.isRangeBar&&(u=c.globals.labels.length);var d=this.barCtx.seriesLen;if(c.config.plotOptions.bar.rangeBarGroupRows&&(d=1),this.barCtx.isHorizontal)o=(i=c.globals.gridHeight/u)/d,c.globals.isXNumeric&&(o=(i=c.globals.gridHeight/this.barCtx.totalItems)/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,String(this.barCtx.barOptions.barHeight).indexOf("%")===-1&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),l=this.barCtx.baseLineInvertedY+c.globals.padHorizontal+(this.barCtx.isReversed?c.globals.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(l=c.globals.gridWidth/2),n=(i-o*this.barCtx.seriesLen)/2;else{if(s=c.globals.gridWidth/this.barCtx.visibleItems,c.config.xaxis.convertedCatToNumeric&&(s=c.globals.gridWidth/c.globals.dataPoints),r=s/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,c.globals.isXNumeric){var h=this.barCtx.xRatio;c.globals.minXDiff&&c.globals.minXDiff!==.5&&c.globals.minXDiff/h>0&&(s=c.globals.minXDiff/h),(r=s/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),a=c.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?c.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e=c.globals.padHorizontal+he.noExponents(s-r*this.barCtx.seriesLen)/2}return c.globals.barHeight=o,c.globals.barWidth=r,{x:e,y:n,yDivision:i,xDivision:s,barHeight:o,barWidth:r,zeroH:a,zeroW:l}}},{key:"initializeStackedPrevVars",value:function(e){e.w.globals.seriesGroups.forEach(function(n){e[n]||(e[n]={}),e[n].prevY=[],e[n].prevX=[],e[n].prevYF=[],e[n].prevXF=[],e[n].prevYVal=[],e[n].prevXVal=[]})}},{key:"initializeStackedXYVars",value:function(e){e.w.globals.seriesGroups.forEach(function(n){e[n]||(e[n]={}),e[n].xArrj=[],e[n].xArrjF=[],e[n].xArrjVal=[],e[n].yArrj=[],e[n].yArrjF=[],e[n].yArrjVal=[]})}},{key:"getPathFillColor",value:function(e,n,i,s){var o,r,a,l,c=this.w,u=this.barCtx.ctx.fill,d=null,h=this.barCtx.barOptions.distributed?i:n,f=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(p){e[n][i]>=p.from&&e[n][i]<=p.to&&(d=p.color,f=!0)}),{color:u.fillPath({seriesNumber:this.barCtx.barOptions.distributed?h:s,dataPointIndex:i,color:d,value:e[n][i],fillConfig:(o=c.config.series[n].data[i])===null||o===void 0?void 0:o.fill,fillType:(r=c.config.series[n].data[i])!==null&&r!==void 0&&(a=r.fill)!==null&&a!==void 0&&a.type?(l=c.config.series[n].data[i])===null||l===void 0?void 0:l.fill.type:Array.isArray(c.config.fill.type)?c.config.fill.type[s]:c.config.fill.type}),useRangeColor:f}}},{key:"getStrokeWidth",value:function(e,n,i){var s=0,o=this.w;return this.barCtx.series[e][n]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,o.config.stroke.show&&(this.barCtx.isNullValue||(s=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),s}},{key:"createBorderRadiusArr",value:function(e){var n,i=this.w,s=!this.w.config.chart.stacked||i.config.plotOptions.bar.borderRadius<=0,o=e.length,r=0|((n=e[0])===null||n===void 0?void 0:n.length),a=Array.from({length:o},function(){return Array(r).fill(s?"top":"none")});if(s)return a;for(var l=0;l<r;l++){for(var c=[],u=[],d=0,h=0;h<o;h++){var f=e[h][l];f>0?(c.push(h),d++):f<0&&(u.push(h),d++)}if(c.length>0&&u.length===0)if(c.length===1)a[c[0]][l]="both";else{var p,m=c[0],b=c[c.length-1],w=Pm(c);try{for(w.s();!(p=w.n()).done;){var k=p.value;a[k][l]=k===m?"bottom":k===b?"top":"none"}}catch(Y){w.e(Y)}finally{w.f()}}else if(u.length>0&&c.length===0)if(u.length===1)a[u[0]][l]="both";else{var C,A=Math.max.apply(Math,u),S=Math.min.apply(Math,u),M=Pm(u);try{for(M.s();!(C=M.n()).done;){var P=C.value;a[P][l]=P===A?"bottom":P===S?"top":"none"}}catch(Y){M.e(Y)}finally{M.f()}}else if(c.length>0&&u.length>0){var T,I=c[c.length-1],L=Pm(c);try{for(L.s();!(T=L.n()).done;){var R=T.value;a[R][l]=R===I?"top":"none"}}catch(Y){L.e(Y)}finally{L.f()}var V,H=Math.max.apply(Math,u),F=Pm(u);try{for(F.s();!(V=F.n()).done;){var U=V.value;a[U][l]=U===H?"bottom":"none"}}catch(Y){F.e(Y)}finally{F.f()}}else d===1&&(a[c[0]||u[0]][l]="both")}return a}},{key:"barBackground",value:function(e){var n=e.j,i=e.i,s=e.x1,o=e.x2,r=e.y1,a=e.y2,l=e.elSeries,c=this.w,u=new Ne(this.barCtx.ctx),d=new gr(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&d===i){n>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(n%=this.barCtx.barOptions.colors.backgroundBarColors.length);var h=this.barCtx.barOptions.colors.backgroundBarColors[n],f=u.drawRect(s!==void 0?s:0,r!==void 0?r:0,o!==void 0?o:c.globals.gridWidth,a!==void 0?a:c.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,h,this.barCtx.barOptions.colors.backgroundBarOpacity);l.add(f),f.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var n,i=e.barWidth,s=e.barXPosition,o=e.y1,r=e.y2,a=e.strokeWidth,l=e.isReversed,c=e.series,u=e.seriesGroup,d=e.realIndex,h=e.i,f=e.j,p=e.w,m=new Ne(this.barCtx.ctx);(a=Array.isArray(a)?a[d]:a)||(a=0);var b=i,w=s;(n=p.config.series[d].data[f])!==null&&n!==void 0&&n.columnWidthOffset&&(w=s-p.config.series[d].data[f].columnWidthOffset/2,b=i+p.config.series[d].data[f].columnWidthOffset);var k=a/2,C=w+k,A=w+b-k,S=(c[h][f]>=0?1:-1)*(l?-1:1);o+=.001-k*S,r+=.001+k*S;var M=m.move(C,o),P=m.move(C,o),T=m.line(A,o);if(p.globals.previousPaths.length>0&&(P=this.barCtx.getPreviousPath(d,f,!1)),M=M+m.line(C,r)+m.line(A,r)+T+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),P=P+m.line(C,o)+T+T+T+T+T+m.line(C,o)+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),this.arrBorderRadius[d][f]!=="none"&&(M=m.roundPathCorners(M,p.config.plotOptions.bar.borderRadius)),p.config.chart.stacked){var I=this.barCtx;(I=this.barCtx[u]).yArrj.push(r-k*S),I.yArrjF.push(Math.abs(o-r+a*S)),I.yArrjVal.push(this.barCtx.series[h][f])}return{pathTo:M,pathFrom:P}}},{key:"getBarpaths",value:function(e){var n,i=e.barYPosition,s=e.barHeight,o=e.x1,r=e.x2,a=e.strokeWidth,l=e.isReversed,c=e.series,u=e.seriesGroup,d=e.realIndex,h=e.i,f=e.j,p=e.w,m=new Ne(this.barCtx.ctx);(a=Array.isArray(a)?a[d]:a)||(a=0);var b=i,w=s;(n=p.config.series[d].data[f])!==null&&n!==void 0&&n.barHeightOffset&&(b=i-p.config.series[d].data[f].barHeightOffset/2,w=s+p.config.series[d].data[f].barHeightOffset);var k=a/2,C=b+k,A=b+w-k,S=(c[h][f]>=0?1:-1)*(l?-1:1);o+=.001+k*S,r+=.001-k*S;var M=m.move(o,C),P=m.move(o,C);p.globals.previousPaths.length>0&&(P=this.barCtx.getPreviousPath(d,f,!1));var T=m.line(o,A);if(M=M+m.line(r,C)+m.line(r,A)+T+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),P=P+m.line(o,C)+T+T+T+T+T+m.line(o,C)+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),this.arrBorderRadius[d][f]!=="none"&&(M=m.roundPathCorners(M,p.config.plotOptions.bar.borderRadius)),p.config.chart.stacked){var I=this.barCtx;(I=this.barCtx[u]).xArrj.push(r+k*S),I.xArrjF.push(Math.abs(o-r-a*S)),I.xArrjVal.push(this.barCtx.series[h][f])}return{pathTo:M,pathFrom:P}}},{key:"checkZeroSeries",value:function(e){for(var n=e.series,i=this.w,s=0;s<n.length;s++){for(var o=0,r=0;r<n[i.globals.maxValsInArrayIndex].length;r++)o+=n[s][r];o===0&&this.barCtx.zeroSerieses.push(s)}}},{key:"getXForValue",value:function(e,n){var i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2]?n:null;return e!=null&&(i=n+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(e,n,i){var s=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3]?n:null;return e!=null&&(s=n-e/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[i]:0)),s}},{key:"getGoalValues",value:function(e,n,i,s,o,r){var a=this,l=this.w,c=[],u=function(f,p){var m;c.push((nb(m={},e,e==="x"?a.getXForValue(f,n,!1):a.getYForValue(f,i,r,!1)),nb(m,"attrs",p),m))};if(l.globals.seriesGoals[s]&&l.globals.seriesGoals[s][o]&&Array.isArray(l.globals.seriesGoals[s][o])&&l.globals.seriesGoals[s][o].forEach(function(f){u(f.value,f)}),this.barCtx.barOptions.isDumbbell&&l.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:l.globals.colors,h={strokeHeight:e==="x"?0:l.globals.markers.size[s],strokeWidth:e==="x"?l.globals.markers.size[s]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[s])?d[s][0]:d[s]};u(l.globals.seriesRangeStart[s][o],h),u(l.globals.seriesRangeEnd[s][o],tt(tt({},h),{},{strokeColor:Array.isArray(d[s])?d[s][1]:d[s]}))}return c}},{key:"drawGoalLine",value:function(e){var n=e.barXPosition,i=e.barYPosition,s=e.goalX,o=e.goalY,r=e.barWidth,a=e.barHeight,l=new Ne(this.barCtx.ctx),c=l.group({className:"apexcharts-bar-goals-groups"});c.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:c.node}),c.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var u=null;return this.barCtx.isHorizontal?Array.isArray(s)&&s.forEach(function(d){if(d.x>=-1&&d.x<=l.w.globals.gridWidth+1){var h=d.attrs.strokeHeight!==void 0?d.attrs.strokeHeight:a/2,f=i+h+a/2;u=l.drawLine(d.x,f-2*h,d.x,f,d.attrs.strokeColor?d.attrs.strokeColor:void 0,d.attrs.strokeDashArray,d.attrs.strokeWidth?d.attrs.strokeWidth:2,d.attrs.strokeLineCap),c.add(u)}}):Array.isArray(o)&&o.forEach(function(d){if(d.y>=-1&&d.y<=l.w.globals.gridHeight+1){var h=d.attrs.strokeWidth!==void 0?d.attrs.strokeWidth:r/2,f=n+h+r/2;u=l.drawLine(f-2*h,d.y,f,d.y,d.attrs.strokeColor?d.attrs.strokeColor:void 0,d.attrs.strokeDashArray,d.attrs.strokeHeight?d.attrs.strokeHeight:2,d.attrs.strokeLineCap),c.add(u)}}),c}},{key:"drawBarShadow",value:function(e){var n=e.prevPaths,i=e.currPaths,s=e.color,o=this.w,r=n.x,a=n.x1,l=n.barYPosition,c=i.x,u=i.x1,d=i.barYPosition,h=l+i.barHeight,f=new Ne(this.barCtx.ctx),p=new he,m=f.move(a,h)+f.line(r,h)+f.line(c,d)+f.line(u,d)+f.line(a,h)+(o.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[realIndex][j]==="both"?" Z":" z");return f.drawPath({d:m,fill:p.shadeColor(.5,he.rgb2hex(s)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(e){var n,i=e.i,s=e.j,o=this.w,r=0,a=0;return(o.config.plotOptions.bar.horizontal?o.globals.series.map(function(l,c){return c}):((n=o.globals.columnSeries)===null||n===void 0?void 0:n.i.map(function(l){return l}))||[]).forEach(function(l){var c=o.globals.seriesPercent[l][s];c&&r++,l<i&&c===0&&a++}),{nonZeroColumns:r,zeroEncounters:a}}},{key:"getGroupIndex",value:function(e){var n=this.w,i=n.globals.seriesGroups.findIndex(function(r){return r.indexOf(n.globals.seriesNames[e])>-1}),s=this.barCtx.columnGroupIndices,o=s.indexOf(i);return o<0&&(s.push(i),o=s.length-1),{groupIndex:i,columnGroupIndex:o}}}]),t}(),sp=function(){function t(e,n){lt(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.barOptions=i.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=i.config.stroke.width,this.isNullValue=!1,this.isRangeBar=i.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!i.globals.isBarHorizontal&&i.globals.seriesRange.length&&i.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=n,this.xyRatios!==null&&(this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.invertedXRatio=n.invertedXRatio,this.invertedYRatio=n.invertedYRatio,this.baseLineY=n.baseLineY,this.baseLineInvertedY=n.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var s=new gr(this.ctx);this.lastActiveBarSerieIndex=s.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var o=s.getBarSeriesIndices(),r=new ys(this.ctx);this.stackedSeriesTotals=r.getStackedSeriesTotals(this.w.config.series.map(function(a,l){return o.indexOf(l)===-1?l:-1}).filter(function(a){return a!==-1})),this.barHelpers=new e2t(this)}return ct(t,[{key:"draw",value:function(e,n){var i=this.w,s=new Ne(this.ctx),o=new ys(this.ctx,i);e=o.getLogSeries(e),this.series=e,this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var r=s.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var a=0,l=0;a<e.length;a++,l++){var c,u,d,h,f=void 0,p=void 0,m=[],b=[],w=i.globals.comboCharts?n[a]:a,k=this.barHelpers.getGroupIndex(w).columnGroupIndex,C=s.group({class:"apexcharts-series",rel:a+1,seriesName:he.escapeString(i.globals.seriesNames[w]),"data:realIndex":w});this.ctx.series.addCollapsedClassToSeries(C,w),e[a].length>0&&(this.visibleI=this.visibleI+1);var A=0,S=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[w],this.translationsIndex=w);var M=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var P=this.barHelpers.initialPositions();p=P.y,A=P.barHeight,u=P.yDivision,h=P.zeroW,f=P.x,S=P.barWidth,c=P.xDivision,d=P.zeroH,this.isHorizontal||b.push(f+S/2);var T=s.group({class:"apexcharts-datalabels","data:realIndex":w});i.globals.delayedElements.push({el:T.node}),T.node.classList.add("apexcharts-element-hidden");var I=s.group({class:"apexcharts-bar-goals-markers"}),L=s.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:L.node}),L.node.classList.add("apexcharts-element-hidden");for(var R=0;R<e[a].length;R++){var V=this.barHelpers.getStrokeWidth(a,R,w),H=null,F={indexes:{i:a,j:R,realIndex:w,translationsIndex:M,bc:l},x:f,y:p,strokeWidth:V,elSeries:C};this.isHorizontal?(H=this.drawBarPaths(tt(tt({},F),{},{barHeight:A,zeroW:h,yDivision:u})),S=this.series[a][R]/this.invertedYRatio):(H=this.drawColumnPaths(tt(tt({},F),{},{xDivision:c,barWidth:S,zeroH:d})),A=this.series[a][R]/this.yRatio[M]);var U=this.barHelpers.getPathFillColor(e,a,R,w);if(this.isFunnel&&this.barOptions.isFunnel3d&&this.pathArr.length&&R>0){var Y,z=this.barHelpers.drawBarShadow({color:typeof U.color=="string"&&((Y=U.color)===null||Y===void 0?void 0:Y.indexOf("url"))===-1?U.color:he.hexToRgba(i.globals.colors[a]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:H});L.add(z),i.config.chart.dropShadow.enabled&&new di(this.ctx).dropShadow(z,i.config.chart.dropShadow,w)}this.pathArr.push(H);var X=this.barHelpers.drawGoalLine({barXPosition:H.barXPosition,barYPosition:H.barYPosition,goalX:H.goalX,goalY:H.goalY,barHeight:A,barWidth:S});X&&I.add(X),p=H.y,f=H.x,R>0&&b.push(f+S/2),m.push(p),this.renderSeries(tt(tt({realIndex:w,pathFill:U.color},U.useRangeColor?{lineFill:U.color}:{}),{},{j:R,i:a,columnGroupIndex:k,pathFrom:H.pathFrom,pathTo:H.pathTo,strokeWidth:V,elSeries:C,x:f,y:p,series:e,barHeight:Math.abs(H.barHeight?H.barHeight:A),barWidth:Math.abs(H.barWidth?H.barWidth:S),elDataLabelsWrap:T,elGoalsMarkers:I,elBarShadows:L,visibleSeries:this.visibleI,type:"bar"}))}i.globals.seriesXvalues[w]=b,i.globals.seriesYvalues[w]=m,r.add(C)}return r}},{key:"renderSeries",value:function(e){var n=e.realIndex,i=e.pathFill,s=e.lineFill,o=e.j,r=e.i,a=e.columnGroupIndex,l=e.pathFrom,c=e.pathTo,u=e.strokeWidth,d=e.elSeries,h=e.x,f=e.y,p=e.y1,m=e.y2,b=e.series,w=e.barHeight,k=e.barWidth,C=e.barXPosition,A=e.barYPosition,S=e.elDataLabelsWrap,M=e.elGoalsMarkers,P=e.elBarShadows,T=e.visibleSeries,I=e.type,L=e.classes,R=this.w,V=new Ne(this.ctx);if(!s){var H=typeof R.globals.stroke.colors[n]=="function"?function(X){var Z,G=R.config.stroke.colors;return Array.isArray(G)&&G.length>0&&((Z=G[X])||(Z=""),typeof Z=="function")?Z({value:R.globals.series[X][o],dataPointIndex:o,w:R}):Z}(n):R.globals.stroke.colors[n];s=this.barOptions.distributed?R.globals.stroke.colors[o]:H}R.config.series[r].data[o]&&R.config.series[r].data[o].strokeColor&&(s=R.config.series[r].data[o].strokeColor),this.isNullValue&&(i="none");var F=o/R.config.chart.animations.animateGradually.delay*(R.config.chart.animations.speed/R.globals.dataPoints)/2.4,U=V.renderPaths({i:r,j:o,realIndex:n,pathFrom:l,pathTo:c,stroke:s,strokeWidth:u,strokeLineCap:R.config.stroke.lineCap,fill:i,animationDelay:F,initialSpeed:R.config.chart.animations.speed,dataChangeSpeed:R.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(I,"-area ").concat(L),chartType:I});U.attr("clip-path","url(#gridRectBarMask".concat(R.globals.cuid,")"));var Y=R.config.forecastDataPoints;Y.count>0&&o>=R.globals.dataPoints-Y.count&&(U.node.setAttribute("stroke-dasharray",Y.dashArray),U.node.setAttribute("stroke-width",Y.strokeWidth),U.node.setAttribute("fill-opacity",Y.fillOpacity)),p!==void 0&&m!==void 0&&(U.attr("data-range-y1",p),U.attr("data-range-y2",m)),new di(this.ctx).setSelectionFilter(U,n,o),d.add(U);var z=new Qbt(this).handleBarDataLabels({x:h,y:f,y1:p,y2:m,i:r,j:o,series:b,realIndex:n,columnGroupIndex:a,barHeight:w,barWidth:k,barXPosition:C,barYPosition:A,renderedPath:U,visibleSeries:T});return z.dataLabels!==null&&S.add(z.dataLabels),z.totalDataLabels&&S.add(z.totalDataLabels),d.add(S),M&&d.add(M),P&&d.add(P),d}},{key:"drawBarPaths",value:function(e){var n,i=e.indexes,s=e.barHeight,o=e.strokeWidth,r=e.zeroW,a=e.x,l=e.y,c=e.yDivision,u=e.elSeries,d=this.w,h=i.i,f=i.j;if(d.globals.isXNumeric)n=(l=(d.globals.seriesX[h][f]-d.globals.minX)/this.invertedXRatio-s)+s*this.visibleI;else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var p=0,m=0;d.globals.seriesPercent.forEach(function(w,k){w[f]&&p++,k<h&&w[f]===0&&m++}),p>0&&(s=this.seriesLen*s/p),n=l+s*this.visibleI,n-=s*m}else n=l+s*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[h][f],r)-r)/2),a=this.barHelpers.getXForValue(this.series[h][f],r);var b=this.barHelpers.getBarpaths({barYPosition:n,barHeight:s,x1:r,x2:a,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,i:h,j:f,w:d});return d.globals.isXNumeric||(l+=c),this.barHelpers.barBackground({j:f,i:h,y1:n-s*this.visibleI,y2:s*this.seriesLen,elSeries:u}),{pathTo:b.pathTo,pathFrom:b.pathFrom,x1:r,x:a,y:l,goalX:this.barHelpers.getGoalValues("x",r,null,h,f),barYPosition:n,barHeight:s}}},{key:"drawColumnPaths",value:function(e){var n,i=e.indexes,s=e.x,o=e.y,r=e.xDivision,a=e.barWidth,l=e.zeroH,c=e.strokeWidth,u=e.elSeries,d=this.w,h=i.realIndex,f=i.translationsIndex,p=i.i,m=i.j,b=i.bc;if(d.globals.isXNumeric){var w=this.getBarXForNumericXAxis({x:s,j:m,realIndex:h,barWidth:a});s=w.x,n=w.barXPosition}else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var k=this.barHelpers.getZeroValueEncounters({i:p,j:m}),C=k.nonZeroColumns,A=k.zeroEncounters;C>0&&(a=this.seriesLen*a/C),n=s+a*this.visibleI,n-=a*A}else n=s+a*this.visibleI;o=this.barHelpers.getYForValue(this.series[p][m],l,f);var S=this.barHelpers.getColumnPaths({barXPosition:n,barWidth:a,y1:l,y2:o,strokeWidth:c,isReversed:this.isReversed,series:this.series,realIndex:h,i:p,j:m,w:d});return d.globals.isXNumeric||(s+=r),this.barHelpers.barBackground({bc:b,j:m,i:p,x1:n-c/2-a*this.visibleI,x2:a*this.seriesLen+c/2,elSeries:u}),{pathTo:S.pathTo,pathFrom:S.pathFrom,x:s,y:o,goalY:this.barHelpers.getGoalValues("y",null,l,p,m,f),barXPosition:n,barWidth:a}}},{key:"getBarXForNumericXAxis",value:function(e){var n=e.x,i=e.barWidth,s=e.realIndex,o=e.j,r=this.w,a=s;return r.globals.seriesX[s].length||(a=r.globals.maxValsInArrayIndex),he.isNumber(r.globals.seriesX[a][o])&&(n=(r.globals.seriesX[a][o]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:n+i*this.visibleI,x:n}}},{key:"getPreviousPath",value:function(e,n){for(var i,s=this.w,o=0;o<s.globals.previousPaths.length;o++){var r=s.globals.previousPaths[o];r.paths&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(e,10)&&s.globals.previousPaths[o].paths[n]!==void 0&&(i=s.globals.previousPaths[o].paths[n].d)}return i}}]),t}(),QT=function(t){kv(n,sp);var e=wv(n);function n(){return lt(this,n),e.apply(this,arguments)}return ct(n,[{key:"draw",value:function(i,s){var o=this,r=this.w;this.graphics=new Ne(this.ctx),this.bar=new sp(this.ctx,this.xyRatios);var a=new ys(this.ctx,r);i=a.getLogSeries(i),this.yRatio=a.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i),r.config.chart.stackType==="100%"&&(i=r.globals.comboCharts?s.map(function(p){return r.globals.seriesPercent[p]}):r.globals.seriesPercent.slice()),this.series=i,this.barHelpers.initializeStackedPrevVars(this);for(var l=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),c=0,u=0,d=function(p,m){var b=void 0,w=void 0,k=void 0,C=void 0,A=r.globals.comboCharts?s[p]:p,S=o.barHelpers.getGroupIndex(A),M=S.groupIndex,P=S.columnGroupIndex;o.groupCtx=o[r.globals.seriesGroups[M]];var T=[],I=[],L=0;o.yRatio.length>1&&(o.yaxisIndex=r.globals.seriesYAxisReverseMap[A][0],L=A),o.isReversed=r.config.yaxis[o.yaxisIndex]&&r.config.yaxis[o.yaxisIndex].reversed;var R=o.graphics.group({class:"apexcharts-series",seriesName:he.escapeString(r.globals.seriesNames[A]),rel:p+1,"data:realIndex":A});o.ctx.series.addCollapsedClassToSeries(R,A);var V=o.graphics.group({class:"apexcharts-datalabels","data:realIndex":A}),H=o.graphics.group({class:"apexcharts-bar-goals-markers"}),F=0,U=0,Y=o.initialPositions(c,u,b,w,k,C,L);u=Y.y,F=Y.barHeight,w=Y.yDivision,C=Y.zeroW,c=Y.x,U=Y.barWidth,b=Y.xDivision,k=Y.zeroH,r.globals.barHeight=F,r.globals.barWidth=U,o.barHelpers.initializeStackedXYVars(o),o.groupCtx.prevY.length===1&&o.groupCtx.prevY[0].every(function(ge){return isNaN(ge)})&&(o.groupCtx.prevY[0]=o.groupCtx.prevY[0].map(function(){return k}),o.groupCtx.prevYF[0]=o.groupCtx.prevYF[0].map(function(){return 0}));for(var z=0;z<r.globals.dataPoints;z++){var X=o.barHelpers.getStrokeWidth(p,z,A),Z={indexes:{i:p,j:z,realIndex:A,translationsIndex:L,bc:m},strokeWidth:X,x:c,y:u,elSeries:R,columnGroupIndex:P,seriesGroup:r.globals.seriesGroups[M]},G=null;o.isHorizontal?(G=o.drawStackedBarPaths(tt(tt({},Z),{},{zeroW:C,barHeight:F,yDivision:w})),U=o.series[p][z]/o.invertedYRatio):(G=o.drawStackedColumnPaths(tt(tt({},Z),{},{xDivision:b,barWidth:U,zeroH:k})),F=o.series[p][z]/o.yRatio[L]);var Q=o.barHelpers.drawGoalLine({barXPosition:G.barXPosition,barYPosition:G.barYPosition,goalX:G.goalX,goalY:G.goalY,barHeight:F,barWidth:U});Q&&H.add(Q),u=G.y,c=G.x,T.push(c),I.push(u);var ne=o.barHelpers.getPathFillColor(i,p,z,A),K="",ae=r.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y";(o.barHelpers.arrBorderRadius[A][z]==="bottom"&&r.globals.series[A][z]>0||o.barHelpers.arrBorderRadius[A][z]==="top"&&r.globals.series[A][z]<0)&&(K=ae),R=o.renderSeries(tt(tt({realIndex:A,pathFill:ne.color},ne.useRangeColor?{lineFill:ne.color}:{}),{},{j:z,i:p,columnGroupIndex:P,pathFrom:G.pathFrom,pathTo:G.pathTo,strokeWidth:X,elSeries:R,x:c,y:u,series:i,barHeight:F,barWidth:U,elDataLabelsWrap:V,elGoalsMarkers:H,type:"bar",visibleSeries:P,classes:K}))}r.globals.seriesXvalues[A]=T,r.globals.seriesYvalues[A]=I,o.groupCtx.prevY.push(o.groupCtx.yArrj),o.groupCtx.prevYF.push(o.groupCtx.yArrjF),o.groupCtx.prevYVal.push(o.groupCtx.yArrjVal),o.groupCtx.prevX.push(o.groupCtx.xArrj),o.groupCtx.prevXF.push(o.groupCtx.xArrjF),o.groupCtx.prevXVal.push(o.groupCtx.xArrjVal),l.add(R)},h=0,f=0;h<i.length;h++,f++)d(h,f);return l}},{key:"initialPositions",value:function(i,s,o,r,a,l,c){var u,d,h=this.w;if(this.isHorizontal){r=h.globals.gridHeight/h.globals.dataPoints;var f=h.config.plotOptions.bar.barHeight;u=String(f).indexOf("%")===-1?parseInt(f,10):r*parseInt(f,10)/100,l=h.globals.padHorizontal+(this.isReversed?h.globals.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),s=(r-u)/2}else{d=o=h.globals.gridWidth/h.globals.dataPoints;var p=h.config.plotOptions.bar.columnWidth;h.globals.isXNumeric&&h.globals.dataPoints>1?d=(o=h.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:String(p).indexOf("%")===-1?d=parseInt(p,10):d*=parseInt(p,10)/100,a=this.isReversed?this.baseLineY[c]:h.globals.gridHeight-this.baseLineY[c],i=h.globals.padHorizontal+(o-d)/2}var m=h.globals.barGroups.length||1;return{x:i,y:s,yDivision:r,xDivision:o,barHeight:u/m,barWidth:d/m,zeroH:a,zeroW:l}}},{key:"drawStackedBarPaths",value:function(i){for(var s,o=i.indexes,r=i.barHeight,a=i.strokeWidth,l=i.zeroW,c=i.x,u=i.y,d=i.columnGroupIndex,h=i.seriesGroup,f=i.yDivision,p=i.elSeries,m=this.w,b=u+d*r,w=o.i,k=o.j,C=o.realIndex,A=o.translationsIndex,S=0,M=0;M<this.groupCtx.prevXF.length;M++)S+=this.groupCtx.prevXF[M][k];var P;if((P=h.indexOf(m.config.series[C].name))>0){var T=l;this.groupCtx.prevXVal[P-1][k]<0?T=this.series[w][k]>=0?this.groupCtx.prevX[P-1][k]+S-2*(this.isReversed?S:0):this.groupCtx.prevX[P-1][k]:this.groupCtx.prevXVal[P-1][k]>=0&&(T=this.series[w][k]>=0?this.groupCtx.prevX[P-1][k]:this.groupCtx.prevX[P-1][k]-S+2*(this.isReversed?S:0)),s=T}else s=l;c=this.series[w][k]===null?s:s+this.series[w][k]/this.invertedYRatio-2*(this.isReversed?this.series[w][k]/this.invertedYRatio:0);var I=this.barHelpers.getBarpaths({barYPosition:b,barHeight:r,x1:s,x2:c,strokeWidth:a,isReversed:this.isReversed,series:this.series,realIndex:o.realIndex,seriesGroup:h,i:w,j:k,w:m});return this.barHelpers.barBackground({j:k,i:w,y1:b,y2:r,elSeries:p}),u+=f,{pathTo:I.pathTo,pathFrom:I.pathFrom,goalX:this.barHelpers.getGoalValues("x",l,null,w,k,A),barXPosition:s,barYPosition:b,x:c,y:u}}},{key:"drawStackedColumnPaths",value:function(i){var s=i.indexes,o=i.x,r=i.y,a=i.xDivision,l=i.barWidth,c=i.zeroH,u=i.columnGroupIndex,d=i.seriesGroup,h=i.elSeries,f=this.w,p=s.i,m=s.j,b=s.bc,w=s.realIndex,k=s.translationsIndex;if(f.globals.isXNumeric){var C=f.globals.seriesX[w][m];C||(C=0),o=(C-f.globals.minX)/this.xRatio-l/2*f.globals.barGroups.length}for(var A,S=o+u*l,M=0,P=0;P<this.groupCtx.prevYF.length;P++)M+=isNaN(this.groupCtx.prevYF[P][m])?0:this.groupCtx.prevYF[P][m];var T=p;if(d&&(T=d.indexOf(f.globals.seriesNames[w])),T>0&&!f.globals.isXNumeric||T>0&&f.globals.isXNumeric&&f.globals.seriesX[w-1][m]===f.globals.seriesX[w][m]){var I,L,R,V=Math.min(this.yRatio.length+1,w+1);if(this.groupCtx.prevY[T-1]!==void 0&&this.groupCtx.prevY[T-1].length)for(var H=1;H<V;H++){var F;if(!isNaN((F=this.groupCtx.prevY[T-H])===null||F===void 0?void 0:F[m])){R=this.groupCtx.prevY[T-H][m];break}}for(var U=1;U<V;U++){var Y,z;if(((Y=this.groupCtx.prevYVal[T-U])===null||Y===void 0?void 0:Y[m])<0){L=this.series[p][m]>=0?R-M+2*(this.isReversed?M:0):R;break}if(((z=this.groupCtx.prevYVal[T-U])===null||z===void 0?void 0:z[m])>=0){L=this.series[p][m]>=0?R:R+M-2*(this.isReversed?M:0);break}}L===void 0&&(L=f.globals.gridHeight),A=(I=this.groupCtx.prevYF[0])!==null&&I!==void 0&&I.every(function(Z){return Z===0})&&this.groupCtx.prevYF.slice(1,T).every(function(Z){return Z.every(function(G){return isNaN(G)})})?c:L}else A=c;r=this.series[p][m]?A-this.series[p][m]/this.yRatio[k]+2*(this.isReversed?this.series[p][m]/this.yRatio[k]:0):A;var X=this.barHelpers.getColumnPaths({barXPosition:S,barWidth:l,y1:A,y2:r,yRatio:this.yRatio[k],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:d,realIndex:s.realIndex,i:p,j:m,w:f});return this.barHelpers.barBackground({bc:b,j:m,i:p,x1:S,x2:l,elSeries:h}),{pathTo:X.pathTo,pathFrom:X.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,c,p,m),barXPosition:S,x:f.globals.isXNumeric?o:o+a,y:r}}}]),n}(),rk=function(t){kv(n,sp);var e=wv(n);function n(){return lt(this,n),e.apply(this,arguments)}return ct(n,[{key:"draw",value:function(i,s,o){var r=this,a=this.w,l=new Ne(this.ctx),c=a.globals.comboCharts?s:a.config.chart.type,u=new Xr(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=a.config.plotOptions.bar.horizontal;var d=new ys(this.ctx,a);i=d.getLogSeries(i),this.series=i,this.yRatio=d.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i);for(var h=l.group({class:"apexcharts-".concat(c,"-series apexcharts-plot-series")}),f=function(m){r.isBoxPlot=a.config.chart.type==="boxPlot"||a.config.series[m].type==="boxPlot";var b,w,k,C,A=void 0,S=void 0,M=[],P=[],T=a.globals.comboCharts?o[m]:m,I=r.barHelpers.getGroupIndex(T).columnGroupIndex,L=l.group({class:"apexcharts-series",seriesName:he.escapeString(a.globals.seriesNames[T]),rel:m+1,"data:realIndex":T});r.ctx.series.addCollapsedClassToSeries(L,T),i[m].length>0&&(r.visibleI=r.visibleI+1);var R,V,H=0;r.yRatio.length>1&&(r.yaxisIndex=a.globals.seriesYAxisReverseMap[T][0],H=T);var F=r.barHelpers.initialPositions();S=F.y,R=F.barHeight,w=F.yDivision,C=F.zeroW,A=F.x,V=F.barWidth,b=F.xDivision,k=F.zeroH,P.push(A+V/2);for(var U=l.group({class:"apexcharts-datalabels","data:realIndex":T}),Y=l.group({class:"apexcharts-bar-goals-markers"}),z=function(Z){var G=r.barHelpers.getStrokeWidth(m,Z,T),Q=null,ne={indexes:{i:m,j:Z,realIndex:T,translationsIndex:H},x:A,y:S,strokeWidth:G,elSeries:L};Q=r.isHorizontal?r.drawHorizontalBoxPaths(tt(tt({},ne),{},{yDivision:w,barHeight:R,zeroW:C})):r.drawVerticalBoxPaths(tt(tt({},ne),{},{xDivision:b,barWidth:V,zeroH:k})),S=Q.y,A=Q.x;var K=r.barHelpers.drawGoalLine({barXPosition:Q.barXPosition,barYPosition:Q.barYPosition,goalX:Q.goalX,goalY:Q.goalY,barHeight:R,barWidth:V});K&&Y.add(K),Z>0&&P.push(A+V/2),M.push(S),Q.pathTo.forEach(function(ae,ge){var Ce=!r.isBoxPlot&&r.candlestickOptions.wick.useFillColor?Q.color[ge]:a.globals.stroke.colors[m],oe=u.fillPath({seriesNumber:T,dataPointIndex:Z,color:Q.color[ge],value:i[m][Z]});r.renderSeries({realIndex:T,pathFill:oe,lineFill:Ce,j:Z,i:m,pathFrom:Q.pathFrom,pathTo:ae,strokeWidth:G,elSeries:L,x:A,y:S,series:i,columnGroupIndex:I,barHeight:R,barWidth:V,elDataLabelsWrap:U,elGoalsMarkers:Y,visibleSeries:r.visibleI,type:a.config.chart.type})})},X=0;X<a.globals.dataPoints;X++)z(X);a.globals.seriesXvalues[T]=P,a.globals.seriesYvalues[T]=M,h.add(L)},p=0;p<i.length;p++)f(p);return h}},{key:"drawVerticalBoxPaths",value:function(i){var s=i.indexes,o=i.x;i.y;var r=i.xDivision,a=i.barWidth,l=i.zeroH,c=i.strokeWidth,u=this.w,d=new Ne(this.ctx),h=s.i,f=s.j,p=u.config.plotOptions.candlestick.colors,m=this.boxOptions.colors,b=s.realIndex,w=function(U){return Array.isArray(U)?U[b]:U},k=w(p.upward),C=w(p.downward),A=this.yRatio[s.translationsIndex],S=this.getOHLCValue(b,f),M=l,P=l,T=S.o<S.c?[k]:[C];this.isBoxPlot&&(T=[w(m.lower),w(m.upper)]);var I=Math.min(S.o,S.c),L=Math.max(S.o,S.c),R=S.m;u.globals.isXNumeric&&(o=(u.globals.seriesX[b][f]-u.globals.minX)/this.xRatio-a/2);var V=o+a*this.visibleI;this.series[h][f]===void 0||this.series[h][f]===null?(I=l,L=l):(I=l-I/A,L=l-L/A,M=l-S.h/A,P=l-S.l/A,R=l-S.m/A);var H=d.move(V,l),F=d.move(V+a/2,I);return u.globals.previousPaths.length>0&&(F=this.getPreviousPath(b,f,!0)),H=this.isBoxPlot?[d.move(V,I)+d.line(V+a/2,I)+d.line(V+a/2,M)+d.line(V+a/4,M)+d.line(V+a-a/4,M)+d.line(V+a/2,M)+d.line(V+a/2,I)+d.line(V+a,I)+d.line(V+a,R)+d.line(V,R)+d.line(V,I+c/2),d.move(V,R)+d.line(V+a,R)+d.line(V+a,L)+d.line(V+a/2,L)+d.line(V+a/2,P)+d.line(V+a-a/4,P)+d.line(V+a/4,P)+d.line(V+a/2,P)+d.line(V+a/2,L)+d.line(V,L)+d.line(V,R)+"z"]:[d.move(V,L)+d.line(V+a/2,L)+d.line(V+a/2,M)+d.line(V+a/2,L)+d.line(V+a,L)+d.line(V+a,I)+d.line(V+a/2,I)+d.line(V+a/2,P)+d.line(V+a/2,I)+d.line(V,I)+d.line(V,L-c/2)],F+=d.move(V,I),u.globals.isXNumeric||(o+=r),{pathTo:H,pathFrom:F,x:o,y:L,goalY:this.barHelpers.getGoalValues("y",null,l,h,f,s.translationsIndex),barXPosition:V,color:T}}},{key:"drawHorizontalBoxPaths",value:function(i){var s=i.indexes;i.x;var o=i.y,r=i.yDivision,a=i.barHeight,l=i.zeroW,c=i.strokeWidth,u=this.w,d=new Ne(this.ctx),h=s.i,f=s.j,p=this.boxOptions.colors.lower;this.isBoxPlot&&(p=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var m=this.invertedYRatio,b=s.realIndex,w=this.getOHLCValue(b,f),k=l,C=l,A=Math.min(w.o,w.c),S=Math.max(w.o,w.c),M=w.m;u.globals.isXNumeric&&(o=(u.globals.seriesX[b][f]-u.globals.minX)/this.invertedXRatio-a/2);var P=o+a*this.visibleI;this.series[h][f]===void 0||this.series[h][f]===null?(A=l,S=l):(A=l+A/m,S=l+S/m,k=l+w.h/m,C=l+w.l/m,M=l+w.m/m);var T=d.move(l,P),I=d.move(A,P+a/2);return u.globals.previousPaths.length>0&&(I=this.getPreviousPath(b,f,!0)),T=[d.move(A,P)+d.line(A,P+a/2)+d.line(k,P+a/2)+d.line(k,P+a/2-a/4)+d.line(k,P+a/2+a/4)+d.line(k,P+a/2)+d.line(A,P+a/2)+d.line(A,P+a)+d.line(M,P+a)+d.line(M,P)+d.line(A+c/2,P),d.move(M,P)+d.line(M,P+a)+d.line(S,P+a)+d.line(S,P+a/2)+d.line(C,P+a/2)+d.line(C,P+a-a/4)+d.line(C,P+a/4)+d.line(C,P+a/2)+d.line(S,P+a/2)+d.line(S,P)+d.line(M,P)+"z"],I+=d.move(A,P),u.globals.isXNumeric||(o+=r),{pathTo:T,pathFrom:I,x:S,y:o,goalX:this.barHelpers.getGoalValues("x",l,null,h,f),barYPosition:P,color:p}}},{key:"getOHLCValue",value:function(i,s){var o=this.w,r=new ys(this.ctx,o),a=r.getLogValAtSeriesIndex(o.globals.seriesCandleH[i][s],i),l=r.getLogValAtSeriesIndex(o.globals.seriesCandleO[i][s],i),c=r.getLogValAtSeriesIndex(o.globals.seriesCandleM[i][s],i),u=r.getLogValAtSeriesIndex(o.globals.seriesCandleC[i][s],i),d=r.getLogValAtSeriesIndex(o.globals.seriesCandleL[i][s],i);return{o:this.isBoxPlot?a:l,h:this.isBoxPlot?l:a,m:c,l:this.isBoxPlot?u:d,c:this.isBoxPlot?d:u}}}]),n}(),Tj=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"checkColorRange",value:function(){var e=this.w,n=!1,i=e.config.plotOptions[e.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map(function(s,o){s.from<=0&&(n=!0)}),n}},{key:"getShadeColor",value:function(e,n,i,s){var o=this.w,r=1,a=o.config.plotOptions[e].shadeIntensity,l=this.determineColor(e,n,i);o.globals.hasNegs||s?r=o.config.plotOptions[e].reverseNegativeShade?l.percent<0?l.percent/100*(1.25*a):(1-l.percent/100)*(1.25*a):l.percent<=0?1-(1+l.percent/100)*a:(1-l.percent/100)*a:(r=1-l.percent/100,e==="treemap"&&(r=(1-l.percent/100)*(1.25*a)));var c=l.color,u=new he;if(o.config.plotOptions[e].enableShades)if(this.w.config.theme.mode==="dark"){var d=u.shadeColor(-1*r,l.color);c=he.hexToRgba(he.isColorHex(d)?d:he.rgb2hex(d),o.config.fill.opacity)}else{var h=u.shadeColor(r,l.color);c=he.hexToRgba(he.isColorHex(h)?h:he.rgb2hex(h),o.config.fill.opacity)}return{color:c,colorProps:l}}},{key:"determineColor",value:function(e,n,i){var s=this.w,o=s.globals.series[n][i],r=s.config.plotOptions[e],a=r.colorScale.inverse?i:n;r.distributed&&s.config.chart.type==="treemap"&&(a=i);var l=s.globals.colors[a],c=null,u=Math.min.apply(Math,Ns(s.globals.series[n])),d=Math.max.apply(Math,Ns(s.globals.series[n]));r.distributed||e!=="heatmap"||(u=s.globals.minY,d=s.globals.maxY),r.colorScale.min!==void 0&&(u=r.colorScale.min<s.globals.minY?r.colorScale.min:s.globals.minY,d=r.colorScale.max>s.globals.maxY?r.colorScale.max:s.globals.maxY);var h=Math.abs(d)+Math.abs(u),f=100*o/(h===0?h-1e-6:h);return r.colorScale.ranges.length>0&&r.colorScale.ranges.map(function(p,m){if(o>=p.from&&o<=p.to){l=p.color,c=p.foreColor?p.foreColor:null,u=p.from,d=p.to;var b=Math.abs(d)+Math.abs(u);f=100*o/(b===0?b-1e-6:b)}}),{color:l,foreColor:c,percent:f}}},{key:"calculateDataLabels",value:function(e){var n=e.text,i=e.x,s=e.y,o=e.i,r=e.j,a=e.colorProps,l=e.fontSize,c=this.w.config.dataLabels,u=new Ne(this.ctx),d=new np(this.ctx),h=null;if(c.enabled){h=u.group({class:"apexcharts-data-labels"});var f=c.offsetX,p=c.offsetY,m=i+f,b=s+parseFloat(c.style.fontSize)/3+p;d.plotDataLabelsText({x:m,y:b,text:n,i:o,j:r,color:a.foreColor,parent:h,fontSize:l,dataLabelsConfig:c})}return h}},{key:"addListeners",value:function(e){var n=new Ne(this.ctx);e.node.addEventListener("mouseenter",n.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",n.pathMouseLeave.bind(this,e)),e.node.addEventListener("mousedown",n.pathMouseDown.bind(this,e))}}]),t}(),t2t=function(){function t(e,n){lt(this,t),this.ctx=e,this.w=e.w,this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new Tj(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return ct(t,[{key:"draw",value:function(e){var n=this.w,i=new Ne(this.ctx),s=i.group({class:"apexcharts-heatmap"});s.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")"));var o=n.globals.gridWidth/n.globals.dataPoints,r=n.globals.gridHeight/n.globals.series.length,a=0,l=!1;this.negRange=this.helpers.checkColorRange();var c=e.slice();n.config.yaxis[0].reversed&&(l=!0,c.reverse());for(var u=l?0:c.length-1;l?u<c.length:u>=0;l?u++:u--){var d=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:he.escapeString(n.globals.seriesNames[u]),rel:u+1,"data:realIndex":u});if(this.ctx.series.addCollapsedClassToSeries(d,u),n.config.chart.dropShadow.enabled){var h=n.config.chart.dropShadow;new di(this.ctx).dropShadow(d,h,u)}for(var f=0,p=n.config.plotOptions.heatmap.shadeIntensity,m=0,b=0;b<n.globals.dataPoints;b++)if(n.globals.seriesX.length&&!n.globals.allSeriesHasEqualX&&n.globals.minX+n.globals.minXDiff*b<n.globals.seriesX[u][m])f+=o;else{if(m>=c[u].length)break;var w=this.helpers.getShadeColor(n.config.chart.type,u,m,this.negRange),k=w.color,C=w.colorProps;n.config.fill.type==="image"&&(k=new Xr(this.ctx).fillPath({seriesNumber:u,dataPointIndex:m,opacity:n.globals.hasNegs?C.percent<0?1-(1+C.percent/100):p+C.percent/100:C.percent/100,patternID:he.randomId(),width:n.config.fill.image.width?n.config.fill.image.width:o,height:n.config.fill.image.height?n.config.fill.image.height:r}));var A=this.rectRadius,S=i.drawRect(f,a,o,r,A);if(S.attr({cx:f,cy:a}),S.node.classList.add("apexcharts-heatmap-rect"),d.add(S),S.attr({fill:k,i:u,index:u,j:m,val:e[u][m],"stroke-width":this.strokeWidth,stroke:n.config.plotOptions.heatmap.useFillColorAsStroke?k:n.globals.stroke.colors[0],color:k}),this.helpers.addListeners(S),n.config.chart.animations.enabled&&!n.globals.dataChanged){var M=1;n.globals.resized||(M=n.config.chart.animations.speed),this.animateHeatMap(S,f,a,o,r,M)}if(n.globals.dataChanged){var P=1;if(this.dynamicAnim.enabled&&n.globals.shouldAnimate){P=this.dynamicAnim.speed;var T=n.globals.previousPaths[u]&&n.globals.previousPaths[u][m]&&n.globals.previousPaths[u][m].color;T||(T="rgba(255, 255, 255, 0)"),this.animateHeatColor(S,he.isColorHex(T)?T:he.rgb2hex(T),he.isColorHex(k)?k:he.rgb2hex(k),P)}}var I=(0,n.config.dataLabels.formatter)(n.globals.series[u][m],{value:n.globals.series[u][m],seriesIndex:u,dataPointIndex:m,w:n}),L=this.helpers.calculateDataLabels({text:I,x:f+o/2,y:a+r/2,i:u,j:m,colorProps:C,series:c});L!==null&&d.add(L),f+=o,m++}a+=r,s.add(d)}var R=n.globals.yAxisScale[0].result.slice();return n.config.yaxis[0].reversed?R.unshift(""):R.push(""),n.globals.yAxisScale[0].result=R,s}},{key:"animateHeatMap",value:function(e,n,i,s,o,r){var a=new Dp(this.ctx);a.animateRect(e,{x:n+s/2,y:i+o/2,width:0,height:0},{x:n,y:i,width:s,height:o},r,function(){a.animationCompleted(e)})}},{key:"animateHeatColor",value:function(e,n,i,s){e.attr({fill:n}).animate(s).attr({fill:i})}}]),t}(),Pj=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"drawYAxisTexts",value:function(e,n,i,s){var o=this.w,r=o.config.yaxis[0],a=o.globals.yLabelFormatters[0];return new Ne(this.ctx).drawText({x:e+r.labels.offsetX,y:n+r.labels.offsetY,text:a(s,i),textAnchor:"middle",fontSize:r.labels.style.fontSize,fontFamily:r.labels.style.fontFamily,foreColor:Array.isArray(r.labels.style.colors)?r.labels.style.colors[i]:r.labels.style.colors})}}]),t}(),Ij=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=n.globals.stroke.colors!==void 0?n.globals.stroke.colors:n.globals.colors,this.defaultSize=Math.min(n.globals.gridWidth,n.globals.gridHeight),this.centerY=this.defaultSize/2,this.centerX=n.globals.gridWidth/2,n.config.chart.type==="radialBar"?this.fullAngle=360:this.fullAngle=Math.abs(n.config.plotOptions.pie.endAngle-n.config.plotOptions.pie.startAngle),this.initialAngle=n.config.plotOptions.pie.startAngle%this.fullAngle,n.globals.radialSize=this.defaultSize/2.05-n.config.stroke.width-(n.config.chart.sparkline.enabled?0:n.config.chart.dropShadow.blur),this.donutSize=n.globals.radialSize*parseInt(n.config.plotOptions.pie.donut.size,10)/100;var i=n.config.plotOptions.pie.customScale,s=n.globals.gridWidth/2,o=n.globals.gridHeight/2;this.translateX=s-s*i,this.translateY=o-o*i,this.dataLabelsGroup=new Ne(this.ctx).group({class:"apexcharts-datalabels-group",transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(i,")")}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}return ct(t,[{key:"draw",value:function(e){var n=this,i=this.w,s=new Ne(this.ctx),o=s.group({class:"apexcharts-pie"});if(i.globals.noData)return o;for(var r=0,a=0;a<e.length;a++)r+=he.negToZero(e[a]);var l=[],c=s.group();r===0&&(r=1e-5),e.forEach(function(C){n.maxY=Math.max(n.maxY,C)}),i.config.yaxis[0].max&&(this.maxY=i.config.yaxis[0].max),i.config.grid.position==="back"&&this.chartType==="polarArea"&&this.drawPolarElements(o);for(var u=0;u<e.length;u++){var d=this.fullAngle*he.negToZero(e[u])/r;l.push(d),this.chartType==="polarArea"?(l[u]=this.fullAngle/e.length,this.sliceSizes.push(i.globals.radialSize*e[u]/this.maxY)):this.sliceSizes.push(i.globals.radialSize)}if(i.globals.dataChanged){for(var h,f=0,p=0;p<i.globals.previousPaths.length;p++)f+=he.negToZero(i.globals.previousPaths[p]);for(var m=0;m<i.globals.previousPaths.length;m++)h=this.fullAngle*he.negToZero(i.globals.previousPaths[m])/f,this.prevSectorAngleArr.push(h)}if(this.donutSize<0&&(this.donutSize=0),this.chartType==="donut"){var b=s.drawCircle(this.donutSize);b.attr({cx:this.centerX,cy:this.centerY,fill:i.config.plotOptions.pie.donut.background?i.config.plotOptions.pie.donut.background:"transparent"}),c.add(b)}var w=this.drawArcs(l,e);if(this.sliceLabels.forEach(function(C){w.add(C)}),c.attr({transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(i.config.plotOptions.pie.customScale,")")}),c.add(w),o.add(c),this.donutDataLabels.show){var k=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});o.add(k)}return i.config.grid.position==="front"&&this.chartType==="polarArea"&&this.drawPolarElements(o),o}},{key:"drawArcs",value:function(e,n){var i=this.w,s=new di(this.ctx),o=new Ne(this.ctx),r=new Xr(this.ctx),a=o.group({class:"apexcharts-slices"}),l=this.initialAngle,c=this.initialAngle,u=this.initialAngle,d=this.initialAngle;this.strokeWidth=i.config.stroke.show?i.config.stroke.width:0;for(var h=0;h<e.length;h++){var f=o.group({class:"apexcharts-series apexcharts-pie-series",seriesName:he.escapeString(i.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});a.add(f),c=d,u=(l=u)+e[h],d=c+this.prevSectorAngleArr[h];var p=u<l?this.fullAngle+u-l:u-l,m=r.fillPath({seriesNumber:h,size:this.sliceSizes[h],value:n[h]}),b=this.getChangedPath(c,d),w=o.drawPath({d:b,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[h]:this.lineColorArr,strokeWidth:0,fill:m,fillOpacity:i.config.fill.opacity,classes:"apexcharts-pie-area apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(h)});if(w.attr({index:0,j:h}),s.setSelectionFilter(w,0,h),i.config.chart.dropShadow.enabled){var k=i.config.chart.dropShadow;s.dropShadow(w,k,h)}this.addListeners(w,this.donutDataLabels),Ne.setAttrs(w.node,{"data:angle":p,"data:startAngle":l,"data:strokeWidth":this.strokeWidth,"data:value":n[h]});var C={x:0,y:0};this.chartType==="pie"||this.chartType==="polarArea"?C=he.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize/1.25+i.config.plotOptions.pie.dataLabels.offset,(l+p/2)%this.fullAngle):this.chartType==="donut"&&(C=he.polarToCartesian(this.centerX,this.centerY,(i.globals.radialSize+this.donutSize)/2+i.config.plotOptions.pie.dataLabels.offset,(l+p/2)%this.fullAngle)),f.add(w);var A=0;if(!this.initialAnim||i.globals.resized||i.globals.dataChanged?this.animBeginArr.push(0):((A=p/this.fullAngle*i.config.chart.animations.speed)===0&&(A=1),this.animDur=A+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&i.globals.dataChanged?this.animatePaths(w,{size:this.sliceSizes[h],endAngle:u,startAngle:l,prevStartAngle:c,prevEndAngle:d,animateStartingPos:!0,i:h,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:i.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(w,{size:this.sliceSizes[h],endAngle:u,startAngle:l,i:h,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:A}),i.config.plotOptions.pie.expandOnClick&&this.chartType!=="polarArea"&&w.node.addEventListener("mouseup",this.pieClicked.bind(this,h)),i.globals.selectedDataPoints[0]!==void 0&&i.globals.selectedDataPoints[0].indexOf(h)>-1&&this.pieClicked(h),i.config.dataLabels.enabled){var S=C.x,M=C.y,P=100*p/this.fullAngle+"%";if(p!==0&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[h]){var T=i.config.dataLabels.formatter;T!==void 0&&(P=T(i.globals.seriesPercent[h][0],{seriesIndex:h,w:i}));var I=i.globals.dataLabels.style.colors[h],L=o.group({class:"apexcharts-datalabels"}),R=o.drawText({x:S,y:M,text:P,textAnchor:"middle",fontSize:i.config.dataLabels.style.fontSize,fontFamily:i.config.dataLabels.style.fontFamily,fontWeight:i.config.dataLabels.style.fontWeight,foreColor:I});if(L.add(R),i.config.dataLabels.dropShadow.enabled){var V=i.config.dataLabels.dropShadow;s.dropShadow(R,V)}R.node.classList.add("apexcharts-pie-label"),i.config.chart.animations.animate&&i.globals.resized===!1&&(R.node.classList.add("apexcharts-pie-label-delay"),R.node.style.animationDelay=i.config.chart.animations.speed/940+"s"),this.sliceLabels.push(L)}}}return a}},{key:"addListeners",value:function(e,n){var i=new Ne(this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this,e)),e.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,e.node,n)),e.node.addEventListener("mousedown",i.pathMouseDown.bind(this,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,e.node,n)),e.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,e.node,n)))}},{key:"animatePaths",value:function(e,n){var i=this.w,s=n.endAngle<n.startAngle?this.fullAngle+n.endAngle-n.startAngle:n.endAngle-n.startAngle,o=s,r=n.startAngle,a=n.startAngle;n.prevStartAngle!==void 0&&n.prevEndAngle!==void 0&&(r=n.prevEndAngle,o=n.prevEndAngle<n.prevStartAngle?this.fullAngle+n.prevEndAngle-n.prevStartAngle:n.prevEndAngle-n.prevStartAngle),n.i===i.config.series.length-1&&(s+a>this.fullAngle?n.endAngle=n.endAngle-(s+a):s+a<this.fullAngle&&(n.endAngle=n.endAngle+(this.fullAngle-(s+a)))),s===this.fullAngle&&(s=this.fullAngle-.01),this.animateArc(e,r,a,s,o,n)}},{key:"animateArc",value:function(e,n,i,s,o,r){var a,l=this,c=this.w,u=new Dp(this.ctx),d=r.size;(isNaN(n)||isNaN(o))&&(n=i,o=s,r.dur=0);var h=s,f=i,p=n<i?this.fullAngle+n-i:n-i;c.globals.dataChanged&&r.shouldSetPrevPaths&&r.prevEndAngle&&(a=l.getPiePath({me:l,startAngle:r.prevStartAngle,angle:r.prevEndAngle<r.prevStartAngle?this.fullAngle+r.prevEndAngle-r.prevStartAngle:r.prevEndAngle-r.prevStartAngle,size:d}),e.attr({d:a})),r.dur!==0?e.animate(r.dur,r.animBeginArr[r.i]).after(function(){l.chartType!=="pie"&&l.chartType!=="donut"&&l.chartType!=="polarArea"||this.animate(c.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":l.strokeWidth}),r.i===c.config.series.length-1&&u.animationCompleted(e)}).during(function(m){h=p+(s-p)*m,r.animateStartingPos&&(h=o+(s-o)*m,f=n-o+(i-(n-o))*m),a=l.getPiePath({me:l,startAngle:f,angle:h,size:d}),e.node.setAttribute("data:pathOrig",a),e.attr({d:a})}):(a=l.getPiePath({me:l,startAngle:f,angle:s,size:d}),r.isTrack||(c.globals.animationEnded=!0),e.node.setAttribute("data:pathOrig",a),e.attr({d:a,"stroke-width":l.strokeWidth}))}},{key:"pieClicked",value:function(e){var n,i=this.w,s=this,o=s.sliceSizes[e]+(i.config.plotOptions.pie.expandOnClick?4:0),r=i.globals.dom.Paper.findOne(".apexcharts-".concat(s.chartType.toLowerCase(),"-slice-").concat(e));if(r.attr("data:pieClicked")!=="true"){var a=i.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(a,function(d){d.setAttribute("data:pieClicked","false");var h=d.getAttribute("data:pathOrig");h&&d.setAttribute("d",h)}),i.globals.capturedDataPointIndex=e,r.attr("data:pieClicked","true");var l=parseInt(r.attr("data:startAngle"),10),c=parseInt(r.attr("data:angle"),10);n=s.getPiePath({me:s,startAngle:l,angle:c,size:o}),c!==360&&r.plot(n)}else{r.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(r.node,this.donutDataLabels);var u=r.attr("data:pathOrig");r.attr({d:u})}}},{key:"getChangedPath",value:function(e,n){var i="";return this.dynamicAnim&&this.w.globals.dataChanged&&(i=this.getPiePath({me:this,startAngle:e,angle:n-e,size:this.size})),i}},{key:"getPiePath",value:function(e){var n,i=e.me,s=e.startAngle,o=e.angle,r=e.size,a=new Ne(this.ctx),l=s,c=Math.PI*(l-90)/180,u=o+s;Math.ceil(u)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(u=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(u)>this.fullAngle&&(u-=this.fullAngle);var d=Math.PI*(u-90)/180,h=i.centerX+r*Math.cos(c),f=i.centerY+r*Math.sin(c),p=i.centerX+r*Math.cos(d),m=i.centerY+r*Math.sin(d),b=he.polarToCartesian(i.centerX,i.centerY,i.donutSize,u),w=he.polarToCartesian(i.centerX,i.centerY,i.donutSize,l),k=o>180?1:0,C=["M",h,f,"A",r,r,0,k,1,p,m];return n=i.chartType==="donut"?[].concat(C,["L",b.x,b.y,"A",i.donutSize,i.donutSize,0,k,0,w.x,w.y,"L",h,f,"z"]).join(" "):i.chartType==="pie"||i.chartType==="polarArea"?[].concat(C,["L",i.centerX,i.centerY,"L",h,f]).join(" "):[].concat(C).join(" "),a.roundPathCorners(n,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(e){var n=this.w,i=new Sj(this.ctx),s=new Ne(this.ctx),o=new Pj(this.ctx),r=s.group(),a=s.group(),l=i.niceScale(0,Math.ceil(this.maxY),0),c=l.result.reverse(),u=l.result.length;this.maxY=l.niceMax;for(var d=n.globals.radialSize,h=d/(u-1),f=0;f<u-1;f++){var p=s.drawCircle(d);if(p.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":n.config.plotOptions.polarArea.rings.strokeWidth,stroke:n.config.plotOptions.polarArea.rings.strokeColor}),n.config.yaxis[0].show){var m=o.drawYAxisTexts(this.centerX,this.centerY-d+parseInt(n.config.yaxis[0].labels.style.fontSize,10)/2,f,c[f]);a.add(m)}r.add(p),d-=h}this.drawSpokes(e),e.add(r),e.add(a)}},{key:"renderInnerDataLabels",value:function(e,n,i){var s=this.w,o=new Ne(this.ctx),r=n.total.show;e.node.innerHTML="",e.node.style.opacity=i.opacity;var a,l,c=i.centerX,u=this.donutDataLabels.total.label?i.centerY:i.centerY-i.centerY/6;a=n.name.color===void 0?s.globals.colors[0]:n.name.color;var d=n.name.fontSize,h=n.name.fontFamily,f=n.name.fontWeight;l=n.value.color===void 0?s.config.chart.foreColor:n.value.color;var p=n.value.formatter,m="",b="";if(r?(a=n.total.color,d=n.total.fontSize,h=n.total.fontFamily,f=n.total.fontWeight,b=this.donutDataLabels.total.label?n.total.label:"",m=n.total.formatter(s)):s.globals.series.length===1&&(m=p(s.globals.series[0],s),b=s.globals.seriesNames[0]),b&&(b=n.name.formatter(b,n.total.show,s)),n.name.show){var w=o.drawText({x:c,y:u+parseFloat(n.name.offsetY),text:b,textAnchor:"middle",foreColor:a,fontSize:d,fontWeight:f,fontFamily:h});w.node.classList.add("apexcharts-datalabel-label"),e.add(w)}if(n.value.show){var k=n.name.show?parseFloat(n.value.offsetY)+16:n.value.offsetY,C=o.drawText({x:c,y:u+k,text:m,textAnchor:"middle",foreColor:l,fontWeight:n.value.fontWeight,fontSize:n.value.fontSize,fontFamily:n.value.fontFamily});C.node.classList.add("apexcharts-datalabel-value"),e.add(C)}return e}},{key:"printInnerLabels",value:function(e,n,i,s){var o,r=this.w;s?o=e.name.color===void 0?r.globals.colors[parseInt(s.parentNode.getAttribute("rel"),10)-1]:e.name.color:r.globals.series.length>1&&e.total.show&&(o=e.total.color);var a=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),l=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,e.value.formatter)(i,r),s||typeof e.total.formatter!="function"||(i=e.total.formatter(r));var c=n===e.total.label;n=this.donutDataLabels.total.label?e.name.formatter(n,c,r):"",a!==null&&(a.textContent=n),l!==null&&(l.textContent=i),a!==null&&(a.style.fill=o)}},{key:"printDataLabelsInner",value:function(e,n){var i=this.w,s=e.getAttribute("data:value"),o=i.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(n,o,s,e);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");r!==null&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(e){var n=this,i=this.w,s=new Ne(this.ctx),o=i.config.plotOptions.polarArea.spokes;if(o.strokeWidth!==0){for(var r=[],a=360/i.globals.series.length,l=0;l<i.globals.series.length;l++)r.push(he.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize,i.config.plotOptions.pie.startAngle+a*l));r.forEach(function(c,u){var d=s.drawLine(c.x,c.y,n.centerX,n.centerY,Array.isArray(o.connectorColors)?o.connectorColors[u]:o.connectorColors);e.add(d)})}}},{key:"revertDataLabelsInner",value:function(){var e=this.w;if(this.donutDataLabels.show){var n=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group"),i=this.renderInnerDataLabels(n,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});e.globals.dom.Paper.findOne(".apexcharts-radialbar, .apexcharts-pie").add(i)}}}]),t}(),n2t=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var n=this.w;this.graphics=new Ne(this.ctx),this.lineColorArr=n.globals.stroke.colors!==void 0?n.globals.stroke.colors:n.globals.colors,this.defaultSize=n.globals.svgHeight<n.globals.svgWidth?n.globals.gridHeight:n.globals.gridWidth,this.isLog=n.config.yaxis[0].logarithmic,this.logBase=n.config.yaxis[0].logBase,this.coreUtils=new ys(this.ctx),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,n.globals.maxY,0):n.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):n.globals.minY,this.polygons=n.config.plotOptions.radar.polygons,this.strokeWidth=n.config.stroke.show?n.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-n.config.chart.dropShadow.blur,n.config.xaxis.labels.show&&(this.size=this.size-n.globals.xAxisLabelsWidth/1.75),n.config.plotOptions.radar.size!==void 0&&(this.size=n.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.yaxisLabelsTextsPos=[]}return ct(t,[{key:"draw",value:function(e){var n=this,i=this.w,s=new Xr(this.ctx),o=[],r=new np(this.ctx);e.length&&(this.dataPointsLen=e[i.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;var a=i.globals.gridWidth/2,l=i.globals.gridHeight/2,c=a+i.config.plotOptions.radar.offsetX,u=l+i.config.plotOptions.radar.offsetY,d=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:"translate(".concat(c||0,", ").concat(u||0,")")}),h=[],f=null,p=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),e.forEach(function(b,w){var k=b.length===i.globals.dataPoints,C=n.graphics.group().attr({class:"apexcharts-series","data:longestSeries":k,seriesName:he.escapeString(i.globals.seriesNames[w]),rel:w+1,"data:realIndex":w});n.dataRadiusOfPercent[w]=[],n.dataRadius[w]=[],n.angleArr[w]=[],b.forEach(function(H,F){var U=Math.abs(n.maxValue-n.minValue);H-=n.minValue,n.isLog&&(H=n.coreUtils.getLogVal(n.logBase,H,0)),n.dataRadiusOfPercent[w][F]=H/U,n.dataRadius[w][F]=n.dataRadiusOfPercent[w][F]*n.size,n.angleArr[w][F]=F*n.disAngle}),h=n.getDataPointsPos(n.dataRadius[w],n.angleArr[w]);var A=n.createPaths(h,{x:0,y:0});f=n.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),p=n.graphics.group({class:"apexcharts-datalabels","data:realIndex":w}),i.globals.delayedElements.push({el:f.node,index:w});var S={i:w,realIndex:w,animationDelay:w,initialSpeed:i.config.chart.animations.speed,dataChangeSpeed:i.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:i.globals.stroke.colors[w],strokeLineCap:i.config.stroke.lineCap},M=null;i.globals.previousPaths.length>0&&(M=n.getPreviousPath(w));for(var P=0;P<A.linePathsTo.length;P++){var T=n.graphics.renderPaths(tt(tt({},S),{},{pathFrom:M===null?A.linePathsFrom[P]:M,pathTo:A.linePathsTo[P],strokeWidth:Array.isArray(n.strokeWidth)?n.strokeWidth[w]:n.strokeWidth,fill:"none",drawShadow:!1}));C.add(T);var I=s.fillPath({seriesNumber:w}),L=n.graphics.renderPaths(tt(tt({},S),{},{pathFrom:M===null?A.areaPathsFrom[P]:M,pathTo:A.areaPathsTo[P],strokeWidth:0,fill:I,drawShadow:!1}));if(i.config.chart.dropShadow.enabled){var R=new di(n.ctx),V=i.config.chart.dropShadow;R.dropShadow(L,Object.assign({},V,{noUserSpaceOnUse:!0}),w)}C.add(L)}b.forEach(function(H,F){var U=new Np(n.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:w,dataPointIndex:F}),Y=n.graphics.drawMarker(h[F].x,h[F].y,U);Y.attr("rel",F),Y.attr("j",F),Y.attr("index",w),Y.node.setAttribute("default-marker-size",U.pSize);var z=n.graphics.group({class:"apexcharts-series-markers"});z&&z.add(Y),f.add(z),C.add(f);var X=i.config.dataLabels;if(X.enabled){var Z=X.formatter(i.globals.series[w][F],{seriesIndex:w,dataPointIndex:F,w:i});r.plotDataLabelsText({x:h[F].x,y:h[F].y,text:Z,textAnchor:"middle",i:w,j:w,parent:p,offsetCorrection:!1,dataLabelsConfig:tt({},X)})}C.add(p)}),o.push(C)}),this.drawPolygons({parent:d}),i.config.xaxis.labels.show){var m=this.drawXAxisTexts();d.add(m)}return o.forEach(function(b){d.add(b)}),d.add(this.yaxisLabels),d}},{key:"drawPolygons",value:function(e){for(var n=this,i=this.w,s=e.parent,o=new Pj(this.ctx),r=i.globals.yAxisScale[0].result.reverse(),a=r.length,l=[],c=this.size/(a-1),u=0;u<a;u++)l[u]=c*u;l.reverse();var d=[],h=[];l.forEach(function(f,p){var m=he.getPolygonPos(f,n.dataPointsLen),b="";m.forEach(function(w,k){if(p===0){var C=n.graphics.drawLine(w.x,w.y,0,0,Array.isArray(n.polygons.connectorColors)?n.polygons.connectorColors[k]:n.polygons.connectorColors);h.push(C)}k===0&&n.yaxisLabelsTextsPos.push({x:w.x,y:w.y}),b+=w.x+","+w.y+" "}),d.push(b)}),d.forEach(function(f,p){var m=n.polygons.strokeColors,b=n.polygons.strokeWidth,w=n.graphics.drawPolygon(f,Array.isArray(m)?m[p]:m,Array.isArray(b)?b[p]:b,i.globals.radarPolygons.fill.colors[p]);s.add(w)}),h.forEach(function(f){s.add(f)}),i.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach(function(f,p){var m=o.drawYAxisTexts(f.x,f.y,p,r[p]);n.yaxisLabels.add(m)})}},{key:"drawXAxisTexts",value:function(){var e=this,n=this.w,i=n.config.xaxis.labels,s=this.graphics.group({class:"apexcharts-xaxis"}),o=he.getPolygonPos(this.size,this.dataPointsLen);return n.globals.labels.forEach(function(r,a){var l=n.config.xaxis.labels.formatter,c=new np(e.ctx);if(o[a]){var u=e.getTextPos(o[a],e.size),d=l(r,{seriesIndex:-1,dataPointIndex:a,w:n});c.plotDataLabelsText({x:u.newX,y:u.newY,text:d,textAnchor:u.textAnchor,i:a,j:a,parent:s,className:"apexcharts-xaxis-label",color:Array.isArray(i.style.colors)&&i.style.colors[a]?i.style.colors[a]:"#a8a8a8",dataLabelsConfig:tt({textAnchor:u.textAnchor,dropShadow:{enabled:!1}},i),offsetCorrection:!1}).on("click",function(h){if(typeof n.config.chart.events.xAxisLabelClick=="function"){var f=Object.assign({},n,{labelIndex:a});n.config.chart.events.xAxisLabelClick(h,e.ctx,f)}})}}),s}},{key:"createPaths",value:function(e,n){var i=this,s=[],o=[],r=[],a=[];if(e.length){o=[this.graphics.move(n.x,n.y)],a=[this.graphics.move(n.x,n.y)];var l=this.graphics.move(e[0].x,e[0].y),c=this.graphics.move(e[0].x,e[0].y);e.forEach(function(u,d){l+=i.graphics.line(u.x,u.y),c+=i.graphics.line(u.x,u.y),d===e.length-1&&(l+="Z",c+="Z")}),s.push(l),r.push(c)}return{linePathsFrom:o,linePathsTo:s,areaPathsFrom:a,areaPathsTo:r}}},{key:"getTextPos",value:function(e,n){var i="middle",s=e.x,o=e.y;return Math.abs(e.x)>=10?e.x>0?(i="start",s+=10):e.x<0&&(i="end",s-=10):i="middle",Math.abs(e.y)>=n-10&&(e.y<0?o-=10:e.y>0&&(o+=10)),{textAnchor:i,newX:s,newY:o}}},{key:"getPreviousPath",value:function(e){for(var n=this.w,i=null,s=0;s<n.globals.previousPaths.length;s++){var o=n.globals.previousPaths[s];o.paths.length>0&&parseInt(o.realIndex,10)===parseInt(e,10)&&n.globals.previousPaths[s].paths[0]!==void 0&&(i=n.globals.previousPaths[s].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.dataPointsLen;e=e||[],n=n||[];for(var s=[],o=0;o<i;o++){var r={};r.x=e[o]*Math.sin(n[o]),r.y=-e[o]*Math.cos(n[o]),s.push(r)}return s}}]),t}(),s2t=function(t){kv(n,Ij);var e=wv(n);function n(i){var s;lt(this,n),(s=e.call(this,i)).ctx=i,s.w=i.w,s.animBeginArr=[0],s.animDur=0;var o=s.w;return s.startAngle=o.config.plotOptions.radialBar.startAngle,s.endAngle=o.config.plotOptions.radialBar.endAngle,s.totalAngle=Math.abs(o.config.plotOptions.radialBar.endAngle-o.config.plotOptions.radialBar.startAngle),s.trackStartAngle=o.config.plotOptions.radialBar.track.startAngle,s.trackEndAngle=o.config.plotOptions.radialBar.track.endAngle,s.barLabels=s.w.config.plotOptions.radialBar.barLabels,s.donutDataLabels=s.w.config.plotOptions.radialBar.dataLabels,s.radialDataLabels=s.donutDataLabels,s.trackStartAngle||(s.trackStartAngle=s.startAngle),s.trackEndAngle||(s.trackEndAngle=s.endAngle),s.endAngle===360&&(s.endAngle=359.99),s.margin=parseInt(o.config.plotOptions.radialBar.track.margin,10),s.onBarLabelClick=s.onBarLabelClick.bind(jU(s)),s}return ct(n,[{key:"draw",value:function(i){var s=this.w,o=new Ne(this.ctx),r=o.group({class:"apexcharts-radialbar"});if(s.globals.noData)return r;var a=o.group(),l=this.defaultSize/2,c=s.globals.gridWidth/2,u=this.defaultSize/2.05;s.config.chart.sparkline.enabled||(u=u-s.config.stroke.width-s.config.chart.dropShadow.blur);var d=s.globals.fill.colors;if(s.config.plotOptions.radialBar.track.show){var h=this.drawTracks({size:u,centerX:c,centerY:l,colorArr:d,series:i});a.add(h)}var f=this.drawArcs({size:u,centerX:c,centerY:l,colorArr:d,series:i}),p=360;s.config.plotOptions.radialBar.startAngle<0&&(p=this.totalAngle);var m=(360-p)/360;if(s.globals.radialSize=u-u*m,this.radialDataLabels.value.show){var b=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);s.globals.radialSize+=b*m}return a.add(f.g),s.config.plotOptions.radialBar.hollow.position==="front"&&(f.g.add(f.elHollow),f.dataLabels&&f.g.add(f.dataLabels)),r.add(a),r}},{key:"drawTracks",value:function(i){var s=this.w,o=new Ne(this.ctx),r=o.group({class:"apexcharts-tracks"}),a=new di(this.ctx),l=new Xr(this.ctx),c=this.getStrokeWidth(i);i.size=i.size-c/2;for(var u=0;u<i.series.length;u++){var d=o.group({class:"apexcharts-radialbar-track apexcharts-track"});r.add(d),d.attr({rel:u+1}),i.size=i.size-c-this.margin;var h=s.config.plotOptions.radialBar.track,f=l.fillPath({seriesNumber:0,size:i.size,fillColors:Array.isArray(h.background)?h.background[u]:h.background,solid:!0}),p=this.trackStartAngle,m=this.trackEndAngle;Math.abs(m)+Math.abs(p)>=360&&(m=360-Math.abs(this.startAngle)-.1);var b=o.drawPath({d:"",stroke:f,strokeWidth:c*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){var w=h.dropShadow;a.dropShadow(b,w)}d.add(b),b.attr("id","apexcharts-radialbarTrack-"+u),this.animatePaths(b,{centerX:i.centerX,centerY:i.centerY,endAngle:m,startAngle:p,size:i.size,i:u,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return r}},{key:"drawArcs",value:function(i){var s=this.w,o=new Ne(this.ctx),r=new Xr(this.ctx),a=new di(this.ctx),l=o.group(),c=this.getStrokeWidth(i);i.size=i.size-c/2;var u=s.config.plotOptions.radialBar.hollow.background,d=i.size-c*i.series.length-this.margin*i.series.length-c*parseInt(s.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=d-s.config.plotOptions.radialBar.hollow.margin;s.config.plotOptions.radialBar.hollow.image!==void 0&&(u=this.drawHollowImage(i,l,d,u));var f=this.drawHollow({size:h,centerX:i.centerX,centerY:i.centerY,fill:u||"transparent"});if(s.config.plotOptions.radialBar.hollow.dropShadow.enabled){var p=s.config.plotOptions.radialBar.hollow.dropShadow;a.dropShadow(f,p)}var m=1;!this.radialDataLabels.total.show&&s.globals.series.length>1&&(m=0);var b=null;if(this.radialDataLabels.show){var w=s.globals.dom.Paper.findOne(".apexcharts-datalabels-group");b=this.renderInnerDataLabels(w,this.radialDataLabels,{hollowSize:d,centerX:i.centerX,centerY:i.centerY,opacity:m})}s.config.plotOptions.radialBar.hollow.position==="back"&&(l.add(f),b&&l.add(b));var k=!1;s.config.plotOptions.radialBar.inverseOrder&&(k=!0);for(var C=k?i.series.length-1:0;k?C>=0:C<i.series.length;k?C--:C++){var A=o.group({class:"apexcharts-series apexcharts-radial-series",seriesName:he.escapeString(s.globals.seriesNames[C])});l.add(A),A.attr({rel:C+1,"data:realIndex":C}),this.ctx.series.addCollapsedClassToSeries(A,C),i.size=i.size-c-this.margin;var S=r.fillPath({seriesNumber:C,size:i.size,value:i.series[C]}),M=this.startAngle,P=void 0,T=he.negToZero(i.series[C]>100?100:i.series[C])/100,I=Math.round(this.totalAngle*T)+this.startAngle,L=void 0;s.globals.dataChanged&&(P=this.startAngle,L=Math.round(this.totalAngle*he.negToZero(s.globals.previousPaths[C])/100)+P),Math.abs(I)+Math.abs(M)>360&&(I-=.01),Math.abs(L)+Math.abs(P)>360&&(L-=.01);var R=I-M,V=Array.isArray(s.config.stroke.dashArray)?s.config.stroke.dashArray[C]:s.config.stroke.dashArray,H=o.drawPath({d:"",stroke:S,strokeWidth:c,fill:"none",fillOpacity:s.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+C,strokeDashArray:V});if(Ne.setAttrs(H.node,{"data:angle":R,"data:value":i.series[C]}),s.config.chart.dropShadow.enabled){var F=s.config.chart.dropShadow;a.dropShadow(H,F,C)}if(a.setSelectionFilter(H,0,C),this.addListeners(H,this.radialDataLabels),A.add(H),H.attr({index:0,j:C}),this.barLabels.enabled){var U=he.polarToCartesian(i.centerX,i.centerY,i.size,M),Y=this.barLabels.formatter(s.globals.seriesNames[C],{seriesIndex:C,w:s}),z=["apexcharts-radialbar-label"];this.barLabels.onClick||z.push("apexcharts-no-click");var X=this.barLabels.useSeriesColors?s.globals.colors[C]:s.config.chart.foreColor;X||(X=s.config.chart.foreColor);var Z=U.x+this.barLabels.offsetX,G=U.y+this.barLabels.offsetY,Q=o.drawText({x:Z,y:G,text:Y,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:X,cssClass:z.join(" ")});Q.on("click",this.onBarLabelClick),Q.attr({rel:C+1}),M!==0&&Q.attr({"transform-origin":"".concat(Z," ").concat(G),transform:"rotate(".concat(M," 0 0)")}),A.add(Q)}var ne=0;!this.initialAnim||s.globals.resized||s.globals.dataChanged||(ne=s.config.chart.animations.speed),s.globals.dataChanged&&(ne=s.config.chart.animations.dynamicAnimation.speed),this.animDur=ne/(1.2*i.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(H,{centerX:i.centerX,centerY:i.centerY,endAngle:I,startAngle:M,prevEndAngle:L,prevStartAngle:P,size:i.size,i:C,totalItems:2,animBeginArr:this.animBeginArr,dur:ne,shouldSetPrevPaths:!0})}return{g:l,elHollow:f,dataLabels:b}}},{key:"drawHollow",value:function(i){var s=new Ne(this.ctx).drawCircle(2*i.size);return s.attr({class:"apexcharts-radialbar-hollow",cx:i.centerX,cy:i.centerY,r:i.size,fill:i.fill}),s}},{key:"drawHollowImage",value:function(i,s,o,r){var a=this.w,l=new Xr(this.ctx),c=he.randomId(),u=a.config.plotOptions.radialBar.hollow.image;if(a.config.plotOptions.radialBar.hollow.imageClipped)l.clippedImgArea({width:o,height:o,image:u,patternID:"pattern".concat(a.globals.cuid).concat(c)}),r="url(#pattern".concat(a.globals.cuid).concat(c,")");else{var d=a.config.plotOptions.radialBar.hollow.imageWidth,h=a.config.plotOptions.radialBar.hollow.imageHeight;if(d===void 0&&h===void 0){var f=a.globals.dom.Paper.image(u,function(m){this.move(i.centerX-m.width/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-m.height/2+a.config.plotOptions.radialBar.hollow.imageOffsetY)});s.add(f)}else{var p=a.globals.dom.Paper.image(u,function(m){this.move(i.centerX-d/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-h/2+a.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(d,h)});s.add(p)}}return r}},{key:"getStrokeWidth",value:function(i){var s=this.w;return i.size*(100-parseInt(s.config.plotOptions.radialBar.hollow.size,10))/100/(i.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(i){var s=parseInt(i.target.getAttribute("rel"),10)-1,o=this.barLabels.onClick,r=this.w;o&&o(r.globals.seriesNames[s],{w:r,seriesIndex:s})}}]),n}(),i2t=function(t){kv(n,sp);var e=wv(n);function n(){return lt(this,n),e.apply(this,arguments)}return ct(n,[{key:"draw",value:function(i,s){var o=this.w,r=new Ne(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=i,this.seriesRangeStart=o.globals.seriesRangeStart,this.seriesRangeEnd=o.globals.seriesRangeEnd,this.barHelpers.initVariables(i);for(var a=r.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),l=0;l<i.length;l++){var c,u,d,h,f=void 0,p=void 0,m=o.globals.comboCharts?s[l]:l,b=this.barHelpers.getGroupIndex(m).columnGroupIndex,w=r.group({class:"apexcharts-series",seriesName:he.escapeString(o.globals.seriesNames[m]),rel:l+1,"data:realIndex":m});this.ctx.series.addCollapsedClassToSeries(w,m),i[l].length>0&&(this.visibleI=this.visibleI+1);var k=0,C=0,A=0;this.yRatio.length>1&&(this.yaxisIndex=o.globals.seriesYAxisReverseMap[m][0],A=m);var S=this.barHelpers.initialPositions();p=S.y,h=S.zeroW,f=S.x,C=S.barWidth,k=S.barHeight,c=S.xDivision,u=S.yDivision,d=S.zeroH;for(var M=r.group({class:"apexcharts-datalabels","data:realIndex":m}),P=r.group({class:"apexcharts-rangebar-goals-markers"}),T=0;T<o.globals.dataPoints;T++){var I=this.barHelpers.getStrokeWidth(l,T,m),L=this.seriesRangeStart[l][T],R=this.seriesRangeEnd[l][T],V=null,H=null,F=null,U={x:f,y:p,strokeWidth:I,elSeries:w},Y=this.seriesLen;if(o.config.plotOptions.bar.rangeBarGroupRows&&(Y=1),o.config.series[l].data[T]===void 0)break;if(this.isHorizontal){F=p+k*this.visibleI;var z=(u-k*Y)/2;if(o.config.series[l].data[T].x){var X=this.detectOverlappingBars({i:l,j:T,barYPosition:F,srty:z,barHeight:k,yDivision:u,initPositions:S});k=X.barHeight,F=X.barYPosition}C=(V=this.drawRangeBarPaths(tt({indexes:{i:l,j:T,realIndex:m},barHeight:k,barYPosition:F,zeroW:h,yDivision:u,y1:L,y2:R},U))).barWidth}else{o.globals.isXNumeric&&(f=(o.globals.seriesX[l][T]-o.globals.minX)/this.xRatio-C/2),H=f+C*this.visibleI;var Z=(c-C*Y)/2;if(o.config.series[l].data[T].x){var G=this.detectOverlappingBars({i:l,j:T,barXPosition:H,srtx:Z,barWidth:C,xDivision:c,initPositions:S});C=G.barWidth,H=G.barXPosition}k=(V=this.drawRangeColumnPaths(tt({indexes:{i:l,j:T,realIndex:m,translationsIndex:A},barWidth:C,barXPosition:H,zeroH:d,xDivision:c},U))).barHeight}var Q=this.barHelpers.drawGoalLine({barXPosition:V.barXPosition,barYPosition:F,goalX:V.goalX,goalY:V.goalY,barHeight:k,barWidth:C});Q&&P.add(Q),p=V.y,f=V.x;var ne=this.barHelpers.getPathFillColor(i,l,T,m);this.renderSeries({realIndex:m,pathFill:ne.color,lineFill:ne.useRangeColor?ne.color:o.globals.stroke.colors[m],j:T,i:l,x:f,y:p,y1:L,y2:R,pathFrom:V.pathFrom,pathTo:V.pathTo,strokeWidth:I,elSeries:w,series:i,barHeight:k,barWidth:C,barXPosition:H,barYPosition:F,columnGroupIndex:b,elDataLabelsWrap:M,elGoalsMarkers:P,visibleSeries:this.visibleI,type:"rangebar"})}a.add(w)}return a}},{key:"detectOverlappingBars",value:function(i){var s=i.i,o=i.j,r=i.barYPosition,a=i.barXPosition,l=i.srty,c=i.srtx,u=i.barHeight,d=i.barWidth,h=i.yDivision,f=i.xDivision,p=i.initPositions,m=this.w,b=[],w=m.config.series[s].data[o].rangeName,k=m.config.series[s].data[o].x,C=Array.isArray(k)?k.join(" "):k,A=m.globals.labels.map(function(M){return Array.isArray(M)?M.join(" "):M}).indexOf(C),S=m.globals.seriesRange[s].findIndex(function(M){return M.x===C&&M.overlaps.length>0});return this.isHorizontal?(r=m.config.plotOptions.bar.rangeBarGroupRows?l+h*A:l+u*this.visibleI+h*A,S>-1&&!m.config.plotOptions.bar.rangeBarOverlap&&(b=m.globals.seriesRange[s][S].overlaps).indexOf(w)>-1&&(r=(u=p.barHeight/b.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+u*(this.visibleI+b.indexOf(w))+h*A)):(A>-1&&!m.globals.timescaleLabels.length&&(a=m.config.plotOptions.bar.rangeBarGroupRows?c+f*A:c+d*this.visibleI+f*A),S>-1&&!m.config.plotOptions.bar.rangeBarOverlap&&(b=m.globals.seriesRange[s][S].overlaps).indexOf(w)>-1&&(a=(d=p.barWidth/b.length)*this.visibleI+f*(100-parseInt(this.barOptions.barWidth,10))/100/2+d*(this.visibleI+b.indexOf(w))+f*A)),{barYPosition:r,barXPosition:a,barHeight:u,barWidth:d}}},{key:"drawRangeColumnPaths",value:function(i){var s=i.indexes,o=i.x,r=i.xDivision,a=i.barWidth,l=i.barXPosition,c=i.zeroH,u=this.w,d=s.i,h=s.j,f=s.realIndex,p=s.translationsIndex,m=this.yRatio[p],b=this.getRangeValue(f,h),w=Math.min(b.start,b.end),k=Math.max(b.start,b.end);this.series[d][h]===void 0||this.series[d][h]===null?w=c:(w=c-w/m,k=c-k/m);var C=Math.abs(k-w),A=this.barHelpers.getColumnPaths({barXPosition:l,barWidth:a,y1:w,y2:k,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:f,i:f,j:h,w:u});if(u.globals.isXNumeric){var S=this.getBarXForNumericXAxis({x:o,j:h,realIndex:f,barWidth:a});o=S.x,l=S.barXPosition}else o+=r;return{pathTo:A.pathTo,pathFrom:A.pathFrom,barHeight:C,x:o,y:b.start<0&&b.end<0?w:k,goalY:this.barHelpers.getGoalValues("y",null,c,d,h,p),barXPosition:l}}},{key:"preventBarOverflow",value:function(i){var s=this.w;return i<0&&(i=0),i>s.globals.gridWidth&&(i=s.globals.gridWidth),i}},{key:"drawRangeBarPaths",value:function(i){var s=i.indexes,o=i.y,r=i.y1,a=i.y2,l=i.yDivision,c=i.barHeight,u=i.barYPosition,d=i.zeroW,h=this.w,f=s.realIndex,p=s.j,m=this.preventBarOverflow(d+r/this.invertedYRatio),b=this.preventBarOverflow(d+a/this.invertedYRatio),w=this.getRangeValue(f,p),k=Math.abs(b-m),C=this.barHelpers.getBarpaths({barYPosition:u,barHeight:c,x1:m,x2:b,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:f,realIndex:f,j:p,w:h});return h.globals.isXNumeric||(o+=l),{pathTo:C.pathTo,pathFrom:C.pathFrom,barWidth:k,x:w.start<0&&w.end<0?m:b,goalX:this.barHelpers.getGoalValues("x",d,null,f,p),y:o}}},{key:"getRangeValue",value:function(i,s){var o=this.w;return{start:o.globals.seriesRangeStart[i][s],end:o.globals.seriesRangeEnd[i][s]}}}]),n}(),o2t=function(){function t(e){lt(this,t),this.w=e.w,this.lineCtx=e}return ct(t,[{key:"sameValueSeriesFix",value:function(e,n){var i=this.w;if((i.config.fill.type==="gradient"||i.config.fill.type[e]==="gradient")&&new ys(this.lineCtx.ctx,i).seriesHaveSameValues(e)){var s=n[e].slice();s[s.length-1]=s[s.length-1]+1e-6,n[e]=s}return n}},{key:"calculatePoints",value:function(e){var n=e.series,i=e.realIndex,s=e.x,o=e.y,r=e.i,a=e.j,l=e.prevY,c=this.w,u=[],d=[];if(a===0){var h=this.lineCtx.categoryAxisCorrection+c.config.markers.offsetX;c.globals.isXNumeric&&(h=(c.globals.seriesX[i][0]-c.globals.minX)/this.lineCtx.xRatio+c.config.markers.offsetX),u.push(h),d.push(he.isNumber(n[r][0])?l+c.config.markers.offsetY:null),u.push(s+c.config.markers.offsetX),d.push(he.isNumber(n[r][a+1])?o+c.config.markers.offsetY:null)}else u.push(s+c.config.markers.offsetX),d.push(he.isNumber(n[r][a+1])?o+c.config.markers.offsetY:null);return{x:u,y:d}}},{key:"checkPreviousPaths",value:function(e){for(var n=e.pathFromLine,i=e.pathFromArea,s=e.realIndex,o=this.w,r=0;r<o.globals.previousPaths.length;r++){var a=o.globals.previousPaths[r];(a.type==="line"||a.type==="area")&&a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(s,10)&&(a.type==="line"?(this.lineCtx.appendPathFrom=!1,n=o.globals.previousPaths[r].paths[0].d):a.type==="area"&&(this.lineCtx.appendPathFrom=!1,i=o.globals.previousPaths[r].paths[0].d,o.config.stroke.show&&o.globals.previousPaths[r].paths[1]&&(n=o.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:n,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(e){var n,i,s,o=e.i,r=e.realIndex,a=e.series,l=e.prevY,c=e.lineYPosition,u=e.translationsIndex,d=this.w,h=d.config.chart.stacked&&!d.globals.comboCharts||d.config.chart.stacked&&d.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((n=this.w.config.series[r])===null||n===void 0?void 0:n.type)==="bar"||((i=this.w.config.series[r])===null||i===void 0?void 0:i.type)==="column");if(((s=a[o])===null||s===void 0?void 0:s[0])!==void 0)l=(c=h&&o>0?this.lineCtx.prevSeriesY[o-1][0]:this.lineCtx.zeroY)-a[o][0]/this.lineCtx.yRatio[u]+2*(this.lineCtx.isReversed?a[o][0]/this.lineCtx.yRatio[u]:0);else if(h&&o>0&&a[o][0]===void 0){for(var f=o-1;f>=0;f--)if(a[f][0]!==null&&a[f][0]!==void 0){l=c=this.lineCtx.prevSeriesY[f][0];break}}return{prevY:l,lineYPosition:c}}}]),t}(),r2t=function(t){for(var e,n,i,s,o=function(u){for(var d=[],h=u[0],f=u[1],p=d[0]=ak(h,f),m=1,b=u.length-1;m<b;m++)h=f,f=u[m+1],d[m]=.5*(p+(p=ak(h,f)));return d[m]=p,d}(t),r=t.length-1,a=[],l=0;l<r;l++)i=ak(t[l],t[l+1]),Math.abs(i)<1e-6?o[l]=o[l+1]=0:(s=(e=o[l]/i)*e+(n=o[l+1]/i)*n)>9&&(s=3*i/Math.sqrt(s),o[l]=s*e,o[l+1]=s*n);for(var c=0;c<=r;c++)s=(t[Math.min(r,c+1)][0]-t[Math.max(0,c-1)][0])/(6*(1+o[c]*o[c])),a.push([s||0,o[c]*s||0]);return a},a2t=function(t){var e=r2t(t),n=t[1],i=t[0],s=[],o=e[1],r=e[0];s.push(i,[i[0]+r[0],i[1]+r[1],n[0]-o[0],n[1]-o[1],n[0],n[1]]);for(var a=2,l=e.length;a<l;a++){var c=t[a],u=e[a];s.push([c[0]-u[0],c[1]-u[1],c[0],c[1]])}return s},l2t=function(t,e,n){var i=t.slice(e,n);if(e){if(n-e>1&&i[1].length<6){var s=i[0].length;i[1]=[2*i[0][s-2]-i[0][s-4],2*i[0][s-1]-i[0][s-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i};function ak(t,e){return(e[1]-t[1])/(e[0]-t[0])}var lk=function(){function t(e,n,i){lt(this,t),this.ctx=e,this.w=e.w,this.xyRatios=n,this.pointsChart=!(this.w.config.chart.type!=="bubble"&&this.w.config.chart.type!=="scatter")||i,this.scatter=new Cj(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new o2t(this),this.markers=new Np(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return ct(t,[{key:"draw",value:function(e,n,i,s){var o,r=this.w,a=new Ne(this.ctx),l=r.globals.comboCharts?n:r.config.chart.type,c=a.group({class:"apexcharts-".concat(l,"-series apexcharts-plot-series")}),u=new ys(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=u.getLogSeries(e),this.yRatio=u.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var d=[],h=0;h<e.length;h++){e=this.lineHelpers.sameValueSeriesFix(h,e);var f=r.globals.comboCharts?i[h]:h,p=this.yRatio.length>1?f:0;this._initSerieVariables(e,h,f);var m=[],b=[],w=[],k=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,f),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(k=(r.globals.seriesX[f][0]-r.globals.minX)/this.xRatio),w.push(k);var C,A=k,S=void 0,M=A,P=this.zeroY,T=this.zeroY;P=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:e,prevY:P,lineYPosition:0,translationsIndex:p}).prevY,r.config.stroke.curve==="monotoneCubic"&&e[h][0]===null?m.push(null):m.push(P),C=P,l==="rangeArea"&&(S=T=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:s,prevY:T,lineYPosition:0,translationsIndex:p}).prevY,b.push(m[0]!==null?T:null));var I=this._calculatePathsFrom({type:l,series:e,i:h,realIndex:f,translationsIndex:p,prevX:M,prevY:P,prevY2:T}),L=[m[0]],R=[b[0]],V={type:l,series:e,realIndex:f,translationsIndex:p,i:h,x:k,y:1,pX:A,pY:C,pathsFrom:I,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:w,yArrj:m,y2Arrj:b,seriesRangeEnd:s},H=this._iterateOverDataPoints(tt(tt({},V),{},{iterations:l==="rangeArea"?e[h].length-1:void 0,isRangeStart:!0}));if(l==="rangeArea"){for(var F=this._calculatePathsFrom({series:s,i:h,realIndex:f,prevX:M,prevY:T}),U=this._iterateOverDataPoints(tt(tt({},V),{},{series:s,xArrj:[k],yArrj:L,y2Arrj:R,pY:S,areaPaths:H.areaPaths,pathsFrom:F,iterations:s[h].length-1,isRangeStart:!1})),Y=H.linePaths.length/2,z=0;z<Y;z++)H.linePaths[z]=U.linePaths[z+Y]+H.linePaths[z];H.linePaths.splice(Y),H.pathFromLine=U.pathFromLine+H.pathFromLine}else H.pathFromArea+="z";this._handlePaths({type:l,realIndex:f,i:h,paths:H}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),d.push(this.elSeries)}if(((o=r.config.series[0])===null||o===void 0?void 0:o.zIndex)!==void 0&&d.sort(function(G,Q){return Number(G.node.getAttribute("zIndex"))-Number(Q.node.getAttribute("zIndex"))}),r.config.chart.stacked)for(var X=d.length-1;X>=0;X--)c.add(d[X]);else for(var Z=0;Z<d.length;Z++)c.add(d[Z]);return c}},{key:"_initSerieVariables",value:function(e,n,i){var s=this.w,o=new Ne(this.ctx);this.xDivision=s.globals.gridWidth/(s.globals.dataPoints-(s.config.xaxis.tickPlacement==="on"?1:0)),this.strokeWidth=Array.isArray(s.config.stroke.width)?s.config.stroke.width[i]:s.config.stroke.width;var r=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[i],r=i),this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed,this.zeroY=s.globals.gridHeight-this.baseLineY[r]-(this.isReversed?s.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>s.globals.gridHeight||s.config.plotOptions.area.fillTo==="end")&&(this.areaBottomY=s.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=o.group({class:"apexcharts-series",zIndex:s.config.series[i].zIndex!==void 0?s.config.series[i].zIndex:i,seriesName:he.escapeString(s.globals.seriesNames[i])}),this.elPointsMain=o.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=o.group({class:"apexcharts-datalabels","data:realIndex":i});var a=e[n].length===s.globals.dataPoints;this.elSeries.attr({"data:longestSeries":a,rel:n+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var n,i,s,o,r=e.type,a=e.series,l=e.i,c=e.realIndex,u=e.translationsIndex,d=e.prevX,h=e.prevY,f=e.prevY2,p=this.w,m=new Ne(this.ctx);if(a[l][0]===null){for(var b=0;b<a[l].length;b++)if(a[l][b]!==null){d=this.xDivision*b,h=this.zeroY-a[l][b]/this.yRatio[u],n=m.move(d,h),i=m.move(d,this.areaBottomY);break}}else n=m.move(d,h),r==="rangeArea"&&(n=m.move(d,f)+m.line(d,h)),i=m.move(d,this.areaBottomY)+m.line(d,h);if(s=m.move(0,this.areaBottomY)+m.line(0,this.areaBottomY),o=m.move(0,this.areaBottomY)+m.line(0,this.areaBottomY),p.globals.previousPaths.length>0){var w=this.lineHelpers.checkPreviousPaths({pathFromLine:s,pathFromArea:o,realIndex:c});s=w.pathFromLine,o=w.pathFromArea}return{prevX:d,prevY:h,linePath:n,areaPath:i,pathFromLine:s,pathFromArea:o}}},{key:"_handlePaths",value:function(e){var n=e.type,i=e.realIndex,s=e.i,o=e.paths,r=this.w,a=new Ne(this.ctx),l=new Xr(this.ctx);this.prevSeriesY.push(o.yArrj),r.globals.seriesXvalues[i]=o.xArrj,r.globals.seriesYvalues[i]=o.yArrj;var c=r.config.forecastDataPoints;if(c.count>0&&n!=="rangeArea"){var u=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-c.count-1],d=a.drawRect(u,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(d.node);var h=a.drawRect(0,0,u,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(h.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var f={i:s,realIndex:i,animationDelay:s,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(n)};if(n==="area")for(var p=l.fillPath({seriesNumber:i}),m=0;m<o.areaPaths.length;m++){var b=a.renderPaths(tt(tt({},f),{},{pathFrom:o.pathFromArea,pathTo:o.areaPaths[m],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:p}));this.elSeries.add(b)}if(r.config.stroke.show&&!this.pointsChart){var w=null;if(n==="line")w=l.fillPath({seriesNumber:i,i:s});else if(r.config.stroke.fill.type==="solid")w=r.globals.stroke.colors[i];else{var k=r.config.fill;r.config.fill=r.config.stroke.fill,w=l.fillPath({seriesNumber:i,i:s}),r.config.fill=k}for(var C=0;C<o.linePaths.length;C++){var A=w;n==="rangeArea"&&(A=l.fillPath({seriesNumber:i}));var S=tt(tt({},f),{},{pathFrom:o.pathFromLine,pathTo:o.linePaths[C],stroke:w,strokeWidth:this.strokeWidth,strokeLineCap:r.config.stroke.lineCap,fill:n==="rangeArea"?A:"none"}),M=a.renderPaths(S);if(this.elSeries.add(M),M.attr("fill-rule","evenodd"),c.count>0&&n!=="rangeArea"){var P=a.renderPaths(S);P.node.setAttribute("stroke-dasharray",c.dashArray),c.strokeWidth&&P.node.setAttribute("stroke-width",c.strokeWidth),this.elSeries.add(P),P.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),M.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){var n,i,s=this,o=e.type,r=e.series,a=e.iterations,l=e.realIndex,c=e.translationsIndex,u=e.i,d=e.x,h=e.y,f=e.pX,p=e.pY,m=e.pathsFrom,b=e.linePaths,w=e.areaPaths,k=e.seriesIndex,C=e.lineYPosition,A=e.xArrj,S=e.yArrj,M=e.y2Arrj,P=e.isRangeStart,T=e.seriesRangeEnd,I=this.w,L=new Ne(this.ctx),R=this.yRatio,V=m.prevY,H=m.linePath,F=m.areaPath,U=m.pathFromLine,Y=m.pathFromArea,z=he.isNumber(I.globals.minYArr[l])?I.globals.minYArr[l]:I.globals.minY;a||(a=I.globals.dataPoints>1?I.globals.dataPoints-1:I.globals.dataPoints);var X=function(ie,re){return re-ie/R[c]+2*(s.isReversed?ie/R[c]:0)},Z=h,G=I.config.chart.stacked&&!I.globals.comboCharts||I.config.chart.stacked&&I.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((n=this.w.config.series[l])===null||n===void 0?void 0:n.type)==="bar"||((i=this.w.config.series[l])===null||i===void 0?void 0:i.type)==="column"),Q=I.config.stroke.curve;Array.isArray(Q)&&(Q=Array.isArray(k)?Q[k[u]]:Q[u]);for(var ne,K=0,ae=0;ae<a&&r[u].length!==0;ae++){var ge=r[u][ae+1]===void 0||r[u][ae+1]===null;if(I.globals.isXNumeric){var Ce=I.globals.seriesX[l][ae+1];I.globals.seriesX[l][ae+1]===void 0&&(Ce=I.globals.seriesX[l][a-1]),d=(Ce-I.globals.minX)/this.xRatio}else d+=this.xDivision;G?u>0&&I.globals.collapsedSeries.length<I.config.series.length-1?C=this.prevSeriesY[function(ie){for(var re=ie;re>0;re--){if(!(I.globals.collapsedSeriesIndices.indexOf((k==null?void 0:k[re])||re)>-1))return re;re--}return 0}(u-1)][ae+1]:C=this.zeroY:C=this.zeroY,ge?h=X(z,C):(h=X(r[u][ae+1],C),o==="rangeArea"&&(Z=X(T[u][ae+1],C))),A.push(r[u][ae+1]===null?null:d),!ge||I.config.stroke.curve!=="smooth"&&I.config.stroke.curve!=="monotoneCubic"?(S.push(h),M.push(Z)):(S.push(null),M.push(null));var oe=this.lineHelpers.calculatePoints({series:r,x:d,y:h,realIndex:l,i:u,j:ae,prevY:V}),pe=this._createPaths({type:o,series:r,i:u,realIndex:l,j:ae,x:d,y:h,y2:Z,xArrj:A,yArrj:S,y2Arrj:M,pX:f,pY:p,pathState:K,segmentStartX:ne,linePath:H,areaPath:F,linePaths:b,areaPaths:w,curve:Q,isRangeStart:P});w=pe.areaPaths,b=pe.linePaths,f=pe.pX,p=pe.pY,K=pe.pathState,ne=pe.segmentStartX,F=pe.areaPath,H=pe.linePath,!this.appendPathFrom||I.globals.hasNullValues||Q==="monotoneCubic"&&o==="rangeArea"||(U+=L.line(d,this.areaBottomY),Y+=L.line(d,this.areaBottomY)),this.handleNullDataPoints(r,oe,u,ae,l),this._handleMarkersAndLabels({type:o,pointsPos:oe,i:u,j:ae,realIndex:l,isRangeStart:P})}return{yArrj:S,xArrj:A,pathFromArea:Y,areaPaths:w,pathFromLine:U,linePaths:b,linePath:H,areaPath:F}}},{key:"_handleMarkersAndLabels",value:function(e){var n=e.type,i=e.pointsPos,s=e.isRangeStart,o=e.i,r=e.j,a=e.realIndex,l=this.w,c=new np(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:a,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{l.globals.series[o].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var u=this.markers.plotChartMarkers(i,a,r+1);u!==null&&this.elPointsMain.add(u)}var d=c.drawDataLabel({type:n,isRangeStart:s,pos:i,i:a,j:r+1});d!==null&&this.elDataLabelsWrap.add(d)}},{key:"_createPaths",value:function(e){var n=e.type,i=e.series,s=e.i;e.realIndex;var o,r=e.j,a=e.x,l=e.y,c=e.xArrj,u=e.yArrj,d=e.y2,h=e.y2Arrj,f=e.pX,p=e.pY,m=e.pathState,b=e.segmentStartX,w=e.linePath,k=e.areaPath,C=e.linePaths,A=e.areaPaths,S=e.curve,M=e.isRangeStart,P=new Ne(this.ctx),T=this.areaBottomY,I=n==="rangeArea",L=n==="rangeArea"&&M;switch(S){case"monotoneCubic":var R=M?u:h;switch(m){case 0:if(R[r+1]===null)break;m=1;case 1:if(!(I?c.length===i[s].length:r===i[s].length-2))break;case 2:var V=M?c:c.slice().reverse(),H=M?R:R.slice().reverse(),F=(o=H,V.map(function(Ce,oe){return[Ce,o[oe]]}).filter(function(Ce){return Ce[1]!==null})),U=F.length>1?a2t(F):F,Y=[];I&&(L?A=F:Y=A.reverse());var z=0,X=0;if(function(Ce,oe){for(var pe=function(je){var te=[],se=0;return je.forEach(function(me){me!==null?se++:se>0&&(te.push(se),se=0)}),se>0&&te.push(se),te}(Ce),ie=[],re=0,ke=0;re<pe.length;ke+=pe[re++])ie[re]=l2t(oe,ke,ke+pe[re]);return ie}(H,U).forEach(function(Ce){z++;var oe=function(re){for(var ke="",je=0;je<re.length;je++){var te=re[je],se=te.length;se>4?(ke+="C".concat(te[0],", ").concat(te[1]),ke+=", ".concat(te[2],", ").concat(te[3]),ke+=", ".concat(te[4],", ").concat(te[5])):se>2&&(ke+="S".concat(te[0],", ").concat(te[1]),ke+=", ".concat(te[2],", ").concat(te[3]))}return ke}(Ce),pe=X,ie=(X+=Ce.length)-1;L?w=P.move(F[pe][0],F[pe][1])+oe:I?w=P.move(Y[pe][0],Y[pe][1])+P.line(F[pe][0],F[pe][1])+oe+P.line(Y[ie][0],Y[ie][1]):(w=P.move(F[pe][0],F[pe][1])+oe,k=w+P.line(F[ie][0],T)+P.line(F[pe][0],T)+"z",A.push(k)),C.push(w)}),I&&z>1&&!L){var Z=C.slice(z).reverse();C.splice(z),Z.forEach(function(Ce){return C.push(Ce)})}m=0}break;case"smooth":var G=.35*(a-f);if(i[s][r]===null)m=0;else switch(m){case 0:if(b=f,w=L?P.move(f,h[r])+P.line(f,p):P.move(f,p),k=P.move(f,p),i[s][r+1]===null||i[s][r+1]===void 0){C.push(w),A.push(k);break}if(m=1,r<i[s].length-2){var Q=P.curve(f+G,p,a-G,l,a,l);w+=Q,k+=Q;break}case 1:if(i[s][r+1]===null)w+=L?P.line(f,d):P.move(f,p),k+=P.line(f,T)+P.line(b,T)+"z",C.push(w),A.push(k),m=-1;else{var ne=P.curve(f+G,p,a-G,l,a,l);w+=ne,k+=ne,r>=i[s].length-2&&(L&&(w+=P.curve(a,l,a,l,a,d)+P.move(a,d)),k+=P.curve(a,l,a,l,a,T)+P.line(b,T)+"z",C.push(w),A.push(k),m=-1)}}f=a,p=l;break;default:var K=function(Ce,oe,pe){var ie=[];switch(Ce){case"stepline":ie=P.line(oe,null,"H")+P.line(null,pe,"V");break;case"linestep":ie=P.line(null,pe,"V")+P.line(oe,null,"H");break;case"straight":ie=P.line(oe,pe)}return ie};if(i[s][r]===null)m=0;else switch(m){case 0:if(b=f,w=L?P.move(f,h[r])+P.line(f,p):P.move(f,p),k=P.move(f,p),i[s][r+1]===null||i[s][r+1]===void 0){C.push(w),A.push(k);break}if(m=1,r<i[s].length-2){var ae=K(S,a,l);w+=ae,k+=ae;break}case 1:if(i[s][r+1]===null)w+=L?P.line(f,d):P.move(f,p),k+=P.line(f,T)+P.line(b,T)+"z",C.push(w),A.push(k),m=-1;else{var ge=K(S,a,l);w+=ge,k+=ge,r>=i[s].length-2&&(L&&(w+=P.line(a,d)),k+=P.line(a,T)+P.line(b,T)+"z",C.push(w),A.push(k),m=-1)}}f=a,p=l}return{linePaths:C,areaPaths:A,pX:f,pY:p,pathState:m,segmentStartX:b,linePath:w,areaPath:k}}},{key:"handleNullDataPoints",value:function(e,n,i,s,o){var r=this.w;if(e[i][s]===null&&r.config.markers.showNullDataPoints||e[i].length===1){var a=this.strokeWidth-r.config.markers.strokeWidth/2;a>0||(a=0);var l=this.markers.plotChartMarkers(n,o,s+1,a,!0);l!==null&&this.elPointsMain.add(l)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(a,l,c,u){this.xoffset=a,this.yoffset=l,this.height=u,this.width=c,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(d){var h,f=[],p=this.xoffset,m=this.yoffset,b=o(d)/this.height,w=o(d)/this.width;if(this.width>=this.height)for(h=0;h<d.length;h++)f.push([p,m,p+b,m+d[h]/b]),m+=d[h]/b;else for(h=0;h<d.length;h++)f.push([p,m,p+d[h]/w,m+w]),p+=d[h]/w;return f},this.cutArea=function(d){var h;if(this.width>=this.height){var f=d/this.height,p=this.width-f;h=new t(this.xoffset+f,this.yoffset,p,this.height)}else{var m=d/this.width,b=this.height-m;h=new t(this.xoffset,this.yoffset+m,this.width,b)}return h}}function e(a,l,c,u,d){u=u===void 0?0:u,d=d===void 0?0:d;var h=n(function(f,p){var m,b=[],w=p/o(f);for(m=0;m<f.length;m++)b[m]=f[m]*w;return b}(a,l*c),[],new t(u,d,l,c),[]);return function(f){var p,m,b=[];for(p=0;p<f.length;p++)for(m=0;m<f[p].length;m++)b.push(f[p][m]);return b}(h)}function n(a,l,c,u){var d,h,f;if(a.length!==0)return d=c.shortestEdge(),function(p,m,b){var w;if(p.length===0)return!0;(w=p.slice()).push(m);var k=i(p,b),C=i(w,b);return k>=C}(l,h=a[0],d)?(l.push(h),n(a.slice(1),l,c,u)):(f=c.cutArea(o(l),u),u.push(c.getCoordinates(l)),n(a,[],f,u)),u;u.push(c.getCoordinates(l))}function i(a,l){var c=Math.min.apply(Math,a),u=Math.max.apply(Math,a),d=o(a);return Math.max(Math.pow(l,2)*u/Math.pow(d,2),Math.pow(d,2)/(Math.pow(l,2)*c))}function s(a){return a&&a.constructor===Array}function o(a){var l,c=0;for(l=0;l<a.length;l++)c+=a[l];return c}function r(a){var l,c=0;if(s(a[0]))for(l=0;l<a.length;l++)c+=r(a[l]);else c=o(a);return c}return function a(l,c,u,d,h){d=d===void 0?0:d,h=h===void 0?0:h;var f,p,m=[],b=[];if(s(l[0])){for(p=0;p<l.length;p++)m[p]=r(l[p]);for(f=e(m,c,u,d,h),p=0;p<l.length;p++)b.push(a(l[p],f[p][2]-f[p][0],f[p][3]-f[p][1],f[p][0],f[p][1]))}else b=e(l,c,u,d,h);return b}}();var c2t=function(){function t(e,n){lt(this,t),this.ctx=e,this.w=e.w,this.strokeWidth=this.w.config.stroke.width,this.helpers=new Tj(e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}return ct(t,[{key:"draw",value:function(e){var n=this,i=this.w,s=new Ne(this.ctx),o=new Xr(this.ctx),r=s.group({class:"apexcharts-treemap"});if(i.globals.noData)return r;var a=[];return e.forEach(function(l){var c=l.map(function(u){return Math.abs(u)});a.push(c)}),this.negRange=this.helpers.checkColorRange(),i.config.series.forEach(function(l,c){l.data.forEach(function(u){Array.isArray(n.labels[c])||(n.labels[c]=[]),n.labels[c].push(u.x)})}),window.TreemapSquared.generate(a,i.globals.gridWidth,i.globals.gridHeight).forEach(function(l,c){var u=s.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:he.escapeString(i.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(i.config.chart.dropShadow.enabled){var d=i.config.chart.dropShadow;new di(n.ctx).dropShadow(r,d,c)}var h=s.group({class:"apexcharts-data-labels"});l.forEach(function(f,p){var m=f[0],b=f[1],w=f[2],k=f[3],C=s.drawRect(m,b,w-m,k-b,i.config.plotOptions.treemap.borderRadius,"#fff",1,n.strokeWidth,i.config.plotOptions.treemap.useFillColorAsStroke?S:i.globals.stroke.colors[c]);C.attr({cx:m,cy:b,index:c,i:c,j:p,width:w-m,height:k-b});var A=n.helpers.getShadeColor(i.config.chart.type,c,p,n.negRange),S=A.color,M=o.fillPath({color:S,seriesNumber:c,dataPointIndex:p});C.node.classList.add("apexcharts-treemap-rect"),C.attr({fill:M}),n.helpers.addListeners(C);var P={x:m+(w-m)/2,y:b+(k-b)/2,width:0,height:0},T={x:m,y:b,width:w-m,height:k-b};if(i.config.chart.animations.enabled&&!i.globals.dataChanged){var I=1;i.globals.resized||(I=i.config.chart.animations.speed),n.animateTreemap(C,P,T,I)}if(i.globals.dataChanged){var L=1;n.dynamicAnim.enabled&&i.globals.shouldAnimate&&(L=n.dynamicAnim.speed,i.globals.previousPaths[c]&&i.globals.previousPaths[c][p]&&i.globals.previousPaths[c][p].rect&&(P=i.globals.previousPaths[c][p].rect),n.animateTreemap(C,P,T,L))}var R=n.getFontSize(f),V=i.config.dataLabels.formatter(n.labels[c][p],{value:i.globals.series[c][p],seriesIndex:c,dataPointIndex:p,w:i});i.config.plotOptions.treemap.dataLabels.format==="truncate"&&(R=parseInt(i.config.dataLabels.style.fontSize,10),V=n.truncateLabels(V,R,m,b,w,k));var H=null;i.globals.series[c][p]&&(H=n.helpers.calculateDataLabels({text:V,x:(m+w)/2,y:(b+k)/2+n.strokeWidth/2+R/3,i:c,j:p,colorProps:A,fontSize:R,series:e})),i.config.dataLabels.enabled&&H&&n.rotateToFitLabel(H,R,V,m,b,w,k),u.add(C),H!==null&&u.add(H)}),u.add(h),r.add(u)}),r}},{key:"getFontSize",value:function(e){var n=this.w,i=function s(o){var r,a=0;if(Array.isArray(o[0]))for(r=0;r<o.length;r++)a+=s(o[r]);else for(r=0;r<o.length;r++)a+=o[r].length;return a}(this.labels)/function s(o){var r,a=0;if(Array.isArray(o[0]))for(r=0;r<o.length;r++)a+=s(o[r]);else for(r=0;r<o.length;r++)a+=1;return a}(this.labels);return function(s,o){var r=s*o,a=Math.pow(r,.5);return Math.min(a/i,parseInt(n.config.dataLabels.style.fontSize,10))}(e[2]-e[0],e[3]-e[1])}},{key:"rotateToFitLabel",value:function(e,n,i,s,o,r,a){var l=new Ne(this.ctx),c=l.getTextRects(i,n);if(c.width+this.w.config.stroke.width+5>r-s&&c.width<=a-o){var u=l.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(-90 ".concat(u.x," ").concat(u.y,") translate(").concat(c.height/3,")"))}}},{key:"truncateLabels",value:function(e,n,i,s,o,r){var a=new Ne(this.ctx),l=a.getTextRects(e,n).width+this.w.config.stroke.width+5>o-i&&r-s>o-i?r-s:o-i,c=a.getTextBasedOnMaxWidth({text:e,maxWidth:l,fontSize:n});return e.length!==c.length&&l/n<5?"":c}},{key:"animateTreemap",value:function(e,n,i,s){var o=new Dp(this.ctx);o.animateRect(e,{x:n.x,y:n.y,width:n.width,height:n.height},{x:i.x,y:i.y,width:i.width,height:i.height},s,function(){o.animationCompleted(e)})}}]),t}(),Lj=86400,u2t=10/Lj,d2t=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return ct(t,[{key:"calculateTimeScaleTicks",value:function(e,n){var i=this,s=this.w;if(s.globals.allSeriesCollapsed)return s.globals.labels=[],s.globals.timescaleLabels=[],[];var o=new ri(this.ctx),r=(n-e)/864e5;this.determineInterval(r),s.globals.disableZoomIn=!1,s.globals.disableZoomOut=!1,r<u2t?s.globals.disableZoomIn=!0:r>5e4&&(s.globals.disableZoomOut=!0);var a=o.getTimeUnitsfromTimestamp(e,n,this.utc),l=s.globals.gridWidth/r,c=l/24,u=c/60,d=u/60,h=Math.floor(24*r),f=Math.floor(1440*r),p=Math.floor(r*Lj),m=Math.floor(r),b=Math.floor(r/30),w=Math.floor(r/365),k={minMillisecond:a.minMillisecond,minSecond:a.minSecond,minMinute:a.minMinute,minHour:a.minHour,minDate:a.minDate,minMonth:a.minMonth,minYear:a.minYear},C={firstVal:k,currentMillisecond:k.minMillisecond,currentSecond:k.minSecond,currentMinute:k.minMinute,currentHour:k.minHour,currentMonthDate:k.minDate,currentDate:k.minDate,currentMonth:k.minMonth,currentYear:k.minYear,daysWidthOnXAxis:l,hoursWidthOnXAxis:c,minutesWidthOnXAxis:u,secondsWidthOnXAxis:d,numberOfSeconds:p,numberOfMinutes:f,numberOfHours:h,numberOfDays:m,numberOfMonths:b,numberOfYears:w};switch(this.tickInterval){case"years":this.generateYearScale(C);break;case"months":case"half_year":this.generateMonthScale(C);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(C);break;case"hours":this.generateHourScale(C);break;case"minutes_fives":case"minutes":this.generateMinuteScale(C);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(C)}var A=this.timeScaleArray.map(function(S){var M={position:S.position,unit:S.unit,year:S.year,day:S.day?S.day:1,hour:S.hour?S.hour:0,month:S.month+1};return S.unit==="month"?tt(tt({},M),{},{day:1,value:S.value+1}):S.unit==="day"||S.unit==="hour"?tt(tt({},M),{},{value:S.value}):S.unit==="minute"?tt(tt({},M),{},{value:S.value,minute:S.value}):S.unit==="second"?tt(tt({},M),{},{value:S.value,minute:S.minute,second:S.second}):S});return A.filter(function(S){var M=1,P=Math.ceil(s.globals.gridWidth/120),T=S.value;s.config.xaxis.tickAmount!==void 0&&(P=s.config.xaxis.tickAmount),A.length>P&&(M=Math.floor(A.length/P));var I=!1,L=!1;switch(i.tickInterval){case"years":S.unit==="year"&&(I=!0);break;case"half_year":M=7,S.unit==="year"&&(I=!0);break;case"months":M=1,S.unit==="year"&&(I=!0);break;case"months_fortnight":M=15,S.unit!=="year"&&S.unit!=="month"||(I=!0),T===30&&(L=!0);break;case"months_days":M=10,S.unit==="month"&&(I=!0),T===30&&(L=!0);break;case"week_days":M=8,S.unit==="month"&&(I=!0);break;case"days":M=1,S.unit==="month"&&(I=!0);break;case"hours":S.unit==="day"&&(I=!0);break;case"minutes_fives":case"seconds_fives":T%5!=0&&(L=!0);break;case"seconds_tens":T%10!=0&&(L=!0)}if(i.tickInterval==="hours"||i.tickInterval==="minutes_fives"||i.tickInterval==="seconds_tens"||i.tickInterval==="seconds_fives"){if(!L)return!0}else if((T%M==0||I)&&!L)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(e,n){var i=this.w,s=this.formatDates(e),o=this.removeOverlappingTS(s);i.globals.timescaleLabels=o.slice(),new ab(this.ctx).plotCoords()}},{key:"determineInterval",value:function(e){var n=24*e,i=60*n;switch(!0){case e/365>5:this.tickInterval="years";break;case e>800:this.tickInterval="half_year";break;case e>180:this.tickInterval="months";break;case e>90:this.tickInterval="months_fortnight";break;case e>60:this.tickInterval="months_days";break;case e>30:this.tickInterval="week_days";break;case e>2:this.tickInterval="days";break;case n>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(e){var n=e.firstVal,i=e.currentMonth,s=e.currentYear,o=e.daysWidthOnXAxis,r=e.numberOfYears,a=n.minYear,l=0,c=new ri(this.ctx),u="year";if(n.minDate>1||n.minMonth>0){var d=c.determineRemainingDaysOfYear(n.minYear,n.minMonth,n.minDate);l=(c.determineDaysOfYear(n.minYear)-d+1)*o,a=n.minYear+1,this.timeScaleArray.push({position:l,value:a,unit:u,year:a,month:he.monthMod(i+1)})}else n.minDate===1&&n.minMonth===0&&this.timeScaleArray.push({position:l,value:a,unit:u,year:s,month:he.monthMod(i+1)});for(var h=a,f=l,p=0;p<r;p++)h++,f=c.determineDaysOfYear(h-1)*o+f,this.timeScaleArray.push({position:f,value:h,unit:u,year:h,month:1})}},{key:"generateMonthScale",value:function(e){var n=e.firstVal,i=e.currentMonthDate,s=e.currentMonth,o=e.currentYear,r=e.daysWidthOnXAxis,a=e.numberOfMonths,l=s,c=0,u=new ri(this.ctx),d="month",h=0;if(n.minDate>1){c=(u.determineDaysOfMonths(s+1,n.minYear)-i+1)*r,l=he.monthMod(s+1);var f=o+h,p=he.monthMod(l),m=l;l===0&&(d="year",m=f,p=1,f+=h+=1),this.timeScaleArray.push({position:c,value:m,unit:d,year:f,month:p})}else this.timeScaleArray.push({position:c,value:l,unit:d,year:o,month:he.monthMod(s)});for(var b=l+1,w=c,k=0,C=1;k<a;k++,C++){(b=he.monthMod(b))===0?(d="year",h+=1):d="month";var A=this._getYear(o,b,h);w=u.determineDaysOfMonths(b,A)*r+w;var S=b===0?A:b;this.timeScaleArray.push({position:w,value:S,unit:d,year:A,month:b===0?1:b}),b++}}},{key:"generateDayScale",value:function(e){var n=e.firstVal,i=e.currentMonth,s=e.currentYear,o=e.hoursWidthOnXAxis,r=e.numberOfDays,a=new ri(this.ctx),l="day",c=n.minDate+1,u=c,d=function(C,A,S){return C>a.determineDaysOfMonths(A+1,S)&&(u=1,l="month",f=A+=1),A},h=(24-n.minHour)*o,f=c,p=d(u,i,s);n.minHour===0&&n.minDate===1?(h=0,f=he.monthMod(n.minMonth),l="month",u=n.minDate):n.minDate!==1&&n.minHour===0&&n.minMinute===0&&(h=0,c=n.minDate,f=c,p=d(u=c,i,s),f!==1&&(l="day")),this.timeScaleArray.push({position:h,value:f,unit:l,year:this._getYear(s,p,0),month:he.monthMod(p),day:u});for(var m=h,b=0;b<r;b++){l="day",p=d(u+=1,p,this._getYear(s,p,0));var w=this._getYear(s,p,0);m=24*o+m;var k=u===1?he.monthMod(p):u;this.timeScaleArray.push({position:m,value:k,unit:l,year:w,month:he.monthMod(p),day:k})}}},{key:"generateHourScale",value:function(e){var n=e.firstVal,i=e.currentDate,s=e.currentMonth,o=e.currentYear,r=e.minutesWidthOnXAxis,a=e.numberOfHours,l=new ri(this.ctx),c="hour",u=function(M,P){return M>l.determineDaysOfMonths(P+1,o)&&(b=1,P+=1),{month:P,date:b}},d=function(M,P){return M>l.determineDaysOfMonths(P+1,o)?P+=1:P},h=60-(n.minMinute+n.minSecond/60),f=h*r,p=n.minHour+1,m=p;h===60&&(f=0,m=p=n.minHour);var b=i;m>=24&&(m=0,c="day",p=b+=1);var w=u(b,s).month;w=d(b,w),p>31&&(p=b=1),this.timeScaleArray.push({position:f,value:p,unit:c,day:b,hour:m,year:o,month:he.monthMod(w)}),m++;for(var k=f,C=0;C<a;C++){c="hour",m>=24&&(m=0,c="day",w=u(b+=1,w).month,w=d(b,w));var A=this._getYear(o,w,0);k=60*r+k;var S=m===0?b:m;this.timeScaleArray.push({position:k,value:S,unit:c,hour:m,day:b,year:A,month:he.monthMod(w)}),m++}}},{key:"generateMinuteScale",value:function(e){for(var n=e.currentMillisecond,i=e.currentSecond,s=e.currentMinute,o=e.currentHour,r=e.currentDate,a=e.currentMonth,l=e.currentYear,c=e.minutesWidthOnXAxis,u=e.secondsWidthOnXAxis,d=e.numberOfMinutes,h=s+1,f=r,p=a,m=l,b=o,w=(60-i-n/1e3)*u,k=0;k<d;k++)h>=60&&(h=0,(b+=1)===24&&(b=0)),this.timeScaleArray.push({position:w,value:h,unit:"minute",hour:b,minute:h,day:f,year:this._getYear(m,p,0),month:he.monthMod(p)}),w+=c,h++}},{key:"generateSecondScale",value:function(e){for(var n=e.currentMillisecond,i=e.currentSecond,s=e.currentMinute,o=e.currentHour,r=e.currentDate,a=e.currentMonth,l=e.currentYear,c=e.secondsWidthOnXAxis,u=e.numberOfSeconds,d=i+1,h=s,f=r,p=a,m=l,b=o,w=(1e3-n)/1e3*c,k=0;k<u;k++)d>=60&&(d=0,++h>=60&&(h=0,++b===24&&(b=0))),this.timeScaleArray.push({position:w,value:d,unit:"second",hour:b,minute:h,second:d,day:f,year:this._getYear(m,p,0),month:he.monthMod(p)}),w+=c,d++}},{key:"createRawDateString",value:function(e,n){var i=e.year;return e.month===0&&(e.month=1),i+="-"+("0"+e.month.toString()).slice(-2),e.unit==="day"?i+=e.unit==="day"?"-"+("0"+n).slice(-2):"-01":i+="-"+("0"+(e.day?e.day:"1")).slice(-2),e.unit==="hour"?i+=e.unit==="hour"?"T"+("0"+n).slice(-2):"T00":i+="T"+("0"+(e.hour?e.hour:"0")).slice(-2),e.unit==="minute"?i+=":"+("0"+n).slice(-2):i+=":"+(e.minute?("0"+e.minute).slice(-2):"00"),e.unit==="second"?i+=":"+("0"+n).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(e){var n=this,i=this.w;return e.map(function(s){var o=s.value.toString(),r=new ri(n.ctx),a=n.createRawDateString(s,o),l=r.getDate(r.parseDate(a));if(n.utc||(l=r.getDate(r.parseDateWithTimezone(a))),i.config.xaxis.labels.format===void 0){var c="dd MMM",u=i.config.xaxis.labels.datetimeFormatter;s.unit==="year"&&(c=u.year),s.unit==="month"&&(c=u.month),s.unit==="day"&&(c=u.day),s.unit==="hour"&&(c=u.hour),s.unit==="minute"&&(c=u.minute),s.unit==="second"&&(c=u.second),o=r.formatDate(l,c)}else o=r.formatDate(l,i.config.xaxis.labels.format);return{dateString:a,position:s.position,value:o,unit:s.unit,year:s.year,month:s.month}})}},{key:"removeOverlappingTS",value:function(e){var n,i=this,s=new Ne(this.ctx),o=!1;e.length>0&&e[0].value&&e.every(function(l){return l.value.length===e[0].value.length})&&(o=!0,n=s.getTextRects(e[0].value).width);var r=0,a=e.map(function(l,c){if(c>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var u=o?n:s.getTextRects(e[r].value).width,d=e[r].position;return l.position>d+u+10?(r=c,l):null}return l});return a=a.filter(function(l){return l!==null})}},{key:"_getYear",value:function(e,n,i){return e+Math.floor(n/12)+i}}]),t}(),h2t=function(){function t(e,n){lt(this,t),this.ctx=n,this.w=n.w,this.el=e}return ct(t,[{key:"setupElements",value:function(){var e=this.w,n=e.globals,i=e.config,s=i.chart.type;n.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(s),n.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(s),n.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(s)&&i.plotOptions.bar.horizontal,n.chartClass=".apexcharts".concat(n.chartID),n.dom.baseEl=this.el,n.dom.elWrap=document.createElement("div"),Ne.setAttrs(n.dom.elWrap,{id:n.chartClass.substring(1),class:"apexcharts-canvas ".concat(n.chartClass.substring(1))}),this.el.appendChild(n.dom.elWrap),n.dom.Paper=window.SVG().addTo(n.dom.elWrap),n.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(i.chart.offsetX,", ").concat(i.chart.offsetY,")")}),n.dom.Paper.node.style.background=i.theme.mode!=="dark"||i.chart.background?i.theme.mode!=="light"||i.chart.background?i.chart.background:"#fff":"#424242",this.setSVGDimensions(),n.dom.elLegendForeign=document.createElementNS(n.SVGNS,"foreignObject"),Ne.setAttrs(n.dom.elLegendForeign,{x:0,y:0,width:n.svgWidth,height:n.svgHeight}),n.dom.elLegendWrap=document.createElement("div"),n.dom.elLegendWrap.classList.add("apexcharts-legend"),n.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),n.dom.elLegendForeign.appendChild(n.dom.elLegendWrap),n.dom.Paper.node.appendChild(n.dom.elLegendForeign),n.dom.elGraphical=n.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),n.dom.elDefs=n.dom.Paper.defs(),n.dom.Paper.add(n.dom.elGraphical),n.dom.elGraphical.add(n.dom.elDefs)}},{key:"plotChartType",value:function(e,n){var i=this.w,s=this.ctx,o=i.config,r=i.globals,a={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},column:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},l=o.chart.type||"line",c=null,u=0;r.series.forEach(function(M,P){var T=e[P].type||l;a[T]?(T==="rangeArea"?(a[T].series.push(r.seriesRangeStart[P]),a[T].seriesRangeEnd.push(r.seriesRangeEnd[P])):a[T].series.push(M),a[T].i.push(P),T!=="column"&&T!=="bar"||(i.globals.columnSeries=a.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(T)?c=T:T==="bar"?(a.column.series.push(M),a.column.i.push(P)):console.warn("You have specified an unrecognized series type (".concat(T,").")),l!==T&&T!=="scatter"&&u++}),u>0&&(c&&console.warn("Chart or series type ".concat(c," cannot appear with other chart or series types.")),a.column.series.length>0&&o.plotOptions.bar.horizontal&&(u-=a.column.series.length,a.column={series:[],i:[]},i.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),r.comboCharts||(r.comboCharts=u>0);var d=new lk(s,n),h=new rk(s,n);s.pie=new Ij(s);var f=new s2t(s);s.rangeBar=new i2t(s,n);var p=new n2t(s),m=[];if(r.comboCharts){var b,w,k=new ys(s);if(a.area.series.length>0&&(b=m).push.apply(b,Ns(k.drawSeriesByGroup(a.area,r.areaGroups,"area",d))),a.column.series.length>0)if(o.chart.stacked){var C=new QT(s,n);m.push(C.draw(a.column.series,a.column.i))}else s.bar=new sp(s,n),m.push(s.bar.draw(a.column.series,a.column.i));if(a.rangeArea.series.length>0&&m.push(d.draw(a.rangeArea.series,"rangeArea",a.rangeArea.i,a.rangeArea.seriesRangeEnd)),a.line.series.length>0&&(w=m).push.apply(w,Ns(k.drawSeriesByGroup(a.line,r.lineGroups,"line",d))),a.candlestick.series.length>0&&m.push(h.draw(a.candlestick.series,"candlestick",a.candlestick.i)),a.boxPlot.series.length>0&&m.push(h.draw(a.boxPlot.series,"boxPlot",a.boxPlot.i)),a.rangeBar.series.length>0&&m.push(s.rangeBar.draw(a.rangeBar.series,a.rangeBar.i)),a.scatter.series.length>0){var A=new lk(s,n,!0);m.push(A.draw(a.scatter.series,"scatter",a.scatter.i))}if(a.bubble.series.length>0){var S=new lk(s,n,!0);m.push(S.draw(a.bubble.series,"bubble",a.bubble.i))}}else switch(o.chart.type){case"line":m=d.draw(r.series,"line");break;case"area":m=d.draw(r.series,"area");break;case"bar":o.chart.stacked?m=new QT(s,n).draw(r.series):(s.bar=new sp(s,n),m=s.bar.draw(r.series));break;case"candlestick":m=new rk(s,n).draw(r.series,"candlestick");break;case"boxPlot":m=new rk(s,n).draw(r.series,o.chart.type);break;case"rangeBar":m=s.rangeBar.draw(r.series);break;case"rangeArea":m=d.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":m=new t2t(s,n).draw(r.series);break;case"treemap":m=new c2t(s,n).draw(r.series);break;case"pie":case"donut":case"polarArea":m=s.pie.draw(r.series);break;case"radialBar":m=f.draw(r.series);break;case"radar":m=p.draw(r.series);break;default:m=d.draw(r.series)}return m}},{key:"setSVGDimensions",value:function(){var e=this.w,n=e.globals,i=e.config;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto",n.svgWidth=i.chart.width,n.svgHeight=i.chart.height;var s=he.getDimensions(this.el),o=i.chart.width.toString().split(/[0-9]+/g).pop();o==="%"?he.isNumber(s[0])&&(s[0].width===0&&(s=he.getDimensions(this.el.parentNode)),n.svgWidth=s[0]*parseInt(i.chart.width,10)/100):o!=="px"&&o!==""||(n.svgWidth=parseInt(i.chart.width,10));var r=String(i.chart.height).toString().split(/[0-9]+/g).pop();if(n.svgHeight!=="auto"&&n.svgHeight!=="")if(r==="%"){var a=he.getDimensions(this.el.parentNode);n.svgHeight=a[1]*parseInt(i.chart.height,10)/100}else n.svgHeight=parseInt(i.chart.height,10);else n.svgHeight=n.axisCharts?n.svgWidth/1.61:n.svgWidth/1.2;if(n.svgWidth=Math.max(n.svgWidth,0),n.svgHeight=Math.max(n.svgHeight,0),Ne.setAttrs(n.dom.Paper.node,{width:n.svgWidth,height:n.svgHeight}),r!=="%"){var l=i.chart.sparkline.enabled?0:n.axisCharts?i.chart.parentHeightOffset:0;n.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(n.svgHeight+l,"px")}n.dom.elWrap.style.width="".concat(n.svgWidth,"px"),n.dom.elWrap.style.height="".concat(n.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var e=this.w.globals,n=e.translateY,i=e.translateX;Ne.setAttrs(e.dom.elGraphical.node,{transform:"translate(".concat(i,", ").concat(n,")")})}},{key:"resizeNonAxisCharts",value:function(){var e=this.w,n=e.globals,i=0,s=e.config.chart.sparkline.enabled?1:15;s+=e.config.grid.padding.bottom,["top","bottom"].includes(e.config.legend.position)&&e.config.legend.show&&!e.config.legend.floating&&(i=new $j(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var o=e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*e.globals.radialSize;if(o&&!e.config.chart.sparkline.enabled&&e.config.plotOptions.radialBar.startAngle!==0){var a=he.getBoundingClientRect(o);r=a.bottom;var l=a.bottom-a.top;r=Math.max(2.05*e.globals.radialSize,l)}var c=Math.ceil(r+n.translateY+i+s);n.dom.elLegendForeign&&n.dom.elLegendForeign.setAttribute("height",c),e.config.chart.height&&String(e.config.chart.height).includes("%")||(n.dom.elWrap.style.height="".concat(c,"px"),Ne.setAttrs(n.dom.Paper.node,{height:c}),n.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(c,"px"))}},{key:"coreCalculations",value:function(){new e6(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,n=function(){return e.w.config.series.map(function(){return[]})},i=new kj,s=this.w.globals;i.initGlobalVars(s),s.seriesXvalues=n(),s.seriesYvalues=n()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var e=this.w,n=null;if(e.globals.axisCharts){if(e.config.xaxis.crosshairs.position==="back"&&new t6(this.ctx).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position==="back"&&new t6(this.ctx).drawYCrosshairs(),e.config.xaxis.type==="datetime"&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new d2t(this.ctx);var i=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}n=new ys(this.ctx).getCalculatedRatios()}return n}},{key:"updateSourceChart",value:function(e){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var e=this,n=this.ctx,i=this.w;if(i.config.chart.brush.enabled&&typeof i.config.chart.events.selection!="function"){var s=Array.isArray(i.config.chart.brush.targets)?i.config.chart.brush.targets:[i.config.chart.brush.target];s.forEach(function(o){var r=n.constructor.getChartByID(o);r.w.globals.brushSource=e.ctx,typeof r.w.config.chart.events.zoomed!="function"&&(r.w.config.chart.events.zoomed=function(){return e.updateSourceChart(r)}),typeof r.w.config.chart.events.scrolled!="function"&&(r.w.config.chart.events.scrolled=function(){return e.updateSourceChart(r)})}),i.config.chart.events.selection=function(o,r){s.forEach(function(a){n.constructor.getChartByID(a).ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max}},!1,!1,!1,!1)})}}}}]),t}(),f2t=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"_updateOptions",value:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],o=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],r=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return new Promise(function(a){var l=[n.ctx];o&&(l=n.ctx.getSyncedCharts()),n.ctx.w.globals.isExecCalled&&(l=[n.ctx],n.ctx.w.globals.isExecCalled=!1),l.forEach(function(c,u){var d=c.w;if(d.globals.shouldAnimate=s,i||(d.globals.resized=!0,d.globals.dataChanged=!0,s&&c.series.getPreviousPaths()),e&&tp(e)==="object"&&(c.config=new S1(e),e=ys.extendArrayProps(c.config,e,d),c.w.globals.chartID!==n.ctx.w.globals.chartID&&delete e.series,d.config=he.extend(d.config,e),r&&(d.globals.lastXAxis=e.xaxis?he.clone(e.xaxis):[],d.globals.lastYAxis=e.yaxis?he.clone(e.yaxis):[],d.globals.initialConfig=he.extend({},d.config),d.globals.initialSeries=he.clone(d.config.series),e.series))){for(var h=0;h<d.globals.collapsedSeriesIndices.length;h++){var f=d.config.series[d.globals.collapsedSeriesIndices[h]];d.globals.collapsedSeries[h].data=d.globals.axisCharts?f.data.slice():f}for(var p=0;p<d.globals.ancillaryCollapsedSeriesIndices.length;p++){var m=d.config.series[d.globals.ancillaryCollapsedSeriesIndices[p]];d.globals.ancillaryCollapsedSeries[p].data=d.globals.axisCharts?m.data.slice():m}c.series.emptyCollapsedSeries(d.config.series)}return c.update(e).then(function(){u===l.length-1&&a(c)})})})}},{key:"_updateSeries",value:function(e,n){var i=this,s=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return new Promise(function(o){var r,a=i.w;return a.globals.shouldAnimate=n,a.globals.dataChanged=!0,n&&i.ctx.series.getPreviousPaths(),a.globals.axisCharts?((r=e.map(function(l,c){return i._extendSeries(l,c)})).length===0&&(r=[{data:[]}]),a.config.series=r):a.config.series=e.slice(),s&&(a.globals.initialConfig.series=he.clone(a.config.series),a.globals.initialSeries=he.clone(a.config.series)),i.ctx.update().then(function(){o(i.ctx)})})}},{key:"_extendSeries",value:function(e,n){var i=this.w,s=i.config.series[n];return tt(tt({},i.config.series[n]),{},{name:e.name?e.name:s==null?void 0:s.name,color:e.color?e.color:s==null?void 0:s.color,type:e.type?e.type:s==null?void 0:s.type,group:e.group?e.group:s==null?void 0:s.group,hidden:e.hidden!==void 0?e.hidden:s==null?void 0:s.hidden,data:e.data?e.data:s==null?void 0:s.data,zIndex:e.zIndex!==void 0?e.zIndex:n})}},{key:"toggleDataPointSelection",value:function(e,n){var i=this.w,s=null,o=".apexcharts-series[data\\:realIndex='".concat(e,"']");return i.globals.axisCharts?s=i.globals.dom.Paper.findOne("".concat(o," path[j='").concat(n,"'], ").concat(o," circle[j='").concat(n,"'], ").concat(o," rect[j='").concat(n,"']")):n===void 0&&(s=i.globals.dom.Paper.findOne("".concat(o," path[j='").concat(e,"']")),i.config.chart.type!=="pie"&&i.config.chart.type!=="polarArea"&&i.config.chart.type!=="donut"||this.ctx.pie.pieClicked(e)),s?(new Ne(this.ctx).pathMouseDown(s,null),s.node?s.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(e){var n=this.w;if(["min","max"].forEach(function(s){e.xaxis[s]!==void 0&&(n.config.xaxis[s]=e.xaxis[s],n.globals.lastXAxis[s]=e.xaxis[s])}),e.xaxis.categories&&e.xaxis.categories.length&&(n.config.xaxis.categories=e.xaxis.categories),n.config.xaxis.convertedCatToNumeric){var i=new x1(e);e=i.convertCatToNumericXaxis(e,this.ctx)}return e}},{key:"forceYAxisUpdate",value:function(e){return e.chart&&e.chart.stacked&&e.chart.stackType==="100%"&&(Array.isArray(e.yaxis)?e.yaxis.forEach(function(n,i){e.yaxis[i].min=0,e.yaxis[i].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}},{key:"revertDefaultAxisMinMax",value:function(e){var n=this,i=this.w,s=i.globals.lastXAxis,o=i.globals.lastYAxis;e&&e.xaxis&&(s=e.xaxis),e&&e.yaxis&&(o=e.yaxis),i.config.xaxis.min=s.min,i.config.xaxis.max=s.max;var r=function(a){o[a]!==void 0&&(i.config.yaxis[a].min=o[a].min,i.config.yaxis[a].max=o[a].max)};i.config.yaxis.map(function(a,l){i.globals.zoomed||o[l]!==void 0?r(l):n.ctx.opts.yaxis[l]!==void 0&&(a.min=n.ctx.opts.yaxis[l].min,a.max=n.ctx.opts.yaxis[l].max)})}}]),t}();(function(){function t(){for(var o=arguments.length>0&&arguments[0]!==d?arguments[0]:[],r=arguments.length>1?arguments[1]:d,a=arguments.length>2?arguments[2]:d,l=arguments.length>3?arguments[3]:d,c=arguments.length>4?arguments[4]:d,u=arguments.length>5?arguments[5]:d,d=arguments.length>6?arguments[6]:d,h=o.slice(r,a||d),f=l.slice(c,u||d),p=0,m={pos:[0,0],start:[0,0]},b={pos:[0,0],start:[0,0]};h[p]=e.call(m,h[p]),f[p]=e.call(b,f[p]),h[p][0]!=f[p][0]||h[p][0]=="M"||h[p][0]=="A"&&(h[p][4]!=f[p][4]||h[p][5]!=f[p][5])?(Array.prototype.splice.apply(h,[p,1].concat(i.call(m,h[p]))),Array.prototype.splice.apply(f,[p,1].concat(i.call(b,f[p])))):(h[p]=n.call(m,h[p]),f[p]=n.call(b,f[p])),!(++p==h.length&&p==f.length);)p==h.length&&h.push(["C",m.pos[0],m.pos[1],m.pos[0],m.pos[1],m.pos[0],m.pos[1]]),p==f.length&&f.push(["C",b.pos[0],b.pos[1],b.pos[0],b.pos[1],b.pos[0],b.pos[1]]);return{start:h,dest:f}}function e(o){switch(o[0]){case"z":case"Z":o[0]="L",o[1]=this.start[0],o[2]=this.start[1];break;case"H":o[0]="L",o[2]=this.pos[1];break;case"V":o[0]="L",o[2]=o[1],o[1]=this.pos[0];break;case"T":o[0]="Q",o[3]=o[1],o[4]=o[2],o[1]=this.reflection[1],o[2]=this.reflection[0];break;case"S":o[0]="C",o[6]=o[4],o[5]=o[3],o[4]=o[2],o[3]=o[1],o[2]=this.reflection[1],o[1]=this.reflection[0]}return o}function n(o){var r=o.length;return this.pos=[o[r-2],o[r-1]],"SCQT".indexOf(o[0])!=-1&&(this.reflection=[2*this.pos[0]-o[r-4],2*this.pos[1]-o[r-3]]),o}function i(o){var r=[o];switch(o[0]){case"M":return this.pos=this.start=[o[1],o[2]],r;case"L":o[5]=o[3]=o[1],o[6]=o[4]=o[2],o[1]=this.pos[0],o[2]=this.pos[1];break;case"Q":o[6]=o[4],o[5]=o[3],o[4]=1*o[4]/3+2*o[2]/3,o[3]=1*o[3]/3+2*o[1]/3,o[2]=1*this.pos[1]/3+2*o[2]/3,o[1]=1*this.pos[0]/3+2*o[1]/3;break;case"A":r=function(a,l){var c,u,d,h,f,p,m,b,w,k,C,A,S,M,P,T,I,L,R,V,H,F,U,Y,z,X,Z=Math.abs(l[1]),G=Math.abs(l[2]),Q=l[3]%360,ne=l[4],K=l[5],ae=l[6],ge=l[7],Ce=new Dn(a),oe=new Dn(ae,ge),pe=[];if(Z===0||G===0||Ce.x===oe.x&&Ce.y===oe.y)return[["C",Ce.x,Ce.y,oe.x,oe.y,oe.x,oe.y]];for(c=new Dn((Ce.x-oe.x)/2,(Ce.y-oe.y)/2).transform(new ln().rotate(Q)),u=c.x*c.x/(Z*Z)+c.y*c.y/(G*G),u>1&&(Z*=u=Math.sqrt(u),G*=u),d=new ln().rotate(Q).scale(1/Z,1/G).rotate(-Q),Ce=Ce.transform(d),oe=oe.transform(d),h=[oe.x-Ce.x,oe.y-Ce.y],p=h[0]*h[0]+h[1]*h[1],f=Math.sqrt(p),h[0]/=f,h[1]/=f,m=p<4?Math.sqrt(1-p/4):0,ne===K&&(m*=-1),b=new Dn((oe.x+Ce.x)/2+m*-h[1],(oe.y+Ce.y)/2+m*h[0]),w=new Dn(Ce.x-b.x,Ce.y-b.y),k=new Dn(oe.x-b.x,oe.y-b.y),C=Math.acos(w.x/Math.sqrt(w.x*w.x+w.y*w.y)),w.y<0&&(C*=-1),A=Math.acos(k.x/Math.sqrt(k.x*k.x+k.y*k.y)),k.y<0&&(A*=-1),K&&C>A&&(A+=2*Math.PI),!K&&C<A&&(A-=2*Math.PI),M=Math.ceil(2*Math.abs(C-A)/Math.PI),T=[],I=C,S=(A-C)/M,P=4*Math.tan(S/4)/3,H=0;H<=M;H++)R=Math.cos(I),L=Math.sin(I),V=new Dn(b.x+R,b.y+L),T[H]=[new Dn(V.x+P*L,V.y-P*R),V,new Dn(V.x-P*L,V.y+P*R)],I+=S;for(T[0][0]=T[0][1].clone(),T[T.length-1][2]=T[T.length-1][1].clone(),d=new ln().rotate(Q).scale(Z,G).rotate(-Q),H=0,F=T.length;H<F;H++)T[H][0]=T[H][0].transform(d),T[H][1]=T[H][1].transform(d),T[H][2]=T[H][2].transform(d);for(H=1,F=T.length;H<F;H++)U=(V=T[H-1][2]).x,Y=V.y,z=(V=T[H][0]).x,X=V.y,ae=(V=T[H][1]).x,ge=V.y,pe.push(["C",U,Y,z,X,ae,ge]);return pe}(this.pos,o),o=r[0]}return o[0]="C",this.pos=[o[5],o[6]],this.reflection=[2*o[5]-o[3],2*o[6]-o[4]],r}function s(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;if(r===!1)return!1;for(var a=r,l=o.length;a<l;++a)if(o[a][0]=="M")return a;return!1}At(Vr,{morph:function(o,r,a,l,c){for(var u=this.parse(o),d=this.parse(r),h=0,f=0,p=!1,m=!1;h!==!1||f!==!1;){var b;p=s(u,h!==!1&&h+1),m=s(d,f!==!1&&f+1),h===!1&&(h=(b=new Vr(w.start).bbox()).height==0||b.width==0?u.push(u[0])-1:u.push(["M",b.x+b.width/2,b.y+b.height/2])-1),f===!1&&(f=(b=new Vr(w.dest).bbox()).height==0||b.width==0?d.push(d[0])-1:d.push(["M",b.x+b.width/2,b.y+b.height/2])-1);var w=t(u,h,p,d,f,m);u=u.slice(0,h).concat(w.start,p===!1?[]:u.slice(p)),d=d.slice(0,f).concat(w.dest,m===!1?[]:d.slice(m)),h=p!==!1&&h+w.start.length,f=m!==!1&&f+w.dest.length}this._array=u,this.destination=new Vr,this.destination._array=d;var k=this.fromArray(u.map(function(C,A){var S=d[A].map(function(M,P){return P===0?M:l.step(C[P],d[A][P],a,c[A],c)});return S}));return k}})})();const eP=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class p2t{constructor(e){e.remember("_draggable",this),this.el=e,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(e){e?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(e){const n=!e.type.indexOf("mouse");if(n&&e.which!==1&&e.buttons!==0||this.el.dispatch("beforedrag",{event:e,handler:this}).defaultPrevented)return;e.preventDefault(),e.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point(eP(e));const i=(n?"mouseup":"touchend")+".drag";cl(window,(n?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),cl(window,i,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:e,handler:this,box:this.box})}drag(e){const{box:n,lastClick:i}=this,s=this.el.point(eP(e)),o=s.x-i.x,r=s.y-i.y;if(!o&&!r)return n;const a=n.x+o,l=n.y+r;this.box=new Ys(a,l,n.w,n.h),this.lastClick=s,this.el.dispatch("dragmove",{event:e,handler:this,box:this.box}).defaultPrevented||this.move(a,l)}move(e,n){this.el.type==="svg"?Oc.prototype.move.call(this.el,e,n):this.el.move(e,n)}endDrag(e){this.drag(e),this.el.fire("dragend",{event:e,handler:this,box:this.box}),dr(window,"mousemove.drag"),dr(window,"touchmove.drag"),dr(window,"mouseup.drag"),dr(window,"touchend.drag"),this.init(!0)}}/*!
280 +* @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse
281 +* @version 4.0.1
282 +* https://github.com/svgdotjs/svg.select.js
283 +*
284 +* @copyright Ulrich-Matthias Schäfer
285 +* @license MIT
286 +*
287 +* BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time)
288 +*/function n6(t,e,n,i=null){return function(s){s.preventDefault(),s.stopPropagation();var o=s.pageX||s.touches[0].pageX,r=s.pageY||s.touches[0].pageY;e.fire(t,{x:o,y:r,event:s,index:i,points:n})}}function s6([t,e],{a:n,b:i,c:s,d:o,e:r,f:a}){return[t*n+e*s+r,t*i+e*o+a]}At(mi,{draggable(t=!0){return(this.remember("_draggable")||new p2t(this)).init(t),this}});let Oj=class{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new Oc,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=Cv();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach((t,e,n)=>{const i=this.order[e];this.createHandle.call(this,this.selection,t,e,n,i),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+i).on("mousedown.selection touchstart.selection",n6(i,this.el,this.handlePoints,e))})}createHandleFn(t){t.polyline()}updateHandleFn(t,e,n,i){const s=i.at(n-1),o=i[(n+1)%i.length],r=e,a=[r[0]-s[0],r[1]-s[1]],l=[r[0]-o[0],r[1]-o[1]],c=Math.sqrt(a[0]*a[0]+a[1]*a[1]),u=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[a[0]/c,a[1]/c],h=[l[0]/u,l[1]/u],f=[r[0]-10*d[0],r[1]-10*d[1]],p=[r[0]-10*h[0],r[1]-10*h[1]];t.plot([f,r,p])}updateResizeHandles(){this.handlePoints.forEach((t,e,n)=>{const i=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,n,i)})}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const n=this.getPoint("t");t.get(0).plot(n[0],n[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",n6("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map(n=>s6(n,e)),this.rotationPoint=s6(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:n,y2:i,cx:s,cy:o}=this.el.bbox()){return[[t,n],[s,n],[e,n],[e,o],[e,i],[s,i],[t,i],[t,o]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}};const tP=t=>function(e=!0,n={}){typeof e=="object"&&(n=e,e=!0);let i=this.remember("_"+t.name);return i||(e.prototype instanceof Oj?(i=new e(this),e=!0):i=new t(this),this.remember("_"+t.name,i)),i.active(e,n),this};/*!
289 +* @svgdotjs/svg.resize.js - An extension for svg.js which allows to resize elements which are selected
290 +* @version 2.0.4
291 +* https://github.com/svgdotjs/svg.resize.js
292 +*
293 +* @copyright [object Object]
294 +* @license MIT
295 +*
296 +* BUILT: Fri Sep 13 2024 12:43:14 GMT+0200 (Central European Summer Time)
297 +*//*!
298 +* @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse
299 +* @version 4.0.1
300 +* https://github.com/svgdotjs/svg.select.js
301 +*
302 +* @copyright Ulrich-Matthias Schäfer
303 +* @license MIT
304 +*
305 +* BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time)
306 +*/function i6(t,e,n,i=null){return function(s){s.preventDefault(),s.stopPropagation();var o=s.pageX||s.touches[0].pageX,r=s.pageY||s.touches[0].pageY;e.fire(t,{x:o,y:r,event:s,index:i,points:n})}}function o6([t,e],{a:n,b:i,c:s,d:o,e:r,f:a}){return[t*n+e*s+r,t*i+e*o+a]}At(mi,{select:tP(Oj)}),At([Wu,Yu,ju],{pointSelect:tP(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new Oc,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=Cv();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach((t,e,n)=>{this.createHandle.call(this,this.selection,t,e,n),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",n6("point",this.el,this.points,e))})}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach((t,e,n)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,n)})}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map(e=>s6(e,t))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class Dj{constructor(e){this.el=e,e.remember("_selectHandler",this),this.selection=new Oc,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const n=Cv();this.observer=new n.MutationObserver(this.mutationHandler)}init(e){this.createHandle=e.createHandle||this.createHandleFn,this.createRot=e.createRot||this.createRotFn,this.updateHandle=e.updateHandle||this.updateHandleFn,this.updateRot=e.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(e,n){if(!e)return this.selection.clear().remove(),void this.observer.disconnect();this.init(n)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach((e,n,i)=>{const s=this.order[n];this.createHandle.call(this,this.selection,e,n,i,s),this.selection.get(n+1).addClass("svg_select_handle svg_select_handle_"+s).on("mousedown.selection touchstart.selection",i6(s,this.el,this.handlePoints,n))})}createHandleFn(e){e.polyline()}updateHandleFn(e,n,i,s){const o=s.at(i-1),r=s[(i+1)%s.length],a=n,l=[a[0]-o[0],a[1]-o[1]],c=[a[0]-r[0],a[1]-r[1]],u=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=Math.sqrt(c[0]*c[0]+c[1]*c[1]),h=[l[0]/u,l[1]/u],f=[c[0]/d,c[1]/d],p=[a[0]-10*h[0],a[1]-10*h[1]],m=[a[0]-10*f[0],a[1]-10*f[1]];e.plot([p,a,m])}updateResizeHandles(){this.handlePoints.forEach((e,n,i)=>{const s=this.order[n];this.updateHandle.call(this,this.selection.get(n+1),e,n,i,s)})}createRotFn(e){e.line(),e.circle(5)}getPoint(e){return this.handlePoints[this.order.indexOf(e)]}getPointHandle(e){return this.selection.get(this.order.indexOf(e)+1)}updateRotFn(e,n){const i=this.getPoint("t");e.get(0).plot(i[0],i[1],n[0],n[1]),e.get(1).center(n[0],n[1])}createRotationHandle(){const e=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",i6("rot",this.el,this.handlePoints));this.createRot.call(this,e)}updateRotationHandle(){const e=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(e,this.rotationPoint,this.handlePoints)}updatePoints(){const e=this.el.bbox(),n=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(e).map(i=>o6(i,n)),this.rotationPoint=o6(this.getRotationPoint(e),n)}getHandlePoints({x:e,x2:n,y:i,y2:s,cx:o,cy:r}=this.el.bbox()){return[[e,i],[o,i],[n,i],[n,r],[n,s],[o,s],[e,s],[e,r]]}getRotationPoint({y:e,cx:n}=this.el.bbox()){return[n,e-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const nP=t=>function(e=!0,n={}){typeof e=="object"&&(n=e,e=!0);let i=this.remember("_"+t.name);return i||(e.prototype instanceof Dj?(i=new e(this),e=!0):i=new t(this),this.remember("_"+t.name,i)),i.active(e,n),this};At(mi,{select:nP(Dj)}),At([Wu,Yu,ju],{pointSelect:nP(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new Oc,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=Cv();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach((t,e,n)=>{this.createHandle.call(this,this.selection,t,e,n),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",i6("point",this.el,this.points,e))})}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach((t,e,n)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,n)})}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map(e=>o6(e,t))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const w_=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),sP=t=>{let e=1/0,n=1/0,i=-1/0,s=-1/0;for(let o=0;o<t.length;o++){const r=t[o];e=Math.min(e,r[0]),n=Math.min(n,r[1]),i=Math.max(i,r[0]),s=Math.max(s,r[1])}return new Ys(e,n,i-e,s-n)};class iP{constructor(e){this.el=e,e.remember("_ResizeHandler",this),this.lastCoordinates=null,this.eventType="",this.lastEvent=null,this.handleResize=this.handleResize.bind(this),this.resize=this.resize.bind(this),this.endResize=this.endResize.bind(this),this.rotate=this.rotate.bind(this),this.movePoint=this.movePoint.bind(this)}active(e,n){this.preserveAspectRatio=n.preserveAspectRatio??!1,this.aroundCenter=n.aroundCenter??!1,this.grid=n.grid??0,this.degree=n.degree??0,this.el.off(".resize"),e&&(this.el.on(["lt.resize","rt.resize","rb.resize","lb.resize","t.resize","r.resize","b.resize","l.resize","rot.resize","point.resize"],this.handleResize),this.lastEvent&&(this.eventType==="rot"?this.rotate(this.lastEvent):this.eventType==="point"?this.movePoint(this.lastEvent):this.resize(this.lastEvent)))}handleResize(e){this.eventType=e.type;const{event:n,index:i,points:s}=e.detail,o=!n.type.indexOf("mouse");if(o&&(n.which||n.buttons)!==1||this.el.dispatch("beforeresize",{event:e,handler:this}).defaultPrevented)return;this.box=this.el.bbox(),this.startPoint=this.el.point(w_(n)),this.index=i,this.points=s.slice();const r=(o?"mousemove":"touchmove")+".resize",a=(o?"mouseup":"touchcancel.resize touchend")+".resize";e.type==="point"?cl(window,r,this.movePoint):e.type==="rot"?cl(window,r,this.rotate):cl(window,r,this.resize),cl(window,a,this.endResize)}resize(e){this.lastEvent=e;const n=this.snapToGrid(this.el.point(w_(e)));let i=n.x-this.startPoint.x,s=n.y-this.startPoint.y;this.preserveAspectRatio&&this.aroundCenter&&(i*=2,s*=2);const o=this.box.x+i,r=this.box.y+s,a=this.box.x2+i,l=this.box.y2+s;let c=new Ys(this.box);if(this.eventType.includes("l")&&(c.x=Math.min(o,this.box.x2),c.x2=Math.max(o,this.box.x2)),this.eventType.includes("r")&&(c.x=Math.min(a,this.box.x),c.x2=Math.max(a,this.box.x)),this.eventType.includes("t")&&(c.y=Math.min(r,this.box.y2),c.y2=Math.max(r,this.box.y2)),this.eventType.includes("b")&&(c.y=Math.min(l,this.box.y),c.y2=Math.max(l,this.box.y)),c.width=c.x2-c.x,c.height=c.y2-c.y,this.preserveAspectRatio){const u=c.width/this.box.width,d=c.height/this.box.height,h=["lt","t","rt","r","rb","b","lb","l"],f=(h.indexOf(this.eventType)+4)%h.length,p=this.aroundCenter?[this.box.cx,this.box.cy]:this.points[f];let m=this.eventType.includes("t")||this.eventType.includes("b")?d:u;m=this.eventType.length===2?Math.max(u,d):m,c=function(b,w,k){const C=[[b.x,b.y],[b.x+b.width,b.y],[b.x+b.width,b.y+b.height],[b.x,b.y+b.height]].map(([A,S])=>{const M=A-w[0],P=(S-w[1])*k;return[M*k+w[0],P+w[1]]});return sP(C)}(this.box,p,m)}this.el.dispatch("resize",{box:new Ys(c),angle:0,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.size(c.width,c.height).move(c.x,c.y)}movePoint(e){this.lastEvent=e;const{x:n,y:i}=this.snapToGrid(this.el.point(w_(e))),s=this.el.array().slice();s[this.index]=[n,i],this.el.dispatch("resize",{box:sP(s),angle:0,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.plot(s)}rotate(e){this.lastEvent=e;const n=this.startPoint,i=this.el.point(w_(e)),{cx:s,cy:o}=this.box,r=n.x-s,a=n.y-o,l=i.x-s,c=i.y-o,u=Math.sqrt(r*r+a*a)*Math.sqrt(l*l+c*c);if(u===0)return;let d=Math.acos((r*l+a*c)/u)/Math.PI*180;if(!d)return;i.x<n.x&&(d=-d);const h=new ln(this.el),{x:f,y:p}=new Dn(s,o).transformO(h),{rotate:m}=h.decompose(),b=this.snapToAngle(m+d)-m;this.el.dispatch("resize",{box:this.box,angle:b,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.transform(h.rotateO(b,f,p))}endResize(e){this.eventType!=="rot"&&this.eventType!=="point"&&this.resize(e),this.lastEvent=null,this.eventType="",dr(window,"mousemove.resize touchmove.resize"),dr(window,"mouseup.resize touchend.resize")}snapToGrid(e){return this.grid&&(e.x=Math.round(e.x/this.grid)*this.grid,e.y=Math.round(e.y/this.grid)*this.grid),e}snapToAngle(e){return this.degree&&(e=Math.round(e/this.degree)*this.degree),e}}At(mi,{resize:function(t=!0,e={}){typeof t=="object"&&(e=t,t=!0);let n=this.remember("_ResizeHandler");return n||(t.prototype instanceof iP?(n=new t(this),t=!0):n=new iP(this),this.remember("_resizeHandler",n)),n.active(t,e),this}}),window.SVG===void 0&&(window.SVG=Mbt),window.Apex===void 0&&(window.Apex={});var oP=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new Dp(this.ctx),this.ctx.axes=new Nbt(this.ctx),this.ctx.core=new h2t(this.ctx.el,this.ctx),this.ctx.config=new S1({}),this.ctx.data=new JS(this.ctx),this.ctx.grid=new xj(this.ctx),this.ctx.graphics=new Ne(this.ctx),this.ctx.coreUtils=new ys(this.ctx),this.ctx.crosshairs=new t6(this.ctx),this.ctx.events=new Vbt(this.ctx),this.ctx.exports=new rb(this.ctx),this.ctx.fill=new Xr(this.ctx),this.ctx.localization=new Fbt(this.ctx),this.ctx.options=new Du,this.ctx.responsive=new Bbt(this.ctx),this.ctx.series=new gr(this.ctx),this.ctx.theme=new zbt(this.ctx),this.ctx.formatters=new $v(this.ctx),this.ctx.titleSubtitle=new Hbt(this.ctx),this.ctx.legend=new $j(this.ctx),this.ctx.toolbar=new Aj(this.ctx),this.ctx.tooltip=new JT(this.ctx),this.ctx.dimensions=new ab(this.ctx),this.ctx.updateHelpers=new f2t(this.ctx),this.ctx.zoomPanSelection=new Gbt(this.ctx),this.ctx.w.globals.tooltip=new JT(this.ctx)}}]),t}(),rP=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"clear",value:function(e){var n=e.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:n})}},{key:"killSVG",value:function(e){e.each(function(){this.removeClass("*"),this.off()},!0),e.clear()}},{key:"clearDomElements",value:function(e){var n=this,i=e.isUpdating,s=this.w.globals.dom.Paper.node;s.parentNode&&s.parentNode.parentNode&&!i&&(s.parentNode.parentNode.style.minHeight="unset");var o=this.w.globals.dom.baseEl;o&&this.ctx.eventList.forEach(function(a){o.removeEventListener(a,n.ctx.events.documentEvent)});var r=this.w.globals.dom;if(this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(r.Paper),r.Paper.remove(),r.elWrap=null,r.elGraphical=null,r.elLegendWrap=null,r.elLegendForeign=null,r.baseEl=null,r.elGridRect=null,r.elGridRectMask=null,r.elGridRectBarMask=null,r.elGridRectMarkerMask=null,r.elForecastMask=null,r.elNonForecastMask=null,r.elDefs=null}}]),t}(),ck=new WeakMap,m2t=function(){function t(e,n){lt(this,t),this.opts=n,this.ctx=this,this.w=new Rbt(n).init(),this.el=e,this.w.globals.cuid=he.randomId(),this.w.globals.chartID=this.w.config.chart.id?he.escapeString(this.w.config.chart.id):this.w.globals.cuid,new oP(this).initModules(),this.create=he.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return ct(t,[{key:"render",value:function(){var e=this;return new Promise(function(n,i){if(he.elementExists(e.el)){Apex._chartInstances===void 0&&(Apex._chartInstances=[]),e.w.config.chart.id&&Apex._chartInstances.push({id:e.w.globals.chartID,group:e.w.config.chart.group,chart:e}),e.setLocale(e.w.config.chart.defaultLocale);var s=e.w.config.chart.events.beforeMount;typeof s=="function"&&s(e,e.w),e.events.fireEvent("beforeMount",[e,e.w]),window.addEventListener("resize",e.windowResizeHandler),function(h,f){var p=!1;if(h.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var m=h.getBoundingClientRect();h.style.display!=="none"&&m.width!==0||(p=!0)}var b=new ResizeObserver(function(w){p&&f.call(h,w),p=!0});h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(h.children).forEach(function(w){return b.observe(w)}):b.observe(h),ck.set(f,b)}(e.el.parentNode,e.parentResizeHandler);var o=e.el.getRootNode&&e.el.getRootNode(),r=he.is("ShadowRoot",o),a=e.el.ownerDocument,l=r?o.getElementById("apexcharts-css"):a.getElementById("apexcharts-css");if(!l){var c;(l=document.createElement("style")).id="apexcharts-css",l.textContent=`@keyframes opaque {
307 + 0% {
308 + opacity: 0
309 + }
310 +
311 + to {
312 + opacity: 1
313 + }
314 +}
315 +
316 +@keyframes resizeanim {
317 +
318 + 0%,
319 + to {
320 + opacity: 0
321 + }
322 +}
323 +
324 +.apexcharts-canvas {
325 + position: relative;
326 + direction: ltr !important;
327 + user-select: none
328 +}
329 +
330 +.apexcharts-canvas ::-webkit-scrollbar {
331 + -webkit-appearance: none;
332 + width: 6px
333 +}
334 +
335 +.apexcharts-canvas ::-webkit-scrollbar-thumb {
336 + border-radius: 4px;
337 + background-color: rgba(0, 0, 0, .5);
338 + box-shadow: 0 0 1px rgba(255, 255, 255, .5);
339 + -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)
340 +}
341 +
342 +.apexcharts-inner {
343 + position: relative
344 +}
345 +
346 +.apexcharts-text tspan {
347 + font-family: inherit
348 +}
349 +
350 +rect.legend-mouseover-inactive,
351 +.legend-mouseover-inactive rect,
352 +.legend-mouseover-inactive path,
353 +.legend-mouseover-inactive circle,
354 +.legend-mouseover-inactive line,
355 +.legend-mouseover-inactive text.apexcharts-yaxis-title-text,
356 +.legend-mouseover-inactive text.apexcharts-yaxis-label {
357 + transition: .15s ease all;
358 + opacity: .2
359 +}
360 +
361 +.apexcharts-legend-text {
362 + padding-left: 15px;
363 + margin-left: -15px;
364 +}
365 +
366 +.apexcharts-series-collapsed {
367 + opacity: 0
368 +}
369 +
370 +.apexcharts-tooltip {
371 + border-radius: 5px;
372 + box-shadow: 2px 2px 6px -4px #999;
373 + cursor: default;
374 + font-size: 14px;
375 + left: 62px;
376 + opacity: 0;
377 + pointer-events: none;
378 + position: absolute;
379 + top: 20px;
380 + display: flex;
381 + flex-direction: column;
382 + overflow: hidden;
383 + white-space: nowrap;
384 + z-index: 12;
385 + transition: .15s ease all
386 +}
387 +
388 +.apexcharts-tooltip.apexcharts-active {
389 + opacity: 1;
390 + transition: .15s ease all
391 +}
392 +
393 +.apexcharts-tooltip.apexcharts-theme-light {
394 + border: 1px solid #e3e3e3;
395 + background: rgba(255, 255, 255, .96)
396 +}
397 +
398 +.apexcharts-tooltip.apexcharts-theme-dark {
399 + color: #fff;
400 + background: rgba(30, 30, 30, .8)
401 +}
402 +
403 +.apexcharts-tooltip * {
404 + font-family: inherit
405 +}
406 +
407 +.apexcharts-tooltip-title {
408 + padding: 6px;
409 + font-size: 15px;
410 + margin-bottom: 4px
411 +}
412 +
413 +.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {
414 + background: #eceff1;
415 + border-bottom: 1px solid #ddd
416 +}
417 +
418 +.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {
419 + background: rgba(0, 0, 0, .7);
420 + border-bottom: 1px solid #333
421 +}
422 +
423 +.apexcharts-tooltip-text-goals-value,
424 +.apexcharts-tooltip-text-y-value,
425 +.apexcharts-tooltip-text-z-value {
426 + display: inline-block;
427 + margin-left: 5px;
428 + font-weight: 600
429 +}
430 +
431 +.apexcharts-tooltip-text-goals-label:empty,
432 +.apexcharts-tooltip-text-goals-value:empty,
433 +.apexcharts-tooltip-text-y-label:empty,
434 +.apexcharts-tooltip-text-y-value:empty,
435 +.apexcharts-tooltip-text-z-value:empty,
436 +.apexcharts-tooltip-title:empty {
437 + display: none
438 +}
439 +
440 +.apexcharts-tooltip-text-goals-label,
441 +.apexcharts-tooltip-text-goals-value {
442 + padding: 6px 0 5px
443 +}
444 +
445 +.apexcharts-tooltip-goals-group,
446 +.apexcharts-tooltip-text-goals-label,
447 +.apexcharts-tooltip-text-goals-value {
448 + display: flex
449 +}
450 +
451 +.apexcharts-tooltip-text-goals-label:not(:empty),
452 +.apexcharts-tooltip-text-goals-value:not(:empty) {
453 + margin-top: -6px
454 +}
455 +
456 +.apexcharts-tooltip-marker {
457 + width: 12px;
458 + height: 12px;
459 + position: relative;
460 + top: 0;
461 + margin-right: 10px;
462 + border-radius: 50%
463 +}
464 +
465 +.apexcharts-tooltip-series-group {
466 + padding: 0 10px;
467 + display: none;
468 + text-align: left;
469 + justify-content: left;
470 + align-items: center
471 +}
472 +
473 +.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {
474 + opacity: 1
475 +}
476 +
477 +.apexcharts-tooltip-series-group.apexcharts-active,
478 +.apexcharts-tooltip-series-group:last-child {
479 + padding-bottom: 4px
480 +}
481 +
482 +.apexcharts-tooltip-y-group {
483 + padding: 6px 0 5px
484 +}
485 +
486 +.apexcharts-custom-tooltip,
487 +.apexcharts-tooltip-box {
488 + padding: 4px 8px
489 +}
490 +
491 +.apexcharts-tooltip-boxPlot {
492 + display: flex;
493 + flex-direction: column-reverse
494 +}
495 +
496 +.apexcharts-tooltip-box>div {
497 + margin: 4px 0
498 +}
499 +
500 +.apexcharts-tooltip-box span.value {
501 + font-weight: 700
502 +}
503 +
504 +.apexcharts-tooltip-rangebar {
505 + padding: 5px 8px
506 +}
507 +
508 +.apexcharts-tooltip-rangebar .category {
509 + font-weight: 600;
510 + color: #777
511 +}
512 +
513 +.apexcharts-tooltip-rangebar .series-name {
514 + font-weight: 700;
515 + display: block;
516 + margin-bottom: 5px
517 +}
518 +
519 +.apexcharts-xaxistooltip,
520 +.apexcharts-yaxistooltip {
521 + opacity: 0;
522 + pointer-events: none;
523 + color: #373d3f;
524 + font-size: 13px;
525 + text-align: center;
526 + border-radius: 2px;
527 + position: absolute;
528 + z-index: 10;
529 + background: #eceff1;
530 + border: 1px solid #90a4ae
531 +}
532 +
533 +.apexcharts-xaxistooltip {
534 + padding: 9px 10px;
535 + transition: .15s ease all
536 +}
537 +
538 +.apexcharts-xaxistooltip.apexcharts-theme-dark {
539 + background: rgba(0, 0, 0, .7);
540 + border: 1px solid rgba(0, 0, 0, .5);
541 + color: #fff
542 +}
543 +
544 +.apexcharts-xaxistooltip:after,
545 +.apexcharts-xaxistooltip:before {
546 + left: 50%;
547 + border: solid transparent;
548 + content: " ";
549 + height: 0;
550 + width: 0;
551 + position: absolute;
552 + pointer-events: none
553 +}
554 +
555 +.apexcharts-xaxistooltip:after {
556 + border-color: transparent;
557 + border-width: 6px;
558 + margin-left: -6px
559 +}
560 +
561 +.apexcharts-xaxistooltip:before {
562 + border-color: transparent;
563 + border-width: 7px;
564 + margin-left: -7px
565 +}
566 +
567 +.apexcharts-xaxistooltip-bottom:after,
568 +.apexcharts-xaxistooltip-bottom:before {
569 + bottom: 100%
570 +}
571 +
572 +.apexcharts-xaxistooltip-top:after,
573 +.apexcharts-xaxistooltip-top:before {
574 + top: 100%
575 +}
576 +
577 +.apexcharts-xaxistooltip-bottom:after {
578 + border-bottom-color: #eceff1
579 +}
580 +
581 +.apexcharts-xaxistooltip-bottom:before {
582 + border-bottom-color: #90a4ae
583 +}
584 +
585 +.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,
586 +.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {
587 + border-bottom-color: rgba(0, 0, 0, .5)
588 +}
589 +
590 +.apexcharts-xaxistooltip-top:after {
591 + border-top-color: #eceff1
592 +}
593 +
594 +.apexcharts-xaxistooltip-top:before {
595 + border-top-color: #90a4ae
596 +}
597 +
598 +.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,
599 +.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {
600 + border-top-color: rgba(0, 0, 0, .5)
601 +}
602 +
603 +.apexcharts-xaxistooltip.apexcharts-active {
604 + opacity: 1;
605 + transition: .15s ease all
606 +}
607 +
608 +.apexcharts-yaxistooltip {
609 + padding: 4px 10px
610 +}
611 +
612 +.apexcharts-yaxistooltip.apexcharts-theme-dark {
613 + background: rgba(0, 0, 0, .7);
614 + border: 1px solid rgba(0, 0, 0, .5);
615 + color: #fff
616 +}
617 +
618 +.apexcharts-yaxistooltip:after,
619 +.apexcharts-yaxistooltip:before {
620 + top: 50%;
621 + border: solid transparent;
622 + content: " ";
623 + height: 0;
624 + width: 0;
625 + position: absolute;
626 + pointer-events: none
627 +}
628 +
629 +.apexcharts-yaxistooltip:after {
630 + border-color: transparent;
631 + border-width: 6px;
632 + margin-top: -6px
633 +}
634 +
635 +.apexcharts-yaxistooltip:before {
636 + border-color: transparent;
637 + border-width: 7px;
638 + margin-top: -7px
639 +}
640 +
641 +.apexcharts-yaxistooltip-left:after,
642 +.apexcharts-yaxistooltip-left:before {
643 + left: 100%
644 +}
645 +
646 +.apexcharts-yaxistooltip-right:after,
647 +.apexcharts-yaxistooltip-right:before {
648 + right: 100%
649 +}
650 +
651 +.apexcharts-yaxistooltip-left:after {
652 + border-left-color: #eceff1
653 +}
654 +
655 +.apexcharts-yaxistooltip-left:before {
656 + border-left-color: #90a4ae
657 +}
658 +
659 +.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,
660 +.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {
661 + border-left-color: rgba(0, 0, 0, .5)
662 +}
663 +
664 +.apexcharts-yaxistooltip-right:after {
665 + border-right-color: #eceff1
666 +}
667 +
668 +.apexcharts-yaxistooltip-right:before {
669 + border-right-color: #90a4ae
670 +}
671 +
672 +.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,
673 +.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {
674 + border-right-color: rgba(0, 0, 0, .5)
675 +}
676 +
677 +.apexcharts-yaxistooltip.apexcharts-active {
678 + opacity: 1
679 +}
680 +
681 +.apexcharts-yaxistooltip-hidden {
682 + display: none
683 +}
684 +
685 +.apexcharts-xcrosshairs,
686 +.apexcharts-ycrosshairs {
687 + pointer-events: none;
688 + opacity: 0;
689 + transition: .15s ease all
690 +}
691 +
692 +.apexcharts-xcrosshairs.apexcharts-active,
693 +.apexcharts-ycrosshairs.apexcharts-active {
694 + opacity: 1;
695 + transition: .15s ease all
696 +}
697 +
698 +.apexcharts-ycrosshairs-hidden {
699 + opacity: 0
700 +}
701 +
702 +.apexcharts-selection-rect {
703 + cursor: move
704 +}
705 +
706 +.svg_select_shape {
707 + stroke-width: 1;
708 + stroke-dasharray: 10 10;
709 + stroke: black;
710 + stroke-opacity: 0.1;
711 + pointer-events: none;
712 + fill: none;
713 +}
714 +
715 +.svg_select_handle {
716 + stroke-width: 3;
717 + stroke: black;
718 + fill: none;
719 +}
720 +
721 +.svg_select_handle_r {
722 + cursor: e-resize;
723 +}
724 +
725 +.svg_select_handle_l {
726 + cursor: w-resize;
727 +}
728 +
729 +.apexcharts-svg.apexcharts-zoomable.hovering-zoom {
730 + cursor: crosshair
731 +}
732 +
733 +.apexcharts-svg.apexcharts-zoomable.hovering-pan {
734 + cursor: move
735 +}
736 +
737 +.apexcharts-menu-icon,
738 +.apexcharts-pan-icon,
739 +.apexcharts-reset-icon,
740 +.apexcharts-selection-icon,
741 +.apexcharts-toolbar-custom-icon,
742 +.apexcharts-zoom-icon,
743 +.apexcharts-zoomin-icon,
744 +.apexcharts-zoomout-icon {
745 + cursor: pointer;
746 + width: 20px;
747 + height: 20px;
748 + line-height: 24px;
749 + color: #6e8192;
750 + text-align: center
751 +}
752 +
753 +.apexcharts-menu-icon svg,
754 +.apexcharts-reset-icon svg,
755 +.apexcharts-zoom-icon svg,
756 +.apexcharts-zoomin-icon svg,
757 +.apexcharts-zoomout-icon svg {
758 + fill: #6e8192
759 +}
760 +
761 +.apexcharts-selection-icon svg {
762 + fill: #444;
763 + transform: scale(.76)
764 +}
765 +
766 +.apexcharts-theme-dark .apexcharts-menu-icon svg,
767 +.apexcharts-theme-dark .apexcharts-pan-icon svg,
768 +.apexcharts-theme-dark .apexcharts-reset-icon svg,
769 +.apexcharts-theme-dark .apexcharts-selection-icon svg,
770 +.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,
771 +.apexcharts-theme-dark .apexcharts-zoom-icon svg,
772 +.apexcharts-theme-dark .apexcharts-zoomin-icon svg,
773 +.apexcharts-theme-dark .apexcharts-zoomout-icon svg {
774 + fill: #f3f4f5
775 +}
776 +
777 +.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,
778 +.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,
779 +.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {
780 + fill: #008ffb
781 +}
782 +
783 +.apexcharts-theme-light .apexcharts-menu-icon:hover svg,
784 +.apexcharts-theme-light .apexcharts-reset-icon:hover svg,
785 +.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,
786 +.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,
787 +.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,
788 +.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {
789 + fill: #333
790 +}
791 +
792 +.apexcharts-menu-icon,
793 +.apexcharts-selection-icon {
794 + position: relative
795 +}
796 +
797 +.apexcharts-reset-icon {
798 + margin-left: 5px
799 +}
800 +
801 +.apexcharts-menu-icon,
802 +.apexcharts-reset-icon,
803 +.apexcharts-zoom-icon {
804 + transform: scale(.85)
805 +}
806 +
807 +.apexcharts-zoomin-icon,
808 +.apexcharts-zoomout-icon {
809 + transform: scale(.7)
810 +}
811 +
812 +.apexcharts-zoomout-icon {
813 + margin-right: 3px
814 +}
815 +
816 +.apexcharts-pan-icon {
817 + transform: scale(.62);
818 + position: relative;
819 + left: 1px;
820 + top: 0
821 +}
822 +
823 +.apexcharts-pan-icon svg {
824 + fill: #fff;
825 + stroke: #6e8192;
826 + stroke-width: 2
827 +}
828 +
829 +.apexcharts-pan-icon.apexcharts-selected svg {
830 + stroke: #008ffb
831 +}
832 +
833 +.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {
834 + stroke: #333
835 +}
836 +
837 +.apexcharts-toolbar {
838 + position: absolute;
839 + z-index: 11;
840 + max-width: 176px;
841 + text-align: right;
842 + border-radius: 3px;
843 + padding: 0 6px 2px;
844 + display: flex;
845 + justify-content: space-between;
846 + align-items: center
847 +}
848 +
849 +.apexcharts-menu {
850 + background: #fff;
851 + position: absolute;
852 + top: 100%;
853 + border: 1px solid #ddd;
854 + border-radius: 3px;
855 + padding: 3px;
856 + right: 10px;
857 + opacity: 0;
858 + min-width: 110px;
859 + transition: .15s ease all;
860 + pointer-events: none
861 +}
862 +
863 +.apexcharts-menu.apexcharts-menu-open {
864 + opacity: 1;
865 + pointer-events: all;
866 + transition: .15s ease all
867 +}
868 +
869 +.apexcharts-menu-item {
870 + padding: 6px 7px;
871 + font-size: 12px;
872 + cursor: pointer
873 +}
874 +
875 +.apexcharts-theme-light .apexcharts-menu-item:hover {
876 + background: #eee
877 +}
878 +
879 +.apexcharts-theme-dark .apexcharts-menu {
880 + background: rgba(0, 0, 0, .7);
881 + color: #fff
882 +}
883 +
884 +@media screen and (min-width:768px) {
885 + .apexcharts-canvas:hover .apexcharts-toolbar {
886 + opacity: 1
887 + }
888 +}
889 +
890 +.apexcharts-canvas .apexcharts-element-hidden,
891 +.apexcharts-datalabel.apexcharts-element-hidden,
892 +.apexcharts-hide .apexcharts-series-points {
893 + opacity: 0;
894 +}
895 +
896 +.apexcharts-hidden-element-shown {
897 + opacity: 1;
898 + transition: 0.25s ease all;
899 +}
900 +
901 +.apexcharts-datalabel,
902 +.apexcharts-datalabel-label,
903 +.apexcharts-datalabel-value,
904 +.apexcharts-datalabels,
905 +.apexcharts-pie-label {
906 + cursor: default;
907 + pointer-events: none
908 +}
909 +
910 +.apexcharts-pie-label-delay {
911 + opacity: 0;
912 + animation-name: opaque;
913 + animation-duration: .3s;
914 + animation-fill-mode: forwards;
915 + animation-timing-function: ease
916 +}
917 +
918 +.apexcharts-radialbar-label {
919 + cursor: pointer;
920 +}
921 +
922 +.apexcharts-annotation-rect,
923 +.apexcharts-area-series .apexcharts-area,
924 +.apexcharts-gridline,
925 +.apexcharts-line,
926 +.apexcharts-point-annotation-label,
927 +.apexcharts-radar-series path:not(.apexcharts-marker),
928 +.apexcharts-radar-series polygon,
929 +.apexcharts-toolbar svg,
930 +.apexcharts-tooltip .apexcharts-marker,
931 +.apexcharts-xaxis-annotation-label,
932 +.apexcharts-yaxis-annotation-label,
933 +.apexcharts-zoom-rect,
934 +.no-pointer-events {
935 + pointer-events: none
936 +}
937 +
938 +.apexcharts-tooltip-active .apexcharts-marker {
939 + transition: .15s ease all
940 +}
941 +
942 +.resize-triggers {
943 + animation: 1ms resizeanim;
944 + visibility: hidden;
945 + opacity: 0;
946 + height: 100%;
947 + width: 100%;
948 + overflow: hidden
949 +}
950 +
951 +.contract-trigger:before,
952 +.resize-triggers,
953 +.resize-triggers>div {
954 + content: " ";
955 + display: block;
956 + position: absolute;
957 + top: 0;
958 + left: 0
959 +}
960 +
961 +.resize-triggers>div {
962 + height: 100%;
963 + width: 100%;
964 + background: #eee;
965 + overflow: auto
966 +}
967 +
968 +.contract-trigger:before {
969 + overflow: hidden;
970 + width: 200%;
971 + height: 200%
972 +}
973 +
974 +.apexcharts-bar-goals-markers {
975 + pointer-events: none
976 +}
977 +
978 +.apexcharts-bar-shadows {
979 + pointer-events: none
980 +}
981 +
982 +.apexcharts-rangebar-goals-markers {
983 + pointer-events: none
984 +}`;var u=((c=e.opts.chart)===null||c===void 0?void 0:c.nonce)||e.w.config.chart.nonce;u&&l.setAttribute("nonce",u),r?o.prepend(l):a.head.appendChild(l)}var d=e.create(e.w.config.series,{});if(!d)return n(e);e.mount(d).then(function(){typeof e.w.config.chart.events.mounted=="function"&&e.w.config.chart.events.mounted(e,e.w),e.events.fireEvent("mounted",[e,e.w]),n(d)}).catch(function(h){i(h)})}else i(new Error("Element not found"))})}},{key:"create",value:function(e,n){var i=this,s=this.w;new oP(this).initModules();var o=this.w.globals;if(o.noData=!1,o.animationEnded=!1,!he.elementExists(this.el))return o.animationEnded=!0,this.destroy(),null;if(this.responsive.checkResponsiveConfig(n),s.config.xaxis.convertedCatToNumeric&&new x1(s.config).convertCatToNumericXaxis(s.config,this.ctx),this.core.setupElements(),s.config.chart.type==="treemap"&&(s.config.grid.show=!1,s.config.yaxis[0].show=!1),o.svgWidth===0)return o.animationEnded=!0,null;var r=e;e.forEach(function(h,f){h.hidden&&(r=i.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:f}))});var a=ys.checkComboSeries(r,s.config.chart.type);o.comboCharts=a.comboCharts,o.comboBarCount=a.comboBarCount;var l=r.every(function(h){return h.data&&h.data.length===0});(r.length===0||l&&o.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(r),this.theme.init(),new Np(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),o.noData&&o.collapsedSeries.length!==o.series.length&&!s.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),o.axisCharts&&(this.core.coreCalculations(),s.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=s.globals.minX,this.ctx.toolbar.maxX=s.globals.maxX),this.formatters.heatmapLabelFormatters(),new ys(this).getLargestMarkerSize(),this.dimensions.plotCoords();var c=this.core.xySettings();this.grid.createGridMask();var u=this.core.plotChartType(r,c),d=new np(this);return d.bringForward(),s.config.dataLabels.background.enabled&&d.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:u,xyRatios:c,dimensions:{plot:{left:s.globals.translateX,top:s.globals.translateY,width:s.globals.gridWidth,height:s.globals.gridHeight}}}}},{key:"mount",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=this,s=i.w;return new Promise(function(o,r){if(i.el===null)return r(new Error("Not enough data to display or target element not found"));(n===null||s.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new xj(i);var a,l,c=i.grid.drawGrid();if(i.annotations=new Dbt(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),s.config.grid.position==="back"&&(c&&s.globals.dom.elGraphical.add(c.el),c!=null&&(a=c.elGridBorders)!==null&&a!==void 0&&a.node&&s.globals.dom.elGraphical.add(c.elGridBorders)),Array.isArray(n.elGraph))for(var u=0;u<n.elGraph.length;u++)s.globals.dom.elGraphical.add(n.elGraph[u]);else s.globals.dom.elGraphical.add(n.elGraph);s.config.grid.position==="front"&&(c&&s.globals.dom.elGraphical.add(c.el),c!=null&&(l=c.elGridBorders)!==null&&l!==void 0&&l.node&&s.globals.dom.elGraphical.add(c.elGridBorders)),s.config.xaxis.crosshairs.position==="front"&&i.crosshairs.drawXCrosshairs(),s.config.yaxis[0].crosshairs.position==="front"&&i.crosshairs.drawYCrosshairs(),s.config.chart.type!=="treemap"&&i.axes.drawAxis(s.config.chart.type,c);var d=new $1(e.ctx,c),h=new QS(e.ctx,c);if(c!==null&&(d.xAxisLabelCorrections(c.xAxisTickWidth),h.setYAxisTextAlignments(),s.config.yaxis.map(function(p,m){s.globals.ignoreYAxisIndexes.indexOf(m)===-1&&h.yAxisTitleRotate(m,p.opposite)})),i.annotations.drawAxesAnnotations(),!s.globals.noData){if(s.config.tooltip.enabled&&!s.globals.noData&&i.w.globals.tooltip.drawTooltip(n.xyRatios),s.globals.axisCharts&&(s.globals.isXNumeric||s.config.xaxis.convertedCatToNumeric||s.globals.isRangeBar))(s.config.chart.zoom.enabled||s.config.chart.selection&&s.config.chart.selection.enabled||s.config.chart.pan&&s.config.chart.pan.enabled)&&i.zoomPanSelection.init({xyRatios:n.xyRatios});else{var f=s.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(function(p){f[p]=!1})}s.config.chart.toolbar.show&&!s.globals.allSeriesCollapsed&&i.toolbar.createToolbar()}s.globals.memory.methodsToExec.length>0&&s.globals.memory.methodsToExec.forEach(function(p){p.method(p.params,!1,p.context)}),s.globals.axisCharts||s.globals.noData||i.core.resizeNonAxisCharts(),o(i)})}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(n,i){var s=ck.get(i);s&&(s.disconnect(),ck.delete(i))}(this.el.parentNode,this.parentResizeHandler);var e=this.w.config.chart.id;e&&Apex._chartInstances.forEach(function(n,i){n.id===he.escapeString(e)&&Apex._chartInstances.splice(i,1)}),new rP(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],o=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],r=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],a=this.w;return a.globals.selection=void 0,e.series&&(this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map(function(l,c){return n.updateHelpers._extendSeries(l,c)})),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),a.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,i,s,o,r)}},{key:"updateSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,n,i)}},{key:"appendSeries",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],s=this.w.config.series.slice();return s.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(s,n,i)}},{key:"appendData",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var s=i.w.config.series.slice(),o=0;o<s.length;o++)if(e[o]!==null&&e[o]!==void 0)for(var r=0;r<e[o].data.length;r++)s[o].data.push(e[o].data[r]);return i.w.config.series=s,n&&(i.w.globals.initialSeries=he.clone(i.w.config.series)),this.update()}},{key:"update",value:function(e){var n=this;return new Promise(function(i,s){new rP(n.ctx).clear({isUpdating:!0});var o=n.create(n.w.config.series,e);if(!o)return i(n);n.mount(o).then(function(){typeof n.w.config.chart.events.updated=="function"&&n.w.config.chart.events.updated(n,n.w),n.events.fireEvent("updated",[n,n.w]),n.w.globals.isDirty=!0,i(n)}).catch(function(r){s(r)})})}},{key:"getSyncedCharts",value:function(){var e=this.getGroupedCharts(),n=[this];return e.length&&(n=[],e.forEach(function(i){n.push(i)})),n}},{key:"getGroupedCharts",value:function(){var e=this;return Apex._chartInstances.filter(function(n){if(n.group)return!0}).map(function(n){return e.w.config.chart.group===n.group?n.chart:e})}},{key:"toggleSeries",value:function(e){return this.series.toggleSeries(e)}},{key:"highlightSeriesOnLegendHover",value:function(e,n){return this.series.toggleSeriesOnHover(e,n)}},{key:"showSeries",value:function(e){this.series.showSeries(e)}},{key:"hideSeries",value:function(e){this.series.hideSeries(e)}},{key:"highlightSeries",value:function(e){this.series.highlightSeries(e)}},{key:"isSeriesHidden",value:function(e){this.series.isSeriesHidden(e)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.series.resetSeries(e,n)}},{key:"addEventListener",value:function(e,n){this.events.addEventListener(e,n)}},{key:"removeEventListener",value:function(e,n){this.events.removeEventListener(e,n)}},{key:"addXaxisAnnotation",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,s=this;i&&(s=i),s.annotations.addXaxisAnnotationExternal(e,n,s)}},{key:"addYaxisAnnotation",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,s=this;i&&(s=i),s.annotations.addYaxisAnnotationExternal(e,n,s)}},{key:"addPointAnnotation",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,s=this;i&&(s=i),s.annotations.addPointAnnotationExternal(e,n,s)}},{key:"clearAnnotations",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,n=this;e&&(n=e),n.annotations.clearAnnotations(n)}},{key:"removeAnnotation",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=this;n&&(i=n),i.annotations.removeAnnotation(i,e)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(e,n){return this.coreUtils.getSeriesTotalsXRange(e,n)}},{key:"getHighestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new e6(this.ctx).getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new e6(this.ctx).getMinYMaxY(e).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(e,n){return this.updateHelpers.toggleDataPointSelection(e,n)}},{key:"zoomX",value:function(e,n){this.ctx.toolbar.zoomUpdateOptions(e,n)}},{key:"setLocale",value:function(e){this.localization.setCurrentLocaleValues(e)}},{key:"dataURI",value:function(e){return new rb(this.ctx).dataURI(e)}},{key:"exportToCSV",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new rb(this.ctx).exportToCSV(e)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var e=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){e.w.globals.resized=!0,e.w.globals.dataChanged=!1,e.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var e=this.w.config.chart.redrawOnWindowResize;typeof e=="function"&&(e=e()),e&&this._windowResize()}}],[{key:"getChartByID",value:function(e){var n=he.escapeString(e);if(Apex._chartInstances){var i=Apex._chartInstances.filter(function(s){return s.id===n})[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),n=0;n<e.length;n++)new t(e[n],JSON.parse(e[n].getAttribute("data-options"))).render()}},{key:"exec",value:function(e,n){var i=this.getChartByID(e);if(i){i.w.globals.isExecCalled=!0;var s=null;if(i.publicMethods.indexOf(n)!==-1){for(var o=arguments.length,r=new Array(o>2?o-2:0),a=2;a<o;a++)r[a-2]=arguments[a];s=i[n].apply(i,r)}return s}}},{key:"merge",value:function(e,n){return he.extend(e,n)}}]),t}(),g2t=m2t;const aP=_i(g2t),lP=["animationEnd","beforeMount","mounted","updated","click","mouseMove","mouseLeave","legendClick","markerClick","selection","dataPointSelection","dataPointMouseEnter","dataPointMouseLeave","beforeZoom","beforeResetZoom","zoomed","scrolled","brushScrolled"],lb=fe({name:"apexchart",props:{options:{type:Object},type:{type:String},series:{type:Array,required:!0},width:{default:"100%"},height:{default:"auto"}},emits:lP,setup(t,{emit:e}){const n=ee(null),i=ee(null),s=R=>R&&typeof R=="object"&&!Array.isArray(R)&&R!=null,o=(R,V)=>{typeof Object.assign!="function"&&function(){Object.assign=function(F){if(F==null)throw new TypeError("Cannot convert undefined or null to object");let U=Object(F);for(let Y=1;Y<arguments.length;Y++){let z=arguments[Y];if(z!=null)for(let X in z)z.hasOwnProperty(X)&&(U[X]=z[X])}return U}}();let H=Object.assign({},R);return s(R)&&s(V)&&Object.keys(V).forEach(F=>{s(V[F])?F in R?H[F]=o(R[F],V[F]):Object.assign(H,{[F]:V[F]}):Object.assign(H,{[F]:V[F]})}),H},r=async()=>{if(await ot(),i.value)return;const R={chart:{type:t.type||t.options.chart.type||"line",height:t.height,width:t.width,events:{}},series:t.series},V=t.options.chart?t.options.chart.events:null;lP.forEach(F=>{let U=(...Y)=>e(F,...Y);R.chart.events[F]=(...Y)=>{U(...Y),V&&V.hasOwnProperty(F)&&V[F](...Y)}});const H=o(t.options,R);return i.value=new aP(n.value,H),i.value.render()},a=()=>(l(),r()),l=()=>{i.value.destroy(),i.value=null},c=(R,V)=>i.value.updateSeries(R,V),u=(R,V,H,F)=>i.value.updateOptions(R,V,H,F),d=R=>i.value.toggleSeries(R),h=R=>{i.value.showSeries(R)},f=R=>{i.value.hideSeries(R)},p=(R,V)=>i.value.appendSeries(R,V),m=()=>{i.value.resetSeries()},b=(R,V)=>{i.value.toggleDataPointSelection(R,V)},w=R=>i.value.appendData(R),k=(R,V)=>i.value.zoomX(R,V),C=R=>i.value.dataURI(R),A=R=>i.value.setLocale(R),S=(R,V)=>{i.value.addXaxisAnnotation(R,V)},M=(R,V)=>{i.value.addYaxisAnnotation(R,V)},P=(R,V)=>{i.value.addPointAnnotation(R,V)},T=(R,V)=>{i.value.removeAnnotation(R,V)},I=()=>{i.value.clearAnnotations()};Dd(()=>{window.ApexCharts=aP}),Nt(()=>{n.value=pt().proxy.$el,r()}),wn(()=>{i.value&&l()});const L=go(t);return Te(L.options,()=>{!i.value&&t.options?r():i.value.updateOptions(t.options)}),Te(L.series,()=>{!i.value&&t.series?r():i.value.updateSeries(t.series)},{deep:!0}),Te(L.type,()=>{a()}),Te(L.width,()=>{a()}),Te(L.height,()=>{a()}),{chart:i,init:r,refresh:a,destroy:l,updateOptions:u,updateSeries:c,toggleSeries:d,showSeries:h,hideSeries:f,resetSeries:m,zoomX:k,toggleDataPointSelection:b,appendData:w,appendSeries:p,addXaxisAnnotation:S,addYaxisAnnotation:M,addPointAnnotation:P,removeAnnotation:T,clearAnnotations:I,setLocale:A,dataURI:C}},render(){return bt("div",{class:"vue-apexcharts"})}}),v2t=t=>{t.component(lb.name,lb)};lb.install=v2t;const _2t={data(){return{isDarkMode:!1}},methods:{updateDarkMode(){this.isDarkMode=document.documentElement.classList.contains("dark")}},mounted(){this.updateDarkMode(),this.observer=new MutationObserver(this.updateDarkMode),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})},beforeUnmount(){this.observer&&this.observer.disconnect()}},y2t={name:"ReportsChart",mixins:[_2t],props:{data:{type:Array,default:()=>[]},seriesName:{type:String},series:{type:Array},categories:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},components:{VueApexCharts:lb},methods:{formatDate(t){const e=new Date(t),n=e.getDate().toString().padStart(2,"0"),i=(e.getMonth()+1).toString().padStart(2,"0"),s=e.getFullYear().toString().slice(-2);return`${n}-${i}-${s}`}},computed:{chartSeries(){return this.series.map(t=>({...t,data:t.data.map((e,n)=>({x:this.formatDate(this.categories[n]),y:e}))}))},chartOptions(){return{chart:{type:"area",width:"100%",toolbar:{show:!1},foreColor:"var(--fcom-primary-text)"},dataLabels:{enabled:!1},legend:{show:!0,position:"bottom",horizontalAlign:"center"},stroke:{width:[0,2,5],curve:"smooth"},xaxis:{type:"category",labels:{rotate:-45,rotateAlways:!0,hideOverlappingLabels:!0},tickPlacement:"on"},yaxis:{labels:{formatter:function(t){return Math.floor(t)===t?t:""}}},tooltip:{theme:this.isDarkMode?"dark":"light",x:{formatter:t=>t}},...this.options}}},beforeUnmount(){this.$refs.apexChart&&this.$refs.apexChart.chart&&this.$refs.apexChart.chart.destroy()}},b2t={class:"reports-chart"};function w2t(t,e,n,i,s,o){const r=B("VueApexCharts");return v(),$("div",b2t,[_(r,{ref:"apexChart",height:"350",options:o.chartOptions,series:o.chartSeries},null,8,["options","series"])])}const e9=ce(y2t,[["render",w2t]]),k2t={name:"ActivitiesChart",components:{ReportsChart:e9,Loading:Ha},props:["dateRanges"],data(){return{loading:!1,renderChart:!1,activity:"posts",activitiesFilters:[{label:this.$t("Posts"),value:"posts"},{label:this.$t("Comments"),value:"comments"},{label:this.$t("Members"),value:"members"}],chart:{xaxis:{labels:{datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd mm yy",hour:"HH:mm"}}},renderKey:null,data:[],series:[{name:this.$t("Posts"),data:[],type:"column"}],categories:[]}}},watch:{dateRanges:"fetchActivity"},methods:{fetchActivity(){this.loading=!0,this.$get("analytics/overview/activity",{start_date:this.dateRanges[0],end_date:this.dateRanges[1],activity:this.activity}).then(t=>{this.populateGraphData(t.data)}).catch(this.$handleError).finally(()=>this.loading=!1)},populateGraphData(t){this.renderChart=!1,this.chart.series[0]={data:t.data.map(n=>n.data),name:t.title,type:"column"};let e=0;this.chart.series[1]={data:t.data.map(n=>(e+=n.data,e)),name:this.$t("Cumulative"),type:"area",width:"100%"},this.chart.categories=t.data.map(n=>n.date),this.$nextTick(()=>{this.chart.renderKey=new Date().toDateString(),this.renderChart=!0})}},mounted(){this.fetchActivity()}},C2t={class:"fcom-report-chart",style:{"min-height":"400px"}},x2t={key:1},S2t={class:"fcom-report-chart-header"},$2t={class:"fcom-report-header-action"},A2t={key:0};function E2t(t,e,n,i,s,o){const r=B("Loading"),a=Zt,l=Wt,c=B("ReportsChart");return v(),$("div",C2t,[s.loading?(v(),D(r,{key:0,section:1})):(v(),$("div",x2t,[g("div",S2t,[g("h4",null,x(t.$t("Activities")),1),g("div",$2t,[_(l,{modelValue:s.activity,"onUpdate:modelValue":e[0]||(e[0]=u=>s.activity=u),onChange:o.fetchActivity},{default:y(()=>[(v(!0),$(J,null,ye(s.activitiesFilters,(u,d)=>(v(),D(a,{key:`activity-filter-${d}`,value:u.value,label:u.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue","onChange"])])]),s.renderChart?(v(),$("div",A2t,[(v(),D(c,{key:s.chart.renderKey,"series-name":t.$t("Activities"),data:s.chart.data,options:s.chart,series:s.chart.series,categories:s.chart.categories},null,8,["series-name","data","options","series","categories"]))])):O("",!0)]))])}const M2t=ce(k2t,[["render",E2t]]),T2t={name:"PopularDayTime",components:{Loading:Ha,InfoFilled:wl},props:["dateRanges"],data(){return{loading:!1,weekly_activities:{}}},watch:{dateRanges:"fetchData"},methods:{fetchData(){this.loading=!0,this.$get("analytics/overview/popular-day-time",{start_date:this.dateRanges[0],end_date:this.dateRanges[1]}).then(t=>{this.weekly_activities={...t.data,columns:t.data.columns.map(e=>({...e,width:e.prop==="time_range"?180:void 0}))}}).catch(this.$handleError).finally(()=>this.loading=!1)}},mounted(){this.fetchData()}},P2t={class:"fcom-report-popular-time"},I2t={key:1},L2t={class:"fcom-report-chart-header"};function O2t(t,e,n,i,s,o){const r=B("Loading"),a=B("InfoFilled"),l=we,c=Ss,u=Il,d=Pl;return v(),$("div",P2t,[s.loading?(v(),D(r,{key:0,section:1})):(v(),$("div",I2t,[g("div",L2t,[g("h4",null,[N(x(t.$t("Popular day & time"))+" ",1),_(c,{class:"box-item",effect:"dark",content:t.$t("Popular hour of the day and day of the week"),placement:"top-start"},{default:y(()=>[_(l,null,{default:y(()=>[_(a)]),_:1})]),_:1},8,["content"])])]),_(d,{data:s.weekly_activities.data,style:{width:"100%"}},{default:y(()=>[(v(!0),$(J,null,ye(s.weekly_activities.columns,(h,f)=>(v(),D(u,{key:`${h.prop}-${f}`,prop:h.prop,label:h.label,width:h.width},null,8,["prop","label","width"]))),128))]),_:1},8,["data"])]))])}const D2t=ce(T2t,[["render",O2t]]),R2t={name:"Overview",components:{CheckProStatus:NS,AnalyticsHeader:Y0t,AnalyticsWidgets:Q0t,ActivitiesChart:M2t,PopularDayTime:D2t},data(){return{predefinedDates:[{key:"7",label:this.$t("Last Week")},{key:"15",label:this.$t("Last 15 days")},{key:"30",label:this.$t("Last Month")},{key:"90",label:this.$t("Last Three Month")},{key:"",label:this.$t("Custom")}],predefinedDate:"30",instanceKey:null,dateRanges:[new Date(new Date().setDate(new Date().getDate()-30)).toISOString().split("T")[0],new Date().toISOString().split("T")[0]]}},computed:{isAnalyticsEnabled(){return this.hasFeature("has_analytics")}},methods:{updateDateRanges(t){this.dateRanges=t,this.instanceKey=new Date().toDateString()},updatePredefinedDate(t){this.predefinedDate=t}}},V2t={key:0},F2t={key:1},N2t={class:"fcom-report-body"};function B2t(t,e,n,i,s,o){const r=B("CheckProStatus"),a=B("AnalyticsHeader"),l=B("AnalyticsWidgets"),c=B("ActivitiesChart"),u=B("PopularDayTime");return o.isAnalyticsEnabled?(v(),$("div",F2t,[(v(),$("div",{class:"fcom-report-wrap",key:s.instanceKey},[_(a,{"predefined-date":s.predefinedDate,"predefined-dates":s.predefinedDates,"date-ranges":s.dateRanges,"onUpdate:dateRanges":o.updateDateRanges,"onUpdate:predefinedDate":o.updatePredefinedDate},null,8,["predefined-date","predefined-dates","date-ranges","onUpdate:dateRanges","onUpdate:predefinedDate"]),g("div",N2t,[_(l,{"date-ranges":s.dateRanges},null,8,["date-ranges"]),_(c,{"date-ranges":s.dateRanges},null,8,["date-ranges"]),_(u,{"date-ranges":s.dateRanges},null,8,["date-ranges"])])]))])):(v(),$("div",V2t,[_(r)]))}const z2t=ce(R2t,[["render",B2t]]),H2t={name:"AnalyticsHeader",props:{predefinedDate:{type:String,default:"30"},predefinedDates:{type:Array,required:!0},dateRanges:{type:Array,required:!0}},emits:["update:predefinedDate","update:dateRanges"],data(){return{localPredefinedDate:this.predefinedDate,localDateRanges:this.dateRanges}},methods:{setDateRange(t){if(!t||t===""){this.$nextTick(()=>{this.$refs.datePickerRef.focus()});return}const e=new Date;e.setDate(e.getDate()-parseInt(t));const n=e.toISOString().split("T")[0],i=new Date().toISOString().split("T")[0];this.localDateRanges=[n,i],this.$emit("update:dateRanges",this.localDateRanges),this.$emit("update:predefinedDate",this.localPredefinedDate)},onDateRangeChange(){this.$emit("update:dateRanges",this.localDateRanges),this.$emit("update:predefinedDate","")},disabledDate(t){return t.getTime()>Date.now()}},watch:{predefinedDate(t){this.localPredefinedDate=t},dateRanges:{handler(t){this.localDateRanges=t},deep:!0}}},U2t={class:"fcom-report-header"},j2t={class:"fcom-report-header-action"};function W2t(t,e,n,i,s,o){const r=Zt,a=Wt,l=Wd;return v(),$("div",U2t,[g("h4",null,x(t.$t("Members")),1),g("div",j2t,[_(a,{modelValue:s.localPredefinedDate,"onUpdate:modelValue":e[0]||(e[0]=c=>s.localPredefinedDate=c),onChange:o.setDateRange,class:"date-selector"},{default:y(()=>[(v(!0),$(J,null,ye(n.predefinedDates,(c,u)=>(v(),D(r,{key:`date-shortcut-${u}`,label:c.label,value:c.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"]),_(l,{modelValue:s.localDateRanges,"onUpdate:modelValue":e[1]||(e[1]=c=>s.localDateRanges=c),ref:"datePickerRef",type:"daterange","range-separator":"-",clearable:!1,"disabled-date":o.disabledDate,"start-placeholder":t.$t("Start date"),"end-placeholder":t.$t("End date"),format:t.siteDateFormat,"value-format":"YYYY-MM-DD",onChange:o.onDateRangeChange},null,8,["modelValue","disabled-date","start-placeholder","end-placeholder","format","onChange"])])])}const Y2t=ce(H2t,[["render",W2t]]),q2t={name:"AnalyticsWidgets",components:{Loading:Ha},props:["dateRanges"],data(){return{loading:!1,widgets:[]}},watch:{dateRanges:"fetchData"},mounted(){this.fetchData()},methods:{fetchData(){this.loading=!0,this.$get("analytics/members/widget",{start_date:this.dateRanges[0],end_date:this.dateRanges[1]}).then(t=>{this.widgets=Object.values(t.data).map(e=>({...e,down:e==null?void 0:e.comparison.startsWith("-")}))}).catch(this.$handleError).finally(()=>this.loading=!1)}}},G2t={key:1,class:"fcom-report-stat-widgets"},X2t={class:"stat-title"};function K2t(t,e,n,i,s,o){const r=B("Loading");return s.loading?(v(),D(r,{key:0,section:1})):(v(),$("div",G2t,[(v(!0),$(J,null,ye(s.widgets,(a,l)=>(v(),$("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",X2t,x(a.title),1),g("h3",null,[N(x(a.total_records)+" ",1),g("span",{class:q(["stat-percent",{"stat-down":a.down}])},x(a.comparison)+" % ",3)])]))),128))]))}const Z2t=ce(q2t,[["render",K2t]]),J2t={name:"MembersActivitiesChart",components:{Loading:Ha,ReportsChart:e9},props:["dateRanges"],data(){return{loading:!1,renderChart:!1,chartKey:0,chartData:[],chartOptions:{xaxis:{labels:{datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm"}}}},chartSeries:[],chartCategories:[]}},watch:{dateRanges:"fetchData"},mounted(){this.fetchData()},methods:{fetchData(){this.loading=!0,this.renderChart=!1,this.$get("analytics/members/activity",{start_date:this.dateRanges[0],end_date:this.dateRanges[1]}).then(t=>this.populateGraphData(t.data)).catch(this.$handleError).finally(()=>this.loading=!1)},populateGraphData(t){this.chartData=t.data,this.chartCategories=t.data.map(e=>e.date),this.chartSeries=[{name:t.title,data:t.data.map(e=>e.data),type:"column",color:"#6895FF"},{name:this.$t("Cumulative"),data:this.calculateCumulative(t.data),type:"area",width:"100%"}],this.renderChart=!0,this.chartKey++},calculateCumulative(t){let e=0;return t.map(n=>(e+=n.data,e))}}},Q2t={class:"fcom-report-chart",style:{"min-height":"400px"}},ewt={key:1},twt={class:"fcom-report-chart-header"},nwt={key:0};function swt(t,e,n,i,s,o){const r=B("Loading"),a=B("ReportsChart");return v(),$("div",Q2t,[s.loading?(v(),D(r,{key:0,section:1})):(v(),$("div",ewt,[g("div",twt,[g("h4",null,x(t.$t("Members Activities")),1)]),s.renderChart?(v(),$("div",nwt,[(v(),D(a,{key:s.chartKey,"series-name":t.$t("Activities"),data:s.chartData,options:s.chartOptions,series:s.chartSeries,categories:s.chartCategories},null,8,["series-name","data","options","series","categories"]))])):O("",!0)]))])}const iwt=ce(J2t,[["render",swt]]),owt={name:"TopMembersSection",components:{Loading:Ha,InfoFilled:wl},props:{title:String,tooltipContent:String,dateRanges:Array,endpoint:String,pointLabel:String},data(){return{loading:!1,members:[]}},watch:{dateRanges:"fetchData"},mounted(){this.fetchData()},methods:{fetchData(){this.loading=!0,this.$get(this.endpoint,{start_date:this.dateRanges[0],end_date:this.dateRanges[1]}).then(t=>{this.members=t.data}).catch(this.$handleError).finally(()=>this.loading=!1)}}},rwt={class:"fcom-top-members-wrap"},awt={key:1},lwt={class:"fcom-report-chart-header"},cwt={class:"fcom-members-activity-lists"},uwt={key:0},dwt={class:"image-box"},hwt=["src","alt"],fwt={class:"number"},pwt={class:"content-box"},mwt=["title"],gwt={class:"points"};function vwt(t,e,n,i,s,o){const r=B("Loading"),a=B("InfoFilled"),l=we,c=Ss;return v(),$("div",rwt,[s.loading?(v(),D(r,{key:0,section:1})):(v(),$("div",awt,[g("div",lwt,[g("h4",null,[N(x(t.$t(n.title))+" ",1),_(c,{class:"box-item",effect:"dark",content:n.tooltipContent,placement:"top-start"},{default:y(()=>[_(l,null,{default:y(()=>[_(a)]),_:1})]),_:1},8,["content"])])]),g("div",cwt,[s.members.length?(v(!0),$(J,{key:1},ye(s.members,(u,d)=>(v(),$("div",{class:"fcom-members-activity-box",key:`top-member-${d}`},[g("div",dwt,[g("img",{src:u.avatar,alt:t.$t("Member")},null,8,hwt),g("span",fwt,x(s.members.length-d),1)]),g("div",pwt,[g("h5",null,x(u.display_name),1),g("p",{title:u.created_at,class:"date meta_line"},x(t.$t("Joined %s",t.humanDateDiff(u.created_at))),9,mwt)]),g("div",gwt,x(u[n.pointLabel]),1)]))),128)):(v(),$("div",uwt,x(t.$t("No Activity")),1))])]))])}const _wt=ce(owt,[["render",vwt]]),ywt={name:"MembersAnalytics",components:{CheckProStatus:NS,AnalyticsHeader:Y2t,AnalyticsWidgets:Z2t,MembersActivitiesChart:iwt,TopMembersSection:_wt},data(){return{predefinedDates:[{key:"7",label:this.$t("Last Week")},{key:"15",label:this.$t("Last 15 days")},{key:"30",label:this.$t("Last Month")},{key:"90",label:this.$t("Last Three Month")},{key:"",label:this.$t("Custom")}],predefinedDate:"30",instanceKey:null,dateRanges:[new Date(new Date().setDate(new Date().getDate()-30)).toISOString().split("T")[0],new Date().toISOString().split("T")[0]]}},computed:{isAnalyticsEnabled(){return this.hasFeature("has_analytics")}},mounted(){this.changeTitle(this.$t("Members analytics"))},methods:{updateDateRanges(t){this.dateRanges=t,this.instanceKey=new Date().toDateString()},updatePredefinedDate(t){this.predefinedDate=t}}},bwt={key:0},wwt={key:1},kwt={class:"fcom-report-body"},Cwt={class:"fcom-members-activities-wrap"};function xwt(t,e,n,i,s,o){const r=B("CheckProStatus"),a=B("AnalyticsHeader"),l=B("AnalyticsWidgets"),c=B("MembersActivitiesChart"),u=B("TopMembersSection");return o.isAnalyticsEnabled?(v(),$("div",wwt,[(v(),$("div",{class:"fcom-report-wrap",key:s.instanceKey},[_(a,{"predefined-date":s.predefinedDate,"predefined-dates":s.predefinedDates,"date-ranges":s.dateRanges,"onUpdate:dateRanges":o.updateDateRanges,"onUpdate:predefinedDate":o.updatePredefinedDate},null,8,["predefined-date","predefined-dates","date-ranges","onUpdate:dateRanges","onUpdate:predefinedDate"]),g("div",kwt,[_(l,{"date-ranges":s.dateRanges},null,8,["date-ranges"]),_(c,{"date-ranges":s.dateRanges},null,8,["date-ranges"]),g("div",Cwt,[_(u,{title:t.$t("Top Members"),"tooltip-content":t.$t("Top members by Activity count"),"date-ranges":s.dateRanges,endpoint:"analytics/members/top-members","point-label":"total_points"},null,8,["title","tooltip-content","date-ranges"]),_(u,{title:t.$t("Post starters"),"tooltip-content":t.$t("Top Member who started the most posts"),"date-ranges":s.dateRanges,endpoint:"analytics/members/top-post-starters","point-label":"posts_count"},null,8,["title","tooltip-content","date-ranges"]),_(u,{title:t.$t("Top Commenters"),"tooltip-content":t.$t("Top Member who commented the most"),"date-ranges":s.dateRanges,endpoint:"analytics/members/top-commenters","point-label":"comments_count"},null,8,["title","tooltip-content","date-ranges"])])])]))])):(v(),$("div",bwt,[_(r)]))}const Swt=ce(ywt,[["render",xwt]]),$wt={name:"AnalyticsHeader",props:{predefinedDate:{type:String,default:"30"},predefinedDates:{type:Array,required:!0},dateRanges:{type:Array,required:!0},activeSpace:{type:Number,default:0}},emits:["update:predefinedDate","update:dateRanges","update:active-space"],data(){return{localActiveSpace:this.activeSpace,localPredefinedDate:this.predefinedDate,localDateRanges:this.dateRanges}},methods:{onSpaceChange(){this.$emit("update:active-space",this.localActiveSpace)},setDateRange(t){if(!t||t===""){this.$nextTick(()=>{this.$refs.datePickerRef.focus()});return}const e=new Date;e.setDate(e.getDate()-parseInt(t));const n=e.toISOString().split("T")[0],i=new Date().toISOString().split("T")[0];this.localDateRanges=[n,i],this.$emit("update:dateRanges",this.localDateRanges),this.$emit("update:predefinedDate",this.localPredefinedDate)},onDateRangeChange(){this.$emit("update:dateRanges",this.localDateRanges),this.$emit("update:predefinedDate","")},disabledDate(t){return t.getTime()>Date.now()}},watch:{predefinedDate(t){this.localPredefinedDate=t},dateRanges:{handler(t){this.localDateRanges=t},deep:!0}}},Awt={class:"fcom-report-header"},Ewt={class:"fcom-report-header-action"};function Mwt(t,e,n,i,s,o){const r=Zt,a=Wt,l=Wd;return v(),$("div",Awt,[g("h4",null,x(t.$t("Spaces")),1),g("div",Ewt,[_(a,{class:"space-selector",modelValue:s.localActiveSpace,"onUpdate:modelValue":e[0]||(e[0]=c=>s.localActiveSpace=c),filterable:"",placeholder:t.$t("Select Space"),onChange:o.onSpaceChange,clearable:""},{default:y(()=>[(v(!0),$(J,null,ye(t.appVars.auth.spaces,(c,u)=>(v(),D(r,{key:`space-${u}`,label:c.title,value:c.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","onChange"]),_(a,{modelValue:s.localPredefinedDate,"onUpdate:modelValue":e[1]||(e[1]=c=>s.localPredefinedDate=c),onChange:o.setDateRange,class:"date-selector"},{default:y(()=>[(v(!0),$(J,null,ye(n.predefinedDates,(c,u)=>(v(),D(r,{key:`date-shortcut-${u}`,label:c.label,value:c.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"]),_(l,{modelValue:s.localDateRanges,"onUpdate:modelValue":e[2]||(e[2]=c=>s.localDateRanges=c),ref:"datePickerRef",type:"daterange","range-separator":"-",clearable:!1,"disabled-date":o.disabledDate,"start-placeholder":t.$t("Start date"),"end-placeholder":t.$t("End date"),format:t.siteDateFormat,"value-format":"YYYY-MM-DD",onChange:o.onDateRangeChange},null,8,["modelValue","disabled-date","start-placeholder","end-placeholder","format","onChange"])])])}const Twt=ce($wt,[["render",Mwt]]),Pwt={name:"AnalyticsWidgets",components:{Loading:Ha},props:["activeSpace","dateRanges"],data(){return{loading:!1,widgets:[]}},watch:{activeSpace:"fetchData",dateRanges:"fetchData"},methods:{fetchData(){this.loading=!0,this.$get("analytics/spaces/widget",{start_date:this.dateRanges[0],end_date:this.dateRanges[1],activity:"posts",space_id:this.activeSpace}).then(t=>{this.widgets=Object.values(t.data).map(e=>({...e,down:e==null?void 0:e.comparison.startsWith("-")}))}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.fetchData()}},Iwt={class:"fcom-report-stat-widgets"},Lwt={class:"stat-title"};function Owt(t,e,n,i,s,o){const r=B("Loading");return v(),$("div",Iwt,[s.loading?(v(),D(r,{key:0,section:1})):O("",!0),s.loading?O("",!0):(v(!0),$(J,{key:1},ye(s.widgets,(a,l)=>(v(),$("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",Lwt,x(a.title),1),g("h3",null,[N(x(a.total_records)+" ",1),g("span",{class:q(["stat-percent",{"stat-down":a.down}])},x(a.comparison)+" % ",3)])]))),128))])}const Dwt=ce(Pwt,[["render",Owt]]),Rwt={name:"AnalyticsChart",components:{ReportsChart:e9,Loading:Ha},props:["activeSpace","dateRanges"],data(){return{loading:!1,renderChart:!1,chart:{xaxis:{labels:{datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd mm yy",hour:"HH:mm"}}},renderKey:null,data:[],series:[{name:"Posts",data:[],type:"column"}],categories:[]}}},watch:{activeSpace:"fetchData",dateRanges:"fetchData"},methods:{fetchData(){this.loading=!0,this.renderChart=!1,this.$get("analytics/spaces/activity",{start_date:this.dateRanges[0],end_date:this.dateRanges[1],space_id:this.activeSpace}).then(t=>{this.populateGraphData(t.data)}).catch(this.$handleError).finally(()=>this.loading=!1)},populateGraphData(t){this.chart.series[0]={data:t.data.map(n=>n.data),name:t.title,type:"column",color:"#6895FF"};let e=0;this.chart.series[1]={data:t.data.map(n=>(e+=n.data,e)),name:this.$t("Cumulative"),type:"area",width:"100%"},this.chart.categories=t.data.map(n=>n.date),this.chart.renderKey=new Date().toDateString(),this.renderChart=!0}},mounted(){this.fetchData()}},Vwt={class:"fcom-report-chart",style:{"min-height":"400px"}},Fwt={key:1},Nwt={class:"fcom-report-chart-header"},Bwt={key:0};function zwt(t,e,n,i,s,o){const r=B("Loading"),a=B("ReportsChart");return v(),$("div",Vwt,[s.loading?(v(),D(r,{key:0,section:1})):O("",!0),s.loading?O("",!0):(v(),$("div",Fwt,[g("div",Nwt,[g("h4",null,x(t.$t("Space Activities")),1)]),s.renderChart?(v(),$("div",Bwt,[(v(),D(a,{key:s.chart.renderKey,"series-name":t.$t("Activities"),data:s.chart.data,options:s.chart,series:s.chart.series,categories:s.chart.categories},null,8,["series-name","data","options","series","categories"]))])):O("",!0)]))])}const Hwt=ce(Rwt,[["render",zwt]]),Uwt={name:"PopularSpaces",components:{InfoFilled:wl,Loading:Ha},props:["activeSpace","dateRanges","title"],data(){return{loading:!1,popularSpaces:{data:[],columns:[]}}},watch:{activeSpace:"fetchData",dateRanges:"fetchData"},methods:{fetchData(){this.loading=!0,this.$get("analytics/spaces/popular",{start_date:this.dateRanges[0],end_date:this.dateRanges[1],space_id:this.activeSpace}).then(t=>{this.popularSpaces.data=t.data.data,this.popularSpaces.columns=t.data.columns}).catch(t=>this.$handleError(t)).finally(()=>this.loading=!1)}},mounted(){this.fetchData()}},jwt={class:"fcom-report-popular-time"},Wwt={key:1},Ywt={class:"fcom-report-chart-header"};function qwt(t,e,n,i,s,o){const r=B("Loading"),a=B("InfoFilled"),l=we,c=Ss,u=Il,d=Pl;return v(),$("div",jwt,[s.loading?(v(),D(r,{key:0,section:1})):O("",!0),s.loading?O("",!0):(v(),$("div",Wwt,[g("div",Ywt,[g("h4",null,[N(x(n.title)+" ",1),_(c,{class:"box-item",effect:"dark",content:t.$t("Top 10 spaces with most activities"),placement:"top-start"},{default:y(()=>[_(l,null,{default:y(()=>[_(a)]),_:1})]),_:1},8,["content"])])]),_(d,{data:s.popularSpaces.data,style:{width:"100%"}},{default:y(()=>[(v(!0),$(J,null,ye(s.popularSpaces.columns,(h,f)=>(v(),D(u,{key:`popular-spaces-${f}`,prop:h.prop,label:h.label,width:h.width},null,8,["prop","label","width"]))),128))]),_:1},8,["data"])]))])}const Gwt=ce(Uwt,[["render",qwt]]),Xwt={name:"SpaceAnalytics",components:{CheckProStatus:NS,Loading:Ha,AnalyticsHeader:Twt,AnalyticsWidgets:Dwt,AnalyticsChart:Hwt,PopularSpaces:Gwt},data(){return{pageLoaded:!1,instanceKey:null,activeSpace:null,dateRanges:[new Date(new Date().setDate(new Date().getDate()-30)).toISOString().split("T")[0],new Date().toISOString().split("T")[0]],predefinedDate:"30",predefinedDates:[{key:"7",label:this.$t("Last Week")},{key:"15",label:this.$t("Last 15 days")},{key:"30",label:this.$t("Last Month")},{key:"90",label:this.$t("Last Three Month")},{key:"",label:this.$t("Custom")}]}},computed:{isAnalyticsEnabled(){return this.hasFeature("has_analytics")}},mounted(){this.pageLoaded=!0,this.changeTitle(this.$t("Space analytics"))}},Kwt={key:0},Zwt={key:1},Jwt={class:"fcom-report-body"};function Qwt(t,e,n,i,s,o){const r=B("CheckProStatus"),a=B("Loading"),l=B("AnalyticsHeader"),c=B("AnalyticsWidgets"),u=B("AnalyticsChart"),d=B("PopularSpaces");return o.isAnalyticsEnabled?(v(),$("div",Zwt,[s.pageLoaded?(v(),$("div",{class:"fcom-report-wrap",key:s.instanceKey},[_(l,{"active-space":s.activeSpace,"date-ranges":s.dateRanges,"predefined-date":s.predefinedDate,"predefined-dates":s.predefinedDates,"onUpdate:activeSpace":e[0]||(e[0]=h=>s.activeSpace=h),"onUpdate:dateRanges":e[1]||(e[1]=h=>s.dateRanges=h),"onUpdate:predefinedDate":e[2]||(e[2]=h=>s.predefinedDate=h)},null,8,["active-space","date-ranges","predefined-date","predefined-dates"]),g("div",Jwt,[_(c,{"active-space":s.activeSpace,"date-ranges":s.dateRanges},null,8,["active-space","date-ranges"]),_(u,{"active-space":s.activeSpace,"date-ranges":s.dateRanges},null,8,["active-space","date-ranges"]),_(d,{"active-space":s.activeSpace,"date-ranges":s.dateRanges,title:s.activeSpace?t.$t("Popular Posts"):t.$t("Popular Spaces")},null,8,["active-space","date-ranges","title"])])])):(v(),D(a,{key:0,section:3}))])):(v(),$("div",Kwt,[_(r)]))}const e3t=ce(Xwt,[["render",Qwt]]),t3t=[{path:"/settings",component:X_t,meta:{active_menu:"settings"},children:[{name:"settings",path:"",component:Irt,meta:{active_menu:"settings"}},{name:"customization",path:"customization",component:AZe,meta:{active_menu:"settings"}},{name:"admin_moderators",path:"moderators",component:ult,meta:{active_menu:"settings"}},{name:"email_notifications",path:"email-notifications",component:nJe,meta:{active_menu:"settings"}},{name:"features",path:"features",component:Qit,meta:{active_menu:"settings"}},{name:"menu_settings",path:"menu-settings",component:Eat,meta:{active_menu:"settings"}},{path:"space_groups",name:"space_groups",component:zyt,meta:{active_menu:"settings"}},{path:"topics-settings",name:"all_topics",component:xKe,meta:{active_menu:"settings"}},{path:"content-moderation",name:"content_moderation",component:r_t,meta:{active_menu:"settings"}},{path:"privacy-settings",name:"privacy_settings",component:Y_t,meta:{active_menu:"settings"}},{path:"tools",name:"tools",component:w_t,meta:{active_menu:"settings"}},{path:"crm-access-config",name:"crm_access_config",component:DXe,meta:{active_menu:"settings"}},{path:"incoming-webhooks",name:"incoming_webhooks",component:T0t,meta:{active_menu:"settings"}}]},{path:"/manage-spaces/:space/settings",component:Zyt,props:!0,redirect:t=>({name:"space_settings_general",params:t.params}),meta:{active_menu:"settings",back_route:"space_groups",back_with_space:!1},children:[{name:"space_settings_general",path:"general",component:()=>ti(()=>Promise.resolve().then(()=>wxt),void 0)},{name:"space_settings_paywalls",path:"paywalls",component:()=>ti(()=>Promise.resolve().then(()=>DP),void 0)},{name:"space_settings_lockscreen",path:"lock-screen",component:()=>ti(()=>Promise.resolve().then(()=>_8t),void 0)},{name:"space_settings_links",path:"links",component:()=>ti(()=>Promise.resolve().then(()=>K8t),void 0)},{name:"space_settings_pages",path:"pages",component:()=>ti(()=>Promise.resolve().then(()=>Q5t),void 0)}]},{path:"/manage-courses/edit/:course_id/settings",component:e0t,props:!0,redirect:t=>({name:"course_settings_general",params:t.params}),meta:{active_menu:"manage_courses"},children:[{name:"course_settings_general",path:"general",component:()=>ti(()=>Promise.resolve().then(()=>iSt),void 0)},{name:"course_settings_paywalls",path:"paywalls",component:()=>ti(()=>Promise.resolve().then(()=>DP),void 0)},{name:"course_settings_lockscreen",path:"lock-screen",component:()=>ti(()=>Promise.resolve().then(()=>uSt),void 0)},{name:"course_settings_welcome_banner",path:"welcome-banner",component:()=>ti(()=>Promise.resolve().then(()=>DSt),void 0)},{name:"course_settings_links",path:"links",component:()=>ti(()=>Promise.resolve().then(()=>zSt),void 0)}]},{path:"/manage-courses",component:fGe,name:"manage_courses",meta:{active_menu:"manage_courses"}},{path:"/manage-courses/edit/:course_id",component:VUe,props:!0,meta:{active_menu:"manage_courses"},children:[{name:"edit_lessons",path:"lessons",component:Fqe,props:!0,meta:{active_menu:"manage_courses"}},{name:"course_students",path:"students",component:nRe,props:!0,meta:{active_menu:"manage_courses"}},{name:"quiz_results",path:"quiz-results",component:LVe,props:!0,meta:{active_menu:"manage_courses"}},{name:"course_overview",path:"overview",component:bUe,props:!0,meta:{active_menu:"manage_courses"}}]},{path:"/analytics",component:D0t,name:"analytics",meta:{active_menu:"analytics"},children:[{name:"analytics_overview",path:"overview",component:z2t,meta:{active_menu:"analytics_overview"}},{name:"analytics_members",path:"members",component:Swt,meta:{active_menu:"analytics_members"}},{name:"analytics_spaces",path:"spaces",component:e3t,meta:{active_menu:"analytics_spaces"}}]},{path:"/manage-migrations",component:JGe,name:"manage_migrations",meta:{active_menu:"manage_migrations"}}],n3t={name:"VerifiedSign"},s3t={class:"fcom_verified"},i3t=["aria-label"];function o3t(t,e,n,i,s,o){const r=Ss;return v(),D(r,{content:t.$t("Verified"),placement:"top"},{default:y(()=>[g("span",s3t,[(v(),$("svg",{viewBox:"0 0 22 22","aria-label":t.$t("Verified account"),role:"img","data-testid":"icon-verified"},[...e[0]||(e[0]=[g("g",null,[g("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)])],8,i3t))])]),_:1},8,["content"])}const r3t=ce(n3t,[["render",o3t]]),a3t={name:"UserBadge",props:["badge","is_preview","profile"],computed:{renderingBadges(){var t;if(!this.appVars.user_badges&&!this.is_preview)return null;if(this.profile){let e=this.profile.badge_slugs;if(e||(e=(t=this.profile.meta)==null?void 0:t.badge_slug,typeof e=="string"&&(e=[e])),!e||e.length==0)return null;const n=new Set(e);return Object.keys(this.appVars.user_badges).filter(i=>n.has(i)).map(i=>this.appVars.user_badges[i])}return[this.badge]}}},l3t=["src"],c3t={key:1,class:"fcom_emoji"},u3t={key:2,class:"fcom_shape"},d3t={key:1};function h3t(t,e,n,i,s,o){const r=we,a=Ss;return o.renderingBadges?(v(!0),$(J,{key:0},ye(o.renderingBadges,l=>(v(),$("div",{class:q([{user_icon_only:l.show_label!="yes"},"user_badge"])},[_(a,{content:l.title,placement:"top"},{default:y(()=>[g("div",{style:Xe({backgroundColor:l.background_color,color:l.color,borderColor:l.color}),class:"user_badge_inner"},[l.config?(v(),$(J,{key:0},[l.config.logo?(v(),$("img",{key:0,alt:"",src:l.config.logo},null,8,l3t)):l.config.emoji?(v(),$("span",c3t,x(l.config.emoji),1)):l.config.shape_svg?(v(),$("span",u3t,[_(r,{innerHTML:l.config.shape_svg},null,8,["innerHTML"])])):O("",!0)],64)):O("",!0),l.show_label=="yes"?(v(),$("span",d3t,x(l.title),1)):O("",!0)],4)]),_:2},1032,["content"])],2))),256)):O("",!0)}const f3t=ce(a3t,[["render",h3t]]),p3t={name:"WelcomeBanner",components:{MediaPreview:Ep},props:{config:{type:Object,default:null},closeKey:{type:String,default:""},wrapperClass:{type:String,default:""},contentClass:{type:String,default:""}},data(){return{dismissed:!1}},computed:{effectiveConfig(){return this.config!==null?this.config:this.appVars.welcome_banner},showMedia(){return this.effectiveConfig&&this.effectiveConfig.mediaType=="video"&&this.effectiveConfig.bannerVideo},showCtaButtons(){var t;return this.effectiveConfig&&((t=this.effectiveConfig.ctaButtons)==null?void 0:t.length)&&this.effectiveConfig.ctaButtons.some(e=>e.link&&e.label)},isRemovable(){return this.effectiveConfig&&this.effectiveConfig.allowClose=="yes"},effectiveCloseKey(){return this.closeKey?this.closeKey:this.appVars.user_id?"fcom_welcome_banner_closed_auth":"fcom_welcome_banner_closed_guest"},showBanner(){if(this.dismissed)return!1;if(!this.isRemovable)return!0;const t=this.Storage.get(this.effectiveCloseKey,!1);return t?new Date().getTime()>t:!0}},methods:{closeBanner(){const t=new Date().getTime()+6048e5;this.Storage.set(this.effectiveCloseKey,t),this.dismissed=!0}}},m3t={key:0,class:"fcom_welcome_title"},g3t=["innerHTML"],v3t={key:2,class:"fcom_welcome_cta_buttons"},_3t=["href","target"];function y3t(t,e,n,i,s,o){const r=B("media-preview"),a=bo,l=B("MoreFilled"),c=we,u=ze,d=Ar,h=Er,f=$r;return o.effectiveConfig&&o.showBanner?(v(),$("div",{key:0,class:q(["fcom_welcome_box",n.wrapperClass])},[o.showMedia?(v(),D(r,{key:0,media_item:o.effectiveConfig.bannerVideo},null,8,["media_item"])):o.effectiveConfig.bannerImage?(v(),D(a,{key:1,class:"feed_media",alt:t.$t("Image Preview"),src:o.effectiveConfig.bannerImage},null,8,["alt","src"])):O("",!0),g("div",{class:q(n.contentClass)},[o.effectiveConfig.title?(v(),$("h2",m3t,x(o.effectiveConfig.title),1)):O("",!0),o.effectiveConfig.description_rendered?(v(),$("div",{key:1,class:"fcom_welcome_sub",innerHTML:o.effectiveConfig.description_rendered},null,8,g3t)):O("",!0),o.showCtaButtons?(v(),$("div",v3t,[(v(!0),$(J,null,ye(o.effectiveConfig.ctaButtons,p=>(v(),$(J,null,[p.link&&p.label?(v(),$("a",{key:0,href:p.link,target:p.newTab=="yes"?"_blank":"",class:q({"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"})},x(p.label),11,_3t)):O("",!0)],64))),256))])):O("",!0)],2),o.isRemovable?(v(),D(f,{key:2,trigger:"click",class:"fcom_welcome_close"},{dropdown:y(()=>[_(h,null,{default:y(()=>[_(d,{onClick:o.closeBanner},{default:y(()=>[N(x(t.$t("Hide Banner")),1)]),_:1},8,["onClick"])]),_:1})]),default:y(()=>[_(u,{"aria-label":t.$t("Hide Banner"),class:"fcom_dot_menu",size:"small",text:""},{default:y(()=>[_(c,null,{default:y(()=>[_(l)]),_:1})]),_:1},8,["aria-label"])]),_:1})):O("",!0)],2)):O("",!0)}const b3t=ce(p3t,[["render",y3t]]);ti(()=>Promise.resolve().then(()=>USt),void 0);ti(()=>Promise.resolve().then(()=>WSt),void 0);const w3t=[Eae,bR,jae,gR,vR,Ple,Wle,cle,ple,ble,Xle,bae,xae,s8,Q4,Cle,hR,gle,n2,yR,wR,t8,jr,qle,wd,zd,Tae,aC,n8,Jae,rle,Rle,mae,Ho,mR,Ale,e8,tle,_ae,Nae,Sle,mp,kR,wl,j1,_R,Jle];function kg(t){const e=[];if(typeof t=="object"&&t.join===void 0)for(const n in t)e.push(kg(t[n]));else if(typeof t=="object"&&t.join!==void 0)for(const n in t)e.push(kg(t[n]));else typeof t=="function"||typeof t=="string"&&e.push(t);return e.join("<br />")}const Rs=Dg($Oe),t9=F0e();t9.use(J0e);t9.use(({store:t})=>{t.$api={get:(e,n)=>window.FluentCommunityUtil.Rest.get(e,n),post:(e,n)=>window.FluentCommunityUtil.Rest.post(e,n),put:(e,n)=>window.FluentCommunityUtil.Rest.put(e,n),patch:(e,n)=>window.FluentCommunityUtil.Rest.patch(e,n),delete:e=>window.FluentCommunityUtil.Rest.delete(e)}});Rs.use(t9);Rs.use(n0e);Rs.config.globalProperties.appVars=window.fluentComAdmin;Rs.config.globalProperties.auth=window.fluentComAdmin.auth;Rs.config.globalProperties.has_pro=!!window.fluentComAdmin.pro;let r6="40%",a6="60%",Rj="500px";window.innerWidth<600?(a6="95%",r6="90%",Rj="90%"):window.innerWidth<800&&(a6="80%",r6="80%");w3t.forEach(t=>{Rs.component(t.name,t)});Rs.component("VerifiedSign",r3t);Rs.component("UserAvatar",q2);Rs.component("UserRouteLink",ua);Rs.component("WelcomeBanner",b3t);Rs.component("UserBadge",f3t);function cP(){if(window.fluentFrameworkApp){console.warn("FluentCommunity: the portal app is already mounted, skipping duplicate initialization.");return}Rs.use(window.FluentCommunityUtil.eventBus);const t=window.FluentCommunityUtil.Rest;Rs.mixin({data(){return{Storage:window.FluentCommunityUtil.Storage,is_rtl:!1,drawerWidth:r6,dialogWidth:a6,modalWidth:Rj,feedMonitorCache:{},mounted:!1,isMobile:window.innerWidth<=768,has_leaderboard:this.appVars.features.leaderboard}},computed:{siteDateFormat(){return this.appVars.date_formatter||"MMM D, YYYY"},siteTimeFormat(){return this.appVars.time_formatter||"HH:mm"},siteDateTimeFormat(){return this.appVars.date_time_formatter||"MMM D, YYYY HH:mm"}},methods:{$get:t.get,$post:t.post,$uploadFile:t.uploadFile,$put:t.put,$del:t.delete,$patch:t.patch,$ajax:t.ajax,changeTitle(s){document.title=s+" - "+this.appVars.site_title},$handleError(s){let o="";typeof s=="string"?o=s:s&&s.message?o=s.message:o=kg(s),o||(o="Something is wrong!"),typeof o!="string"&&(o=kg(o)),this.$notify({type:"error",title:this.$t("Error"),message:o,dangerouslyUseHTMLString:!0})},convertToText:kg,$t(s){s=window.fluentComAdmin.i18n[s]||s;const o=Array.prototype.slice.call(arguments,1);if(o.length===0)return s;const r=/%(\d*)\$?s|%d/g;let a=0;return s=s.replace(r,(l,c)=>{if(c){const u=parseInt(c,10)-1;return u<o.length?o[u]:l}else return a<o.length?o[a++]:l}),s},$_n(s,o,r){return r>1?this.$t(o,r):this.$t(s,r)},$labelize(s){return s?(s=s.charAt(0).toUpperCase()+s.slice(1),window.fluentComAdmin.i18n[s]?window.fluentComAdmin.i18n[s]:s.replace(/_/g," ").replace(/\b\w/g,o=>o.toUpperCase())):""},$toClipboard(s,o="Copied to clipboard"){navigator.clipboard.writeText(s).then(()=>{this.$notify.success(this.$t(o))}).catch(r=>{this.$notify.error(this.$t("Failed to copy"))})},dayjs,relativeTimeFromUtc(s){return dayjs.utc(s).local().fromNow()},$storeLocalData(s,o){this.Storage.set(s,o)},$getLocalData(s,o=""){return this.Storage.get(s,o)},ucFirst(s){return s?s.charAt(0).toUpperCase()+s.slice(1):""},convertTo24Hour(s){if(!s)return s;const o=s.match(/^(\d{1,2}):(\d{2})(?::\d{2})?\s*([AaPp][Mm])?$/);if(!o){const c=dayjs(s,this.siteTimeFormat);return c.isValid()?c.format("HH:mm"):s}let r=parseInt(o[1],10);const a=o[2],l=o[3];if(l){const c=l.toUpperCase()==="PM";c&&r!==12&&(r+=12),!c&&r===12&&(r=0)}return String(r).padStart(2,"0")+":"+a},ucWords(s){return s?s.replace(/\b[a-z]/g,function(o){return o.toUpperCase()}):""},smartDate(s,o=!1,r=!1){if(!s)return"";const a=this.siteTimeFormat;let l="D MMM, YYYY";dayjs(s).isSame(new Date,"year")?(l="D MMM",o&&(Math.abs(dayjs(s).diff(new Date,"days"))<=5||r)&&(l="D MMM, "+a)):o&&r&&(l="D MMM, YYYY, "+a);const c=dayjs(s);return c.isValid()?c.format(l):null},hasPermission(s){return this.appVars.permissions[s]},isAdmin(){return!!this.appVars.permissions.community_admin},hasCourseAdminAccess(){return!!this.appVars.permissions.course_admin},hasCourseCreatorAccess(){return!!this.appVars.permissions.course_creator},hasSpaceAdminAccess(s=null){return this.hasPermissionOrInCurrentSpace("community_admin")||s&&this.isSpaceAdmin(s)},hasSpaceModeratorAccess(s=null){return this.hasPermissionOrInCurrentSpace("community_moderator")||s&&this.isSpaceModerator(s)},canDeleteFeed(s){return this.auth.user_id&&(s.user_id==this.auth.user_id||this.hasPermissionOrInCurrentSpace("delete_any_feed"))},canEditFeed(s){return this.auth.user_id&&(s.user_id==this.auth.user_id||this.hasPermissionOrInCurrentSpace("edit_any_feed"))},canDeleteComment(s){return this.auth&&(s.user_id==this.auth.user_id||this.hasPermissionOrInCurrentSpace("delete_any_comment"))},canEditComment(s){return this.auth.user_id&&(s.user_id==this.auth.user_id||this.hasPermissionOrInCurrentSpace("edit_any_comment"))},hasSpaceAccess(s){return s?this.appVars.user_membership_slugs.indexOf(s)!==-1:!0},$upgradeUrl(s,o){const r=this.appVars&&this.appVars.upgrade_url;if(!r)return r;try{const a=new URL(r);return s&&a.searchParams.set("utm_content",s),o&&a.searchParams.set("utm_campaign",o),a.toString()}catch{return r}},hasInPermission(s,o){return!o||typeof o!="object"?!1:o[s]},hasCurrentSpacePermission(s){return window.fcom_current_community?this.hasInPermission(s,window.fcom_current_community.permissions):!1},hasPermissionOrInCurrentSpace(s){return this.hasPermission(s)?!0:this.hasCurrentSpacePermission(s)},humanDateDiff(s){if(!s)return"";const o=dayjs.utc(s,"YYYY-MM-DD HH:mm:ss");if(!o.isValid())return"";const r=o.add(this.appVars.date_offset,"s");return dayjs(r.format("YYYY-MM-DD HH:mm:ss")).from(dayjs(dayjs.utc().format("YYYY-MM-DD HH:mm:ss")))},hasCommentPermission(s){var o;return this.auth.user_id?!s.space_id&&!s.course_id?this.auth.user_id&&(s.user_id==this.auth.user_id||s.privacy=="public"):this.hasSpaceAccess((o=s.space)==null?void 0:o.slug):!1},getExcerpt(s,o=250){if(!s)return"";let r=s.replace(/(<([^>]+)>)/ig,"");return r=r.replace(/(\*\*|__)(.*?)\1/g,"$2"),r=r.replace(/(#+)(.*)/g,"$2"),r=r.replace(/\[(.*?)\]\((.*?)\)/g,"$1"),typeof DOMParser<"u"&&(r=new DOMParser().parseFromString(r,"text/html").body.textContent||""),r.length>o&&(r=r.substring(0,o)+"..."),r},mdToHtml(s){return s?(s=s.replace("&#x20;","",s),s=s.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>"),s=s.replace(/\*(.*?)\*/g,"<em>$1</em>"),s=s.replace(/\~\~(.*?)\~\~/g,"<del>$1</del>"),s=s.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2">$1</a>'),s=s.replace(/<(https?:\/\/[^\s>]+)>/g,'<a href="$1">$1</a>'),s=s.replace(/^##\s+(.*?)$/gm,"<h2>$1</h2>"),s=s.replace(/^###\s+(.*?)$/gm,"<h3>$1</h3>"),s=s.replace(/^####\s+(.*?)$/gm,"<h4>$1</h4>"),s=s.replace(/^>\s+(.*?)$/gm,"<blockquote>$1</blockquote>"),s=s.replace(/`{3}([\s\S]*?)`{3}/g,"<pre><code>$1</code></pre>"),s=s.replace(/`([^`]+)`/g,"<code>$1</code>"),s=s.replace(/^([\*\-])\s+(.*)$/gm,"<li>$2</li>"),s=s.replace(/(<li>.*?<\/li>(?:\n<li>.*?<\/li>)*)/g,function(o){return"<ul>"+o.replace(/\n/g,"")+"</ul>"}),s=s.replace(/\n/g,"<br>"),s):""},$convertToBoolean(s){return s==="true"||s===!0||s===1||s==="1"||s==="yes"||s==="on"},each:Mc,hasFeature(s){return this.appVars.features[s]},isCommunityModerator(){return window.fluentComAdmin.auth.community_roles.some(s=>s==="admin"||s==="moderator")},isSpaceModerator(s){var r,a;return["admin","moderator"].includes((a=(r=s==null?void 0:s.membership)==null?void 0:r.pivot)==null?void 0:a.role)},isSpaceAdmin(s){var o,r;return((r=(o=s==null?void 0:s.membership)==null?void 0:o.pivot)==null?void 0:r.role)=="admin"},getCurrentAuthUrl(){let s=window.location.href,o=this.appVars.auth_url;return o=o.replace(/(\?|&)redirect_to=[^&]+/,""),o.indexOf("?")===-1?o+="?":o+="&",o+"redirect_to="+encodeURIComponent(s)},$formatNumber(s){return s&&s.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},$getRouteLink(s,o={}){return Mc(o,(r,a)=>{s=s.replace(":"+a,r)}),this.appVars.portal_url+s},isOnline(s){if(!s)return!1;const r=dayjs.utc(s,"YYYY-MM-DD HH:mm:ss").add(this.appVars.date_offset,"seconds").diff(dayjs.utc(),"minutes");return r<=5&&r>=0},$exportToCsv(s,o="fcom-export.csv"){if(!s||!Array.isArray(s)||s.length===0){this.$notify({type:"error",title:this.$t("Error"),message:this.$t("No data available to export.")});return}const r=Object.keys(s[0]),a=[r.join(",")];s.forEach(d=>{const h=r.map(f=>`"${String(d[f]??"").replace(/"/g,'""')}"`);a.push(h.join(","))});const l="\uFEFF"+a.join(`
985 +`),c=new Blob([l],{type:"text/csv;charset=utf-8;"}),u=document.createElement("a");u.href=URL.createObjectURL(c),u.download=o,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(u.href)},doNothing(){console.log("OK")}},mounted(){window.fcom_mounted||(window.fcom_mounted=!0,this.isMobile&&dayjs.updateLocale("en",{relativeTime:{future:"in %s",past:"%s",s:"now",m:"1m",mm:"%dm",h:"1 h",hh:"%d h",d:"%dd",dd:"%dd",M:"1 mo",MM:"%d mo",y:"%d y",yy:"%d y"}}),document.addEventListener("fcom_renew_rest_nonce",s=>{if(window.__fcomNonceRenewInFlight)return;window.__fcomNonceRenewInFlight=!0;const o=()=>{window.__fcomSessionExpiredShown||(window.__fcomSessionExpiredShown=!0,window.fluentFrameworkApp.$messageBox.alert(this.$t("Your session has expired due to inactivity. Please refresh the page to continue."),this.$t("Session Expired"),{confirmButtonText:this.$t("Refresh"),callback:r=>{location.reload()}}))};this.$ajax("GET","fluent_community_renew_nonce",{ajax_nonce:window.fluentComAdmin.ajax_nonce}).then(r=>{r&&r.rest_nonce?(window.fluentComAdmin.rest.nonce=r.rest_nonce,window.fluentComAdmin.ajax_nonce=r.ajax_nonce,window.__fcomNonceRenewInFlight=!1):o()}).catch(()=>{o()})}))}}),Rs.config.globalProperties.$notify=E0e,Rs.config.globalProperties.$confirm=Gw.confirm,Rs.config.globalProperties.$promt=Gw.prompt,Rs.config.globalProperties.$messageBox=Gw,Rs.config.globalProperties.$gloablStorage={};const e=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_admin_routes",t3t);let n=null;window.fluentComAdmin.routing_system=="hash"?n=z7({routes:e,history:FZ()}):n=z7({routes:e,history:MO(window.fluentComAdmin.portal_slug)});const i=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_admin_app",Rs);lU().initialize(),window.fluentFrameworkApp=i.use(n).mount("#fluent_com_portal"),window.fluentFrameworkAppRouter=n}window.FluentCommunityUtil?cP():document.addEventListener("fluentCommunityUtilReady",function(){cP()});var qu,wf;class k3t{constructor(e){ha(this,qu,void 0);ha(this,wf,new Set);Qi(this,qu,e)}get current(){return Xt(this,qu)}set current(e){Xt(this,qu)!=e&&(Qi(this,qu,e),Xt(this,wf).forEach(n=>n(e)))}on(e){return Xt(this,wf).add(e),()=>Xt(this,wf).delete(e)}}qu=new WeakMap,wf=new WeakMap;const Vj=t=>new k3t(t),l6=Symbol.for("atomico.hooks");globalThis[l6]=globalThis[l6]||{};let ip=globalThis[l6];const C3t=Symbol.for("Atomico.suspense"),Fj=Symbol.for("Atomico.effect"),x3t=Symbol.for("Atomico.layoutEffect"),Nj=Symbol.for("Atomico.insertionEffect"),Av=(t,e,n)=>{const{i,hooks:s}=ip.c,o=s[i]=s[i]||{};return o.value=t(o.value),o.effect=e,o.tag=n,ip.c.i++,s[i].value},dd=t=>Av((e=Vj(t))=>e),n9=()=>Av((t=Vj(ip.c.host))=>t),Bj=()=>ip.c.update,S3t=(t,e,n=0)=>{let i={},s=!1;const o=()=>s,r=(c,u)=>{for(const d in i){const h=i[d];h.effect&&h.tag===c&&(h.value=h.effect(h.value,u))}};return{load:c=>{ip.c={host:e,hooks:i,update:t,i:0,id:n};let u;try{s=!1,u=c()}catch(d){if(d!==C3t)throw d;s=!0}finally{ip.c=null}return u},cleanEffects:c=>(r(Nj,c),()=>(r(x3t,c),()=>{r(Fj,c)})),isSuspense:o}},Ev=Symbol.for;function zj(t,e){const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++){let s=t[i],o=e[i];if(s!==o)return!1}return!0}const rl=t=>typeof t=="function",Cg=t=>typeof t=="object",{isArray:$3t}=Array,c6=(t,e)=>(e?t instanceof HTMLStyleElement:!0)&&"hydrate"in((t==null?void 0:t.dataset)||{});function Hj(t,e){let n;const i=s=>{let{length:o}=s;for(let r=0;r<o;r++){const a=s[r];if(a&&Array.isArray(a))i(a);else{const l=typeof a;if(a==null||l==="function"||l==="boolean")continue;l==="string"||l==="number"?(n==null&&(n=""),n+=a):(n!=null&&(e(n),n=null),e(a))}}};i(t),n!=null&&e(n)}const Uj=(t,e,n)=>(t.addEventListener(e,n),()=>t.removeEventListener(e,n));let jj=class{constructor(e,n,i){this.message=n,this.target=e,this.value=i}};class A3t extends jj{}class E3t extends jj{}const cb="Custom",M3t=null,T3t={true:1,"":1,1:1};function P3t(t,e,n,i,s){const{type:o,reflect:r,event:a,value:l,attr:c=L3t(e)}=(n==null?void 0:n.name)!=cb&&Cg(n)&&n!=M3t?n:{type:n},u=(o==null?void 0:o.name)===cb&&o.map,d=l!=null?o==Function||!rl(l)?()=>l:l:null;Object.defineProperty(t,e,{configurable:!0,set(h){const f=this[e];d&&o!=Boolean&&h==null&&(h=d());const{error:p,value:m}=(u?R3t:V3t)(o,h);if(p&&m!=null)throw new A3t(this,`The value defined for prop '${e}' must be of type '${o.name}'`,m);f!=m&&(this._props[e]=m??void 0,this.update(),a&&I3t(this,a),this.updated.then(()=>{r&&(this._ignoreAttr=c,O3t(this,o,c,this[e]),this._ignoreAttr=null)}))},get(){return this._props[e]}}),d&&(s[e]=d()),i[c]={prop:e,type:o}}const I3t=(t,{type:e,base:n=CustomEvent,...i})=>t.dispatchEvent(new n(e,i)),L3t=t=>t.replace(/([A-Z])/g,"-$1").toLowerCase(),O3t=(t,e,n,i)=>i==null||e==Boolean&&!i?t.removeAttribute(n):t.setAttribute(n,(e==null?void 0:e.name)===cb&&(e!=null&&e.serialize)?e==null?void 0:e.serialize(i):Cg(i)?JSON.stringify(i):e==Boolean?"":i),D3t=(t,e)=>t==Boolean?!!T3t[e]:t==Number?Number(e):t==String?e:t==Array||t==Object?JSON.parse(e):t.name==cb?e:new t(e),R3t=({map:t},e)=>{try{return{value:t(e),error:!1}}catch{return{value:e,error:!0}}},V3t=(t,e)=>t==null||e==null?{value:e,error:!1}:t!=String&&e===""?{value:void 0,error:!1}:t==Object||t==Array||t==Symbol?{value:e,error:{}.toString.call(e)!==`[object ${t.name}]`}:e instanceof t?{value:e,error:t==Number&&Number.isNaN(e.valueOf())}:t==String||t==Number||t==Boolean?{value:e,error:t==Number?typeof e!="number"?!0:Number.isNaN(e):t==String?typeof e!="string":typeof e!="boolean"}:{value:e,error:!0};let F3t=0;const N3t=t=>{var n;const e=((n=(t==null?void 0:t.dataset)||{})==null?void 0:n.hydrate)||"";return e||"c"+F3t++},th=(t,e=HTMLElement)=>{const n={},i={},s="prototype"in e&&e.prototype instanceof Element,o=s?e:"base"in e?e.base:HTMLElement,{props:r,styles:a}=s?t:e;class l extends o{constructor(){super(),this._setup(),this._render=()=>t({...this._props});for(const u in i)this[u]=i[u]}static get styles(){return[super.styles,a]}async _setup(){if(this._props)return;this._props={};let u,d;this.mounted=new Promise(b=>this.mount=()=>{b(),u!=this.parentNode&&(d!=u?this.unmounted.then(this.update):this.update()),u=this.parentNode}),this.unmounted=new Promise(b=>this.unmount=()=>{b(),(u!=this.parentNode||!this.isConnected)&&(h.cleanEffects(!0)()(),d=this.parentNode,u=null)}),this.symbolId=this.symbolId||Symbol(),this.symbolIdParent=Symbol();const h=S3t(()=>this.update(),this,N3t(this));let f,p=!0;const m=c6(this);this.update=()=>(f||(f=!0,this.updated=(this.updated||this.mounted).then(()=>{try{const b=h.load(this._render),w=h.cleanEffects();return b&&b.render(this,this.symbolId,m),f=!1,p&&!h.isSuspense()&&(p=!1,!m&&B3t(this)),w()}finally{f=!1}}).then(b=>{b&&b()})),this.updated),this.update()}connectedCallback(){this.mount(),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this.unmount()}attributeChangedCallback(u,d,h){if(n[u]){if(u===this._ignoreAttr||d===h)return;const{prop:f,type:p}=n[u];try{this[f]=D3t(p,h)}catch{throw new E3t(this,`The value defined as attr '${u}' cannot be parsed by type '${p.name}'`,h)}}else super.attributeChangedCallback(u,d,h)}static get props(){return{...super.props,...r}}static get observedAttributes(){const u=super.observedAttributes||[];for(const d in r)P3t(this.prototype,d,r[d],n,i);return Object.keys(n).concat(u)}}return l};function B3t(t){const{styles:e}=t.constructor,{shadowRoot:n}=t;if(n&&e.length){const i=[];Hj(e,s=>{s&&(s instanceof Element?n.appendChild(s.cloneNode(!0)):i.push(s))}),i.length&&(n.adoptedStyleSheets=i)}}const Wj=t=>(e,n)=>{Av(([i,s]=[])=>((s||!s)&&(s&&zj(s,n)?i=i||!0:(rl(i)&&i(),i=null)),[i,n]),([i,s],o)=>o?(rl(i)&&i(),[]):[i||e(),s],t)},Pd=Wj(Fj),z3t=Wj(Nj);class H3t extends Array{constructor(e,n){let i=!0;const s=o=>{try{n(o,this,i)}finally{i=!1}};super(void 0,s,n),s(e)}}const Rr=t=>{const e=Bj();return Av((n=new H3t(t,(i,s,o)=>{i=rl(i)?i(s[0]):i,i!==s[0]&&(s[0]=i,o||e())}))=>n)},ub=(t,e)=>{const[n]=Av(([i,s,o=0]=[])=>((!s||s&&!zj(s,e))&&(i=t()),[i,e,o]));return n},vh=(t,e)=>ub(()=>t,e),u6=Ev("atomico/options");globalThis[u6]=globalThis[u6]||{sheet:!!document.adoptedStyleSheets};const Yj=globalThis[u6];new Promise(t=>{Yj.ssr||(document.readyState==="loading"?Uj(document,"DOMContentLoaded",t):t())});const U3t={checked:1,value:1,selected:1},j3t={list:1,type:1,size:1,form:1,width:1,height:1,src:1,href:1,slot:1},W3t={shadowDom:1,staticNode:1,cloneNode:1,children:1,key:1},Py={},d6=[];class h6 extends Text{}const Y3t=Ev("atomico/id"),xg=Ev("atomico/type"),uk=Ev("atomico/ref"),qj=Ev("atomico/vnode"),q3t=()=>{};function G3t(t,e,n){return Xj(this,t,e,n)}const Gj=(t,e,...n)=>{const i=e||Py;let{children:s}=i;if(s=s??(n.length?n:d6),t===q3t)return s;const o=t?t instanceof Node?1:t.prototype instanceof HTMLElement&&2:0;if(o===!1&&t instanceof Function)return t(s!=d6?{children:s,...i}:i);const r=Yj.render||G3t;return{[xg]:qj,type:t,props:i,children:s,key:i.key,shadow:i.shadowDom,static:i.staticNode,raw:o,is:i.is,clone:i.cloneNode,render:r}};function Xj(t,e,n=Y3t,i,s){let o;if(e&&e[n]&&e[n].vnode==t||t[xg]!=qj)return e;(t||!e)&&(s=s||t.type=="svg",o=t.type!="host"&&(t.raw==1?(e&&t.clone?e[uk]:e)!=t.type:t.raw==2?!(e instanceof t.type):e?e[uk]||e.localName!=t.type:!e),o&&t.type!=null&&(t.raw==1&&t.clone?(i=!0,e=t.type.cloneNode(!0),e[uk]=t.type):e=t.raw==1?t.type:t.raw==2?new t.type:s?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,t.is?{is:t.is}:void 0)));const r=e[n]?e[n]:Py,{vnode:a=Py,cycle:l=0}=r;let{fragment:c,handlers:u}=r;const{children:d=d6,props:h=Py}=a;if(u=o?{}:u||{},t.static&&!o)return e;if(t.shadow&&!e.shadowRoot&&e.attachShadow({mode:"open",...t.shadow}),t.props!=h&&Z3t(e,h,t.props,u,s),t.children!==d){const f=t.shadow?e.shadowRoot:e;c=K3t(t.children,c,f,n,!l&&i,s&&t.type=="foreignObject"?!1:s)}return e[n]={vnode:t,handlers:u,fragment:c,cycle:l+1},e}function X3t(t,e){const n=new h6(""),i=new h6("");let s;if(t[e?"prepend":"append"](n),e){let{lastElementChild:o}=t;for(;o;){const{previousElementSibling:r}=o;if(c6(o,!0)&&!c6(r,!0)){s=o;break}o=r}}return s?s.before(i):t.append(i),{markStart:n,markEnd:i}}function K3t(t,e,n,i,s,o){t=t==null?null:$3t(t)?t:[t];const r=e||X3t(n,s),{markStart:a,markEnd:l,keyes:c}=r;let u;const d=c&&new Set;let h=a;if(t&&Hj(t,f=>{if(typeof f=="object"&&!f[xg])return;const p=f[xg]&&f.key,m=c&&p!=null&&c.get(p);h!=l&&h===m?d.delete(h):h=h==l?l:h.nextSibling;const b=c?m:h;let w=b;if(f[xg])w=Xj(f,b,i,s,o);else{const k=f+"";!(w instanceof Text)||w instanceof h6?w=new Text(k):w.data!=k&&(w.data=k)}w!=h&&(c&&d.delete(w),!b||c?(n.insertBefore(w,h),c&&h!=l&&d.add(h)):b==l?n.insertBefore(w,l):(n.replaceChild(w,b),h=w)),p!=null&&(u=u||new Map,u.set(p,w))}),h=h==l?l:h.nextSibling,e&&h!=l)for(;h!=l;){const f=h;h=h.nextSibling,f.remove()}return d&&d.forEach(f=>f.remove()),r.keyes=u,r}function Z3t(t,e,n,i,s){for(const o in e)!(o in n)&&uP(t,o,e[o],null,s,i);for(const o in n)uP(t,o,e[o],n[o],s,i)}function uP(t,e,n,i,s,o){if(e=e=="class"&&!s?"className":e,n=n??null,i=i??null,e in t&&U3t[e]&&(n=t[e]),!(i===n||W3t[e]||e[0]=="_"))if(t.localName==="slot"&&e==="assignNode"&&"assign"in t)t.assign(i);else if(e[0]=="o"&&e[1]=="n"&&(rl(i)||rl(n)))J3t(t,e.slice(2),i,o);else if(e=="ref")i&&(rl(i)?i(t):i.current=t);else if(e=="style"){const{style:r}=t;n=n||"",i=i||"";const a=Cg(n),l=Cg(i);if(a)for(const c in n)if(l)!(c in i)&&dP(r,c,null);else break;if(l)for(const c in i){const u=i[c];a&&n[c]===u||dP(r,c,u)}else r.cssText=i}else{const r=e[0]=="$"?e.slice(1):e;r===e&&(!s&&!j3t[e]&&e in t||rl(i)||rl(n))?t[e]=i??"":i==null?t.removeAttribute(r):t.setAttribute(r,Cg(i)?JSON.stringify(i):i)}}function J3t(t,e,n,i){if(i.handleEvent||(i.handleEvent=s=>i[s.type].call(t,s)),n){if(!i[e]){const s=n.capture||n.once||n.passive?Object.assign({},n):null;t.addEventListener(e,i,s)}i[e]=n}else i[e]&&(t.removeEventListener(e,i),delete i[e])}function dP(t,e,n){let i="setProperty";n==null&&(i="removeProperty",n=null),~e.indexOf("-")?t[i](e,n):t[e]=n}const Q3t=Gj("host",{style:"display: contents"}),ekt="value",tkt=(t,e)=>{const n=n9(),i=dd();z3t(()=>Uj(n.current,"ConnectContext",s=>{s.composedPath().at(0)!==s.currentTarget&&t===s.detail.id&&(s.stopPropagation(),s.detail.connect(i))}),[t]),i.current=e},nkt=t=>{const e=th(({value:n})=>(tkt(e,n),Q3t),{props:{value:{type:Object,value:()=>t}}});return e[ekt]=t,e};nkt({dispatch(t,e){}});const skt=0,_h=1,k_=2,C_=3,hP=4,Im=5,f6=6,Kj=0,ikt=2,Zj=3,Jj=4,Qj=Im,okt=f6,eW=(t,e,n,i)=>{let s;e[0]=0;for(let o=1;o<e.length;o++){const r=e[o++],a=e[o]?(e[0]|=r?1:2,n[e[o++]]):e[++o];r===Zj?i[0]=a:r===Jj?i[1]=Object.assign(i[1]||{},a):r===Qj?(i[1]=i[1]||{})[e[++o]]=a:r===okt?i[1][e[++o]]+=a+"":r?(s=t.apply(a,eW(t,a,n,["",null])),i.push(s),a[0]?e[0]|=2:(e[o-2]=Kj,e[o]=s)):i.push(a)}return i},rkt=function(t){let e=_h,n="",i="",s=[0],o,r;const a=l=>{e===_h&&(l||(n=n.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(Kj,l,n):e===C_&&(l||n)?(s.push(Zj,l,n),e=k_):e===k_&&n==="..."&&l?s.push(Jj,l,0):e===k_&&n&&!l?s.push(Qj,0,!0,n):e>=Im&&((n||!l&&e===Im)&&(s.push(e,0,n,r),e=f6),l&&(s.push(e,l,0,r),e=f6)),n=""};for(let l=0;l<t.length;l++){l&&(e===_h&&a(),a(l));for(let c=0;c<t[l].length;c++)o=t[l][c],e===_h?o==="<"?(a(),s=[s],e=C_):n+=o:e===hP?n==="--"&&o===">"?(e=_h,n=""):n=o+n[0]:i?o===i?i="":n+=o:o==='"'||o==="'"?i=o:o===">"?(a(),e=_h):e&&(o==="="?(e=Im,r=n,n=""):o==="/"&&(e<Im||t[l][c+1]===">")?(a(),e===C_&&(s=s[0]),e=s,(s=s[0]).push(ikt,0,e),e=skt):o===" "||o===" "||o===`
986 +`||o==="\r"?(a(),e=k_):n+=o),e===C_&&n==="!--"&&(e=hP,s=s[0])}return a(),s},akt=new Map;function It(t){let e=akt;return e=eW(Gj,e.get(t)||(e.set(t,e=rkt(t)),e),arguments,[]),e.length>1?e:e[0]}var s9=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},yh=(t,e,n)=>(s9(t,e,"read from private field"),n?n.call(t):e.get(t)),bh=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},wh=(t,e,n,i)=>(s9(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),lkt=(t,e,n)=>(s9(t,e,"access private method"),n),Iy,Ly,Lm,Om,Oy,p6,tW;let i9=class{constructor(e){bh(this,p6),bh(this,Iy,void 0),bh(this,Ly,void 0),bh(this,Lm,void 0),bh(this,Om,void 0),bh(this,Oy,void 0),wh(this,Lm,!1),this.onShow=()=>{},this.onHide=()=>{},wh(this,Oy,(n,i)=>{var s;const{state:o,composing:r}=n,{selection:a,doc:l}=o,{ranges:c}=a,u=Math.min(...c.map(f=>f.$from.pos)),d=Math.max(...c.map(f=>f.$to.pos)),h=i&&i.doc.eq(l)&&i.selection.eq(a);if(yh(this,Lm)||((s=n.dom.parentElement)==null||s.appendChild(this.element),wh(this,Lm,!0)),!(r||h)){if(!yh(this,Ly).call(this,n,i)){this.hide();return}rC({getBoundingClientRect:()=>S2(n,u,d)},this.element,{placement:"top",middleware:[oC(),iC(yh(this,Om))]}).then(({x:f,y:p})=>{Object.assign(this.element.style,{left:`${f}px`,top:`${p}px`})}),this.show()}}),this.update=(n,i)=>{z2(yh(this,Oy),yh(this,Iy))(n,i)},this.destroy=()=>{},this.show=n=>{this.element.dataset.show="true",n&&rC(n,this.element,{placement:"top",middleware:[oC(),iC(yh(this,Om))]}).then(({x:i,y:s})=>{Object.assign(this.element.style,{left:`${i}px`,top:`${s}px`})}),this.onShow()},this.hide=()=>{this.element.dataset.show!=="false"&&(this.element.dataset.show="false",this.onHide())},this.element=e.content,wh(this,Iy,e.debounce??200),wh(this,Ly,e.shouldShow??lkt(this,p6,tW)),wh(this,Om,e.offset),this.element.dataset.show="false"}};Iy=new WeakMap,Ly=new WeakMap,Lm=new WeakMap,Om=new WeakMap,Oy=new WeakMap,p6=new WeakSet,tW=function(t){const{doc:e,selection:n}=t.state,{empty:i,from:s,to:o}=n,r=!e.textBetween(s,o).length&&t.state.selection instanceof Ot,a=this.element.contains(document.activeElement),l=!t.hasFocus()&&!a,c=!t.editable;return!(l||i||r||c)};function o9(t){const e=ms({},`${t}_TOOLTIP_SPEC`),n=Ls(s=>{const o=s.get(e.key);return new rs({key:new ps(`${t}_TOOLTIP`),...o})}),i=[e,n];return i.key=e.key,i.pluginKey=n.key,e.meta={package:"@milkdown/plugin-tooltip",displayName:`Ctx<tooltipSpec>|${t}`},n.meta={package:"@milkdown/plugin-tooltip",displayName:`Prose<tooltip>|${t}`},i}function nW(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=nW(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function ni(){for(var t,e,n=0,i="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=nW(t))&&(i&&(i+=" "),i+=e);return i}var ckt=Object.defineProperty,fP=Object.getOwnPropertySymbols,ukt=Object.prototype.hasOwnProperty,dkt=Object.prototype.propertyIsEnumerable,pP=(t,e,n)=>e in t?ckt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,hkt=(t,e)=>{for(var n in e||(e={}))ukt.call(e,n)&&pP(t,n,e[n]);if(fP)for(var n of fP(e))dkt.call(e,n)&&pP(t,n,e[n]);return t};function nh(t,e){return Object.assign(t,{meta:hkt({package:"@milkdown/components"},e)}),t}var fkt=Object.defineProperty,mP=Object.getOwnPropertySymbols,pkt=Object.prototype.hasOwnProperty,mkt=Object.prototype.propertyIsEnumerable,gP=(t,e,n)=>e in t?fkt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,r9=(t,e)=>{for(var n in e||(e={}))pkt.call(e,n)&&gP(t,n,e[n]);if(mP)for(var n of mP(e))mkt.call(e,n)&&gP(t,n,e[n]);return t};const gkt={mode:"preview"},kl=ms(r9({},gkt),"linkTooltipStateCtx");nh(kl,{displayName:"State<link-tooltip>",group:"LinkTooltip"});const vkt={addLink:()=>{},editLink:()=>{},removeLink:()=>{}},op=ms(r9({},vkt),"linkTooltipAPICtx");nh(kl,{displayName:"API<link-tooltip>",group:"LinkTooltip"});const _kt={linkIcon:()=>"🔗",editButton:()=>"✎",removeButton:()=>"⌫",confirmButton:()=>It`Confirm ⏎`,onCopyLink:()=>{},inputPlaceholder:"Paste link..."},tw=ms(r9({},_kt),"linkTooltipConfigCtx");nh(kl,{displayName:"Config<link-tooltip>",group:"LinkTooltip"});const Mv=o9("LINK_PREVIEW");nh(Mv[0],{displayName:"PreviewTooltipSpec<link-tooltip>",group:"LinkTooltip"});nh(Mv[1],{displayName:"PreviewTooltipPlugin<link-tooltip>",group:"LinkTooltip"});const nw=o9("LINK_EDIT");nh(nw[0],{displayName:"EditTooltipSpec<link-tooltip>",group:"LinkTooltip"});nh(nw[1],{displayName:"EditTooltipPlugin<link-tooltip>",group:"LinkTooltip"});function ykt(t,e,n,i,s){let o={start:-1,end:-1};return n.nodesBetween(i,s,(r,a)=>{if(o.start>-1)return!1;o.start===-1&&t.isInSet(r.marks)&&e===r&&(o={start:a,end:a+Math.max(r.textContent.length,1)})}),o}function bkt(t,e,n){const i=e.posAtCoords({left:n.clientX,top:n.clientY});if(!i)return;const{pos:s}=i,o=e.state.doc.nodeAt(s);if(!o)return;const r=o.marks.find(l=>l.type===Gr.mark.type(t));if(!(!r||!Mv.pluginKey()))return{show:!0,pos:s,node:o,mark:r}}function sW(t,e){const n=customElements.get(t);if(n==null){customElements.define(t,e);return}n!==e&&console.warn(`Custom element ${t} has been defined before.`)}const iW=({config:t,src:e,onEdit:n,onRemove:i})=>{const s=a=>{a.stopPropagation(),a.preventDefault(),n==null||n()},o=a=>{a.stopPropagation(),a.preventDefault(),i==null||i()};return It`
128 987 <host>
129 - <div class="link-preview" onmousedown=${l=>{l.preventDefault(),navigator.clipboard&&t&&navigator.clipboard.writeText(t).then(()=>{e==null||e.onCopyLink(t)}).catch(a=>{throw a})}}>
988 + <div class="link-preview" onmousedown=${a=>{a.preventDefault(),navigator.clipboard&&e&&navigator.clipboard.writeText(e).then(()=>{t==null||t.onCopyLink(e)}).catch(l=>{throw l})}}>
130 989 <span class="link-icon">
131 - ${e==null?void 0:e.linkIcon()}
990 + ${t==null?void 0:t.linkIcon()}
132 991 </span>
133 - <a href=${t} target="_blank" class="link-display">${t}</a>
134 - <span class="button link-edit-button" onmousedown=${r}>
135 - ${e==null?void 0:e.editButton()}
992 + <a href=${e} target="_blank" class="link-display">${e}</a>
993 + <span class="button link-edit-button" onmousedown=${s}>
994 + ${t==null?void 0:t.editButton()}
136 995 </span>
137 - <span class="button link-remove-button" onmousedown=${s}>
138 - ${e==null?void 0:e.removeButton()}
996 + <span class="button link-remove-button" onmousedown=${o}>
997 + ${t==null?void 0:t.removeButton()}
139 998 </span>
140 999 </div>
141 1000 </host>
142 - `};jL.props={config:Object,src:String,onEdit:Function,onRemove:Function};const HL=zh(jL);var UL=e=>{throw TypeError(e)},WL=(e,t,n)=>t.has(e)||UL("Cannot "+n),rn=(e,t,n)=>(WL(e,t,"read from private field"),n?n.call(e):t.get(e)),Xi=(e,t,n)=>t.has(e)?UL("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Nm=(e,t,n,o)=>(WL(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n),cl,es,$f,Ef,K1,q1,G1,xf;class eDe{constructor(t,n){this.ctx=t,Xi(this,cl,new HL),Xi(this,es),Xi(this,$f,this.ctx.use(Ri.key)),Xi(this,Ef,!1),Xi(this,K1,({mode:o})=>{o==="edit"&&rn(this,xf).call(this)}),Xi(this,q1,()=>{Nm(this,Ef,!0)}),Xi(this,G1,()=>{Nm(this,Ef,!1)}),Xi(this,xf,()=>{rn(this,es).hide(),rn(this,es).element.removeEventListener("mouseenter",rn(this,q1)),rn(this,es).element.removeEventListener("mouseleave",rn(this,G1))}),this.show=(o,r,s,i)=>{rn(this,cl).config=this.ctx.get(Tv.key),rn(this,cl).src=o.attrs.href,rn(this,cl).onEdit=()=>{this.ctx.get(gd.key).editLink(o,r,s)},rn(this,cl).onRemove=()=>{this.ctx.get(gd.key).removeLink(r,s),rn(this,xf).call(this)},rn(this,es).show({getBoundingClientRect:()=>i}),rn(this,es).element.addEventListener("mouseenter",rn(this,q1)),rn(this,es).element.addEventListener("mouseleave",rn(this,G1))},this.hide=()=>{rn(this,Ef)||rn(this,xf).call(this)},this.update=()=>{},this.destroy=()=>{rn(this,$f).off(rn(this,K1)),rn(this,es).destroy(),rn(this,cl).remove()},Nm(this,es,new Fk({debounce:0,content:rn(this,cl),shouldShow:()=>!1})),rn(this,es).update(n),Nm(this,$f,t.use(Ri.key)),rn(this,$f).on(rn(this,K1))}}cl=new WeakMap;es=new WeakMap;$f=new WeakMap;Ef=new WeakMap;K1=new WeakMap;q1=new WeakMap;G1=new WeakMap;xf=new WeakMap;zL("milkdown-link-preview",HL);function tDe(e){let t;const o=Sv((s,i)=>{if(!t||!s.hasFocus()||e.get(Ri.key).mode==="edit")return;const a=QRe(e,s,i);if(a){const u=s.state.doc.resolve(a.pos),c=XRe(a.mark,a.node,s.state.doc,u.before(),u.after()),d=c.start,f=c.end;t.show(a.mark,d,f,av(s,d,f));return}t.hide()},200),r=()=>{setTimeout(()=>{t==null||t.hide()},200)};e.set(jh.key,{props:{handleDOMEvents:{mousemove:o,mouseleave:r}},view:s=>(t=new eDe(e,s),t)})}const KL=({src:e,onConfirm:t,onCancel:n,config:o})=>{const r=Rk(),[s,i]=TL(e);i0(()=>{i(e??"")},[e]);const l=()=>{var u,c;t==null||t((c=(u=r.current)==null?void 0:u.value)!=null?c:"")},a=u=>{var c,d;u.stopPropagation(),u.key==="Enter"&&(t==null||t((d=(c=r.current)==null?void 0:c.value)!=null?d:""),u.preventDefault()),u.key==="Escape"&&(n==null||n(),u.preventDefault())};return $t`
1001 + `};iW.props={config:Object,src:String,onEdit:Function,onRemove:Function};const oW=th(iW);var rW=t=>{throw TypeError(t)},aW=(t,e,n)=>e.has(t)||rW("Cannot "+n),Wn=(t,e,n)=>(aW(t,e,"read from private field"),n?n.call(t):e.get(t)),jl=(t,e,n)=>e.has(t)?rW("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),x_=(t,e,n,i)=>(aW(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),sc,Ir,Dm,Rm,Dy,Ry,Vy,Vm;class wkt{constructor(e,n){this.ctx=e,jl(this,sc,new oW),jl(this,Ir),jl(this,Dm,this.ctx.use(kl.key)),jl(this,Rm,!1),jl(this,Dy,({mode:i})=>{i==="edit"&&Wn(this,Vm).call(this)}),jl(this,Ry,()=>{x_(this,Rm,!0)}),jl(this,Vy,()=>{x_(this,Rm,!1)}),jl(this,Vm,()=>{Wn(this,Ir).hide(),Wn(this,Ir).element.removeEventListener("mouseenter",Wn(this,Ry)),Wn(this,Ir).element.removeEventListener("mouseleave",Wn(this,Vy))}),this.show=(i,s,o,r)=>{Wn(this,sc).config=this.ctx.get(tw.key),Wn(this,sc).src=i.attrs.href,Wn(this,sc).onEdit=()=>{this.ctx.get(op.key).editLink(i,s,o)},Wn(this,sc).onRemove=()=>{this.ctx.get(op.key).removeLink(s,o),Wn(this,Vm).call(this)},Wn(this,Ir).show({getBoundingClientRect:()=>r}),Wn(this,Ir).element.addEventListener("mouseenter",Wn(this,Ry)),Wn(this,Ir).element.addEventListener("mouseleave",Wn(this,Vy))},this.hide=()=>{Wn(this,Rm)||Wn(this,Vm).call(this)},this.update=()=>{},this.destroy=()=>{Wn(this,Dm).off(Wn(this,Dy)),Wn(this,Ir).destroy(),Wn(this,sc).remove()},x_(this,Ir,new i9({debounce:0,content:Wn(this,sc),shouldShow:()=>!1})),Wn(this,Ir).update(n),x_(this,Dm,e.use(kl.key)),Wn(this,Dm).on(Wn(this,Dy))}}sc=new WeakMap;Ir=new WeakMap;Dm=new WeakMap;Rm=new WeakMap;Dy=new WeakMap;Ry=new WeakMap;Vy=new WeakMap;Vm=new WeakMap;sW("milkdown-link-preview",oW);function kkt(t){let e;const i=z2((o,r)=>{if(!e||!o.hasFocus()||t.get(kl.key).mode==="edit")return;const l=bkt(t,o,r);if(l){const c=o.state.doc.resolve(l.pos),u=ykt(l.mark,l.node,o.state.doc,c.before(),c.after()),d=u.start,h=u.end;e.show(l.mark,d,h,S2(o,d,h));return}e.hide()},200),s=()=>{setTimeout(()=>{e==null||e.hide()},200)};t.set(Mv.key,{props:{handleDOMEvents:{mousemove:i,mouseleave:s}},view:o=>(e=new wkt(t,o),e)})}const lW=({src:t,onConfirm:e,onCancel:n,config:i})=>{const s=dd(),[o,r]=Rr(t);Pd(()=>{r(t??"")},[t]);const a=()=>{var c,u;e==null||e((u=(c=s.current)==null?void 0:c.value)!=null?u:"")},l=c=>{var u,d;c.stopPropagation(),c.key==="Enter"&&(e==null||e((d=(u=s.current)==null?void 0:u.value)!=null?d:""),c.preventDefault()),c.key==="Escape"&&(n==null||n(),c.preventDefault())};return It`
143 1002 <host>
144 1003 <div class="link-edit">
145 1004 <input
146 1005 class="input-area"
147 - placeholder=${o==null?void 0:o.inputPlaceholder}
148 - ref=${r}
149 - onkeydown=${a}
150 - oninput=${u=>i(u.target.value)}
151 - value=${s}
1006 + placeholder=${i==null?void 0:i.inputPlaceholder}
1007 + ref=${s}
1008 + onkeydown=${l}
1009 + oninput=${c=>r(c.target.value)}
1010 + value=${o}
152 1011 />
153 - <span class=${ac("button confirm",!s&&"hidden")} onclick=${l}>
154 - ${o==null?void 0:o.confirmButton()}
1012 + <span class=${ni("button confirm",!o&&"hidden")} onclick=${a}>
1013 + ${i==null?void 0:i.confirmButton()}
155 1014 </span>
156 1015 </div>
157 1016 </host>
158 - `};KL.props={config:Object,src:String,onConfirm:Function,onCancel:Function};const qL=zh(KL);var nDe=Object.defineProperty,oDe=Object.defineProperties,rDe=Object.getOwnPropertyDescriptors,a$=Object.getOwnPropertySymbols,sDe=Object.prototype.hasOwnProperty,iDe=Object.prototype.propertyIsEnumerable,GL=e=>{throw TypeError(e)},u$=(e,t,n)=>t in e?nDe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pm=(e,t)=>{for(var n in t||(t={}))sDe.call(t,n)&&u$(e,n,t[n]);if(a$)for(var n of a$(t))iDe.call(t,n)&&u$(e,n,t[n]);return e},c$=(e,t)=>oDe(e,rDe(t)),YL=(e,t,n)=>t.has(e)||GL("Cannot "+n),gn=(e,t,n)=>(YL(e,t,"read from private field"),n?n.call(e):t.get(e)),Hu=(e,t,n)=>t.has(e)?GL("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Lm=(e,t,n,o)=>(YL(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n),As,dl,fl,Sa,H2,Y1;const d$={from:-1,to:-1,mark:null};class lDe{constructor(t,n){this.ctx=t,Hu(this,As,new qL),Hu(this,dl),Hu(this,fl,Pm({},d$)),Hu(this,Sa,()=>{gn(this,dl).hide(),this.ctx.update(Ri.key,o=>c$(Pm({},o),{mode:"preview"})),Lm(this,fl,Pm({},d$))}),Hu(this,H2,o=>{const r=this.ctx.get(bn),{from:s,to:i,mark:l}=gn(this,fl),a=fs.type(this.ctx);if(l&&l.attrs.href===o){gn(this,Sa).call(this);return}const u=r.state.tr;l&&u.removeMark(s,i,l),u.addMark(s,i,a.create({href:o})),r.dispatch(u),gn(this,Sa).call(this)}),Hu(this,Y1,(o,r,s)=>{const i=this.ctx.get(Tv.key);gn(this,As).config=i,gn(this,As).src=o,this.ctx.update(Ri.key,a=>c$(Pm({},a),{mode:"edit"}));const l=this.ctx.get(bn);l.dispatch(l.state.tr.setSelection(ht.create(l.state.doc,r,s))),gn(this,dl).show({getBoundingClientRect:()=>av(l,r,s)}),requestAnimationFrame(()=>{var a;(a=gn(this,As).querySelector("input"))==null||a.focus()})}),this.update=o=>{const{state:r}=o,{selection:s}=r;if(!(s instanceof ht))return;const{from:i,to:l}=s;i===gn(this,fl).from&&l===gn(this,fl).to||gn(this,Sa).call(this)},this.destroy=()=>{gn(this,dl).destroy(),gn(this,As).remove()},this.addLink=(o,r)=>{Lm(this,fl,{from:o,to:r,mark:null}),gn(this,Y1).call(this,"",o,r)},this.editLink=(o,r,s)=>{Lm(this,fl,{from:r,to:s,mark:o}),gn(this,Y1).call(this,o.attrs.href,r,s)},this.removeLink=(o,r)=>{const s=this.ctx.get(bn),i=s.state.tr;i.removeMark(o,r,fs.type(this.ctx)),s.dispatch(i),gn(this,Sa).call(this)},Lm(this,dl,new Fk({content:gn(this,As),debounce:0,shouldShow:()=>!1})),gn(this,dl).onHide=()=>{gn(this,As).update().catch(o=>{throw o}),n.dom.focus({preventScroll:!0})},gn(this,dl).update(n),gn(this,As).onConfirm=gn(this,H2),gn(this,As).onCancel=gn(this,Sa)}}As=new WeakMap;dl=new WeakMap;fl=new WeakMap;Sa=new WeakMap;H2=new WeakMap;Y1=new WeakMap;var aDe=Object.defineProperty,uDe=Object.defineProperties,cDe=Object.getOwnPropertyDescriptors,f$=Object.getOwnPropertySymbols,dDe=Object.prototype.hasOwnProperty,fDe=Object.prototype.propertyIsEnumerable,p$=(e,t,n)=>t in e?aDe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pDe=(e,t)=>{for(var n in t||(t={}))dDe.call(t,n)&&p$(e,n,t[n]);if(f$)for(var n of f$(t))fDe.call(t,n)&&p$(e,n,t[n]);return e},hDe=(e,t)=>uDe(e,cDe(t));zL("milkdown-link-edit",qL);function mDe(e){let t;e.update(gd.key,n=>hDe(pDe({},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(Ov.key,{view:n=>(t=new lDe(e,n),t)})}function gDe(e){tDe(e),mDe(e)}const vDe=[Ri,gd,Tv,jh,Ov].flat();$t`
1017 + `};lW.props={config:Object,src:String,onConfirm:Function,onCancel:Function};const cW=th(lW);var Ckt=Object.defineProperty,xkt=Object.defineProperties,Skt=Object.getOwnPropertyDescriptors,vP=Object.getOwnPropertySymbols,$kt=Object.prototype.hasOwnProperty,Akt=Object.prototype.propertyIsEnumerable,uW=t=>{throw TypeError(t)},_P=(t,e,n)=>e in t?Ckt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,S_=(t,e)=>{for(var n in e||(e={}))$kt.call(e,n)&&_P(t,n,e[n]);if(vP)for(var n of vP(e))Akt.call(e,n)&&_P(t,n,e[n]);return t},yP=(t,e)=>xkt(t,Skt(e)),dW=(t,e,n)=>e.has(t)||uW("Cannot "+n),cs=(t,e,n)=>(dW(t,e,"read from private field"),n?n.call(t):e.get(t)),kh=(t,e,n)=>e.has(t)?uW("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),$_=(t,e,n,i)=>(dW(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),ga,ic,oc,Iu,m6,Fy;const bP={from:-1,to:-1,mark:null};class Ekt{constructor(e,n){this.ctx=e,kh(this,ga,new cW),kh(this,ic),kh(this,oc,S_({},bP)),kh(this,Iu,()=>{cs(this,ic).hide(),this.ctx.update(kl.key,i=>yP(S_({},i),{mode:"preview"})),$_(this,oc,S_({},bP))}),kh(this,m6,i=>{const s=this.ctx.get(Vn),{from:o,to:r,mark:a}=cs(this,oc),l=Gr.type(this.ctx);if(a&&a.attrs.href===i){cs(this,Iu).call(this);return}const c=s.state.tr;a&&c.removeMark(o,r,a),c.addMark(o,r,l.create({href:i})),s.dispatch(c),cs(this,Iu).call(this)}),kh(this,Fy,(i,s,o)=>{const r=this.ctx.get(tw.key);cs(this,ga).config=r,cs(this,ga).src=i,this.ctx.update(kl.key,l=>yP(S_({},l),{mode:"edit"}));const a=this.ctx.get(Vn);a.dispatch(a.state.tr.setSelection(Ot.create(a.state.doc,s,o))),cs(this,ic).show({getBoundingClientRect:()=>S2(a,s,o)}),requestAnimationFrame(()=>{var l;(l=cs(this,ga).querySelector("input"))==null||l.focus()})}),this.update=i=>{const{state:s}=i,{selection:o}=s;if(!(o instanceof Ot))return;const{from:r,to:a}=o;r===cs(this,oc).from&&a===cs(this,oc).to||cs(this,Iu).call(this)},this.destroy=()=>{cs(this,ic).destroy(),cs(this,ga).remove()},this.addLink=(i,s)=>{$_(this,oc,{from:i,to:s,mark:null}),cs(this,Fy).call(this,"",i,s)},this.editLink=(i,s,o)=>{$_(this,oc,{from:s,to:o,mark:i}),cs(this,Fy).call(this,i.attrs.href,s,o)},this.removeLink=(i,s)=>{const o=this.ctx.get(Vn),r=o.state.tr;r.removeMark(i,s,Gr.type(this.ctx)),o.dispatch(r),cs(this,Iu).call(this)},$_(this,ic,new i9({content:cs(this,ga),debounce:0,shouldShow:()=>!1})),cs(this,ic).onHide=()=>{cs(this,ga).update().catch(i=>{throw i}),n.dom.focus({preventScroll:!0})},cs(this,ic).update(n),cs(this,ga).onConfirm=cs(this,m6),cs(this,ga).onCancel=cs(this,Iu)}}ga=new WeakMap;ic=new WeakMap;oc=new WeakMap;Iu=new WeakMap;m6=new WeakMap;Fy=new WeakMap;var Mkt=Object.defineProperty,Tkt=Object.defineProperties,Pkt=Object.getOwnPropertyDescriptors,wP=Object.getOwnPropertySymbols,Ikt=Object.prototype.hasOwnProperty,Lkt=Object.prototype.propertyIsEnumerable,kP=(t,e,n)=>e in t?Mkt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Okt=(t,e)=>{for(var n in e||(e={}))Ikt.call(e,n)&&kP(t,n,e[n]);if(wP)for(var n of wP(e))Lkt.call(e,n)&&kP(t,n,e[n]);return t},Dkt=(t,e)=>Tkt(t,Pkt(e));sW("milkdown-link-edit",cW);function Rkt(t){let e;t.update(op.key,n=>Dkt(Okt({},n),{addLink:(i,s)=>{e==null||e.addLink(i,s)},editLink:(i,s,o)=>{e==null||e.editLink(i,s,o)},removeLink:(i,s)=>{e==null||e.removeLink(i,s)}})),t.set(nw.key,{view:n=>(e=new Ekt(t,n),e)})}function Vkt(t){kkt(t),Rkt(t)}const Fkt=[kl,op,tw,Mv,nw].flat();It`
159 1018 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
160 1019 <path d="M4.25 20.5C4.0375 20.5 3.85942 20.4281 3.71575 20.2843C3.57192 20.1404 3.5 19.9622 3.5 19.7498C3.5 19.5371 3.57192 19.359 3.71575 19.2155C3.85942 19.0718 4.0375 19 4.25 19H19.75C19.9625 19 20.1406 19.0719 20.2843 19.2158C20.4281 19.3596 20.5 19.5378 20.5 19.7502C20.5 19.9629 20.4281 20.141 20.2843 20.2845C20.1406 20.4282 19.9625 20.5 19.75 20.5H4.25ZM8.25 16.625C8.0375 16.625 7.85942 16.5531 7.71575 16.4093C7.57192 16.2654 7.5 16.0872 7.5 15.8748C7.5 15.6621 7.57192 15.484 7.71575 15.3405C7.85942 15.1968 8.0375 15.125 8.25 15.125H15.75C15.9625 15.125 16.1406 15.1969 16.2843 15.3408C16.4281 15.4846 16.5 15.6628 16.5 15.8753C16.5 16.0879 16.4281 16.266 16.2843 16.4095C16.1406 16.5532 15.9625 16.625 15.75 16.625H8.25ZM4.25 12.75C4.0375 12.75 3.85942 12.6781 3.71575 12.5343C3.57192 12.3904 3.5 12.2122 3.5 11.9998C3.5 11.7871 3.57192 11.609 3.71575 11.4655C3.85942 11.3218 4.0375 11.25 4.25 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2843 11.4658C20.4281 11.6096 20.5 11.7878 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2843 12.5345C20.1406 12.6782 19.9625 12.75 19.75 12.75H4.25ZM8.25 8.875C8.0375 8.875 7.85942 8.80308 7.71575 8.65925C7.57192 8.51542 7.5 8.33725 7.5 8.12475C7.5 7.91208 7.57192 7.734 7.71575 7.5905C7.85942 7.44683 8.0375 7.375 8.25 7.375H15.75C15.9625 7.375 16.1406 7.44692 16.2843 7.59075C16.4281 7.73458 16.5 7.91275 16.5 8.12525C16.5 8.33792 16.4281 8.516 16.2843 8.6595C16.1406 8.80317 15.9625 8.875 15.75 8.875H8.25ZM4.25 5C4.0375 5 3.85942 4.92808 3.71575 4.78425C3.57192 4.64042 3.5 4.46225 3.5 4.24975C3.5 4.03708 3.57192 3.859 3.71575 3.7155C3.85942 3.57183 4.0375 3.5 4.25 3.5H19.75C19.9625 3.5 20.1406 3.57192 20.2843 3.71575C20.4281 3.85958 20.5 4.03775 20.5 4.25025C20.5 4.46292 20.4281 4.641 20.2843 4.7845C20.1406 4.92817 19.9625 5 19.75 5H4.25Z"/>
161 1020 </svg>
162 -`;$t`
1021 +`;It`
163 1022 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
164 1023 <path d="M4.25 20.5C4.0375 20.5 3.85942 20.4281 3.71575 20.2843C3.57192 20.1404 3.5 19.9622 3.5 19.7498C3.5 19.5371 3.57192 19.359 3.71575 19.2155C3.85942 19.0718 4.0375 19 4.25 19H19.75C19.9625 19 20.1406 19.0719 20.2843 19.2158C20.4281 19.3596 20.5 19.5378 20.5 19.7502C20.5 19.9629 20.4281 20.141 20.2843 20.2845C20.1406 20.4282 19.9625 20.5 19.75 20.5H4.25ZM4.25 16.625C4.0375 16.625 3.85942 16.5531 3.71575 16.4093C3.57192 16.2654 3.5 16.0872 3.5 15.8748C3.5 15.6621 3.57192 15.484 3.71575 15.3405C3.85942 15.1968 4.0375 15.125 4.25 15.125H13.75C13.9625 15.125 14.1406 15.1969 14.2843 15.3408C14.4281 15.4846 14.5 15.6628 14.5 15.8753C14.5 16.0879 14.4281 16.266 14.2843 16.4095C14.1406 16.5532 13.9625 16.625 13.75 16.625H4.25ZM4.25 12.75C4.0375 12.75 3.85942 12.6781 3.71575 12.5343C3.57192 12.3904 3.5 12.2122 3.5 11.9998C3.5 11.7871 3.57192 11.609 3.71575 11.4655C3.85942 11.3218 4.0375 11.25 4.25 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2843 11.4658C20.4281 11.6096 20.5 11.7878 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2843 12.5345C20.1406 12.6782 19.9625 12.75 19.75 12.75H4.25ZM4.25 8.875C4.0375 8.875 3.85942 8.80308 3.71575 8.65925C3.57192 8.51542 3.5 8.33725 3.5 8.12475C3.5 7.91208 3.57192 7.734 3.71575 7.5905C3.85942 7.44683 4.0375 7.375 4.25 7.375H13.75C13.9625 7.375 14.1406 7.44692 14.2843 7.59075C14.4281 7.73458 14.5 7.91275 14.5 8.12525C14.5 8.33792 14.4281 8.516 14.2843 8.6595C14.1406 8.80317 13.9625 8.875 13.75 8.875H4.25ZM4.25 5C4.0375 5 3.85942 4.92808 3.71575 4.78425C3.57192 4.64042 3.5 4.46225 3.5 4.24975C3.5 4.03708 3.57192 3.859 3.71575 3.7155C3.85942 3.57183 4.0375 3.5 4.25 3.5H19.75C19.9625 3.5 20.1406 3.57192 20.2843 3.71575C20.4281 3.85958 20.5 4.03775 20.5 4.25025C20.5 4.46292 20.4281 4.641 20.2843 4.7845C20.1406 4.92817 19.9625 5 19.75 5H4.25Z"/>
165 1024 </svg>
166 -`;$t`
1025 +`;It`
167 1026 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
168 1027 <path d="M4.25 5C4.0375 5 3.85942 4.92808 3.71575 4.78425C3.57192 4.64042 3.5 4.46225 3.5 4.24975C3.5 4.03708 3.57192 3.859 3.71575 3.7155C3.85942 3.57183 4.0375 3.5 4.25 3.5H19.75C19.9625 3.5 20.1406 3.57192 20.2843 3.71575C20.4281 3.85958 20.5 4.03775 20.5 4.25025C20.5 4.46292 20.4281 4.641 20.2843 4.7845C20.1406 4.92817 19.9625 5 19.75 5H4.25ZM10.25 8.875C10.0375 8.875 9.85942 8.80308 9.71575 8.65925C9.57192 8.51542 9.5 8.33725 9.5 8.12475C9.5 7.91208 9.57192 7.734 9.71575 7.5905C9.85942 7.44683 10.0375 7.375 10.25 7.375H19.75C19.9625 7.375 20.1406 7.44692 20.2843 7.59075C20.4281 7.73458 20.5 7.91275 20.5 8.12525C20.5 8.33792 20.4281 8.516 20.2843 8.6595C20.1406 8.80317 19.9625 8.875 19.75 8.875H10.25ZM4.25 12.75C4.0375 12.75 3.85942 12.6781 3.71575 12.5343C3.57192 12.3904 3.5 12.2122 3.5 11.9998C3.5 11.7871 3.57192 11.609 3.71575 11.4655C3.85942 11.3218 4.0375 11.25 4.25 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2843 11.4658C20.4281 11.6096 20.5 11.7878 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2843 12.5345C20.1406 12.6782 19.9625 12.75 19.75 12.75H4.25ZM10.25 16.625C10.0375 16.625 9.85942 16.5531 9.71575 16.4093C9.57192 16.2654 9.5 16.0872 9.5 15.8748C9.5 15.6621 9.57192 15.484 9.71575 15.3405C9.85942 15.1968 10.0375 15.125 10.25 15.125H19.75C19.9625 15.125 20.1406 15.1969 20.2843 15.3408C20.4281 15.4846 20.5 15.6628 20.5 15.8753C20.5 16.0879 20.4281 16.266 20.2843 16.4095C20.1406 16.5532 19.9625 16.625 19.75 16.625H10.25ZM4.25 20.5C4.0375 20.5 3.85942 20.4281 3.71575 20.2843C3.57192 20.1404 3.5 19.9622 3.5 19.7498C3.5 19.5371 3.57192 19.359 3.71575 19.2155C3.85942 19.0718 4.0375 19 4.25 19H19.75C19.9625 19 20.1406 19.0719 20.2843 19.2158C20.4281 19.3596 20.5 19.5378 20.5 19.7502C20.5 19.9629 20.4281 20.141 20.2843 20.2845C20.1406 20.4282 19.9625 20.5 19.75 20.5H4.25Z"/>
169 1028 </svg>
170 -`;const yDe=$t`
1029 +`;const Nkt=It`
171 1030 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
172 1031 <path d="M8.85758 18.625C8.4358 18.625 8.07715 18.4772 7.78163 18.1817C7.48613 17.8862 7.33838 17.5275 7.33838 17.1058V6.8942C7.33838 6.47242 7.48613 6.11377 7.78163 5.81825C8.07715 5.52275 8.4358 5.375 8.85758 5.375H12.1999C13.2191 5.375 14.1406 5.69231 14.9643 6.32693C15.788 6.96154 16.1999 7.81603 16.1999 8.89038C16.1999 9.63779 16.0194 10.2471 15.6585 10.7183C15.2976 11.1894 14.9088 11.5314 14.4922 11.7442C15.005 11.9211 15.4947 12.2708 15.9614 12.7933C16.428 13.3157 16.6614 14.0192 16.6614 14.9038C16.6614 16.182 16.1902 17.1217 15.2479 17.723C14.3056 18.3243 13.3563 18.625 12.3999 18.625H8.85758ZM9.4883 16.6327H12.3191C13.1063 16.6327 13.6627 16.4141 13.9884 15.9769C14.314 15.5397 14.4768 15.1205 14.4768 14.7192C14.4768 14.3179 14.314 13.8987 13.9884 13.4615C13.6627 13.0243 13.0909 12.8057 12.273 12.8057H9.4883V16.6327ZM9.4883 10.875H12.0826C12.6903 10.875 13.172 10.7013 13.5278 10.3539C13.8836 10.0064 14.0615 9.59037 14.0615 9.10575C14.0615 8.59035 13.8733 8.16918 13.497 7.84225C13.1207 7.51533 12.6595 7.35188 12.1133 7.35188H9.4883V10.875Z"/>
173 1032 </svg>
174 -`;$t`
1033 +`;It`
175 1034 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
176 1035 <g clip-path="url(#clip0_952_6527)">
177 1036 <circle cx="12" cy="12" r="3"/>
178 1037 </g>
@@ -181,9 +1040,9 @@
181 1040 <rect width="24" height="24"/>
182 1041 </clipPath>
183 1042 </defs>
184 1043 </svg>
185 -`;const _De=$t`
1044 +`;const Bkt=It`
186 1045 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
187 1046 <g clip-path="url(#clip0_977_8070)">
188 1047 <path d="M4 10.5C3.17 10.5 2.5 11.17 2.5 12C2.5 12.83 3.17 13.5 4 13.5C4.83 13.5 5.5 12.83 5.5 12C5.5 11.17 4.83 10.5 4 10.5ZM4 4.5C3.17 4.5 2.5 5.17 2.5 6C2.5 6.83 3.17 7.5 4 7.5C4.83 7.5 5.5 6.83 5.5 6C5.5 5.17 4.83 4.5 4 4.5ZM4 16.5C3.17 16.5 2.5 17.18 2.5 18C2.5 18.82 3.18 19.5 4 19.5C4.82 19.5 5.5 18.82 5.5 18C5.5 17.18 4.83 16.5 4 16.5ZM8 19H20C20.55 19 21 18.55 21 18C21 17.45 20.55 17 20 17H8C7.45 17 7 17.45 7 18C7 18.55 7.45 19 8 19ZM8 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H8C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM7 6C7 6.55 7.45 7 8 7H20C20.55 7 21 6.55 21 6C21 5.45 20.55 5 20 5H8C7.45 5 7 5.45 7 6Z"/>
189 1048 </g>
@@ -192,13 +1051,13 @@
192 1051 <rect width="24" height="24"/>
193 1052 </clipPath>
194 1053 </defs>
195 1054 </svg>
196 -`;$t`
1055 +`,zkt=It`
197 1056 <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
198 1057 <path fill="currentColor" d="M9 22a1 1 0 0 1-1-1v-3H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6.1l-3.7 3.71c-.2.19-.45.29-.7.29zm1-6v3.08L13.08 16H20V4H4v12z"/>
199 1058 </svg>
200 -`;$t`
1059 +`;It`
201 1060 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
202 1061 <g clip-path="url(#clip0_1803_1151)">
203 1062 <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM10.71 16.29C10.32 16.68 9.69 16.68 9.3 16.29L5.71 12.7C5.32 12.31 5.32 11.68 5.71 11.29C6.1 10.9 6.73 10.9 7.12 11.29L10 14.17L16.88 7.29C17.27 6.9 17.9 6.9 18.29 7.29C18.68 7.68 18.68 8.31 18.29 8.7L10.71 16.29Z"/>
204 1063 </g>
@@ -207,9 +1066,9 @@
207 1066 <rect width="24" height="24"/>
208 1067 </clipPath>
209 1068 </defs>
210 1069 </svg>
211 -`;$t`
1070 +`;It`
212 1071 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
213 1072 <g clip-path="url(#clip0_1803_535)">
214 1073 <path d="M18 19H6C5.45 19 5 18.55 5 18V6C5 5.45 5.45 5 6 5H18C18.55 5 19 5.45 19 6V18C19 18.55 18.55 19 18 19ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3Z"/>
215 1074 </g>
@@ -218,13 +1077,13 @@
218 1077 <rect width="24" height="24"/>
219 1078 </clipPath>
220 1079 </defs>
221 1080 </svg>
222 -`;$t`
1081 +`;It`
223 1082 <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
224 1083 <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
225 1084 </svg>
226 -`;$t`
1085 +`;It`
227 1086 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
228 1087 <g clip-path="url(#clip0_1098_15553)">
229 1088 <path d="M18.3007 5.70973C17.9107 5.31973 17.2807 5.31973 16.8907 5.70973L12.0007 10.5897L7.1107 5.69973C6.7207 5.30973 6.0907 5.30973 5.7007 5.69973C5.3107 6.08973 5.3107 6.71973 5.7007 7.10973L10.5907 11.9997L5.7007 16.8897C5.3107 17.2797 5.3107 17.9097 5.7007 18.2997C6.0907 18.6897 6.7207 18.6897 7.1107 18.2997L12.0007 13.4097L16.8907 18.2997C17.2807 18.6897 17.9107 18.6897 18.3007 18.2997C18.6907 17.9097 18.6907 17.2797 18.3007 16.8897L13.4107 11.9997L18.3007 7.10973C18.6807 6.72973 18.6807 6.08973 18.3007 5.70973Z"/>
230 1089 </g>
@@ -233,9 +1092,9 @@
233 1092 <rect width="24" height="24"/>
234 1093 </clipPath>
235 1094 </defs>
236 1095 </svg>
237 -`;const ZL=$t`
1096 +`;const hW=It`
238 1097 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
239 1098 <g clip-path="url(#clip0_977_8081)">
240 1099 <path d="M9.4 16.6L4.8 12L9.4 7.4L8 6L2 12L8 18L9.4 16.6ZM14.6 16.6L19.2 12L14.6 7.4L16 6L22 12L16 18L14.6 16.6Z"/>
241 1100 </g>
@@ -244,9 +1103,9 @@
244 1103 <rect width="24" height="24"/>
245 1104 </clipPath>
246 1105 </defs>
247 1106 </svg>
248 -`,bDe=$t`
1107 +`,fW=It`
249 1108 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
250 1109 <g clip-path="url(#clip0_1013_1606)">
251 1110 <path d="M9.00012 16.1998L5.50012 12.6998C5.11012 12.3098 4.49012 12.3098 4.10012 12.6998C3.71012 13.0898 3.71012 13.7098 4.10012 14.0998L8.29012 18.2898C8.68012 18.6798 9.31012 18.6798 9.70012 18.2898L20.3001 7.69982C20.6901 7.30982 20.6901 6.68982 20.3001 6.29982C19.9101 5.90982 19.2901 5.90982 18.9001 6.29982L9.00012 16.1998Z" fill="#817567"/>
252 1111 </g>
@@ -255,9 +1114,9 @@
255 1114 <rect width="24" height="24" />
256 1115 </clipPath>
257 1116 </defs>
258 1117 </svg>
259 -`;$t`
1118 +`,Hkt=It`
260 1119 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
261 1120 <g clip-path="url(#clip0_977_7900)">
262 1121 <path fill-rule="evenodd" clip-rule="evenodd" d="M19 13H5C4.45 13 4 12.55 4 12C4 11.45 4.45 11 5 11H19C19.55 11 20 11.45 20 12C20 12.55 19.55 13 19 13Z"/>
263 1122 </g>
@@ -266,13 +1125,13 @@
266 1125 <rect width="24" height="24"/>
267 1126 </clipPath>
268 1127 </defs>
269 1128 </svg>
270 -`;$t`
1129 +`;It`
271 1130 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
272 1131 <path d="M3.5 9.83366C3.35833 9.83366 3.23961 9.78571 3.14383 9.68983C3.04794 9.59394 3 9.47516 3 9.33349C3 9.19171 3.04794 9.07299 3.14383 8.97733C3.23961 8.88155 3.35833 8.83366 3.5 8.83366H12.5C12.6417 8.83366 12.7604 8.8816 12.8562 8.97749C12.9521 9.07338 13 9.19216 13 9.33383C13 9.4756 12.9521 9.59433 12.8562 9.68999C12.7604 9.78577 12.6417 9.83366 12.5 9.83366H3.5ZM3.5 7.16699C3.35833 7.16699 3.23961 7.11905 3.14383 7.02316C3.04794 6.92727 3 6.80849 3 6.66683C3 6.52505 3.04794 6.40633 3.14383 6.31066C3.23961 6.21488 3.35833 6.16699 3.5 6.16699H12.5C12.6417 6.16699 12.7604 6.21494 12.8562 6.31083C12.9521 6.40671 13 6.52549 13 6.66716C13 6.80894 12.9521 6.92766 12.8562 7.02333C12.7604 7.1191 12.6417 7.16699 12.5 7.16699H3.5Z"/>
273 1132 </svg>
274 -`;const wDe=$t`
1133 +`;const Ukt=It`
275 1134 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
276 1135 <g clip-path="url(#clip0_1013_1585)">
277 1136 <path d="M14.06 9.02L14.98 9.94L5.92 19H5V18.08L14.06 9.02ZM17.66 3C17.41 3 17.15 3.1 16.96 3.29L15.13 5.12L18.88 8.87L20.71 7.04C21.1 6.65 21.1 6.02 20.71 5.63L18.37 3.29C18.17 3.09 17.92 3 17.66 3ZM14.06 6.19L3 17.25V21H6.75L17.81 9.94L14.06 6.19Z"/>
278 1137 </g>
@@ -281,9 +1140,9 @@
281 1140 <rect width="24" height="24"/>
282 1141 </clipPath>
283 1142 </defs>
284 1143 </svg>
285 -`;$t`
1144 +`;It`
286 1145 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
287 1146 <g clip-path="url(#clip0_992_5553)">
288 1147 <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM12 17H14V7H10V9H12V17Z"/>
289 1148 </g>
@@ -292,9 +1151,9 @@
292 1151 <rect width="24" height="24"/>
293 1152 </clipPath>
294 1153 </defs>
295 1154 </svg>
296 -`;const CDe=$t`
1155 +`;const jkt=It`
297 1156 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
298 1157 <g clip-path="url(#clip0_992_5559)">
299 1158 <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM15 15H11V13H13C14.1 13 15 12.11 15 11V9C15 7.89 14.1 7 13 7H9V9H13V11H11C9.9 11 9 11.89 9 13V17H15V15Z"/>
300 1159 </g>
@@ -303,9 +1162,9 @@
303 1162 <rect width="24" height="24"/>
304 1163 </clipPath>
305 1164 </defs>
306 1165 </svg>
307 -`,kDe=$t`
1166 +`,Wkt=It`
308 1167 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
309 1168 <g clip-path="url(#clip0_992_5565)">
310 1169 <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM15 15V13.5C15 12.67 14.33 12 13.5 12C14.33 12 15 11.33 15 10.5V9C15 7.89 14.1 7 13 7H9V9H13V11H11V13H13V15H9V17H13C14.1 17 15 16.11 15 15Z"/>
311 1170 </g>
@@ -314,9 +1173,9 @@
314 1173 <rect width="24" height="24"/>
315 1174 </clipPath>
316 1175 </defs>
317 1176 </svg>
318 -`,SDe=$t`
1177 +`,Ykt=It`
319 1178 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
320 1179 <g clip-path="url(#clip0_977_7757)">
321 1180 <path d="M19.04 3H5.04004C3.94004 3 3.04004 3.9 3.04004 5V19C3.04004 20.1 3.94004 21 5.04004 21H19.04C20.14 21 21.04 20.1 21.04 19V5C21.04 3.9 20.14 3 19.04 3ZM19.04 19H5.04004V5H19.04V19ZM13.04 17H15.04V7H13.04V11H11.04V7H9.04004V13H13.04V17Z"/>
322 1181 </g>
@@ -325,9 +1184,9 @@
325 1184 <rect width="24" height="24"/>
326 1185 </clipPath>
327 1186 </defs>
328 1187 </svg>
329 -`;$t`
1188 +`;It`
330 1189 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
331 1190 <g clip-path="url(#clip0_977_7760)">
332 1191 <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM15 15V13C15 11.89 14.1 11 13 11H11V9H15V7H9V13H13V15H9V17H13C14.1 17 15 16.11 15 15Z"/>
333 1192 </g>
@@ -336,9 +1195,9 @@
336 1195 <rect width="24" height="24"/>
337 1196 </clipPath>
338 1197 </defs>
339 1198 </svg>
340 -`;$t`
1199 +`;It`
341 1200 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
342 1201 <g clip-path="url(#clip0_977_7763)">
343 1202 <path d="M11 17H13C14.1 17 15 16.11 15 15V13C15 11.89 14.1 11 13 11H11V9H15V7H11C9.9 7 9 7.89 9 9V15C9 16.11 9.9 17 11 17ZM11 13H13V15H11V13ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19Z"/>
344 1203 </g>
@@ -347,9 +1206,9 @@
347 1206 <rect width="24" height="24"/>
348 1207 </clipPath>
349 1208 </defs>
350 1209 </svg>
351 -`;$t`
1210 +`;const g6=It`
352 1211 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
353 1212 <g clip-path="url(#clip0_977_8075)">
354 1213 <path d="M19 5V19H5V5H19ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM14.14 11.86L11.14 15.73L9 13.14L6 17H18L14.14 11.86Z"/>
355 1214 </g>
@@ -358,17 +1217,17 @@
358 1217 <rect width="24" height="24"/>
359 1218 </clipPath>
360 1219 </defs>
361 1220 </svg>
362 -`;const $De=$t`
1221 +`,qkt=It`
363 1222 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
364 1223 <path d="M6.29811 18.625C6.04505 18.625 5.83115 18.5375 5.65641 18.3626C5.48166 18.1877 5.39429 17.9736 5.39429 17.7203C5.39429 17.467 5.48166 17.2532 5.65641 17.0788C5.83115 16.9045 6.04505 16.8173 6.29811 16.8173H9.21159L12.452 7.18265H9.53851C9.28545 7.18265 9.07155 7.0952 8.89681 6.9203C8.72206 6.7454 8.63469 6.5313 8.63469 6.278C8.63469 6.02472 8.72206 5.81089 8.89681 5.63652C9.07155 5.46217 9.28545 5.375 9.53851 5.375H16.8847C17.1377 5.375 17.3516 5.46245 17.5264 5.63735C17.7011 5.81225 17.7885 6.02634 17.7885 6.27962C17.7885 6.53293 17.7011 6.74676 17.5264 6.92113C17.3516 7.09548 17.1377 7.18265 16.8847 7.18265H14.2789L11.0385 16.8173H13.6443C13.8973 16.8173 14.1112 16.9048 14.286 17.0797C14.4607 17.2546 14.5481 17.4687 14.5481 17.722C14.5481 17.9752 14.4607 18.1891 14.286 18.3634C14.1112 18.5378 13.8973 18.625 13.6443 18.625H6.29811Z"/>
365 1224 </svg>
366 -`,JL=$t`
1225 +`,pW=It`
367 1226 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
368 1227 <path d="M17.0385 19.5003V16.5388H14.0769V15.0388H17.0385V12.0773H18.5384V15.0388H21.5V16.5388H18.5384V19.5003H17.0385ZM10.8077 16.5388H7.03845C5.78282 16.5388 4.7125 16.0963 3.8275 15.2114C2.9425 14.3266 2.5 13.2564 2.5 12.0009C2.5 10.7454 2.9425 9.67504 3.8275 8.78979C4.7125 7.90454 5.78282 7.46191 7.03845 7.46191H10.8077V8.96186H7.03845C6.1987 8.96186 5.48235 9.25834 4.8894 9.85129C4.29645 10.4442 3.99998 11.1606 3.99998 12.0003C3.99998 12.8401 4.29645 13.5564 4.8894 14.1494C5.48235 14.7423 6.1987 15.0388 7.03845 15.0388H10.8077V16.5388ZM8.25 12.7503V11.2504H15.75V12.7503H8.25ZM21.5 12.0003H20C20 11.1606 19.7035 10.4442 19.1106 9.85129C18.5176 9.25834 17.8013 8.96186 16.9615 8.96186H13.1923V7.46191H16.9615C18.2171 7.46191 19.2875 7.90441 20.1725 8.78939C21.0575 9.67439 21.5 10.7447 21.5 12.0003Z"/>
369 1228 </svg>
370 -`;$t`
1229 +`;It`
371 1230 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
372 1231 <g clip-path="url(#clip0_971_7680)">
373 1232 <path d="M11 18C11 19.1 10.1 20 9 20C7.9 20 7 19.1 7 18C7 16.9 7.9 16 9 16C10.1 16 11 16.9 11 18ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 8C16.1 8 17 7.1 17 6C17 4.9 16.1 4 15 4C13.9 4 13 4.9 13 6C13 7.1 13.9 8 15 8ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16Z" />
374 1233 </g>
@@ -377,9 +1236,9 @@
377 1236 <rect width="24" height="24"/>
378 1237 </clipPath>
379 1238 </defs>
380 1239 </svg>
381 -`;const EDe=$t`
1240 +`;const Gkt=It`
382 1241 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
383 1242 <g clip-path="url(#clip0_977_8067)">
384 1243 <path d="M8 7H20C20.55 7 21 6.55 21 6C21 5.45 20.55 5 20 5H8C7.45 5 7 5.45 7 6C7 6.55 7.45 7 8 7ZM20 17H8C7.45 17 7 17.45 7 18C7 18.55 7.45 19 8 19H20C20.55 19 21 18.55 21 18C21 17.45 20.55 17 20 17ZM20 11H8C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11ZM4.5 16H2.5C2.22 16 2 16.22 2 16.5C2 16.78 2.22 17 2.5 17H4V17.5H3.5C3.22 17.5 3 17.72 3 18C3 18.28 3.22 18.5 3.5 18.5H4V19H2.5C2.22 19 2 19.22 2 19.5C2 19.78 2.22 20 2.5 20H4.5C4.78 20 5 19.78 5 19.5V16.5C5 16.22 4.78 16 4.5 16ZM2.5 5H3V7.5C3 7.78 3.22 8 3.5 8C3.78 8 4 7.78 4 7.5V4.5C4 4.22 3.78 4 3.5 4H2.5C2.22 4 2 4.22 2 4.5C2 4.78 2.22 5 2.5 5ZM4.5 10H2.5C2.22 10 2 10.22 2 10.5C2 10.78 2.22 11 2.5 11H3.8L2.12 12.96C2.04 13.05 2 13.17 2 13.28V13.5C2 13.78 2.22 14 2.5 14H4.5C4.78 14 5 13.78 5 13.5C5 13.22 4.78 13 4.5 13H3.2L4.88 11.04C4.96 10.95 5 10.83 5 10.72V10.5C5 10.22 4.78 10 4.5 10Z"/>
385 1244 </g>
@@ -388,9 +1247,9 @@
388 1247 <rect width="24" height="24"/>
389 1248 </clipPath>
390 1249 </defs>
391 1250 </svg>
392 -`;$t`
1251 +`;It`
393 1252 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
394 1253 <g clip-path="url(#clip0_971_7676)">
395 1254 <path d="M18 13H13V18C13 18.55 12.55 19 12 19C11.45 19 11 18.55 11 18V13H6C5.45 13 5 12.55 5 12C5 11.45 5.45 11 6 11H11V6C11 5.45 11.45 5 12 5C12.55 5 13 5.45 13 6V11H18C18.55 11 19 11.45 19 12C19 12.55 18.55 13 18 13Z"/>
396 1255 </g>
@@ -399,9 +1258,9 @@
399 1258 <rect width="24" height="24"/>
400 1259 </clipPath>
401 1260 </defs>
402 1261 </svg>
403 -`;const xDe=$t`
1262 +`;const Xkt=It`
404 1263 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
405 1264 <g clip-path="url(#clip0_977_7897)">
406 1265 <path d="M7.17 17C7.68 17 8.15 16.71 8.37 16.26L9.79 13.42C9.93 13.14 10 12.84 10 12.53V8C10 7.45 9.55 7 9 7H5C4.45 7 4 7.45 4 8V12C4 12.55 4.45 13 5 13H7L5.97 15.06C5.52 15.95 6.17 17 7.17 17ZM17.17 17C17.68 17 18.15 16.71 18.37 16.26L19.79 13.42C19.93 13.14 20 12.84 20 12.53V8C20 7.45 19.55 7 19 7H15C14.45 7 14 7.45 14 8V12C14 12.55 14.45 13 15 13H17L15.97 15.06C15.52 15.95 16.17 17 17.17 17Z"/>
407 1266 </g>
@@ -410,21 +1269,21 @@
410 1269 <rect width="24" height="24"/>
411 1270 </clipPath>
412 1271 </defs>
413 1272 </svg>
414 -`,MDe=$t`
1273 +`,Kkt=It`
415 1274 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
416 1275 <path d="M7.30775 20.4997C6.81058 20.4997 6.385 20.3227 6.031 19.9687C5.677 19.6147 5.5 19.1892 5.5 18.692V5.99973H5.25C5.0375 5.99973 4.85942 5.92782 4.71575 5.78398C4.57192 5.64015 4.5 5.46198 4.5 5.24948C4.5 5.03682 4.57192 4.85873 4.71575 4.71523C4.85942 4.57157 5.0375 4.49973 5.25 4.49973H9C9 4.2549 9.08625 4.04624 9.25875 3.87374C9.43108 3.7014 9.63967 3.61523 9.8845 3.61523H14.1155C14.3603 3.61523 14.5689 3.7014 14.7413 3.87374C14.9138 4.04624 15 4.2549 15 4.49973H18.75C18.9625 4.49973 19.1406 4.57165 19.2843 4.71548C19.4281 4.85932 19.5 5.03748 19.5 5.24998C19.5 5.46265 19.4281 5.64073 19.2843 5.78423C19.1406 5.9279 18.9625 5.99973 18.75 5.99973H18.5V18.692C18.5 19.1892 18.323 19.6147 17.969 19.9687C17.615 20.3227 17.1894 20.4997 16.6923 20.4997H7.30775ZM17 5.99973H7V18.692C7 18.7818 7.02883 18.8556 7.0865 18.9132C7.14417 18.9709 7.21792 18.9997 7.30775 18.9997H16.6923C16.7821 18.9997 16.8558 18.9709 16.9135 18.9132C16.9712 18.8556 17 18.7818 17 18.692V5.99973ZM10.1543 16.9997C10.3668 16.9997 10.5448 16.9279 10.6885 16.7842C10.832 16.6404 10.9037 16.4622 10.9037 16.2497V8.74973C10.9037 8.53723 10.8318 8.35907 10.688 8.21523C10.5443 8.07157 10.3662 7.99973 10.1535 7.99973C9.941 7.99973 9.76292 8.07157 9.61925 8.21523C9.47575 8.35907 9.404 8.53723 9.404 8.74973V16.2497C9.404 16.4622 9.47583 16.6404 9.6195 16.7842C9.76333 16.9279 9.94158 16.9997 10.1543 16.9997ZM13.8465 16.9997C14.059 16.9997 14.2371 16.9279 14.3807 16.7842C14.5243 16.6404 14.596 16.4622 14.596 16.2497V8.74973C14.596 8.53723 14.5242 8.35907 14.3805 8.21523C14.2367 8.07157 14.0584 7.99973 13.8458 7.99973C13.6333 7.99973 13.4552 8.07157 13.3115 8.21523C13.168 8.35907 13.0962 8.53723 13.0962 8.74973V16.2497C13.0962 16.4622 13.1682 16.6404 13.312 16.7842C13.4557 16.9279 13.6338 16.9997 13.8465 16.9997Z"/>
417 1276 </svg>
418 -`;$t`
1277 +`;It`
419 1278 <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
420 1279 <path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" />
421 1280 </svg>
422 -`;const TDe=$t`
1281 +`;const Zkt=It`
423 1282 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
424 1283 <path d="M3.25 13.7404C3.0375 13.7404 2.85938 13.6684 2.71563 13.5246C2.57188 13.3808 2.5 13.2026 2.5 12.99C2.5 12.7774 2.57188 12.5993 2.71563 12.4558C2.85938 12.3122 3.0375 12.2404 3.25 12.2404H20.75C20.9625 12.2404 21.1406 12.3123 21.2843 12.4561C21.4281 12.5999 21.5 12.7781 21.5 12.9907C21.5 13.2033 21.4281 13.3814 21.2843 13.525C21.1406 13.6686 20.9625 13.7404 20.75 13.7404H3.25ZM10.9423 10.2596V6.62495H6.5673C6.2735 6.62495 6.02377 6.52201 5.8181 6.31613C5.61245 6.11026 5.50963 5.86027 5.50963 5.56615C5.50963 5.27205 5.61245 5.02083 5.8181 4.8125C6.02377 4.60417 6.2735 4.5 6.5673 4.5H17.4423C17.7361 4.5 17.9858 4.60294 18.1915 4.80883C18.3971 5.01471 18.5 5.2647 18.5 5.5588C18.5 5.85292 18.3971 6.10413 18.1915 6.31245C17.9858 6.52078 17.7361 6.62495 17.4423 6.62495H13.0673V10.2596H10.9423ZM10.9423 15.7211H13.0673V18.4423C13.0673 18.7361 12.9643 18.9858 12.7584 19.1915C12.5526 19.3971 12.3026 19.5 12.0085 19.5C11.7144 19.5 11.4631 19.3962 11.2548 19.1887C11.0465 18.9811 10.9423 18.7291 10.9423 18.4327V15.7211Z"/>
425 1284 </svg>
426 -`;$t`
1285 +`;It`
427 1286 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
428 1287 <g clip-path="url(#clip0_977_8078)">
429 1288 <path d="M20 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H20C21.1 21 22 20.1 22 19V5C22 3.9 21.1 3 20 3ZM20 5V8H5V5H20ZM15 19H10V10H15V19ZM5 10H8V19H5V10ZM17 19V10H20V19H17Z"/>
430 1289 </g>
@@ -433,9 +1292,9 @@
433 1292 <rect width="24" height="24"/>
434 1293 </clipPath>
435 1294 </defs>
436 1295 </svg>
437 -`;const ODe=$t`
1296 +`;const Jkt=It`
438 1297 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
439 1298 <g clip-path="url(#clip0_992_5547)">
440 1299 <path d="M5 5.5C5 6.33 5.67 7 6.5 7H10.5V17.5C10.5 18.33 11.17 19 12 19C12.83 19 13.5 18.33 13.5 17.5V7H17.5C18.33 7 19 6.33 19 5.5C19 4.67 18.33 4 17.5 4H6.5C5.67 4 5 4.67 5 5.5Z"/>
441 1300 </g>
@@ -444,30 +1303,81 @@
444 1303 <rect width="24" height="24"/>
445 1304 </clipPath>
446 1305 </defs>
447 1306 </svg>
448 -`;$t`
1307 +`;It`
449 1308 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
450 1309 <path d="M5.66936 16.3389L9.39244 12.6158C9.54115 12.4671 9.71679 12.3937 9.91936 12.3957C10.1219 12.3976 10.2975 12.4761 10.4463 12.6312C10.5847 12.7823 10.654 12.9585 10.654 13.1599C10.654 13.3613 10.5847 13.5363 10.4463 13.6851L6.32704 17.8197C6.14627 18.0004 5.93538 18.0908 5.69436 18.0908C5.45333 18.0908 5.24243 18.0004 5.06166 17.8197L3.01744 15.7754C2.87899 15.637 2.81136 15.4629 2.81456 15.2533C2.81776 15.0437 2.88859 14.8697 3.02706 14.7312C3.16551 14.5928 3.34008 14.5235 3.55076 14.5235C3.76144 14.5235 3.93494 14.5928 4.07126 14.7312L5.66936 16.3389ZM5.66936 8.72359L9.39244 5.00049C9.54115 4.85177 9.71679 4.77838 9.91936 4.78031C10.1219 4.78223 10.2975 4.86075 10.4463 5.01586C10.5847 5.16691 10.654 5.34314 10.654 5.54454C10.654 5.74592 10.5847 5.92097 10.4463 6.06969L6.32704 10.2043C6.14627 10.3851 5.93538 10.4755 5.69436 10.4755C5.45333 10.4755 5.24243 10.3851 5.06166 10.2043L3.01744 8.16009C2.87899 8.02162 2.81136 7.84759 2.81456 7.63799C2.81776 7.42837 2.88859 7.25433 3.02706 7.11586C3.16551 6.97741 3.34008 6.90819 3.55076 6.90819C3.76144 6.90819 3.93494 6.97741 4.07126 7.11586L5.66936 8.72359ZM13.7597 16.5581C13.5472 16.5581 13.3691 16.4862 13.2253 16.3424C13.0816 16.1986 13.0097 16.0204 13.0097 15.8078C13.0097 15.5952 13.0816 15.4171 13.2253 15.2735C13.3691 15.13 13.5472 15.0582 13.7597 15.0582H20.7597C20.9722 15.0582 21.1503 15.1301 21.2941 15.2739C21.4378 15.4177 21.5097 15.5959 21.5097 15.8085C21.5097 16.0211 21.4378 16.1992 21.2941 16.3427C21.1503 16.4863 20.9722 16.5581 20.7597 16.5581H13.7597ZM13.7597 8.94276C13.5472 8.94276 13.3691 8.87085 13.2253 8.72704C13.0816 8.58324 13.0097 8.40504 13.0097 8.19244C13.0097 7.97985 13.0816 7.80177 13.2253 7.65819C13.3691 7.5146 13.5472 7.44281 13.7597 7.44281H20.7597C20.9722 7.44281 21.1503 7.51471 21.2941 7.65851C21.4378 7.80233 21.5097 7.98053 21.5097 8.19311C21.5097 8.40571 21.4378 8.5838 21.2941 8.72739C21.1503 8.87097 20.9722 8.94276 20.7597 8.94276H13.7597Z"/>
451 1310 </svg>
452 -`;const IDe=(e,t)=>{e.config(gDe).config(n=>{n.update(Tv.key,o=>({...o,linkIcon:(t==null?void 0:t.linkIcon)??(()=>JL),editButton:(t==null?void 0:t.editButton)??(()=>wDe),removeButton:(t==null?void 0:t.removeButton)??(()=>MDe),confirmButton:(t==null?void 0:t.confirmButton)??(()=>bDe),inputPlaceholder:(t==null?void 0:t.inputPlaceholder)??"Paste link...",onCopyLink:(t==null?void 0:t.onCopyLink)??(()=>{})}))}).use(vDe)},ADe=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:IDe},Symbol.toStringTag,{value:"Module"}));var XL="Expected a function",h$=0/0,NDe="[object Symbol]",PDe=/^\s+|\s+$/g,LDe=/^[-+]0x[0-9a-f]+$/i,RDe=/^0b[01]+$/i,DDe=/^0o[0-7]+$/i,FDe=parseInt,VDe=typeof On=="object"&&On&&On.Object===Object&&On,BDe=typeof self=="object"&&self&&self.Object===Object&&self,zDe=VDe||BDe||Function("return this")(),jDe=Object.prototype,HDe=jDe.toString,UDe=Math.max,WDe=Math.min,i_=function(){return zDe.Date.now()};function KDe(e,t,n){var o,r,s,i,l,a,u=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(XL);t=m$(t)||0,l0(n)&&(c=!!n.leading,d="maxWait"in n,s=d?UDe(m$(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function p(E){var T=o,O=r;return o=r=void 0,u=E,i=e.apply(O,T),i}function h(E){return u=E,l=setTimeout(v,t),c?p(E):i}function m(E){var T=E-a,O=E-u,P=t-T;return d?WDe(P,s-O):P}function y(E){var T=E-a,O=E-u;return a===void 0||T>=t||T<0||d&&O>=s}function v(){var E=i_();if(y(E))return w(E);l=setTimeout(v,m(E))}function w(E){return l=void 0,f&&o?p(E):(o=r=void 0,i)}function _(){l!==void 0&&clearTimeout(l),u=0,o=a=r=l=void 0}function S(){return l===void 0?i:w(i_())}function x(){var E=i_(),T=y(E);if(o=arguments,r=this,a=E,T){if(l===void 0)return h(a);if(d)return l=setTimeout(v,t),p(a)}return l===void 0&&(l=setTimeout(v,t)),i}return x.cancel=_,x.flush=S,x}function qDe(e,t,n){var o=!0,r=!0;if(typeof e!="function")throw new TypeError(XL);return l0(n)&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),KDe(e,t,{leading:o,maxWait:t,trailing:r})}function l0(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function GDe(e){return!!e&&typeof e=="object"}function YDe(e){return typeof e=="symbol"||GDe(e)&&HDe.call(e)==NDe}function m$(e){if(typeof e=="number")return e;if(YDe(e))return h$;if(l0(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=l0(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(PDe,"");var n=RDe.test(e);return n||DDe.test(e)?FDe(e.slice(2),n?2:8):LDe.test(e)?h$:+e}var ZDe=qDe;const JDe=_o(ZDe);var QL=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ht=(e,t,n)=>(QL(e,t,"read from private field"),n?n.call(e):t.get(e)),co=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},sn=(e,t,n,o)=>(QL(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);function Iv(e,t){return Object.assign(e,{meta:{package:"@milkdown/plugin-block",...t}}),e}const XDe=e=>!cC(t=>t.type.name==="table")(e),Hh=In({filterNodes:XDe},"blockConfig");Iv(Hh,{displayName:"Ctx<blockConfig>"});function QDe(e,t,n){var o;if(!e.dom.parentElement)return null;const r=(o=e.posAtCoords({left:t.x,top:t.y}))==null?void 0:o.inside;if(r==null||r<0)return null;let s=e.state.doc.resolve(r),i=e.state.doc.nodeAt(r),l=e.nodeDOM(r);const a=c=>{const d=s.depth>=1&&s.index(s.depth)===0;if(!(c||d))return;const f=s.before(s.depth);i=e.state.doc.nodeAt(f),l=e.nodeDOM(f),s=e.state.doc.resolve(f),n(s,i)||a(!0)},u=n(s,i);return a(!u),!l||!i?null:{node:i,$pos:s,el:l}}let g$=null;function eFe(){return g$||(g$=document.implementation.createHTMLDocument("title"))}const tFe={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 nFe(e,t){const n=[];let{openStart:o,openEnd:r,content:s}=t;for(;o>1&&r>1&&s.childCount===1&&s.firstChild.childCount===1;){o-=1,r-=1;const p=s.firstChild;n.push(p.type.name,p.attrs!==p.type.defaultAttrs?p.attrs:null),s=p.content}const i=e.someProp("clipboardSerializer")||ta.fromSchema(e.state.schema),l=eFe(),a=l.createElement("div");a.appendChild(i.serializeFragment(s,{document:l}));let u=a.firstChild,c,d=0;for(;u&&u.nodeType===1&&(c=tFe[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){const h=l.createElement(c[p]);for(;a.firstChild;)h.appendChild(a.firstChild);a.appendChild(h),d++}u=a.firstChild}u&&u.nodeType===1&&u.setAttribute("data-pm-slice",`${o} ${r}${d?` -${d}`:""} ${JSON.stringify(n)}`);const f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,`
1311 +`;const Qkt=(t,e)=>{t.config(Vkt).config(n=>{n.update(tw.key,i=>({...i,linkIcon:(e==null?void 0:e.linkIcon)??(()=>pW),editButton:(e==null?void 0:e.editButton)??(()=>Ukt),removeButton:(e==null?void 0:e.removeButton)??(()=>Kkt),confirmButton:(e==null?void 0:e.confirmButton)??(()=>fW),inputPlaceholder:(e==null?void 0:e.inputPlaceholder)??"Paste link...",onCopyLink:(e==null?void 0:e.onCopyLink)??(()=>{})}))}).use(Fkt)},eCt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:Qkt},Symbol.toStringTag,{value:"Module"}));var mW="Expected a function",CP=0/0,tCt="[object Symbol]",nCt=/^\s+|\s+$/g,sCt=/^[-+]0x[0-9a-f]+$/i,iCt=/^0b[01]+$/i,oCt=/^0o[0-7]+$/i,rCt=parseInt,aCt=typeof xs=="object"&&xs&&xs.Object===Object&&xs,lCt=typeof self=="object"&&self&&self.Object===Object&&self,cCt=aCt||lCt||Function("return this")(),uCt=Object.prototype,dCt=uCt.toString,hCt=Math.max,fCt=Math.min,dk=function(){return cCt.Date.now()};function pCt(t,e,n){var i,s,o,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(mW);e=xP(e)||0,db(n)&&(u=!!n.leading,d="maxWait"in n,o=d?hCt(xP(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(M){var P=i,T=s;return i=s=void 0,c=M,r=t.apply(T,P),r}function p(M){return c=M,a=setTimeout(w,e),u?f(M):r}function m(M){var P=M-l,T=M-c,I=e-P;return d?fCt(I,o-T):I}function b(M){var P=M-l,T=M-c;return l===void 0||P>=e||P<0||d&&T>=o}function w(){var M=dk();if(b(M))return k(M);a=setTimeout(w,m(M))}function k(M){return a=void 0,h&&i?f(M):(i=s=void 0,r)}function C(){a!==void 0&&clearTimeout(a),c=0,i=l=s=a=void 0}function A(){return a===void 0?r:k(dk())}function S(){var M=dk(),P=b(M);if(i=arguments,s=this,l=M,P){if(a===void 0)return p(l);if(d)return a=setTimeout(w,e),f(l)}return a===void 0&&(a=setTimeout(w,e)),r}return S.cancel=C,S.flush=A,S}function mCt(t,e,n){var i=!0,s=!0;if(typeof t!="function")throw new TypeError(mW);return db(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),pCt(t,e,{leading:i,maxWait:e,trailing:s})}function db(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function gCt(t){return!!t&&typeof t=="object"}function vCt(t){return typeof t=="symbol"||gCt(t)&&dCt.call(t)==tCt}function xP(t){if(typeof t=="number")return t;if(vCt(t))return CP;if(db(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=db(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(nCt,"");var n=iCt.test(t);return n||oCt.test(t)?rCt(t.slice(2),n?2:8):sCt.test(t)?CP:+t}var _Ct=mCt;const yCt=_i(_Ct);var gW=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Cn=(t,e,n)=>(gW(t,e,"read from private field"),n?n.call(t):e.get(t)),Ci=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Yn=(t,e,n,i)=>(gW(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);function sw(t,e){return Object.assign(t,{meta:{package:"@milkdown/plugin-block",...e}}),t}const bCt=t=>!o5(e=>e.type.name==="table")(t),Tv=ms({filterNodes:bCt},"blockConfig");sw(Tv,{displayName:"Ctx<blockConfig>"});function wCt(t,e,n){var i;if(!t.dom.parentElement)return null;try{const s=(i=t.posAtCoords({left:e.x,top:e.y}))==null?void 0:i.inside;if(s==null||s<0)return null;let o=t.state.doc.resolve(s),r=t.state.doc.nodeAt(s),a=t.nodeDOM(s);const l=u=>{const d=o.depth>=1&&o.index(o.depth)===0;if(!(u||d))return;const h=o.before(o.depth);r=t.state.doc.nodeAt(h),a=t.nodeDOM(h),o=t.state.doc.resolve(h),n(o,r)||l(!0)},c=n(o,r);return l(!c),!a||!r?null:{node:r,$pos:o,el:a}}catch{return null}}let SP=null;function kCt(){return SP||(SP=document.implementation.createHTMLDocument("title"))}const CCt={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 xCt(t,e){const n=[];let{openStart:i,openEnd:s,content:o}=e;for(;i>1&&s>1&&o.childCount===1&&o.firstChild.childCount===1;){i-=1,s-=1;const f=o.firstChild;n.push(f.type.name,f.attrs!==f.type.defaultAttrs?f.attrs:null),o=f.content}const r=t.someProp("clipboardSerializer")||iu.fromSchema(t.state.schema),a=kCt(),l=a.createElement("div");l.appendChild(r.serializeFragment(o,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType===1&&(u=CCt[c.nodeName.toLowerCase()]);){for(let f=u.length-1;f>=0;f--){const p=a.createElement(u[f]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),d++}c=l.firstChild}c&&c.nodeType===1&&c.setAttribute("data-pm-slice",`${i} ${s}${d?` -${d}`:""} ${JSON.stringify(n)}`);const h=t.someProp("clipboardTextSerializer",f=>f(e,t))||e.content.textBetween(0,e.content.size,`
453 1312
454 -`);return{dom:a,text:f}}const v$=Sm.ie&&Sm.ie_version<15||Sm.ios&&Sm.webkit_version<604,y$=20;var dp,Z1,uc,Ns,Mf,Ps,U2,eR,cc,Tf,dc,fc,J1,Of,If,Af,X1,pc;class oFe{constructor(){co(this,U2),co(this,cc),co(this,dp,void 0),co(this,Z1,void 0),co(this,uc,void 0),co(this,Ns,void 0),co(this,Mf,void 0),co(this,Ps,void 0),co(this,dc,void 0),co(this,fc,void 0),co(this,J1,void 0),co(this,Of,void 0),co(this,If,void 0),co(this,Af,void 0),co(this,X1,void 0),co(this,pc,void 0),sn(this,Z1,()=>{if(!Ht(this,Ns))return null;const t=Ht(this,Ns),n=Ht(this,cc,Tf);if(n&&mt.isSelectable(t.node)){const o=mt.create(n.state.doc,t.$pos.pos);return n.dispatch(n.state.tr.setSelection(o)),n.focus(),sn(this,uc,o),o}return null}),sn(this,uc,null),sn(this,Ns,null),sn(this,Mf,void 0),sn(this,Ps,!1),sn(this,fc,()=>{var t;(t=Ht(this,dc))==null||t.call(this,{type:"hide"}),sn(this,Ns,null)}),sn(this,J1,t=>{var n;sn(this,Ns,t),(n=Ht(this,dc))==null||n.call(this,{type:"show",active:t})}),this.bind=(t,n)=>{sn(this,dp,t),sn(this,dc,n)},this.addEvent=t=>{t.addEventListener("mousedown",Ht(this,Of)),t.addEventListener("mouseup",Ht(this,If)),t.addEventListener("dragstart",Ht(this,Af))},this.removeEvent=t=>{t.removeEventListener("mousedown",Ht(this,Of)),t.removeEventListener("mouseup",Ht(this,If)),t.removeEventListener("dragstart",Ht(this,Af))},this.unBind=()=>{sn(this,dc,void 0)},sn(this,Of,()=>{var t;sn(this,Mf,(t=Ht(this,Ns))==null?void 0:t.el.getBoundingClientRect()),Ht(this,Z1).call(this)}),sn(this,If,()=>{if(!Ht(this,Ps)){requestAnimationFrame(()=>{var t;Ht(this,Mf)&&((t=Ht(this,cc,Tf))==null||t.focus())});return}sn(this,Ps,!1),sn(this,uc,null)}),sn(this,Af,t=>{var n;sn(this,Ps,!0);const o=Ht(this,cc,Tf);if(!o)return;o.dom.dataset.dragging="true";const r=Ht(this,uc);if(t.dataTransfer&&r){const s=r.content();t.dataTransfer.effectAllowed="copyMove";const{dom:i,text:l}=nFe(o,s);t.dataTransfer.clearData(),t.dataTransfer.setData(v$?"Text":"text/html",i.innerHTML),v$||t.dataTransfer.setData("text/plain",l);const a=(n=Ht(this,Ns))==null?void 0:n.el;a&&t.dataTransfer.setDragImage(a,0,0),o.dragging={slice:s,move:!0}}}),this.keydownCallback=t=>(Ht(this,fc).call(this),sn(this,Ps,!1),t.dom.dataset.dragging="false",!1),sn(this,X1,JDe((t,n)=>{if(!t.editable)return;const o=t.dom.getBoundingClientRect(),r=o.left+o.width/2;if(!(t.root.elementFromPoint(r,n.clientY)instanceof Element)){Ht(this,fc).call(this);return}const s=Ht(this,U2,eR);if(!s)return;const i=QDe(t,{x:r,y:n.clientY},s);if(!i){Ht(this,fc).call(this);return}Ht(this,J1).call(this,i)},200)),this.mousemoveCallback=(t,n)=>(t.composing||!t.editable||Ht(this,X1).call(this,t,n),!1),this.dragoverCallback=(t,n)=>{var o;if(Ht(this,Ps)){const r=(o=Ht(this,cc,Tf))==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)<y$){const a=r.scrollTop>10?r.scrollTop-10:0;return r.scrollTop=a,!1}const l=Math.round(t.dom.getBoundingClientRect().height);if(Math.round(r.scrollTop+i.height)<l&&Math.abs(n.y-(i.height+i.y))<y$){const a=r.scrollTop+10;return r.scrollTop=a,!1}}}return!1},this.dragenterCallback=t=>{t.dragging&&(sn(this,Ps,!0),t.dom.dataset.dragging="true")},this.dragleaveCallback=(t,n)=>{const o=n.clientX,r=n.clientY;(o<0||r<0||o>window.innerWidth||r>window.innerHeight)&&(sn(this,Ns,null),Ht(this,pc).call(this,t))},this.dropCallback=t=>(Ht(this,pc).call(this,t),!1),this.dragendCallback=t=>{Ht(this,pc).call(this,t)},sn(this,pc,t=>{sn(this,Ps,!1),t.dom.dataset.dragging="false"})}}dp=new WeakMap,Z1=new WeakMap,uc=new WeakMap,Ns=new WeakMap,Mf=new WeakMap,Ps=new WeakMap,U2=new WeakSet,eR=function(){var e;return(e=Ht(this,dp))==null?void 0:e.get(Hh.key).filterNodes},cc=new WeakSet,Tf=function(){var e;return(e=Ht(this,dp))==null?void 0:e.get(bn)},dc=new WeakMap,fc=new WeakMap,J1=new WeakMap,Of=new WeakMap,If=new WeakMap,Af=new WeakMap,X1=new WeakMap,pc=new WeakMap;const tR=In(new oFe,"blockService");Iv(Hh,{displayName:"Ctx<blockService>"});const zk=In({},"blockSpec");Iv(Hh,{displayName:"Ctx<blockSpec>"});const jk=ao(e=>{const t=new wn("MILKDOWN_BLOCK"),n=e.get(tR.key),o=e.get(zk.key);return new xn({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)}}})});Iv(jk,{displayName:"Prose<block>"});const Hk=[zk,Hh,tR,jk];Hk.key=zk.key;Hk.pluginKey=jk.key;var Uk=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},El=(e,t,n)=>(Uk(e,t,"read from private field"),n?n.call(e):t.get(e)),ha=(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)},ma=(e,t,n,o)=>(Uk(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n),rFe=(e,t,n)=>(Uk(e,t,"access private method"),n);function sFe(e){const t=In({},`${e}_SLASH_SPEC`),n=ao(r=>{const s=r.get(t.key);return new xn({key:new wn(`${e}_SLASH`),...s})}),o=[t,n];return o.key=t.key,o.pluginKey=n.key,t.meta={package:"@milkdown/plugin-slash",displayName:`Ctx<slashSpec>|${e}`},n.meta={package:"@milkdown/plugin-slash",displayName:`Prose<slash>|${e}`},o}var Nf,Q1,hc,eg,tg,ng,W2,nR;class iFe{constructor(t){ha(this,W2),ha(this,Nf,void 0),ha(this,Q1,void 0),ha(this,hc,void 0),ha(this,eg,void 0),ha(this,tg,void 0),ha(this,ng,void 0),ma(this,Nf,!1),this.onShow=()=>{},this.onHide=()=>{},ma(this,ng,(n,o)=>{var r;const{state:s,composing:i}=n,{selection:l,doc:a}=s,{ranges:u}=l,c=Math.min(...u.map(p=>p.$from.pos)),d=Math.max(...u.map(p=>p.$to.pos)),f=o&&o.doc.eq(a)&&o.selection.eq(l);if(El(this,Nf)||((r=n.dom.parentElement)==null||r.appendChild(this.element),ma(this,Nf,!0)),!(i||f)){if(!El(this,eg).call(this,n,o)){this.hide();return}tb({getBoundingClientRect:()=>av(n,c,d)},this.element,{placement:"bottom-start",middleware:[eb(),X_(El(this,tg))]}).then(({x:p,y:h})=>{Object.assign(this.element.style,{left:`${p}px`,top:`${h}px`})}),this.show()}}),this.update=(n,o)=>{Sv(El(this,ng),El(this,Q1))(n,o)},this.getContent=(n,o=r=>r.type.name==="paragraph")=>{const{selection:r}=n.state,{empty:s,$from:i}=r,l=n.state.selection instanceof ht,a=this.element.contains(document.activeElement),u=!n.hasFocus()&&!a,c=!n.editable,d=!lwe(o)(n.state.selection);if(!(u||c||!s||!l||d))return i.parent.textBetween(Math.max(0,i.parentOffset-500),i.parentOffset,void 0,"")},this.destroy=()=>{},this.show=()=>{this.element.dataset.show="true",this.onShow()},this.hide=()=>{this.element.dataset.show="false",this.onHide()},this.element=t.content,ma(this,Q1,t.debounce??200),ma(this,eg,t.shouldShow??rFe(this,W2,nR)),ma(this,hc,t.trigger??"/"),ma(this,tg,t.offset)}}Nf=new WeakMap,Q1=new WeakMap,hc=new WeakMap,eg=new WeakMap,tg=new WeakMap,ng=new WeakMap,W2=new WeakSet,nR=function(e){const t=this.getContent(e);if(!t)return!1;const n=t.at(-1);return n?Array.isArray(El(this,hc))?El(this,hc).includes(n):El(this,hc)===n:!1};function oR(e){return e.$from.parent.type.name==="code_block"}function rR(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 sR(e,t){customElements.get(e)==null&&customElements.define(e,t)}function Wk(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 lFe(e,t,n=null){const{from:o,to:r}=e.selection;return e.setBlockType(o,r,t,n)}function aFe(e,t,n=null){const{$from:o,$to:r}=e.selection,s=o.blockRange(r),i=s&&iC(s,t,n);return i?e.wrap(s,i):null}function uFe(e,t,n=null){const o=t.createAndFill(n);return o?e.replaceSelectionWith(o):null}function Rm(e,t=null){return(n,o)=>{if(o){const r=lFe(Wk(n.tr),e,t);o(r.scrollIntoView())}return!0}}function l_(e,t=null){return(n,o)=>{const r=aFe(Wk(n.tr),e,t);return r?(o&&o(r.scrollIntoView()),!0):!1}}function cFe(e,t=null){return(n,o)=>{const r=uFe(Wk(n.tr),e,t);return r?(o&&o(r.scrollIntoView()),!0):!1}}var xl,Lc;class dFe{constructor(){xs(this,xl,void 0);xs(this,Lc,void 0);Lo(this,xl,[]),this.clear=()=>(Lo(this,xl,[]),this),Lo(this,Lc,t=>{const n={group:t,addItem:(o,r)=>{const s={key:o,...r};return t.items.push(s),n},clear:()=>(t.items=[],n)};return n}),this.addGroup=(t,n)=>{const r={key:t,label:n,items:[]};return kt(this,xl).push(r),kt(this,Lc).call(this,r)},this.getGroup=t=>{const n=kt(this,xl).find(o=>o.key===t);if(!n)throw new Error(`Group with key ${t} not found`);return kt(this,Lc).call(this,n)},this.build=()=>kt(this,xl)}}xl=new WeakMap,Lc=new WeakMap;function Ts(e){return window.fluentComAdmin.i18n[e]||e}function fFe(e,t){var s,i,l,a,u,c,d,f,p;const n=new dFe;n.addGroup("text",(t==null?void 0:t.slashMenuTextGroupLabel)??Ts("Text")).addItem("text",{label:(t==null?void 0:t.slashMenuTextGroupLabel)??Ts("Text"),icon:((s=t==null?void 0:t.slashMenuTextIcon)==null?void 0:s.call(t))??ODe,onRun:h=>{const m=h.get(bn),{dispatch:y,state:v}=m;Rm(ji.type(h))(v,y)}}).addItem("h2",{label:(t==null?void 0:t.slashMenuH2Label)??Ts("Heading 2"),icon:((i=t==null?void 0:t.slashMenuH2Icon)==null?void 0:i.call(t))??CDe,onRun:h=>{const m=h.get(bn),{dispatch:y,state:v}=m;Rm(Ws.type(h),{level:2})(v,y)}}).addItem("h3",{label:(t==null?void 0:t.slashMenuH3Label)??Ts("Heading 3"),icon:((l=t==null?void 0:t.slashMenuH3Icon)==null?void 0:l.call(t))??kDe,onRun:h=>{const m=h.get(bn),{dispatch:y,state:v}=m;Rm(Ws.type(h),{level:3})(v,y)}}).addItem("h4",{label:(t==null?void 0:t.slashMenuH4Label)??Ts("Heading 4"),icon:((a=t==null?void 0:t.slashMenuH4Icon)==null?void 0:a.call(t))??SDe,onRun:h=>{const m=h.get(bn),{dispatch:y,state:v}=m;Rm(Ws.type(h),{level:4})(v,y)}}).addItem("quote",{label:(t==null?void 0:t.slashMenuQuoteLabel)??Ts("Quote"),icon:((u=t==null?void 0:t.slashMenuQuoteIcon)==null?void 0:u.call(t))??xDe,onRun:h=>{const m=h.get(bn),{dispatch:y,state:v}=m;l_(Nd.type(h))(v,y)}}).addItem("code",{label:(t==null?void 0:t.slashMenuCodeBlockLabel)??Ts("Code"),icon:((c=t==null?void 0:t.slashMenuCodeBlockIcon)==null?void 0:c.call(t))??ZL,onRun:h=>{const m=h.get(bn),{dispatch:y,state:v}=m;cFe(Pd.type(h))(v,y)}}),n.addGroup("list",(t==null?void 0:t.slashMenuListGroupLabel)??Ts("List")).addItem("bullet-list",{label:(t==null?void 0:t.slashMenuBulletListLabel)??Ts("Bullet List"),icon:((d=t==null?void 0:t.slashMenuBulletListIcon)==null?void 0:d.call(t))??_De,onRun:h=>{const m=h.get(bn),{dispatch:y,state:v}=m;l_(Mu.type(h))(v,y)}}).addItem("ordered-list",{label:(t==null?void 0:t.slashMenuOrderedListLabel)??Ts("Ordered List"),icon:((f=t==null?void 0:t.slashMenuOrderedListIcon)==null?void 0:f.call(t))??EDe,onRun:h=>{const m=h.get(bn),{dispatch:y,state:v}=m;l_(Tu.type(h))(v,y)}}),(p=t==null?void 0:t.buildMenu)==null||p.call(t,n);let o=n.build();e&&(o=o.map(h=>{const m=h.items.filter(y=>y.label.toLowerCase().includes(e.toLowerCase()));return{...h,items:m}}).filter(h=>h.items.length>0));const r=o.flatMap(h=>h.items);return r.forEach((h,m)=>{Object.assign(h,{index:m})}),o.reduce((h,m)=>{const y=h+m.items.length;return Object.assign(m,{range:[h,y]}),y},0),{groups:o,size:r.length}}const iR=({show:e,hide:t,ctx:n,filter:o,config:r})=>{const{groups:s,size:i}=D2(()=>fFe(o,r),[o]),l=CL(),[a,u]=TL(0),c=D2(()=>l.current.getRootNode(),[l]),d=Rk({x:-999,y:-999}),f=Fu(w=>{const _=d.current;if(!_)return;const{x:S,y:x}=w;_.x=S,_.y=x},[]);i0(()=>{i===0&&e&&(t==null||t())},[i,e]);const p=Fu((w,_)=>{u(S=>{const x=typeof w=="function"?w(S):w;return _==null||_(x),x})},[]),h=Fu(w=>{const _=l.current.querySelector(`[data-index="${w}"]`),S=l.current.querySelector(".menu-groups");!_||!S||(S.scrollTop=_.offsetTop-S.offsetTop)},[]),m=Fu(w=>{const _=s.flatMap(S=>S.items).at(w);_&&n&&_.onRun(n),t==null||t()},[s]),y=Fu(w=>{if(w.key==="Escape"){w.preventDefault(),t==null||t();return}if(w.key==="ArrowDown")return w.preventDefault(),p(_=>_<i-1?_+1:_,h);if(w.key==="ArrowUp")return w.preventDefault(),p(_=>_<=0?_:_-1,h);if(w.key==="ArrowLeft")return w.preventDefault(),p(_=>{const S=s.find(E=>E.range[0]<=_&&E.range[1]>_);if(!S)return _;const x=s[s.indexOf(S)-1];return x?x.range[1]-1:_},h);if(w.key==="ArrowRight")return w.preventDefault(),p(_=>{const S=s.find(E=>E.range[0]<=_&&E.range[1]>_);if(!S)return _;const x=s[s.indexOf(S)+1];return x?x.range[0]:_},h);w.key==="Enter"&&(w.preventDefault(),m(a))},[t,s,a]),v=Fu(w=>_=>{const S=d.current;if(!S)return;const{x,y:E}=_;x===S.x&&E===S.y||p(w)},[]);return i0(()=>(e?c.addEventListener("keydown",y,{capture:!0}):c.removeEventListener("keydown",y,{capture:!0}),()=>{c.removeEventListener("keydown",y,{capture:!0})}),[e,y]),$t`
455 - <host onmousedown=${w=>w.preventDefault()}>
456 - <div class="menu-groups" onmousemove=${f}>
457 - ${s.map(w=>$t`
458 - <div key=${w.key} class="menu-group">
1313 +`);return{dom:l,text:h}}const $P=p_.ie&&p_.ie_version<15||p_.ios&&p_.webkit_version<604,AP=20;var Sg,Ny,Hh,va,Fm,_a,v6,vW,Uh,Nm,jh,Wh,By,Bm,zm,Hm,zy,Yh;class SCt{constructor(){Ci(this,v6),Ci(this,Uh),Ci(this,Sg,void 0),Ci(this,Ny,void 0),Ci(this,Hh,void 0),Ci(this,va,void 0),Ci(this,Fm,void 0),Ci(this,_a,void 0),Ci(this,jh,void 0),Ci(this,Wh,void 0),Ci(this,By,void 0),Ci(this,Bm,void 0),Ci(this,zm,void 0),Ci(this,Hm,void 0),Ci(this,zy,void 0),Ci(this,Yh,void 0),Yn(this,Ny,()=>{if(!Cn(this,va))return null;const e=Cn(this,va),n=Cn(this,Uh,Nm);if(n&&Rt.isSelectable(e.node)){const i=Rt.create(n.state.doc,e.$pos.pos);return n.dispatch(n.state.tr.setSelection(i)),n.focus(),Yn(this,Hh,i),i}return null}),Yn(this,Hh,null),Yn(this,va,null),Yn(this,Fm,void 0),Yn(this,_a,!1),Yn(this,Wh,()=>{var e;(e=Cn(this,jh))==null||e.call(this,{type:"hide"}),Yn(this,va,null)}),Yn(this,By,e=>{var n;Yn(this,va,e),(n=Cn(this,jh))==null||n.call(this,{type:"show",active:e})}),this.bind=(e,n)=>{Yn(this,Sg,e),Yn(this,jh,n)},this.addEvent=e=>{e.addEventListener("mousedown",Cn(this,Bm)),e.addEventListener("mouseup",Cn(this,zm)),e.addEventListener("dragstart",Cn(this,Hm))},this.removeEvent=e=>{e.removeEventListener("mousedown",Cn(this,Bm)),e.removeEventListener("mouseup",Cn(this,zm)),e.removeEventListener("dragstart",Cn(this,Hm))},this.unBind=()=>{Yn(this,jh,void 0)},Yn(this,Bm,()=>{var e;Yn(this,Fm,(e=Cn(this,va))==null?void 0:e.el.getBoundingClientRect()),Cn(this,Ny).call(this)}),Yn(this,zm,()=>{if(!Cn(this,_a)){requestAnimationFrame(()=>{var e;Cn(this,Fm)&&((e=Cn(this,Uh,Nm))==null||e.focus())});return}Yn(this,_a,!1),Yn(this,Hh,null)}),Yn(this,Hm,e=>{var n;Yn(this,_a,!0);const i=Cn(this,Uh,Nm);if(!i)return;i.dom.dataset.dragging="true";const s=Cn(this,Hh);if(e.dataTransfer&&s){const o=s.content();e.dataTransfer.effectAllowed="copyMove";const{dom:r,text:a}=xCt(i,o);e.dataTransfer.clearData(),e.dataTransfer.setData($P?"Text":"text/html",r.innerHTML),$P||e.dataTransfer.setData("text/plain",a);const l=(n=Cn(this,va))==null?void 0:n.el;l&&e.dataTransfer.setDragImage(l,0,0),i.dragging={slice:o,move:!0}}}),this.keydownCallback=e=>(Cn(this,Wh).call(this),Yn(this,_a,!1),e.dom.dataset.dragging="false",!1),Yn(this,zy,yCt((e,n)=>{if(!e.editable)return;const i=e.dom.getBoundingClientRect(),s=i.left+i.width/2;if(!(e.root.elementFromPoint(s,n.clientY)instanceof Element)){Cn(this,Wh).call(this);return}const o=Cn(this,v6,vW);if(!o)return;const r=wCt(e,{x:s,y:n.clientY},o);if(!r){Cn(this,Wh).call(this);return}Cn(this,By).call(this,r)},200)),this.mousemoveCallback=(e,n)=>(e.composing||!e.editable||Cn(this,zy).call(this,e,n),!1),this.dragoverCallback=(e,n)=>{var i;if(Cn(this,_a)){const s=(i=Cn(this,Uh,Nm))==null?void 0:i.dom.parentElement;if(!s)return!1;const o=s.scrollHeight>s.clientHeight,r=s.getBoundingClientRect();if(o){if(s.scrollTop>0&&Math.abs(n.y-r.y)<AP){const l=s.scrollTop>10?s.scrollTop-10:0;return s.scrollTop=l,!1}const a=Math.round(e.dom.getBoundingClientRect().height);if(Math.round(s.scrollTop+r.height)<a&&Math.abs(n.y-(r.height+r.y))<AP){const l=s.scrollTop+10;return s.scrollTop=l,!1}}}return!1},this.dragenterCallback=e=>{e.dragging&&(Yn(this,_a,!0),e.dom.dataset.dragging="true")},this.dragleaveCallback=(e,n)=>{const i=n.clientX,s=n.clientY;(i<0||s<0||i>window.innerWidth||s>window.innerHeight)&&(Yn(this,va,null),Cn(this,Yh).call(this,e))},this.dropCallback=e=>(Cn(this,Yh).call(this,e),!1),this.dragendCallback=e=>{Cn(this,Yh).call(this,e)},Yn(this,Yh,e=>{Yn(this,_a,!1),e.dom.dataset.dragging="false"})}}Sg=new WeakMap,Ny=new WeakMap,Hh=new WeakMap,va=new WeakMap,Fm=new WeakMap,_a=new WeakMap,v6=new WeakSet,vW=function(){var t;return(t=Cn(this,Sg))==null?void 0:t.get(Tv.key).filterNodes},Uh=new WeakSet,Nm=function(){var t;return(t=Cn(this,Sg))==null?void 0:t.get(Vn)},jh=new WeakMap,Wh=new WeakMap,By=new WeakMap,Bm=new WeakMap,zm=new WeakMap,Hm=new WeakMap,zy=new WeakMap,Yh=new WeakMap;const _W=ms(new SCt,"blockService");sw(Tv,{displayName:"Ctx<blockService>"});const a9=ms({},"blockSpec");sw(Tv,{displayName:"Ctx<blockSpec>"});const l9=Ls(t=>{const e=new ps("MILKDOWN_BLOCK"),n=t.get(_W.key),i=t.get(a9.key);return new rs({key:e,...i,props:{...i.props,handleDOMEvents:{drop:s=>n.dropCallback(s),pointermove:(s,o)=>n.mousemoveCallback(s,o),keydown:s=>n.keydownCallback(s),dragover:(s,o)=>n.dragoverCallback(s,o),dragleave:(s,o)=>n.dragleaveCallback(s,o),dragenter:s=>n.dragenterCallback(s),dragend:s=>n.dragendCallback(s)}}})});sw(l9,{displayName:"Prose<block>"});const c9=[a9,Tv,_W,l9];c9.key=a9.key;c9.pluginKey=l9.key;var u9=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},yc=(t,e,n)=>(u9(t,e,"read from private field"),n?n.call(t):e.get(t)),yu=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},bu=(t,e,n,i)=>(u9(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),$Ct=(t,e,n)=>(u9(t,e,"access private method"),n);function ACt(t){const e=ms({},`${t}_SLASH_SPEC`),n=Ls(s=>{const o=s.get(e.key);return new rs({key:new ps(`${t}_SLASH`),...o})}),i=[e,n];return i.key=e.key,i.pluginKey=n.key,e.meta={package:"@milkdown/plugin-slash",displayName:`Ctx<slashSpec>|${t}`},n.meta={package:"@milkdown/plugin-slash",displayName:`Prose<slash>|${t}`},i}var Um,Hy,Kh,Uy,jy,Wy,_6,yW;class ECt{constructor(e){yu(this,_6),yu(this,Um,void 0),yu(this,Hy,void 0),yu(this,Kh,void 0),yu(this,Uy,void 0),yu(this,jy,void 0),yu(this,Wy,void 0),bu(this,Um,!1),this.onShow=()=>{},this.onHide=()=>{},bu(this,Wy,(n,i)=>{var s;const{state:o,composing:r}=n,{selection:a,doc:l}=o,{ranges:c}=a,u=Math.min(...c.map(f=>f.$from.pos)),d=Math.max(...c.map(f=>f.$to.pos)),h=i&&i.doc.eq(l)&&i.selection.eq(a);if(yc(this,Um)||((s=n.dom.parentElement)==null||s.appendChild(this.element),bu(this,Um,!0)),!(r||h)){if(!yc(this,Uy).call(this,n,i)){this.hide();return}rC({getBoundingClientRect:()=>S2(n,u,d)},this.element,{placement:"bottom-start",middleware:[oC(),iC(yc(this,jy))]}).then(({x:f,y:p})=>{Object.assign(this.element.style,{left:`${f}px`,top:`${p}px`})}),this.show()}}),this.update=(n,i)=>{z2(yc(this,Wy),yc(this,Hy))(n,i)},this.getContent=(n,i=s=>s.type.name==="paragraph")=>{const{selection:s}=n.state,{empty:o,$from:r}=s,a=n.state.selection instanceof Ot,l=this.element.contains(document.activeElement),c=!n.hasFocus()&&!l,u=!n.editable,d=!J5e(i)(n.state.selection);if(!(c||u||!o||!a||d))return r.parent.textBetween(Math.max(0,r.parentOffset-500),r.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=e.content,bu(this,Hy,e.debounce??200),bu(this,Uy,e.shouldShow??$Ct(this,_6,yW)),bu(this,Kh,e.trigger??"/"),bu(this,jy,e.offset)}}Um=new WeakMap,Hy=new WeakMap,Kh=new WeakMap,Uy=new WeakMap,jy=new WeakMap,Wy=new WeakMap,_6=new WeakSet,yW=function(t){const e=this.getContent(t);if(!e)return!1;const n=e.at(-1);return n?Array.isArray(yc(this,Kh))?yc(this,Kh).includes(n):yc(this,Kh)===n:!1};function bW(t){return t.$from.parent.type.name==="code_block"}function wW(t){var n;const e=(n=t.$from.node(t.$from.depth-1))==null?void 0:n.type;return(e==null?void 0:e.name)==="list_item"}function kW(t,e){customElements.get(t)==null&&customElements.define(t,e)}var MCt=Object.defineProperty,EP=Object.getOwnPropertySymbols,TCt=Object.prototype.hasOwnProperty,PCt=Object.prototype.propertyIsEnumerable,MP=(t,e,n)=>e in t?MCt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ICt=(t,e)=>{for(var n in e||(e={}))TCt.call(e,n)&&MP(t,n,e[n]);if(EP)for(var n of EP(e))PCt.call(e,n)&&MP(t,n,e[n]);return t};function Pv(t,e){return Object.assign(t,{meta:ICt({package:"@milkdown/components"},e)}),t}var LCt=Object.defineProperty,TP=Object.getOwnPropertySymbols,OCt=Object.prototype.hasOwnProperty,DCt=Object.prototype.propertyIsEnumerable,PP=(t,e,n)=>e in t?LCt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,RCt=(t,e)=>{for(var n in e||(e={}))OCt.call(e,n)&&PP(t,n,e[n]);if(TP)for(var n of TP(e))DCt.call(e,n)&&PP(t,n,e[n]);return t};const y6="image-block",iw=Hs("image-block",()=>({inline:!1,group:"block",selectable:!0,draggable:!0,isolating:!0,marks:"",atom:!0,priority:100,attrs:{src:{default:""},caption:{default:""},ratio:{default:1}},parseDOM:[{tag:`img[data-type="${y6}"]`,getAttrs:t=>{var e;if(!(t instanceof HTMLElement))throw la(t);return{src:t.getAttribute("src")||"",caption:t.getAttribute("caption")||"",ratio:Number((e=t.getAttribute("ratio"))!=null?e:1)}}}],toDOM:t=>["img",RCt({"data-type":y6},t.attrs)],parseMarkdown:{match:({type:t})=>t==="image-block",runner:(t,e,n)=>{const i=e.url,s=e.title;let o=Number(e.alt||1);(Number.isNaN(o)||o===0)&&(o=1),t.addNode(n,{src:i,caption:s,ratio:o})}},toMarkdown:{match:t=>t.type.name==="image-block",runner:(t,e)=>{t.openNode("paragraph"),t.addNode("image",void 0,void 0,{title:e.attrs.caption,url:e.attrs.src,alt:`${Number.parseFloat(e.attrs.ratio).toFixed(2)}`}),t.closeNode()}}}));Pv(iw.node,{displayName:"NodeSchema<image-block>",group:"ImageBlock"});function VCt(t){return qd(t,"paragraph",(e,n,i)=>{var s,o;if(((s=e.children)==null?void 0:s.length)!==1)return;const r=(o=e.children)==null?void 0:o[0];if(!r||r.type!=="image")return;const{url:a,alt:l,title:c}=r,u={type:"image-block",url:a,alt:l,title:c};i.children.splice(n,1,u)})}const d9=Gd("remark-image-block",()=>()=>VCt);Pv(d9.plugin,{displayName:"Remark<remarkImageBlock>",group:"ImageBlock"});Pv(d9.options,{displayName:"RemarkConfig<remarkImageBlock>",group:"ImageBlock"});const FCt={imageIcon:()=>"🌌",captionIcon:()=>"💬",uploadButton:()=>It`Upload file`,confirmButton:()=>It`Confirm ⏎`,uploadPlaceholderText:"or paste the image link ...",captionPlaceholderText:"Image caption",onUpload:t=>Promise.resolve(URL.createObjectURL(t))},ow=ms(FCt,"imageBlockConfigCtx");Pv(ow,{displayName:"Config<image-block>",group:"ImageBlock"});function NCt(t,e){const n=customElements.get(t);if(n==null){customElements.define(t,e);return}n!==e&&console.warn(`Custom element ${t} has been defined before.`)}function BCt({image:t,resizeHandle:e,ratio:n,setRatio:i,src:s}){const o=n9(),r=ub(()=>o.current.getRootNode(),[o]);Pd(()=>{const a=t.current;a&&(delete a.dataset.origin,delete a.dataset.height,a.style.height="")},[s]),Pd(()=>{const a=e.current,l=t.current;if(!a||!l)return;const c=f=>{f.preventDefault();const p=l.getBoundingClientRect().top,m=f.clientY-p,b=Number(m<100?100:m).toFixed(2);l.dataset.height=b,l.style.height=`${b}px`},u=()=>{r.removeEventListener("pointermove",c),r.removeEventListener("pointerup",u);const f=Number(l.dataset.origin),p=Number(l.dataset.height),m=Number.parseFloat(Number(p/f).toFixed(2));Number.isNaN(m)||i(m)},d=f=>{f.preventDefault(),r.addEventListener("pointermove",c),r.addEventListener("pointerup",u)},h=f=>{const p=o.current.getBoundingClientRect().width;if(!p)return;const m=f.target,b=m.height,w=m.width,k=w<p?b:p*(b/w),C=(k*n).toFixed(2);l.dataset.origin=k.toFixed(2),l.dataset.height=C,l.style.height=`${C}px`};return l.addEventListener("load",h),a.addEventListener("pointerdown",d),()=>{l.removeEventListener("load",h),a.removeEventListener("pointerdown",d)}},[])}var zCt=(t,e,n)=>new Promise((i,s)=>{var o=l=>{try{a(n.next(l))}catch(c){s(c)}},r=l=>{try{a(n.throw(l))}catch(c){s(c)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,r);a((n=n.apply(t,e)).next())});let Ch=0;const CW=({src:t="",caption:e="",ratio:n=1,selected:i=!1,readonly:s=!1,setAttr:o,config:r})=>{const a=dd(),l=dd(),c=dd(),[u,d]=Rr(e.length>0),[h,f]=Rr(t.length!==0),[p]=Rr(crypto.randomUUID()),[m,b]=Rr(!1),[w,k]=Rr(t);BCt({image:a,resizeHandle:l,ratio:n,setRatio:V=>o==null?void 0:o("ratio",V),src:t}),Pd(()=>{i||d(e.length>0)},[i]);const C=V=>{const F=V.target.value;Ch&&window.clearTimeout(Ch),Ch=window.setTimeout(()=>{o==null||o("caption",F)},1e3)},A=V=>{const F=V.target.value;Ch&&(window.clearTimeout(Ch),Ch=0),o==null||o("caption",F)},S=V=>{const F=V.target.value;f(F.length!==0),k(F)},M=V=>zCt(void 0,null,function*(){var H;const F=(H=V.target.files)==null?void 0:H[0];if(!F)return;const U=yield r==null?void 0:r.onUpload(F);U&&(o==null||o("src",U),f(!0))}),P=V=>{V.preventDefault(),V.stopPropagation(),!s&&d(H=>!H)},T=()=>{var V,H;o==null||o("src",(H=(V=c.current)==null?void 0:V.value)!=null?H:"")},I=V=>{V.key==="Enter"&&T()},L=V=>{V.preventDefault(),V.stopPropagation()},R=V=>{V.stopPropagation(),V.preventDefault()};return It`<host class=${ni(i&&"selected")}>
1314 + <div class=${ni("image-edit",t.length>0&&"hidden")}>
1315 + <div class="image-icon">
1316 + ${r==null?void 0:r.imageIcon()}
1317 + </div>
1318 + <div class=${ni("link-importer",m&&"focus")}>
1319 + <input
1320 + ref=${c}
1321 + draggable="true"
1322 + ondragstart=${L}
1323 + disabled=${s}
1324 + class="link-input-area"
1325 + value=${w}
1326 + oninput=${S}
1327 + onkeydown=${I}
1328 + onfocus=${()=>b(!0)}
1329 + onblur=${()=>b(!1)}
1330 + />
1331 + <div class=${ni("placeholder",h&&"hidden")}>
1332 + <input disabled=${s} class="hidden" id=${p} type="file" accept="image/*" onchange=${M} />
1333 + <label onpointerdown=${R} class="uploader" for=${p}>
1334 + ${r==null?void 0:r.uploadButton()}
1335 + </label>
1336 + <span class="text" onclick=${()=>{var V;return(V=c.current)==null?void 0:V.focus()}}>
1337 + ${r==null?void 0:r.uploadPlaceholderText}
1338 + </span>
1339 + </div>
1340 + </div>
1341 + <div
1342 + class=${ni("confirm",w.length===0&&"hidden")}
1343 + onclick=${()=>T()}
1344 + >
1345 + ${r==null?void 0:r.confirmButton()}
1346 + </div>
1347 + </div>
1348 + <div class=${ni("image-wrapper",t.length===0&&"hidden")}>
1349 + <div class="operation">
1350 + <div class="operation-item" onpointerdown=${P}>${r==null?void 0:r.captionIcon()}</div>
1351 + </div>
1352 + <img ref=${a} data-type=${y6} src=${t} alt=${e} ratio=${n} />
1353 + <div ref=${l} class="image-resize-handle"></div>
1354 + </div>
1355 + <input
1356 + draggable="true"
1357 + ondragstart=${L}
1358 + class=${ni("caption-input",!u&&"hidden")}
1359 + placeholder=${r==null?void 0:r.captionPlaceholderText}
1360 + oninput=${C}
1361 + onblur=${A}
1362 + value=${e}
1363 + />
1364 + </host>`};CW.props={src:String,caption:String,ratio:Number,selected:Boolean,readonly:Boolean,setAttr:Function,config:Object};const HCt=th(CW);NCt("milkdown-image-block",HCt);const xW=Sz(iw.node,t=>(e,n,i)=>{const s=document.createElement("milkdown-image-block"),o=t.get(ow.key),r=a=>{s.src=a.attrs.src,s.ratio=a.attrs.ratio,s.caption=a.attrs.caption,s.readonly=!n.editable};return r(e),s.selected=!1,s.setAttr=(a,l)=>{const c=i();c!=null&&n.dispatch(n.state.tr.setNodeAttribute(c,a,l))},s.config=o,{dom:s,update:a=>a.type!==e.type?!1:(r(a),!0),stopEvent:a=>a.target instanceof HTMLInputElement,selectNode:()=>{s.selected=!0},deselectNode:()=>{s.selected=!1},destroy:()=>{s.remove()}}});Pv(xW,{displayName:"NodeView<image-block>",group:"ImageBlock"});const UCt=[d9,iw,xW,ow].flat();function h9(t){const{$from:e,$to:n}=t.selection,{pos:i}=e,{pos:s}=n;return t=t.deleteRange(i-e.node().content.size,s),t}function jCt(t,e,n=null){const{from:i,to:s}=t.selection;return t.setBlockType(i,s,e,n)}function WCt(t,e,n=null){const{$from:i,$to:s}=t.selection,o=i.blockRange(s),r=o&&t5(o,e,n);return r?t.wrap(o,r):null}function YCt(t,e,n=null){const i=e.createAndFill(n);return i?t.replaceSelectionWith(i):null}function A_(t,e=null){return(n,i)=>{if(i){const s=jCt(h9(n.tr),t,e);i(s.scrollIntoView())}return!0}}function hk(t,e=null){return(n,i)=>{const s=WCt(h9(n.tr),t,e);return s?(i&&i(s.scrollIntoView()),!0):!1}}function fk(t,e=null){return(n,i)=>{const s=YCt(h9(n.tr),t,e);return s?(i&&i(s.scrollIntoView()),!0):!1}}var bc,kf;class qCt{constructor(){ha(this,bc,void 0);ha(this,kf,void 0);Qi(this,bc,[]),this.clear=()=>(Qi(this,bc,[]),this),Qi(this,kf,e=>{const n={group:e,addItem:(i,s)=>{const o={key:i,...s};return e.items.push(o),n},clear:()=>(e.items=[],n)};return n}),this.addGroup=(e,n)=>{const s={key:e,label:n,items:[]};return Xt(this,bc).push(s),Xt(this,kf).call(this,s)},this.getGroup=e=>{const n=Xt(this,bc).find(i=>i.key===e);if(!n)throw new Error(`Group with key ${e} not found`);return Xt(this,kf).call(this,n)},this.build=()=>Xt(this,bc)}}bc=new WeakMap,kf=new WeakMap;function $o(t){return window.fluentComAdmin.i18n[t]||t}typeof crypto<"u"&&!crypto.randomUUID&&(crypto.randomUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})});function GCt(t,e){var o,r,a,l,c,u,d,h,f,p,m;const n=new qCt;n.addGroup("text",(e==null?void 0:e.slashMenuTextGroupLabel)??$o("Text")).addItem("text",{label:(e==null?void 0:e.slashMenuTextGroupLabel)??$o("Text"),icon:((o=e==null?void 0:e.slashMenuTextIcon)==null?void 0:o.call(e))??Jkt,onRun:b=>{const w=b.get(Vn),{dispatch:k,state:C}=w;A_(Ol.type(b))(C,k)}}).addItem("h2",{label:(e==null?void 0:e.slashMenuH2Label)??$o("Heading 2"),icon:((r=e==null?void 0:e.slashMenuH2Icon)==null?void 0:r.call(e))??jkt,onRun:b=>{const w=b.get(Vn),{dispatch:k,state:C}=w;A_(Ea.type(b),{level:2})(C,k)}}).addItem("h3",{label:(e==null?void 0:e.slashMenuH3Label)??$o("Heading 3"),icon:((a=e==null?void 0:e.slashMenuH3Icon)==null?void 0:a.call(e))??Wkt,onRun:b=>{const w=b.get(Vn),{dispatch:k,state:C}=w;A_(Ea.type(b),{level:3})(C,k)}}).addItem("h4",{label:(e==null?void 0:e.slashMenuH4Label)??$o("Heading 4"),icon:((l=e==null?void 0:e.slashMenuH4Icon)==null?void 0:l.call(e))??Ykt,onRun:b=>{const w=b.get(Vn),{dispatch:k,state:C}=w;A_(Ea.type(b),{level:4})(C,k)}}).addItem("quote",{label:(e==null?void 0:e.slashMenuQuoteLabel)??$o("Quote"),icon:((c=e==null?void 0:e.slashMenuQuoteIcon)==null?void 0:c.call(e))??Xkt,onRun:b=>{const w=b.get(Vn),{dispatch:k,state:C}=w;hk(yp.type(b))(C,k)}}).addItem("code",{label:(e==null?void 0:e.slashMenuCodeBlockLabel)??$o("Code"),icon:((u=e==null?void 0:e.slashMenuCodeBlockIcon)==null?void 0:u.call(e))??hW,onRun:b=>{const w=b.get(Vn),{dispatch:k,state:C}=w;fk(bp.type(b))(C,k)}}).addItem("divider",{label:(e==null?void 0:e.slashMenuDividerLabel)??$o("Divider"),icon:((d=e==null?void 0:e.slashMenuDividerIcon)==null?void 0:d.call(e))??Hkt,onRun:b=>{const w=b.get(Vn);fk(wp.type(b))(w.state,w.dispatch);const{state:k}=w,C=Ot.near(k.doc.resolve(k.selection.to));w.dispatch(k.tr.setSelection(C).scrollIntoView()),w.focus()}}),n.addGroup("list",(e==null?void 0:e.slashMenuListGroupLabel)??$o("List")).addItem("bullet-list",{label:(e==null?void 0:e.slashMenuBulletListLabel)??$o("Bullet List"),icon:((h=e==null?void 0:e.slashMenuBulletListIcon)==null?void 0:h.call(e))??Bkt,onRun:b=>{const w=b.get(Vn),{dispatch:k,state:C}=w;hk(Zd.type(b))(C,k)}}).addItem("ordered-list",{label:(e==null?void 0:e.slashMenuOrderedListLabel)??$o("Ordered List"),icon:((f=e==null?void 0:e.slashMenuOrderedListIcon)==null?void 0:f.call(e))??Gkt,onRun:b=>{const w=b.get(Vn),{dispatch:k,state:C}=w;hk(Jd.type(b))(C,k)}}),(e==null?void 0:e.hasImageBlock)!==!1&&n.addGroup("media",(e==null?void 0:e.slashMenuMediaGroupLabel)??$o("Media")).addItem("image",{label:(e==null?void 0:e.slashMenuImageLabel)??$o("Image"),icon:((p=e==null?void 0:e.slashMenuImageIcon)==null?void 0:p.call(e))??g6,onRun:b=>{if(e!=null&&e.canAddImage&&!e.canAddImage())return;const w=b.get(Vn),{dispatch:k,state:C}=w;fk(iw.type(b))(C,k)}}),(m=e==null?void 0:e.buildMenu)==null||m.call(e,n);let i=n.build();t&&(i=i.map(b=>{const w=b.items.filter(k=>k.label.toLowerCase().includes(t.toLowerCase()));return{...b,items:w}}).filter(b=>b.items.length>0));const s=i.flatMap(b=>b.items);return s.forEach((b,w)=>{Object.assign(b,{index:w})}),i.reduce((b,w)=>{const k=b+w.items.length;return Object.assign(w,{range:[b,k]}),k},0),{groups:i,size:s.length}}const SW=({show:t,hide:e,ctx:n,filter:i,config:s})=>{const{groups:o,size:r}=ub(()=>GCt(i,s),[i]),a=n9(),[l,c]=Rr(0),u=ub(()=>a.current.getRootNode(),[a]),d=dd({x:-999,y:-999}),h=vh(k=>{const C=d.current;if(!C)return;const{x:A,y:S}=k;C.x=A,C.y=S},[]);Pd(()=>{r===0&&t&&(e==null||e())},[r,t]);const f=vh((k,C)=>{c(A=>{const S=typeof k=="function"?k(A):k;return C==null||C(S),S})},[]),p=vh(k=>{const C=a.current.querySelector(`[data-index="${k}"]`),A=a.current.querySelector(".menu-groups");!C||!A||(A.scrollTop=C.offsetTop-A.offsetTop)},[]),m=vh(k=>{const C=o.flatMap(A=>A.items).at(k);C&&n&&C.onRun(n),e==null||e()},[o]),b=vh(k=>{if(k.key==="Escape"){k.preventDefault(),e==null||e();return}if(k.key==="ArrowDown")return k.preventDefault(),f(C=>C<r-1?C+1:C,p);if(k.key==="ArrowUp")return k.preventDefault(),f(C=>C<=0?C:C-1,p);if(k.key==="ArrowLeft")return k.preventDefault(),f(C=>{const A=o.find(M=>M.range[0]<=C&&M.range[1]>C);if(!A)return C;const S=o[o.indexOf(A)-1];return S?S.range[1]-1:C},p);if(k.key==="ArrowRight")return k.preventDefault(),f(C=>{const A=o.find(M=>M.range[0]<=C&&M.range[1]>C);if(!A)return C;const S=o[o.indexOf(A)+1];return S?S.range[0]:C},p);k.key==="Enter"&&(k.preventDefault(),m(l))},[e,o,l]),w=vh(k=>C=>{const A=d.current;if(!A)return;const{x:S,y:M}=C;S===A.x&&M===A.y||f(k)},[]);return Pd(()=>(t?u.addEventListener("keydown",b,{capture:!0}):u.removeEventListener("keydown",b,{capture:!0}),()=>{u.removeEventListener("keydown",b,{capture:!0})}),[t,b]),It`
1365 + <host onmousedown=${k=>k.preventDefault()}>
1366 + <div class="menu-groups" onmousemove=${h}>
1367 + ${o.map(k=>It`
1368 + <div key=${k.key} class="menu-group">
459 1369 <ul>
460 - ${w.items.map(_=>$t`<li
461 - key=${_.key}
462 - data-index=${_.index}
463 - class=${a===_.index?"hover":""}
464 - onmouseenter=${v(_.index)}
465 - onmousedown=${()=>{var S;(S=l.current.querySelector(`[data-index="${_.index}"]`))==null||S.classList.add("active")}}
466 - onmouseup=${()=>{var S;(S=l.current.querySelector(`[data-index="${_.index}"]`))==null||S.classList.remove("active"),m(_.index)}}
1370 + ${k.items.map(C=>It`<li
1371 + key=${C.key}
1372 + data-index=${C.index}
1373 + class=${l===C.index?"hover":""}
1374 + onmouseenter=${w(C.index)}
1375 + onmousedown=${()=>{var A;(A=a.current.querySelector(`[data-index="${C.index}"]`))==null||A.classList.add("active")}}
1376 + onmouseup=${()=>{var A;(A=a.current.querySelector(`[data-index="${C.index}"]`))==null||A.classList.remove("active"),m(C.index)}}
467 1377 >
468 - ${_.icon}
469 - <span>${_.label}</span>
1378 + ${C.icon}
1379 + <span>${C.label}</span>
470 1380 </li>`)}
471 1381 </ul>
472 1382 </div>
473 1383 `)}
@@ -472,37 +1382,73 @@
472 1382 </div>
473 1383 `)}
474 1384 </div>
475 1385 </host>
476 - `};iR.props={ctx:Object,config:Object,show:Boolean,filter:String,hide:Function};const lR=zh(iR),aR=sFe("CREPE_MENU"),uR=In({show:()=>{},hide:()=>{}},"menuAPICtx");sR("milkdown-slash-menu",lR);function pFe(e,t){e.set(aR.key,{view:n=>new hFe(e,n,t)})}var sr,Fs,Ml;class hFe{constructor(t,n,o){xs(this,sr,void 0);xs(this,Fs,void 0);xs(this,Ml,void 0);Lo(this,Ml,null),this.update=s=>{kt(this,Fs).update(s)},this.show=s=>{Lo(this,Ml,s),kt(this,sr).filter="",kt(this,Fs).show()},this.hide=()=>{Lo(this,Ml,null),kt(this,Fs).hide()},this.destroy=()=>{kt(this,Fs).destroy(),kt(this,sr).remove()},Lo(this,sr,new lR),kt(this,sr).hide=this.hide,kt(this,sr).ctx=t,kt(this,sr).config=o;const r=this;Lo(this,Fs,new iFe({content:kt(this,sr),debounce:20,shouldShow(s){if(oR(s.state.selection)||rR(s.state.selection))return!1;const i=this.getContent(s,a=>["paragraph","heading"].includes(a.type.name));if(i==null)return!1;const l=kt(r,Ml);return kt(r,sr).filter=i.startsWith("/")?i.slice(1):i,typeof l=="number"?s.state.doc.resolve(l).node()!==s.state.doc.resolve(s.state.selection.from).node()?(Lo(r,Ml,null),!1):!0:!!i.startsWith("/")},offset:10})),kt(this,Fs).onShow=()=>{kt(this,sr).show=!0},kt(this,Fs).onHide=()=>{kt(this,sr).show=!1},this.update(n),t.set(uR.key,{show:s=>this.show(s),hide:()=>this.hide()})}}sr=new WeakMap,Fs=new WeakMap,Ml=new WeakMap;const mFe=(e,t)=>{e.config(n=>pFe(n,t)).use(uR).use(Hk).use(aR)},gFe=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:mFe},Symbol.toStringTag,{value:"Module"}));function vFe(e){var t;return e.childCount<=1&&!((t=e.firstChild)!=null&&t.content.size)}function yFe(e,t){const{selection:n}=e;if(!n.empty)return null;const o=n.$anchor,r=o.parent;if(r.content.size>0||cC(l=>l.type.name==="table")(o))return null;const i=o.before();return zn.node(i,i+r.nodeSize,{class:"crepe-placeholder","data-placeholder":t})}const a0=In({text:"Please enter...",mode:"block"},"placeholderConfigCtx"),cR=ao(e=>new xn({key:new wn("CREPE_PLACEHOLDER"),props:{decorations:t=>{const n=e.get(a0.key);if(n.mode==="doc"&&!vFe(t.doc)||oR(t.selection)||rR(t.selection))return null;const o=n.text??"Please enter...",r=yFe(t,o);return r?an.create(t.doc,[r]):null}}})),_Fe=(e,t)=>{e.config(n=>{t&&n.update(a0.key,o=>({...o,...t}))}).use(cR).use(a0)},bFe=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:_Fe,placeholderConfig:a0,placeholderPlugin:cR},Symbol.toStringTag,{value:"Module"})),dR=({ctx:e,hide:t,show:n,config:o})=>{var l,a,u,c,d;const r=kL();i0(()=>{r()},[n]);const s=f=>p=>{p.preventDefault(),e&&f(e),r()},i=f=>{if(!e)return!1;const p=e.get(bn),{state:{doc:h,selection:m}}=p;return h.rangeHasMark(m.from,m.to,f)};return $t`<host>
1386 + `};SW.props={ctx:Object,config:Object,show:Boolean,filter:String,hide:Function};const $W=th(SW),AW=ACt("CREPE_MENU"),EW=ms({show:()=>{},hide:()=>{}},"menuAPICtx");kW("milkdown-slash-menu",$W);function XCt(t,e){t.set(AW.key,{view:n=>new KCt(t,n,e)})}var Mo,Ca,wc;class KCt{constructor(e,n,i){ha(this,Mo,void 0);ha(this,Ca,void 0);ha(this,wc,void 0);Qi(this,wc,null),this.update=o=>{Xt(this,Ca).update(o)},this.show=o=>{Qi(this,wc,o),Xt(this,Mo).filter="",Xt(this,Ca).show()},this.hide=()=>{Qi(this,wc,null),Xt(this,Ca).hide()},this.destroy=()=>{Xt(this,Ca).destroy(),Xt(this,Mo).remove()},Qi(this,Mo,new $W),Xt(this,Mo).hide=this.hide,Xt(this,Mo).ctx=e,Xt(this,Mo).config=i;const s=this;Qi(this,Ca,new ECt({content:Xt(this,Mo),debounce:20,shouldShow(o){if(bW(o.state.selection)||wW(o.state.selection))return!1;const r=this.getContent(o,l=>["paragraph","heading"].includes(l.type.name));if(r==null)return!1;const a=Xt(s,wc);return Xt(s,Mo).filter=r.startsWith("/")?r.slice(1):r,typeof a=="number"?o.state.doc.resolve(a).node()!==o.state.doc.resolve(o.state.selection.from).node()?(Qi(s,wc,null),!1):!0:!!r.startsWith("/")},offset:10})),Xt(this,Ca).onShow=()=>{Xt(this,Mo).show=!0},Xt(this,Ca).onHide=()=>{Xt(this,Mo).show=!1},this.update(n),e.set(EW.key,{show:o=>this.show(o),hide:()=>this.hide()})}}Mo=new WeakMap,Ca=new WeakMap,wc=new WeakMap;const ZCt=(t,e)=>{t.config(n=>XCt(n,e)).use(EW).use(c9).use(AW)},JCt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:ZCt},Symbol.toStringTag,{value:"Module"}));function QCt(t){var e;return t.childCount<=1&&!((e=t.firstChild)!=null&&e.content.size)}function ext(t,e){const{selection:n}=t;if(!n.empty)return null;const i=n.$anchor,s=i.parent;if(s.content.size>0||o5(a=>a.type.name==="table")(i))return null;const r=i.before();return Fs.node(r,r+s.nodeSize,{class:"crepe-placeholder","data-placeholder":e})}const hb=ms({text:"Please enter...",mode:"block"},"placeholderConfigCtx"),MW=Ls(t=>new rs({key:new ps("CREPE_PLACEHOLDER"),props:{decorations:e=>{const n=t.get(hb.key);if(n.mode==="doc"&&!QCt(e.doc)||bW(e.selection)||wW(e.selection))return null;const i=n.text??"Please enter...",s=ext(e,i);return s?Kn.create(e.doc,[s]):null}}})),txt=(t,e)=>{t.config(n=>{e&&n.update(hb.key,i=>({...i,...e}))}).use(MW).use(hb)},nxt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:txt,placeholderConfig:hb,placeholderPlugin:MW},Symbol.toStringTag,{value:"Module"})),TW=({ctx:t,hide:e,show:n,config:i})=>{var a,l,c,u,d;const s=Bj();Pd(()=>{s()},[n]);const o=h=>f=>{f.preventDefault(),t&&h(t),s()},r=h=>{if(!t)return!1;const f=t.get(Vn),{state:{doc:p,selection:m}}=f;return p.rangeHasMark(m.from,m.to,h)};return It`<host>
477 1387 <button
478 - class=${ac("toolbar-item",e&&i(Ad.type(e))&&"active")}
479 - onmousedown=${s(f=>{f.get(Dt).call(vv.key)})}
1388 + class=${ni("toolbar-item",t&&r(_p.type(t))&&"active")}
1389 + onmousedown=${o(h=>{h.get(gn).call(O2.key)})}
480 1390 >
481 - ${((l=o==null?void 0:o.boldIcon)==null?void 0:l.call(o))??yDe}
1391 + ${((a=i==null?void 0:i.boldIcon)==null?void 0:a.call(i))??Nkt}
482 1392 </button>
483 1393 <button
484 - class=${ac("toolbar-item",e&&i(xu.type(e))&&"active")}
485 - onmousedown=${s(f=>{f.get(Dt).call(gv.key)})}
1394 + class=${ni("toolbar-item",t&&r(Xd.type(t))&&"active")}
1395 + onmousedown=${o(h=>{h.get(gn).call(L2.key)})}
486 1396 >
487 - ${((a=o==null?void 0:o.italicIcon)==null?void 0:a.call(o))??$De}
1397 + ${((l=i==null?void 0:i.italicIcon)==null?void 0:l.call(i))??qkt}
488 1398 </button>
489 1399 <button
490 - class=${ac("toolbar-item",e&&i(Rd.type(e))&&"active")}
491 - onmousedown=${s(f=>{f.get(Dt).call(wv.key)})}
1400 + class=${ni("toolbar-item",t&&r(kp.type(t))&&"active")}
1401 + onmousedown=${o(h=>{h.get(gn).call(F2.key)})}
492 1402 >
493 - ${((u=o==null?void 0:o.strikethroughIcon)==null?void 0:u.call(o))??TDe}
1403 + ${((c=i==null?void 0:i.strikethroughIcon)==null?void 0:c.call(i))??Zkt}
494 1404 </button>
495 1405 <div class="divider"></div>
496 1406 <button
497 - class=${ac("toolbar-item",e&&i($i.type(e))&&"active")}
498 - onmousedown=${s(f=>{f.get(Dt).call(yv.key)})}
1407 + class=${ni("toolbar-item",t&&r(ll.type(t))&&"active")}
1408 + onmousedown=${o(h=>{h.get(gn).call(D2.key)})}
499 1409 >
500 - ${((c=o==null?void 0:o.codeIcon)==null?void 0:c.call(o))??ZL}
1410 + ${((u=i==null?void 0:i.codeIcon)==null?void 0:u.call(i))??hW}
501 1411 </button>
502 1412 <button
503 - class=${ac("toolbar-item",e&&i(fs.type(e))&&"active")}
504 - onmousedown=${s(f=>{const p=f.get(bn),{selection:h}=p.state;if(i(fs.type(f))){f.get(gd.key).removeLink(h.from,h.to);return}f.get(gd.key).addLink(h.from,h.to),t==null||t()})}
1413 + class=${ni("toolbar-item",t&&r(Gr.type(t))&&"active")}
1414 + onmousedown=${o(h=>{const f=h.get(Vn),{selection:p}=f.state;if(r(Gr.type(h))){h.get(op.key).removeLink(p.from,p.to);return}h.get(op.key).addLink(p.from,p.to),e==null||e()})}
505 1415 >
506 - ${((d=o==null?void 0:o.linkIcon)==null?void 0:d.call(o))??JL}
1416 + ${((d=i==null?void 0:i.linkIcon)==null?void 0:d.call(i))??pW}
507 1417 </button>
508 - </host>`};dR.props={ctx:Object,hide:Function,show:Boolean,config:Object};const fR=zh(dR),_$=Vk("CREPE_TOOLBAR");var _i,So;class wFe{constructor(t,n,o){xs(this,_i,void 0);xs(this,So,void 0);this.update=(s,i)=>{kt(this,_i).update(s,i)},this.destroy=()=>{kt(this,_i).destroy(),kt(this,So).remove()},this.hide=()=>{kt(this,_i).hide()};const r=new fR;Lo(this,So,r),kt(this,So).ctx=t,kt(this,So).hide=this.hide,kt(this,So).config=o,Lo(this,_i,new Fk({content:kt(this,So),debounce:20,offset:10,shouldShow(s){const{doc:i,selection:l}=s.state,{empty:a,from:u,to:c}=l,d=!i.textBetween(u,c).length&&l instanceof ht,f=!(l instanceof ht),p=s.dom.getRootNode().activeElement,h=r.contains(p),m=!s.hasFocus()&&!h,y=!s.editable;return!(m||f||a||d||y)}})),kt(this,_i).onShow=()=>{kt(this,So).show=!0,setTimeout(()=>{let s=kt(this,So).style.left;s=parseInt(s),console.log(s),s<0?(kt(this,So).style.left=0,console.log(kt(this,So))):s>350&&(kt(this,So).style.left="350px")},0)},kt(this,_i).onHide=()=>{kt(this,So).show=!1},this.update(n)}}_i=new WeakMap,So=new WeakMap;sR("milkdown-toolbar",fR);const CFe=(e,t)=>{e.config(n=>{n.set(_$.key,{view:o=>new wFe(n,o,t)})}).use(_$)},kFe=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:CFe},Symbol.toStringTag,{value:"Module"})),SFe="",$Fe=Object.freeze(Object.defineProperty({__proto__:null,default:SFe},Symbol.toStringTag,{value:"Module"}))});export default EFe();
1418 + </host>`};TW.props={ctx:Object,hide:Function,show:Boolean,config:Object};const PW=th(TW),IP=o9("CREPE_TOOLBAR");var el,io;class sxt{constructor(e,n,i){ha(this,el,void 0);ha(this,io,void 0);this.update=(o,r)=>{Xt(this,el).update(o,r)},this.destroy=()=>{Xt(this,el).destroy(),Xt(this,io).remove()},this.hide=()=>{Xt(this,el).hide()};const s=new PW;Qi(this,io,s),Xt(this,io).ctx=e,Xt(this,io).hide=this.hide,Xt(this,io).config=i,Qi(this,el,new i9({content:Xt(this,io),debounce:20,offset:10,shouldShow(o){const{doc:r,selection:a}=o.state,{empty:l,from:c,to:u}=a,d=!r.textBetween(c,u).length&&a instanceof Ot,h=!(a instanceof Ot),f=o.dom.getRootNode().activeElement,p=s.contains(f),m=!o.hasFocus()&&!p,b=!o.editable;return!(m||h||l||d||b)}})),Xt(this,el).onShow=()=>{Xt(this,io).show=!0,setTimeout(()=>{let o=Xt(this,io).style.left;o=parseInt(o),o<0?Xt(this,io).style.left=0:o>350&&(Xt(this,io).style.left="350px")},0)},Xt(this,el).onHide=()=>{Xt(this,io).show=!1},this.update(n)}}el=new WeakMap,io=new WeakMap;kW("milkdown-toolbar",PW);const ixt=(t,e)=>{t.config(n=>{n.set(IP.key,{view:i=>new sxt(n,i,e)})}).use(IP)},oxt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:ixt},Symbol.toStringTag,{value:"Module"}));var rxt=Object.defineProperty,LP=Object.getOwnPropertySymbols,axt=Object.prototype.hasOwnProperty,lxt=Object.prototype.propertyIsEnumerable,OP=(t,e,n)=>e in t?rxt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cxt=(t,e)=>{for(var n in e||(e={}))axt.call(e,n)&&OP(t,n,e[n]);if(LP)for(var n of LP(e))lxt.call(e,n)&&OP(t,n,e[n]);return t};function IW(t,e){return Object.assign(t,{meta:cxt({package:"@milkdown/components"},e)}),t}const uxt={imageIcon:()=>"🌌",uploadButton:()=>It`Upload`,confirmButton:()=>It`⏎`,uploadPlaceholderText:"/Paste",onUpload:t=>Promise.resolve(URL.createObjectURL(t))},rw=ms(uxt,"inlineImageConfigCtx");IW(rw,{displayName:"Config<image-inline>",group:"ImageInline"});function dxt(t,e){const n=customElements.get(t);if(n==null){customElements.define(t,e);return}n!==e&&console.warn(`Custom element ${t} has been defined before.`)}var hxt=(t,e,n)=>new Promise((i,s)=>{var o=l=>{try{a(n.next(l))}catch(c){s(c)}},r=l=>{try{a(n.throw(l))}catch(c){s(c)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,r);a((n=n.apply(t,e)).next())});const LW=({src:t="",selected:e=!1,alt:n,title:i,setAttr:s,config:o})=>{const r=dd(),[a]=Rr(crypto.randomUUID()),[l,c]=Rr(!1),[u,d]=Rr(t.length!==0),[h,f]=Rr(t),p=A=>{const M=A.target.value;d(M.length!==0),f(M)},m=A=>hxt(void 0,null,function*(){var S;const M=(S=A.target.files)==null?void 0:S[0];if(!M)return;const P=yield o==null?void 0:o.onUpload(M);P&&(s==null||s("src",P),d(!0))}),b=()=>{var A,S;s==null||s("src",(S=(A=r.current)==null?void 0:A.value)!=null?S:"")},w=A=>{A.key==="Enter"&&b()},k=A=>{A.preventDefault(),A.stopPropagation()},C=A=>{A.stopPropagation(),A.preventDefault()};return It`<host class=${ni(e&&"selected",!t&&"empty")}>
1419 + ${t?It`<img class="image-inline" src=${t} alt=${n} title=${i} />`:It`<div class="empty-image-inline">
1420 + <div class="image-icon">
1421 + ${o==null?void 0:o.imageIcon()}
1422 + </div>
1423 + <div class=${ni("link-importer",l&&"focus")}>
1424 + <input
1425 + draggable="true"
1426 + ref=${r}
1427 + ondragstart=${k}
1428 + class="link-input-area"
1429 + value=${h}
1430 + oninput=${p}
1431 + onkeydown=${w}
1432 + onfocus=${()=>c(!0)}
1433 + onblur=${()=>c(!1)}
1434 + />
1435 + <div class=${ni("placeholder",u&&"hidden")}>
1436 + <input class="hidden" id=${a} type="file" accept="image/*" onchange=${m} />
1437 + <label onpointerdown=${C} class="uploader" for=${a}>
1438 + ${o==null?void 0:o.uploadButton()}
1439 + </label>
1440 + <span class="text" onclick=${()=>{var A;return(A=r.current)==null?void 0:A.focus()}}>
1441 + ${o==null?void 0:o.uploadPlaceholderText}
1442 + </span>
1443 + </div>
1444 + </div>
1445 + <div
1446 + class=${ni("confirm",h.length===0&&"hidden")}
1447 + onclick=${()=>b()}
1448 + >
1449 + ${o==null?void 0:o.confirmButton()}
1450 + </div>
1451 + </div>`}
1452 + </host>`};LW.props={src:String,alt:String,title:String,selected:Boolean,setAttr:Function,config:Object};const fxt=th(LW);dxt("milkdown-image-inline",fxt);const OW=Sz(Kd.node,t=>(e,n,i)=>{const s=document.createElement("milkdown-image-inline"),o=t.get(rw.key),r=a=>{s.src=a.attrs.src,s.alt=a.attrs.alt,s.title=a.attrs.title};return r(e),s.selected=!1,s.setAttr=(a,l)=>{const c=i();c!=null&&n.dispatch(n.state.tr.setNodeAttribute(c,a,l))},s.config=o,{dom:s,update:a=>a.type!==e.type?!1:(r(a),!0),stopEvent:a=>!!(s.selected&&a.target instanceof HTMLInputElement),selectNode:()=>{s.selected=!0},deselectNode:()=>{s.selected=!1},destroy:()=>{s.remove()}}});IW(OW,{displayName:"NodeView<image-inline>",group:"ImageInline"});const pxt=[rw,OW],mxt=(t,e)=>{t.config(n=>{n.update(rw.key,i=>({uploadButton:(e==null?void 0:e.inlineUploadButton)??(()=>"Upload"),imageIcon:(e==null?void 0:e.inlineImageIcon)??(()=>g6),confirmButton:(e==null?void 0:e.inlineConfirmButton)??(()=>fW),uploadPlaceholderText:(e==null?void 0:e.inlineUploadPlaceholderText)??"or paste link",onUpload:(e==null?void 0:e.inlineOnUpload)??(e==null?void 0:e.onUpload)??i.onUpload})),n.update(ow.key,i=>({uploadButton:(e==null?void 0:e.blockUploadButton)??(()=>"Upload file"),imageIcon:(e==null?void 0:e.blockImageIcon)??(()=>g6),captionIcon:(e==null?void 0:e.blockCaptionIcon)??(()=>zkt),confirmButton:(e==null?void 0:e.blockConfirmButton)??(()=>"Confirm"),captionPlaceholderText:(e==null?void 0:e.blockCaptionPlaceholderText)??"Write Image Caption",uploadPlaceholderText:(e==null?void 0:e.blockUploadPlaceholderText)??"or paste link",onUpload:(e==null?void 0:e.blockOnUpload)??(e==null?void 0:e.onUpload)??i.onUpload}))}).use(UCt).use(pxt)},gxt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:mxt},Symbol.toStringTag,{value:"Module"})),vxt={name:"SpaceGeneralTab",components:{CreateSpaceForm:W8},props:["community","savingCount"],emits:["completed"]},_xt={style:{"max-width":"800px",margin:"0 auto"},class:"fcom_full_editor_content"};function yxt(t,e,n,i,s,o){const r=B("create-space-form"),a=zs,l=yo;return v(),D(l,{class:"fcom_full_editor_main lockscreen_editor"},{default:y(()=>[_(a,null,{default:y(()=>[g("div",_xt,[_(r,{savingCount:n.savingCount,community:n.community,onCompleted:e[0]||(e[0]=c=>t.$emit("completed",c))},null,8,["savingCount","community"])])]),_:1})]),_:1})}const bxt=ce(vxt,[["render",yxt]]),wxt=Object.freeze(Object.defineProperty({__proto__:null,default:bxt},Symbol.toStringTag,{value:"Module"})),kxt={name:"ImagePlaceholder"},Cxt={width:"240",height:"240",viewBox:"0 0 240 240",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xxt(t,e,n,i,s,o){return v(),$("svg",Cxt,[...e[0]||(e[0]=[g("rect",{width:"240",height:"240",fill:"#F5F6F7"},null,-1),g("path",{d:"M133.125 121.65L129.33 116.7C129 116.26 128.56 116.04 128.01 116.04C127.46 116.04 127.02 116.26 126.69 116.7L121.163 123.96C120.723 124.51 120.654 125.088 120.956 125.693C121.259 126.298 121.768 126.6 122.483 126.6H148.718C149.433 126.6 149.941 126.298 150.244 125.693C150.546 125.088 150.478 124.51 150.038 123.96L142.035 113.483C141.705 113.043 141.265 112.823 140.715 112.823C140.165 112.823 139.725 113.043 139.395 113.483L133.125 121.65ZM115.8 139.8C113.985 139.8 112.431 139.154 111.139 137.861C109.846 136.569 109.2 135.015 109.2 133.2V93.6C109.2 91.785 109.846 90.2313 111.139 88.9388C112.431 87.6462 113.985 87 115.8 87H155.4C157.215 87 158.769 87.6462 160.061 88.9388C161.354 90.2313 162 91.785 162 93.6V133.2C162 135.015 161.354 136.569 160.061 137.861C158.769 139.154 157.215 139.8 155.4 139.8H115.8ZM115.8 133.2H155.4V93.6H115.8V133.2ZM102.6 153C100.785 153 99.2313 152.354 97.9388 151.061C96.6462 149.769 96 148.215 96 146.4V103.5C96 102.565 96.3163 101.781 96.9488 101.149C97.5813 100.516 98.365 100.2 99.3 100.2C100.235 100.2 101.019 100.516 101.651 101.149C102.284 101.781 102.6 102.565 102.6 103.5V146.4H145.5C146.435 146.4 147.219 146.716 147.851 147.349C148.484 147.981 148.8 148.765 148.8 149.7C148.8 150.635 148.484 151.419 147.851 152.051C147.219 152.684 146.435 153 145.5 153H102.6Z",fill:"#98A2B3"},null,-1)])])}const f9=ce(kxt,[["render",xxt]]),Sxt={name:"AddPaywallModal",props:{modelValue:{type:Boolean,default:!1},spaceProfile:{type:Object,required:!0}},emits:["update:modelValue","added"],data(){return{products:[],productID:null,saving:!1,creatingProduct:!1,fetchingProducts:!1,newPaywall:{title:"",price:0}}},computed:{addPaywallModal:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{isProductAdded(t){var e,n;return(n=(e=this.spaceProfile.settings)==null?void 0:e.cart_product_ids)==null?void 0:n.includes(t)},initCreateProduct(){this.productID=null,this.newPaywall={title:"",price:0}},createProduct(){var t,e;this.creatingProduct=!0,this.$post("cart/products/create",{title:(t=this.newPaywall)==null?void 0:t.title,price:(e=this.newPaywall)==null?void 0:e.price}).then(n=>{var i;this.products.push(n.product),this.productID=(i=n.product)==null?void 0:i.id,this.productID&&this.addPaywall()}).catch(n=>{this.$handleError(n)}).finally(()=>{this.creatingProduct=!1})},searchProducts(t=""){t&&t.length<3||this.fetchProducts(t)},fetchProducts(t=""){this.fetchingProducts=!0,this.$get("cart/products/search",{search:t,space_id:this.spaceProfile.id}).then(e=>{this.products=e.products}).catch(e=>{this.$handleError(e)}).finally(()=>{this.fetchingProducts=!1})},addPaywall(){this.saving=!0,this.$post("cart/spaces/"+this.spaceProfile.id+"/paywalls",{cart_product_id:this.productID,space_id:this.spaceProfile.id}).then(t=>{var e;this.$notify.success(t.message),this.$emit("added",(e=t.paywall)==null?void 0:e.ID),this.addPaywallModal=!1}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){this.fetchProducts()}},$xt={class:"fcom_topic_selector"},Axt={class:"fcom_select_photo",style:{float:"left"}},Ext=["src","alt"],Mxt=["innerHTML"];function Txt(t,e,n,i,s,o){const r=Zt,a=Wt,l=B("Plus"),c=we,u=ze,d=ht,h=tn,f=nn,p=Yo,m=Fa,b=xt("loading");return v(),D(m,{"modal-class":"fcom_common_dialog",class:"fcom_high_drawer",size:t.drawerWidth,modelValue:o.addPaywallModal,"onUpdate:modelValue":e[6]||(e[6]=w=>o.addPaywallModal=w),"close-on-click-modal":!1,visible:o.addPaywallModal,direction:"rtl"},{header:y(()=>[g("h4",null,x(t.$t("Add Paywall")),1)]),default:y(()=>[_(f,{onSubmit:e[5]||(e[5]=Me(w=>t.doNothing(),["prevent"])),"label-position":"top"},{default:y(()=>[_(h,null,{default:y(()=>[g("div",$xt,[Re((v(),D(a,{style:{width:"100%"},"fit-input-width":"",modelValue:s.productID,"onUpdate:modelValue":e[0]||(e[0]=w=>s.productID=w),filterable:"",clearable:"",remote:"",loading:s.fetchingProducts,"remote-method":o.searchProducts,placeholder:t.$t("Search Product")},{default:y(()=>[(v(!0),$(J,null,ye(s.products,w=>(v(),D(r,{key:w.id,label:w.title,value:w.id,disabled:o.isProductAdded(w.id),class:"fcom_with_photo_option"},{default:y(()=>[g("span",Axt,[g("img",{src:w.image,alt:w.title},null,8,Ext),g("span",null,x(w.title),1)]),g("span",{style:{float:"right",color:"#8492a6","font-size":"13px"},innerHTML:w.price},null,8,Mxt)]),_:2},1032,["label","value","disabled"]))),128))]),_:1},8,["modelValue","loading","remote-method","placeholder"])),[[b,s.fetchingProducts]]),_(p,{ref:"creating_product_ref",onShow:o.initCreateProduct,placement:"bottom",width:400,trigger:"click"},{reference:y(()=>[_(u,{class:"fcom_secondary_button"},{default:y(()=>[_(c,null,{default:y(()=>[_(l)]),_:1}),g("span",null,x(t.$t("New")),1)]),_:1})]),default:y(()=>[_(f,{modelValue:s.newPaywall,"onUpdate:modelValue":e[4]||(e[4]=w=>s.newPaywall=w),"label-position":"top"},{default:y(()=>[_(h,{label:t.$t("Title")},{default:y(()=>[_(d,{modelValue:s.newPaywall.title,"onUpdate:modelValue":e[1]||(e[1]=w=>s.newPaywall.title=w),placeholder:t.$t("Title of the product")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(h,{label:t.$t("Price")},{default:y(()=>[_(d,{modelValue:s.newPaywall.price,"onUpdate:modelValue":e[2]||(e[2]=w=>s.newPaywall.price=w),type:"number",placeholder:t.$t("Price of the product"),min:0},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(h,null,{default:y(()=>[_(u,{class:"fcom_primary_button",onClick:e[3]||(e[3]=w=>o.createProduct()),loading:s.creatingProduct,disabled:s.creatingProduct},{default:y(()=>[N(x(t.$t("Create")),1)]),_:1},8,["loading","disabled"])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["onShow"])])]),_:1}),_(h,null,{default:y(()=>[_(u,{class:"fcom_primary_button",loading:s.saving,onClick:o.addPaywall},{default:y(()=>[N(x(t.$t("Add")),1)]),_:1},8,["loading","onClick"])]),_:1})]),_:1})]),_:1},8,["size","modelValue","visible"])}const Pxt=ce(Sxt,[["render",Txt]]),Ixt={name:"ManagePaywalls",components:{ImagePlaceholder:f9,AddPaywallModal:Pxt},props:["spaceProfile","savingCount"],emits:["close"],data(){return{paywalls:[],loading:!1,removing:!1,addPaywallModal:!1,removePaywallModal:!1,revokeAccess:!1,removePaywall:null,installing:!1,hasFluentCart:this.hasFeature("has_fluentcart")}},computed:{spaceType(){return this.spaceProfile.type=="course"?this.$t("courses"):this.$t("spaces")}},methods:{copyCheckoutUrl(t){this.$toClipboard(t,this.$t("Checkout URL copied to clipboard"))},initRemovePaywall(t){this.$nextTick(()=>{this.removePaywallModal=!0,this.removePaywall=t})},initAddPaywall(){this.$nextTick(()=>{this.addPaywallModal=!0})},resetPaywall(){var e;const t=((e=this.spaceProfile.settings)==null?void 0:e.cart_product_ids)||[];t.splice(t.indexOf(this.removePaywall.ID),1),this.spaceProfile.settings.cart_product_ids=t,this.removePaywall=null,this.revokeAccess=!1,this.getPaywalls()},paywallAdded(t){var n;const e=((n=this.spaceProfile.settings)==null?void 0:n.cart_product_ids)||[];e.includes(t)||e.push(t),this.spaceProfile.settings.cart_product_ids=e,this.getPaywalls()},getPaywalls(){this.loading=!0,this.$get("cart/spaces/"+this.spaceProfile.id+"/paywalls",{space_id:this.spaceProfile.id}).then(t=>{this.paywalls=t.paywalls}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},deletePaywall(){this.removing=!0,this.$del("cart/spaces/"+this.spaceProfile.id+"/paywalls",{cart_product_id:this.removePaywall.ID,revoke_access:this.revokeAccess}).then(t=>{this.$notify.success(t.message),this.removePaywallModal=!1,this.resetPaywall()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.removing=!1})},installPlugin(){this.installing=!0,this.$post("settings/install_plugin",{plugin:"fluent-cart"}).then(t=>{t.is_installed?this.$notify.success(t.message):this.$handleError(this.$t("Sorry, FluentCart could not be installed")),this.hasFluentCart=!0,this.getPaywalls()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.installing=!1})}},mounted(){var e;(((e=this.spaceProfile.settings)==null?void 0:e.cart_product_ids)||[])&&this.hasFluentCart&&this.getPaywalls()}},Lxt={style:{"max-width":"800px",margin:"0 auto"}},Oxt={class:"fcom_card_sections"},Dxt={class:"fcom_card_section_heading"},Rxt={class:"fcom_section_primary_item_title"},Vxt={class:"fcom_heading_item"},Fxt={key:0,class:"fcom_section_item_actions"},Nxt={class:"fcom_section_primary"},Bxt={class:"fcom_section_primary_item"},zxt={class:"fcom_section_primary_item_title"},Hxt={class:"fcom_heading_item"},Uxt={class:"fcom_shape"},jxt={class:"fcom_section_item_actions"},Wxt=["href"],Yxt=["href"],qxt={class:"fcom_section_items"},Gxt={class:"fcom_section_item_title"},Xxt={class:"fcom_heading_item"},Kxt={class:"fcom_shape"},Zxt={class:"fcom_section_item_actions"},Jxt=["innerHTML"],Qxt={key:2,style:{padding:"1rem"}},e6t={key:1,class:"fcom_section_item"},t6t={class:"fcom_section_primary"},n6t={class:"fcom_section_primary_item"},s6t=["disabled"],i6t={class:"dialog_header"},o6t={class:"dialog_left"},r6t={class:"dialog_body"},a6t={style:{"text-align":"center"}},l6t={class:"fcom_heading_item",style:{"justify-content":"center"}},c6t={class:"fcom_shape"},u6t={style:{margin:"1rem 0px 0.8rem"}},d6t={class:"dialog_footer"};function h6t(t,e,n,i,s,o){const r=ze,a=Vt,l=d8,c=B("MoreFilled"),u=we,d=Ar,h=Er,f=$r,p=B("ImagePlaceholder"),m=zs,b=yo,w=B("AddPaywallModal"),k=qt,C=$s,A=xt("loading");return v(),$(J,null,[_(b,{class:"fcom_full_editor_main lockscreen_editor"},{default:y(()=>[_(m,null,{default:y(()=>[g("div",Lxt,[g("div",Oxt,[g("div",Dxt,[g("div",Rxt,[g("div",Vxt,[le(t.$slots,"title",{},()=>[g("h4",null,x(t.$t("Manage Paywalls")),1)])])]),s.hasFluentCart?(v(),$("div",Fxt,[_(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=S=>o.initAddPaywall())},{default:y(()=>[N(x(t.$t("Add Paywall")),1)]),_:1})])):O("",!0)]),s.hasFluentCart?(v(),$(J,{key:0},[s.loading||s.removing?(v(),D(a,{key:0,class:"white_loaded",rows:5,animated:!0})):s.paywalls.length?(v(!0),$(J,{key:1},ye(s.paywalls,S=>(v(),$("div",{class:"fcom_section_item",key:S.ID},[g("div",Nxt,[g("div",Bxt,[g("div",zxt,[g("h4",Hxt,[g("span",Uxt,[_(l,{src:S==null?void 0:S.thumbnail},null,8,["src"])]),g("span",null,x((S==null?void 0:S.post_title)||""),1)])]),g("div",jxt,[_(f,{trigger:"click","popper-class":"fcom_pop_action"},{dropdown:y(()=>[_(h,null,{default:y(()=>[_(d,null,{default:y(()=>[g("a",{href:S==null?void 0:S.view_url,target:"_blank",rel:"noopener"},x(t.$t("View Product")),9,Wxt)]),_:2},1024),_(d,null,{default:y(()=>[g("a",{href:S==null?void 0:S.admin_url,target:"_blank",rel:"noopener"},x(t.$t("Edit Product")),9,Yxt)]),_:2},1024),_(d,{type:"danger",onClick:M=>o.initRemovePaywall(S)},{default:y(()=>[N(x(t.$t("Delete Paywall")),1)]),_:1},8,["onClick"])]),_:2},1024)]),default:y(()=>[_(r,{"aria-label":t.$t("View actions"),size:"small",class:"fcom_dot_menu",text:""},{default:y(()=>[_(u,null,{default:y(()=>[_(c)]),_:1})]),_:1},8,["aria-label"])]),_:2},1024)])]),g("div",qxt,[(v(!0),$(J,null,ye(S.variants,M=>(v(),$("div",{class:"fcom_section_item",key:M.id},[g("div",Gxt,[g("div",Xxt,[g("span",Kxt,[M.photo?(v(),D(l,{key:0,src:M.photo},null,8,["src"])):(v(),D(l,{key:1},{default:y(()=>[_(p)]),_:1}))]),g("span",null,x(M.variation_title),1)])]),g("div",Zxt,[g("span",{class:"fcom_price",innerHTML:M.total_price},null,8,Jxt),_(f,{trigger:"click"},{dropdown:y(()=>[_(h,null,{default:y(()=>[_(d,{onClick:P=>o.copyCheckoutUrl(M.checkout_url)},{default:y(()=>[N(x(t.$t("Copy Checkout URL")),1)]),_:1},8,["onClick"])]),_:2},1024)]),default:y(()=>[_(r,{"aria-label":t.$t("View actions"),size:"small",class:"fcom_dot_menu",text:"",style:{padding:"0 6px"}},{default:y(()=>[_(u,null,{default:y(()=>[_(c)]),_:1})]),_:1},8,["aria-label"])]),_:2},1024)])]))),128))])])]))),128)):(v(),$("div",Qxt,[g("p",null,x(t.$t("No paywall has been added yet")),1)]))],64)):(v(),$("div",e6t,[g("div",t6t,[g("div",n6t,[g("span",null,[N(x(t.$t("To monetize your ")+o.spaceType+", ")+" ",1),Re((v(),$("a",{disabled:s.installing,onClick:e[1]||(e[1]=(...S)=>o.installPlugin&&o.installPlugin(...S)),class:"fcom_link"},[N(x(t.$t("click here")),1)],8,s6t)),[[A,s.installing]]),N(" "+x(t.$t("to install and activate FluentCart.")),1)])])])]))])])]),_:3})]),_:3}),s.addPaywallModal?(v(),D(w,{key:0,modelValue:s.addPaywallModal,"onUpdate:modelValue":e[2]||(e[2]=S=>s.addPaywallModal=S),spaceProfile:n.spaceProfile,onAdded:o.paywallAdded},null,8,["modelValue","spaceProfile","onAdded"])):O("",!0),_(C,{"modal-class":"fcom_common_dialog","close-on-click-modal":!1,"append-to-body":!0,width:t.drawerWidth,modelValue:s.removePaywallModal,"onUpdate:modelValue":e[5]||(e[5]=S=>s.removePaywallModal=S),direction:"rtl",onClose:e[6]||(e[6]=S=>s.removePaywallModal=!1)},{header:y(()=>[g("div",i6t,[g("div",o6t,[g("h4",null,x(t.$t("Delete Paywall")),1)])])]),footer:y(()=>[g("div",d6t,[_(r,{class:"fcom_primary_button",disabled:s.removing,onClick:o.deletePaywall},{default:y(()=>[N(x(t.$t("Delete")),1)]),_:1},8,["disabled","onClick"]),_(r,{class:"fcom_secondary_button",onClick:e[4]||(e[4]=S=>s.removePaywallModal=!1)},{default:y(()=>[N(x(t.$t("Cancel")),1)]),_:1})])]),default:y(()=>{var S,M;return[g("div",r6t,[g("div",a6t,[g("h4",l6t,[g("span",c6t,[_(l,{src:(S=s.removePaywall)==null?void 0:S.thumbnail},null,8,["src"])]),g("span",null,x((M=s.removePaywall)==null?void 0:M.post_title),1)]),g("p",u6t,x(t.$t("Are you sure you want to delete this paywall? This action cannot be undone.")),1),_(k,{class:"fcom_checkbox",modelValue:s.revokeAccess,"onUpdate:modelValue":e[3]||(e[3]=P=>s.revokeAccess=P),"true-value":"yes","false-value":"no"},{default:y(()=>[N(x(t.$t("Also remove the this space from the product integration?")),1)]),_:1},8,["modelValue"])])])]}),_:1},8,["width","modelValue"])],64)}const f6t=ce(Ixt,[["render",h6t]]),DP=Object.freeze(Object.defineProperty({__proto__:null,default:f6t},Symbol.toStringTag,{value:"Module"})),p6t={name:"LockscreenPaywallMeta",components:{ImagePlaceholder:f9},props:{field:{type:Object,required:!0},space_id:{type:[String,Number],required:!0}},data(){return{loading:!1,editTab:"paywall",availablePaywalls:[]}},methods:{initAddPaywall(){this.field.paywalls=this.field.paywalls||[],this.field.paywalls.push("")},removePaywall(t){const e=this.field.paywalls||[];e.splice(e.indexOf(t),1),this.field.paywalls=e},isPaywallAdded(t){var e;return(e=this.field.paywalls)==null?void 0:e.includes(t.toString())},getAvailablePaywalls(){this.loading=!0,this.$get("cart/spaces/"+this.space_id+"/paywalls",{space_id:this.space_id}).then(t=>{this.availablePaywalls=t.paywalls}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.getAvailablePaywalls()}},m6t={key:0,class:"fcom_paywalls"},g6t={class:"fcom_paywall"},v6t={class:"fcom_select_photo",style:{float:"left"}},_6t=["src"],y6t={key:0,class:"fcom_description"},b6t={class:"fcom_paywall_actions"},w6t={class:"fcom_color_input_wrap"},k6t={class:"fcom_color_input_wrap"},C6t={class:"fcom_color_input_wrap"},x6t={class:"fcom_color_input_wrap"};function S6t(t,e,n,i,s,o){const r=B("image-placeholder"),a=Zt,l=q1,c=Wt,u=B("Delete"),d=we,h=ze,f=Vt,p=h2,m=ht,b=tn,w=qt,k=nn,C=eu,A=d2;return v(),D(A,{modelValue:s.editTab,"onUpdate:modelValue":e[12]||(e[12]=S=>s.editTab=S)},{default:y(()=>[_(p,{label:t.$t("Paywalls"),name:"paywall"},{default:y(()=>[s.loading?(v(),D(f,{key:1,rows:2,animated:""})):(v(),$("div",m6t,[(v(!0),$(J,null,ye(n.field.paywalls,(S,M)=>(v(),$("div",g6t,[_(c,{"fit-input-width":"",modelValue:n.field.paywalls[M],"onUpdate:modelValue":P=>n.field.paywalls[M]=P,placeholder:t.$t("Select Paywall")},{default:y(()=>[(v(!0),$(J,null,ye(s.availablePaywalls,P=>(v(),D(l,{key:P.ID,label:P.post_title},{default:y(()=>[(v(!0),$(J,null,ye(P.variants,T=>(v(),D(a,{key:T.id,value:T.id.toString(),label:T.variation_title,disabled:o.isPaywallAdded(T.id),class:"fcom_with_photo_option"},{default:y(()=>[g("span",v6t,[T.photo?(v(),$("img",{key:0,src:T.photo},null,8,_6t)):(v(),D(r,{key:1})),g("span",null,x(T.variation_title),1)])]),_:2},1032,["value","label","disabled"]))),128))]),_:2},1032,["label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"]),_(d,{onClick:P=>o.removePaywall(S)},{default:y(()=>[_(u)]),_:1},8,["onClick"])]))),256)),!n.field.paywalls||Object.keys(n.field.paywalls).length<1?(v(),$("div",y6t,[g("p",null,x(t.$t("Please add paywall pricing options")),1)])):O("",!0),g("div",b6t,[_(h,{style:{width:"100%"},class:"fcom_plain_button",onClick:o.initAddPaywall},{default:y(()=>[g("span",null,x("+ "+t.$t("Add Paywall")),1)]),_:1},8,["onClick"])])]))]),_:1},8,["label"]),_(p,{label:t.$t("Content"),name:"content"},{default:y(()=>[_(k,{onSubmit:e[2]||(e[2]=Me(S=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:y(()=>[_(b,{label:t.$t("Button Label")},{default:y(()=>[_(m,{modelValue:n.field.button_text,"onUpdate:modelValue":e[0]||(e[0]=S=>n.field.button_text=S),placeholder:t.$t("Button Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(b,null,{default:y(()=>[_(w,{modelValue:n.field.show_description,"onUpdate:modelValue":e[1]||(e[1]=S=>n.field.show_description=S),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Show Paywall Description")),1)]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["label"]),_(p,{label:t.$t("Design"),name:"design"},{default:y(()=>[_(k,{onSubmit:e[11]||(e[11]=Me(S=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:y(()=>[_(b,{label:t.$t("Background Color")},{default:y(()=>[g("div",w6t,[_(C,{predefine:t.appVars.suggestedColors,modelValue:n.field.background_color,"onUpdate:modelValue":e[3]||(e[3]=S=>n.field.background_color=S)},null,8,["predefine","modelValue"]),_(m,{modelValue:n.field.background_color,"onUpdate:modelValue":e[4]||(e[4]=S=>n.field.background_color=S)},null,8,["modelValue"])])]),_:1},8,["label"]),_(b,{label:t.$t("Text Color")},{default:y(()=>[g("div",k6t,[_(C,{predefine:t.appVars.suggestedColors,modelValue:n.field.text_color,"onUpdate:modelValue":e[5]||(e[5]=S=>n.field.text_color=S)},null,8,["predefine","modelValue"]),_(m,{modelValue:n.field.text_color,"onUpdate:modelValue":e[6]||(e[6]=S=>n.field.text_color=S)},null,8,["modelValue"])])]),_:1},8,["label"]),_(b,{label:t.$t("Button Label")},{default:y(()=>[g("div",C6t,[_(C,{predefine:t.appVars.suggestedColors,modelValue:n.field.button_text_color,"onUpdate:modelValue":e[7]||(e[7]=S=>n.field.button_text_color=S)},null,8,["predefine","modelValue"]),_(m,{modelValue:n.field.button_text_color,"onUpdate:modelValue":e[8]||(e[8]=S=>n.field.button_text_color=S)},null,8,["modelValue"])])]),_:1},8,["label"]),_(b,{label:t.$t("Button Background")},{default:y(()=>[g("div",x6t,[_(C,{predefine:t.appVars.suggestedColors,modelValue:n.field.button_color,"onUpdate:modelValue":e[9]||(e[9]=S=>n.field.button_color=S),"show-alpha":""},null,8,["predefine","modelValue"]),_(m,{modelValue:n.field.button_color,"onUpdate:modelValue":e[10]||(e[10]=S=>n.field.button_color=S)},null,8,["modelValue"])])]),_:1},8,["label"])]),_:1})]),_:1},8,["label"])]),_:1},8,["modelValue"])}const $6t=ce(p6t,[["render",S6t]]),A6t={name:"LockscreenMeta",components:{BgImageUpload:Tp,LockscreenPaywallMeta:$6t},props:["lockscreen","space_id"],emits:["editField","updatePaywalls"],data(){return{loading:!1,editing:!1,editTab:"content",editingField:null,availablePaywalls:[]}},computed:{lockscreenFields(){return this.lockscreen},getFieldIcon(){return t=>{const e={image:"Picture",block:"Tickets",lesson:"Memo",paywall:"Money",welcome_banner:"VideoPlay"};return t.name=="action"?"Iphone":e[t.type]}}},methods:{toggleHidden(t){t.hidden=!t.hidden,t.type=="paywall"&&!t.hidden&&this.updateField(t)},updateField(t){this.editing=!0,this.editingField=t;const e=t.type=="block"?t:null;this.$emit("editField",e)},backToFields(){this.editing=!1,this.editingField=null,this.$emit("editField",null)},moveUp(t){if(t==0)return;const e=this.lockscreen[t],n=this.lockscreen[t-1];this.lockscreen.splice(t-1,2,e,n)},moveDown(t){if(t==this.lockscreen.length-1)return;const e=this.lockscreen[t],n=this.lockscreen[t+1];this.lockscreen.splice(t,2,n,e)}}},E6t={key:0,class:"fcom_lockscreen_meta"},M6t={class:"fcom_meta_section lockscreen_meta"},T6t={class:"fcom_description"},P6t={class:"fcom_meta_section lockscreen_meta"},I6t={class:"fcom_meta_label"},L6t={class:"fcom_meta_content"},O6t={class:"fcom_meta_block"},D6t={class:"fcom_block_label"},R6t={class:"fcom_meta_sorting"},V6t={class:"fcom_block_action"},F6t={key:1,class:"fcom_lockscreen_meta"},N6t={class:"fcom_edit_title"},B6t={class:"fcom_edit_content"},z6t={class:"fcom_color_input_wrap"},H6t={class:"fcom_color_input_wrap"},U6t={class:"fcom_color_input_wrap"},j6t={class:"fcom_color_input_wrap"},W6t={class:"fcom_color_input_wrap"},Y6t={key:1,class:"fcom_description"},q6t={key:2,class:"fcom_description"},G6t={key:3,class:"fcom_description"};function X6t(t,e,n,i,s,o){const r=we,a=B("Top"),l=B("Bottom"),c=B("EditPen"),u=B("Hide"),d=B("View"),h=B("Back"),f=ht,p=tn,m=qt,b=nn,w=h2,k=B("BgImageUpload"),C=eu,A=d2,S=B("lockscreen-paywall-meta");return s.editing?(v(),$("div",F6t,[g("div",N6t,[_(r,{onClick:o.backToFields},{default:y(()=>[_(h)]),_:1},8,["onClick"]),g("p",null,x(t.$labelize(s.editingField.label)),1)]),g("div",B6t,[s.editingField.type=="image"?(v(),D(A,{key:0,modelValue:s.editTab,"onUpdate:modelValue":e[18]||(e[18]=M=>s.editTab=M)},{default:y(()=>[_(w,{label:t.$t("Content"),name:"content"},{default:y(()=>[_(b,{onSubmit:e[5]||(e[5]=Me(M=>t.doNothing(),["prevent"])),model:s.editingField,"label-position":"top",class:"fcom_form_container"},{default:y(()=>[_(p,{label:t.$t("Heading")},{default:y(()=>[_(f,{modelValue:s.editingField.heading,"onUpdate:modelValue":e[0]||(e[0]=M=>s.editingField.heading=M),placeholder:t.$t("Heading")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(p,{label:t.$t("Description")},{default:y(()=>[_(f,{modelValue:s.editingField.description,"onUpdate:modelValue":e[1]||(e[1]=M=>s.editingField.description=M),type:"textarea",placeholder:t.$t("Description")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(p,{label:t.$t("Button Label")},{default:y(()=>[_(f,{modelValue:s.editingField.button_text,"onUpdate:modelValue":e[2]||(e[2]=M=>s.editingField.button_text=M),placeholder:t.$t("Button Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(p,{label:t.$t("Button Link")},{default:y(()=>[_(f,{modelValue:s.editingField.button_link,"onUpdate:modelValue":e[3]||(e[3]=M=>s.editingField.button_link=M)},null,8,["modelValue"])]),_:1},8,["label"]),s.editingField.type=="image"?(v(),D(p,{key:0},{default:y(()=>[_(m,{modelValue:s.editingField.new_tab,"onUpdate:modelValue":e[4]||(e[4]=M=>s.editingField.new_tab=M),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Open in New Tab")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0)]),_:1},8,["model"])]),_:1},8,["label"]),_(w,{label:t.$t("Design"),name:"design"},{default:y(()=>[_(b,{onSubmit:e[17]||(e[17]=Me(M=>t.doNothing(),["prevent"])),model:s.editingField,"label-position":"top",class:"fcom_form_container"},{default:y(()=>[_(p,{label:t.$t("Background Image"),class:"fcom_bg_image"},{default:y(()=>[_(k,{modelValue:s.editingField.background_image,"onUpdate:modelValue":e[6]||(e[6]=M=>s.editingField.background_image=M),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"]),_(p,{label:t.$t("Overlay Color")},{default:y(()=>[g("div",z6t,[_(C,{predefine:t.appVars.suggestedColors,modelValue:s.editingField.overlay_color,"onUpdate:modelValue":e[7]||(e[7]=M=>s.editingField.overlay_color=M)},null,8,["predefine","modelValue"]),_(f,{modelValue:s.editingField.overlay_color,"onUpdate:modelValue":e[8]||(e[8]=M=>s.editingField.overlay_color=M)},null,8,["modelValue"])])]),_:1},8,["label"]),_(p,{label:t.$t("Heading Color")},{default:y(()=>[g("div",H6t,[_(C,{predefine:t.appVars.suggestedColors,modelValue:s.editingField.heading_color,"onUpdate:modelValue":e[9]||(e[9]=M=>s.editingField.heading_color=M)},null,8,["predefine","modelValue"]),_(f,{modelValue:s.editingField.heading_color,"onUpdate:modelValue":e[10]||(e[10]=M=>s.editingField.heading_color=M)},null,8,["modelValue"])])]),_:1},8,["label"]),_(p,{label:t.$t("Text Color")},{default:y(()=>[g("div",U6t,[_(C,{predefine:t.appVars.suggestedColors,modelValue:s.editingField.text_color,"onUpdate:modelValue":e[11]||(e[11]=M=>s.editingField.text_color=M)},null,8,["predefine","modelValue"]),_(f,{modelValue:s.editingField.text_color,"onUpdate:modelValue":e[12]||(e[12]=M=>s.editingField.text_color=M)},null,8,["modelValue"])])]),_:1},8,["label"]),_(p,{label:t.$t("Button Label")},{default:y(()=>[g("div",j6t,[_(C,{predefine:t.appVars.suggestedColors,modelValue:s.editingField.button_text_color,"onUpdate:modelValue":e[13]||(e[13]=M=>s.editingField.button_text_color=M)},null,8,["predefine","modelValue"]),_(f,{modelValue:s.editingField.button_text_color,"onUpdate:modelValue":e[14]||(e[14]=M=>s.editingField.button_text_color=M)},null,8,["modelValue"])])]),_:1},8,["label"]),_(p,{label:t.$t("Button Background")},{default:y(()=>[g("div",W6t,[_(C,{predefine:t.appVars.suggestedColors,modelValue:s.editingField.button_color,"onUpdate:modelValue":e[15]||(e[15]=M=>s.editingField.button_color=M),"show-alpha":""},null,8,["predefine","modelValue"]),_(f,{modelValue:s.editingField.button_color,"onUpdate:modelValue":e[16]||(e[16]=M=>s.editingField.button_color=M)},null,8,["modelValue"])])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["label"])]),_:1},8,["modelValue"])):s.editingField.type=="block"?(v(),$("div",Y6t,x(t.$t("Edit the field from block editor ")),1)):s.editingField.type=="lesson"?(v(),$("div",q6t,x(t.$t("Edit lessons from lesson editor ")),1)):s.editingField.type=="welcome_banner"?(v(),$("div",G6t,x(t.$t("__COURSE_BANNER_SOURCE_DESC")),1)):s.editingField.type=="paywall"?(v(),D(S,{key:4,field:s.editingField,space_id:n.space_id},null,8,["field","space_id"])):O("",!0)])])):(v(),$("div",E6t,[g("div",M6t,[g("div",T6t,[g("p",null,x(t.$t("This page is only visible to non-members viewing a private space.")),1)])]),g("div",P6t,[g("div",I6t,x(t.$t("Page Blocks")),1),g("div",L6t,[g("ul",O6t,[(v(!0),$(J,null,ye(o.lockscreenFields,(M,P)=>(v(),$("li",{class:q(["fcom_block_list",{block_hidden:M.hidden}])},[g("div",D6t,[_(r,{class:"fcom_el_icon"},{default:y(()=>[(v(),D(Ct(o.getFieldIcon(M))))]),_:2},1024),g("p",null,x(t.$labelize(M.label)),1)]),g("div",R6t,[_(r,{onClick:T=>o.moveUp(P)},{default:y(()=>[_(a)]),_:1},8,["onClick"]),_(r,{onClick:T=>o.moveDown(P)},{default:y(()=>[_(l)]),_:1},8,["onClick"])]),g("div",V6t,[_(r,{onClick:T=>o.updateField(M)},{default:y(()=>[_(c)]),_:1},8,["onClick"]),M.hidden?(v(),D(r,{key:0,onClick:T=>o.toggleHidden(M)},{default:y(()=>[_(u)]),_:1},8,["onClick"])):(v(),D(r,{key:1,onClick:T=>o.toggleHidden(M)},{default:y(()=>[_(d)]),_:1},8,["onClick"]))])],2))),256))])])])]))}const K6t=ce(A6t,[["render",X6t]]),Z6t={name:"CircleIcon",props:{fill:{type:String,default:"currentColor"}}},J6t=["fill"];function Q6t(t,e,n,i,s,o){return v(),$("svg",{fill:n.fill,width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[...e[0]||(e[0]=[g("path",{d:"M10 2.5C14.1421 2.5 17.5 5.85786 17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5Z",fill:"none",stroke:"currentColor"},null,-1)])],8,J6t)}const e4t=ce(Z6t,[["render",Q6t]]),t4t={name:"LessonIcon"},n4t={width:"60",height:"48",viewBox:"0 0 60 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function s4t(t,e,n,i,s,o){return v(),$("svg",n4t,[...e[0]||(e[0]=[g("rect",{width:"60",height:"48",rx:"4",fill:"#F2F5F8"},null,-1),g("path",{d:"M30 16.5L21 21.75L30 27L37.5 22.625V28.125H39V21.75L30 16.5ZM23.9993 25.1179V28.5001C25.3676 30.3217 27.5461 31.5001 29.9998 31.5001C32.4535 31.5001 34.6321 30.3217 36.0004 28.5001L36.0001 25.1185L30.0002 28.6184L23.9993 25.1179Z",fill:"#525866"},null,-1)])])}const i4t=ce(t4t,[["render",s4t]]),o4t={name:"PlayIcon"},r4t={width:"20",height:"19",viewBox:"0 0 20 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function a4t(t,e,n,i,s,o){return v(),$("svg",r4t,[...e[0]||(e[0]=[xr('<g filter="url(#filter0_d_6543_69201)"><path d="M10 16.5C5.85775 16.5 2.5 13.1422 2.5 9C2.5 4.85775 5.85775 1.5 10 1.5C14.1422 1.5 17.5 4.85775 17.5 9C17.5 13.1422 14.1422 16.5 10 16.5ZM8.9665 6.31125C8.92136 6.28113 8.8689 6.26383 8.8147 6.26117C8.76051 6.25851 8.7066 6.27059 8.65873 6.29615C8.61086 6.3217 8.57082 6.35975 8.54287 6.40626C8.51492 6.45277 8.5001 6.50599 8.5 6.56025V11.4398C8.5001 11.494 8.51492 11.5472 8.54287 11.5937C8.57082 11.6402 8.61086 11.6783 8.65873 11.7039C8.7066 11.7294 8.76051 11.7415 8.8147 11.7388C8.8689 11.7362 8.92136 11.7189 8.9665 11.6888L12.6258 9.24975C12.6669 9.22236 12.7006 9.18524 12.724 9.14166C12.7473 9.09809 12.7595 9.04943 12.7595 9C12.7595 8.95057 12.7473 8.90191 12.724 8.85834C12.7006 8.81476 12.6669 8.77764 12.6258 8.75025L8.96575 6.31125H8.9665Z" fill="white"></path></g><defs><filter id="filter0_d_6543_69201" x="0.5" y="0.5" width="19" height="19" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0.0392157 0 0 0 0 0.0509804 0 0 0 0 0.0784314 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_6543_69201"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_6543_69201" result="shape"></feBlend></filter></defs>',2)])])}const l4t=ce(o4t,[["render",a4t]]),c4t={name:"PlayPlaceholderIcon"},u4t={width:"60",height:"48",viewBox:"0 0 60 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function d4t(t,e,n,i,s,o){return v(),$("svg",u4t,[...e[0]||(e[0]=[xr('<rect width="60" height="48" rx="4" fill="#F2F5F8"></rect><g clip-path="url(#clip0_6463_70077)"><g filter="url(#filter0_d_6463_70077)"><path d="M30 31.5C25.8578 31.5 22.5 28.1423 22.5 24C22.5 19.8578 25.8578 16.5 30 16.5C34.1423 16.5 37.5 19.8578 37.5 24C37.5 28.1423 34.1423 31.5 30 31.5ZM28.9665 21.3112C28.9214 21.2811 28.8689 21.2638 28.8147 21.2612C28.7605 21.2585 28.7066 21.2706 28.6587 21.2961C28.6109 21.3217 28.5708 21.3598 28.5429 21.4063C28.5149 21.4528 28.5001 21.506 28.5 21.5602V26.4398C28.5001 26.494 28.5149 26.5472 28.5429 26.5937C28.5708 26.6402 28.6109 26.6783 28.6587 26.7039C28.7066 26.7294 28.7605 26.7415 28.8147 26.7388C28.8689 26.7362 28.9214 26.7189 28.9665 26.6888L32.6258 24.2498C32.6669 24.2224 32.7006 24.1852 32.724 24.1417C32.7473 24.0981 32.7595 24.0494 32.7595 24C32.7595 23.9506 32.7473 23.9019 32.724 23.8583C32.7006 23.8148 32.6669 23.7776 32.6258 23.7502L28.9658 21.3112H28.9665Z" fill="#525866"></path></g></g><defs><filter id="filter0_d_6463_70077" x="20.5" y="15.5" width="19" height="19" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0.0392157 0 0 0 0 0.0509804 0 0 0 0 0.0784314 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_6463_70077"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_6463_70077" result="shape"></feBlend></filter><clipPath id="clip0_6463_70077"><rect width="20" height="20" fill="white" transform="translate(20 14)"></rect></clipPath></defs>',3)])])}const h4t=ce(c4t,[["render",d4t]]),f4t={name:"_LockscreenLessonEditor",components:{CircleIcon:e4t,LessonIcon:i4t,PlayIcon:l4t,PlayPlaceholderIcon:h4t},props:{sections:{type:Array,required:!0},is_editor:{type:Boolean,default:!1},settings:{type:Object,required:!1}},computed:{lessonsCount(){return this.sections.reduce((t,e)=>t+e.lessons.length,0)},sectionsCount(){return this.sections.reduce((t,e)=>t+(e.lessons.length?1:0),0)},lessonDuration(){return t=>{const e=t.lessons.reduce((n,i)=>n+(i.meta.video_length||0),0);return this.formatSeconds(e)||null}}},methods:{isEnabledMedia(t){var e;return((e=t.meta)==null?void 0:e.enable_media)=="yes"},hasMediaVideo(t){var n;const e=(n=t.meta)==null?void 0:n.media;return this.isEnabledMedia(t)&&(e==null?void 0:e.content_type)=="video"&&(e==null?void 0:e.html)},showPlayIcon(t){return this.hasMediaVideo(t)&&(this.hasMediaImage(t)||t.featured_image)},hasMediaImage(t){var e,n;return this.isEnabledMedia(t)&&((n=(e=t.meta)==null?void 0:e.media)==null?void 0:n.image)},isModernLayout(){var t;return this.has_pro&&((t=this.settings)==null?void 0:t.course_layout)==="modern"},isFreePreview(t){var e;return this.has_pro&&((e=t==null?void 0:t.meta)==null?void 0:e.free_preview_lesson)=="yes"},maybeGotoLesson(t,e){if(!this.is_editor){if(this.isFreePreview(t)){this.gotoLesson(t);return}e.is_locked&&e.unlock_date&&this.$notify.info({message:this.$t("This lesson will be unlocked on %s",e.unlock_date),type:"info"})}},gotoLesson(t){this.$router.push({name:"view_lesson",params:{lesson_slug:t.slug}}),setTimeout(()=>{window.location.reload()},100)},formatSeconds(t){if(t<1)return null;let e=Math.floor(t/3600),n=Math.floor(t%3600/60),i=t%60,s="";return e>0&&(s+=this.$t("%dh ",e)),n>0&&(s+=this.$t("%dm ",n)),i>0&&(s+=this.$t("%ds",i)),s.trim()||null}}},p4t={class:"fcom_course_sections"},m4t={class:"fcom_course_intro"},g4t={class:"fcom_course_labels"},v4t={class:"fcom_course_info"},_4t={class:"fcom_card_sections"},y4t={class:"fcom_section_items"},b4t=["onClick"],w4t={class:"fcom_section_primary_item_title"},k4t={class:"title_line_container"},C4t={class:"title_line"},x4t={class:"fcom_meta_text"},S4t={key:0,class:"fcom_meta_text"},$4t={class:"fcom_section_primary_item_actions"},A4t=["onClick"],E4t={class:"fcom_heading_item clickable"},M4t={class:"lesson_feature_media"},T4t=["src","alt"],P4t=["src","alt"],I4t={class:"lesson_title"},L4t=["innerHTML"],O4t={class:"lesson_duration"},D4t={key:0},R4t={key:1},V4t=["innerHTML"];function F4t(t,e,n,i,s,o){const r=B("ArrowRight"),a=B("ArrowDown"),l=we,c=B("CircleIcon"),u=B("Lock"),d=B("PlayPlaceholderIcon"),h=B("LessonIcon"),f=B("PlayIcon");return v(),$("div",p4t,[g("div",m4t,[g("div",g4t,[g("h3",null,x(t.$t("Course Content")),1),g("p",v4t,[N(x(t.$_n("%s Topic","%s Topics",o.sectionsCount))+" ",1),e[0]||(e[0]=g("span",null," • ",-1)),N(" "+x(t.$_n("%s Lesson","%s Lessons",o.lessonsCount)),1)])])]),g("div",_4t,[g("div",y4t,[(v(!0),$(J,null,ye(n.sections,p=>(v(),$("div",{key:p.id,class:"fcom_section_primary"},[p.lessons.length?(v(),$("div",{key:0,onClick:m=>p.is_closed=!p.is_closed,class:q(["clickable fcom_section_primary_item",{is_closed:p.is_closed}])},[g("div",w4t,[g("div",k4t,[g("div",C4t,[g("h4",null,x(p.title),1)]),g("span",x4t,x(t.$t("%d lessons",p.lessons.length)),1),o.lessonDuration(p)?(v(),$("span",S4t," • "+x(o.lessonDuration(p)),1)):O("",!0)])]),g("div",$4t,[_(l,{class:"clickable"},{default:y(()=>[p.is_closed?(v(),D(r,{key:0,class:"fcom_arrow_icon"})):(v(),D(a,{key:1}))]),_:2},1024)])],10,b4t)):O("",!0),p.is_closed?O("",!0):(v(!0),$(J,{key:1},ye(p.lessons,m=>(v(),$("div",{key:m.id,class:q(["fcom_section_item",{is_locked:!o.isFreePreview(m)}])},[g("div",{onClick:b=>o.maybeGotoLesson(m,p),class:"fcom_section_item_title"},[g("p",E4t,[_(l,null,{default:y(()=>[o.isFreePreview(m)?(v(),D(c,{key:0})):(v(),D(u,{key:1}))]),_:2},1024),o.isModernLayout?(v(),$(J,{key:0},[g("span",M4t,[m.featured_image?(v(),$("img",{key:0,src:m.featured_image,alt:m.title},null,8,T4t)):o.hasMediaImage(m)?(v(),$("img",{key:1,src:m.meta.media.image,alt:m.title},null,8,P4t)):o.hasMediaVideo(m)?(v(),D(d,{key:2})):(v(),D(h,{key:3})),o.showPlayIcon(m)?(v(),D(f,{key:4,class:"play_icon"})):O("",!0)]),g("span",I4t,[g("span",{innerHTML:m.title},null,8,L4t),g("span",O4t,[m.meta.video_length?(v(),$("span",D4t,x(o.formatSeconds(m.meta.video_length)),1)):(v(),$("span",R4t,x("---")))])])],64)):(v(),$("span",{key:1,innerHTML:m.title},null,8,V4t))])],8,A4t)],2))),128))]))),128))])])])}const N4t=ce(f4t,[["render",F4t]]),B4t={name:"LockscreenPaywallView",components:{ImagePlaceholder:f9},props:{space_id:{type:[String,Number],required:!0},field:{type:Object,required:!0},editable:{type:Boolean,default:!1}},data(){return{loading:!1,availablePaywalls:[]}},computed:{buttonStyles(){return{backgroundColor:this.field.button_color,borderColor:this.field.button_color,color:this.field.button_text_color}},cardStyles(){return{backgroundColor:this.field.background_color||"transparent",color:this.field.text_color||"var(--fcom-primary-text, #2B2E33)"}},filteredPaywalls(){return!Array.isArray(this.field.paywalls)||!Array.isArray(this.availablePaywalls)?[]:this.field.paywalls.map(t=>{for(const e of this.availablePaywalls)if(Array.isArray(e.variants)){const n=e.variants.find(i=>String(i.id)===String(t));if(n)return{...n,description:e.post_excerpt}}return null}).filter(Boolean)}},methods:{isSubscriptionPaywall(t){var e;return((e=t.other_info)==null?void 0:e.payment_type)=="subscription"},getRepeatInterval(t){var i;const e=(i=t.other_info)==null?void 0:i.repeat_interval;return e&&{daily:this.$t("day"),weekly:this.$t("week"),monthly:this.$t("month"),quarterly:this.$t("quarter"),half_yearly:this.$t("half year"),yearly:this.$t("year")}[e]||""},fetchAvailablePaywalls(){if(!this.space_id){this.availablePaywalls=[];return}const t={space_id:this.space_id};this.editable||(t.paywall_ids=this.field.paywalls),this.loading=!0,this.$get("cart/spaces/"+this.space_id+"/paywalls",t).then(e=>{this.availablePaywalls=e.paywalls||[]}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})}},mounted(){this.hasFeature("has_fluentcart")&&this.fetchAvailablePaywalls()}},z4t={class:"fcom_paywall_cards"},H4t={class:"paywall_header"},U4t={class:"paywall_body"},j4t=["innerHTML"],W4t={key:0,class:"subscription"},Y4t={class:"paywall_footer"},q4t={key:0,class:"fcom_mb_10"},G4t=["href"];function X4t(t,e,n,i,s,o){const r=Vt,a=d8,l=B("ImagePlaceholder");return v(),$("div",z4t,[s.loading?(v(),D(r,{key:0,rows:3,animated:!0})):(v(!0),$(J,{key:1},ye(o.filteredPaywalls,c=>(v(),$("div",{key:c.id,class:"fcom_paywall",style:Xe(o.cardStyles)},[g("div",H4t,[c.photo?(v(),D(a,{key:0,src:c.photo},null,8,["src"])):(v(),D(a,{key:1},{default:y(()=>[_(l)]),_:1})),g("span",null,x(c.variation_title),1)]),g("div",U4t,[g("span",{innerHTML:c.total_price},null,8,j4t),o.isSubscriptionPaywall(c)?(v(),$("span",W4t," / "+x(o.getRepeatInterval(c)),1)):O("",!0)]),g("div",Y4t,[n.field.show_description=="yes"&&(c!=null&&c.description)?(v(),$("span",q4t,x(c.description),1)):O("",!0),n.editable?Re((v(),$("input",{key:1,class:"el-button fcom_primary_button link_button",style:Xe(o.buttonStyles),type:"text","onUpdate:modelValue":e[0]||(e[0]=u=>n.field.button_text=u)},null,4)),[[gd,n.field.button_text]]):(v(),$("a",{key:2,class:"el-button fcom_primary_button link_button",style:Xe(o.buttonStyles),href:c.checkout_url},x(n.field.button_text),13,G4t))])],4))),128))])}const K4t=ce(B4t,[["render",X4t]]),Z4t={name:"LockScreenEditor",props:["title","lockscreen","sections","saving","loading","space_id","settings"],emits:["save","close"],components:{LockscreenLessonEditor:N4t,MediaEmbeder:_v,BlockEditor:kU,LockscreenMeta:K6t,LockscreenPaywallView:K4t,FullEditorFrame:LS},data(){return{editingField:null,useClassic:!1}},computed:{lockscreenFields(){return this.lockscreen.filter(t=>!t.hidden)},imageStyles(){return t=>({backgroundImage:`url(${t.background_image})`,backgroundColor:t.overlay_color})},headingStyles(){return t=>({color:t.heading_color})},descriptionStyles(){return t=>({color:t.text_color})},buttonStyles(){return t=>({backgroundColor:t.button_color,color:t.button_text_color})}},methods:{updateHeading(t,e){e.heading=t.target.innerText},updateDescription(t,e){e.description=t.target.innerText},updateButtonLabel(t,e){e.button_text=t.target.innerText},visibleBlock(t){this.editingField=t},updateEditField(t){this.editingField=t,(t==null?void 0:t.type)==="block"&&setTimeout(()=>{const e=document.getElementById("fcomBlockContent");e&&e.scrollIntoView({behavior:"smooth"})},300)},saveChanges(){this.editingField=null,this.$emit("save")},switchToClassic(){this.useClassic=!0}}},J4t={class:"fcom_editor_topbar"},Q4t={class:"fcom_editor_content"},e8t={class:"fcom_item"},t8t={class:"fcom_content"},n8t=["onBlur"],s8t=["onBlur"],i8t=["onBlur"],o8t={key:1,class:"fcom_content_wrap"},r8t={id:"fcomBlockContent"},a8t={key:2,class:"fcom_content_wrap"},l8t={key:1,class:"fcom_description"},c8t={key:3,class:"fcom_content_wrap"},u8t={key:4,class:"fcom_paywall_wrap"};function d8t(t,e,n,i,s,o){const r=B("lockscreen-meta"),a=X1,l=B("Lock"),c=we,u=B("block-editor"),d=B("FullEditorFrame"),h=B("welcome-banner"),f=B("lockscreen-lesson-editor"),p=Vt,m=B("lockscreen-paywall-view"),b=zs,w=yo;return v(),$(J,null,[_(a,{class:"fcom_full_editor_side lockscreen_editor",width:"250px"},{default:y(()=>[le(t.$slots,"before_meta"),_(r,{lockscreen:n.lockscreen,space_id:n.space_id,onEditField:o.updateEditField},null,8,["lockscreen","space_id","onEditField"])]),_:3}),_(w,{class:"fcom_full_editor_main lockscreen_editor"},{default:y(()=>[_(b,null,{default:y(()=>[g("div",J4t,[_(c,null,{default:y(()=>[_(l)]),_:1}),g("h3",null,x(n.title),1)]),g("div",Q4t,[(v(!0),$(J,null,ye(o.lockscreenFields,k=>{var C;return v(),$("div",e8t,[k.type=="image"?(v(),$("div",{key:0,class:"fcom_image_wrap",style:Xe(o.imageStyles(k))},[g("div",t8t,[g("h2",{style:Xe(o.headingStyles(k)),contenteditable:"true",onBlur:A=>o.updateHeading(A,k)},x(k.heading),45,n8t),k.description?(v(),$("p",{key:0,style:Xe(o.descriptionStyles(k)),contenteditable:"true",onBlur:A=>o.updateDescription(A,k)},x(k.description),45,s8t)):O("",!0),k.button_text?(v(),$("button",{key:1,class:"fcom_btn",style:Xe(o.buttonStyles(k)),contenteditable:"true",onBlur:A=>o.updateButtonLabel(A,k)},x(k.button_text),45,i8t)):O("",!0)])],4)):O("",!0),k.type=="block"?(v(),$("div",o8t,[g("div",r8t,[s.useClassic?(v(),D(u,{key:0,modelValue:k.content,"onUpdate:modelValue":A=>k.content=A},null,8,["modelValue","onUpdate:modelValue"])):(v(),D(d,{key:1,ref_for:!0,ref:"fullEditorFrame",onUseAlternateEditor:o.switchToClassic,editorParams:{context:"lockscreen",space_id:n.space_id},frameHeight:"calc(100vh - 160px)",documentTitle:"",modelValue:k.content,"onUpdate:modelValue":A=>k.content=A},null,8,["onUseAlternateEditor","editorParams","modelValue","onUpdate:modelValue"]))])])):O("",!0),k.type=="welcome_banner"?(v(),$("div",a8t,[k.banner?(v(),D(h,{key:0,config:k.banner,"wrapper-class":"fcom_course_welcome_box","content-class":"fcom_course_welcome_content"},null,8,["config"])):(v(),$("div",l8t,x(t.$t("__COURSE_BANNER_EMPTY_DESC")),1))])):O("",!0),k.type=="lesson"?(v(),$("div",c8t,[n.loading?(v(),D(p,{key:1,rows:5,animated:!0})):(v(),D(f,{key:0,sections:n.sections,is_editor:!0,settings:n.settings},null,8,["sections","settings"]))])):O("",!0),k.type=="paywall"&&((C=k.paywalls)==null?void 0:C.length)>0?(v(),$("div",u8t,[_(m,{space_id:n.space_id,field:k,editable:!0},null,8,["space_id","field"])])):O("",!0)])}),256))])]),_:1})]),_:1})],64)}const DW=ce(Z4t,[["render",d8t]]),h8t={name:"SpaceLockscreen",props:["spaceProfile","savingCount"],emits:["close"],components:{LockScreenEditor:DW},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(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1}))},getLockscreen(){this.loading=!0,this.$get("spaces/"+this.spaceProfile.slug+"/lockscreens").then(t=>{this.lockscreen=t.lockscreen}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.getLockscreen()}},f8t={key:0,class:"fcom_lockscreen_meta"},p8t={class:"fcom_description"},m8t={class:"white_loaded"};function g8t(t,e,n,i,s,o){const r=B("lock-screen-editor"),a=Vt,l=yo;return s.lockscreen?(v(),D(r,{key:0,title:n.spaceProfile.title,space_id:n.spaceProfile.id,settings:n.spaceProfile.settings,lockscreen:s.lockscreen,saving:s.saving,loading:s.loading,onSave:o.saveChanges,onClose:e[0]||(e[0]=c=>t.$emit("close"))},{before_meta:y(()=>[n.spaceProfile.settings.custom_lock_screen!="yes"?(v(),$("div",f8t,[g("div",p8t,[g("p",null,x(t.$t("__LOCK_SCRREN_DESC")),1)])])):O("",!0)]),_:1},8,["title","space_id","settings","lockscreen","saving","loading","onSave"])):s.loading?(v(),D(l,{key:1,class:"fcom_full_editor_main lockscreen_editor"},{default:y(()=>[g("div",m8t,[_(a,{animated:!0,rows:10})])]),_:1})):O("",!0)}const v8t=ce(h8t,[["render",g8t]]),_8t=Object.freeze(Object.defineProperty({__proto__:null,default:v8t},Symbol.toStringTag,{value:"Module"})),y8t={name:"ManageSpaceMenu",components:{MenuGroupSettings:OS},props:["spaceProfile"],setup(){return{spaceStore:H2()}},data(){return{loading:!0,savingPrimary:!1,savingSecondary:!1,menuItems:[],pageOptions:[],saveQueue:Promise.resolve()}},computed:{secondaryLinks(){return this.spaceProfile.settings.links},sourceLabels(){return{custom:this.$t("Custom"),space_page:this.$t("Page"),pro_module:this.$t("Module"),system:this.$t("Built-in")}},sectionTitles(){return{primary:this.$t("Primary Menu"),secondary:this.$t("Secondary Links")}},placementOptions(){return[{label:this.sectionTitles.primary,value:"primary"},{label:this.sectionTitles.secondary,value:"secondary"}]},enabledPrimary(){return this.menuItems.filter(t=>t.enabled!=="no")},previewSecondary(){return this.secondaryLinks.filter(t=>t.enabled!=="no")}},methods:{getMenuItems(){this.loading=!0,this.$get("spaces/"+this.spaceProfile.slug+"/primary-menu").then(t=>{this.menuItems=t.menu_items}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},getPageOptions(){var t;!this.has_pro||!((t=this.spaceProfile.permissions)!=null&&t.can_manage_pages)||this.$get("spaces/"+this.spaceProfile.slug+"/pages").then(e=>{this.pageOptions=(e.pages||[]).map(n=>({label:n.title,value:n.slug}))}).catch(()=>{})},queueSave(t){const e=this.saveQueue.then(()=>t());return this.saveQueue=e,e},savePrimaryMenu(){return this.savingPrimary=!0,this.$post("spaces/"+this.spaceProfile.slug+"/primary-menu",{menu_items:this.menuItems}).then(t=>(this.menuItems=t.menu_items,this.$notify.success(t.message),this.refreshSpace(),!0)).catch(t=>(this.$handleError(t),!1)).finally(()=>{this.savingPrimary=!1})},saveSecondaryLinks(){return this.savingSecondary=!0,this.$post("spaces/"+this.spaceProfile.slug+"/links",{links:this.secondaryLinks,space_id:this.spaceProfile.id}).then(t=>(this.spaceProfile.settings.links=t.links,this.$notify.success(t.message),this.refreshSpace(),!0)).catch(t=>(this.$handleError(t),!1)).finally(()=>{this.savingSecondary=!1})},saveAll(){return this.queueSave(this.savePrimaryMenu).then(t=>t&&this.queueSave(this.saveSecondaryLinks))},moveItem({item:t,to:e}){const n=e==="primary"?this.menuItems:this.secondaryLinks,i={...t,placement:e};e==="primary"&&(i.is_custom="yes"),n.push(i),this.saveAll().then(s=>{s||(this.getMenuItems(),this.refreshSpace())})},refreshSpace(){const t=this.spaceProfile.slug;this.spaceStore.invalidateSpace(t),this.spaceStore.fetchSpace(t,!0).catch(()=>{})}},mounted(){this.spaceProfile.settings.links||(this.spaceProfile.settings.links=[]),this.getMenuItems(),this.getPageOptions()}},b8t={class:"fcom_space_menu_manager"},w8t={class:"fcom_menu_preview"},k8t={class:"fcom_menu_preview_head"},C8t={class:"fcom_menu_preview_label"},x8t={class:"fcom_menu_preview_hint"},S8t={class:"fcom_menu_preview_body"},$8t={class:"fcom_menu_preview_row fcom_menu_preview_primary"},A8t={class:"fcom_menu_preview_brand"},E8t=["src"],M8t={key:1,class:"fcom_emoji"},T8t={key:2,class:"fcom_no_avatar"},P8t={class:"fcom_menu_preview_brand_title"},I8t={class:"fcom_menu_preview_items"},L8t=["src"],O8t={key:1,class:"fcom_emoji"},D8t={key:0,class:"fcom_menu_preview_empty"},R8t={class:"fcom_menu_preview_row fcom_menu_preview_secondary"},V8t={class:"fcom_menu_preview_items"},F8t=["src"],N8t={key:1,class:"fcom_emoji"},B8t={key:0,class:"fcom_menu_preview_empty"},z8t={class:"fcom_menu_columns"},H8t={class:"fcom_card_sections"},U8t={class:"fcom_menu_section_hint"},j8t={class:"fcom_section_footer_note"},W8t={class:"fcom_card_sections"},Y8t={class:"fcom_menu_section_hint"},q8t={class:"fcom_section_footer_note"};function G8t(t,e,n,i,s,o){const r=Vt,a=B("menu-group-settings"),l=zs,c=yo;return v(),D(c,{class:"fcom_full_editor_main lockscreen_editor"},{default:y(()=>[_(l,null,{default:y(()=>{var u;return[g("div",b8t,[s.loading?(v(),D(r,{key:0,rows:8,animated:""})):(v(),$(J,{key:1},[g("div",w8t,[g("div",k8t,[g("span",C8t,x(t.$t("Preview")),1),g("span",x8t,x(t.$t("Both rows, as members will see them")),1)]),g("div",S8t,[g("div",$8t,[g("span",A8t,[n.spaceProfile.logo?(v(),$("img",{key:0,src:n.spaceProfile.logo,alt:""},null,8,E8t)):(u=n.spaceProfile.settings)!=null&&u.emoji?(v(),$("span",M8t,x(n.spaceProfile.settings.emoji),1)):(v(),$("span",T8t)),g("span",P8t,x(n.spaceProfile.title),1)]),g("div",I8t,[(v(!0),$(J,null,ye(o.enabledPrimary,d=>(v(),$("span",{key:d.slug,class:"fcom_menu_preview_tab"},[d.icon_image?(v(),$("img",{key:0,src:d.icon_image,alt:""},null,8,L8t)):d.emoji?(v(),$("span",O8t,x(d.emoji),1)):O("",!0),g("span",null,x(d.title),1)]))),128)),o.enabledPrimary.length?O("",!0):(v(),$("span",D8t,x(t.$t("No menu item is visible")),1))])]),g("div",R8t,[g("div",V8t,[(v(!0),$(J,null,ye(o.previewSecondary,d=>(v(),$("span",{key:d.slug,class:"fcom_menu_preview_tab"},[d.icon_image?(v(),$("img",{key:0,src:d.icon_image,alt:""},null,8,F8t)):d.emoji?(v(),$("span",N8t,x(d.emoji),1)):O("",!0),g("span",null,x(d.title),1)]))),128)),o.previewSecondary.length?O("",!0):(v(),$("span",B8t,x(t.$t("Sub bar hidden — every secondary link is off")),1))])])])]),g("div",z8t,[g("div",H8t,[_(a,{custom_svg:!0,use_icon_selector:!0,has_svg:!1,menu_rows:!0,min_enabled:1,saving:s.savingPrimary,title:o.sectionTitles.primary,menuItems:s.menuItems,page_options:s.pageOptions,source_labels:o.sourceLabels,placement:"primary",placement_options:o.placementOptions,onMove:o.moveItem,onSave:e[0]||(e[0]=d=>o.queueSave(o.savePrimaryMenu))},{title:y(()=>[g("h4",null,x(o.sectionTitles.primary),1),g("p",U8t,x(t.$t("The tab bar at the top of the space.")),1)]),_:1},8,["saving","title","menuItems","page_options","source_labels","placement_options","onMove"]),g("div",j8t,[g("p",null,x(t.$t("Pages appear here once published. Order and label are set here, not by the page order.")),1)])]),g("div",W8t,[_(a,{custom_svg:!0,use_icon_selector:!0,has_svg:!1,menu_rows:!0,saving:s.savingSecondary,title:o.sectionTitles.secondary,menuItems:o.secondaryLinks,source_labels:o.sourceLabels,placement:"secondary",placement_options:o.placementOptions,onMove:o.moveItem,onSave:e[1]||(e[1]=d=>o.queueSave(o.saveSecondaryLinks))},{title:y(()=>[g("h4",null,x(o.sectionTitles.secondary),1),g("p",Y8t,x(t.$t("The sub bar beneath the space header.")),1)]),_:1},8,["saving","title","menuItems","source_labels","placement_options","onMove"]),g("div",q8t,[g("p",null,x(t.$t("Edit a link's Placement to move it to the space sub header.")),1)])])])],64))])]}),_:1})]),_:1})}const X8t=ce(y8t,[["render",G8t]]),K8t=Object.freeze(Object.defineProperty({__proto__:null,default:X8t},Symbol.toStringTag,{value:"Module"})),Z8t={name:"SpacePageEditor",components:{FullEditorFrame:LS},emits:["close","saved"],props:["page","spaceProfile"],data(){return{loading:!0,saving:!1,baseline:"",removeRouterGuard:null,form:{title:"",slug:"",message:"",status:"draft",privacy:"public",meta:{show_in_nav:"yes",nav_label:"",emoji:"",featured_image_id:0,enable_comments:"no",seo_description:"",layout:"unified",show_title:"yes",show_featured_image:"no"}}}},computed:{isDirty(){return!!this.baseline&&JSON.stringify(this.form)!==this.baseline},editorSettings(){return{...this.form.meta,slug:this.form.slug,privacy:this.form.privacy}}},methods:{applyEditorSettings(t){const{slug:e,privacy:n,...i}=t||{};this.form.slug=e||"",this.form.privacy=n==="members_only"?"members_only":"public",this.form.meta=i},fetchPage(){this.loading=!0,this.$get(`spaces/${this.spaceProfile.slug}/pages/${this.page.slug}`).then(t=>{const e=t.page;this.form={title:e.title||"",slug:e.slug||"",message:e.message||"",status:e.status||"draft",privacy:e.privacy||"public",meta:Object.assign({show_in_nav:"yes",nav_label:"",emoji:"",featured_image_id:0,enable_comments:"no",seo_description:"",layout:"unified",show_title:"yes",show_featured_image:"no"},e.meta||{})},this.baseline=JSON.stringify(this.form)}).catch(t=>{this.$handleError(t),this.$emit("close")}).finally(()=>{this.loading=!1})},save(){if(!this.saving){if(!this.form.title||!this.form.title.trim()){this.$notify.error(this.$t("Page title is required"));return}this.saving=!0,this.$put(`spaces/${this.spaceProfile.slug}/pages/${this.page.id}`,{page:this.form}).then(t=>{this.baseline=JSON.stringify(this.form),this.$notify.success(t.message),this.$emit("saved",t.page)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},confirmDiscard(){return this.isDirty?this.$confirm(this.$t("You have unsaved changes. Are you sure you want to close?"),this.$t("Confirm"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>!0).catch(()=>!1):Promise.resolve(!0)},requestClose(){this.confirmDiscard().then(t=>{t&&this.$emit("close")})},handleBeforeUnload(t){this.isDirty&&(t.preventDefault(),t.returnValue="")}},mounted(){this.fetchPage(),window.addEventListener("beforeunload",this.handleBeforeUnload);const t=this.$route.name,e=this.$route.params.space;this.removeRouterGuard=this.$router.beforeEach((n,i,s)=>{if(n.name===t&&n.params.space===e){s();return}this.confirmDiscard().then(o=>{s(o?void 0:!1)})})},beforeUnmount(){window.removeEventListener("beforeunload",this.handleBeforeUnload),this.removeRouterGuard&&(this.removeRouterGuard(),this.removeRouterGuard=null)}},J8t={class:"fcom_full_editor fcom_space_page_editor"},Q8t={class:"fcom_full_editor_header"},e5t=["aria-label"],t5t={class:"fcom_desktop_only"},n5t={class:"full_editor_actions"},s5t=["title","href"],i5t={key:0,style:{padding:"40px"}};function o5t(t,e,n,i,s,o){const r=B("ArrowLeft"),a=we,l=B("arrow-down"),c=ze,u=Ar,d=Er,h=$r,f=B("View"),p=K1,m=Vt,b=B("FullEditorFrame"),w=yo,k=G1;return v(),$("div",J8t,[_(k,null,{default:y(()=>[_(p,{class:"fcom_full_editor_header_wrap"},{default:y(()=>[g("div",Q8t,[g("button",{type:"button",onClick:e[0]||(e[0]=C=>o.requestClose()),class:"fcom_back_header","aria-label":t.$t("Back to Pages")},[_(a,{class:"fcom_arrow_icon"},{default:y(()=>[_(r)]),_:1}),g("span",t5t,x(t.$t("Back to Pages")),1)],8,e5t),g("div",n5t,[_(h,{onCommand:e[1]||(e[1]=C=>{s.form.status=C}),trigger:"click"},{dropdown:y(()=>[_(d,null,{default:y(()=>[_(u,{command:"draft"},{default:y(()=>[N(x(t.$t("Draft")),1)]),_:1}),_(u,{command:"published"},{default:y(()=>[N(x(t.$t("Published")),1)]),_:1})]),_:1})]),default:y(()=>[_(c,{type:s.form.status=="published"?"success":"info",bg:"",text:"",class:"el-dropdown-link"},{default:y(()=>[N(x(t.$labelize(s.form.status))+" ",1),_(a,{class:"el-icon--right"},{default:y(()=>[_(l)]),_:1})]),_:1},8,["type"])]),_:1}),_(c,{style:{"margin-left":"15px"},disabled:s.saving||s.loading,loading:s.saving,onClick:e[2]||(e[2]=C=>o.save()),class:"fcom_primary_button"},{default:y(()=>[N(x(t.$t("Save")),1)]),_:1},8,["disabled","loading"]),n.page.permalink?(v(),$("a",{key:0,title:t.$t("Preview Page"),class:"el-button el-button--text",target:"_blank",rel:"noopener",href:n.page.permalink},[_(a,null,{default:y(()=>[_(f)]),_:1})],8,s5t)):O("",!0)])])]),_:1}),_(k,{class:"fcom_full_editor_container"},{default:y(()=>[_(w,{style:{overflow:"hidden",padding:"0"},class:"fcom_full_editor_main"},{default:y(()=>[s.loading?(v(),$("div",i5t,[_(m,{rows:8,animated:!0})])):(v(),D(b,{key:1,ref:"fullEditorFrame",editorParams:{context:"space_page",page_id:n.page.id},frameHeight:"calc(100vh - 60px)",documentTitle:s.form.title,metaSettings:o.editorSettings,featured_image_id:s.form.meta.featured_image_id||"",onTitleUpdated:e[3]||(e[3]=C=>{s.form.title=C}),onMetaUpdated:o.applyEditorSettings,onFeaturedMediaUpdated:e[4]||(e[4]=C=>{s.form.meta.featured_image_id=C}),modelValue:s.form.message,"onUpdate:modelValue":e[5]||(e[5]=C=>s.form.message=C)},null,8,["editorParams","documentTitle","metaSettings","featured_image_id","onMetaUpdated","modelValue"]))]),_:1})]),_:1})]),_:1})])}const r5t=ce(Z8t,[["render",o5t]]),a5t={name:"ManageSpacePages",components:{FluentDnD:Tr,ActionPopover:aa,SpacePageEditor:r5t,GenericPromo:$U,Search:j1},emits:["close"],props:["spaceProfile","savingCount"],setup(){return{spaceStore:H2()}},data(){return{loading:!0,saving:!1,creating:!1,pages:[],search:"",statusFilter:"all",editingPage:null}},computed:{counts(){const t={all:this.pages.length,published:0,draft:0};return this.pages.forEach(e=>{e.status==="published"?t.published++:t.draft++}),t},isFiltered(){return this.statusFilter!=="all"||!!this.search.trim()},filteredPages(){if(!this.isFiltered)return this.pages;const t=this.search.trim().toLowerCase();return this.pages.filter(e=>this.statusFilter==="published"&&e.status!=="published"||this.statusFilter==="draft"&&e.status==="published"?!1:t?`${e.title||""} ${e.slug||""}`.toLowerCase().includes(t):!0)},canReorder(){return!this.isFiltered&&!this.saving}},watch:{savingCount(){this.$emit("close")}},methods:{isInNav(t){var e;return((e=t.meta)==null?void 0:e.show_in_nav)==="yes"},pageEmoji(t){var e;return((e=t.meta)==null?void 0:e.emoji)||""},pageInitial(t){return(t.title||"?").trim().charAt(0).toUpperCase()},clearFilters(){this.search="",this.statusFilter="all"},pageRowActions(t){const e=t.status==="published";return[{label:e?this.$t("Switch to Draft"):this.$t("Publish"),action:()=>this.setStatus(t,e?"draft":"published")},{label:this.isInNav(t)?this.$t("Hide from Menu"):this.$t("Show in Menu"),action:()=>this.setNavVisibility(t,!this.isInNav(t))},{label:this.$t("Copy Link"),action:()=>this.$toClipboard(t.permalink,"Page link copied to clipboard")},{label:this.$t("Duplicate"),action:()=>this.duplicatePage(t)},{label:this.$t("Delete"),type:"danger",action:()=>this.deletePage(t)}]},fetchPages(t=null){this.loading=!0,this.$get(`spaces/${this.spaceProfile.slug}/pages`).then(e=>{if(this.pages=e.pages||[],t){const n=this.pages.find(i=>i.id==t);n&&this.openEditor(n)}}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},promptCreate(){this.$promt(this.$t("Give your page a title. You can change it later."),this.$t("New Page"),{confirmButtonText:this.$t("Create Page"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button"}).then(t=>{const e=(t.value||"").trim();if(!e){this.$notify.error(this.$t("Page title is required"));return}this.createPage(e)}).catch(()=>{})},createPage(t){this.creating=!0,this.$post(`spaces/${this.spaceProfile.slug}/pages`,{title:t}).then(e=>{this.$notify.success(e.message),this.pages.push(e.page),this.refreshSpace(),this.openEditor(e.page)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.creating=!1})},duplicatePage(t){this.$post(`spaces/${this.spaceProfile.slug}/pages/${t.id}/duplicate`).then(e=>{this.$notify.success(e.message),this.pages.push(e.page),this.refreshSpace()}).catch(e=>{this.$handleError(e)})},setStatus(t,e){this.patchPage(t,{status:e})},setNavVisibility(t,e){this.patchPage(t,{meta:Object.assign({},t.meta,{show_in_nav:e?"yes":"no"})})},patchPage(t,e){this.$put(`spaces/${this.spaceProfile.slug}/pages/${t.id}`,{page:e}).then(n=>{this.$notify.success(n.message),this.replaceRow(n.page),this.refreshSpace()}).catch(n=>{this.$handleError(n)})},deletePage(t){this.$confirm(this.$t("Are you sure you want to delete this page? This cannot be undone."),this.$t("Delete Page"),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.$del(`spaces/${this.spaceProfile.slug}/pages/${t.id}`).then(e=>{this.$notify.success(e.message),this.pages=this.pages.filter(n=>n.id!==t.id),this.refreshSpace()}).catch(e=>{this.$handleError(e)})}).catch(()=>{})},onReorder(){this.canReorder&&(this.saving=!0,this.$patch(`spaces/${this.spaceProfile.slug}/pages/re-index`,{page_ids:this.pages.map(t=>t.id)}).then(t=>{this.$notify.success(t.message),this.refreshSpace()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1}))},openEditor(t){this.editingPage=t},closeEditor(){this.editingPage=null},replaceRow(t){const e=this.pages.findIndex(n=>n.id===t.id);e!==-1&&this.pages.splice(e,1,Object.assign({},this.pages[e],t))},onPageSaved(t){this.replaceRow(t),this.editingPage&&this.editingPage.id===t.id&&(this.editingPage=Object.assign({},this.editingPage,t)),this.refreshSpace()},refreshSpace(){const t=this.spaceProfile.slug;this.spaceStore.invalidateSpace(t),this.spaceStore.fetchSpace(t,!0).catch(()=>{})}},mounted(){if(!this.has_pro){this.loading=!1;return}this.fetchPages(this.$route.query.page_id||null)}},l5t={style:{"max-width":"1200px",margin:"0 auto"}},c5t={class:"fcom_card_sections fcom_space_pages_card"},u5t={class:"fcom_section_primary fcom_space_pages_settings"},d5t={class:"fcom_section_primary_item"},h5t={class:"fcom_section_primary_item_title"},f5t={class:"fcom_heading_item"},p5t={class:"fcom_section_subtitle"},m5t={key:0,class:"fcom_section_item_actions"},g5t={key:0,class:"fcom_section_items"},v5t={style:{padding:"1rem"}},_5t={key:1,class:"fcom_section_items"},y5t={key:0,style:{padding:"1rem"}},b5t={key:1,style:{padding:"1rem"}},w5t={class:"fcom_pages_toolbar"},k5t={key:0,class:"fcom_pages_filter_note"},C5t={key:0},x5t={key:1},S5t={class:"fcom_pages_table",role:"table"},$5t={class:"fcom_pages_table_head",role:"row"},A5t={class:"fcom_pages_col_main",role:"columnheader"},E5t={class:"fcom_pages_col_status",role:"columnheader"},M5t={class:"fcom_pages_col_layout",role:"columnheader"},T5t={class:"fcom_pages_col_updated",role:"columnheader"},P5t={class:"fcom_pages_col_actions",role:"columnheader"},I5t={class:"fcom_visually_hidden"},L5t={class:"fcom_pages_col_main",role:"cell"},O5t=["title"],D5t=["src"],R5t=["textContent"],V5t=["textContent"],F5t={class:"fcom_page_identity"},N5t=["title","onClick","textContent"],B5t=["href","title"],z5t={class:"fcom_pages_col_status",role:"cell"},H5t={class:"fcom_pages_col_layout",role:"cell"},U5t=["textContent"],j5t={key:0,class:"fcom_page_cell_sub"},W5t={key:1,class:"fcom_page_cell_sub fcom_page_empty"},Y5t={class:"fcom_pages_col_updated",role:"cell"},q5t=["title"],G5t=["title"],X5t={class:"fcom_pages_col_actions fcom_section_item_actions",role:"cell"},K5t={key:2,class:"fcom_section_footer_note"};function Z5t(t,e,n,i,s,o){const r=qs,a=ze,l=B("generic-promo"),c=Vt,u=B("Search"),d=we,h=ht,f=Qc,p=ws,m=B("action-popover"),b=B("FluentDnD"),w=B("router-link"),k=zs,C=B("space-page-editor"),A=yo;return v(),D(A,{class:"fcom_full_editor_main lockscreen_editor"},{default:y(()=>[_(k,null,{default:y(()=>[g("div",l5t,[g("div",c5t,[g("div",u5t,[g("div",d5t,[g("div",h5t,[g("div",f5t,[g("h4",null,x(t.$t("Pages")),1),s.pages.length?(v(),D(r,{key:0,type:"info",size:"small",round:""},{default:y(()=>[N(x(s.pages.length),1)]),_:1})):O("",!0)]),g("p",p5t,x(t.$t("Static pages for this space, like rules, an FAQ or current offers.")),1)]),t.has_pro?(v(),$("div",m5t,[_(a,{class:"fcom_primary_button",disabled:s.creating,onClick:e[0]||(e[0]=S=>o.promptCreate())},{default:y(()=>[N(x(t.$t("Add New Page")),1)]),_:1},8,["disabled"])])):O("",!0)]),t.has_pro?(v(),$("div",_5t,[s.loading?(v(),$("div",y5t,[_(c,{rows:4,animated:!0})])):s.pages.length?(v(),$(J,{key:2},[g("div",w5t,[_(h,{modelValue:s.search,"onUpdate:modelValue":e[1]||(e[1]=S=>s.search=S),clearable:"",size:"small",class:"fcom_pages_search",placeholder:t.$t("Search pages")},{prefix:y(()=>[_(d,null,{default:y(()=>[_(u)]),_:1})]),_:1},8,["modelValue","placeholder"]),_(p,{modelValue:s.statusFilter,"onUpdate:modelValue":e[2]||(e[2]=S=>s.statusFilter=S),size:"small"},{default:y(()=>[_(f,{value:"all"},{default:y(()=>[N(x(t.$t("All"))+" ("+x(o.counts.all)+") ",1)]),_:1}),_(f,{value:"published"},{default:y(()=>[N(x(t.$t("Published"))+" ("+x(o.counts.published)+") ",1)]),_:1}),_(f,{value:"draft"},{default:y(()=>[N(x(t.$t("Draft"))+" ("+x(o.counts.draft)+") ",1)]),_:1})]),_:1},8,["modelValue"])]),o.isFiltered?(v(),$("div",k5t,[o.filteredPages.length?(v(),$("span",C5t,x(t.$t("Showing %1$s of %2$s pages. Clear the filters to reorder.",o.filteredPages.length,s.pages.length)),1)):(v(),$("span",x5t,x(t.$t("No page matches these filters.")),1)),_(a,{link:"",type:"primary",size:"small",onClick:e[3]||(e[3]=S=>o.clearFilters())},{default:y(()=>[N(x(t.$t("Clear")),1)]),_:1})])):O("",!0),g("div",S5t,[g("div",$5t,[g("span",A5t,x(t.$t("Page")),1),g("span",E5t,x(t.$t("Status")),1),g("span",M5t,x(t.$t("Template")),1),g("span",T5t,x(t.$t("Last Updated")),1),g("span",P5t,[g("span",I5t,x(t.$t("Actions")),1)])]),_(b,{items:o.filteredPages,"row-key":"id",draggable:o.canReorder,handle:".fcom_drag_handle",onDrop:o.onReorder,"item-class":"fcom_pages_row"},{item:y(({data:S})=>[g("div",L5t,[o.canReorder?(v(),$("span",{key:0,class:"fcom_drag_handle",title:t.$t("Drag to reorder")},"⋮⋮",8,O5t)):O("",!0),g("span",{class:q(["fcom_page_thumb",{has_image:!!S.featured_image}])},[S.featured_image?(v(),$("img",{key:0,src:S.featured_image,alt:""},null,8,D5t)):o.pageEmoji(S)?(v(),$("span",{key:1,class:"fcom_page_thumb_emoji",textContent:x(o.pageEmoji(S))},null,8,R5t)):(v(),$("span",{key:2,class:"fcom_page_thumb_letter",textContent:x(o.pageInitial(S))},null,8,V5t))],2),g("span",F5t,[g("a",{href:"#",class:"fcom_page_title",title:S.title,onClick:Me(M=>o.openEditor(S),["prevent"]),textContent:x(S.title)},null,8,N5t),g("a",{class:"fcom_page_slug",href:S.permalink,target:"_blank",rel:"noopener",title:S.status==="published"?t.$t("View page"):t.$t("Preview draft")},"/"+x(S.slug),9,B5t)])]),g("div",z5t,[_(r,{type:S.status==="published"?"success":"warning",size:"small","disable-transitions":""},{default:y(()=>[N(x(S.status==="published"?t.$t("Published"):t.$t("Draft")),1)]),_:2},1032,["type"]),S.privacy==="members_only"?(v(),D(r,{key:0,type:"info",size:"small","disable-transitions":""},{default:y(()=>[N(x(t.$t("Members Only")),1)]),_:1})):O("",!0),o.isInNav(S)?O("",!0):(v(),D(r,{key:1,type:"info",size:"small","disable-transitions":""},{default:y(()=>[N(x(t.$t("Hidden from menu")),1)]),_:1}))]),g("div",H5t,[g("span",{textContent:x(S.layout_label||t.$labelize(S.meta&&S.meta.layout))},null,8,U5t),S.word_count?(v(),$("span",j5t,x(t.$_n("%s word","%s words",S.word_count)),1)):(v(),$("span",W5t,x(t.$t("No content yet")),1))]),g("div",Y5t,[g("span",{title:S.updated_at},x(S.updated_at?t.humanDateDiff(S.updated_at):"-"),9,q5t),S.author?(v(),$("span",{key:0,class:"fcom_page_cell_sub",title:S.author.name},x(t.$t("by %s",S.author.name)),9,G5t)):O("",!0)]),g("div",X5t,[_(a,{size:"small",onClick:M=>o.openEditor(S)},{default:y(()=>[N(x(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(m,{items:o.pageRowActions(S),placement:"bottom-end",width:180},null,8,["items"])])]),_:1},8,["items","draggable","onDrop"])])],64)):(v(),$("div",b5t,[g("p",null,x(t.$t("No page has been created for this space yet.")),1)]))])):(v(),$("div",g5t,[g("div",v5t,[_(l,{placement:"feature_lock_space_pages"})])])),t.has_pro?(v(),$("div",K5t,[g("p",null,[N(x(t.$t("A page with Show in menu on appears in the space tab bar."))+" ",1),_(w,{to:{name:"space_settings_links",params:{space:n.spaceProfile.slug}}},{default:y(()=>[N(x(t.$t("Set its order and label under Menu.")),1)]),_:1},8,["to"])])])):O("",!0)])])])]),_:1}),(v(),D(na,{to:"body"},[s.editingPage?(v(),D(C,{key:0,page:s.editingPage,spaceProfile:n.spaceProfile,onClose:e[4]||(e[4]=S=>o.closeEditor()),onSaved:o.onPageSaved},null,8,["page","spaceProfile","onSaved"])):O("",!0)]))]),_:1})}const J5t=ce(a5t,[["render",Z5t]]),Q5t=Object.freeze(Object.defineProperty({__proto__:null,default:J5t},Symbol.toStringTag,{value:"Module"})),eSt={name:"CourseGeneralTab",components:{CreateCourseForm:ES},props:["course","savingCount"],emits:["completed"]},tSt={style:{"max-width":"800px",margin:"0 auto"}};function nSt(t,e,n,i,s,o){const r=B("create-course-form"),a=zs,l=yo;return v(),D(l,{class:"fcom_full_editor_main lockscreen_editor"},{default:y(()=>[_(a,null,{default:y(()=>[g("div",tSt,[_(r,{savingCount:n.savingCount,course:n.course,onCompleted:e[0]||(e[0]=c=>t.$emit("completed",c))},null,8,["savingCount","course"])])]),_:1})]),_:1})}const sSt=ce(eSt,[["render",nSt]]),iSt=Object.freeze(Object.defineProperty({__proto__:null,default:sSt},Symbol.toStringTag,{value:"Module"})),oSt={name:"CourseLockscreen",props:["spaceProfile","savingCount"],emits:["close"],components:{LockScreenEditor:DW},data(){return{saving:!1,loading:!1,sections:[],lockscreen:null}},watch:{savingCount(){this.saveChanges(!0)}},methods:{getSections(){this.loading=!0,this.$get("admin/courses/"+this.spaceProfile.id+"/sections",{conditions:["only_published"],with_lock_screen:!0}).then(t=>{this.sections=t.sections,this.lockscreen=t.lockscreen}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveChanges(t=!1){this.lockscreen&&(this.saving=!0,this.$put("admin/courses/"+this.spaceProfile.id+"/lockscreens",{lockscreen:this.lockscreen}).then(e=>{this.$notify.success(e.message),t&&this.$emit("close")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1}))}},mounted(){this.getSections()}},rSt={key:0,class:"fcom_lockscreen_meta"},aSt={class:"fcom_description"};function lSt(t,e,n,i,s,o){const r=B("lock-screen-editor");return s.lockscreen?(v(),D(r,{key:0,title:n.spaceProfile.title,space_id:n.spaceProfile.id,settings:n.spaceProfile.settings,lockscreen:s.lockscreen,sections:s.sections,saving:s.saving,loading:s.loading,onSave:o.saveChanges,onClose:e[0]||(e[0]=a=>t.$emit("close"))},{before_meta:y(()=>[n.spaceProfile.settings.custom_lock_screen!="yes"?(v(),$("div",rSt,[g("div",aSt,[g("p",null,x(t.$t("__LOCK_SCRREN_DESC")),1)])])):O("",!0)]),_:1},8,["title","space_id","settings","lockscreen","sections","saving","loading","onSave"])):O("",!0)}const cSt=ce(oSt,[["render",lSt]]),uSt=Object.freeze(Object.defineProperty({__proto__:null,default:cSt},Symbol.toStringTag,{value:"Module"})),dSt={name:"CourseWelcomeBannerConfig",props:["course","savingCount","hasPro"],emits:["saved"],components:{MediaEmbeder:_v,BgImageUpload:Tp,CrepeEditor:uu},data(){return{saving:!1,loading:!1,loadFailed:!1,currentTab:"enrolled",appReady:!1,bannerData:{enrolled:{enabled:"no",mediaType:"image",title:"",description:"",allowClose:"no",bannerImage:"",ctaButtons:[],bannerVideo:{}},not_enrolled:{enabled:"no",mediaType:"image",title:"",description:"",bannerImage:"",ctaButtons:[],bannerVideo:{}}}}},watch:{savingCount(){!this.hasPro||this.loadFailed||this.saveSettings()}},computed:{isEnabled(){return this.bannerData[this.currentTab].enabled=="yes"}},methods:{switchOption(t){this.appReady=!1,this.currentTab=t,this.$nextTick(()=>{this.appReady=!0})},addButton(){this.bannerData[this.currentTab].ctaButtons.push({label:"",link:"",type:"primary",newTab:"yes"})},removeButton(t){this.bannerData[this.currentTab].ctaButtons.splice(t,1)},getSettings(){this.loading=!0,this.loadFailed=!1,this.$get("admin/courses/"+this.course.id+"/welcome-banner").then(t=>{this.bannerData=t.settings,this.appReady=!0}).catch(t=>{this.loadFailed=!0,this.$handleError(t)}).finally(()=>{this.loading=!1})},saveSettings(){this.saving=!0,this.$post("admin/courses/"+this.course.id+"/welcome-banner",{settings:this.bannerData}).then(t=>{this.$notify.success(t.message),this.$emit("saved"),this.Storage.remove("fcom_course_welcome_banner_closed_"+this.course.id+"_enrolled"),this.Storage.remove("fcom_course_welcome_banner_closed_"+this.course.id+"_not_enrolled")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){this.hasPro&&this.getSettings()}},hSt={class:"fcom_customizer_container"},fSt={class:"fcom_wc_banner_header"},pSt={class:"fcom_wc_banner_options"},mSt={class:"fcom_filter_menu"},gSt={class:"fcom_filter_menu_ul"},vSt={key:0,class:"fcom_wc_banner_load_error"},_St={key:1,class:"fcom_wc_banner_content"},ySt={class:"fcom_wc_banner_content_header"},bSt={class:"fcom_wc_banner_media_type"},wSt={key:0,class:"fcom_banner_image_holder"},kSt={key:1,class:"fcom_banner_image_preview"},CSt={key:0,class:"fcom_wc_banner_cta_buttons"},xSt={class:"fcom_course_wc_help_text"},SSt={class:"fcom_wc_banner_content_footer"},$St={key:1,class:"fcom_upgrade_banner"},ASt={class:"fcom_upgrade_description"},ESt=["href"];function MSt(t,e,n,i,s,o){const r=ze,a=tu,l=Li,c=ws,u=B("BgImageUpload"),d=bo,h=B("CloseBold"),f=we,p=B("media-embeder"),m=ht,b=tn,w=B("crepe-editor"),k=Zt,C=Wt,A=E8,S=qt,M=nn,P=Vt;return v(),$("div",hSt,[g("div",fSt,[g("h4",null,x(t.$t("Welcome Banner")),1)]),g("div",pSt,[g("div",mSt,[g("ul",gSt,[g("li",null,[g("a",{onClick:e[0]||(e[0]=Me(T=>o.switchOption("enrolled"),["prevent"])),class:q({"router-link-exact-active":s.currentTab=="enrolled"}),href:"#"},x(t.$t("Enrolled")),3)]),g("li",null,[g("a",{onClick:e[1]||(e[1]=Me(T=>o.switchOption("not_enrolled"),["prevent"])),class:q({"router-link-exact-active":s.currentTab=="not_enrolled"}),href:"#"},x(t.$t("Not Enrolled")),3)])])])]),s.loadFailed?(v(),$("div",vSt,[g("p",null,x(t.$t("Unable to load welcome banner settings. Please try again.")),1),_(r,{class:"fcom_primary_button",onClick:o.getSettings},{default:y(()=>[N(x(t.$t("Retry")),1)]),_:1},8,["onClick"])])):s.loading?(v(),D(P,{key:2,rows:5})):(v(),$("div",_St,[g("div",ySt,[g("h4",null,x(s.currentTab==="enrolled"?t.$t("Enable for enrolled members"):t.$t("Enable for not enrolled visitors")),1),_(a,{modelValue:s.bannerData[s.currentTab].enabled,"onUpdate:modelValue":e[2]||(e[2]=T=>s.bannerData[s.currentTab].enabled=T),"active-value":"yes","inactive-value":"no",class:"fcom_switch"},null,8,["modelValue"])]),g("div",{class:q(["fcom_wc_banner_content_body",{fcom_wc_disabled:!o.isEnabled}])},[g("div",bSt,[g("p",null,x(t.$t("Media type")),1),_(c,{modelValue:s.bannerData[s.currentTab].mediaType,"onUpdate:modelValue":e[3]||(e[3]=T=>s.bannerData[s.currentTab].mediaType=T),class:"fcom_radio_group"},{default:y(()=>[_(l,{label:t.$t("Image"),value:"image"},null,8,["label"]),_(l,{label:t.$t("Video"),value:"video"},null,8,["label"])]),_:1},8,["modelValue"])]),s.bannerData[s.currentTab].mediaType==="image"?(v(),$(J,{key:0},[s.bannerData[s.currentTab].bannerImage?(v(),$("div",kSt,[_(d,{alt:t.$t("Image Preview"),src:s.bannerData[s.currentTab].bannerImage},null,8,["alt","src"]),_(r,{class:"fcom_secondary_button",text:"",onClick:e[5]||(e[5]=T=>s.bannerData[s.currentTab].bannerImage="")},{default:y(()=>[_(f,null,{default:y(()=>[_(h)]),_:1})]),_:1})])):(v(),$("div",wSt,[g("h4",null,x(t.$t("Featured Image")),1),g("p",null,x(t.$t("Set a featured image at the top of the welcome banner. Recommended image dimension: 1680x600")),1),_(u,{modelValue:s.bannerData[s.currentTab].bannerImage,"onUpdate:modelValue":e[4]||(e[4]=T=>s.bannerData[s.currentTab].bannerImage=T)},null,8,["modelValue"])]))],64)):O("",!0),s.bannerData[s.currentTab].mediaType==="video"?(v(),D(p,{key:1,media:s.bannerData[s.currentTab].bannerVideo},null,8,["media"])):O("",!0),_(M,{onSubmit:Me(t.doNothing,["prevent"]),"label-position":"top",class:"fcom_form_container"},{default:y(()=>[_(b,{label:t.$t("Title")},{default:y(()=>[_(m,{modelValue:s.bannerData[s.currentTab].title,"onUpdate:modelValue":e[6]||(e[6]=T=>s.bannerData[s.currentTab].title=T)},null,8,["modelValue"])]),_:1},8,["label"]),_(b,{label:t.$t("Description")},{default:y(()=>[s.appReady?(v(),D(w,{key:0,modelValue:s.bannerData[s.currentTab].description,"onUpdate:modelValue":e[7]||(e[7]=T=>s.bannerData[s.currentTab].description=T)},null,8,["modelValue"])):O("",!0)]),_:1},8,["label"]),_(b,{label:t.$t("Call to Action")},{default:y(()=>{var T;return[((T=s.bannerData[s.currentTab].ctaButtons)==null?void 0:T.length)>0?(v(),$("div",CSt,[(v(!0),$(J,null,ye(s.bannerData[s.currentTab].ctaButtons,(I,L)=>(v(),$("div",{key:L,class:"fcom_wc_banner_cta_button"},[_(b,{label:L?"":t.$t("Button Label")},{default:y(()=>[_(m,{modelValue:I.label,"onUpdate:modelValue":R=>I.label=R},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),_(b,{label:L?"":t.$t("Button Link")},{default:y(()=>[_(m,{modelValue:I.link,"onUpdate:modelValue":R=>I.link=R},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),_(b,{label:L?"":t.$t("Button Type"),class:"fcom_wc_banner_select"},{default:y(()=>[_(C,{modelValue:I.type,"onUpdate:modelValue":R=>I.type=R,class:"fcom_select",placeholder:t.$t("Select type")},{default:y(()=>[_(k,{label:t.$t("Primary"),value:"primary"},null,8,["label"]),_(k,{label:t.$t("Secondary"),value:"secondary"},null,8,["label"]),_(k,{label:t.$t("Text"),value:"text"},null,8,["label"]),_(k,{label:t.$t("Link"),value:"link"},null,8,["label"])]),_:1},8,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["label"]),_(b,{label:L?"":t.$t("Open in new tab"),class:"fcom_wc_banner_select"},{default:y(()=>[_(C,{modelValue:I.newTab,"onUpdate:modelValue":R=>I.newTab=R,class:"fcom_select"},{default:y(()=>[_(k,{label:t.$t("Yes"),value:"yes"},null,8,["label"]),_(k,{label:t.$t("No"),value:"no"},null,8,["label"])]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),_(r,{text:"",class:"wc_button_remove",onClick:R=>o.removeButton(L)},{default:y(()=>[_(f,null,{default:y(()=>[_(h)]),_:1})]),_:1},8,["onClick"])]))),128)),_(A,{underline:!1,onClick:o.addButton},{default:y(()=>[N(x("+ "+t.$t("Add button")),1)]),_:1},8,["onClick"])])):(v(),D(A,{key:1,underline:!1,onClick:o.addButton},{default:y(()=>[N(x("+ "+t.$t("Add button")),1)]),_:1},8,["onClick"]))]}),_:1},8,["label"]),s.currentTab=="enrolled"?(v(),D(b,{key:0,class:"fcom_course_wc_allowclose"},{default:y(()=>[_(S,{modelValue:s.bannerData[s.currentTab].allowClose,"onUpdate:modelValue":e[8]||(e[8]=T=>s.bannerData[s.currentTab].allowClose=T),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:y(()=>[N(x(t.$t("Allow members to close the welcome banner")),1)]),_:1},8,["modelValue"]),g("div",xSt,x(t.$t("If allowed, members will be able to hide the banner")),1)]),_:1})):O("",!0)]),_:1},8,["onSubmit"])],2),g("div",SSt,[n.hasPro?(v(),D(r,{key:0,class:"fcom_primary_button",disabled:s.saving,loading:s.saving,onClick:o.saveSettings},{default:y(()=>[N(x(t.$t("Update Info")),1)]),_:1},8,["disabled","loading","onClick"])):(v(),$("div",$St,[g("p",ASt,x(t.$t("Please upgrade to Pro to use this feature")),1),g("a",{class:"el-button",href:t.$upgradeUrl("feature_lock_course_welcome_banner"),target:"_blank"},x(t.$t("Upgrade to Pro")),9,ESt)]))])]))])}const TSt=ce(dSt,[["render",MSt]]),PSt={name:"CourseWelcomeBannerTab",components:{CourseWelcomeBannerConfig:TSt},props:["course","savingCount","hasPro"]},ISt={class:"fcom_course_welcome_banner_wrap"};function LSt(t,e,n,i,s,o){const r=B("course-welcome-banner-config"),a=zs,l=yo;return v(),D(l,{class:"fcom_full_editor_main lockscreen_editor"},{default:y(()=>[_(a,null,{default:y(()=>[g("div",ISt,[_(r,{course:n.course,savingCount:n.savingCount,hasPro:n.hasPro},null,8,["course","savingCount","hasPro"])])]),_:1})]),_:1})}const OSt=ce(PSt,[["render",LSt]]),DSt=Object.freeze(Object.defineProperty({__proto__:null,default:OSt},Symbol.toStringTag,{value:"Module"})),RSt={name:"ManageSpaceLinks",components:{MenuGroupSettings:OS},props:["spaceProfile","savingCount"],emits:["close"],data(){return{saving:!1}},watch:{savingCount(){this.saveMenuItems(!0)}},methods:{saveMenuItems(t=!1){this.saving=!0;let e="spaces/"+this.spaceProfile.slug+"/links";this.spaceProfile.type=="course"&&(e="admin/courses/"+this.spaceProfile.id+"/links"),this.$post(e,{links:this.spaceProfile.settings.links,space_id:this.spaceProfile.id}).then(n=>{this.$notify.success(n.message),this.spaceProfile.settings.links=n.links,t&&this.$emit("close")}).catch(n=>{this.$handleError(n)}).finally(()=>{this.saving=!1})}}},VSt={style:{"max-width":"800px",margin:"0 auto"}},FSt={class:"fcom_card_sections"};function NSt(t,e,n,i,s,o){const r=B("menu-group-settings"),a=zs,l=yo;return v(),D(l,{class:"fcom_full_editor_main lockscreen_editor"},{default:y(()=>[_(a,null,{default:y(()=>[g("div",VSt,[g("div",FSt,[_(r,{custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:e[0]||(e[0]=c=>o.saveMenuItems()),title:t.$t("Manage Links"),menuItems:n.spaceProfile.settings.links},null,8,["title","menuItems"])])])]),_:1})]),_:1})}const BSt=ce(RSt,[["render",NSt]]),zSt=Object.freeze(Object.defineProperty({__proto__:null,default:BSt},Symbol.toStringTag,{value:"Module"})),HSt=`.fcom_pop_buttons .el-dropdown-menu__item{padding:0;display:block}.fcom_pop_buttons .el-dropdown-menu__item button{padding:15px 30px!important;width:100%;border-radius:0}.fcom_chat_menu .el-badge__content{align-items:center;background-color:var(--el-color-danger);border:1px solid var(--el-color-white);border-radius:10px;color:var(--el-color-white);display:inline-flex;font-size:12px;height:18px;padding:6px;justify-content:center;white-space:nowrap}.fcom_chat_menu .el-badge__content.is-fixed{top:0;z-index:1;transform:translateY(-50%) translate(100%)}.fcom_space_form_bottom{display:flex;justify-content:space-between;align-items:center;width:100%}
1453 +`,USt=Object.freeze(Object.defineProperty({__proto__:null,default:HSt},Symbol.toStringTag,{value:"Module"})),jSt=`.fcom-report-wrap .fcom-report-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.fcom-report-wrap .fcom-report-header h4{font-size:16px;font-weight:500;color:var(--fcom-primary-text, #0E121B);line-height:24px;margin:0}.fcom-report-wrap .fcom-report-header .fcom-report-header-action{display:flex;align-items:center}.fcom-report-wrap .fcom-report-header .fcom-report-header-action .date-selector{border-right:none}.fcom-report-wrap .fcom-report-header .fcom-report-header-action .el-select{width:150px}.fcom-report-wrap .fcom-report-header .fcom-report-header-action .el-select .el-select__wrapper{border-top-right-radius:0;border-bottom-right-radius:0;border:1px solid #E1E4EA;box-shadow:none}.fcom-report-wrap .fcom-report-header .fcom-report-header-action .el-date-editor{box-shadow:none;border:1px solid #E1E4EA;border-radius:0 8px 8px 0;max-width:250px}.fcom-report-wrap .fcom-report-body .fcom-report-stat-widgets{margin-bottom:24px}.fcom-report-wrap .fcom-report-chart-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px}.fcom-report-wrap .fcom-report-chart-header .el-select{width:150px}.fcom-report-wrap .fcom-report-chart-header h4{margin:0;display:flex;align-items:center;gap:4px;color:var(--fcom-menu-text, #0E121B);font-size:16px;font-weight:500;line-height:24px;letter-spacing:-.011em}.fcom-report-wrap .fcom-report-chart-header h4 i{color:#99a0ae}.fcom-report-wrap .fcom-report-chart{background:var(--fcom-primary-bg, #ffffff);border-radius:12px;margin-bottom:24px}.fcom-report-wrap .fcom-report-chart .fcom-report-chart-header{border-bottom:1px solid var(--stroke-soft-200, #E1E4EA)}.fcom-report-popular-time{background:var(--fcom-primary-bg, #ffffff);border-radius:12px;overflow:hidden}.fcom-report-popular-time .el-table .el-table__inner-wrapper:before{display:none}.fcom-report-popular-time .el-table .el-table__header thead tr th{background:var(--fcom-primary-border, #F5F7FA);color:var(--fcom-secondary-text, #525866);font-size:14px;font-weight:400;line-height:20px;letter-spacing:-.006em;border:none;padding-top:8px;padding-bottom:8px}.fcom-report-popular-time .el-table .el-table__header thead tr th .cell{padding-left:20px;padding-right:12px}.fcom-report-popular-time .el-table .el-table__body tbody tr{background:var(--fcom-primary-bg, #ffffff)}.fcom-report-popular-time .el-table .el-table__body tbody tr:last-child td{border-bottom:none}.fcom-report-popular-time .el-table .el-table__body tbody tr td{font-size:14px;font-weight:400;line-height:20px;letter-spacing:-.006em;color:var(--fcom-primary-text, #525866);padding-top:14px;padding-bottom:14px;border-bottom-color:var(--stroke-soft-200, #E1E4EA)}.fcom-report-popular-time .el-table .el-table__body tbody tr td .cell{padding-left:20px;padding-right:12px}.fcom-report-stat-widgets{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:24px}.fcom-report-stat-widgets .fcom-report-stat-widget{padding:20px;border-radius:12px;background:var(--fcom-primary-bg, #ffffff)}.fcom-report-stat-widgets .fcom-report-stat-widget .stat-title{display:block;font-size:14px;line-height:20px;color:var(--fcom-primary-text, #525866);letter-spacing:-.006em;margin-bottom:4px}.fcom-report-stat-widgets .fcom-report-stat-widget h3{display:flex;align-items:center;gap:8px;font-size:32px;font-weight:500;line-height:40px;letter-spacing:-.005em;margin:0;color:var(--fcom-primary-text, #0E121B)}.fcom-report-stat-widgets .fcom-report-stat-widget h3 .stat-percent{display:block;font-size:12px;font-weight:500;line-height:16px;border-radius:30px;color:var(--state-success-dark, #0B4627);background:var(--state-success-light, #C2F5DA);padding:2px 8px}.fcom-report-stat-widgets .fcom-report-stat-widget h3 .stat-percent.stat-down{background:var(--state-error-light, #FFC0C5);color:var(--state-error-dark, #681219)}.fcom-members-activities-wrap .fcom-top-members-wrap .fcom-report-chart-header{border-bottom:1px solid var(--fcom-primary-border, #E1E4EA)}.fcom-members-activity-box{border-bottom:1px solid var(--fcom-primary-border, #E1E4EA);padding-top:16px;padding-bottom:16px;display:flex;align-items:center;gap:14px}.fcom-members-activity-box .image-box .number{position:absolute;right:0;bottom:0;background:var(--bg-surface-800, #222530);min-width:16px;height:16px;border-radius:10px;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 1.5px #fff;font-size:11px;font-weight:500;line-height:12px;letter-spacing:.02em;color:var(--fcom-primary-text, #525866);padding:0 4px}.fcom-members-activity-box .points{color:var(--text-strong-950, #0E121B);font-weight:300;display:block;line-height:16px;font-size:12px}.fcom-report-popular-spacers{padding-bottom:20px}.fcom-members-activities-wrap{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:24px;margin-bottom:24px;align-items:flex-start}.fcom-members-activities-wrap img{max-width:100%}.fcom-members-activities-wrap .fcom-top-members-wrap{background:var(--fcom-primary-bg, #ffffff);border-radius:12px}.fcom-members-activities-wrap .fcom-top-members-wrap .fcom-report-chart-header{border-bottom:1px solid var(--stroke-soft-200, #E1E4EA)}.fcom-members-activity-lists{padding:20px}.fcom-members-activity-lists .fcom-members-activity-box:last-child{border-bottom:none;padding-bottom:0}.fcom-members-activity-lists .fcom-members-activity-box:first-child{padding-top:0}.fcom-members-activity-box{border-bottom:1px solid var(--stroke-soft-200, #E1E4EA);padding-top:16px;padding-bottom:16px;display:flex;align-items:center;gap:14px}.fcom-members-activity-box .image-box{position:relative;width:40px;height:40px;border-radius:50%}.fcom-members-activity-box .image-box img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}.fcom-members-activity-box .image-box .number{position:absolute;right:0;bottom:0;background:var(--bg-surface-800, #222530);min-width:16px;height:16px;border-radius:10px;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 1.5px #fff;font-size:11px;font-weight:500;line-height:12px;letter-spacing:.02em;color:#fff;padding:0 4px}.fcom-members-activity-box .image-box .indicator{position:absolute;right:0;bottom:5px;width:6px;height:6px;background:var(--state-success-base, #23A682);box-shadow:0 0 0 1.8px #fff;border-radius:50%}.fcom-members-activity-box .image-box .indicator.offline{background:var(--state-faded-base, #717784)}.fcom-members-activity-box .content-box{flex:1}.fcom-members-activity-box .content-box h5{margin:0 0 4px;color:var(--fcom-primary-text, #525866);font-size:14px;font-weight:500;line-height:20px;letter-spacing:-.006em}.fcom-members-activity-box .content-box p{margin:0;line-height:16px;font-size:12px}.fcom-members-activity-box .points{color:var(--fcom-primary-text, #525866);font-weight:300;display:block;line-height:16px;font-size:12px}.el-select.space-selector{margin-right:10px}.el-select.space-selector .el-select__wrapper.el-tooltip__trigger.el-tooltip__trigger{border-top-right-radius:8px;border-bottom-right-radius:8px}
1454 +`,WSt=Object.freeze(Object.defineProperty({__proto__:null,default:jSt},Symbol.toStringTag,{value:"Module"}))});export default YSt();