PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 2.10.01
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v2.10.01
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 1.1.0 All 77 releases
fluent-community / assets / admin_app.js

admin_app.js in FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses 2.10.01, at assets/admin_app.js

1,455 lines 2.9 MB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var IW=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var u9=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var Gt=(t,e,n)=>(u9(t,e,"read from private field"),n?n.call(t):e.get(t)),ua=(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)=>(u9(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);var $8t=IW((Lo,Oo)=>{const LW="modulepreload",OW=function(t){return"/"+t},d9={},Qs=function(e,n,i){if(!n||n.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=OW(o),o in d9)return;d9[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":LW,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 * (c) 2018-present Yuxi (Evan) You and Vue contributors
4 * @license MIT
5 **/function zo(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,Pd=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),g6=t=>t.startsWith("onUpdate:"),cn=Object.assign,v6=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},DW=Object.prototype.hasOwnProperty,zt=(t,e)=>DW.call(t,e),Me=Array.isArray,Jh=t=>rp(t)==="[object Map]",Id=t=>rp(t)==="[object Set]",H_=t=>rp(t)==="[object Date]",RW=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",dd=t=>(yt(t)||et(t))&&et(t.then)&&et(t.catch),TP=Object.prototype.toString,rp=t=>TP.call(t),VW=t=>rp(t).slice(8,-1),hd=t=>rp(t)==="[object Object]",lb=t=>Ke(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,ul=zo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),FW=zo("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),cb=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},NW=/-\w/g,Un=cb(t=>t.replace(NW,e=>e.slice(1).toUpperCase())),BW=/\B([A-Z])/g,zi=cb(t=>t.replace(BW,"-$1").toLowerCase()),Gc=cb(t=>t.charAt(0).toUpperCase()+t.slice(1)),qu=cb(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)},PP=(t,e,n,i=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},ub=t=>{const e=parseFloat(t);return isNaN(e)?t:e},U_=t=>{const e=Ke(t)?Number(t):NaN;return isNaN(e)?t:e};let h9;const db=()=>h9||(h9=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function zW(t,e){return t+JSON.stringify(e,(n,i)=>typeof i=="function"?i.toString():i)}const HW="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",UW=zo(HW);function Xe(t){if(Me(t)){const e={};for(let n=0;n<t.length;n++){const i=t[n],s=Ke(i)?IP(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 jW=/;(?![^(]*\))/g,WW=/:([^]+)/,YW=/\/\*[^]*?\*\//g;function IP(t){const e={};return t.replace(YW,"").split(jW).forEach(n=>{if(n){const i=n.split(WW);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function q(t){let e="";if(Ke(t))e=t;else if(Me(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 qW="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",GW="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",XW="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",KW="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",ZW=zo(qW),JW=zo(GW),QW=zo(XW),eY=zo(KW),tY="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",nY=zo(tY);function LP(t){return!!t||t===""}function sY(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=H_(t),i=H_(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=Me(t),i=Me(e),n||i)return n&&i?sY(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 hb(t,e){return t.findIndex(n=>Dc(n,e))}const OP=t=>!!(t&&t.__v_isRef===!0),x=t=>Ke(t)?t:t==null?"":Me(t)||yt(t)&&(t.toString===TP||!et(t.toString))?OP(t)?x(t.value):JSON.stringify(t,DP,2):String(t),DP=(t,e)=>OP(e)?DP(t,e.value):Jh(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,s],o)=>(n[iw(i,o)+" =>"]=s,n),{})}:Id(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>iw(n))}:mo(e)?iw(e):yt(e)&&!Me(e)&&!hd(e)?String(e):e,iw=(t,e="")=>{var n;return mo(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};function iY(t){return t==null?"initial":typeof t=="string"?t===""?" ":t:String(t)}/**
6 * @vue/reactivity v3.5.27
7 * (c) 2018-present Yuxi (Evan) You and Vue contributors
8 * @license MIT
9 **/let Ci;class _6{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ci,!e&&Ci&&(this.index=(Ci.scopes||(Ci.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=Ci;try{return Ci=this,e()}finally{Ci=n}}}on(){++this._on===1&&(this.prevScope=Ci,Ci=this)}off(){this._on>0&&--this._on===0&&(Ci=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 fb(t){return new _6(t)}function pb(){return Ci}function mb(t,e=!1){Ci&&Ci.cleanups.push(t)}let Gn;const ow=new WeakSet;class kg{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,Ci&&Ci.active&&Ci.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ow.has(this)&&(ow.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||VP(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,f9(this),FP(this);const e=Gn,n=Vr;Gn=this,Vr=!0;try{return this.fn()}finally{NP(this),Gn=e,Vr=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)w6(e);this.deps=this.depsTail=void 0,f9(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ow.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){uk(this)&&this.run()}get dirty(){return uk(this)}}let RP=0,Bm,zm;function VP(t,e=!1){if(t.flags|=8,e){t.next=zm,zm=t;return}t.next=Bm,Bm=t}function y6(){RP++}function b6(){if(--RP>0)return;if(zm){let e=zm;for(zm=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;Bm;){let e=Bm;for(Bm=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 FP(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function NP(t){let e,n=t.depsTail,i=n;for(;i;){const s=i.prevDep;i.version===-1?(i===n&&(n=s),w6(i),oY(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}t.deps=e,t.depsTail=n}function uk(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(BP(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function BP(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Cg)||(t.globalVersion=Cg,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!uk(t))))return;t.flags|=2;const e=t.dep,n=Gn,i=Vr;Gn=t,Vr=!0;try{FP(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,Vr=i,NP(t),t.flags&=-3}}function w6(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)w6(o,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function oY(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}function rY(t,e){t.effect instanceof kg&&(t=t.effect.fn);const n=new kg(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 aY(t){t.effect.stop()}let Vr=!0;const zP=[];function gl(){zP.push(Vr),Vr=!1}function vl(){const t=zP.pop();Vr=t===void 0?!0:t}function f9(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=Gn;Gn=void 0;try{e()}finally{Gn=n}}}let Cg=0;class lY{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 gb{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||!Vr||Gn===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Gn)n=this.activeLink=new lY(Gn,this),Gn.deps?(n.prevDep=Gn.depsTail,Gn.depsTail.nextDep=n,Gn.depsTail=n):Gn.deps=Gn.depsTail=n,HP(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++,Cg++,this.notify(e)}notify(e){y6();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{b6()}}}function HP(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)HP(i)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const j_=new WeakMap,Gu=Symbol(""),dk=Symbol(""),xg=Symbol("");function $i(t,e,n){if(Vr&&Gn){let i=j_.get(t);i||j_.set(t,i=new Map);let s=i.get(n);s||(i.set(n,s=new gb),s.map=i,s.key=n),s.track()}}function tl(t,e,n,i,s,o){const r=j_.get(t);if(!r){Cg++;return}const a=l=>{l&&l.trigger()};if(y6(),e==="clear")r.forEach(a);else{const l=Me(t),c=l&&lb(n);if(l&&n==="length"){const u=Number(i);r.forEach((d,h)=>{(h==="length"||h===xg||!mo(h)&&h>=u)&&a(d)})}else switch((n!==void 0||r.has(void 0))&&a(r.get(n)),c&&a(r.get(xg)),e){case"add":l?c&&a(r.get("length")):(a(r.get(Gu)),Jh(t)&&a(r.get(dk)));break;case"delete":l||(a(r.get(Gu)),Jh(t)&&a(r.get(dk)));break;case"set":Jh(t)&&a(r.get(Gu));break}}b6()}function cY(t,e){const n=j_.get(t);return n&&n.get(e)}function sh(t){const e=an(t);return e===t?e:($i(e,"iterate",xg),uo(t)?e:e.map(Gr))}function vb(t){return $i(t=an(t),"iterate",xg),t}function rc(t,e){return Aa(t)?Cf(Fr(t)?Gr(e):e):Gr(e)}const uY={__proto__:null,[Symbol.iterator](){return rw(this,Symbol.iterator,t=>rc(this,t))},concat(...t){return sh(this).concat(...t.map(e=>Me(e)?sh(e):e))},entries(){return rw(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 aw(this,"includes",t)},indexOf(...t){return aw(this,"indexOf",t)},join(t){return sh(this).join(t)},lastIndexOf(...t){return aw(this,"lastIndexOf",t)},map(t,e){return Ua(this,"map",t,e,void 0,arguments)},pop(){return zp(this,"pop")},push(...t){return zp(this,"push",t)},reduce(t,...e){return p9(this,"reduce",t,e)},reduceRight(t,...e){return p9(this,"reduceRight",t,e)},shift(){return zp(this,"shift")},some(t,e){return Ua(this,"some",t,e,void 0,arguments)},splice(...t){return zp(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 zp(this,"unshift",t)},values(){return rw(this,"values",t=>rc(this,t))}};function rw(t,e,n){const i=vb(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 dY=Array.prototype;function Ua(t,e,n,i,s,o){const r=vb(t),a=r!==t&&!uo(t),l=r[e];if(l!==dY[e]){const d=l.apply(t,o);return a?Gr(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 p9(t,e,n,i){const s=vb(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 aw(t,e,n){const i=an(t);$i(i,"iterate",xg);const s=i[e](...n);return(s===-1||s===!1)&&C1(n[0])?(n[0]=an(n[0]),i[e](...n)):s}function zp(t,e,n=[]){gl(),y6();const i=an(t)[e].apply(t,n);return b6(),vl(),i}const hY=zo("__proto__,__v_isRef,__isVue"),UP=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(mo));function fY(t){mo(t)||(t=String(t));const e=an(this);return $i(e,"has",t),e.hasOwnProperty(t)}class jP{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?KP:XP:o?GP:qP).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const r=Me(e);if(!s){let l;if(r&&(l=uY[n]))return l;if(n==="hasOwnProperty")return fY}const a=Reflect.get(e,n,hn(e)?e:i);if((mo(n)?UP.has(n):hY(n))||(s||$i(e,"get",n),o))return a;if(hn(a)){const l=r&&lb(n)?a:a.value;return s&&yt(l)?Rc(l):l}return yt(a)?s?Rc(a):In(a):a}}class WP extends jP{constructor(e=!1){super(!1,e)}set(e,n,i,s){let o=e[n];const r=Me(e)&&lb(n);if(!this._isShallow){const c=Aa(o);if(!uo(i)&&!Aa(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)||!UP.has(n))&&$i(e,"has",n),i}ownKeys(e){return $i(e,"iterate",Me(e)?"length":Gu),Reflect.ownKeys(e)}}class YP extends jP{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}}const pY=new WP,mY=new YP,gY=new WP(!0),vY=new YP(!0),hk=t=>t,Tv=t=>Reflect.getPrototypeOf(t);function _Y(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?hk:e?Cf:Gr;return!e&&$i(o,"iterate",l?dk:Gu),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 Pv(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function yY(t,e){const n={get(s){const o=this.__v_raw,r=an(o),a=an(s);t||(Ni(s,a)&&$i(r,"get",s),$i(r,"get",a));const{has:l}=Tv(r),c=e?hk:t?Cf:Gr;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&&$i(an(s),"iterate",Gu),s.size},has(s){const o=this.__v_raw,r=an(o),a=an(s);return t||(Ni(s,a)&&$i(r,"has",s),$i(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?hk:t?Cf:Gr;return!t&&$i(l,"iterate",Gu),a.forEach((u,d)=>s.call(o,c(u),c(d),r))}};return cn(n,t?{add:Pv("add"),set:Pv("set"),delete:Pv("delete"),clear:Pv("clear")}:{add(s){!e&&!uo(s)&&!Aa(s)&&(s=an(s));const o=an(this);return Tv(o).has.call(o,s)||(o.add(s),tl(o,"add",s,s)),this},set(s,o){!e&&!uo(o)&&!Aa(o)&&(o=an(o));const r=an(this),{has:a,get:l}=Tv(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}=Tv(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]=_Y(s,t,e)}),n}function _b(t,e){const n=yY(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 bY={get:_b(!1,!1)},wY={get:_b(!1,!0)},kY={get:_b(!0,!1)},CY={get:_b(!0,!0)},qP=new WeakMap,GP=new WeakMap,XP=new WeakMap,KP=new WeakMap;function xY(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function SY(t){return t.__v_skip||!Object.isExtensible(t)?0:xY(VW(t))}function In(t){return Aa(t)?t:yb(t,!1,pY,bY,qP)}function k6(t){return yb(t,!1,gY,wY,GP)}function Rc(t){return yb(t,!0,mY,kY,XP)}function $Y(t){return yb(t,!0,vY,CY,KP)}function yb(t,e,n,i,s){if(!yt(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=SY(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 Fr(t){return Aa(t)?Fr(t.__v_raw):!!(t&&t.__v_isReactive)}function Aa(t){return!!(t&&t.__v_isReadonly)}function uo(t){return!!(t&&t.__v_isShallow)}function C1(t){return t?!!t.__v_raw:!1}function an(t){const e=t&&t.__v_raw;return e?an(e):t}function Pi(t){return!zt(t,"__v_skip")&&Object.isExtensible(t)&&PP(t,"__v_skip",!0),t}const Gr=t=>yt(t)?In(t):t,Cf=t=>yt(t)?Rc(t):t;function hn(t){return t?t.__v_isRef===!0:!1}function J(t){return ZP(t,!1)}function Fn(t){return ZP(t,!0)}function ZP(t,e){return hn(t)?t:new AY(t,e)}class AY{constructor(e,n){this.dep=new gb,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:an(e),this._value=n?e:Gr(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)||Aa(e);e=i?e:an(e),Ni(e,n)&&(this._rawValue=e,this._value=i?e:Gr(e),this.dep.trigger())}}function Hm(t){t.dep&&t.dep.trigger()}function E(t){return hn(t)?t.value:t}function fk(t){return et(t)?t():E(t)}const EY={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 C6(t){return Fr(t)?t:new Proxy(t,EY)}class MY{constructor(e){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new gb,{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 JP(t){return new MY(t)}function go(t){const e=Me(t)?new Array(t.length):{};for(const n in t)e[n]=QP(t,n);return e}class TY{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(!Me(e)||!lb(String(n)))do s=!C1(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 cY(this._raw,this._key)}}class PY{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 PY(t):yt(t)&&arguments.length>1?QP(t,e,n):J(t)}function QP(t,e,n){return new TY(t,e,n)}class IY{constructor(e,n,i){this.fn=e,this.setter=n,this._value=void 0,this.dep=new gb(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Cg-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 VP(this,!0),!0}get value(){const e=this.dep.track();return BP(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function LY(t,e,n=!1){let i,s;return et(t)?i=t:(i=t.get,s=t.set),new IY(i,s,n)}const OY={GET:"get",HAS:"has",ITERATE:"iterate"},DY={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Iv={},W_=new WeakMap;let ac;function RY(){return ac}function eI(t,e=!1,n=ac){if(n){let i=W_.get(n);i||W_.set(n,i=[]),i.push(t)}}function VY(t,e,n=pn){const{immediate:i,deep:s,once:o,scheduler:r,augmentJob:a,call:l}=n,c=$=>s?$:uo($)||s===!1||s===0?nl($,1):nl($);let u,d,h,f,p=!1,m=!1;if(hn(t)?(d=()=>t.value,p=uo(t)):Fr(t)?(d=()=>c(t),p=!0):Me(t)?(m=!0,p=t.some($=>Fr($)||uo($)),d=()=>t.map($=>{if(hn($))return $.value;if(Fr($))return c($);if(et($))return l?l($,2):$()})):et(t)?e?d=l?()=>l(t,2):t:d=()=>{if(h){gl();try{h()}finally{vl()}}const $=ac;ac=u;try{return l?l(t,3,[f]):t(f)}finally{ac=$}}:d=Dt,e&&s){const $=d,S=s===!0?1/0:s;d=()=>nl($(),S)}const y=pb(),b=()=>{u.stop(),y&&y.active&&v6(y.effects,u)};if(o&&e){const $=e;e=(...S)=>{$(...S),b()}}let k=m?new Array(t.length).fill(Iv):Iv;const C=$=>{if(!(!(u.flags&1)||!u.dirty&&!$))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===Iv?void 0:m&&k[0]===Iv?[]:k,f];k=S,l?l(e,3,P):e(...P)}finally{ac=M}}}else u.run()};return a&&a(C),u=new kg(d),u.scheduler=r?()=>r(C,!1):C,f=$=>eI($,!1,u),h=u.onStop=()=>{const $=W_.get(u);if($){if(l)l($,4);else for(const S of $)S();W_.delete(u)}},e?i?C(!0):k=u.run():r?r(C.bind(null,!0),!0):u.run(),b.pause=u.pause.bind(u),b.resume=u.resume.bind(u),b.stop=b,b}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(Me(t))for(let i=0;i<t.length;i++)nl(t[i],e,n);else if(Id(t)||Jh(t))t.forEach(i=>{nl(i,e,n)});else if(hd(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 * (c) 2018-present Yuxi (Evan) You and Vue contributors
12 * @license MIT
13 **/const tI=[];function FY(t){tI.push(t)}function NY(){tI.pop()}function BY(t,e){}const zY={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"},HY={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){Ld(s,e,n)}}function vr(t,e,n,i){if(et(t)){const s=ap(t,e,n,i);return s&&dd(s)&&s.catch(o=>{Ld(o,e,n)}),s}if(Me(t)){const s=[];for(let o=0;o<t.length;o++)s.push(vr(t[o],e,n,i));return s}}function Ld(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}}UY(t,n,s,i,r)}function UY(t,e,n,i=!0,s=!1){if(s)throw t;console.error(t)}const Bi=[];let va=-1;const tf=[];let lc=null,xh=0;const nI=Promise.resolve();let Y_=null;function ot(t){const e=Y_||nI;return t?e.then(this?t.bind(this):t):e}function jY(t){let e=va+1,n=Bi.length;for(;e<n;){const i=e+n>>>1,s=Bi[i],o=$g(s);o<t||o===t&&s.flags&2?e=i+1:n=i}return e}function x6(t){if(!(t.flags&1)){const e=$g(t),n=Bi[Bi.length-1];!n||!(t.flags&2)&&e>=$g(n)?Bi.push(t):Bi.splice(jY(e),0,t),t.flags|=1,sI()}}function sI(){Y_||(Y_=nI.then(iI))}function Sg(t){Me(t)?tf.push(...t):lc&&t.id===-1?lc.splice(xh+1,0,t):t.flags&1||(tf.push(t),t.flags|=1),sI()}function m9(t,e,n=va+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 q_(t){if(tf.length){const e=[...new Set(tf)].sort((n,i)=>$g(n)-$g(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 $g=t=>t.id==null?t.flags&2?-1:1/0:t.id;function iI(t){const e=Dt;try{for(va=0;va<Bi.length;va++){const n=Bi[va];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(;va<Bi.length;va++){const n=Bi[va];n&&(n.flags&=-2)}va=-1,Bi.length=0,q_(),Y_=null,(Bi.length||tf.length)&&iI()}}let Sh,Lv=[];function oI(t,e){var n,i;Sh=t,Sh?(Sh.enabled=!0,Lv.forEach(({event:s,args:o})=>Sh.emit(s,...o)),Lv=[]):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=>{oI(o,e)}),setTimeout(()=>{Sh||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Lv=[])},3e3)):Lv=[]}let li=null,bb=null;function Ag(t){const e=li;return li=t,bb=t&&t.type.__scopeId||null,e}function WY(t){bb=t}function YY(){bb=null}const qY=t=>w;function w(t,e=li,n){if(!e||t._n)return t;const i=(...s)=>{i._d&&Tg(-1);const o=Ag(e);let r;try{r=t(...s)}finally{Ag(o),i._d&&Tg(1)}return r};return i._n=!0,i._c=!0,i._d=!0,i}function Re(t,e){if(li===null)return t;const n=$1(li),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 ba(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(oi){let n=oi.provides;const i=oi.parent&&oi.parent.provides;i===n&&(n=oi.provides=Object.create(i)),n[t]=e}}function qe(t,e,n=!1){const i=pt();if(i||Xu){let s=Xu?Xu._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 rI(){return!!(pt()||Xu)}const aI=Symbol.for("v-scx"),lI=()=>qe(aI);function _l(t,e){return x1(t,null,e)}function GY(t,e){return x1(t,null,{flush:"post"})}function cI(t,e){return x1(t,null,{flush:"sync"})}function Te(t,e,n){return x1(t,e,n)}function x1(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=lI();c=f.__watcherHandles||(f.__watcherHandles=[])}else if(!l){const f=()=>{};return f.stop=Dt,f.resume=Dt,f.pause=Dt,f}}const u=oi;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():x6(f)}),a.augmentJob=f=>{e&&(f.flags|=4),d&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const h=VY(t,e,a);return Sf&&(c?c.push(h):l&&h()),h}function XY(t,e,n){const i=this.proxy,s=Ke(t)?t.includes(".")?uI(i,t):()=>i[t]:t.bind(i,i);let o;et(e)?o=e:(o=e.handler,n=e);const r=pd(this),a=x1(s,o.bind(i),n);return r(),a}function uI(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 dI=Symbol("_vte"),hI=t=>t.__isTeleport,Um=t=>t&&(t.disabled||t.disabled===""),g9=t=>t&&(t.defer||t.defer===""),v9=t=>typeof SVGElement<"u"&&t instanceof SVGElement,_9=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,pk=(t,e)=>{const n=t&&t.to;return Ke(n)?e?e(n):null:n},fI={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:y}}=c,b=Um(e.props);let{shapeFlag:k,children:C,dynamicChildren:$}=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=pk(e.props,p),L=pI(I,e,m,f);I&&(r!=="svg"&&v9(I)?r="svg":r!=="mathml"&&_9(I)&&(r="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(I),b||(P(I,L),x0(e,!1)))};b&&(P(n,M),x0(e,!0)),g9(e.props)?(e.el.__isMounted=!1,Es(()=>{T(),delete e.el.__isMounted},o)):T()}else{if(g9(e.props)&&t.el.__isMounted===!1){Es(()=>{fI.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=Um(t.props),I=T?n:M,L=T?S:P;if(r==="svg"||v9(M)?r="svg":(r==="mathml"||_9(M))&&(r="mathml"),$?(h(t.dynamicChildren,$,I,s,o,r,a),R6(t,e,!0)):l||d(t,e,I,L,s,o,r,a,!1),b)T?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):Ov(e,n,S,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const R=e.target=pk(e.props,p);R&&Ov(e,R,null,c,0)}else T&&Ov(e,M,P,c,1);x0(e,b)}},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||!Um(h);for(let p=0;p<a.length;p++){const m=a[p];i(m,e,n,f,!!m.dynamicChildren)}}},move:Ov,hydrate:KY};function Ov(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||Um(u))&&l&16)for(let h=0;h<c.length;h++)s(c[h],e,n,2);d&&i(a,e,n)}function KY(t,e,n,i,s,o,{o:{nextSibling:r,parentNode:a,querySelector:l,insert:c,createText:u}},d){function h(m,y,b,k){y.anchor=d(r(m),y,a(m),n,i,s,o),y.targetStart=b,y.targetAnchor=k}const f=e.target=pk(e.props,l),p=Um(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 y=m;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")e.targetStart=y;else if(y.data==="teleport anchor"){e.targetAnchor=y,f._lpa=e.targetAnchor&&r(e.targetAnchor);break}}y=r(y)}e.targetAnchor||pI(f,e,u,c),d(m&&r(m),e,f,n,i,s,o)}x0(e,p)}else p&&e.shapeFlag&16&&h(t,e,t,r(t));return e.anchor&&r(e.anchor)}const ea=fI;function x0(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 pI(t,e,n,i){const s=e.targetStart=n(""),o=e.targetAnchor=n("");return s[dI]=o,t&&(i(s,t),i(o,t)),o}const Ja=Symbol("_leaveCb"),Dv=Symbol("_enterCb");function S6(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ft(()=>{t.isMounted=!0}),wn(()=>{t.isUnmounting=!0}),t}const Zo=[Function,Array],$6={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},mI=t=>{const e=t.subTree;return e.component?mI(e.component):e},ZY={name:"BaseTransition",props:$6,setup(t,{slots:e}){const n=pt(),i=S6();return()=>{const s=e.default&&wb(e.default(),!0);if(!s||!s.length)return;const o=gI(s),r=an(t),{mode:a}=r;if(i.isLeaving)return lw(o);const l=y9(o);if(!l)return lw(o);let c=xf(l,r,i,n,d=>c=d);l.type!==Zn&&yl(l,c);let u=n.subTree&&y9(n.subTree);if(u&&u.type!==Zn&&!Ir(u,l)&&mI(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},lw(o);a==="in-out"&&l.type!==Zn?d.delayLeave=(h,f,p)=>{const m=_I(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 gI(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==Zn){e=n;break}}return e}const vI=ZY;function _I(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:y,onAppear:b,onAfterAppear:k,onAppearCancelled:C}=e,$=String(t.key),S=_I(n,t),M=(I,L)=>{I&&vr(I,i,9,L)},P=(I,L)=>{const R=L[1];M(I,L),Me(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=y||l;else return;I[Ja]&&I[Ja](!0);const R=S[$];R&&Ir(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=b||c,R=k||u,V=C||d;else return;let B=!1;const F=I[Dv]=z=>{B||(B=!0,z?M(V,[I]):M(R,[I]),T.delayedLeave&&T.delayedLeave(),I[Dv]=void 0)};L?P(L,[I,F]):F()},leave(I,L){const R=String(t.key);if(I[Dv]&&I[Dv](!0),n.isUnmounting)return L();M(h,[I]);let V=!1;const B=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,B]):B()},clone(I){const L=xf(I,e,n,i,s);return s&&s(L),L}};return T}function lw(t){if(S1(t))return t=_r(t),t.children=null,t}function y9(t){if(!S1(t))return hI(t.type)&&t.children?gI(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 wb(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===ee?(r.patchFlag&128&&s++,i=i.concat(wb(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 JY(){const t=pt();return t?(t.appContext.config.idPrefix||"v")+"-"+t.ids[0]+t.ids[1]++:""}function A6(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function QY(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 G_=new WeakMap;function nf(t,e,n,i,s=!1){if(Me(t)){t.forEach((p,m)=>nf(p,e&&(Me(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?$1(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(b9(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 y=()=>{if(t.f){const b=p?f(l)?d[l]:u[l]:l.value;if(s)Me(b)&&v6(b,o);else if(Me(b))b.includes(o)||b.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 b=()=>{y(),G_.delete(t)};b.id=-1,G_.set(t,b),Es(b,n)}else b9(t),y()}}}function b9(t){const e=G_.get(t);e&&(e.flags|=8,G_.delete(t))}let w9=!1;const ih=()=>{w9||(console.error("Hydration completed but contains mismatches."),w9=!0)},eq=t=>t.namespaceURI.includes("svg")&&t.tagName!=="foreignObject",tq=t=>t.namespaceURI.includes("MathML"),Rv=t=>{if(t.nodeType===1){if(eq(t))return"svg";if(tq(t))return"mathml"}},Gh=t=>t.nodeType===8;function nq(t){const{mt:e,p:n,o:{patchProp:i,createText:s,nextSibling:o,parentNode:r,remove:a,insert:l,createComment:c}}=t,u=(C,$)=>{if(!$.hasChildNodes()){n(null,C,$),q_(),$._vnode=C;return}d($.firstChild,C,null,null,null),q_(),$._vnode=C},d=(C,$,S,M,P,T=!1)=>{T=T||!!$.dynamicChildren;const I=Gh(C)&&C.data==="[",L=()=>m(C,$,S,M,P,I),{type:R,ref:V,shapeFlag:B,patchFlag:F}=$;let z=C.nodeType;$.el=C,F===-2&&(T=!1,$.dynamicChildren=null);let U=null;switch(R){case xa:z!==3?$.children===""?(l($.el=s(""),r(C),C),U=C):U=L():(C.data!==$.children&&(ih(),C.data=$.children),U=o(C));break;case Zn:k(C)?(U=o(C),b($.el=C.content.firstChild,C,S)):z!==8||I?U=L():U=o(C);break;case Ku:if(I&&(C=o(C),z=C.nodeType),z===1||z===3){U=C;const G=!$.children.length;for(let K=0;K<$.staticCount;K++)G&&($.children+=U.nodeType===1?U.outerHTML:U.data),K===$.staticCount-1&&($.anchor=U),U=o(U);return I?o(U):U}else L();break;case ee:I?U=p(C,$,S,M,P,T):U=L();break;default:if(B&1)(z!==1||$.type.toLowerCase()!==C.tagName.toLowerCase())&&!k(C)?U=L():U=h(C,$,S,M,P,T);else if(B&6){$.slotScopeIds=P;const G=r(C);if(I?U=y(C):Gh(C)&&C.data==="teleport start"?U=y(C,C.data,"teleport end"):U=o(C),e($,G,null,S,M,Rv(G),T),dl($)&&!$.type.__asyncResolved){let K;I?(K=_(ee),K.anchor=U?U.previousSibling:G.lastChild):K=C.nodeType===3?N(""):_("div"),K.el=C,$.component.subTree=K}}else B&64?z!==8?U=L():U=$.type.hydrate(C,$,S,M,P,T,t,f):B&128&&(U=$.type.hydrate(C,$,S,M,Rv(r(C)),P,T,t,d))}return V!=null&&nf(V,null,M,$),U},h=(C,$,S,M,P,T)=>{T=T||!!$.dynamicChildren;const{type:I,props:L,patchFlag:R,shapeFlag:V,dirs:B,transition:F}=$,z=I==="input"||I==="option";if(z||R!==-1){B&&ba($,null,S,"created");let U=!1;if(k(C)){U=zI(null,F)&&S&&S.vnode.props&&S.vnode.props.appear;const K=C.content.firstChild;if(U){const X=K.getAttribute("class");X&&(K.$cls=X),F.beforeEnter(K)}b(K,C,S),$.el=C=K}if(V&16&&!(L&&(L.innerHTML||L.textContent))){let K=f(C.firstChild,$,C,S,M,P,T);for(;K;){Vv(C,1)||ih();const X=K;K=K.nextSibling,a(X)}}else if(V&8){let K=$.children;K[0]===`
14 `&&(C.tagName==="PRE"||C.tagName==="TEXTAREA")&&(K=K.slice(1));const{textContent:X}=C;X!==K&&X!==K.replace(/\r\n|\r/g,`
15 `)&&(Vv(C,0)||ih(),C.textContent=$.children)}if(L){if(z||!T||R&48){const K=C.tagName.includes("-");for(const X in L)(z&&(X.endsWith("value")||X==="indeterminate")||Pd(X)&&!ul(X)||X[0]==="."||K&&!ul(X))&&i(C,X,null,L[X],void 0,S)}else if(L.onClick)i(C,"onClick",null,L.onClick,void 0,S);else if(R&4&&Fr(L.style))for(const K in L.style)L.style[K]}let G;(G=L&&L.onVnodeBeforeMount)&&oo(G,S,$),B&&ba($,null,S,"beforeMount"),((G=L&&L.onVnodeMounted)||B||U)&&WI(()=>{G&&oo(G,S,$),U&&F.enter(C),B&&ba($,null,S,"mounted")},M)}return C.nextSibling},f=(C,$,S,M,P,T,I)=>{I=I||!!$.dynamicChildren;const L=$.children,R=L.length;for(let V=0;V<R;V++){const B=I?L[V]:L[V]=ro(L[V]),F=B.type===xa;C?(F&&!I&&V+1<R&&ro(L[V+1]).type===xa&&(l(s(C.data.slice(B.children.length)),S,o(C)),C.data=B.children),C=d(C,B,M,P,T,I)):F&&!B.children?l(B.el=s(""),S):(Vv(S,1)||ih(),n(null,B,S,null,M,P,Rv(S),T))}return C},p=(C,$,S,M,P,T)=>{const{slotScopeIds:I}=$;I&&(P=P?P.concat(I):I);const L=r(C),R=f(o(C),$,L,S,M,P,T);return R&&Gh(R)&&R.data==="]"?o($.anchor=R):(ih(),l($.anchor=c("]"),L,R),R)},m=(C,$,S,M,P,T)=>{if(Vv(C.parentElement,1)||ih(),$.el=null,T){const R=y(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,$,L,I,S,M,Rv(L),P),S&&(S.vnode.el=$.el,$b(S,$.el)),I},y=(C,$="[",S="]")=>{let M=0;for(;C;)if(C=o(C),C&&Gh(C)&&(C.data===$&&M++,C.data===S)){if(M===0)return o(C);M--}return C},b=(C,$,S)=>{const M=$.parentNode;M&&M.replaceChild(C,$);let P=S;for(;P;)P.vnode.el===$&&(P.vnode.el=P.subTree.el=C),P=P.parent},k=C=>C.nodeType===1&&C.tagName==="TEMPLATE";return[u,d]}const k9="data-allow-mismatch",sq={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Vv(t,e){if(e===0||e===1)for(;t&&!t.hasAttribute(k9);)t=t.parentElement;const n=t&&t.getAttribute(k9);if(n==null)return!1;if(n==="")return!0;{const i=n.split(",");return e===0&&i.includes("children")?!0:i.includes(sq[e])}}const iq=db().requestIdleCallback||(t=>setTimeout(t,1)),oq=db().cancelIdleCallback||(t=>clearTimeout(t)),rq=(t=1e4)=>e=>{const n=iq(e,{timeout:t});return()=>oq(n)};function aq(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 lq=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(aq(s))return e(),i.disconnect(),!1;i.observe(s)}}),()=>i.disconnect()},cq=t=>e=>{if(t){const n=matchMedia(t);if(n.matches)e();else return n.addEventListener("change",e,{once:!0}),()=>n.removeEventListener("change",e)}},uq=(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 dq(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 hq(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((y,b)=>{l(m,()=>y(h()),()=>b(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,y){let b=!1;(m.bu||(m.bu=[])).push(()=>b=!0);const k=()=>{b||y()},C=o?()=>{const $=o(k,S=>dq(p,S));$&&(m.bum||(m.bum=[])).push($)}:k;u?C():f().then(()=>!m.isUnmounted&&C())},get __asyncResolved(){return u},setup(){const p=oi;if(A6(p),u)return()=>Fv(u,p);const m=C=>{c=null,Ld(C,p,13,!i)};if(a&&p.suspense||Sf)return f().then(C=>()=>Fv(C,p)).catch(C=>(m(C),()=>i?_(i,{error:C}):null));const y=J(!1),b=J(),k=J(!!s);return s&&setTimeout(()=>{k.value=!1},s),r!=null&&setTimeout(()=>{if(!y.value&&!b.value){const C=new Error(`Async component timed out after ${r}ms.`);m(C),b.value=C}},r),f().then(()=>{y.value=!0,p.parent&&S1(p.parent.vnode)&&p.parent.update()}).catch(C=>{m(C),b.value=C}),()=>{if(y.value&&u)return Fv(u,p);if(b.value&&i)return _(i,{error:b.value});if(n&&!k.value)return Fv(n,p)}}})}function Fv(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 S1=t=>t.type.__isKeepAlive,fq={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,$,S,M)=>{const P=k.component;c(k,C,$,0,a),l(P.vnode,k,C,$,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;K_(C.m),K_(C.a),c(k,h,null,1,a),Es(()=>{C.da&&Qh(C.da);const $=k.props&&k.props.onVnodeUnmounted;$&&oo($,C.parent,k),C.isDeactivated=!0},a)};function f(k){cw(k),u(k,n,a,!0)}function p(k){s.forEach((C,$)=>{const S=Sk(dl(C)?C.type.__asyncResolved||{}:C.type);S&&!k(S)&&m($)})}function m(k){const C=s.get(k);C&&(!r||!Ir(C,r))?f(C):r&&cw(r),s.delete(k),o.delete(k)}Te(()=>[t.include,t.exclude],([k,C])=>{k&&p($=>em(k,$)),C&&p($=>!em(C,$))},{flush:"post",deep:!0});let y=null;const b=()=>{y!=null&&(Z_(n.subTree.type)?Es(()=>{s.set(y,Nv(n.subTree))},n.subTree.suspense):s.set(y,Nv(n.subTree)))};return Ft(b),xl(b),wn(()=>{s.forEach(k=>{const{subTree:C,suspense:$}=n,S=Nv(C);if(k.type===S.type&&k.key===S.key){cw(S);const M=S.component.da;M&&Es(M,$);return}f(k)})}),()=>{if(y=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 $=Nv(C);if($.type===Zn)return r=null,$;const S=$.type,M=Sk(dl($)?$.type.__asyncResolved||{}:S),{include:P,exclude:T,max:I}=t;if(P&&(!M||!em(P,M))||T&&M&&em(T,M))return $.shapeFlag&=-257,r=$,C;const L=$.key==null?S:$.key,R=s.get(L);return $.el&&($=_r($),C.shapeFlag&128&&(C.ssContent=$)),y=L,R?($.el=R.el,$.component=R.component,$.transition&&yl($,$.transition),$.shapeFlag|=512,o.delete(L),o.add(L)):(o.add(L),I&&o.size>parseInt(I,10)&&m(o.values().next().value)),$.shapeFlag|=256,r=$,Z_(C.type)?C:$}}},pq=fq;function em(t,e){return Me(t)?t.some(n=>em(n,e)):Ke(t)?t.split(",").includes(e):RW(t)?(t.lastIndex=0,t.test(e)):!1}function E6(t,e){yI(t,"a",e)}function M6(t,e){yI(t,"da",e)}function yI(t,e,n=oi){const i=t.__wdc||(t.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(kb(e,i,n),n){let s=n.parent;for(;s&&s.parent;)S1(s.parent.vnode)&&mq(i,e,n,s),s=s.parent}}function mq(t,e,n,i){const s=kb(e,t,i,!0);Sl(()=>{v6(i[e],s)},n)}function cw(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function Nv(t){return t.shapeFlag&128?t.ssContent:t}function kb(t,e,n=oi,i=!1){if(n){const s=n[t]||(n[t]=[]),o=e.__weh||(e.__weh=(...r)=>{gl();const a=pd(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=oi)=>{(!Sf||t==="sp")&&kb(t,(...i)=>e(...i),n)},Od=Cl("bm"),Ft=Cl("m"),Cb=Cl("bu"),xl=Cl("u"),wn=Cl("bum"),Sl=Cl("um"),bI=Cl("sp"),wI=Cl("rtg"),kI=Cl("rtc");function CI(t,e=oi){kb("ec",t,e)}const T6="components",gq="directives";function H(t,e){return P6(T6,t,!0,e)||t}const xI=Symbol.for("v-ndc");function Ct(t){return Ke(t)?P6(T6,t,!1)||t:t||xI}function xt(t){return P6(gq,t)}function P6(t,e,n=!0,i=!1){const s=li||oi;if(s){const o=s.type;if(t===T6){const a=Sk(o,!1);if(a&&(a===e||a===Un(e)||a===Gc(Un(e))))return o}const r=C9(s[t]||o[t],e)||C9(s.appContext[t],e);return!r&&i?o:r}}function C9(t,e){return t&&(t[e]||t[Un(e)]||t[Gc(Un(e))])}function we(t,e,n,i){let s;const o=n&&n[i],r=Me(t);if(r||Ke(t)){const a=r&&Fr(t);let l=!1,c=!1;a&&(l=!uo(t),c=Aa(t),t=vb(t)),s=new Array(t.length);for(let u=0,d=t.length;u<d;u++)s[u]=e(l?c?Cf(Gr(t[u])):Gr(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(Me(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(li.ce||li.parent&&dl(li.parent)&&li.parent.ce){const c=Object.keys(n).length>0;return e!=="default"&&(n.name=e),v(),D(ee,null,[_("slot",n,i&&i())],c?-2:64)}let o=t[e];o&&o._c&&(o._d=!1),v();const r=o&&I6(o(n)),a=n.key||r&&r.key,l=D(ee,{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 I6(t){return t.some(e=>is(e)?!(e.type===Zn||e.type===ee&&!I6(e.children)):!0)?t:null}function xb(t,e){const n={};for(const i in t)n[e&&/[A-Z]/.test(i)?`on:${i}`:qu(i)]=t[i];return n}const mk=t=>t?KI(t)?$1(t):mk(t.parent):null,jm=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=>mk(t.parent),$root:t=>mk(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>L6(t),$forceUpdate:t=>t.f||(t.f=()=>{x6(t.update)}),$nextTick:t=>t.n||(t.n=ot.bind(t.proxy)),$watch:t=>XY.bind(t)}),uw=(t,e)=>t!==pn&&!t.__isScriptSetup&&zt(t,e),gk={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(uw(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];vk&&(r[e]=0)}}const c=jm[e];let u,d;if(c)return e==="$attrs"&&$i(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 uw(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)||uw(e,a)||zt(o,a)||zt(i,a)||zt(jm,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)}},vq=cn({},gk,{get(t,e){if(e!==Symbol.unscopables)return gk.get(t,e,t)},has(t,e){return e[0]!=="_"&&!UW(e)}});function _q(){return null}function yq(){return null}function bq(t){}function wq(t){}function kq(){return null}function Cq(){}function xq(t,e){return null}function mi(){return SI().slots}function Dd(){return SI().attrs}function SI(t){const e=pt();return e.setupContext||(e.setupContext=eL(e))}function Eg(t){return Me(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function Sq(t,e){const n=Eg(t);for(const i in e){if(i.startsWith("__skip"))continue;let s=n[i];s?Me(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 $q(t,e){return!t||!e?t||e:Me(t)&&Me(e)?t.concat(e):cn({},Eg(t),Eg(e))}function Aq(t,e){const n={};for(const i in t)e.includes(i)||Object.defineProperty(n,i,{enumerable:!0,get:()=>t[i]});return n}function Eq(t){const e=pt();let n=t();return kk(),dd(n)&&(n=n.catch(i=>{throw pd(e),i})),[n,()=>pd(e)]}let vk=!0;function Mq(t){const e=L6(t),n=t.proxy,i=t.ctx;vk=!1,e.beforeCreate&&x9(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:y,beforeDestroy:b,beforeUnmount:k,destroyed:C,unmounted:$,render:S,renderTracked:M,renderTriggered:P,errorCaptured:T,serverPrefetch:I,expose:L,inheritAttrs:R,components:V,directives:B,filters:F}=e;if(c&&Tq(c,i,null),r)for(const G in r){const K=r[G];et(K)&&(i[G]=K.bind(n))}if(s){const G=s.call(n,n);yt(G)&&(t.data=In(G))}if(vk=!0,o)for(const G in o){const K=o[G],X=et(K)?K.bind(n,n):et(K.get)?K.get.bind(n,n):Dt,W=!et(K)&&et(K.set)?K.set.bind(n):Dt,Q=Y({get:X,set:W});Object.defineProperty(i,G,{enumerable:!0,configurable:!0,get:()=>Q.value,set:ne=>Q.value=ne})}if(a)for(const G in a)$I(a[G],i,n,G);if(l){const G=et(l)?l.call(n):l;Reflect.ownKeys(G).forEach(K=>{Pt(K,G[K])})}u&&x9(u,t,"c");function U(G,K){Me(K)?K.forEach(X=>G(X.bind(n))):K&&G(K.bind(n))}if(U(Od,d),U(Ft,h),U(Cb,f),U(xl,p),U(E6,m),U(M6,y),U(CI,T),U(kI,M),U(wI,P),U(wn,k),U(Sl,$),U(bI,I),Me(L))if(L.length){const G=t.exposed||(t.exposed={});L.forEach(K=>{Object.defineProperty(G,K,{get:()=>n[K],set:X=>n[K]=X,enumerable:!0})})}else t.exposed||(t.exposed={});S&&t.render===Dt&&(t.render=S),R!=null&&(t.inheritAttrs=R),V&&(t.components=V),B&&(t.directives=B),I&&A6(t)}function Tq(t,e,n=Dt){Me(t)&&(t=_k(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 x9(t,e,n){vr(Me(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,n)}function $I(t,e,n,i){let s=i.includes(".")?uI(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(Me(t))t.forEach(o=>$I(o,e,n,i));else{const o=et(t.handler)?t.handler.bind(n):e[t.handler];et(o)&&Te(s,o,t)}}function L6(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=>X_(l,c,r,!0)),X_(l,e,r)),yt(e)&&o.set(e,l),l}function X_(t,e,n,i=!1){const{mixins:s,extends:o}=e;o&&X_(t,o,n,!0),s&&s.forEach(r=>X_(t,r,n,!0));for(const r in e)if(!(i&&r==="expose")){const a=Pq[r]||n&&n[r];t[r]=a?a(t[r],e[r]):e[r]}return t}const Pq={data:S9,props:$9,emits:$9,methods:tm,computed:tm,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:tm,directives:tm,watch:Lq,provide:S9,inject:Iq};function S9(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 Iq(t,e){return tm(_k(t),_k(e))}function _k(t){if(Me(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 tm(t,e){return t?cn(Object.create(null),t,e):e}function $9(t,e){return t?Me(t)&&Me(e)?[...new Set([...t,...e])]:cn(Object.create(null),Eg(t),Eg(e??{})):e}function Lq(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 AI(){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 Oq=0;function Dq(t,e){return function(i,s=null){et(i)||(i=cn({},i)),s!=null&&!yt(s)&&(s=null);const o=AI(),r=new WeakSet,a=[];let l=!1;const c=o.app={_uid:Oq++,_component:i,_props:s,_container:null,_context:o,_instance:null,version:nL,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,$1(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=Xu;Xu=c;try{return u()}finally{Xu=d}}};return c}}let Xu=null;function Rq(t,e,n=pn){const i=pt(),s=Un(e),o=zi(e),r=EI(t,s),a=JP((l,c)=>{let u,d=pn,h;return cI(()=>{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 EI=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Un(e)}Modifiers`]||t[`${zi(e)}Modifiers`];function Vq(t,e,...n){if(t.isUnmounted)return;const i=t.vnode.props||pn;let s=n;const o=e.startsWith("update:"),r=o&&EI(i,e.slice(7));r&&(r.trim&&(s=n.map(u=>Ke(u)?u.trim():u)),r.number&&(s=n.map(ub)));let a,l=i[a=qu(e)]||i[a=qu(Un(e))];!l&&o&&(l=i[a=qu(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 Fq=new WeakMap;function MI(t,e,n=!1){const i=n?Fq: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=MI(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):(Me(o)?o.forEach(l=>r[l]=null):cn(r,o),yt(t)&&i.set(t,r),r)}function Sb(t,e){return!t||!Pd(e)?!1:(e=e.slice(2).replace(/Once$/,""),zt(t,e[0].toLowerCase()+e.slice(1))||zt(t,zi(e))||zt(t,e))}function S0(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,y=Ag(t);let b,k;try{if(n.shapeFlag&4){const $=s||i,S=$;b=ro(c.call(S,$,u,d,f,h,p)),k=a}else{const $=e;b=ro($.length>1?$(d,{attrs:a,slots:r,emit:l}):$(d,null)),k=e.props?a:Bq(a)}}catch($){Wm.length=0,Ld($,t,1),b=_(Zn)}let C=b;if(k&&m!==!1){const $=Object.keys(k),{shapeFlag:S}=C;$.length&&S&7&&(o&&$.some(g6)&&(k=zq(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),b=C,Ag(y),b}function Nq(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 Bq=t=>{let e;for(const n in t)(n==="class"||n==="style"||Pd(n))&&((e||(e={}))[n]=t[n]);return e},zq=(t,e)=>{const n={};for(const i in t)(!g6(i)||!(i.slice(9)in e))&&(n[i]=t[i]);return n};function Hq(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?A9(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]&&!Sb(c,h))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:i===r?!1:i?r?A9(i,r,c):!0:!!r;return!1}function A9(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]&&!Sb(n,o))return!0}return!1}function $b({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 TI={},PI=()=>Object.create(TI),II=t=>Object.getPrototypeOf(t)===TI;function Uq(t,e,n,i=!1){const s={},o=PI();t.propsDefaults=Object.create(null),LI(t,e,s,o);for(const r in t.propsOptions[0])r in s||(s[r]=void 0);n?t.props=i?s:k6(s):t.type.props?t.props=s:t.props=o,t.attrs=o}function jq(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(Sb(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]=yk(l,a,p,f,t,!1)}else f!==o[h]&&(o[h]=f,c=!0)}}}else{LI(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]=yk(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 LI(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:Sb(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]=yk(s,l,d,c[d],t,!zt(c,d))}}return r}function yk(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=pd(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 Wq=new WeakMap;function OI(t,e,n=!1){const i=n?Wq: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]=OI(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(Me(o))for(let u=0;u<o.length;u++){const d=Un(o[u]);E9(d)&&(r[d]=pn)}else if(o)for(const u in o){const d=Un(u);if(E9(d)){const h=o[u],f=r[d]=Me(h)||et(h)?{type:h}:cn({},h),p=f.type;let m=!1,y=!0;if(Me(p))for(let b=0;b<p.length;++b){const k=p[b],C=et(k)&&k.name;if(C==="Boolean"){m=!0;break}else C==="String"&&(y=!1)}else m=et(p)&&p.name==="Boolean";f[0]=m,f[1]=y,(m||zt(f,"default"))&&a.push(d)}}const c=[r,a];return yt(t)&&i.set(t,c),c}function E9(t){return t[0]!=="$"&&!ul(t)}const O6=t=>t==="_"||t==="_ctx"||t==="$stable",D6=t=>Me(t)?t.map(ro):[ro(t)],Yq=(t,e,n)=>{if(e._n)return e;const i=w((...s)=>D6(e(...s)),n);return i._c=!1,i},DI=(t,e,n)=>{const i=t._ctx;for(const s in t){if(O6(s))continue;const o=t[s];if(et(o))e[s]=Yq(s,o,i);else if(o!=null){const r=D6(o);e[s]=()=>r}}},RI=(t,e)=>{const n=D6(e);t.slots.default=()=>n},VI=(t,e,n)=>{for(const i in e)(n||!O6(i))&&(t[i]=e[i])},qq=(t,e,n)=>{const i=t.slots=PI();if(t.vnode.shapeFlag&32){const s=e._;s?(VI(i,e,n),n&&PP(i,"_",s,!0)):DI(e,i)}else e&&RI(t,e)},Gq=(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:VI(s,e,n):(o=!e.$stable,DI(e,s)),r=e}else e&&(RI(t,e),r={default:1});if(o)for(const a in s)!O6(a)&&r[a]==null&&delete s[a]},Es=WI;function FI(t){return BI(t)}function NI(t){return BI(t,nq)}function BI(t,e){const n=db();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,ze=!!se.dynamicChildren)=>{if(te===se)return;te&&!Ir(te,se)&&($e=oe(te),ne(te,Se,Le,!0),te=null),se.patchFlag===-2&&(ze=!1,se.dynamicChildren=null);const{type:Ae,ref:Ze,shapeFlag:Ye}=se;switch(Ae){case xa:y(te,se,me,$e);break;case Zn:b(te,se,me,$e);break;case Ku:te==null&&k(se,me,$e,We);break;case ee:V(te,se,me,$e,Se,Le,We,Fe,ze);break;default:Ye&1?S(te,se,me,$e,Se,Le,We,Fe,ze):Ye&6?B(te,se,me,$e,Se,Le,We,Fe,ze):(Ye&64||Ye&128)&&Ae.process(te,se,me,$e,Se,Le,We,Fe,ze,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)},y=(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)}},b=(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)},$=({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,ze)=>{if(se.type==="svg"?We="svg":se.type==="math"&&(We="mathml"),te==null)M(se,me,$e,Se,Le,We,Fe,ze);else{const Ae=te.el&&te.el._isVueCE?te.el:null;try{Ae&&Ae._beginPatch(),I(te,se,Se,Le,We,Fe,ze)}finally{Ae&&Ae._endPatch()}}},M=(te,se,me,$e,Se,Le,We,Fe)=>{let ze,Ae;const{props:Ze,shapeFlag:Ye,transition:it,dirs:ye}=te;if(ze=te.el=r(te.type,Le,Ze&&Ze.is,Ze),Ye&8?u(ze,te.children):Ye&16&&T(te.children,ze,null,$e,Se,dw(te,Le),We,Fe),ye&&ba(te,null,$e,"created"),P(ze,te,te.scopeId,We,$e),Ze){for(const Pe in Ze)Pe!=="value"&&!ul(Pe)&&o(ze,Pe,null,Ze[Pe],Le,$e);"value"in Ze&&o(ze,"value",null,Ze.value,Le),(Ae=Ze.onVnodeBeforeMount)&&oo(Ae,$e,te)}ye&&ba(te,null,$e,"beforeMount");const ve=zI(Se,it);ve&&it.beforeEnter(ze),i(ze,se,me),((Ae=Ze&&Ze.onVnodeMounted)||ve||ye)&&Es(()=>{Ae&&oo(Ae,$e,te),ve&&it.enter(ze),ye&&ba(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||Z_(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,ze=0)=>{for(let Ae=ze;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:ze,dynamicChildren:Ae,dirs:Ze}=se;ze|=te.patchFlag&16;const Ye=te.props||pn,it=se.props||pn;let ye;if(me&&fu(me,!1),(ye=it.onVnodeBeforeUpdate)&&oo(ye,me,se,te),Ze&&ba(se,te,me,"beforeUpdate"),me&&fu(me,!0),(Ye.innerHTML&&it.innerHTML==null||Ye.textContent&&it.textContent==null)&&u(Fe,""),Ae?L(te.dynamicChildren,Ae,Fe,me,$e,dw(se,Se),Le):We||K(te,se,Fe,null,me,$e,dw(se,Se),Le,!1),ze>0){if(ze&16)R(Fe,Ye,it,me,Se);else if(ze&2&&Ye.class!==it.class&&o(Fe,"class",null,it.class,Se),ze&4&&o(Fe,"style",Ye.style,it.style,Se),ze&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)}}ze&1&&te.children!==se.children&&u(Fe,se.children)}else!We&&Ae==null&&R(Fe,Ye,it,me,Se);((ye=it.onVnodeUpdated)||Ze)&&Es(()=>{ye&&oo(ye,me,se,te),Ze&&ba(se,te,me,"updated")},$e)},L=(te,se,me,$e,Se,Le,We)=>{for(let Fe=0;Fe<se.length;Fe++){const ze=te[Fe],Ae=se[Fe],Ze=ze.el&&(ze.type===ee||!Ir(ze,Ae)||ze.shapeFlag&198)?d(ze.el):me;m(ze,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,ze)=>{const Ae=se.el=te?te.el:a(""),Ze=se.anchor=te?te.anchor:a("");let{patchFlag:Ye,dynamicChildren:it,slotScopeIds:ye}=se;ye&&(Fe=Fe?Fe.concat(ye):ye),te==null?(i(Ae,me,$e),i(Ze,me,$e),T(se.children||[],me,Ze,Se,Le,We,Fe,ze)):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)&&R6(te,se,!0)):K(te,se,me,Ze,Se,Le,We,Fe,ze)},B=(te,se,me,$e,Se,Le,We,Fe,ze)=>{se.slotScopeIds=Fe,te==null?se.shapeFlag&512?Se.ctx.activate(se,me,$e,We,ze):F(se,me,$e,Se,Le,We,ze):z(te,se,ze)},F=(te,se,me,$e,Se,Le,We)=>{const Fe=te.component=XI(te,$e,Se);if(S1(te)&&(Fe.ctx.renderer=re),ZI(Fe,!1,We),Fe.asyncDep){if(Se&&Se.registerDep(Fe,U,We),!te.el){const ze=Fe.subTree=_(Zn);b(null,ze,se,me),te.placeholder=ze.el}}else U(Fe,te,se,me,Se,Le,We)},z=(te,se,me)=>{const $e=se.component=te.component;if(Hq(te,se,me))if($e.asyncDep&&!$e.asyncResolved){G($e,se,me);return}else $e.next=se,$e.update();else se.el=te.el,$e.vnode=se},U=(te,se,me,$e,Se,Le,We)=>{const Fe=()=>{if(te.isMounted){let{next:Ye,bu:it,u:ye,parent:ve,vnode:Pe}=te;{const dt=HI(te);if(dt){Ye&&(Ye.el=Pe.el,G(te,Ye,We)),dt.asyncDep.then(()=>{te.isUnmounted||Fe()});return}}let Ie=Ye,_t;fu(te,!1),Ye?(Ye.el=Pe.el,G(te,Ye,We)):Ye=Pe,it&&Qh(it),(_t=Ye.props&&Ye.props.onVnodeBeforeUpdate)&&oo(_t,ve,Ye,Pe),fu(te,!0);const Lt=S0(te),Je=te.subTree;te.subTree=Lt,m(Je,Lt,d(Je.el),oe(Je),te,Se,Le),Ye.el=Lt.el,Ie===null&&$b(te,Lt.el),ye&&Es(ye,Se),(_t=Ye.props&&Ye.props.onVnodeUpdated)&&Es(()=>oo(_t,ve,Ye,Pe),Se)}else{let Ye;const{el:it,props:ye}=se,{bm:ve,m:Pe,parent:Ie,root:_t,type:Lt}=te,Je=dl(se);if(fu(te,!1),ve&&Qh(ve),!Je&&(Ye=ye&&ye.onVnodeBeforeMount)&&oo(Ye,Ie,se),fu(te,!0),it&&je){const dt=()=>{te.subTree=S0(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=S0(te);m(null,dt,me,$e,te,Se,Le),se.el=dt.el}if(Pe&&Es(Pe,Se),!Je&&(Ye=ye&&ye.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 ze=te.effect=new kg(Fe);te.scope.off();const Ae=te.update=ze.run.bind(ze),Ze=te.job=ze.runIfDirty.bind(ze);Ze.i=te,Ze.id=te.uid,ze.scheduler=()=>x6(Ze),fu(te,!0),Ae()},G=(te,se,me)=>{se.component=te;const $e=te.vnode.props;te.vnode=se,te.next=null,jq(te,se.props,$e,me),Gq(te,se.children,me),gl(),m9(te),vl()},K=(te,se,me,$e,Se,Le,We,Fe,ze=!1)=>{const Ae=te&&te.children,Ze=te?te.shapeFlag:0,Ye=se.children,{patchFlag:it,shapeFlag:ye}=se;if(it>0){if(it&128){W(Ae,Ye,me,$e,Se,Le,We,Fe,ze);return}else if(it&256){X(Ae,Ye,me,$e,Se,Le,We,Fe,ze);return}}ye&8?(Ze&16&&Ce(Ae,Se,Le),Ye!==Ae&&u(me,Ye)):Ze&16?ye&16?W(Ae,Ye,me,$e,Se,Le,We,Fe,ze):Ce(Ae,Se,Le,!0):(Ze&8&&u(me,""),ye&16&&T(Ye,me,$e,Se,Le,We,Fe,ze))},X=(te,se,me,$e,Se,Le,We,Fe,ze)=>{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 ye=se[it]=ze?cc(se[it]):ro(se[it]);m(te[it],ye,me,null,Se,Le,We,Fe,ze)}Ae>Ze?Ce(te,Se,Le,!0,!1,Ye):T(se,me,$e,Se,Le,We,Fe,ze,Ye)},W=(te,se,me,$e,Se,Le,We,Fe,ze)=>{let Ae=0;const Ze=se.length;let Ye=te.length-1,it=Ze-1;for(;Ae<=Ye&&Ae<=it;){const ye=te[Ae],ve=se[Ae]=ze?cc(se[Ae]):ro(se[Ae]);if(Ir(ye,ve))m(ye,ve,me,null,Se,Le,We,Fe,ze);else break;Ae++}for(;Ae<=Ye&&Ae<=it;){const ye=te[Ye],ve=se[it]=ze?cc(se[it]):ro(se[it]);if(Ir(ye,ve))m(ye,ve,me,null,Se,Le,We,Fe,ze);else break;Ye--,it--}if(Ae>Ye){if(Ae<=it){const ye=it+1,ve=ye<Ze?se[ye].el:$e;for(;Ae<=it;)m(null,se[Ae]=ze?cc(se[Ae]):ro(se[Ae]),me,ve,Se,Le,We,Fe,ze),Ae++}}else if(Ae>it)for(;Ae<=Ye;)ne(te[Ae],Se,Le,!0),Ae++;else{const ye=Ae,ve=Ae,Pe=new Map;for(Ae=ve;Ae<=it;Ae++){const Oe=se[Ae]=ze?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=ye;Ae<=Ye;Ae++){const Oe=te[Ae];if(_t>=Lt){ne(Oe,Se,Le,!0);continue}let ce;if(Oe.key!=null)ce=Pe.get(Oe.key);else for(Ie=ve;Ie<=it;Ie++)if(mt[Ie-ve]===0&&Ir(Oe,se[Ie])){ce=Ie;break}ce===void 0?ne(Oe,Se,Le,!0):(mt[ce-ve]=Ae+1,ce>=dt?dt=ce:Je=!0,m(Oe,se[ce],me,null,Se,Le,We,Fe,ze),_t++)}const _e=Je?Xq(mt):Zh;for(Ie=_e.length-1,Ae=Lt-1;Ae>=0;Ae--){const Oe=ve+Ae,ce=se[Oe],De=se[Oe+1],gt=Oe+1<Ze?De.el||UI(De):$e;mt[Ae]===0?m(null,ce,me,gt,Se,Le,We,Fe,ze):Je&&(Ie<0||Ae!==_e[Ie]?Q(ce,me,gt,2):Ie--)}}},Q=(te,se,me,$e,Se=null)=>{const{el:Le,type:We,transition:Fe,children:ze,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===ee){i(Le,se,me);for(let Ye=0;Ye<ze.length;Ye++)Q(ze[Ye],se,me,$e);i(te.anchor,se,me);return}if(We===Ku){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:ye}=Fe,ve=()=>{te.ctx.isUnmounted?s(Le):i(Le,se,me)},Pe=()=>{Le._isLeaving&&Le[Ja](!0),Ye(Le,()=>{ve(),ye&&ye()})};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:ze,dynamicChildren:Ae,shapeFlag:Ze,patchFlag:Ye,dirs:it,cacheIndex:ye}=te;if(Ye===-2&&(Se=!1),Fe!=null&&(gl(),nf(Fe,null,me,te,!0),vl()),ye!=null&&(se.renderCache[ye]=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&&ba(te,null,se,"beforeUnmount"),Ze&64?te.type.remove(te,se,me,re,$e):Ae&&!Ae.hasOnce&&(Le!==ee||Ye>0&&Ye&64)?Ce(Ae,se,me,!1,!0):(Le===ee&&Ye&384||!Se&&Ze&16)&&Ce(ze,se,me),$e&&Z(te)}(Pe&&(Ie=We&&We.onVnodeUnmounted)||ve)&&Es(()=>{Ie&&oo(Ie,se,te),ve&&ba(te,null,se,"unmounted")},me)},Z=te=>{const{type:se,el:me,anchor:$e,transition:Se}=te;if(se===ee){ae(me,$e);return}if(se===Ku){$(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,ze=()=>We(me,Le);Fe?Fe(te.el,Le,ze):ze()}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:ze,a:Ae}=te;K_(ze),K_(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[dI];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,m9($e),q_(),pe=!1)},re={p:m,um:ne,m:Q,r:Z,mt:F,mc:T,pc:K,pbc:L,n:oe,o:t};let ke,je;return e&&([ke,je]=e(re)),{render:ie,hydrate:ke,createApp:Dq(ie,ke)}}function dw({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 fu({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function zI(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function R6(t,e,n=!1){const i=t.children,s=e.children;if(Me(i)&&Me(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&&R6(r,a)),a.type===xa&&(a.patchFlag!==-1?a.el=r.el:a.__elIndex=o+(t.type===ee?1:0)),a.type===Zn&&!a.el&&(a.el=r.el)}}function Xq(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 HI(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:HI(e)}function K_(t){if(t)for(let e=0;e<t.length;e++)t[e].flags|=8}function UI(t){if(t.placeholder)return t.placeholder;const e=t.component;return e?UI(e.subTree):null}const Z_=t=>t.__isSuspense;let bk=0;const Kq={name:"Suspense",__isSuspense:!0,process(t,e,n,i,s,o,r,a,l,c){if(t==null)Jq(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}Qq(t,e,n,i,s,r,a,l,c)}},hydrate:eG,normalize:tG},Zq=Kq;function Mg(t,e){const n=t.props&&t.props[e];et(n)&&n()}function Jq(t,e,n,i,s,o,r,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),h=t.suspense=jI(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?(Mg(t,"onPending"),Mg(t,"onFallback"),c(null,t.ssFallback,e,n,i,null,o,r),sf(h,t.ssFallback)):h.resolve(!1,!0)}function Qq(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:y,isHydrating:b}=d;if(m)d.pendingBranch=h,Ir(m,h)?(l(m,h,d.hiddenContainer,null,s,d,o,r,a),d.deps<=0?d.resolve():y&&(b||(l(p,f,n,i,s,null,o,r,a),sf(d,f)))):(d.pendingId=bk++,b?(d.isHydrating=!1,d.activeBranch=m):c(m,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),y?(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&&Ir(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&&Ir(p,h))l(p,h,n,i,s,d,o,r,a),sf(d,h);else if(Mg(e,"onPending"),d.pendingBranch=h,h.shapeFlag&512?d.pendingId=h.component.suspenseId:d.pendingId=bk++,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 jI(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:y}}=c;let b;const k=nG(t);k&&e&&e.pendingBranch&&(b=e.pendingId,e.deps++);const C=t.props?U_(t.props.timeout):void 0,$=o,S={vnode:t,parent:e,parentComponent:n,namespace:r,container:i,hiddenContainer:s,deps:0,pendingId:bk++,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:B,container:F,isInFallback:z}=S;let U=!1;S.isHydrating?S.isHydrating=!1:M||(U=I&&L.transition&&L.transition.mode==="out-in",U&&(I.transition.afterLeave=()=>{R===S.pendingId&&(h(L,F,o===$?p(I):o,0),Sg(V),z&&T.ssFallback&&(T.ssFallback.el=null))}),I&&(m(I.el)===F&&(o=p(I)),f(I,B,S,!0),!U&&z&&T.ssFallback&&Es(()=>T.ssFallback.el=null,S)),U||h(L,F,o,0)),sf(S,L),S.pendingBranch=null,S.isInFallback=!1;let G=S.parent,K=!1;for(;G;){if(G.pendingBranch){G.effects.push(...V),K=!0;break}G=G.parent}!K&&!U&&Sg(V),S.effects=[],k&&e&&e.pendingBranch&&b===e.pendingId&&(e.deps--,e.deps===0&&!P&&e.resolve()),Mg(T,"onResolve")},fallback(M){if(!S.pendingBranch)return;const{vnode:P,activeBranch:T,parentComponent:I,container:L,namespace:R}=S;Mg(P,"onFallback");const V=p(T),B=()=>{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=B),S.isInFallback=!0,f(T,I,null,!0),F||B()},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=>{Ld(R,M,0)}).then(R=>{if(M.isUnmounted||S.isUnmounted||S.pendingId!==M.suspenseId)return;M.asyncResolved=!0;const{vnode:V}=M;Ck(M,R,!1),L&&(V.el=L);const B=!L&&M.subTree.el;P(M,V,m(L||M.subTree.el),L?null:p(M.subTree),S,r,T),B&&(V.placeholder=null,y(B)),$b(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 eG(t,e,n,i,s,o,r,a,l){const c=e.suspense=jI(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 tG(t){const{shapeFlag:e,children:n}=t,i=e&32;t.ssContent=M9(i?n.default:n),t.ssFallback=i?M9(n.fallback):_(Zn)}function M9(t){let e;if(et(t)){const n=fd&&t._c;n&&(t._d=!1,v()),t=t(),n&&(t._d=!0,e=Ai,YI())}return Me(t)&&(t=Nq(t)),t=ro(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function WI(t,e){e&&e.pendingBranch?Me(t)?e.effects.push(...t):e.effects.push(t):Sg(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,$b(i,s))}function nG(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}const ee=Symbol.for("v-fgt"),xa=Symbol.for("v-txt"),Zn=Symbol.for("v-cmt"),Ku=Symbol.for("v-stc"),Wm=[];let Ai=null;function v(t=!1){Wm.push(Ai=t?null:[])}function YI(){Wm.pop(),Ai=Wm[Wm.length-1]||null}let fd=1;function Tg(t,e=!1){fd+=t,t<0&&Ai&&e&&(Ai.hasOnce=!0)}function qI(t){return t.dynamicChildren=fd>0?Ai||Zh:null,YI(),fd>0&&Ai&&Ai.push(t),t}function A(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 Ir(t,e){return t.type===e.type&&t.key===e.key}function sG(t){}const GI=({key:t})=>t??null,$0=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Ke(t)||hn(t)||et(t)?{i:li,r:t,k:e,f:!!n}:t:null);function g(t,e=null,n=null,i=0,s=null,o=t===ee?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&GI(e),ref:e&&$0(e),scopeId:bb,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:li};return a?(V6(l,n),o&128&&t.normalize(l)):n&&(l.shapeFlag|=Ke(n)?8:16),fd>0&&!r&&Ai&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Ai.push(l),l}const _=iG;function iG(t,e=null,n=null,i=0,s=null,o=!1){if((!t||t===xI)&&(t=Zn),is(t)){const a=_r(t,e,!0);return n&&V6(a,n),fd>0&&!o&&Ai&&(a.shapeFlag&6?Ai[Ai.indexOf(t)]=a:Ai.push(a)),a.patchFlag=-2,a}if(uG(t)&&(t=t.__vccOpts),e){e=of(e);let{class:a,style:l}=e;a&&!Ke(a)&&(e.class=q(a)),yt(l)&&(C1(l)&&!Me(l)&&(l=cn({},l)),e.style=Xe(l))}const r=Ke(t)?1:Z_(t)?128:hI(t)?64:yt(t)?4:et(t)?2:0;return g(t,e,n,i,s,r,o,!0)}function of(t){return t?C1(t)||II(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?Wt(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&GI(c),ref:e&&e.ref?n&&o?Me(o)?o.concat($0(e)):[o,$0(e)]:$0(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!==ee?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 _(xa,null,t,e)}function Ra(t,e){const n=_(Ku,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):Me(t)?_(ee,null,t.slice()):is(t)?cc(t):_(xa,null,String(t))}function cc(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:_r(t)}function V6(t,e){let n=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(Me(e))n=16;else if(typeof e=="object")if(i&65){const s=e.default;s&&(s._c&&(s._d=!1),V6(t,s()),s._c&&(s._d=!0));return}else{n=32;const s=e._;!s&&!II(e)?e._ctx=li:s===3&&li&&(li.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else et(e)?(e={default:e,_ctx:li},n=32):(e=String(e),i&64?(n=16,e=[N(e)]):n=8);t.children=e,t.shapeFlag|=n}function Wt(...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(Pd(s)){const o=e[s],r=i[s];r&&o!==r&&!(Me(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 oG=AI();let rG=0;function XI(t,e,n){const i=t.type,s=(e?e.appContext:t.appContext)||oG,o={uid:rG++,vnode:t,type:i,parent:e,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new _6(!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:OI(i,s),emitsOptions:MI(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=Vq.bind(null,o),t.ce&&t.ce(o),o}let oi=null;const pt=()=>oi||li;let J_,wk;{const t=db(),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)}};J_=e("__VUE_INSTANCE_SETTERS__",n=>oi=n),wk=e("__VUE_SSR_SETTERS__",n=>Sf=n)}const pd=t=>{const e=oi;return J_(t),t.scope.on(),()=>{t.scope.off(),J_(e)}},kk=()=>{oi&&oi.scope.off(),J_(null)};function KI(t){return t.vnode.shapeFlag&4}let Sf=!1;function ZI(t,e=!1,n=!1){e&&wk(e);const{props:i,children:s}=t.vnode,o=KI(t);Uq(t,i,o,e),qq(t,s,n||e);const r=o?aG(t,e):void 0;return e&&wk(!1),r}function aG(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,gk);const{setup:i}=n;if(i){gl();const s=t.setupContext=i.length>1?eL(t):null,o=pd(t),r=ap(i,t,0,[t.props,s]),a=dd(r);if(vl(),o(),(a||t.sp)&&!dl(t)&&A6(t),a){if(r.then(kk,kk),e)return r.then(l=>{Ck(t,l,e)}).catch(l=>{Ld(l,t,0)});t.asyncDep=r}else Ck(t,r,e)}else QI(t,e)}function Ck(t,e,n){et(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:yt(e)&&(t.setupState=C6(e)),QI(t,n)}let Q_,xk;function JI(t){Q_=t,xk=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,vq))}}const lG=()=>!Q_;function QI(t,e,n){const i=t.type;if(!t.render){if(!e&&Q_&&!i.render){const s=i.template||L6(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=Q_(s,c)}}t.render=i.render||Dt,xk&&xk(t)}{const s=pd(t);gl();try{Mq(t)}finally{vl(),s()}}}const cG={get(t,e){return $i(t,"get",""),t[e]}};function eL(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,cG),slots:t.slots,emit:t.emit,expose:e}}function $1(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(C6(Pi(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in jm)return jm[n](t)},has(e,n){return n in e||n in jm}})):t.proxy}function Sk(t,e=!0){return et(t)?t.displayName||t.name:t.name||e&&t.__name}function uG(t){return et(t)&&"__vccOpts"in t}const Y=(t,e)=>LY(t,e,Sf);function bt(t,e,n){try{Tg(-1);const i=arguments.length;return i===2?yt(e)&&!Me(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{Tg(1)}}function dG(){}function hG(t,e,n,i){const s=n[i];if(s&&tL(s,t))return s;const o=e();return o.memo=t.slice(),o.cacheIndex=i,n[i]=o}function tL(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 fd>0&&Ai&&Ai.push(t),!0}const nL="3.5.27",sL=Dt,fG=HY,pG=Sh,mG=oI,gG={createComponentInstance:XI,setupComponent:ZI,renderComponentRoot:S0,setCurrentRenderingInstance:Ag,isVNode:is,normalizeVNode:ro,getComponentPublicInstance:$1,ensureValidVNode:I6,pushWarningContext:FY,popWarningContext:NY},vG=gG,_G=null,yG=null,bG=null;/**
16 * @vue/runtime-dom v3.5.27
17 * (c) 2018-present Yuxi (Evan) You and Vue contributors
18 * @license MIT
19 **/let $k;const T9=typeof window<"u"&&window.trustedTypes;if(T9)try{$k=T9.createPolicy("vue",{createHTML:t=>t})}catch{}const iL=$k?t=>$k.createHTML(t):t=>t,wG="http://www.w3.org/2000/svg",kG="http://www.w3.org/1998/Math/MathML",Ka=typeof document<"u"?document:null,P9=Ka&&Ka.createElement("template"),oL={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(wG,t):e==="mathml"?Ka.createElementNS(kG,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{P9.innerHTML=iL(i==="svg"?`<svg>${t}</svg>`:i==="mathml"?`<math>${t}</math>`:t);const a=P9.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",Hp="animation",$f=Symbol("_vtc"),rL={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},aL=cn({},$6,rL),CG=t=>(t.displayName="Transition",t.props=aL,t),Ho=CG((t,{slots:e})=>bt(vI,lL(t),e)),pu=(t,e=[])=>{Me(t)?t.forEach(n=>n(...e)):t&&t(...e)},I9=t=>t?Me(t)?t.some(e=>e.length>1):t.length>1:!1;function lL(t){const e={};for(const V in t)V in rL||(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=xG(s),m=p&&p[0],y=p&&p[1],{onBeforeEnter:b,onEnter:k,onEnterCancelled:C,onLeave:$,onLeaveCancelled:S,onBeforeAppear:M=b,onAppear:P=k,onAppearCancelled:T=C}=e,I=(V,B,F,z)=>{V._enterCancelled=z,Wl(V,B?u:a),Wl(V,B?c:r),F&&F()},L=(V,B)=>{V._isLeaving=!1,Wl(V,d),Wl(V,f),Wl(V,h),B&&B()},R=V=>(B,F)=>{const z=V?P:k,U=()=>I(B,V,F);pu(z,[B,U]),L9(()=>{Wl(B,V?l:o),da(B,V?u:a),I9(z)||O9(B,i,m,U)})};return cn(e,{onBeforeEnter(V){pu(b,[V]),da(V,o),da(V,r)},onBeforeAppear(V){pu(M,[V]),da(V,l),da(V,c)},onEnter:R(!1),onAppear:R(!0),onLeave(V,B){V._isLeaving=!0;const F=()=>L(V,B);da(V,d),V._enterCancelled?(da(V,h),Ak(V)):(Ak(V),da(V,h)),L9(()=>{V._isLeaving&&(Wl(V,d),da(V,f),I9($)||O9(V,i,y,F))}),pu($,[V,F])},onEnterCancelled(V){I(V,!1,void 0,!0),pu(C,[V])},onAppearCancelled(V){I(V,!0,void 0,!0),pu(T,[V])},onLeaveCancelled(V){L(V),pu(S,[V])}})}function xG(t){if(t==null)return null;if(yt(t))return[hw(t.enter),hw(t.leave)];{const e=hw(t);return[e,e]}}function hw(t){return U_(t)}function da(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 L9(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let SG=0;function O9(t,e,n,i){const s=t._endId=++SG,o=()=>{s===t._endId&&i()};if(n!=null)return setTimeout(o,n);const{type:r,timeout:a,propCount:l}=cL(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 cL(t,e){const n=window.getComputedStyle(t),i=p=>(n[p]||"").split(", "),s=i(`${Nl}Delay`),o=i(`${Nl}Duration`),r=D9(s,o),a=i(`${Hp}Delay`),l=i(`${Hp}Duration`),c=D9(a,l);let u=null,d=0,h=0;e===Nl?r>0&&(u=Nl,d=r,h=o.length):e===Hp?c>0&&(u=Hp,d=c,h=l.length):(d=Math.max(r,c),u=d>0?r>c?Nl:Hp: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 D9(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((n,i)=>R9(n)+R9(t[i])))}function R9(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function Ak(t){return(t?t.ownerDocument:document).body.offsetHeight}function $G(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 ey=Symbol("_vod"),uL=Symbol("_vsh"),jt={name:"show",beforeMount(t,{value:e},{transition:n}){t[ey]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):Up(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),Up(t,!0),i.enter(t)):i.leave(t,()=>{Up(t,!1)}):Up(t,e))},beforeUnmount(t,{value:e}){Up(t,e)}};function Up(t,e){t.style.display=e?t[ey]:"none",t[uL]=!e}function AG(){jt.getSSRProps=({value:t})=>{if(!t)return{style:{display:"none"}}}}const dL=Symbol("");function EG(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=>ty(o,s))},i=()=>{const s=t(e.proxy);e.ce?ty(e.ce,s):Ek(e.subTree,s),n(s)};Cb(()=>{Sg(i)}),Ft(()=>{Te(i,Dt,{flush:"post"});const s=new MutationObserver(i);s.observe(e.subTree.el.parentNode,{childList:!0}),Sl(()=>s.disconnect())})}function Ek(t,e){if(t.shapeFlag&128){const n=t.suspense;t=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Ek(n.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)ty(t.el,e);else if(t.type===ee)t.children.forEach(n=>Ek(n,e));else if(t.type===Ku){let{el:n,anchor:i}=t;for(;n&&(ty(n,e),n!==i);)n=n.nextSibling}}function ty(t,e){if(t.nodeType===1){const n=t.style;let i="";for(const s in e){const o=iY(e[s]);n.setProperty(`--${s}`,o),i+=`--${s}: ${o};`}n[dL]=i}}const MG=/(?:^|;)\s*display\s*:/;function TG(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&&A0(i,a,"")}else for(const r in e)n[r]==null&&A0(i,r,"");for(const r in n)r==="display"&&(o=!0),A0(i,r,n[r])}else if(s){if(e!==n){const r=i[dL];r&&(n+=";"+r),i.cssText=n,o=MG.test(n)}}else e&&t.removeAttribute("style");ey in t&&(t[ey]=o?i.display:"",t[uL]&&(i.display="none"))}const V9=/\s*!important$/;function A0(t,e,n){if(Me(n))n.forEach(i=>A0(t,e,i));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const i=PG(t,e);V9.test(n)?t.setProperty(zi(i),n.replace(V9,""),"important"):t[i]=n}}const F9=["Webkit","Moz","ms"],fw={};function PG(t,e){const n=fw[e];if(n)return n;let i=Un(e);if(i!=="filter"&&i in t)return fw[e]=i;i=Gc(i);for(let s=0;s<F9.length;s++){const o=F9[s]+i;if(o in t)return fw[e]=o}return e}const N9="http://www.w3.org/1999/xlink";function B9(t,e,n,i,s,o=nY(e)){i&&e.startsWith("xlink:")?n==null?t.removeAttributeNS(N9,e.slice(6,e.length)):t.setAttributeNS(N9,e,n):n==null||o&&!LP(n)?t.removeAttribute(e):t.setAttribute(e,o?"":mo(n)?String(n):n)}function z9(t,e,n,i,s){if(e==="innerHTML"||e==="textContent"){n!=null&&(t[e]=e==="innerHTML"?iL(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=LP(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 IG(t,e,n,i){t.removeEventListener(e,n,i)}const H9=Symbol("_vei");function LG(t,e,n,i,s=null){const o=t[H9]||(t[H9]={}),r=o[e];if(i&&r)r.value=i;else{const[a,l]=OG(e);if(i){const c=o[e]=VG(i,s);sl(t,a,c,l)}else r&&(IG(t,a,r,l),o[e]=void 0)}}const U9=/(?:Once|Passive|Capture)$/;function OG(t){let e;if(U9.test(t)){e={};let i;for(;i=t.match(U9);)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 pw=0;const DG=Promise.resolve(),RG=()=>pw||(DG.then(()=>pw=0),pw=Date.now());function VG(t,e){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;vr(FG(i,n.value),e,5,[i])};return n.value=t,n.attached=RG(),n}function FG(t,e){if(Me(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 j9=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,hL=(t,e,n,i,s,o)=>{const r=s==="svg";e==="class"?$G(t,i,r):e==="style"?TG(t,n,i):Pd(e)?g6(e)||LG(t,e,n,i,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):NG(t,e,i,r))?(z9(t,e,i),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&B9(t,e,i,r,o,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!Ke(i))?z9(t,Un(e),i,o,e):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),B9(t,e,i,r))};function NG(t,e,n,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&j9(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 j9(e)&&Ke(n)?!1:e in t}const W9={};function fL(t,e,n){let i=fe(t,e);hd(i)&&(i=cn({},i,e));class s extends Ab{constructor(r){super(i,r,n)}}return s.def=i,s}const BG=(t,e)=>fL(t,e,xL),zG=typeof HTMLElement<"u"?HTMLElement:class{};class Ab extends zG{constructor(e,n={},i=Pg){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!==Pg?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 Ab){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&&!Me(o))for(const l in o){const c=o[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=U_(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=Me(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):W9;const s=Un(e);n&&this._numberProps&&this._numberProps[s]&&(i=U_(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===W9?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,hd(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 pL(t){const e=pt(),n=e&&e.ce;return n||null}function HG(){const t=pL();return t&&t.shadowRoot}function UG(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 mL=new WeakMap,gL=new WeakMap,ny=Symbol("_moveCb"),Y9=Symbol("_enterCb"),jG=t=>(delete t.props.mode,t),WG=jG({name:"TransitionGroup",props:cn({},aL,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=pt(),i=S6();let s,o;return xl(()=>{if(!s.length)return;const r=t.moveClass||`${t.name||"v"}-move`;if(!XG(s[0].el,n.vnode.el,r)){s=[];return}s.forEach(YG),s.forEach(qG);const a=s.filter(GG);Ak(n.vnode.el),a.forEach(l=>{const c=l.el,u=c.style;da(c,r),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[ny]=h=>{h&&h.target!==c||(!h||h.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[ny]=null,Wl(c,r))};c.addEventListener("transitionend",d)}),s=[]}),()=>{const r=an(t),a=lL(r);let l=r.tag||ee;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)),mL.set(u,{left:u.el.offsetLeft,top:u.el.offsetTop}))}o=e.default?wb(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)}}}),Eb=WG;function YG(t){const e=t.el;e[ny]&&e[ny](),e[Y9]&&e[Y9]()}function qG(t){gL.set(t,{left:t.el.offsetLeft,top:t.el.offsetTop})}function GG(t){const e=mL.get(t),n=gL.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 XG(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}=cL(i);return o.removeChild(i),r}const Vc=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Me(e)?n=>Qh(e,n):e};function KG(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 G9(t,e,n){return e&&(t=t.trim()),n&&(t=ub(t)),t}const md={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](G9(t.value,n,o))}),(n||o)&&sl(t,"change",()=>{t.value=G9(t.value,n,o)}),e||(sl(t,"compositionstart",KG),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)?ub(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))}},A1={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(Me(i)){const a=hb(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(Id(i)){const a=new Set(i);o?a.add(s):a.delete(s),r(a)}else r(_L(t,o))})},mounted:X9,beforeUpdate(t,e,n){t[hr]=Vc(n),X9(t,e,n)}};function X9(t,{value:e,oldValue:n},i){t._modelValue=e;let s;if(Me(e))s=hb(e,i.props.value)>-1;else if(Id(e))s=e.has(i.props.value);else{if(e===n)return;s=Dc(e,_L(t,!0))}t.checked!==s&&(t.checked=s)}const E1={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))}},vL={deep:!0,created(t,{value:e,modifiers:{number:n}},i){const s=Id(e);sl(t,"change",()=>{const o=Array.prototype.filter.call(t.options,r=>r.selected).map(r=>n?ub(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}){K9(t,e)},beforeUpdate(t,e,n){t[hr]=Vc(n)},updated(t,{value:e}){t._assigning||K9(t,e)}};function K9(t,e){const n=t.multiple,i=Me(e);if(!(n&&!i&&!Id(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=hb(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 _L(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const yL={created(t,e,n){Bv(t,e,n,null,"created")},mounted(t,e,n){Bv(t,e,n,null,"mounted")},beforeUpdate(t,e,n,i){Bv(t,e,n,i,"beforeUpdate")},updated(t,e,n,i){Bv(t,e,n,i,"updated")}};function bL(t,e){switch(t){case"SELECT":return vL;case"TEXTAREA":return md;default:switch(e){case"checkbox":return A1;case"radio":return E1;default:return md}}}function Bv(t,e,n,i,s){const r=bL(t.tagName,n.props&&n.props.type)[s];r&&r(t,e,n,i)}function ZG(){md.getSSRProps=({value:t})=>({value:t}),E1.getSSRProps=({value:t},e)=>{if(e.props&&Dc(e.props.value,t))return{checked:!0}},A1.getSSRProps=({value:t},e)=>{if(Me(t)){if(e.props&&hb(t,e.props.value)>-1)return{checked:!0}}else if(Id(t)){if(e.props&&t.has(e.props.value))return{checked:!0}}else if(t)return{checked:!0}},yL.getSSRProps=(t,e)=>{if(typeof e.type!="string")return;const n=bL(e.type.toUpperCase(),e.props&&e.props.type);if(n.getSSRProps)return n.getSSRProps(t,e)}}const JG=["ctrl","shift","alt","meta"],QG={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)=>JG.some(n=>t[`${n}Key`]&&!e.includes(n))},Ee=(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=QG[e[r]];if(a&&a(s,e))return}return t(s,...o)})},eX={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||eX[r]===o))return t(s)})},wL=cn({patchProp:hL},oL);let Ym,Z9=!1;function kL(){return Ym||(Ym=FI(wL))}function CL(){return Ym=Z9?Ym:NI(wL),Z9=!0,Ym}const Fc=(...t)=>{kL().render(...t)},tX=(...t)=>{CL().hydrate(...t)},Pg=(...t)=>{const e=kL().createApp(...t),{mount:n}=e;return e.mount=i=>{const s=$L(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,SL(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},e},xL=(...t)=>{const e=CL().createApp(...t),{mount:n}=e;return e.mount=i=>{const s=$L(i);if(s)return n(s,!0,SL(s))},e};function SL(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function $L(t){return Ke(t)?document.querySelector(t):t}let J9=!1;const nX=()=>{J9||(J9=!0,ZG(),AG())},sX=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:vI,BaseTransitionPropsValidators:$6,Comment:Zn,DeprecationTypes:bG,EffectScope:_6,ErrorCodes:zY,ErrorTypeStrings:fG,Fragment:ee,KeepAlive:pq,ReactiveEffect:kg,Static:Ku,Suspense:Zq,Teleport:ea,Text:xa,TrackOpTypes:OY,Transition:Ho,TransitionGroup:Eb,TriggerOpTypes:DY,VueElement:Ab,assertNumber:BY,callWithAsyncErrorHandling:vr,callWithErrorHandling:ap,camelize:Un,capitalize:Gc,cloneVNode:_r,compatUtils:yG,computed:Y,createApp:Pg,createBlock:D,createCommentVNode:O,createElementBlock:A,createElementVNode:g,createHydrationRenderer:NI,createPropsRestProxy:Aq,createRenderer:FI,createSSRApp:xL,createSlots:hs,createStaticVNode:Ra,createTextVNode:N,createVNode:_,customRef:JP,defineAsyncComponent:hq,defineComponent:fe,defineCustomElement:fL,defineEmits:yq,defineExpose:bq,defineModel:Cq,defineOptions:wq,defineProps:_q,defineSSRCustomElement:BG,defineSlots:kq,devtools:pG,effect:rY,effectScope:fb,getCurrentInstance:pt,getCurrentScope:pb,getCurrentWatcher:RY,getTransitionRawChildren:wb,guardReactiveProps:of,h:bt,handleError:Ld,hasInjectionContext:rI,hydrate:tX,hydrateOnIdle:rq,hydrateOnInteraction:uq,hydrateOnMediaQuery:cq,hydrateOnVisible:lq,initCustomFormatter:dG,initDirectivesForSSR:nX,inject:qe,isMemoSame:tL,isProxy:C1,isReactive:Fr,isReadonly:Aa,isRef:hn,isRuntimeOnly:lG,isShallow:uo,isVNode:is,markRaw:Pi,mergeDefaults:Sq,mergeModels:$q,mergeProps:Wt,nextTick:ot,nodeOps:oL,normalizeClass:q,normalizeProps:ef,normalizeStyle:Xe,onActivated:E6,onBeforeMount:Od,onBeforeUnmount:wn,onBeforeUpdate:Cb,onDeactivated:M6,onErrorCaptured:CI,onMounted:Ft,onRenderTracked:kI,onRenderTriggered:wI,onScopeDispose:mb,onServerPrefetch:bI,onUnmounted:Sl,onUpdated:xl,onWatcherCleanup:eI,openBlock:v,patchProp:hL,popScopeId:YY,provide:Pt,proxyRefs:C6,pushScopeId:WY,queuePostFlushCb:Sg,reactive:In,readonly:Rc,ref:J,registerRuntimeCompiler:JI,render:Fc,renderList:we,renderSlot:le,resolveComponent:H,resolveDirective:xt,resolveDynamicComponent:Ct,resolveFilter:_G,resolveTransitionHooks:xf,setBlockTracking:Tg,setDevtoolsHook:mG,setTransitionHooks:yl,shallowReactive:k6,shallowReadonly:$Y,shallowRef:Fn,ssrContextKey:aI,ssrUtils:vG,stop:aY,toDisplayString:x,toHandlerKey:qu,toHandlers:xb,toRaw:an,toRef:Sn,toRefs:go,toValue:fk,transformVNodeArgs:sG,triggerRef:Hm,unref:E,useAttrs:Dd,useCssModule:UG,useCssVars:EG,useHost:pL,useId:JY,useModel:Rq,useSSRContext:lI,useShadowRoot:HG,useSlots:mi,useTemplateRef:QY,useTransitionState:S6,vModelCheckbox:A1,vModelDynamic:yL,vModelRadio:E1,vModelSelect:vL,vModelText:md,vShow:jt,version:nL,warn:sL,watch:Te,watchEffect:_l,watchPostEffect:GY,watchSyncEffect:cI,withAsyncContext:Eq,withCtx:w,withDefaults:xq,withDirectives:Re,withKeys:ut,withMemo:hG,withModifiers:Ee,withScopeId:qY},Symbol.toStringTag,{value:"Module"}));/**
20 * @vue/compiler-core v3.5.27
21 * (c) 2018-present Yuxi (Evan) You and Vue contributors
22 * @license MIT
23 **/const Ig=Symbol(""),qm=Symbol(""),F6=Symbol(""),sy=Symbol(""),AL=Symbol(""),gd=Symbol(""),EL=Symbol(""),ML=Symbol(""),N6=Symbol(""),B6=Symbol(""),M1=Symbol(""),z6=Symbol(""),TL=Symbol(""),H6=Symbol(""),U6=Symbol(""),j6=Symbol(""),W6=Symbol(""),Y6=Symbol(""),q6=Symbol(""),PL=Symbol(""),IL=Symbol(""),Mb=Symbol(""),iy=Symbol(""),G6=Symbol(""),X6=Symbol(""),Lg=Symbol(""),T1=Symbol(""),K6=Symbol(""),Mk=Symbol(""),iX=Symbol(""),Tk=Symbol(""),oy=Symbol(""),oX=Symbol(""),rX=Symbol(""),Z6=Symbol(""),aX=Symbol(""),lX=Symbol(""),J6=Symbol(""),LL=Symbol(""),Ef={[Ig]:"Fragment",[qm]:"Teleport",[F6]:"Suspense",[sy]:"KeepAlive",[AL]:"BaseTransition",[gd]:"openBlock",[EL]:"createBlock",[ML]:"createElementBlock",[N6]:"createVNode",[B6]:"createElementVNode",[M1]:"createCommentVNode",[z6]:"createTextVNode",[TL]:"createStaticVNode",[H6]:"resolveComponent",[U6]:"resolveDynamicComponent",[j6]:"resolveDirective",[W6]:"resolveFilter",[Y6]:"withDirectives",[q6]:"renderList",[PL]:"renderSlot",[IL]:"createSlots",[Mb]:"toDisplayString",[iy]:"mergeProps",[G6]:"normalizeClass",[X6]:"normalizeStyle",[Lg]:"normalizeProps",[T1]:"guardReactiveProps",[K6]:"toHandlers",[Mk]:"camelize",[iX]:"capitalize",[Tk]:"toHandlerKey",[oy]:"setBlockTracking",[oX]:"pushScopeId",[rX]:"popScopeId",[Z6]:"withCtx",[aX]:"unref",[lX]:"isRef",[J6]:"withMemo",[LL]:"isMemoSame"};function cX(t){Object.getOwnPropertySymbols(t).forEach(e=>{Ef[e]=t[e]})}const Uo={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function uX(t,e=""){return{type:0,source:e,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:Uo}}function Og(t,e,n,i,s,o,r,a=!1,l=!1,c=!1,u=Uo){return t&&(a?(t.helper(gd),t.helper(Pf(t.inSSR,c))):t.helper(Tf(t.inSSR,c)),r&&t.helper(Y6)),{type:13,tag:e,props:n,children:i,patchFlag:s,dynamicProps:o,directives:r,isBlock:a,disableTracking:l,isComponent:c,loc:u}}function Zu(t,e=Uo){return{type:17,loc:e,elements:t}}function cr(t,e=Uo){return{type:15,loc:e,properties:t}}function Ps(t,e){return{type:16,loc:Uo,key:Ke(t)?Xt(t,!0):t,value:e}}function Xt(t,e=!1,n=Uo,i=0){return{type:4,loc:n,content:t,isStatic:e,constType:e?3:i}}function Nr(t,e=Uo){return{type:8,loc:e,children:t}}function Vs(t,e=[],n=Uo){return{type:14,loc:n,callee:t,arguments:e}}function Mf(t,e=void 0,n=!1,i=!1,s=Uo){return{type:18,params:t,returns:e,newline:n,isSlot:i,loc:s}}function Pk(t,e,n,i=!0){return{type:19,test:t,consequent:e,alternate:n,newline:i,loc:Uo}}function dX(t,e,n=!1,i=!1){return{type:20,index:t,value:e,needPauseTracking:n,inVOnce:i,needArraySpread:!1,loc:Uo}}function hX(t){return{type:21,body:t,loc:Uo}}function Tf(t,e){return t||e?N6:B6}function Pf(t,e){return t||e?EL:ML}function Q6(t,{helper:e,removeHelper:n,inSSR:i}){t.isBlock||(t.isBlock=!0,n(Tf(i,t.isComponent)),e(gd),e(Pf(i,t.isComponent)))}const Q9=new Uint8Array([123,123]),e7=new Uint8Array([125,125]);function t7(t){return t>=97&&t<=122||t>=65&&t<=90}function Eo(t){return t===32||t===10||t===9||t===12||t===13}function Bl(t){return t===47||t===62||Eo(t)}function ry(t){const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}const bi={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 fX{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=Q9,this.delimiterClose=e7,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=Q9,this.delimiterClose=e7}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||Eo(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===bi.TitleEnd||this.currentSequence===bi.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===bi.Cdata[this.sequenceIndex]?++this.sequenceIndex===bi.Cdata.length&&(this.state=28,this.currentSequence=bi.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===bi.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):t7(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(ry("</"+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){Eo(e)||(e===62?(this.state=1,this.sectionStart=this.index+1):(this.state=t7(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(e===62||Eo(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):Eo(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):Eo(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)):Eo(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):Eo(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){Eo(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=bi.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===bi.ScriptEnd[3]?this.startSpecial(bi.ScriptEnd,4):e===bi.StyleEnd[3]?this.startSpecial(bi.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===bi.TitleEnd[3]?this.startSpecial(bi.TitleEnd,4):e===bi.TextareaEnd[3]?this.startSpecial(bi.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===bi.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 n7(t,{compatConfig:e}){const n=e&&e[t];return t==="MODE"?n||3:n}function Ju(t,e){const n=n7("MODE",e),i=n7(t,e);return n===3?i===!0:i!==!1}function Dg(t,e,n,...i){return Ju(t,e)}function e4(t){throw t}function OL(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 DL(t){switch(t){case"Teleport":case"teleport":return qm;case"Suspense":case"suspense":return F6;case"KeepAlive":case"keep-alive":return sy;case"BaseTransition":case"base-transition":return AL}}const pX=/^$|^\d|[^\$\w\xA0-\uFFFF]/,t4=t=>!pX.test(t),RL=/[A-Za-z_$\xA0-\uFFFF]/,mX=/[\.\?\w$\xA0-\uFFFF]/,gX=/\s+[.[]\s*|\s*[.[]\s+/g,VL=t=>t.type===4?t.content:t.loc.source,vX=t=>{const e=VL(t).trim().replace(gX,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?RL:mX).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},FL=vX,_X=/^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,yX=t=>_X.test(VL(t)),bX=yX;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 Tb(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)&&Du(o.arg,e))return o}}function Du(t,e){return!!(t&&lo(t)&&t.content===e)}function wX(t){return t.props.some(e=>e.type===7&&e.name==="bind"&&(!e.arg||e.arg.type!==4||!e.arg.isStatic))}function mw(t){return t.type===5||t.type===2}function s7(t){return t.type===7&&t.name==="pre"}function kX(t){return t.type===7&&t.name==="slot"}function ay(t){return t.type===1&&t.tagType===3}function ly(t){return t.type===1&&t.tagType===2}const CX=new Set([Lg,T1]);function NL(t,e=[]){if(t&&!Ke(t)&&t.type===14){const n=t.callee;if(!Ke(n)&&CX.has(n))return NL(t.arguments[0],e.concat(t))}return[t,e]}function cy(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=NL(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?i7(e,a)||a.properties.unshift(e):s.callee===K6?i=Vs(n.helper(iy),[cr([e]),s]):s.arguments.unshift(cr([e])),!i&&(i=s)}else s.type===15?(i7(e,s)||s.properties.unshift(e),i=s):(i=Vs(n.helper(iy),[cr([e]),s]),r&&r.callee===T1&&(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 i7(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 Rg(t,e){return`_${e}_${t.replace(/[^\w]/g,(n,i)=>n==="-"?"_":t.charCodeAt(i).toString())}`}function xX(t){return t.type===14&&t.callee===J6?t.arguments[1].returns:t}const SX=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;function BL(t){for(let e=0;e<t.length;e++)if(!Eo(t.charCodeAt(e)))return!1;return!0}function n4(t){return t.type===2&&BL(t.content)||t.type===12&&n4(t.content)}function zL(t){return t.type===3||n4(t)}const HL={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:qh,isPreTag:qh,isIgnoreNewlineTag:qh,isCustomElement:qh,onError:e4,onWarn:OL,comments:!1,prefixIdentifiers:!1};let An=HL,Vg=null,hl="",Si=null,fn=null,no="",qa=-1,bu=-1,s4=0,uc=!1,Ik=null;const us=[],_s=new fX(us,{onerr:ja,ontext(t,e){zv(Zs(t,e),t,e)},ontextentity(t,e,n){zv(t,e,n)},oninterpolation(t,e){if(uc)return zv(Zs(t,e),t,e);let n=t+_s.delimiterOpen.length,i=e-_s.delimiterClose.length;for(;Eo(hl.charCodeAt(n));)n++;for(;Eo(hl.charCodeAt(i-1));)i--;let s=Zs(n,i);s.includes("&")&&(s=An.decodeEntities(s,!1)),Lk({type:5,content:M0(s,!1,Cs(n,i)),loc:Cs(t,e)})},onopentagname(t,e){const n=Zs(t,e);Si={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){r7(t)},onclosetag(t,e){const n=Zs(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();E0(a,e,r<s)}break}i||ja(23,UL(t,60))}},onselfclosingtag(t){const e=Si.tag;Si.isSelfClosing=!0,r7(t),us[0]&&us[0].tag===e&&E0(us.shift(),t)},onattribname(t,e){fn={type:6,name:Zs(t,e),nameLoc:Cs(t,e),value:void 0,loc:Cs(t)}},ondirname(t,e){const n=Zs(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==="."?[Xt("prop")]:[],loc:Cs(t)},i==="pre"){uc=_s.inVPre=!0,Ik=Si;const s=Si.props;for(let o=0;o<s.length;o++)s[o].type===7&&(s[o]=DX(s[o]))}},ondirarg(t,e){if(t===e)return;const n=Zs(t,e);if(uc&&!s7(fn))fn.name+=n,Ru(fn.nameLoc,e);else{const i=n[0]!=="[";fn.arg=M0(i?n:n.slice(1,-1),i,Cs(t,e),i?3:0)}},ondirmodifier(t,e){const n=Zs(t,e);if(uc&&!s7(fn))fn.name+="."+n,Ru(fn.nameLoc,e);else if(fn.name==="slot"){const i=fn.arg;i&&(i.content+="."+n,Ru(i.loc,e))}else{const i=Xt(n,!0,Cs(t,e));fn.modifiers.push(i)}},onattribdata(t,e){no+=Zs(t,e),qa<0&&(qa=t),bu=e},onattribentity(t,e,n){no+=t,qa<0&&(qa=e),bu=n},onattribnameend(t){const e=fn.loc.start.offset,n=Zs(e,t);fn.type===7&&(fn.rawName=n),Si.props.some(i=>(i.type===7?i.rawName:i.name)===n)&&ja(2,e)},onattribend(t,e){if(Si&&fn){if(Ru(fn.loc,e),t!==0)if(no.includes("&")&&(no=An.decodeEntities(no,!0)),fn.type===6)fn.name==="class"&&(no=WL(no).trim()),t===1&&!no&&ja(13,e),fn.value={type:2,content:no,loc:t===1?Cs(qa,bu):Cs(qa-1,bu+1)},_s.inSFCRoot&&Si.tag==="template"&&fn.name==="lang"&&no&&no!=="html"&&_s.enterRCDATA(ry("</template"),0);else{let n=0;fn.exp=M0(no,!1,Cs(qa,bu),0,n),fn.name==="for"&&(fn.forParseResult=AX(fn.exp));let i=-1;fn.name==="bind"&&(i=fn.modifiers.findIndex(s=>s.content==="sync"))>-1&&Dg("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")&&Si.props.push(fn)}no="",qa=bu=-1},oncomment(t,e){An.comments&&Lk({type:3,content:Zs(t,e),loc:Cs(t-4,e+3)})},onend(){const t=hl.length;for(let e=0;e<us.length;e++)E0(us[e],t-1),ja(24,us[e].loc.start.offset)},oncdata(t,e){us[0].ns!==0?zv(Zs(t,e),t,e):ja(1,t-9)},onprocessinginstruction(t){(us[0]?us[0].ns:An.ns)===0&&ja(21,t-1)}}),o7=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,$X=/^\(|\)$/g;function AX(t){const e=t.loc,n=t.content,i=n.match(SX);if(!i)return;const[,s,o]=i,r=(d,h,f=!1)=>{const p=e.start.offset+h,m=p+d.length;return M0(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($X,"").trim();const c=s.indexOf(l),u=l.match(o7);if(u){l=l.replace(o7,"").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 Zs(t,e){return hl.slice(t,e)}function r7(t){_s.inSFCRoot&&(Si.innerLoc=Cs(t+1,t+1)),Lk(Si);const{tag:e,ns:n}=Si;n===0&&An.isPreTag(e)&&s4++,An.isVoidTag(e)?E0(Si,t):(us.unshift(Si),(n===1||n===2)&&(_s.inXML=!0)),Si=null}function zv(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]||Vg,s=i.children[i.children.length-1];s&&s.type===2?(s.content+=t,Ru(s.loc,n)):i.children.push({type:2,content:t,loc:Cs(e,n)})}function E0(t,e,n=!1){n?Ru(t.loc,UL(e,60)):Ru(t.loc,EX(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=Zs(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:i,ns:s,children:o}=t;if(uc||(i==="slot"?t.tagType=2:a7(t)?t.tagType=3:TX(t)&&(t.tagType=1)),_s.inRCDATA||(t.children=jL(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)&&s4--,Ik===t&&(uc=_s.inVPre=!1,Ik=null),_s.inXML&&(us[0]?us[0].ns:An.ns)===0&&(_s.inXML=!1);{const r=t.props;if(!_s.inSFCRoot&&Ju("COMPILER_NATIVE_TEMPLATE",An)&&t.tag==="template"&&!a7(t)){const l=us[0]||Vg,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&&Dg("COMPILER_INLINE_TEMPLATE",An,a.loc)&&t.children.length&&(a.value={type:2,content:Zs(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:a.loc})}}function EX(t,e){let n=t;for(;hl.charCodeAt(n)!==e&&n<hl.length-1;)n++;return n}function UL(t,e){let n=t;for(;hl.charCodeAt(n)!==e&&n>=0;)n--;return n}const MX=new Set(["if","else","else-if","for","slot"]);function a7({tag:t,props:e}){if(t==="template"){for(let n=0;n<e.length;n++)if(e[n].type===7&&MX.has(e[n].name))return!0}return!1}function TX({tag:t,props:e}){if(An.isCustomElement(t))return!1;if(t==="component"||PX(t.charCodeAt(0))||DL(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(Dg("COMPILER_IS_ON_ELEMENT",An,i.loc))return!0}}else if(i.name==="bind"&&Du(i.arg,"is")&&Dg("COMPILER_IS_ON_ELEMENT",An,i.loc))return!0}return!1}function PX(t){return t>64&&t<91}const IX=/\r\n/g;function jL(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(s4)s.content=s.content.replace(IX,`
24 `);else if(BL(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&&LX(s.content)))?(n=!0,t[i]=null):s.content=" "}else e&&(s.content=WL(s.content))}return n?t.filter(Boolean):t}function LX(t){for(let e=0;e<t.length;e++){const n=t.charCodeAt(e);if(n===10||n===13)return!0}return!1}function WL(t){let e="",n=!1;for(let i=0;i<t.length;i++)Eo(t.charCodeAt(i))?n||(e+=" ",n=!0):(e+=t[i],n=!1);return e}function Lk(t){(us[0]||Vg).children.push(t)}function Cs(t,e){return{start:_s.getPos(t),end:e==null?e:_s.getPos(e),source:e==null?e:Zs(t,e)}}function OX(t){return Cs(t.start.offset,t.end.offset)}function Ru(t,e){t.end=_s.getPos(e),t.source=Zs(t.start.offset,e)}function DX(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 M0(t,e=!1,n,i=0,s=0){return Xt(t,e,n,i)}function ja(t,e,n){An.onError(ss(t,Cs(e,e)))}function RX(){_s.reset(),Si=null,fn=null,no="",qa=-1,bu=-1,us.length=0}function VX(t,e){if(RX(),hl=t,An=cn({},HL),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=ry(n[0]),_s.delimiterClose=ry(n[1]));const i=Vg=uX([],t);return _s.parse(hl),i.loc=Cs(0,t.length),i.children=jL(i.children),Vg=null,i}function FX(t,e){T0(t,void 0,e,!!YL(t))}function YL(t){const e=t.children.filter(n=>n.type!==3);return e.length===1&&e[0].type===1&&!ly(e[0])?e[0]:null}function T0(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:To(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)&&GL(d,n)>=2){const m=XL(d);m&&(f.props=n.hoist(m))}f.dynamicProps&&(f.dynamicProps=n.hoist(f.dynamicProps))}}}else if(d.type===12&&(i?0:To(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++,T0(d,t,n,!1,s),h&&n.scopes.vSlot--}else if(d.type===11)T0(d,t,n,d.children.length===1,!0);else if(d.type===9)for(let h=0;h<d.branches.length;h++)T0(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&&Me(t.codegenNode.children))t.codegenNode.children=l(Zu(t.codegenNode.children)),a=!0;else if(t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!Me(t.codegenNode.children)&&t.codegenNode.children.type===15){const u=c(t.codegenNode,"default");u&&(u.returns=l(Zu(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&&!Me(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(Zu(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&&!Me(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 To(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=GL(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=To(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=To(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(gd),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 To(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=To(a,e);if(l===0)return 0;l<o&&(o=l)}return o;case 20:return 2;default:return 0}}const NX=new Set([G6,X6,Lg,T1]);function qL(t,e){if(t.type===14&&!Ke(t.callee)&&NX.has(t.callee)){const n=t.arguments[0];if(n.type===4)return To(n,e);if(n.type===14)return qL(n,e)}return 0}function GL(t,e){let n=3;const i=XL(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=To(r,e);if(l===0)return l;l<n&&(n=l);let c;if(a.type===4?c=To(a,e):a.type===14?c=qL(a,e):c=0,c===0)return c;c<n&&(n=c)}}return n}function XL(t){const e=t.codegenNode;if(e.type===13)return e.props}function BX(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:y="",bindingMetadata:b=pn,inline:k=!1,isTS:C=!1,onError:$=e4,onWarn:S=OL,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:y,bindingMetadata:b,inline:k,isTS:C,onError:$,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=Xt(I)),T.hoists.push(I);const L=Xt(`_hoisted_${T.hoists.length}`,!1,I.loc,2);return L.hoisted=I,L},cache(I,L=!1,R=!1){const V=dX(T.cached.length,I,L,R);return T.cached.push(V),V}};return T.filters=new Set,T}function zX(t,e){const n=BX(t,e);Pb(t,n),e.hoistStatic&&FX(t,n),e.ssr||HX(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 HX(t,e){const{helper:n}=e,{children:i}=t;if(i.length===1){const s=YL(t);if(s&&s.codegenNode){const o=s.codegenNode;o.type===13&&Q6(o,e),t.codegenNode=o}else t.codegenNode=i[0]}else if(i.length>1){let s=64;t.codegenNode=Og(e,n(Ig),void 0,t.children,s,void 0,void 0,!0,void 0,!1)}}function UX(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,Pb(s,e))}}function Pb(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&&(Me(r)?i.push(...r):i.push(r)),e.currentNode)t=e.currentNode;else return}switch(t.type){case 3:e.ssr||e.helper(M1);break;case 5:e.ssr||e.helper(Mb);break;case 9:for(let o=0;o<t.branches.length;o++)Pb(t.branches[o],e);break;case 10:case 11:case 1:case 0:UX(t,e);break}e.currentNode=t;let s=i.length;for(;s--;)i[s]()}function KL(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(kX))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 Ib="/*@__PURE__*/",ZL=t=>`${Ef[t]}: _${Ef[t]}`;function jX(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,y=-2,b){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 WX(t,e={}){const n=jX(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";YX(t,n);const m=u?"ssrRender":"render",b=(u?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(s(`function ${m}(${b}) {`),r(),f&&(s("with (_ctx) {"),r(),h&&(s(`const { ${d.map(ZL).join(", ")} } = _Vue
26 `,-1),l())),t.components.length&&(gw(t.components,"component",n),(t.directives.length||t.temps>0)&&l()),t.directives.length&&(gw(t.directives,"directive",n),t.temps>0&&l()),t.filters&&t.filters.length&&(l(),gw(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?Mi(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 YX(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=[N6,B6,M1,z6,TL].filter(h=>u.includes(h)).map(ZL).join(", ");s(`const { ${d} } = _Vue
29 `,-1)}qX(t.hoists,e),o(),s("return ")}function gw(t,e,{helper:n,push:i,newline:s,isTS:o}){const r=n(e==="filter"?W6:e==="component"?H6:j6);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 ${Rg(l,e)} = ${r}(${JSON.stringify(l)}${c?", true":""})${o?"!":""}`),a<t.length-1&&s()}}function qX(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} = `),Mi(o,e),i())}e.pure=!1}function i4(t,e){const n=t.length>3||!1;e.push("["),n&&e.indent(),P1(t,e,n),n&&e.deindent(),e.push("]")}function P1(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):Me(a)?i4(a,e):Mi(a,e),r<t.length-1&&(n?(i&&s(","),o()):i&&s(", "))}}function Mi(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:Mi(t.codegenNode,e);break;case 2:GX(t,e);break;case 4:JL(t,e);break;case 5:XX(t,e);break;case 12:Mi(t.codegenNode,e);break;case 8:QL(t,e);break;case 3:ZX(t,e);break;case 13:JX(t,e);break;case 14:eK(t,e);break;case 15:tK(t,e);break;case 17:nK(t,e);break;case 18:sK(t,e);break;case 19:iK(t,e);break;case 20:oK(t,e);break;case 21:P1(t.body,e,!0,!1);break}}function GX(t,e){e.push(JSON.stringify(t.content),-3,t)}function JL(t,e){const{content:n,isStatic:i}=t;e.push(i?JSON.stringify(n):n,-3,t)}function XX(t,e){const{push:n,helper:i,pure:s}=e;s&&n(Ib),n(`${i(Mb)}(`),Mi(t.content,e),n(")")}function QL(t,e){for(let n=0;n<t.children.length;n++){const i=t.children[n];Ke(i)?e.push(i,-3):Mi(i,e)}}function KX(t,e){const{push:n}=e;if(t.type===8)n("["),QL(t,e),n("]");else if(t.isStatic){const i=t4(t.content)?t.content:JSON.stringify(t.content);n(i,-2,t)}else n(`[${t.content}]`,-3,t)}function ZX(t,e){const{push:n,helper:i,pure:s}=e;s&&n(Ib),n(`${i(M1)}(${JSON.stringify(t.content)})`,-3,t)}function JX(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(Y6)+"("),d&&n(`(${i(gd)}(${h?"true":""}), `),s&&n(Ib);const m=d?Pf(e.inSSR,f):Tf(e.inSSR,f);n(i(m)+"(",-2,t),P1(QX([o,r,a,p,c]),e),n(")"),d&&n(")"),u&&(n(", "),Mi(u,e),n(")"))}function QX(t){let e=t.length;for(;e--&&t[e]==null;);return t.slice(0,e+1).map(n=>n||"null")}function eK(t,e){const{push:n,helper:i,pure:s}=e,o=Ke(t.callee)?t.callee:i(t.callee);s&&n(Ib),n(o+"(",-2,t),P1(t.arguments,e),n(")")}function tK(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];KX(c,e),n(": "),Mi(u,e),l<r.length-1&&(n(","),o())}a&&s(),n(a?"}":" }")}function nK(t,e){i4(t.elements,e)}function sK(t,e){const{push:n,indent:i,deindent:s}=e,{params:o,returns:r,body:a,newline:l,isSlot:c}=t;c&&n(`_${Ef[Z6]}(`),n("(",-2,t),Me(o)?P1(o,e):o&&Mi(o,e),n(") => "),(l||a)&&(n("{"),i()),r?(l&&n("return "),Me(r)?i4(r,e):Mi(r,e)):a&&Mi(a,e),(l||a)&&(s(),n("}")),c&&(t.isNonScopedSlot&&n(", undefined, true"),n(")"))}function iK(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=!t4(n.content);d&&r("("),JL(n,e),d&&r(")")}else r("("),Mi(n,e),r(")");o&&a(),e.indentLevel++,o||r(" "),r("? "),Mi(i,e),e.indentLevel--,o&&c(),o||r(" "),r(": ");const u=s.type===19;u||e.indentLevel++,Mi(s,e),u||e.indentLevel--,o&&l(!0)}function oK(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(oy)}(-1`),t.inVOnce&&n(", true"),n("),"),r(),n("(")),n(`_cache[${t.index}] = `),Mi(t.value,e),a&&(n(`).cacheIndex = ${t.index},`),r(),n(`${i(oy)}(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 rK=KL(/^(?:if|else|else-if)$/,(t,e,n)=>aK(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=c7(s,l,n);else{const c=lK(i.codegenNode);c.alternate=c7(s,l+i.branches.length-1,n)}}}));function aK(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=Xt("true",!1,s)}if(e.name==="if"){const s=l7(t,e),o={type:9,loc:OX(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&&zL(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=l7(t,e);r.branches.push(a);const l=i&&i(r,a,!1);Pb(a,n),l&&l(),n.currentNode=null}else n.onError(ss(30,t.loc));break}}}function l7(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:Tb(t,"key"),isTemplateIf:n}}function c7(t,e,n){return t.condition?Pk(t.condition,u7(t,e,n),Vs(n.helper(M1),['""',"true"])):u7(t,e,n)}function u7(t,e,n){const{helper:i}=n,s=Ps("key",Xt(`${e}`,!1,Uo,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 cy(l,s,n),l}else{let l=64;return Og(n,i(Ig),cr([s]),o,l,void 0,void 0,!0,!1,!1,t.loc)}else{const l=r.codegenNode,c=xX(l);return c.type===13&&Q6(c,n),cy(c,s,n),l}}function lK(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 cK=KL("for",(t,e,n)=>{const{helper:i,removeHelper:s}=n;return uK(t,e,n,o=>{const r=Vs(i(q6),[o.source]),a=ay(t),l=ir(t,"memo"),c=Tb(t,"key",!1,!0);c&&c.type;let u=c&&(c.type===6?c.value?Xt(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=Og(n,i(Ig),void 0,r,f,void 0,void 0,!0,!h,!1,t.loc),()=>{let p;const{children:m}=o,y=m.length!==1||m[0].type!==1,b=ly(t)?t:a&&t.children.length===1&&ly(t.children[0])?t.children[0]:null;if(b?(p=b.codegenNode,a&&d&&cy(p,d,n)):y?p=Og(n,i(Ig),d?cr([d]):void 0,t.children,64,void 0,void 0,!0,void 0,!1):(p=m[0].codegenNode,a&&d&&cy(p,d,n),p.isBlock!==!h&&(p.isBlock?(s(gd),s(Pf(n.inSSR,p.isComponent))):s(Tf(n.inSSR,p.isComponent))),p.isBlock=!h,p.isBlock?(i(gd),i(Pf(n.inSSR,p.isComponent))):i(Tf(n.inSSR,p.isComponent))),l){const k=Mf(Ok(o.parseResult,[Xt("_cached")]));k.body=hX([Nr(["const _memo = (",l.exp,")"]),Nr(["if (_cached",...u?[" && _cached.key === ",u]:[],` && ${n.helperString(LL)}(_cached, _memo)) return _cached`]),Nr(["const _item = ",p]),Xt("_item.memo = _memo"),Xt("return _item")]),r.arguments.push(k,Xt("_cache"),Xt(String(n.cached.length))),n.cached.push(null)}else r.arguments.push(Mf(Ok(o.parseResult),p,!0))}})});function uK(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}eO(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:ay(t)?t.children:[t]};n.replaceNode(h),a.vFor++;const f=i&&i(h);return()=>{a.vFor--,f&&f()}}function eO(t,e){t.finalized||(t.finalized=!0)}function Ok({value:t,key:e,index:n},i=[]){return dK([t,e,n,...i])}function dK(t){let e=t.length;for(;e--&&!t[e];);return t.slice(0,e+1).map((n,i)=>n||Xt("_".repeat(i+1),!1))}const d7=Xt("undefined",!1),hK=(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--}}},fK=(t,e,n,i)=>Mf(t,n,!1,!0,n.length?n[0].loc:i);function pK(t,e,n=fK){e.helper(Z6);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:y,exp:b}=l;y&&!lo(y)&&(a=!0),o.push(Ps(y||Xt("default",!0),n(b,void 0,i,s)))}let c=!1,u=!1;const d=[],h=new Set;let f=0;for(let y=0;y<i.length;y++){const b=i[y];let k;if(!ay(b)||!(k=ir(b,"slot",!0))){b.type!==3&&d.push(b);continue}if(l){e.onError(ss(37,k.loc));break}c=!0;const{children:C,loc:$}=b,{arg:S=Xt("default",!0),exp:M,loc:P}=k;let T;lo(S)?T=S?S.content:"default":a=!0;const I=ir(b,"for"),L=n(M,I,C,$);let R,V;if(R=ir(b,"if"))a=!0,r.push(Pk(R.exp,Hv(S,L,f++),d7));else if(V=ir(b,/^else(?:-if)?$/,!0)){let B=y,F;for(;B--&&(F=i[B],!!zL(F)););if(F&&ay(F)&&ir(F,/^(?:else-)?if$/)){let z=r[r.length-1];for(;z.alternate.type===19;)z=z.alternate;z.alternate=V.exp?Pk(V.exp,Hv(S,L,f++),d7):Hv(S,L,f++)}else e.onError(ss(30,V.loc))}else if(I){a=!0;const B=I.forParseResult;B?(eO(B),r.push(Vs(e.helper(q6),[B.source,Mf(Ok(B),Hv(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 y=(b,k)=>{const C=n(b,void 0,k,s);return e.compatConfig&&(C.isNonScopedSlot=!0),Ps("default",C)};c?d.length&&!d.every(n4)&&(u?e.onError(ss(39,d[0].loc)):o.push(y(void 0,d))):o.push(y(void 0,i))}const p=a?2:P0(t.children)?3:1;let m=cr(o.concat(Ps("_",Xt(p+"",!1))),s);return r.length&&(m=Vs(e.helper(IL),[m,Zu(r)])),{slots:m,hasDynamicSlots:a}}function Hv(t,e,n){const i=[Ps("name",t),Ps("fn",e)];return n!=null&&i.push(Ps("key",Xt(String(n),!0))),cr(i)}function P0(t){for(let e=0;e<t.length;e++){const n=t[e];switch(n.type){case 1:if(n.tagType===2||P0(n.children))return!0;break;case 9:if(P0(n.branches))return!0;break;case 10:case 11:if(P0(n.children))return!0;break}}return!1}const tO=new WeakMap,mK=(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?gK(t,e):`"${i}"`;const a=yt(r)&&r.callee===U6;let l,c,u=0,d,h,f,p=a||r===qm||r===F6||!o&&(i==="svg"||i==="foreignObject"||i==="math");if(s.length>0){const m=nO(t,e,void 0,o,a);l=m.props,u=m.patchFlag,h=m.dynamicPropNames;const y=m.directives;f=y&&y.length?Zu(y.map(b=>_K(b,e))):void 0,m.shouldUseBlock&&(p=!0)}if(t.children.length>0)if(r===sy&&(p=!0,u|=1024),o&&r!==qm&&r!==sy){const{slots:y,hasDynamicSlots:b}=pK(t,e);c=y,b&&(u|=1024)}else if(t.children.length===1&&r!==qm){const y=t.children[0],b=y.type,k=b===5||b===8;k&&To(y,e)===0&&(u|=1),k||b===2?c=y:c=t.children}else c=t.children;h&&h.length&&(d=yK(h)),t.codegenNode=Og(e,r,l,c,u===0?void 0:u,d,f,!!p,!1,o,t.loc)};function gK(t,e,n=!1){let{tag:i}=t;const s=Dk(i),o=Tb(t,"is",!1,!0);if(o)if(s||Ju("COMPILER_IS_ON_ELEMENT",e)){let a;if(o.type===6?a=o.value&&Xt(o.value.content,!0):(a=o.exp,a||(a=Xt("is",!1,o.arg.loc))),a)return Vs(e.helper(U6),[a])}else o.type===6&&o.value.content.startsWith("vue:")&&(i=o.value.content.slice(4));const r=DL(i)||e.isBuiltInComponent(i);return r?(n||e.helper(r),r):(e.helper(H6),e.components.add(i),Rg(i,"component"))}function nO(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,y=!1,b=!1,k=!1,C=!1,$=!1;const S=[],M=L=>{c.length&&(u.push(cr(h7(c),a)),c=[]),L&&u.push(L)},P=()=>{e.scopes.vFor>0&&c.push(Ps(Xt("ref_for",!0),Xt("true")))},T=({key:L,value:R})=>{if(lo(L)){const V=L.content,B=Pd(V);if(B&&(!i||s)&&V.toLowerCase()!=="onclick"&&V!=="onUpdate:modelValue"&&!ul(V)&&(k=!0),B&&ul(V)&&($=!0),B&&R.type===14&&(R=R.arguments[0]),R.type===20||(R.type===4||R.type===8)&&To(R,e)>0)return;V==="ref"?m=!0:V==="class"?y=!0:V==="style"?b=!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:B,nameLoc:F,value:z}=R;let U=!0;if(B==="ref"&&(m=!0,P()),B==="is"&&(Dk(r)||z&&z.content.startsWith("vue:")||Ju("COMPILER_IS_ON_ELEMENT",e)))continue;c.push(Ps(Xt(B,!0,F),Xt(z?z.content:"",U,z?z.loc:V)))}else{const{name:V,arg:B,exp:F,loc:z,modifiers:U}=R,G=V==="bind",K=V==="on";if(V==="slot"){i||e.onError(ss(40,z));continue}if(V==="once"||V==="memo"||V==="is"||G&&Du(B,"is")&&(Dk(r)||Ju("COMPILER_IS_ON_ELEMENT",e))||K&&o)continue;if((G&&Du(B,"key")||K&&h&&Du(B,"vue:before-update"))&&(f=!0),G&&Du(B,"ref")&&P(),!B&&(G||K)){if(C=!0,F)if(G){if(M(),Ju("COMPILER_V_BIND_OBJECT_ORDER",e)){u.unshift(F);continue}P(),M(),u.push(F)}else M({type:14,loc:z,callee:e.helper(K6),arguments:i?[F]:[F,"true"]});else e.onError(ss(G?34:35,z));continue}G&&U.some(W=>W.content==="prop")&&(p|=32);const X=e.directiveTransforms[V];if(X){const{props:W,needRuntime:Q}=X(R,t,e);!o&&W.forEach(T),K&&B&&!lo(B)?M(cr(W,a)):c.push(...W),Q&&(d.push(R),mo(Q)&&tO.set(R,Q))}else FW(V)||(d.push(R),h&&(f=!0))}}let I;if(u.length?(M(),u.length>1?I=Vs(e.helper(iy),u,a):I=u[0]):c.length&&(I=cr(h7(c),a)),C?p|=16:(y&&!i&&(p|=2),b&&!i&&(p|=4),S.length&&(p|=8),k&&(p|=32)),!f&&(p===0||p===32)&&(m||$||d.length>0)&&(p|=512),!e.inSSR&&I)switch(I.type){case 15:let L=-1,R=-1,V=!1;for(let z=0;z<I.properties.length;z++){const U=I.properties[z].key;lo(U)?U.content==="class"?L=z:U.content==="style"&&(R=z):U.isHandlerKey||(V=!0)}const B=I.properties[L],F=I.properties[R];V?I=Vs(e.helper(Lg),[I]):(B&&!lo(B.value)&&(B.value=Vs(e.helper(G6),[B.value])),F&&(b||F.value.type===4&&F.value.content.trim()[0]==="["||F.value.type===17)&&(F.value=Vs(e.helper(X6),[F.value])));break;case 14:break;default:I=Vs(e.helper(Lg),[Vs(e.helper(T1),[I])]);break}return{props:I,directives:d,patchFlag:p,dynamicPropNames:S,shouldUseBlock:f}}function h7(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"||Pd(o))&&vK(r,s):(e.set(o,s),n.push(s))}return n}function vK(t,e){t.value.type===17?t.value.elements.push(e.value):t.value=Zu([t.value,e.value],t.loc)}function _K(t,e){const n=[],i=tO.get(t);i?n.push(e.helperString(i)):(e.helper(j6),e.directives.add(t.name),n.push(Rg(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=Xt("true",!1,s);n.push(cr(t.modifiers.map(r=>Ps(r,o)),s))}return Zu(n,t.loc)}function yK(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 Dk(t){return t==="component"||t==="Component"}const bK=(t,e)=>{if(ly(t)){const{children:n,loc:i}=t,{slotName:s,slotProps:o}=wK(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(PL),r,i)}};function wK(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"&&Du(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=Xt(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}=nO(t,e,s,!1,!1);i=o,r.length&&e.onError(ss(36,r[0].loc))}return{slotName:n,slotProps:i}}const sO=(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)?qu(Un(d)):`on:${d}`;a=Xt(h,!0,r.loc)}else a=Nr([`${n.helperString(Tk)}(`,r,")"]);else a=r,a.children.unshift(`${n.helperString(Tk)}(`),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=FL(l),h=!(d||bX(l)),f=l.content.includes(";");(h||c&&d)&&(l=Nr([`${h?"$event":"(...args)"} => ${f?"{":"("}`,l,f?"}":")"]))}let u={props:[Ps(a,l||Xt("() => {}",!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},kK=(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(Mk)}(${o.content})`:(o.children.unshift(`${n.helperString(Mk)}(`),o.children.push(")"))),n.inSSR||(i.some(a=>a.content==="prop")&&f7(o,"."),i.some(a=>a.content==="attr")&&f7(o,"^")),{props:[Ps(o,r)]}},f7=(t,e)=>{t.type===4?t.isStatic?t.content=e+t.content:t.content=`\`${e}\${${t.content}}\``:(t.children.unshift(`'${e}' + (`),t.children.push(")"))},CK=(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(mw(r)){s=!0;for(let a=o+1;a<n.length;a++){const l=n[a];if(mw(l))i||(i=n[o]=Nr([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(mw(r)||r.type===8){const a=[];(r.type!==2||r.content!==" ")&&a.push(r),!e.ssr&&To(r,e)===0&&a.push("1"),n[o]={type:12,content:r,loc:r.loc,codegenNode:Vs(e.helper(z6),a)}}}}},p7=new WeakSet,xK=(t,e)=>{if(t.type===1&&ir(t,"once",!0))return p7.has(t)||e.inVOnce||e.inSSR?void 0:(p7.add(t),e.inVOnce=!0,e.helper(oy),()=>{e.inVOnce=!1;const n=e.currentNode;n.codegenNode&&(n.codegenNode=e.cache(n.codegenNode,!0,!0))})},iO=(t,e,n)=>{const{exp:i,arg:s}=t;if(!i)return n.onError(ss(41,t.loc)),jp();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)),jp();if(a==="literal-const"||a==="setup-const")return n.onError(ss(45,i.loc)),jp();if(!r.trim()||!FL(i))return n.onError(ss(42,i.loc)),jp();const l=s||Xt("modelValue",!0),c=s?lo(s)?`onUpdate:${Un(s.content)}`:Nr(['"onUpdate:" + ',s]):"onUpdate:modelValue";let u;const d=n.isTS?"($event: any)":"$event";u=Nr([`${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=>(t4(m)?m:JSON.stringify(m))+": true").join(", "),p=s?lo(s)?`${s.content}Modifiers`:Nr([s,' + "Modifiers"']):"modelModifiers";h.push(Ps(p,Xt(`{ ${f} }`,!1,t.loc,2)))}return jp(h)};function jp(t=[]){return{props:t}}const SK=/[\w).+\-_$\]]/,$K=(t,e)=>{Ju("COMPILER_FILTERS",e)&&(t.type===5?uy(t.content,e):t.type===1&&t.props.forEach(n=>{n.type===7&&n.name!=="for"&&n.exp&&uy(n.exp,e)}))};function uy(t,e){if(t.type===4)m7(t,e);else for(let n=0;n<t.children.length;n++){const i=t.children[n];typeof i=="object"&&(i.type===4?m7(i,e):i.type===8?uy(t,e):i.type===5&&uy(i.content,e))}}function m7(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()):y();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 b=f-1,k;for(;b>=0&&(k=n.charAt(b),k===" ");b--);(!k||!SK.test(k))&&(r=!0)}}p===void 0?p=n.slice(0,f).trim():u!==0&&y();function y(){m.push(n.slice(u,f).trim()),u=f+1}if(m.length){for(f=0;f<m.length;f++)p=AK(p,m[f],e);t.content=p,t.ast=void 0}}function AK(t,e,n){n.helper(W6);const i=e.indexOf("(");if(i<0)return n.filters.add(e),`${Rg(e,"filter")}(${t})`;{const s=e.slice(0,i),o=e.slice(i+1);return n.filters.add(s),`${Rg(s,"filter")}(${t}${o!==")"?","+o:o}`}}const g7=new WeakSet,EK=(t,e)=>{if(t.type===1){const n=ir(t,"memo");return!n||g7.has(t)||e.inSSR?void 0:(g7.add(t),()=>{const i=t.codegenNode||e.currentNode.codegenNode;i&&i.type===13&&(t.tagType!==1&&Q6(i,e),t.codegenNode=Vs(e.helper(J6),[n.exp,Mf(void 0,i),"_cache",String(e.cached.length)]),e.cached.push(null))})}},MK=(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=Xt("",!0,i.loc);else{const s=Un(i.content);(RL.test(s[0])||s[0]==="-")&&(n.exp=Xt(s,!1,i.loc))}}}};function TK(t){return[[MK,xK,rK,EK,cK,$K,bK,mK,hK,CK],{on:sO,bind:kK,model:iO}]}function PK(t,e={}){const n=e.onError||e4,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)?VX(t,o):t,[a,l]=TK();return zX(r,cn({},o,{nodeTransforms:[...a,...e.nodeTransforms||[]],directiveTransforms:cn({},l,e.directiveTransforms||{})})),WX(r,o)}const IK=()=>({props:[]});/**
30 * @vue/compiler-dom v3.5.27
31 * (c) 2018-present Yuxi (Evan) You and Vue contributors
32 * @license MIT
33 **/const oO=Symbol(""),rO=Symbol(""),aO=Symbol(""),lO=Symbol(""),Rk=Symbol(""),cO=Symbol(""),uO=Symbol(""),dO=Symbol(""),hO=Symbol(""),fO=Symbol("");cX({[oO]:"vModelRadio",[rO]:"vModelCheckbox",[aO]:"vModelText",[lO]:"vModelSelect",[Rk]:"vModelDynamic",[cO]:"withModifiers",[uO]:"withKeys",[dO]:"vShow",[hO]:"Transition",[fO]:"TransitionGroup"});let oh;function LK(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 OK={parseMode:"html",isVoidTag:eY,isNativeTag:t=>ZW(t)||JW(t)||QW(t),isPreTag:t=>t==="pre",isIgnoreNewlineTag:t=>t==="pre"||t==="textarea",decodeEntities:LK,isBuiltInComponent:t=>{if(t==="Transition"||t==="transition")return hO;if(t==="TransitionGroup"||t==="transition-group")return fO},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}},DK=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:Xt("style",!0,e.loc),exp:RK(e.value.content,e.loc),modifiers:[],loc:e.loc})})},RK=(t,e)=>{const n=IP(t);return Xt(JSON.stringify(n),!1,e,3)};function $c(t,e){return ss(t,e)}const VK=(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(Xt("innerHTML",!0,s),i||Xt("",!0))]}},FK=(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(Xt("textContent",!0),i?To(i,n)>0?i:Vs(n.helperString(Mb),[i],s):Xt("",!0))]}},NK=(t,e,n)=>{const i=iO(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=aO,a=!1;if(s==="input"||o){const l=Tb(e,"type");if(l){if(l.type===7)r=Rk;else if(l.value)switch(l.value.content){case"radio":r=oO;break;case"checkbox":r=rO;break;case"file":a=!0,n.onError($c(60,t.loc));break}}else wX(e)&&(r=Rk)}else s==="select"&&(r=lO);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},BK=zo("passive,once,capture"),zK=zo("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),HK=zo("left,right"),pO=zo("onkeyup,onkeydown,onkeypress"),UK=(t,e,n,i)=>{const s=[],o=[],r=[];for(let a=0;a<e.length;a++){const l=e[a].content;l==="native"&&Dg("COMPILER_V_ON_NATIVE",n)||BK(l)?r.push(l):HK(l)?lo(t)?pO(t.content.toLowerCase())?s.push(l):o.push(l):(s.push(l),o.push(l)):zK(l)?o.push(l):s.push(l)}return{keyModifiers:s,nonKeyModifiers:o,eventOptionModifiers:r}},v7=(t,e)=>lo(t)&&t.content.toLowerCase()==="onclick"?Xt(e,!0):t.type!==4?Nr(["(",t,`) === "onClick" ? "${e}" : (`,t,")"]):t,jK=(t,e,n)=>sO(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}=UK(o,s,n,t.loc);if(l.includes("right")&&(o=v7(o,"onContextmenu")),l.includes("middle")&&(o=v7(o,"onMouseup")),l.length&&(r=Vs(n.helper(cO),[r,JSON.stringify(l)])),a.length&&(!lo(o)||pO(o.content.toLowerCase()))&&(r=Vs(n.helper(uO),[r,JSON.stringify(a)])),c.length){const u=c.map(Gc).join("");o=lo(o)?Xt(`${o.content}${u}`,!0):Nr(["(",o,`) + "${u}"`])}return{props:[Ps(o,r)]}}),WK=(t,e,n)=>{const{exp:i,loc:s}=t;return i||n.onError($c(62,s)),{props:[],needRuntime:n.helper(dO)}},YK=(t,e)=>{t.type===1&&t.tagType===0&&(t.tag==="script"||t.tag==="style")&&e.removeNode()},qK=[DK],GK={cloak:IK,html:VK,text:FK,model:NK,on:jK,show:WK};function XK(t,e={}){return PK(t,cn({},OK,e,{nodeTransforms:[YK,...qK,...e.nodeTransforms||[]],directiveTransforms:cn({},GK,e.directiveTransforms||{}),transformHoist:null}))}/**
34 * vue v3.5.27
35 * (c) 2018-present Yuxi (Evan) You and Vue contributors
36 * @license MIT
37 **/const _7=Object.create(null);function KK(t,e){if(!Ke(t))if(t.nodeType)t=t.innerHTML;else return Dt;const n=zW(t,e),i=_7[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}=XK(t,s),r=new Function("Vue",o)(sX);return r._rc=!0,_7[n]=r}JI(KK);/*!
38 * vue-router v4.4.4
39 * (c) 2024 Eduardo San Martin Morote
40 * @license MIT
41 */const $h=typeof document<"u";function mO(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function ZK(t){return t.__esModule||t[Symbol.toStringTag]==="Module"||t.default&&mO(t.default)}const On=Object.assign;function vw(t,e){const n={};for(const i in e){const s=e[i];n[i]=Xr(s)?s.map(t):t(s)}return n}const Gm=()=>{},Xr=Array.isArray,gO=/#/g,JK=/&/g,QK=/\//g,eZ=/=/g,tZ=/\?/g,vO=/\+/g,nZ=/%5B/g,sZ=/%5D/g,_O=/%5E/g,iZ=/%60/g,yO=/%7B/g,oZ=/%7C/g,bO=/%7D/g,rZ=/%20/g;function o4(t){return encodeURI(""+t).replace(oZ,"|").replace(nZ,"[").replace(sZ,"]")}function aZ(t){return o4(t).replace(yO,"{").replace(bO,"}").replace(_O,"^")}function Vk(t){return o4(t).replace(vO,"%2B").replace(rZ,"+").replace(gO,"%23").replace(JK,"%26").replace(iZ,"`").replace(yO,"{").replace(bO,"}").replace(_O,"^")}function lZ(t){return Vk(t).replace(eZ,"%3D")}function cZ(t){return o4(t).replace(gO,"%23").replace(tZ,"%3F")}function uZ(t){return t==null?"":cZ(t).replace(QK,"%2F")}function Fg(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const dZ=/\/$/,hZ=t=>t.replace(dZ,"");function _w(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=gZ(i??e,n),{fullPath:i+(o&&"?")+o+r,path:i,query:s,hash:Fg(r)}}function fZ(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function y7(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function pZ(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])&&wO(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 wO(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!mZ(t[n],e[n]))return!1;return!0}function mZ(t,e){return Xr(t)?b7(t,e):Xr(e)?b7(e,t):t===e}function b7(t,e){return Xr(e)?t.length===e.length&&t.every((n,i)=>n===e[i]):t.length===1&&t[0]===e}function gZ(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 Ng;(function(t){t.pop="pop",t.push="push"})(Ng||(Ng={}));var Xm;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Xm||(Xm={}));function vZ(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),hZ(t)}const _Z=/^[^#]+#/;function yZ(t,e){return t.replace(_Z,"#")+e}function bZ(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 Lb=()=>({left:window.scrollX,top:window.scrollY});function wZ(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=bZ(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 w7(t,e){return(history.state?history.state.position-e:-1)+t}const Fk=new Map;function kZ(t,e){Fk.set(t,e)}function CZ(t){const e=Fk.get(t);return Fk.delete(t),e}let xZ=()=>location.protocol+"//"+location.host;function kO(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),y7(l,"")}return y7(n,t)+i+s}function SZ(t,e,n,i){let s=[],o=[],r=null;const a=({state:h})=>{const f=kO(t,location),p=n.value,m=e.value;let y=0;if(h){if(n.value=f,e.value=h,r&&r===p){r=null;return}y=m?h.position-m.position:0}else i(f);s.forEach(b=>{b(n.value,p,{delta:y,type:Ng.pop,direction:y?y>0?Xm.forward:Xm.back:Xm.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:Lb()}),"")}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 k7(t,e,n,i=!1,s=!1){return{back:t,current:e,forward:n,replaced:i,position:window.history.length,scroll:s?Lb():null}}function $Z(t){const{history:e,location:n}=window,i={value:kO(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:xZ()+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,k7(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:Lb()});o(u.current,u,!0);const d=On({},k7(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 CO(t){t=vZ(t);const e=$Z(t),n=SZ(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:yZ.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 AZ(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),CO(t)}function EZ(t){return typeof t=="string"||t&&typeof t=="object"}function xO(t){return typeof t=="string"||typeof t=="symbol"}const SO=Symbol("");var C7;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(C7||(C7={}));function Lf(t,e){return On(new Error,{type:t,[SO]:!0},e)}function Wa(t,e){return t instanceof Error&&SO in t&&(e==null||!!(t.type&e))}const x7="[^/]+?",MZ={sensitive:!1,strict:!1,start:!0,end:!0},TZ=/[.+*?^${}()[\]/\\]/g;function PZ(t,e){const n=On({},MZ,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(TZ,"\\$&"),f+=40;else if(h.type===1){const{value:p,repeatable:m,optional:y,regexp:b}=h;o.push({name:p,repeatable:m,optional:y});const k=b||x7;if(k!==x7){f+=10;try{new RegExp(`(${k})`)}catch($){throw new Error(`Invalid custom RegExp for param "${p}" (${k}): `+$.message)}}let C=m?`((?:${k})(?:/(?:${k}))*)`:`(${k})`;d||(C=y&&c.length<2?`(?:/${C})`:"/"+C),y&&(C+="?"),s+=C,f+=20,y&&(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:y}=f,b=p in c?c[p]:"";if(Xr(b)&&!m)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const k=Xr(b)?b.join("/"):b;if(!k)if(y)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 IZ(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 $O(t,e){let n=0;const i=t.score,s=e.score;for(;n<i.length&&n<s.length;){const o=IZ(i[n],s[n]);if(o)return o;n++}if(Math.abs(s.length-i.length)===1){if(S7(i))return 1;if(S7(s))return-1}return s.length-i.length}function S7(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const LZ={type:0,value:""},OZ=/[a-zA-Z0-9_]/;function DZ(t){if(!t)return[[]];if(t==="/")return[[LZ]];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:OZ.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 RZ(t,e,n){const i=PZ(DZ(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 VZ(t,e){const n=[],i=new Map;e=E7({strict:!1,end:!0,sensitive:!1},e);function s(d){return i.get(d)}function o(d,h,f){const p=!f,m=FZ(d);m.aliasOf=f&&f.record;const y=E7(e,d),b=[m];if("alias"in d){const $=typeof d.alias=="string"?[d.alias]:d.alias;for(const S of $)b.push(On({},m,{components:f?f.record.components:m.components,path:S,aliasOf:f?f.record:m}))}let k,C;for(const $ of b){const{path:S}=$;if(h&&S[0]!=="/"){const M=h.record.path,P=M[M.length-1]==="/"?"":"/";$.path=h.record.path+(S&&P+S)}if(k=RZ($,h,y),f?f.alias.push(k):(C=C||k,C!==k&&C.alias.push(k),p&&d.name&&!A7(k)&&r(d.name)),AO(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)}:Gm}function r(d){if(xO(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=zZ(d,n);n.splice(h,0,d),d.record.name&&!A7(d)&&i.set(d.record.name,d)}function c(d,h){let f,p={},m,y;if("name"in d&&d.name){if(f=i.get(d.name),!f)throw Lf(1,{location:d});y=f.record.name,p=On($7(h.params,f.keys.filter(C=>!C.optional).concat(f.parent?f.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),d.params&&$7(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),y=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});y=f.record.name,p=On({},h.params,d.params),m=f.stringify(p)}const b=[];let k=f;for(;k;)b.unshift(k.record),k=k.parent;return{name:y,path:m,params:p,matched:b,meta:BZ(b)}}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 $7(t,e){const n={};for(const i of e)i in t&&(n[i]=t[i]);return n}function FZ(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:NZ(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 NZ(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 A7(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function BZ(t){return t.reduce((e,n)=>On(e,n.meta),{})}function E7(t,e){const n={};for(const i in t)n[i]=i in e?e[i]:t[i];return n}function zZ(t,e){let n=0,i=e.length;for(;n!==i;){const o=n+i>>1;$O(t,e[o])<0?i=o:n=o+1}const s=HZ(t);return s&&(i=e.lastIndexOf(s,i-1)),i}function HZ(t){let e=t;for(;e=e.parent;)if(AO(e)&&$O(t,e)===0)return e}function AO({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function UZ(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(vO," "),r=o.indexOf("="),a=Fg(r<0?o:o.slice(0,r)),l=r<0?null:Fg(o.slice(r+1));if(a in e){let c=e[a];Xr(c)||(c=e[a]=[c]),c.push(l)}else e[a]=l}return e}function M7(t){let e="";for(let n in t){const i=t[n];if(n=lZ(n),i==null){i!==void 0&&(e+=(e.length?"&":"")+n);continue}(Xr(i)?i.map(o=>o&&Vk(o)):[i&&Vk(i)]).forEach(o=>{o!==void 0&&(e+=(e.length?"&":"")+n,o!=null&&(e+="="+o))})}return e}function jZ(t){const e={};for(const n in t){const i=t[n];i!==void 0&&(e[n]=Xr(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return e}const WZ=Symbol(""),T7=Symbol(""),r4=Symbol(""),EO=Symbol(""),Nk=Symbol("");function Wp(){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):EZ(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 yw(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(mO(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=ZK(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 P7(t){const e=qe(r4),n=qe(EO),i=Y(()=>{const l=E(t.to);return e.resolve(l)}),s=Y(()=>{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=I7(l[c-2]);return c>1&&I7(u)===f&&d[d.length-1].path!==f?d.findIndex(If.bind(null,l[c-2])):h}),o=Y(()=>s.value>-1&&XZ(n.params,i.value.params)),r=Y(()=>s.value>-1&&s.value===n.matched.length-1&&wO(n.params,i.value.params));function a(l={}){return GZ(l)?e[E(t.replace)?"replace":"push"](E(t.to)).catch(Gm):Promise.resolve()}return{route:i,href:Y(()=>i.value.href),isActive:o,isExactActive:r,navigate:a}}const YZ=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:P7,setup(t,{slots:e}){const n=In(P7(t)),{options:i}=qe(r4),s=Y(()=>({[L7(t.activeClass,i.linkActiveClass,"router-link-active")]:n.isActive,[L7(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)}}}),qZ=YZ;function GZ(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 XZ(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(!Xr(s)||s.length!==i.length||i.some((o,r)=>o!==s[r]))return!1}return!0}function I7(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const L7=(t,e,n)=>t??e??n,KZ=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(Nk),s=Y(()=>t.route||i.value),o=qe(T7,0),r=Y(()=>{let c=E(o);const{matched:u}=s.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=Y(()=>s.value.matched[r.value]);Pt(T7,Y(()=>r.value+1)),Pt(WZ,a),Pt(Nk,s);const l=J();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 O7(n.default,{Component:h,route:c});const f=d.props[u],p=f?f===!0?c.params:typeof f=="function"?f(c):f:null,y=bt(h,On({},p,e,{onVnodeUnmounted:b=>{b.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return O7(n.default,{Component:y,route:c})||y}}});function O7(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const ZZ=KZ;function D7(t){const e=VZ(t.routes,t),n=t.parseQuery||UZ,i=t.stringifyQuery||M7,s=t.history,o=Wp(),r=Wp(),a=Wp(),l=Fn(zl);let c=zl;$h&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=vw.bind(null,oe=>""+oe),d=vw.bind(null,uZ),h=vw.bind(null,Fg);function f(oe,pe){let ie,re;return xO(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 y(oe){return!!e.getRecordMatcher(oe)}function b(oe,pe){if(pe=On({},pe||l.value),typeof oe=="string"){const se=_w(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:Fg(se.hash),redirectedFrom:void 0,href:$e})}let ie;if(oe.path!=null)ie=On({},oe,{path:_w(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=fZ(i,On({},oe,{hash:aZ(ke),path:re.path})),te=s.createHref(je);return On({fullPath:je,hash:ke,query:i===M7?jZ(oe.query):oe.query||{}},re,{redirectedFrom:void 0,href:te})}function k(oe){return typeof oe=="string"?_w(n,oe,l.value.path):On({},oe)}function C(oe,pe){if(c!==oe)return Lf(8,{from:pe,to:oe})}function $(oe){return P(oe)}function S(oe){return $(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=b(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&&pZ(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:W(Se):K(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]=JZ(oe,pe);ie=yw(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=yw(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(Xr(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=yw(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),W()}let B;function F(){B||(B=s.listen((oe,pe,ie)=>{if(!ge.listening)return;const re=b(oe),ke=M(re);if(ke){P(On(ke,{replace:!0}),re).catch(Gm);return}c=re;const je=l.value;$h&&kZ(w7(je.fullPath,ie.delta),Lb()),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===Ng.pop&&s.go(-1,!1)}).catch(Gm),Promise.reject()):(ie.delta&&s.go(-ie.delta,!1),K(te,re,je))).then(te=>{te=te||V(re,je,!1),te&&(ie.delta&&!Wa(te,8)?s.go(-ie.delta,!1):ie.type===Ng.pop&&Wa(te,20)&&s.go(-1,!1)),R(re,je,te)}).catch(Gm)}))}let z=Wp(),U=Wp(),G;function K(oe,pe,ie){W(oe);const re=U.list();return re.length?re.forEach(ke=>ke(oe,pe,ie)):console.error(oe),Promise.reject(oe)}function X(){return G&&l.value!==zl?Promise.resolve():new Promise((oe,pe)=>{z.add([oe,pe])})}function W(oe){return G||(G=!oe,F(),z.list().forEach(([pe,ie])=>oe?ie(oe):pe()),z.reset()),oe}function Q(oe,pe,ie,re){const{scrollBehavior:ke}=t;if(!$h||!ke)return Promise.resolve();const je=!ie&&CZ(w7(oe.fullPath,0))||(re||!ie)&&history.state&&history.state.scroll||null;return ot().then(()=>ke(oe,pe,je)).then(te=>te&&wZ(te)).catch(te=>K(te,oe,pe))}const ne=oe=>s.go(oe);let Z;const ae=new Set,ge={currentRoute:l,listening:!0,addRoute:f,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:y,getRoutes:m,resolve:b,options:t,push:$,replace:S,go:ne,back:()=>ne(-1),forward:()=>ne(1),beforeEach:o.add,beforeResolve:r.add,afterEach:a.add,onError:U.add,isReady:X,install(oe){const pe=this;oe.component("RouterLink",qZ),oe.component("RouterView",ZZ),oe.config.globalProperties.$router=pe,Object.defineProperty(oe.config.globalProperties,"$route",{enumerable:!0,get:()=>E(l)}),$h&&!Z&&l.value===zl&&(Z=!0,$(s.location).catch(ke=>{}));const ie={};for(const ke in zl)Object.defineProperty(ie,ke,{get:()=>l.value[ke],enumerable:!0});oe.provide(r4,pe),oe.provide(EO,k6(ie)),oe.provide(Nk,l);const re=oe.unmount;ae.add(oe),oe.unmount=function(){ae.delete(oe),ae.size<1&&(c=zl,B&&B(),B=null,l.value=zl,Z=!1,G=!1),re()}}};function Ce(oe){return oe.reduce((pe,ie)=>pe.then(()=>I(ie)),Promise.resolve())}return ge}function JZ(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"},QZ=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],Mt="update:modelValue",dn="change",Do="input",$l=["","default","small","large"],a4=11,eJ=2;var tJ=typeof global=="object"&&global&&global.Object===Object&&global;const MO=tJ;var nJ=typeof self=="object"&&self&&self.Object===Object&&self,sJ=MO||nJ||Function("return this")();const ta=sJ;var iJ=ta.Symbol;const yr=iJ;var TO=Object.prototype,oJ=TO.hasOwnProperty,rJ=TO.toString,Yp=yr?yr.toStringTag:void 0;function aJ(t){var e=oJ.call(t,Yp),n=t[Yp];try{t[Yp]=void 0;var i=!0}catch{}var s=rJ.call(t);return i&&(e?t[Yp]=n:delete t[Yp]),s}var lJ=Object.prototype,cJ=lJ.toString;function uJ(t){return cJ.call(t)}var dJ="[object Null]",hJ="[object Undefined]",R7=yr?yr.toStringTag:void 0;function Rd(t){return t==null?t===void 0?hJ:dJ:R7&&R7 in Object(t)?aJ(t):uJ(t)}function Ea(t){return t!=null&&typeof t=="object"}var fJ="[object Symbol]";function Ob(t){return typeof t=="symbol"||Ea(t)&&Rd(t)==fJ}function l4(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 pJ=Array.isArray;const Yi=pJ;var mJ=1/0,V7=yr?yr.prototype:void 0,F7=V7?V7.toString:void 0;function PO(t){if(typeof t=="string")return t;if(Yi(t))return l4(t,PO)+"";if(Ob(t))return F7?F7.call(t):"";var e=t+"";return e=="0"&&1/t==-mJ?"-0":e}var gJ=/\s/;function vJ(t){for(var e=t.length;e--&&gJ.test(t.charAt(e)););return e}var _J=/^\s+/;function yJ(t){return t&&t.slice(0,vJ(t)+1).replace(_J,"")}function qi(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var N7=0/0,bJ=/^[-+]0x[0-9a-f]+$/i,wJ=/^0b[01]+$/i,kJ=/^0o[0-7]+$/i,CJ=parseInt;function rf(t){if(typeof t=="number")return t;if(Ob(t))return N7;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=yJ(t);var n=wJ.test(t);return n||kJ.test(t)?CJ(t.slice(2),n?2:8):bJ.test(t)?N7:+t}var B7=1/0,xJ=17976931348623157e292;function SJ(t){if(!t)return t===0?t:0;if(t=rf(t),t===B7||t===-B7){var e=t<0?-1:1;return e*xJ}return t===t?t:0}function $J(t){var e=SJ(t),n=e%1;return e===e?n?e-n:e:0}function c4(t){return t}var AJ="[object AsyncFunction]",EJ="[object Function]",MJ="[object GeneratorFunction]",TJ="[object Proxy]";function u4(t){if(!qi(t))return!1;var e=Rd(t);return e==EJ||e==MJ||e==AJ||e==TJ}var PJ=ta["__core-js_shared__"];const bw=PJ;var z7=function(){var t=/[^.]+$/.exec(bw&&bw.keys&&bw.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function IJ(t){return!!z7&&z7 in t}var LJ=Function.prototype,OJ=LJ.toString;function Vd(t){if(t!=null){try{return OJ.call(t)}catch{}try{return t+""}catch{}}return""}var DJ=/[\\^$.*+?()[\]{}|]/g,RJ=/^\[object .+?Constructor\]$/,VJ=Function.prototype,FJ=Object.prototype,NJ=VJ.toString,BJ=FJ.hasOwnProperty,zJ=RegExp("^"+NJ.call(BJ).replace(DJ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function HJ(t){if(!qi(t)||IJ(t))return!1;var e=u4(t)?zJ:RJ;return e.test(Vd(t))}function UJ(t,e){return t==null?void 0:t[e]}function Fd(t,e){var n=UJ(t,e);return HJ(n)?n:void 0}var jJ=Fd(ta,"WeakMap");const Bk=jJ;var H7=Object.create,WJ=function(){function t(){}return function(e){if(!qi(e))return{};if(H7)return H7(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();const YJ=WJ;function qJ(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 IO(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}var GJ=800,XJ=16,KJ=Date.now;function ZJ(t){var e=0,n=0;return function(){var i=KJ(),s=XJ-(i-n);if(n=i,s>0){if(++e>=GJ)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function JJ(t){return function(){return t}}var QJ=function(){try{var t=Fd(Object,"defineProperty");return t({},"",{}),t}catch{}}();const dy=QJ;var eQ=dy?function(t,e){return dy(t,"toString",{configurable:!0,enumerable:!1,value:JJ(e),writable:!0})}:c4;const tQ=eQ;var nQ=ZJ(tQ);const LO=nQ;function sQ(t,e){for(var n=-1,i=t==null?0:t.length;++n<i&&e(t[n],n,t)!==!1;);return t}function iQ(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 oQ=9007199254740991,rQ=/^(?:0|[1-9]\d*)$/;function Db(t,e){var n=typeof t;return e=e??oQ,!!e&&(n=="number"||n!="symbol"&&rQ.test(t))&&t>-1&&t%1==0&&t<e}function d4(t,e,n){e=="__proto__"&&dy?dy(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function I1(t,e){return t===e||t!==t&&e!==e}var aQ=Object.prototype,lQ=aQ.hasOwnProperty;function h4(t,e,n){var i=t[e];(!(lQ.call(t,e)&&I1(i,n))||n===void 0&&!(e in t))&&d4(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?d4(n,a,l):h4(n,a,l)}return n}var U7=Math.max;function OO(t,e,n){return e=U7(e===void 0?t.length-1:e,0),function(){for(var i=arguments,s=-1,o=U7(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),qJ(t,this,a)}}function cQ(t,e){return LO(OO(t,e,c4),t+"")}var uQ=9007199254740991;function f4(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=uQ}function cp(t){return t!=null&&f4(t.length)&&!u4(t)}function dQ(t,e,n){if(!qi(n))return!1;var i=typeof e;return(i=="number"?cp(n)&&Db(e,n.length):i=="string"&&e in n)?I1(n[e],t):!1}function hQ(t){return cQ(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&&dQ(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 fQ=Object.prototype;function p4(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||fQ;return t===n}function pQ(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}var mQ="[object Arguments]";function j7(t){return Ea(t)&&Rd(t)==mQ}var DO=Object.prototype,gQ=DO.hasOwnProperty,vQ=DO.propertyIsEnumerable,_Q=j7(function(){return arguments}())?j7:function(t){return Ea(t)&&gQ.call(t,"callee")&&!vQ.call(t,"callee")};const Bg=_Q;function yQ(){return!1}var RO=typeof Lo=="object"&&Lo&&!Lo.nodeType&&Lo,W7=RO&&typeof Oo=="object"&&Oo&&!Oo.nodeType&&Oo,bQ=W7&&W7.exports===RO,Y7=bQ?ta.Buffer:void 0,wQ=Y7?Y7.isBuffer:void 0,kQ=wQ||yQ;const zg=kQ;var CQ="[object Arguments]",xQ="[object Array]",SQ="[object Boolean]",$Q="[object Date]",AQ="[object Error]",EQ="[object Function]",MQ="[object Map]",TQ="[object Number]",PQ="[object Object]",IQ="[object RegExp]",LQ="[object Set]",OQ="[object String]",DQ="[object WeakMap]",RQ="[object ArrayBuffer]",VQ="[object DataView]",FQ="[object Float32Array]",NQ="[object Float64Array]",BQ="[object Int8Array]",zQ="[object Int16Array]",HQ="[object Int32Array]",UQ="[object Uint8Array]",jQ="[object Uint8ClampedArray]",WQ="[object Uint16Array]",YQ="[object Uint32Array]",es={};es[FQ]=es[NQ]=es[BQ]=es[zQ]=es[HQ]=es[UQ]=es[jQ]=es[WQ]=es[YQ]=!0;es[CQ]=es[xQ]=es[RQ]=es[SQ]=es[VQ]=es[$Q]=es[AQ]=es[EQ]=es[MQ]=es[TQ]=es[PQ]=es[IQ]=es[LQ]=es[OQ]=es[DQ]=!1;function qQ(t){return Ea(t)&&f4(t.length)&&!!es[Rd(t)]}function m4(t){return function(e){return t(e)}}var VO=typeof Lo=="object"&&Lo&&!Lo.nodeType&&Lo,Km=VO&&typeof Oo=="object"&&Oo&&!Oo.nodeType&&Oo,GQ=Km&&Km.exports===VO,ww=GQ&&MO.process,XQ=function(){try{var t=Km&&Km.require&&Km.require("util").types;return t||ww&&ww.binding&&ww.binding("util")}catch{}}();const Of=XQ;var q7=Of&&Of.isTypedArray,KQ=q7?m4(q7):qQ;const g4=KQ;var ZQ=Object.prototype,JQ=ZQ.hasOwnProperty;function FO(t,e){var n=Yi(t),i=!n&&Bg(t),s=!n&&!i&&zg(t),o=!n&&!i&&!s&&g4(t),r=n||i||s||o,a=r?pQ(t.length,String):[],l=a.length;for(var c in t)(e||JQ.call(t,c))&&!(r&&(c=="length"||s&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Db(c,l)))&&a.push(c);return a}function NO(t,e){return function(n){return t(e(n))}}var QQ=NO(Object.keys,Object);const eee=QQ;var tee=Object.prototype,nee=tee.hasOwnProperty;function see(t){if(!p4(t))return eee(t);var e=[];for(var n in Object(t))nee.call(t,n)&&n!="constructor"&&e.push(n);return e}function L1(t){return cp(t)?FO(t):see(t)}function iee(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var oee=Object.prototype,ree=oee.hasOwnProperty;function aee(t){if(!qi(t))return iee(t);var e=p4(t),n=[];for(var i in t)i=="constructor"&&(e||!ree.call(t,i))||n.push(i);return n}function O1(t){return cp(t)?FO(t,!0):aee(t)}var lee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cee=/^\w*$/;function v4(t,e){if(Yi(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Ob(t)?!0:cee.test(t)||!lee.test(t)||e!=null&&t in Object(e)}var uee=Fd(Object,"create");const Hg=uee;function dee(){this.__data__=Hg?Hg(null):{},this.size=0}function hee(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var fee="__lodash_hash_undefined__",pee=Object.prototype,mee=pee.hasOwnProperty;function gee(t){var e=this.__data__;if(Hg){var n=e[t];return n===fee?void 0:n}return mee.call(e,t)?e[t]:void 0}var vee=Object.prototype,_ee=vee.hasOwnProperty;function yee(t){var e=this.__data__;return Hg?e[t]!==void 0:_ee.call(e,t)}var bee="__lodash_hash_undefined__";function wee(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Hg&&e===void 0?bee:e,this}function vd(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])}}vd.prototype.clear=dee;vd.prototype.delete=hee;vd.prototype.get=gee;vd.prototype.has=yee;vd.prototype.set=wee;function kee(){this.__data__=[],this.size=0}function Rb(t,e){for(var n=t.length;n--;)if(I1(t[n][0],e))return n;return-1}var Cee=Array.prototype,xee=Cee.splice;function See(t){var e=this.__data__,n=Rb(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():xee.call(e,n,1),--this.size,!0}function $ee(t){var e=this.__data__,n=Rb(e,t);return n<0?void 0:e[n][1]}function Aee(t){return Rb(this.__data__,t)>-1}function Eee(t,e){var n=this.__data__,i=Rb(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=kee;Al.prototype.delete=See;Al.prototype.get=$ee;Al.prototype.has=Aee;Al.prototype.set=Eee;var Mee=Fd(ta,"Map");const Ug=Mee;function Tee(){this.size=0,this.__data__={hash:new vd,map:new(Ug||Al),string:new vd}}function Pee(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Vb(t,e){var n=t.__data__;return Pee(e)?n[typeof e=="string"?"string":"hash"]:n.map}function Iee(t){var e=Vb(this,t).delete(t);return this.size-=e?1:0,e}function Lee(t){return Vb(this,t).get(t)}function Oee(t){return Vb(this,t).has(t)}function Dee(t,e){var n=Vb(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=Tee;El.prototype.delete=Iee;El.prototype.get=Lee;El.prototype.has=Oee;El.prototype.set=Dee;var Ree="Expected a function";function _4(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Ree);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(_4.Cache||El),n}_4.Cache=El;var Vee=500;function Fee(t){var e=_4(t,function(i){return n.size===Vee&&n.clear(),i}),n=e.cache;return e}var Nee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Bee=/\\(\\)?/g,zee=Fee(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Nee,function(n,i,s,o){e.push(s?o.replace(Bee,"$1"):i||n)}),e});const Hee=zee;function Uee(t){return t==null?"":PO(t)}function up(t,e){return Yi(t)?t:v4(t,e)?[t]:Hee(Uee(t))}var jee=1/0;function dp(t){if(typeof t=="string"||Ob(t))return t;var e=t+"";return e=="0"&&1/t==-jee?"-0":e}function Fb(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:Fb(t,e);return i===void 0?n:i}function y4(t,e){for(var n=-1,i=e.length,s=t.length;++n<i;)t[s+n]=e[n];return t}var G7=yr?yr.isConcatSpreadable:void 0;function Wee(t){return Yi(t)||Bg(t)||!!(G7&&t&&t[G7])}function b4(t,e,n,i,s){var o=-1,r=t.length;for(n||(n=Wee),s||(s=[]);++o<r;){var a=t[o];e>0&&n(a)?e>1?b4(a,e-1,n,i,s):y4(s,a):i||(s[s.length]=a)}return s}function hy(t){var e=t==null?0:t.length;return e?b4(t,1):[]}function BO(t){return LO(OO(t,void 0,hy),t+"")}var Yee=NO(Object.getPrototypeOf,Object);const w4=Yee;var qee="[object Object]",Gee=Function.prototype,Xee=Object.prototype,zO=Gee.toString,Kee=Xee.hasOwnProperty,Zee=zO.call(Object);function k4(t){if(!Ea(t)||Rd(t)!=qee)return!1;var e=w4(t);if(e===null)return!0;var n=Kee.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&zO.call(n)==Zee}function Jee(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 Us(){if(!arguments.length)return[];var t=arguments[0];return Yi(t)?t:[t]}function Qee(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function HO(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),Qee(rf(t),e,n)}function ete(){this.__data__=new Al,this.size=0}function tte(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function nte(t){return this.__data__.get(t)}function ste(t){return this.__data__.has(t)}var ite=200;function ote(t,e){var n=this.__data__;if(n instanceof Al){var i=n.__data__;if(!Ug||i.length<ite-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 Br(t){var e=this.__data__=new Al(t);this.size=e.size}Br.prototype.clear=ete;Br.prototype.delete=tte;Br.prototype.get=nte;Br.prototype.has=ste;Br.prototype.set=ote;function rte(t,e){return t&&lp(e,L1(e),t)}function ate(t,e){return t&&lp(e,O1(e),t)}var UO=typeof Lo=="object"&&Lo&&!Lo.nodeType&&Lo,X7=UO&&typeof Oo=="object"&&Oo&&!Oo.nodeType&&Oo,lte=X7&&X7.exports===UO,K7=lte?ta.Buffer:void 0,Z7=K7?K7.allocUnsafe:void 0;function jO(t,e){if(e)return t.slice();var n=t.length,i=Z7?Z7(n):new t.constructor(n);return t.copy(i),i}function cte(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 WO(){return[]}var ute=Object.prototype,dte=ute.propertyIsEnumerable,J7=Object.getOwnPropertySymbols,hte=J7?function(t){return t==null?[]:(t=Object(t),cte(J7(t),function(e){return dte.call(t,e)}))}:WO;const C4=hte;function fte(t,e){return lp(t,C4(t),e)}var pte=Object.getOwnPropertySymbols,mte=pte?function(t){for(var e=[];t;)y4(e,C4(t)),t=w4(t);return e}:WO;const YO=mte;function gte(t,e){return lp(t,YO(t),e)}function qO(t,e,n){var i=e(t);return Yi(t)?i:y4(i,n(t))}function zk(t){return qO(t,L1,C4)}function GO(t){return qO(t,O1,YO)}var vte=Fd(ta,"DataView");const Hk=vte;var _te=Fd(ta,"Promise");const Uk=_te;var yte=Fd(ta,"Set");const jk=yte;var Q7="[object Map]",bte="[object Object]",e$="[object Promise]",t$="[object Set]",n$="[object WeakMap]",s$="[object DataView]",wte=Vd(Hk),kte=Vd(Ug),Cte=Vd(Uk),xte=Vd(jk),Ste=Vd(Bk),wu=Rd;(Hk&&wu(new Hk(new ArrayBuffer(1)))!=s$||Ug&&wu(new Ug)!=Q7||Uk&&wu(Uk.resolve())!=e$||jk&&wu(new jk)!=t$||Bk&&wu(new Bk)!=n$)&&(wu=function(t){var e=Rd(t),n=e==bte?t.constructor:void 0,i=n?Vd(n):"";if(i)switch(i){case wte:return s$;case kte:return Q7;case Cte:return e$;case xte:return t$;case Ste:return n$}return e});const jg=wu;var $te=Object.prototype,Ate=$te.hasOwnProperty;function Ete(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&Ate.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var Mte=ta.Uint8Array;const fy=Mte;function x4(t){var e=new t.constructor(t.byteLength);return new fy(e).set(new fy(t)),e}function Tte(t,e){var n=e?x4(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var Pte=/\w*$/;function Ite(t){var e=new t.constructor(t.source,Pte.exec(t));return e.lastIndex=t.lastIndex,e}var i$=yr?yr.prototype:void 0,o$=i$?i$.valueOf:void 0;function Lte(t){return o$?Object(o$.call(t)):{}}function XO(t,e){var n=e?x4(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var Ote="[object Boolean]",Dte="[object Date]",Rte="[object Map]",Vte="[object Number]",Fte="[object RegExp]",Nte="[object Set]",Bte="[object String]",zte="[object Symbol]",Hte="[object ArrayBuffer]",Ute="[object DataView]",jte="[object Float32Array]",Wte="[object Float64Array]",Yte="[object Int8Array]",qte="[object Int16Array]",Gte="[object Int32Array]",Xte="[object Uint8Array]",Kte="[object Uint8ClampedArray]",Zte="[object Uint16Array]",Jte="[object Uint32Array]";function Qte(t,e,n){var i=t.constructor;switch(e){case Hte:return x4(t);case Ote:case Dte:return new i(+t);case Ute:return Tte(t,n);case jte:case Wte:case Yte:case qte:case Gte:case Xte:case Kte:case Zte:case Jte:return XO(t,n);case Rte:return new i;case Vte:case Bte:return new i(t);case Fte:return Ite(t);case Nte:return new i;case zte:return Lte(t)}}function KO(t){return typeof t.constructor=="function"&&!p4(t)?YJ(w4(t)):{}}var ene="[object Map]";function tne(t){return Ea(t)&&jg(t)==ene}var r$=Of&&Of.isMap,nne=r$?m4(r$):tne;const sne=nne;var ine="[object Set]";function one(t){return Ea(t)&&jg(t)==ine}var a$=Of&&Of.isSet,rne=a$?m4(a$):one;const ane=rne;var lne=1,cne=2,une=4,ZO="[object Arguments]",dne="[object Array]",hne="[object Boolean]",fne="[object Date]",pne="[object Error]",JO="[object Function]",mne="[object GeneratorFunction]",gne="[object Map]",vne="[object Number]",QO="[object Object]",_ne="[object RegExp]",yne="[object Set]",bne="[object String]",wne="[object Symbol]",kne="[object WeakMap]",Cne="[object ArrayBuffer]",xne="[object DataView]",Sne="[object Float32Array]",$ne="[object Float64Array]",Ane="[object Int8Array]",Ene="[object Int16Array]",Mne="[object Int32Array]",Tne="[object Uint8Array]",Pne="[object Uint8ClampedArray]",Ine="[object Uint16Array]",Lne="[object Uint32Array]",qn={};qn[ZO]=qn[dne]=qn[Cne]=qn[xne]=qn[hne]=qn[fne]=qn[Sne]=qn[$ne]=qn[Ane]=qn[Ene]=qn[Mne]=qn[gne]=qn[vne]=qn[QO]=qn[_ne]=qn[yne]=qn[bne]=qn[wne]=qn[Tne]=qn[Pne]=qn[Ine]=qn[Lne]=!0;qn[pne]=qn[JO]=qn[kne]=!1;function Zm(t,e,n,i,s,o){var r,a=e&lne,l=e&cne,c=e&une;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=Ete(t),!a)return IO(t,r)}else{var d=jg(t),h=d==JO||d==mne;if(zg(t))return jO(t,a);if(d==QO||d==ZO||h&&!s){if(r=l||h?{}:KO(t),!a)return l?gte(t,ate(r,t)):fte(t,rte(r,t))}else{if(!qn[d])return s?t:{};r=Qte(t,d,a)}}o||(o=new Br);var f=o.get(t);if(f)return f;o.set(t,r),ane(t)?t.forEach(function(y){r.add(Zm(y,e,n,y,t,o))}):sne(t)&&t.forEach(function(y,b){r.set(b,Zm(y,e,n,b,t,o))});var p=c?l?GO:zk:l?O1:L1,m=u?void 0:p(t);return sQ(m||t,function(y,b){m&&(b=y,y=t[b]),h4(r,b,Zm(y,e,n,b,t,o))}),r}var One=1,Dne=4;function Qu(t){return Zm(t,One|Dne)}var Rne="__lodash_hash_undefined__";function Vne(t){return this.__data__.set(t,Rne),this}function Fne(t){return this.__data__.has(t)}function py(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new El;++e<n;)this.add(t[e])}py.prototype.add=py.prototype.push=Vne;py.prototype.has=Fne;function Nne(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 Bne(t,e){return t.has(e)}var zne=1,Hne=2;function eD(t,e,n,i,s,o){var r=n&zne,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&Hne?new py:void 0;for(o.set(t,e),o.set(e,t);++d<a;){var p=t[d],m=e[d];if(i)var y=r?i(m,p,d,e,t,o):i(p,m,d,t,e,o);if(y!==void 0){if(y)continue;h=!1;break}if(f){if(!Nne(e,function(b,k){if(!Bne(f,k)&&(p===b||s(p,b,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 Une(t){var e=-1,n=Array(t.size);return t.forEach(function(i,s){n[++e]=[s,i]}),n}function jne(t){var e=-1,n=Array(t.size);return t.forEach(function(i){n[++e]=i}),n}var Wne=1,Yne=2,qne="[object Boolean]",Gne="[object Date]",Xne="[object Error]",Kne="[object Map]",Zne="[object Number]",Jne="[object RegExp]",Qne="[object Set]",ese="[object String]",tse="[object Symbol]",nse="[object ArrayBuffer]",sse="[object DataView]",l$=yr?yr.prototype:void 0,kw=l$?l$.valueOf:void 0;function ise(t,e,n,i,s,o,r){switch(n){case sse:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case nse:return!(t.byteLength!=e.byteLength||!o(new fy(t),new fy(e)));case qne:case Gne:case Zne:return I1(+t,+e);case Xne:return t.name==e.name&&t.message==e.message;case Jne:case ese:return t==e+"";case Kne:var a=Une;case Qne:var l=i&Wne;if(a||(a=jne),t.size!=e.size&&!l)return!1;var c=r.get(t);if(c)return c==e;i|=Yne,r.set(t,e);var u=eD(a(t),a(e),i,s,o,r);return r.delete(t),u;case tse:if(kw)return kw.call(t)==kw.call(e)}return!1}var ose=1,rse=Object.prototype,ase=rse.hasOwnProperty;function lse(t,e,n,i,s,o){var r=n&ose,a=zk(t),l=a.length,c=zk(e),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in e:ase.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 y=r;++d<l;){h=a[d];var b=t[h],k=e[h];if(i)var C=r?i(k,b,h,e,t,o):i(b,k,h,t,e,o);if(!(C===void 0?b===k||s(b,k,n,i,o):C)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var $=t.constructor,S=e.constructor;$!=S&&"constructor"in t&&"constructor"in e&&!(typeof $=="function"&&$ instanceof $&&typeof S=="function"&&S instanceof S)&&(m=!1)}return o.delete(t),o.delete(e),m}var cse=1,c$="[object Arguments]",u$="[object Array]",Uv="[object Object]",use=Object.prototype,d$=use.hasOwnProperty;function dse(t,e,n,i,s,o){var r=Yi(t),a=Yi(e),l=r?u$:jg(t),c=a?u$:jg(e);l=l==c$?Uv:l,c=c==c$?Uv:c;var u=l==Uv,d=c==Uv,h=l==c;if(h&&zg(t)){if(!zg(e))return!1;r=!0,u=!1}if(h&&!u)return o||(o=new Br),r||g4(t)?eD(t,e,n,i,s,o):ise(t,e,l,n,i,s,o);if(!(n&cse)){var f=u&&d$.call(t,"__wrapped__"),p=d&&d$.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,y=p?e.value():e;return o||(o=new Br),s(m,y,n,i,o)}}return h?(o||(o=new Br),lse(t,e,n,i,s,o)):!1}function Nb(t,e,n,i,s){return t===e?!0:t==null||e==null||!Ea(t)&&!Ea(e)?t!==t&&e!==e:dse(t,e,n,i,Nb,s)}var hse=1,fse=2;function pse(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 Br;if(i)var h=i(c,u,l,t,e,d);if(!(h===void 0?Nb(u,c,hse|fse,i,d):h))return!1}}return!0}function tD(t){return t===t&&!qi(t)}function mse(t){for(var e=L1(t),n=e.length;n--;){var i=e[n],s=t[i];e[n]=[i,s,tD(s)]}return e}function nD(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function gse(t){var e=mse(t);return e.length==1&&e[0][2]?nD(e[0][0],e[0][1]):function(n){return n===t||pse(n,t,e)}}function vse(t,e){return t!=null&&e in Object(t)}function _se(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&&f4(s)&&Db(r,s)&&(Yi(t)||Bg(t)))}function sD(t,e){return t!=null&&_se(t,e,vse)}var yse=1,bse=2;function wse(t,e){return v4(t)&&tD(e)?nD(dp(t),e):function(n){var i=ji(n,t);return i===void 0&&i===e?sD(n,t):Nb(e,i,yse|bse)}}function kse(t){return function(e){return e==null?void 0:e[t]}}function Cse(t){return function(e){return Fb(e,t)}}function xse(t){return v4(t)?kse(dp(t)):Cse(t)}function iD(t){return typeof t=="function"?t:t==null?c4:typeof t=="object"?Yi(t)?wse(t[0],t[1]):gse(t):xse(t)}function Sse(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 $se=Sse();const oD=$se;function Ase(t,e){return t&&oD(t,e,L1)}function Ese(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 Mse=Ese(Ase);const Tse=Mse;var Pse=function(){return ta.Date.now()};const Cw=Pse;var Ise="Expected a function",Lse=Math.max,Ose=Math.min;function _d(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(Ise);e=rf(e)||0,qi(n)&&(u=!!n.leading,d="maxWait"in n,o=d?Lse(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(b,e),u?f(M):r}function m(M){var P=M-l,T=M-c,I=e-P;return d?Ose(I,o-T):I}function y(M){var P=M-l,T=M-c;return l===void 0||P>=e||P<0||d&&T>=o}function b(){var M=Cw();if(y(M))return k(M);a=setTimeout(b,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 $(){return a===void 0?r:k(Cw())}function S(){var M=Cw(),P=y(M);if(i=arguments,s=this,l=M,P){if(a===void 0)return p(l);if(d)return clearTimeout(a),a=setTimeout(b,e),f(l)}return a===void 0&&(a=setTimeout(b,e)),r}return S.cancel=C,S.flush=$,S}function Wk(t,e,n){(n!==void 0&&!I1(t[e],n)||n===void 0&&!(e in t))&&d4(t,e,n)}function Dse(t){return Ea(t)&&cp(t)}function Yk(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Rse(t){return lp(t,O1(t))}function Vse(t,e,n,i,s,o,r){var a=Yk(t,n),l=Yk(e,n),c=r.get(l);if(c){Wk(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&&zg(l),p=!h&&!f&&g4(l);u=l,h||f||p?Yi(a)?u=a:Dse(a)?u=IO(a):f?(d=!1,u=jO(l,!0)):p?(d=!1,u=XO(l,!0)):u=[]:k4(l)||Bg(l)?(u=a,Bg(a)?u=Rse(a):(!qi(a)||u4(a))&&(u=KO(l))):d=!1}d&&(r.set(l,u),s(u,l,i,o,r),r.delete(l)),Wk(t,n,u)}function rD(t,e,n,i,s){t!==e&&oD(e,function(o,r){if(s||(s=new Br),qi(o))Vse(t,e,r,n,rD,i,s);else{var a=i?i(Yk(t,r),o,r+"",t,e,s):void 0;a===void 0&&(a=o),Wk(t,r,a)}},O1)}function Fse(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var Nse=Math.max,Bse=Math.min;function zse(t,e,n){var i=t==null?0:t.length;if(!i)return-1;var s=i-1;return n!==void 0&&(s=$J(n),s=n<0?Nse(i+s,0):Bse(s,i-1)),iQ(t,iD(e),s,!0)}function Hse(t,e){var n=-1,i=cp(t)?Array(t.length):[];return Tse(t,function(s,o,r){i[++n]=e(s,o,r)}),i}function Use(t,e){var n=Yi(t)?l4:Hse;return n(t,iD(e))}function aD(t,e){return b4(Use(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 jse(t,e){return e.length<2?t:Fb(t,Jee(e,0,-1))}function Wi(t,e){return Nb(t,e)}function ui(t){return t==null}function Bb(t){return t===null}function Wse(t){return t===void 0}var Yse=hQ(function(t,e,n){rD(t,e,n)});const lD=Yse;var qse=Object.prototype,Gse=qse.hasOwnProperty;function Xse(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__"&&!Gse.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=jse(t,e);return r==null||delete r[dp(Fse(e))]}function Kse(t){return k4(t)?void 0:t}var Zse=1,Jse=2,Qse=4,eie=BO(function(t,e){var n={};if(t==null)return n;var i=!1;e=l4(e,function(o){return o=up(o,t),i||(i=o.length>1),o}),lp(t,GO(t),n),i&&(n=Zm(n,Zse|Jse|Qse,Kse));for(var s=e.length;s--;)Xse(n,e[s]);return n});const zb=eie;function cD(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:Db(e[s+1])?[]:{})}h4(a,l,c),a=a[l]}return t}function tie(t,e,n){for(var i=-1,s=e.length,o={};++i<s;){var r=e[i],a=Fb(t,r);n(a,r)&&cD(o,up(r,t),a)}return o}function nie(t,e){return tie(t,e,function(n,i){return sD(t,i)})}var sie=BO(function(t,e){return t==null?{}:nie(t,e)});const S4=sie;function iie(t,e,n){return t==null?t:cD(t,e,n)}var oie="Expected a function";function jv(t,e,n){var i=!0,s=!0;if(typeof t!="function")throw new TypeError(oie);return qi(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),_d(t,e,{leading:i,maxWait:e,trailing:s})}const nn=t=>t===void 0,Jn=t=>typeof t=="boolean",wt=t=>typeof t=="number",$4=t=>!t&&t!==0||Me(t)&&t.length===0||yt(t)&&!Object.keys(t).length,Po=t=>typeof Element>"u"?!1:t instanceof Element,ka=t=>ui(t),rie=t=>Ke(t)?!Number.isNaN(Number(t)):!1,aie=t=>t===window,my=t=>Object.keys(t),uD=t=>Object.entries(t),Ac=(t,e,n)=>({get value(){return ji(t,e,n)},set value(i){iie(t,e,i)}}),dD="__epPropKey",de=t=>t,lie=t=>yt(t)&&!!t[dD],Hb=(t,e)=>{if(!yt(t)||lie(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(", ");sL(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`)}return c}:void 0,[dD]:!0};return zt(t,"default")&&(a.default=s),a},Ge=t=>Df(Object.entries(t).map(([e,n])=>[e,Hb(n,e)])),A4=Ge({to:{type:de([String,Object]),required:!0},disabled:Boolean});var hD=class extends Error{constructor(t){super(t),this.name="ElementPlusError"}};function vo(t,e){throw new hD(`[${t}] ${e}`)}function Tt(t,e){{const n=Ke(t)?new hD(`[${t}] ${e}`):t;console.warn(n)}}const cie=["class","style"],uie=/^on[A-Z]/,Ub=(t={})=>{const{excludeListeners:e=!1,excludeKeys:n}=t,i=Y(()=>((n==null?void 0:n.value)||[]).concat(cie)),s=pt();return s?Y(()=>{var o;return Df(Object.entries((o=s.proxy)==null?void 0:o.$attrs).filter(([r])=>!i.value.includes(r)&&!(e&&uie.test(r))))}):(Tt("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),Y(()=>({})))};function fD(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 Nd(t){return pb()?(mb(t),!0):!1}function Ro(t){return typeof t=="function"?t():E(t)}function die(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 hie(t){return die(Y(t))}const Kt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const fie=t=>typeof t<"u",pD=t=>t!=null,pie=Object.prototype.toString,mie=t=>pie.call(t)==="[object Object]",mD=(t,e,n)=>Math.min(n,Math.max(e,t)),zr=()=>{},qk=gie();function gie(){var t,e;return Kt&&((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 gD(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 vie(t,e={}){let n,i,s=zr;const o=a=>{clearTimeout(a),s(),s=zr};return a=>{const l=Ro(t),c=Ro(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 _ie(...t){let e=0,n,i=!0,s=zr,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=zr)};return h=>{const f=Ro(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((y,b)=>{s=c?b:y,n=setTimeout(()=>{e=Date.now(),i=!0,y(m()),u()},Math.max(0,f-p))})),!l&&!n&&(n=setTimeout(()=>i=!0,f)),i=!1,o)}}function yie(t){return t||pt()}function vD(t,e=200,n={}){return gD(vie(e,n),t)}function bie(t,e=200,n={}){const i=J(t.value),s=vD(()=>{i.value=t.value},e,n);return Te(t,()=>s()),i}function wie(t,e=200,n=!1,i=!0,s=!1){return gD(_ie(e,n,i,s),t)}function _D(t,e=!0,n){yie()?Ft(t,n):e?t():ot(t)}function Gk(t,e,n={}){const{immediate:i=!0}=n,s=J(!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)},Ro(e))}return i&&(s.value=!0,Kt&&l()),Nd(a),{isPending:Rc(s),start:l,stop:a}}const Ml=Kt?window:void 0,kie=Kt?window.document:void 0;function js(t){var e;const n=Ro(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 zr;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(()=>[js(e),Ro(s)],([u,d])=>{if(r(),!u)return;const h=mie(d)?{...d}:d;o.push(...n.flatMap(f=>i.map(p=>a(u,f,p,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),r()};return Nd(c),c}let h$=!1;function yD(t,e,n={}){const{window:i=Ml,ignore:s=[],capture:o=!0,detectIframe:r=!1}=n;if(!i)return zr;qk&&!h$&&(h$=!0,Array.from(i.document.body.children).forEach(m=>m.addEventListener("click",zr)),i.document.documentElement.addEventListener("click",zr));let a=!0;const l=m=>Ro(s).some(y=>{if(typeof y=="string")return Array.from(i.document.querySelectorAll(y)).some(b=>b===m.target||m.composedPath().includes(b));{const b=js(y);return b&&(m.target===b||m.composedPath().includes(b))}});function c(m){const y=Ro(m);return y&&y.$.subTree.shapeFlag===16}function u(m,y){const b=Ro(m),k=b.$.subTree&&b.$.subTree.children;return k==null||!Array.isArray(k)?!1:k.some(C=>C.el===y.target||y.composedPath().includes(C.el))}const d=m=>{const y=js(t);if(m.target!=null&&!(!(y instanceof Element)&&c(t)&&u(t,m))&&!(!y||y===m.target||m.composedPath().includes(y))){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 y=js(t);a=!l(m)&&!!(y&&!m.composedPath().includes(y))},{passive:!0}),r&&Hn(i,"blur",m=>{setTimeout(()=>{var y;const b=js(t);((y=i.document.activeElement)==null?void 0:y.tagName)==="IFRAME"&&!(b!=null&&b.contains(i.document.activeElement))&&e(m)},0)})].filter(Boolean);return()=>f.forEach(m=>m())}function Cie(){const t=J(!1),e=pt();return e&&Ft(()=>{t.value=!0},e),t}function jb(t){const e=Cie();return Y(()=>(e.value,!!t()))}function xie(t,e,n={}){const{window:i=Ml,...s}=n;let o;const r=jb(()=>i&&"MutationObserver"in i),a=()=>{o&&(o.disconnect(),o=void 0)},l=Y(()=>{const h=Ro(t),f=(Array.isArray(h)?h:[h]).map(js).filter(pD);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 Nd(d),{isSupported:r,stop:d,takeRecords:u}}function Sie(t,e={}){const{window:n=Ml}=e,i=jb(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let s;const o=J(!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(Ro(t)),"addEventListener"in s?s.addEventListener("change",r):s.addListener(r),o.value=s.matches)});return Nd(()=>{l(),a(),s=void 0}),o}function $ie(t){return JSON.parse(JSON.stringify(t))}function Aie(t={}){const{document:e=kie}=t;if(!e)return J("visible");const n=J(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=jb(()=>i&&"ResizeObserver"in i),a=()=>{o&&(o.disconnect(),o=void 0)},l=Y(()=>{const d=Ro(t);return Array.isArray(d)?d.map(h=>js(h)):[js(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 Nd(u),{isSupported:r,stop:u}}function f$(t,e={width:0,height:0},n={}){const{window:i=Ml,box:s="content-box"}=n,o=Y(()=>{var d,h;return(h=(d=js(t))==null?void 0:d.namespaceURI)==null?void 0:h.includes("svg")}),r=J(e.width),a=J(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=js(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);_D(()=>{const d=js(t);d&&(r.value="offsetWidth"in d?d.offsetWidth:e.width,a.value="offsetHeight"in d?d.offsetHeight:e.height)});const c=Te(()=>js(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 Eie(t,e,n={}){const{root:i,rootMargin:s="0px",threshold:o=0,window:r=Ml,immediate:a=!0}=n,l=jb(()=>r&&"IntersectionObserver"in r),c=Y(()=>{const p=Ro(t);return(Array.isArray(p)?p:[p]).map(js).filter(pD)});let u=zr;const d=J(a),h=l.value?Te(()=>[c.value,js(i),d.value],([p,m])=>{if(u(),!d.value||!p.length)return;const y=new IntersectionObserver(e,{root:js(m),rootMargin:s,threshold:o});p.forEach(b=>b&&y.observe(b)),u=()=>{y.disconnect(),u=zr}},{immediate:a,flush:"post"}):zr,f=()=>{u(),h(),d.value=!1};return Nd(f),{isSupported:l,isActive:d,pause(){u(),d.value=!1},resume(){d.value=!0},stop:f}}function Mie(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 y=C=>a?typeof a=="function"?a(C):$ie(C):C,b=()=>fie(t[e])?y(t[e]):d,k=C=>{h?h(C)&&p(m,C):p(m,C)};if(l){const C=b(),$=J(C);let S=!1;return Te(()=>t[e],M=>{S||(S=!0,$.value=y(M),ot(()=>S=!1))}),Te($,M=>{!S&&(M!==t[e]||u)&&k(M)},{deep:u}),$}else return Y({get(){return b()},set(C){k(C)}})}function Tie(t={}){const{window:e=Ml}=t;if(!e)return J(!1);const n=J(e.document.hasFocus());return Hn(e,"blur",()=>{n.value=!1}),Hn(e,"focus",()=>{n.value=!0}),n}function Pie(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=J(n),l=J(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(),_D(c),Hn("resize",c,{passive:!0}),s){const u=Sie("(orientation: portrait)");Te(u,()=>c())}return{width:a,height:l}}function bD(){const t=Fn(),e=J(0),n=Y(()=>({minWidth:`${Math.max(e.value,a4)}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})},Iie='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',wD=t=>typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot,p$=t=>typeof Element>"u"?!1:t instanceof Element,Lie=t=>getComputedStyle(t).position==="fixed"?!1:t.offsetParent!==null,m$=t=>Array.from(t.querySelectorAll(Iie)).filter(e=>Wg(e)&&Lie(e)),Wg=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}},E4=(t,e)=>{if(!t||!t.focus)return;let n=!1;p$(t)&&!Wg(t)&&!t.getAttribute("tabindex")&&(t.setAttribute("tabindex","-1"),n=!0),t.focus(e),p$(t)&&n&&t.removeAttribute("tabindex")},M4=()=>Kt&&/firefox/i.test(window.navigator.userAgent),kD=()=>Kt&&/android/i.test(window.navigator.userAgent),Oie=(t="")=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),xw=t=>Gc(t),Die="utils/dom/style",CD=(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)},yd=(t,e)=>{!t||!e.trim()||t.classList.add(...CD(e))},Ma=(t,e)=>{!t||!e.trim()||t.classList.remove(...CD(e))},il=(t,e)=>{var i;if(!Kt||!t||!e||wD(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]}},xD=(t,e,n)=>{if(!(!t||!e))if(yt(e))uD(e).forEach(([i,s])=>xD(t,i,s));else{const i=Un(e);t.style[i]=n}};function fi(t,e="px"){if(!t&&t!==0)return"";if(wt(t)||rie(t))return`${t}${e}`;if(Ke(t))return t;Tt(Die,"binding value must be a string or number")}const SD=(t,e,n,i)=>{const s={offsetX:0,offsetY:0},o=J(!1),r=(h,f)=>{if(t.value){const{offsetX:p,offsetY:m}=s,y=t.value.getBoundingClientRect(),b=y.left,k=y.top,C=y.width,$=y.height,S=document.documentElement.clientWidth,M=document.documentElement.clientHeight,P=-b+p,T=-k+m,I=S-b-C+p,L=M-k-($<M?$: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(${fi(h)}, ${fi(f)})`}},a=h=>{const f=h.clientX,p=h.clientY,{offsetX:m,offsetY:y}=s,b=C=>{o.value||(o.value=!0),r(m+C.clientX-f,y+C.clientY-p)},k=()=>{o.value=!1,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",k)};document.addEventListener("mousemove",b),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 Ft(()=>{_l(()=>{n.value?l():c()})}),wn(()=>{c()}),{isDragging:o,resetPosition:u,updatePosition:d}};var Rie={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 Vie=t=>(e,n)=>Fie(e,n,E(t)),Fie=(t,e,n)=>ji(n,t,t).replace(/\{(\w+)\}/g,(i,s)=>`${(e==null?void 0:e[s])??`{${s}}`}`),Nie=t=>({lang:Y(()=>E(t).name),locale:hn(t)?t:J(t),t:Vie(t)}),$D=Symbol("localeContextKey"),Qt=t=>{const e=t||qe($D,J());return Nie(Y(()=>e.value||Rie))},Jm="el",Bie="is-",mu=(t,e,n,i,s)=>{let o=`${t}-${e}`;return n&&(o+=`-${n}`),i&&(o+=`__${i}`),s&&(o+=`--${s}`),o},AD=Symbol("namespaceContextKey"),T4=t=>{const e=t||(pt()?qe(AD,J(Jm)):J(Jm));return Y(()=>E(e)||Jm)},Be=(t,e)=>{const n=T4(e);return{namespace:n,b:(m="")=>mu(n.value,t,m,"",""),e:m=>m?mu(n.value,t,"",m,""):"",m:m=>m?mu(n.value,t,"","",m):"",be:(m,y)=>m&&y?mu(n.value,t,m,y,""):"",em:(m,y)=>m&&y?mu(n.value,t,"",m,y):"",bm:(m,y)=>m&&y?mu(n.value,t,m,"",y):"",bem:(m,y,b)=>m&&y&&b?mu(n.value,t,m,y,b):"",is:(m,...y)=>{const b=y.length>=1?y[0]:!0;return m&&b?`${Bie}${m}`:""},cssVar:m=>{const y={};for(const b in m)m[b]&&(y[`--${n.value}-${b}`]=m[b]);return y},cssVarName:m=>`--${n.value}-${m}`,cssVarBlock:m=>{const y={};for(const b in m)m[b]&&(y[`--${n.value}-${t}-${b}`]=m[b]);return y},cssVarBlockName:m=>`--${n.value}-${t}-${m}`}},Yg=t=>Kt?window.requestAnimationFrame(t):setTimeout(t,16),zie=t=>Kt?window.cancelAnimationFrame(t):clearTimeout(t),Hie=(t,e)=>{if(!Kt)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))},Uie=(t,e)=>{if(!Kt)return;let n=t;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(Hie(n,e))return n;wD(n)?n=n.host:n=n.parentNode}return n};let Wv;const jie=t=>{var o;if(!Kt)return 0;if(Wv!==void 0)return Wv;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),Wv=n-s,Wv};function Wie(t,e){if(!Kt)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 P4=(t,e={})=>{hn(t)||vo("[useLockscreen]","You need to pass a ref param to this function");const n=e.ns||Be("popup"),i=Y(()=>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,Ma(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,yd(document.body,i.value)),s=jie(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)`)}),mb(()=>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)},g$=t=>e=>e.pointerType==="mouse"?t(e):void 0,ls=t=>{if(t.code&&t.code!=="Unidentified")return t.code;const e=ED(t);if(e){if(Object.values(Ue).includes(e))return e;switch(e){case" ":return Ue.space;default:return""}}return""},ED=t=>{let e=t.key&&t.key!=="Unidentified"?t.key:"";if(!e&&t.type==="keyup"&&kD()){const n=t.target;e=n.value.charAt(n.selectionStart-1)}return e},Yie=Hb({type:de(Boolean),default:null}),qie=Hb({type:de(Function)}),MD=t=>{const e=`update:${t}`,n=`onUpdate:${t}`,i=[e],s={[t]:Yie,[n]:qie};return{useModelToggle:({indicator:r,toggleReason:a,shouldHideWhenRouteChanges:l,shouldProceed:c,onShow:u,onHide:d})=>{const h=pt(),{emit:f}=h,p=h.props,m=Y(()=>et(p[n])),y=Y(()=>p[t]===null),b=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&&Kt;T&&f(e,!0),(y.value||!T)&&b(P)},$=P=>{if(p.disabled===!0||!Kt)return;const T=m.value&&Kt;T&&f(e,!1),(y.value||!T)&&k(P)},S=P=>{Jn(P)&&(p.disabled&&P?m.value&&f(e,!1):r.value!==P&&(P?b():k()))},M=()=>{r.value?$():C()};return Te(()=>p[t],S),l&&h.appContext.config.globalProperties.$route!==void 0&&Te(()=>({...h.proxy.$route}),()=>{l.value&&r.value&&$()}),Ft(()=>{S(p[t])}),{hide:$,show:C,toggle:M,hasUpdateHandler:m}},useModelToggleProps:s,useModelToggleEmits:i}};MD("modelValue");const TD=t=>{const e=pt();return Y(()=>{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",I4="auto",D1=[ho,br,wr,fo],Rf="start",qg="end",Gie="clippingParents",PD="viewport",qp="popper",Xie="reference",v$=D1.reduce(function(t,e){return t.concat([e+"-"+Rf,e+"-"+qg])},[]),hp=[].concat(D1,[I4]).reduce(function(t,e){return t.concat([e,e+"-"+Rf,e+"-"+qg])},[]),Kie="beforeRead",Zie="read",Jie="afterRead",Qie="beforeMain",eoe="main",toe="afterMain",noe="beforeWrite",soe="write",ioe="afterWrite",ooe=[Kie,Zie,Jie,Qie,eoe,toe,noe,soe,ioe];function Ta(t){return t?(t.nodeName||"").toLowerCase():null}function na(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=na(t).Element;return t instanceof e||t instanceof Element}function fr(t){var e=na(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function L4(t){if(typeof ShadowRoot>"u")return!1;var e=na(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function roe(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)||!Ta(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 aoe(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)||!Ta(s)||(Object.assign(s.style,a),Object.keys(o).forEach(function(l){s.removeAttribute(l)}))})}}var ID={name:"applyStyles",enabled:!0,phase:"write",fn:roe,effect:aoe,requires:["computeStyles"]};function Sa(t){return t.split("-")[0]}var ed=Math.max,gy=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 O4(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 LD(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&L4(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 na(t).getComputedStyle(t)}function loe(t){return["table","td","th"].indexOf(Ta(t))>=0}function Xc(t){return((Vf(t)?t.ownerDocument:t.document)||window.document).documentElement}function Wb(t){return Ta(t)==="html"?t:t.assignedSlot||t.parentNode||(L4(t)?t.host:null)||Xc(t)}function _$(t){return!fr(t)||bl(t).position==="fixed"?null:t.offsetParent}function coe(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=Wb(t);for(L4(s)&&(s=s.host);fr(s)&&["html","body"].indexOf(Ta(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 R1(t){for(var e=na(t),n=_$(t);n&&loe(n)&&bl(n).position==="static";)n=_$(n);return n&&(Ta(n)==="html"||Ta(n)==="body"&&bl(n).position==="static")?e:n||coe(t)||e}function D4(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Qm(t,e,n){return ed(t,gy(e,n))}function uoe(t,e,n){var i=Qm(t,e,n);return i>n?n:i}function OD(){return{top:0,right:0,bottom:0,left:0}}function DD(t){return Object.assign({},OD(),t)}function RD(t,e){return e.reduce(function(n,i){return n[i]=t,n},{})}var doe=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,DD(typeof t!="number"?t:RD(t,D1))};function hoe(t){var e,n=t.state,i=t.name,s=t.options,o=n.elements.arrow,r=n.modifiersData.popperOffsets,a=Sa(n.placement),l=D4(a),c=[fo,wr].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!r)){var d=doe(s.padding,n),h=O4(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],y=r[l]-n.rects.reference[l],b=R1(o),k=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,C=m/2-y/2,$=d[f],S=k-h[u]-d[p],M=k/2-h[u]/2+C,P=Qm($,M,S),T=l;n.modifiersData[i]=(e={},e[T]=P,e.centerOffset=P-M,e)}}function foe(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)||!LD(e.elements.popper,s)||(e.elements.arrow=s))}var poe={name:"arrow",enabled:!0,phase:"main",fn:hoe,effect:foe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Bf(t){return t.split("-")[1]}var moe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function goe(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 y$(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,y=typeof u=="function"?u({x:f,y:m}):{x:f,y:m};f=y.x,m=y.y;var b=r.hasOwnProperty("x"),k=r.hasOwnProperty("y"),C=fo,$=ho,S=window;if(c){var M=R1(n),P="clientHeight",T="clientWidth";if(M===na(n)&&(M=Xc(n),bl(M).position!=="static"&&a==="absolute"&&(P="scrollHeight",T="scrollWidth")),M=M,s===ho||(s===fo||s===wr)&&o===qg){$=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===qg){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&&moe),V=u===!0?goe({x:f,y:m}):{x:f,y:m};if(f=V.x,m=V.y,l){var B;return Object.assign({},R,(B={},B[$]=k?"0":"",B[C]=b?"0":"",B.transform=(S.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",B))}return Object.assign({},R,(e={},e[$]=k?m+"px":"",e[C]=b?f+"px":"",e.transform="",e))}function voe(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:Sa(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,y$(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,y$(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 VD={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:voe,data:{}},Yv={passive:!0};function _oe(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=na(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,Yv)}),a&&l.addEventListener("resize",n.update,Yv),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Yv)}),a&&l.removeEventListener("resize",n.update,Yv)}}var FD={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:_oe,data:{}},yoe={left:"right",right:"left",bottom:"top",top:"bottom"};function I0(t){return t.replace(/left|right|bottom|top/g,function(e){return yoe[e]})}var boe={start:"end",end:"start"};function b$(t){return t.replace(/start|end/g,function(e){return boe[e]})}function R4(t){var e=na(t),n=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:n,scrollTop:i}}function V4(t){return Nf(Xc(t)).left+R4(t).scrollLeft}function woe(t){var e=na(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+V4(t),y:a}}function koe(t){var e,n=Xc(t),i=R4(t),s=(e=t.ownerDocument)==null?void 0:e.body,o=ed(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=ed(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+V4(t),l=-i.scrollTop;return bl(s||n).direction==="rtl"&&(a+=ed(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function F4(t){var e=bl(t),n=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function ND(t){return["html","body","#document"].indexOf(Ta(t))>=0?t.ownerDocument.body:fr(t)&&F4(t)?t:ND(Wb(t))}function eg(t,e){var n;e===void 0&&(e=[]);var i=ND(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=na(i),r=s?[o].concat(o.visualViewport||[],F4(i)?i:[]):i,a=e.concat(r);return s?a:a.concat(eg(Wb(r)))}function Xk(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Coe(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 w$(t,e){return e===PD?Xk(woe(t)):Vf(e)?Coe(e):Xk(koe(Xc(t)))}function xoe(t){var e=eg(Wb(t)),n=["absolute","fixed"].indexOf(bl(t).position)>=0,i=n&&fr(t)?R1(t):t;return Vf(i)?e.filter(function(s){return Vf(s)&&LD(s,i)&&Ta(s)!=="body"}):[]}function Soe(t,e,n){var i=e==="clippingParents"?xoe(t):[].concat(e),s=[].concat(i,[n]),o=s[0],r=s.reduce(function(a,l){var c=w$(t,l);return a.top=ed(c.top,a.top),a.right=gy(c.right,a.right),a.bottom=gy(c.bottom,a.bottom),a.left=ed(c.left,a.left),a},w$(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 BD(t){var e=t.reference,n=t.element,i=t.placement,s=i?Sa(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?D4(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 qg:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function Gg(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?Gie:o,a=n.rootBoundary,l=a===void 0?PD:a,c=n.elementContext,u=c===void 0?qp:c,d=n.altBoundary,h=d===void 0?!1:d,f=n.padding,p=f===void 0?0:f,m=DD(typeof p!="number"?p:RD(p,D1)),y=u===qp?Xie:qp,b=t.rects.popper,k=t.elements[h?y:u],C=Soe(Vf(k)?k:k.contextElement||Xc(t.elements.popper),r,l),$=Nf(t.elements.reference),S=BD({reference:$,element:b,strategy:"absolute",placement:s}),M=Xk(Object.assign({},b,S)),P=u===qp?M:$,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===qp&&I){var L=I[s];Object.keys(T).forEach(function(R){var V=[wr,br].indexOf(R)>=0?1:-1,B=[ho,br].indexOf(R)>=0?"y":"x";T[R]+=L[B]*V})}return T}function $oe(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?v$:v$.filter(function(p){return Bf(p)===u}):D1,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]=Gg(t,{placement:m,boundary:s,rootBoundary:o,padding:r})[Sa(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}function Aoe(t){if(Sa(t)===I4)return[];var e=I0(t);return[b$(t),e,b$(e)]}function Eoe(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,y=e.options.placement,b=Sa(y),k=b===y,C=l||(k||!p?[I0(y)]:Aoe(y)),$=[y].concat(C).reduce(function(ae,ge){return ae.concat(Sa(ge)===I4?$oe(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=$[0],L=0;L<$.length;L++){var R=$[L],V=Sa(R),B=Bf(R)===Rf,F=[ho,br].indexOf(V)>=0,z=F?"width":"height",U=Gg(e,{placement:R,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),G=F?B?wr:fo:B?br:ho;S[z]>M[z]&&(G=I0(G));var K=I0(G),X=[];if(o&&X.push(U[V]<=0),a&&X.push(U[G]<=0,U[K]<=0),X.every(function(ae){return ae})){I=R,T=!1;break}P.set(R,X)}if(T)for(var W=p?3:1,Q=function(ae){var ge=$.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=W;ne>0;ne--){var Z=Q(ne);if(Z==="break")break}e.placement!==I&&(e.modifiersData[i]._skip=!0,e.placement=I,e.reset=!0)}}var Moe={name:"flip",enabled:!0,phase:"main",fn:Eoe,requiresIfExists:["offset"],data:{_skip:!1}};function k$(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 C$(t){return[ho,wr,br,fo].some(function(e){return t[e]>=0})}function Toe(t){var e=t.state,n=t.name,i=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=Gg(e,{elementContext:"reference"}),a=Gg(e,{altBoundary:!0}),l=k$(r,i),c=k$(a,s,o),u=C$(l),d=C$(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 Poe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Toe};function Ioe(t,e,n){var i=Sa(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 Loe(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]=Ioe(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 Ooe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Loe};function Doe(t){var e=t.state,n=t.name;e.modifiersData[n]=BD({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var zD={name:"popperOffsets",enabled:!0,phase:"read",fn:Doe,data:{}};function Roe(t){return t==="x"?"y":"x"}function Voe(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,y=Gg(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=Sa(e.placement),k=Bf(e.placement),C=!k,$=D4(b),S=Roe($),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 B,F=$==="y"?ho:fo,z=$==="y"?br:wr,U=$==="y"?"height":"width",G=M[$],K=G+y[F],X=G-y[z],W=f?-T[U]/2:0,Q=k===Rf?P[U]:T[U],ne=k===Rf?-T[U]:-P[U],Z=e.elements.arrow,ae=f&&Z?O4(Z):{width:0,height:0},ge=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:OD(),Ce=ge[F],oe=ge[z],pe=Qm(0,P[U],ae[U]),ie=C?P[U]/2-W-pe-Ce-L.mainAxis:Q-pe-Ce-L.mainAxis,re=C?-P[U]/2+W+pe+oe+L.mainAxis:ne+pe+oe+L.mainAxis,ke=e.elements.arrow&&R1(e.elements.arrow),je=ke?$==="y"?ke.clientTop||0:ke.clientLeft||0:0,te=(B=R==null?void 0:R[$])!=null?B:0,se=G+ie-te-je,me=G+re-te,$e=Qm(f?gy(K,se):K,G,f?ed(X,me):X);M[$]=$e,V[$]=$e-G}if(a){var Se,Le=$==="x"?ho:fo,We=$==="x"?br:wr,Fe=M[S],ze=S==="y"?"height":"width",Ae=Fe+y[Le],Ze=Fe-y[We],Ye=[ho,fo].indexOf(b)!==-1,it=(Se=R==null?void 0:R[S])!=null?Se:0,ye=Ye?Ae:Fe-P[ze]-T[ze]-it+L.altAxis,ve=Ye?Fe+P[ze]+T[ze]-it-L.altAxis:Ze,Pe=f&&Ye?uoe(ye,Fe,ve):Qm(f?ye:Ae,Fe,f?ve:Ze);M[S]=Pe,V[S]=Pe-Fe}e.modifiersData[i]=V}}var Foe={name:"preventOverflow",enabled:!0,phase:"main",fn:Voe,requiresIfExists:["offset"]};function Noe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Boe(t){return t===na(t)||!fr(t)?R4(t):Noe(t)}function zoe(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 Hoe(t,e,n){n===void 0&&(n=!1);var i=fr(e),s=fr(e)&&zoe(e),o=Xc(e),r=Nf(t,s),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((Ta(e)!=="body"||F4(o))&&(a=Boe(e)),fr(e)?(l=Nf(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=V4(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function Uoe(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 joe(t){var e=Uoe(t);return ooe.reduce(function(n,i){return n.concat(e.filter(function(s){return s.phase===i}))},[])}function Woe(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Yoe(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 x$={placement:"bottom",modifiers:[],strategy:"absolute"};function S$(){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 N4(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,i=n===void 0?[]:n,s=e.defaultOptions,o=s===void 0?x$:s;return function(r,a,l){l===void 0&&(l=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},x$,o),modifiersData:{},elements:{reference:r,popper:a},attributes:{},styles:{}},u=[],d=!1,h={state:c,setOptions:function(m){var y=typeof m=="function"?m(c.options):m;p(),c.options=Object.assign({},o,c.options,y),c.scrollParents={reference:Vf(r)?eg(r):r.contextElement?eg(r.contextElement):[],popper:eg(a)};var b=joe(Yoe([].concat(i,c.options.modifiers)));return c.orderedModifiers=b.filter(function(k){return k.enabled}),f(),h.update()},forceUpdate:function(){if(!d){var m=c.elements,y=m.reference,b=m.popper;if(S$(y,b)){c.rects={reference:Hoe(y,R1(b),c.options.strategy==="fixed"),popper:O4(b)},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],$=C.fn,S=C.options,M=S===void 0?{}:S,P=C.name;typeof $=="function"&&(c=$({state:c,options:M,name:P,instance:h})||c)}}}},update:Woe(function(){return new Promise(function(m){h.forceUpdate(),m(c)})}),destroy:function(){p(),d=!0}};if(!S$(r,a))return h;h.setOptions(l).then(function(m){!d&&l.onFirstUpdate&&l.onFirstUpdate(m)});function f(){c.orderedModifiers.forEach(function(m){var y=m.name,b=m.options,k=b===void 0?{}:b,C=m.effect;if(typeof C=="function"){var $=C({state:c,name:y,instance:h,options:k}),S=function(){};u.push($||S)}})}function p(){u.forEach(function(m){return m()}),u=[]}return h}}N4();var qoe=[FD,zD,VD,ID];N4({defaultModifiers:qoe});var Goe=[FD,zD,VD,ID,Ooe,Moe,Foe,poe,Poe],Xoe=N4({defaultModifiers:Goe});const Koe=(t,e,n={})=>{const i={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const c=Zoe(l);Object.assign(r.value,c)},requires:["computeStyles"]},s=Y(()=>{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=J({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=Xoe(l,c,E(s)))}),wn(()=>{a()}),{state:Y(()=>{var l;return{...((l=E(o))==null?void 0:l.state)||{}}}),styles:Y(()=>E(r).styles),attributes:Y(()=>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:Y(()=>E(o))}};function Zoe(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 B4=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}}},Joe=(t,e=0)=>{if(e===0)return t;const n=J(yt(e)&&!!e.initVal);let i=null;const s=r=>{if(nn(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 Ft(()=>o("leading")),Te(()=>t.value,r=>{o(r?"leading":"trailing")}),n};function $$(){let t;const e=(i,s)=>{n(),t=window.setTimeout(i,s)},n=()=>window.clearTimeout(t);return Nd(()=>n()),{registerTimeout:e,cancelTimeout:n}}const Kk={prefix:Math.floor(Math.random()*1e4),current:0},Qoe=Symbol("elIdInjection"),z4=()=>pt()?qe(Qoe,Kk):Kk,kr=t=>{const e=z4();!Kt&&e===Kk&&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=T4();return fD(()=>E(t)||`${n.value}-id-${e.prefix}-${e.current++}`)};let Ah=[];const A$=t=>{ls(t)===Ue.esc&&Ah.forEach(e=>e(t))},ere=t=>{Ft(()=>{Ah.length===0&&document.addEventListener("keydown",A$),Kt&&Ah.push(t)}),wn(()=>{Ah=Ah.filter(e=>e!==t),Ah.length===0&&Kt&&document.removeEventListener("keydown",A$)})},HD=()=>{const t=T4(),e=z4(),n=Y(()=>`${t.value}-popper-container-${e.prefix}`);return{id:n,selector:Y(()=>`#${n.value}`)}},tre=t=>{const e=document.createElement("div");return e.id=t,document.body.appendChild(e),e},nre=()=>{const{id:t,selector:e}=HD();return Od(()=>{Kt&&(document.body.querySelector(e.value)||tre(t.value))}),{id:t,selector:e}},sre=Ge({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),ire=({showAfter:t,hideAfter:e,autoClose:n,open:i,close:s})=>{const{registerTimeout:o}=$$(),{registerTimeout:r,cancelTimeout:a}=$$();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)}}},UD=Symbol("elForwardRef"),ore=t=>{Pt(UD,{setForwardRef:n=>{t.value=n}})},rre=t=>({mounted(e){t(e)},updated(e){t(e)},unmounted(){t(null)}}),E$={current:0},M$=J(0),jD=2e3,T$=Symbol("elZIndexContextKey"),WD=Symbol("zIndexContextKey"),Yb=t=>{const e=pt()?qe(T$,E$):E$,n=t||(pt()?qe(WD,void 0):void 0),i=Y(()=>{const r=E(n);return wt(r)?r:jD}),s=Y(()=>i.value+M$.value),o=()=>(e.current++,M$.value=e.current,s.value);return!Kt&&!qe(T$)&&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}},P$=Math.min,tg=Math.max,vy=Math.round,Nc=t=>({x:t,y:t}),are={left:"right",right:"left",bottom:"top",top:"bottom"},lre={start:"end",end:"start"};function H4(t,e){return typeof t=="function"?t(e):t}function zf(t){return t.split("-")[0]}function qb(t){return t.split("-")[1]}function cre(t){return t==="x"?"y":"x"}function YD(t){return t==="y"?"height":"width"}function Xg(t){return["top","bottom"].includes(zf(t))?"y":"x"}function qD(t){return cre(Xg(t))}function ure(t,e,n){n===void 0&&(n=!1);const i=qb(t),s=qD(t),o=YD(s);let r=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(r=_y(r)),[r,_y(r)]}function dre(t){const e=_y(t);return[Zk(t),e,Zk(e)]}function Zk(t){return t.replace(/start|end/g,e=>lre[e])}function hre(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 fre(t,e,n,i){const s=qb(t);let o=hre(zf(t),n==="start",i);return s&&(o=o.map(r=>r+"-"+s),e&&(o=o.concat(o.map(Zk)))),o}function _y(t){return t.replace(/left|right|bottom|top/g,e=>are[e])}function pre(t){return{top:0,right:0,bottom:0,left:0,...t}}function mre(t){return typeof t!="number"?pre(t):{top:t,right:t,bottom:t,left:t}}function yy(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 I$(t,e,n){let{reference:i,floating:s}=t;const o=Xg(e),r=qD(e),a=YD(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(qb(e)){case"start":f[r]-=h*(n&&c?-1:1);break;case"end":f[r]+=h*(n&&c?-1:1);break}return f}const gre=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}=I$(c,i,l),h=i,f={},p=0;for(let m=0;m<a.length;m++){const{name:y,fn:b}=a[m],{x:k,y:C,data:$,reset:S}=await b({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,[y]:{...f[y],...$}},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}=I$(c,h,l)),m=-1)}return{x:u,y:d,placement:h,strategy:s,middlewareData:f}};async function vre(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}=H4(e,t),p=mre(f),y=a[h?d==="floating"?"reference":"floating":d],b=yy(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(y)))==null||n?y:y.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)),$=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=yy(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:k,offsetParent:C,strategy:l}):k);return{top:(b.top-S.top+p.top)/$.y,bottom:(S.bottom-b.bottom+p.bottom)/$.y,left:(b.left-S.left+p.left)/$.x,right:(S.right-b.right+p.right)/$.x}}const _re=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,...y}=H4(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const b=zf(s),k=Xg(a),C=zf(a)===a,$=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=h||(C||!m?[_y(a)]:dre(a)),M=p!=="none";!h&&M&&S.push(...fre(a,m,p,$));const P=[a,...S],T=await vre(e,y),I=[];let L=((i=o.flip)==null?void 0:i.overflows)||[];if(u&&I.push(T[b]),d){const F=ure(s,r,$);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,z=P[F];if(z)return{data:{index:F,overflows:L},reset:{placement:z}};let U=(V=L.filter(G=>G.overflows[0]<=0).sort((G,K)=>G.overflows[1]-K.overflows[1])[0])==null?void 0:V.placement;if(!U)switch(f){case"bestFit":{var B;const G=(B=L.filter(K=>{if(M){const X=Xg(K.placement);return X===k||X==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(X=>X>0).reduce((X,W)=>X+W,0)]).sort((K,X)=>K[1]-X[1])[0])==null?void 0:B[0];G&&(U=G);break}case"initialPlacement":U=a;break}if(s!==U)return{reset:{placement:U}}}return{}}}};async function yre(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=qb(n),l=Xg(n)==="y",c=["left","top"].includes(r)?-1:1,u=o&&l?-1:1,d=H4(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 bre=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 yre(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 GD(t)?(t.nodeName||"").toLowerCase():"#document"}function Vo(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Kc(t){var e;return(e=(GD(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function GD(t){return t instanceof Node||t instanceof Vo(t).Node}function Kr(t){return t instanceof Element||t instanceof Vo(t).Element}function Pa(t){return t instanceof HTMLElement||t instanceof Vo(t).HTMLElement}function L$(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Vo(t).ShadowRoot}function V1(t){const{overflow:e,overflowX:n,overflowY:i,display:s}=Zr(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(s)}function wre(t){return["table","td","th"].includes(fp(t))}function Gb(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function U4(t){const e=j4(),n=Kr(t)?Zr(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 kre(t){let e=Bc(t);for(;Pa(e)&&!Hf(e);){if(U4(e))return e;if(Gb(e))return null;e=Bc(e)}return null}function j4(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Hf(t){return["html","body","#document"].includes(fp(t))}function Zr(t){return Vo(t).getComputedStyle(t)}function Xb(t){return Kr(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||L$(t)&&t.host||Kc(t);return L$(e)?e.host:e}function XD(t){const e=Bc(t);return Hf(e)?t.ownerDocument?t.ownerDocument.body:t.body:Pa(e)&&V1(e)?e:XD(e)}function Jk(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=XD(t),o=s===((i=t.ownerDocument)==null?void 0:i.body),r=Vo(s);if(o){const a=Qk(r);return e.concat(r,r.visualViewport||[],V1(s)?s:[],a&&n?Jk(a):[])}return e.concat(s,Jk(s,[],n))}function Qk(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function KD(t){const e=Zr(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=Pa(t),o=s?t.offsetWidth:n,r=s?t.offsetHeight:i,a=vy(n)!==o||vy(i)!==r;return a&&(n=o,i=r),{width:n,height:i,$:a}}function ZD(t){return Kr(t)?t:t.contextElement}function af(t){const e=ZD(t);if(!Pa(e))return Nc(1);const n=e.getBoundingClientRect(),{width:i,height:s,$:o}=KD(e);let r=(o?vy(n.width):n.width)/i,a=(o?vy(n.height):n.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const Cre=Nc(0);function JD(t){const e=Vo(t);return!j4()||!e.visualViewport?Cre:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function xre(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Vo(t)?!1:e}function Kg(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),o=ZD(t);let r=Nc(1);e&&(i?Kr(i)&&(r=af(i)):r=af(t));const a=xre(o,n,i)?JD(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=Vo(o),f=i&&Kr(i)?Vo(i):i;let p=h,m=Qk(p);for(;m&&i&&f!==p;){const y=af(m),b=m.getBoundingClientRect(),k=Zr(m),C=b.left+(m.clientLeft+parseFloat(k.paddingLeft))*y.x,$=b.top+(m.clientTop+parseFloat(k.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=C,c+=$,p=Vo(m),m=Qk(p)}}return yy({width:u,height:d,x:l,y:c})}function Sre(t){let{elements:e,rect:n,offsetParent:i,strategy:s}=t;const o=s==="fixed",r=Kc(i),a=e?Gb(e.floating):!1;if(i===r||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Nc(1);const u=Nc(0),d=Pa(i);if((d||!d&&!o)&&((fp(i)!=="body"||V1(r))&&(l=Xb(i)),Pa(i))){const h=Kg(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 $re(t){return Array.from(t.getClientRects())}function QD(t){return Kg(Kc(t)).left+Xb(t).scrollLeft}function Are(t){const e=Kc(t),n=Xb(t),i=t.ownerDocument.body,s=tg(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),o=tg(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let r=-n.scrollLeft+QD(t);const a=-n.scrollTop;return Zr(i).direction==="rtl"&&(r+=tg(e.clientWidth,i.clientWidth)-s),{width:s,height:o,x:r,y:a}}function Ere(t,e){const n=Vo(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=j4();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a,y:l}}function Mre(t,e){const n=Kg(t,!0,e==="fixed"),i=n.top+t.clientTop,s=n.left+t.clientLeft,o=Pa(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 O$(t,e,n){let i;if(e==="viewport")i=Ere(t,n);else if(e==="document")i=Are(Kc(t));else if(Kr(e))i=Mre(e,n);else{const s=JD(t);i={...e,x:e.x-s.x,y:e.y-s.y}}return yy(i)}function eR(t,e){const n=Bc(t);return n===e||!Kr(n)||Hf(n)?!1:Zr(n).position==="fixed"||eR(n,e)}function Tre(t,e){const n=e.get(t);if(n)return n;let i=Jk(t,[],!1).filter(a=>Kr(a)&&fp(a)!=="body"),s=null;const o=Zr(t).position==="fixed";let r=o?Bc(t):t;for(;Kr(r)&&!Hf(r);){const a=Zr(r),l=U4(r);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||V1(r)&&!l&&eR(t,r))?i=i.filter(u=>u!==r):s=a,r=Bc(r)}return e.set(t,i),i}function Pre(t){let{element:e,boundary:n,rootBoundary:i,strategy:s}=t;const r=[...n==="clippingAncestors"?Gb(e)?[]:Tre(e,this._c):[].concat(n),i],a=r[0],l=r.reduce((c,u)=>{const d=O$(e,u,s);return c.top=tg(d.top,c.top),c.right=P$(d.right,c.right),c.bottom=P$(d.bottom,c.bottom),c.left=tg(d.left,c.left),c},O$(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ire(t){const{width:e,height:n}=KD(t);return{width:e,height:n}}function Lre(t,e,n){const i=Pa(e),s=Kc(e),o=n==="fixed",r=Kg(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Nc(0);if(i||!i&&!o)if((fp(e)!=="body"||V1(s))&&(a=Xb(e)),i){const d=Kg(e,!0,o,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else s&&(l.x=QD(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 Sw(t){return Zr(t).position==="static"}function D$(t,e){return!Pa(t)||Zr(t).position==="fixed"?null:e?e(t):t.offsetParent}function tR(t,e){const n=Vo(t);if(Gb(t))return n;if(!Pa(t)){let s=Bc(t);for(;s&&!Hf(s);){if(Kr(s)&&!Sw(s))return s;s=Bc(s)}return n}let i=D$(t,e);for(;i&&wre(i)&&Sw(i);)i=D$(i,e);return i&&Hf(i)&&Sw(i)&&!U4(i)?n:i||kre(t)||n}const Ore=async function(t){const e=this.getOffsetParent||tR,n=this.getDimensions,i=await n(t.floating);return{reference:Lre(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Dre(t){return Zr(t).direction==="rtl"}const Rre={convertOffsetParentRelativeRectToViewportRelativeRect:Sre,getDocumentElement:Kc,getClippingRect:Pre,getOffsetParent:tR,getElementRects:Ore,getClientRects:$re,getDimensions:Ire,getScale:af,isElement:Kr,isRTL:Dre},eC=bre,tC=_re,nC=(t,e,n)=>{const i=new Map,s={platform:Rre,...n},o={...s.platform,_c:i};return gre(t,e,{...s,platform:o})};function Vre(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 $w=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 Fre(t){return is(t)&&t.type===Zn}const kc=t=>{const e=Me(t)?t:[t],n=[];return e.forEach(i=>{var s;Me(i)?n.push(...kc(i)):is(i)&&((s=i.component)!=null&&s.subTree)?n.push(i,...kc(i.component.subTree)):is(i)&&Me(i.children)?n.push(...kc(i.children)):is(i)&&i.shapeFlag===2?n.push(...kc(i.type())):n.push(i)}),n},Nre=(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),Bre=(t,e)=>{const n=Fn({}),i=Fn([]),s=new WeakMap,o=c=>{n.value[c.uid]=c,Hm(n),Ft(()=>{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)&&Hm(n),h(f,p))}s.get(d).push(u)})},r=c=>{delete n.value[c.uid],Hm(n);const u=c.getVnode().el,d=u.parentNode,h=s.get(d),f=h.indexOf(u);h.splice(f,1)},a=()=>{i.value=Nre(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=Hb({type:String,values:$l,required:!1}),nR=Symbol("size"),sR=()=>{const t=qe(nR,{});return Y(()=>E(t.size)||"")};function pp(t,{disabled:e,beforeFocus:n,afterFocus:i,beforeBlur:s,afterBlur:o}={}){const{emit:r}=pt(),a=Fn(),l=J(!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)||Wg(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 W4({afterComposition:t,emit:e}){const n=J(!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 iR=Symbol("emptyValuesContextKey"),zre="use-empty-values",Hre=["",void 0,null],Ure=void 0,F1=Ge({emptyValues:Array,valueOnClear:{type:de([String,Number,Boolean,Function]),default:void 0,validator:t=>(t=et(t)?t():t,Me(t)?t.every(e=>!e):!t)}}),Y4=(t,e)=>{const n=pt()?qe(iR,J({})):J({}),i=Y(()=>t.emptyValues||n.value.emptyValues||Hre),s=Y(()=>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:Ure),o=r=>{let a=!0;return Me(r)?a=i.value.some(l=>Wi(r,l)):a=i.value.includes(r),a};return o(s.value)||Tt(zre,"value-on-clear should be a value of empty-values"),{emptyValues:i,valueOnClear:s,isEmptyValue:o}},jre=Ge({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),xr=t=>S4(jre,t),oR=t=>{const e=t.props,n=Me(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(k4(r)){n[s]={...r,default:o};continue}n[s]={type:r,default:o}}}t.props=n}}},qt=(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 oR(t),t},Wre=(t,e)=>(t.install=n=>{t._context=n._context,n.config.globalProperties[e]=t},t),Yre=(t,e)=>(t.install=n=>{n.directive(e,t)},t),Os=t=>(t.install=Dt,oR(t),t);var qre=fe({__name:"teleport",props:A4,setup(t){return(e,n)=>e.disabled?le(e.$slots,"default",{key:0}):(v(),D(ea,{key:1,to:e.to},[le(e.$slots,"default")],8,["to"]))}}),Gre=qre;const Kb=qt(Gre);/*! Element Plus Icons Vue v2.3.2 */var Xre=fe({name:"ArrowDownBold",__name:"arrow-down-bold",setup(t){return(e,n)=>(v(),A("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"})]))}}),Kre=Xre,Zre=fe({name:"ArrowDown",__name:"arrow-down",setup(t){return(e,n)=>(v(),A("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"})]))}}),Bd=Zre,Jre=fe({name:"ArrowLeftBold",__name:"arrow-left-bold",setup(t){return(e,n)=>(v(),A("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"})]))}}),Qre=Jre,eae=fe({name:"ArrowLeft",__name:"arrow-left",setup(t){return(e,n)=>(v(),A("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"})]))}}),bd=eae,tae=fe({name:"ArrowRight",__name:"arrow-right",setup(t){return(e,n)=>(v(),A("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"})]))}}),Hr=tae,nae=fe({name:"ArrowUp",__name:"arrow-up",setup(t){return(e,n)=>(v(),A("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"})]))}}),Zb=nae,sae=fe({name:"Avatar",__name:"avatar",setup(t){return(e,n)=>(v(),A("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"})]))}}),iae=sae,oae=fe({name:"Back",__name:"back",setup(t){return(e,n)=>(v(),A("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"})]))}}),rR=oae,rae=fe({name:"Bell",__name:"bell",setup(t){return(e,n)=>(v(),A("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"})]))}}),aae=rae,lae=fe({name:"Bottom",__name:"bottom",setup(t){return(e,n)=>(v(),A("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"})]))}}),cae=lae,uae=fe({name:"Calendar",__name:"calendar",setup(t){return(e,n)=>(v(),A("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"})]))}}),dae=uae,hae=fe({name:"CameraFilled",__name:"camera-filled",setup(t){return(e,n)=>(v(),A("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"})]))}}),fae=hae,pae=fe({name:"CaretBottom",__name:"caret-bottom",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m192 384 320 384 320-384z"})]))}}),mae=pae,gae=fe({name:"ChatDotRound",__name:"chat-dot-round",setup(t){return(e,n)=>(v(),A("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"})]))}}),vae=gae,_ae=fe({name:"ChatDotSquare",__name:"chat-dot-square",setup(t){return(e,n)=>(v(),A("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"})]))}}),yae=_ae,bae=fe({name:"Check",__name:"check",setup(t){return(e,n)=>(v(),A("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"})]))}}),q4=bae,wae=fe({name:"CircleCheck",__name:"circle-check",setup(t){return(e,n)=>(v(),A("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"})]))}}),G4=wae,kae=fe({name:"CircleCloseFilled",__name:"circle-close-filled",setup(t){return(e,n)=>(v(),A("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"})]))}}),aR=kae,Cae=fe({name:"CircleClose",__name:"circle-close",setup(t){return(e,n)=>(v(),A("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=Cae,xae=fe({name:"Clock",__name:"clock",setup(t){return(e,n)=>(v(),A("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"})]))}}),lR=xae,Sae=fe({name:"CloseBold",__name:"close-bold",setup(t){return(e,n)=>(v(),A("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"})]))}}),cR=Sae,$ae=fe({name:"Close",__name:"close",setup(t){return(e,n)=>(v(),A("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"})]))}}),Bo=$ae,Aae=fe({name:"Comment",__name:"comment",setup(t){return(e,n)=>(v(),A("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"})]))}}),Eae=Aae,Mae=fe({name:"CopyDocument",__name:"copy-document",setup(t){return(e,n)=>(v(),A("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"})]))}}),uR=Mae,Tae=fe({name:"DArrowLeft",__name:"d-arrow-left",setup(t){return(e,n)=>(v(),A("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=Tae,Pae=fe({name:"DArrowRight",__name:"d-arrow-right",setup(t){return(e,n)=>(v(),A("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=Pae,Iae=fe({name:"DeleteFilled",__name:"delete-filled",setup(t){return(e,n)=>(v(),A("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"})]))}}),Lae=Iae,Oae=fe({name:"Delete",__name:"delete",setup(t){return(e,n)=>(v(),A("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"})]))}}),Jb=Oae,Dae=fe({name:"Document",__name:"document",setup(t){return(e,n)=>(v(),A("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"})]))}}),N1=Dae,Rae=fe({name:"Download",__name:"download",setup(t){return(e,n)=>(v(),A("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"})]))}}),Vae=Rae,Fae=fe({name:"EditPen",__name:"edit-pen",setup(t){return(e,n)=>(v(),A("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"})]))}}),dR=Fae,Nae=fe({name:"Edit",__name:"edit",setup(t){return(e,n)=>(v(),A("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"})]))}}),Bae=Nae,zae=fe({name:"Expand",__name:"expand",setup(t){return(e,n)=>(v(),A("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"})]))}}),Hae=zae,Uae=fe({name:"FullScreen",__name:"full-screen",setup(t){return(e,n)=>(v(),A("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"})]))}}),hR=Uae,jae=fe({name:"Guide",__name:"guide",setup(t){return(e,n)=>(v(),A("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"})]))}}),Wae=jae,Yae=fe({name:"Hide",__name:"hide",setup(t){return(e,n)=>(v(),A("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"})]))}}),fR=Yae,qae=fe({name:"Histogram",__name:"histogram",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M416 896V128h192v768zm-288 0V448h192v448zm576 0V320h192v576z"})]))}}),Gae=qae,Xae=fe({name:"HomeFilled",__name:"home-filled",setup(t){return(e,n)=>(v(),A("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"})]))}}),Kae=Xae,Zae=fe({name:"InfoFilled",__name:"info-filled",setup(t){return(e,n)=>(v(),A("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=Zae,Jae=fe({name:"Iphone",__name:"iphone",setup(t){return(e,n)=>(v(),A("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"})]))}}),Qae=Jae,ele=fe({name:"Link",__name:"link",setup(t){return(e,n)=>(v(),A("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"})]))}}),pR=ele,tle=fe({name:"Loading",__name:"loading",setup(t){return(e,n)=>(v(),A("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=tle,nle=fe({name:"Lock",__name:"lock",setup(t){return(e,n)=>(v(),A("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"})]))}}),sle=nle,ile=fe({name:"Memo",__name:"memo",setup(t){return(e,n)=>(v(),A("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"})]))}}),ole=ile,rle=fe({name:"Message",__name:"message",setup(t){return(e,n)=>(v(),A("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"})]))}}),ale=rle,lle=fe({name:"Minus",__name:"minus",setup(t){return(e,n)=>(v(),A("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"})]))}}),cle=lle,ule=fe({name:"Money",__name:"money",setup(t){return(e,n)=>(v(),A("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"})]))}}),dle=ule,hle=fe({name:"MoreFilled",__name:"more-filled",setup(t){return(e,n)=>(v(),A("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"})]))}}),sC=hle,fle=fe({name:"More",__name:"more",setup(t){return(e,n)=>(v(),A("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"})]))}}),ple=fle,mle=fe({name:"Notebook",__name:"notebook",setup(t){return(e,n)=>(v(),A("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"})]))}}),gle=mle,vle=fe({name:"Operation",__name:"operation",setup(t){return(e,n)=>(v(),A("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"})]))}}),_le=vle,yle=fe({name:"PictureFilled",__name:"picture-filled",setup(t){return(e,n)=>(v(),A("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"})]))}}),ble=yle,wle=fe({name:"Picture",__name:"picture",setup(t){return(e,n)=>(v(),A("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"})]))}}),kle=wle,Cle=fe({name:"Plus",__name:"plus",setup(t){return(e,n)=>(v(),A("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"})]))}}),X4=Cle,xle=fe({name:"Postcard",__name:"postcard",setup(t){return(e,n)=>(v(),A("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"})]))}}),Sle=xle,$le=fe({name:"Reading",__name:"reading",setup(t){return(e,n)=>(v(),A("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"})]))}}),Ale=$le,Ele=fe({name:"RefreshLeft",__name:"refresh-left",setup(t){return(e,n)=>(v(),A("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"})]))}}),mR=Ele,Mle=fe({name:"RefreshRight",__name:"refresh-right",setup(t){return(e,n)=>(v(),A("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"})]))}}),Tle=Mle,Ple=fe({name:"ScaleToOriginal",__name:"scale-to-original",setup(t){return(e,n)=>(v(),A("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"})]))}}),Ile=Ple,Lle=fe({name:"Search",__name:"search",setup(t){return(e,n)=>(v(),A("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"})]))}}),Qb=Lle,Ole=fe({name:"SuccessFilled",__name:"success-filled",setup(t){return(e,n)=>(v(),A("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"})]))}}),K4=Ole,Dle=fe({name:"Tickets",__name:"tickets",setup(t){return(e,n)=>(v(),A("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"})]))}}),Rle=Dle,Vle=fe({name:"Timer",__name:"timer",setup(t){return(e,n)=>(v(),A("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"})]))}}),Fle=Vle,Nle=fe({name:"Top",__name:"top",setup(t){return(e,n)=>(v(),A("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"})]))}}),Ble=Nle,zle=fe({name:"UploadFilled",__name:"upload-filled",setup(t){return(e,n)=>(v(),A("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"})]))}}),Z4=zle,Hle=fe({name:"VideoPlay",__name:"video-play",setup(t){return(e,n)=>(v(),A("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"})]))}}),Ule=Hle,jle=fe({name:"View",__name:"view",setup(t){return(e,n)=>(v(),A("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"})]))}}),gR=jle,Wle=fe({name:"WarningFilled",__name:"warning-filled",setup(t){return(e,n)=>(v(),A("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"})]))}}),J4=Wle,Yle=fe({name:"ZoomIn",__name:"zoom-in",setup(t){return(e,n)=>(v(),A("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"})]))}}),vR=Yle,qle=fe({name:"ZoomOut",__name:"zoom-out",setup(t){return(e,n)=>(v(),A("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"})]))}}),Gle=qle;const ds=de([String,Object,Function]),Xle={Close:Bo},_R={Close:Bo,SuccessFilled:K4,InfoFilled:wl,WarningFilled:J4,CircleCloseFilled:aR},jf={primary:wl,success:K4,warning:J4,error:aR,info:wl},Q4={validating:Uf,success:G4,error:Zc},Kle=["light","dark"],Zle=Ge({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:my(jf),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:Kle,default:"light"}}),Jle={close:t=>t instanceof MouseEvent},Qle=Ge({size:{type:de([Number,String])},color:{type:String}});var ece=fe({name:"ElIcon",inheritAttrs:!1,__name:"icon",props:Qle,setup(t){const e=t,n=Be("icon"),i=Y(()=>{const{size:s,color:o}=e,r=fi(s);return!r&&!o?{}:{fontSize:r,"--color":o}});return(s,o)=>(v(),A("i",Wt({class:E(n).b(),style:i.value},s.$attrs),[le(s.$slots,"default")],16))}}),tce=ece;const be=qt(tce);var nce=fe({name:"ElAlert",__name:"alert",props:Zle,emits:Jle,setup(t,{emit:e}){const{Close:n}=_R,i=t,s=e,o=mi(),r=Be("alert"),a=J(!0),l=Y(()=>jf[i.type]),c=Y(()=>{var h;if(i.description)return!0;const d=(h=o.default)==null?void 0:h.call(o);return d?kc(d).some(f=>!Fre(f)):!1}),u=d=>{a.value=!1,s("close",d)};return(d,h)=>(v(),D(Ho,{name:E(r).b("fade"),persisted:""},{default:w(()=>[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(be),{key:0,class:q([E(r).e("icon"),E(r).is("big",c.value)])},{default:w(()=>[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(),A("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(),A("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(),A(ee,{key:2},[t.closeText?(v(),A("div",{key:0,class:q([E(r).e("close-btn"),E(r).is("customed")]),onClick:u},x(t.closeText),3)):(v(),D(E(be),{key:1,class:q(E(r).e("close-btn")),onClick:u},{default:w(()=>[_(E(n))]),_:1},8,["class"]))],64)):O("v-if",!0)],2)],2),[[jt,a.value]])]),_:3},8,["name"]))}}),sce=nce;const sa=qt(sce),yR=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],bR=Ge({role:{type:String,values:yR,default:"tooltip"}}),e8=Symbol("popper"),wR=Symbol("popperContent");var ice=fe({name:"ElPopperArrow",inheritAttrs:!1,__name:"arrow",setup(t,{expose:e}){const n=Be("popper"),{arrowRef:i,arrowStyle:s}=qe(wR,void 0);return wn(()=>{i.value=void 0}),e({arrowRef:i}),(o,r)=>(v(),A("span",{ref_key:"arrowRef",ref:i,class:q(E(n).e("arrow")),style:Xe(E(s)),"data-popper-arrow":""},null,6))}}),oce=ice;const kR=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}),Aw="ElOnlyChild",CR=fe({name:Aw,setup(t,{slots:e,attrs:n}){var s;const i=rre(((s=qe(UD))==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]=xR(o);return r?(a>1&&Tt(Aw,"requires exact only one valid child."),Re(_r(r,n),[[i]])):(Tt(Aw,"no valid child node found"),null)}}});function xR(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 xa:case"svg":return[R$(i),n];case ee:return xR(i.children);default:return[i,n]}return[R$(i),n]}return[null,0]}function R$(t){const e=Be("only-child");return _("span",{class:e.e("content")},[t])}var rce=fe({name:"ElPopperTrigger",inheritAttrs:!1,__name:"trigger",props:kR,setup(t,{expose:e}){const n=t,{role:i,triggerRef:s}=qe(e8,void 0);ore(s);const o=Y(()=>a.value?n.id:void 0),r=Y(()=>{if(i&&i.value==="tooltip")return n.open&&n.id?n.id:void 0}),a=Y(()=>{if(i&&i.value!=="tooltip")return i.value}),l=Y(()=>a.value?`${n.open}`:void 0);let c;const u=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return Ft(()=>{Te(()=>n.virtualRef,d=>{d&&(s.value=js(d))},{immediate:!0}),Te(s,(d,h)=>{c==null||c(),c=void 0,Po(h)&&u.forEach(f=>{const p=n[f];p&&h.removeEventListener(f.slice(2).toLowerCase(),p,["onFocus","onBlur"].includes(f))}),Po(d)&&(u.forEach(f=>{const p=n[f];p&&d.addEventListener(f.slice(2).toLowerCase(),p,["onFocus","onBlur"].includes(f))}),Wg(d)&&(c=Te([o,r,a,l],f=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((p,m)=>{ui(f[m])?d.removeAttribute(p):d.setAttribute(p,f[m])})},{immediate:!0}))),Po(h)&&Wg(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&&Po(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(CR),Wt({key:0},d.$attrs,{"aria-controls":o.value,"aria-describedby":r.value,"aria-expanded":l.value,"aria-haspopup":a.value}),{default:w(()=>[le(d.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}}),ace=rce;const SR=Ge({arrowOffset:{type:Number,default:5}}),lce=["fixed","absolute"],cce=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:lce,default:"absolute"}}),$R=Ge({...cce,...SR,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,...xr(["ariaLabel"]),loop:Boolean}),uce={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},dce=Ge({size:{type:String,values:$l},disabled:Boolean}),hce=Ge({...dce,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}}),fce={validate:(t,e,n)=>(Me(t)||Ke(t))&&Jn(e)&&Ke(n)},zd=Symbol("formContextKey"),wd=Symbol("formItemContextKey"),Ii=(t,e={})=>{const n=J(void 0),i=e.prop?n:TD("size"),s=e.global?n:sR(),o=e.form?{size:void 0}:qe(zd,void 0),r=e.formItem?{size:void 0}:qe(wd,void 0);return Y(()=>i.value||E(t)||(r==null?void 0:r.size)||(o==null?void 0:o.size)||s.value||"")},bs=t=>{const e=TD("disabled"),n=qe(zd,void 0);return Y(()=>e.value??E(t)??(n==null?void 0:n.disabled)??!1)},_o=()=>({form:qe(zd,void 0),formItem:qe(wd,void 0)}),Tl=(t,{formItemContext:e,disableIdGeneration:n,disableIdManagement:i})=>{n||(n=J(!1)),i||(i=J(!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=J();let a;const l=Y(()=>{var c;return!!(!(t.label||t.ariaLabel)&&e&&e.inputIds&&((c=e.inputIds)==null?void 0:c.length)<=1)});return Ft(()=>{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}},pce=["","error","validating","success"],mce=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:pce},for:String,inlineMessage:{type:Boolean,default:void 0},showMessage:{type:Boolean,default:!0},size:{type:String,values:$l}}),Gp=t=>Me(t)?t[0]:t,ao=t=>!t&&t!==0?[]:Me(t)?t:[t],gce="ElForm";function vce(){const t=J([]),e=Y(()=>{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(gce,`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 qv=(t,e)=>{const n=Us(e).map(i=>Me(i)?i.join("."):i);return n.length>0?t.filter(i=>i.propString&&n.includes(i.propString)):t},rh="ElForm";var _ce=fe({name:rh,__name:"form",props:hce,emits:fce,setup(t,{expose:e,emit:n}){const i=t,s=n,o=J(),r=In([]),a=new Map,l=Ii(),c=Be("form"),u=Y(()=>{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=>qv(r,[P])[0],h=P=>{r.push(P),P.propString&&(a.has(P.propString)?P.setInitialValue(a.get(P.propString)):a.set(P.propString,Qu(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,Qu(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}qv(r,P).forEach(L=>L.resetField());const T=new Set(r.map(L=>L.propString).filter(Boolean)),I=P.length>0?Us(P).map(L=>Me(L)?L.join("."):L):[...a.keys()];for(const L of I)!T.has(L)&&a.has(L)&&(Ac(i.model,L).value=Qu(a.get(L)))},y=(P=[])=>{qv(r,P).forEach(T=>T.clearValidate())},b=Y(()=>{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=qv(r,P);return T.length?T:(Tt(rh,"please pass correct props!"),[])},C=async P=>S(void 0,P),$=async(P=[])=>{if(!b.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 $(P),I===!0&&await(T==null?void 0:T(I)),I}catch(V){if(V instanceof Error)throw V;const B=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,B)),L&&Promise.reject(B)}},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(zd,In({...go(i),emit:s,resetFields:m,clearValidate:y,validateField:S,getField:d,addField:h,removeField:f,setInitialValues:p,...vce()})),e({validate:C,validateField:S,resetFields:m,clearValidate:y,scrollToField:M,getField:d,fields:r,setInitialValues:p}),(P,T)=>(v(),A("form",{ref_key:"formRef",ref:o,class:q(u.value)},[le(P.$slots,"default")],2))}}),yce=_ce;const V$="ElLabelWrap";var bce=fe({name:V$,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(t,{slots:e}){const n=qe(zd,void 0),i=qe(wd);i||vo(V$,"usage: <el-form-item><label-wrap /></el-form-item>");const s=Be("form"),o=J(),r=J(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 Ft(()=>{c()}),wn(()=>{l("remove")}),xl(()=>c()),Te(r,(u,d)=>{t.updateAll&&(n==null||n.registerLabelWidth(u,d))}),Ts(Y(()=>{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 y=Math.max(0,Number.parseInt(f,10)-r.value),b=(i.labelPosition||n.labelPosition)==="left"?"marginRight":"marginLeft";y&&(m[b]=`${y}px`)}return _("div",{ref:o,class:[s.be("item","label-wrap")],style:m},[(d=e.default)==null?void 0:d.call(e)])}else return _(ee,{ref:o},[(h=e.default)==null?void 0:h.call(e)])}}});function Vu(){return Vu=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},Vu.apply(this,arguments)}function wce(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Zg(t,e)}function iC(t){return iC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},iC(t)}function Zg(t,e){return Zg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,s){return i.__proto__=s,i},Zg(t,e)}function kce(){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 L0(t,e,n){return kce()?L0=Reflect.construct.bind():L0=function(s,o,r){var a=[null];a.push.apply(a,o);var l=Function.bind.apply(s,a),c=new l;return r&&Zg(c,r.prototype),c},L0.apply(null,arguments)}function Cce(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function oC(t){var e=typeof Map=="function"?new Map:void 0;return oC=function(i){if(i===null||!Cce(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 L0(i,arguments,iC(this).constructor)}return s.prototype=Object.create(i.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),Zg(s,i)},oC(t)}var xce=/%[sdj%]/g,Sce=function(){};typeof process<"u"&&process.env;function rC(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 Io(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(xce,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 $ce(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||$ce(e)&&typeof t=="string"&&!t)}function Ace(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 F$(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 Ece(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,t[n]||[])}),e}var N$=function(t){wce(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}(oC(Error));function Mce(t,e,n,i,s){if(e.first){var o=new Promise(function(h,f){var p=function(b){return i(b),b.length?f(new N$(b,rC(b))):h(s)},m=Ece(t);F$(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(y){if(u.push.apply(u,y),c++,c===l)return i(u),u.length?f(new N$(u,rC(u))):h(s)};a.length||(i(u),h(s)),a.forEach(function(m){var y=t[m];r.indexOf(m)!==-1?F$(y,n,p):Ace(y,n,p)})});return d.catch(function(h){return h}),d}function Tce(t){return!!(t&&t.message!==void 0)}function Pce(t,e){for(var n=t,i=0;i<e.length;i++){if(n==null)return n;n=n[e[i]]}return n}function B$(t,e){return function(n){var i;return t.fullFields?i=Pce(e,t.fullFields):i=e[n.field||t.fullField],Tce(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 z$(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]=Vu({},t[n],i):t[n]=i}}return t}var AR=function(e,n,i,s,o,r){e.required&&(!i.hasOwnProperty(e.field)||Bs(n,r||e.type))&&s.push(Io(o.messages.required,e.fullField))},Ice=function(e,n,i,s,o){(/^\s+$/.test(n)||n==="")&&s.push(Io(o.messages.whitespace,e.fullField))},Gv,Lce=function(){if(Gv)return Gv;var t="[a-fA-F\\d:]",e=function($){return $&&$.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=(`
49 (?:
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
58 )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
59 `).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),o=new RegExp("(?:^"+n+"$)|(?:^"+s+"$)"),r=new RegExp("^"+n+"$"),a=new RegExp("^"+s+"$"),l=function($){return $&&$.exact?o:new RegExp("(?:"+e($)+n+e($)+")|(?:"+e($)+s+e($)+")","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,}))",y="(?::\\d{2,5})?",b='(?:[/?#][^\\s"]*)?',k="(?:"+c+"|www\\.)"+u+"(?:localhost|"+d+"|"+h+"|"+f+p+m+")"+y+b;return Gv=new RegExp("(?:^"+k+"$)","i"),Gv},H$={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},nm={integer:function(e){return nm.number(e)&&parseInt(e,10)===e},float:function(e){return nm.number(e)&&!nm.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"&&!nm.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(H$.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(Lce())},hex:function(e){return typeof e=="string"&&!!e.match(H$.hex)}},Oce=function(e,n,i,s,o){if(e.required&&n===void 0){AR(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?nm[a](n)||s.push(Io(o.messages.types[a],e.fullField,e.type)):a&&typeof n!==e.type&&s.push(Io(o.messages.types[a],e.fullField,e.type))},Dce=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(Io(o.messages[d].len,e.fullField,e.len)):a&&!l&&u<e.min?s.push(Io(o.messages[d].min,e.fullField,e.min)):l&&!a&&u>e.max?s.push(Io(o.messages[d].max,e.fullField,e.max)):a&&l&&(u<e.min||u>e.max)&&s.push(Io(o.messages[d].range,e.fullField,e.min,e.max))},ah="enum",Rce=function(e,n,i,s,o){e[ah]=Array.isArray(e[ah])?e[ah]:[],e[ah].indexOf(n)===-1&&s.push(Io(o.messages[ah],e.fullField,e[ah].join(", ")))},Vce=function(e,n,i,s,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||s.push(Io(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(Io(o.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},mn={required:AR,whitespace:Ice,type:Oce,range:Dce,enum:Rce,pattern:Vce},Fce=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)},Nce=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)},Bce=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)},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),n!==void 0&&mn.type(e,n,s,r,o)}i(r)},Hce=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)},Uce=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)},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)},Wce=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)},Yce=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)},qce="enum",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[qce](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(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)},Kce=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)},Zce=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)},Ew=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)},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)}i(r)},ng={string:Fce,method:Nce,number:Bce,boolean:zce,regexp:Hce,integer:Uce,float:jce,array:Wce,object:Yce,enum:Gce,pattern:Xce,date:Kce,url:Ew,hex:Ew,email:Ew,required:Zce,any:Jce};function aC(){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 lC=aC(),B1=function(){function t(n){this.rules=null,this._messages=lC,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=z$(aC(),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 y=[],b={};function k($){if(Array.isArray($)){var S;y=(S=y).concat.apply(S,$)}else y.push($)}for(var C=0;C<m.length;C++)k(m[C]);y.length?(b=rC(y),c(y,b)):c(null,a)}if(l.messages){var d=this.messages();d===lC&&(d=aC()),z$(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 y=r.rules[m],b=a[m];y.forEach(function(k){var C=k;typeof C.transform=="function"&&(a===i&&(a=Vu({},a)),b=a[m]=C.transform(b)),typeof C=="function"?C={validator:C}:C=Vu({},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:b,source:a,field:m}))})});var p={};return Mce(h,l,function(m,y){var b=m.rule,k=(b.type==="object"||b.type==="array")&&(typeof b.fields=="object"||typeof b.defaultField=="object");k=k&&(b.required||!b.required&&m.value),b.field=m.field;function C(M,P){return Vu({},P,{fullField:b.fullField+"."+M,fullFields:b.fullFields?[].concat(b.fullFields,[M]):[M]})}function $(M){M===void 0&&(M=[]);var P=Array.isArray(M)?M:[M];!l.suppressWarning&&P.length&&t.warning("async-validator:",P),P.length&&b.message!==void 0&&(P=[].concat(b.message));var T=P.map(B$(b,a));if(l.first&&T.length)return p[b.field]=1,y(T);if(!k)y(T);else{if(b.required&&!m.value)return b.message!==void 0?T=[].concat(b.message).map(B$(b,a)):l.error&&(T=[l.error(b,Io(l.messages.required,b.field))]),y(T);var I={};b.defaultField&&Object.keys(m.value).map(function(V){I[V]=b.defaultField}),I=Vu({},I,m.rule.fields);var L={};Object.keys(I).forEach(function(V){var B=I[V],F=Array.isArray(B)?B:[B];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 B=[];T&&T.length&&B.push.apply(B,T),V&&V.length&&B.push.apply(B,V),y(B.length?B:null)})}}var S;if(b.asyncValidator)S=b.asyncValidator(b,m.value,$,m.source,l);else if(b.validator){try{S=b.validator(b,m.value,$,m.source,l)}catch(M){console.error==null||console.error(M),l.suppressValidatorError||setTimeout(function(){throw M},0),$(M.message)}S===!0?$():S===!1?$(typeof b.message=="function"?b.message(b.fullField||b.field):b.message||(b.fullField||b.field)+" fails"):S instanceof Array?$(S):S instanceof Error&&$(S.message)}S&&S.then&&S.then(function(){return $()},function(M){return $(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&&!ng.hasOwnProperty(i.type))throw new Error(Io("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"?ng.required:ng[this.getType(i)]||void 0},t}();B1.register=function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");ng[e]=n};B1.warning=Sce;B1.messages=lC;B1.validators=ng;const Qce=["role","aria-labelledby"];var eue=fe({name:"ElFormItem",__name:"form-item",props:mce,setup(t,{expose:e}){const n=t,i=mi(),s=qe(zd,void 0),o=qe(wd,void 0),r=Ii(void 0,{formItem:!1}),a=Be("form-item"),l=kr().value,c=J([]),u=J(""),d=bie(u,100),h=J(""),f=J();let p,m=!1;const y=Y(()=>n.labelPosition||(s==null?void 0:s.labelPosition)),b=Y(()=>y.value==="top"?{}:{width:fi(n.labelWidth??(s==null?void 0:s.labelWidth))}),k=Y(()=>{if(y.value==="top"||s!=null&&s.inline)return{};if(!n.label&&!n.labelWidth&&L)return{};const ie=fi(n.labelWidth??(s==null?void 0:s.labelWidth));return!n.label&&!i.label?{marginLeft:ie}:{}}),C=Y(()=>[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",z.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-${y.value}`)]:y.value}]),$=Y(()=>Jn(n.inlineMessage)?n.inlineMessage:(s==null?void 0:s.inlineMessage)||!1),S=Y(()=>[a.e("error"),{[a.em("error","inline")]:$.value}]),M=Y(()=>n.prop?Me(n.prop)?n.prop.join("."):n.prop:""),P=Y(()=>!!(n.label||i.label)),T=Y(()=>n.for??(c.value.length===1?c.value[0]:void 0)),I=Y(()=>!T.value&&P.value),L=!!o,R=Y(()=>{const ie=s==null?void 0:s.model;if(!(!ie||!n.prop))return Ac(ie,n.prop).value}),V=Y(()=>{const{required:ie}=n,re=[];n.rules&&re.push(...Us(n.rules));const ke=s==null?void 0:s.rules;if(ke&&n.prop){const je=Ac(ke,n.prop).value;je&&re.push(...Us(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}),B=Y(()=>V.value.length>0),F=ie=>V.value.filter(re=>!re.trigger||!ie?!0:Me(re.trigger)?re.trigger.includes(ie):re.trigger===ie).map(({trigger:re,...ke})=>ke),z=Y(()=>V.value.some(ie=>ie.required)),U=Y(()=>d.value==="error"&&n.showMessage&&((s==null?void 0:s.showMessage)??!0)),G=Y(()=>`${n.label||""}${(s==null?void 0:s.labelSuffix)||""}`),K=ie=>{u.value=ie},X=ie=>{var je;const{errors:re,fields:ke}=ie;(!re||!ke)&&console.error(ie),K("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)},W=()=>{K("success"),s==null||s.emit("validate",n.prop,!0,"")},Q=async ie=>{const re=M.value;return new B1({[re]:ie}).validate({[re]:R.value},{firstFields:!0}).then(()=>(W(),!0)).catch(ke=>(X(ke),Promise.reject(ke)))},ne=async(ie,re)=>{if(m||!n.prop)return!1;const ke=et(re);if(!B.value)return re==null||re(!1),!1;const je=F(ie);return je.length===0?(re==null||re(!0),!0):(K("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)}))},Z=()=>{K(""),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=Qu(p),await ot(),Z(),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=Qu(ie)};Te(()=>n.error,ie=>{h.value=ie||"",K(ie?"error":"")},{immediate:!0}),Te(()=>n.validateStatus,ie=>K(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:Z,validate:ne,propString:M,setInitialValue:oe});return Pt(wd,pe),Ft(()=>{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:Z,resetField:ae,setInitialValue:oe}),(ie,re)=>{var ke;return v(),A("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(bce),{"is-auto-width":b.value.width==="auto","update-all":((ke=E(s))==null?void 0:ke.labelWidth)==="auto"},{default:w(()=>[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(b.value)},{default:w(()=>[le(ie.$slots,"label",{label:G.value},()=>[N(x(G.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"),_(Eb,{name:`${E(a).namespace.value}-zoom-in-top`},{default:w(()=>[U.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,Qce)}}}),ER=eue;const tn=qt(yce,{FormItem:ER}),en=Os(ER),Mw="focus-trap.focus-after-trapped",Tw="focus-trap.focus-after-released",tue="focus-trap.focusout-prevented",U$={cancelable:!0,bubbles:!1},nue={cancelable:!0,bubbles:!1},j$="focusAfterTrapped",W$="focusAfterReleased",MR=Symbol("elFocusTrap"),t8=J(),e2=J(0),n8=J(0);let Xv=0;const TR=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},Y$=(t,e)=>{for(const n of t)if(!sue(n,e))return n},sue=(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},iue=t=>{const e=TR(t);return[Y$(e,t),Y$(e.reverse(),t)]},oue=t=>t instanceof HTMLInputElement&&"select"in t,Yl=(t,e)=>{if(t){const n=document.activeElement;E4(t,{preventScroll:!0}),n8.value=window.performance.now(),t!==n&&oue(t)&&e&&t.select()}};function q$(t,e){const n=[...t],i=t.indexOf(e);return i!==-1&&n.splice(i,1),n}const rue=()=>{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)}}},aue=(t,e=!1)=>{const n=document.activeElement;for(const i of t)if(Yl(i,e),document.activeElement!==n)return},G$=rue(),lue=()=>e2.value>n8.value,Kv=()=>{t8.value="pointer",e2.value=window.performance.now()},X$=()=>{t8.value="keyboard",e2.value=window.performance.now()},cue=()=>(Ft(()=>{Xv===0&&(document.addEventListener("mousedown",Kv),document.addEventListener("touchstart",Kv),document.addEventListener("keydown",X$)),Xv++}),wn(()=>{Xv--,Xv<=0&&(document.removeEventListener("mousedown",Kv),document.removeEventListener("touchstart",Kv),document.removeEventListener("keydown",X$))}),{focusReason:t8,lastUserFocusTimestamp:e2,lastAutomatedFocusTimestamp:n8}),Zv=t=>new CustomEvent(tue,{...nue,detail:t});var uue=fe({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[j$,W$,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const n=J();let i,s;const{focusReason:o}=cue();ere(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:y,metaKey:b,currentTarget:k,shiftKey:C}=p,{loop:$}=t,S=ls(p)===Ue.tab&&!m&&!y&&!b,M=document.activeElement;if(S&&M){const P=k,[T,I]=iue(P);if(T&&I){if(!C&&M===I){const L=Zv({focusReason:o.value});e("focusout-prevented",L),L.defaultPrevented||(p.preventDefault(),$&&Yl(T,!0))}else if(C&&[T,P].includes(M)){const L=Zv({focusReason:o.value});e("focusout-prevented",L),L.defaultPrevented||(p.preventDefault(),$&&Yl(I,!0))}}else if(M===P){const L=Zv({focusReason:o.value});e("focusout-prevented",L),L.defaultPrevented||p.preventDefault()}}};Pt(MR,{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(j$,p)},c=p=>e(W$,p),u=p=>{const m=E(n);if(!m)return;const y=p.target,b=p.relatedTarget,k=y&&m.contains(y);t.trapped||b&&m.contains(b)||(i=b),k&&e("focusin",p),!r.paused&&t.trapped&&(k?s=y:Yl(s,!0))},d=p=>{const m=E(n);if(!(r.paused||!m))if(t.trapped){const y=p.relatedTarget;!ui(y)&&!m.contains(y)&&setTimeout(()=>{if(!r.paused&&t.trapped){const b=Zv({focusReason:o.value});e("focusout-prevented",b),b.defaultPrevented||Yl(s,!0)}},0)}else{const y=p.target;y&&m.contains(y)||e("focusout",p)}};async function h(){await ot();const p=E(n);if(p){G$.push(r);const m=p.contains(document.activeElement)?i:document.activeElement;if(i=m,!p.contains(m)){const y=new Event(Mw,U$);p.addEventListener(Mw,l),p.dispatchEvent(y),y.defaultPrevented||ot(()=>{let b=t.focusStartEl;Ke(b)||(Yl(b),document.activeElement!==b&&(b="first")),b==="first"&&aue(TR(p),!0),(document.activeElement===m||b==="container")&&Yl(p)})}}}function f(){const p=E(n);if(p){p.removeEventListener(Mw,l);const m=new CustomEvent(Tw,{...U$,detail:{focusReason:o.value}});p.addEventListener(Tw,c),p.dispatchEvent(m),!m.defaultPrevented&&(o.value=="keyboard"||!lue()||p.contains(document.activeElement))&&Yl(i??document.body),p.removeEventListener(Tw,c),G$.remove(r),i=null,s=null}}return Ft(()=>{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}}}),gi=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n};function due(t,e,n,i,s,o){return le(t.$slots,"default",{handleKeydown:t.onKeydown})}var hue=gi(uue,[["render",due]]),z1=hue;const fue=(t,e=[])=>{const{placement:n,strategy:i,popperOptions:s}=t,o={placement:n,strategy:i,...s,modifiers:[...mue(t),...e]};return gue(o,s==null?void 0:s.modifiers),o},pue=t=>{if(Kt)return js(t)};function mue(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 gue(t,e){e&&(t.modifiers=[...t.modifiers,...e??[]])}const vue=0,_ue=t=>{const{popperInstanceRef:e,contentRef:n,triggerRef:i,role:s}=qe(e8,void 0),o=J(),r=Y(()=>t.arrowOffset),a=Y(()=>({name:"eventListeners",enabled:!!t.visible})),l=Y(()=>{const k=E(o),C=E(r)??vue;return{name:"arrow",enabled:!Wse(k),options:{element:k,padding:C}}}),c=Y(()=>({onFirstUpdate:()=>{p()},...fue(t,[E(l),E(a)])})),u=Y(()=>pue(t.referenceEl)||E(i)),{attributes:d,state:h,styles:f,update:p,forceUpdate:m,instanceRef:y}=Koe(u,n,c);Te(y,k=>e.value=k,{flush:"sync"}),Ft(()=>{Te(()=>{var k,C;return(C=(k=E(u))==null?void 0:k.getBoundingClientRect)==null?void 0:C.call(k)},()=>{p()})});let b;return Te(()=>t.visible,k=>{b==null||b(),b=void 0,k&&(b=Ts(n,p).stop)}),wn(()=>{e.value=void 0,b==null||b(),b=void 0}),{attributes:d,arrowRef:o,contentRef:n,instanceRef:y,state:h,styles:f,role:s,forceUpdate:m,update:p}},yue=(t,{attributes:e,styles:n,role:i})=>{const{nextZIndex:s}=Yb(),o=Be("popper"),r=Y(()=>E(e).popper),a=J(wt(t.zIndex)?t.zIndex:s()),l=Y(()=>[o.b(),o.is("pure",t.pure),o.is(t.effect),t.popperClass]),c=Y(()=>[{zIndex:E(a)},E(n).popper,t.popperStyle||{}]),u=Y(()=>i.value==="dialog"?"false":void 0),d=Y(()=>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()}}},bue=(t,e)=>{const n=J(!1),i=J(),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 wue=fe({name:"ElPopperContent",__name:"content",props:$R,emits:uce,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}=bue(s,i),{attributes:h,arrowRef:f,contentRef:p,styles:m,instanceRef:y,role:b,update:k}=_ue(s),{ariaModal:C,arrowStyle:$,contentAttrs:S,contentClass:M,contentStyle:P,updateZIndex:T}=yue(s,{styles:m,attributes:h,role:b}),I=qe(wd,void 0);Pt(wR,{arrowStyle:$,arrowRef:f}),I&&Pt(wd,{...I,addInputId:Dt,removeInputId:Dt});let L;const R=(B=!0)=>{k(),B&&T()},V=()=>{R(!1),s.visible&&s.focusOnShow?r.value=!0:s.visible===!1&&(r.value=!1)};return Ft(()=>{Te(()=>s.triggerTargetEl,(B,F)=>{L==null||L(),L=void 0;const z=E(B||p.value),U=E(F||p.value);Po(z)&&(L=Te([b,()=>s.ariaLabel,C,()=>s.id],G=>{["role","aria-label","aria-modal","id"].forEach((K,X)=>{ui(G[X])?z.removeAttribute(K):z.setAttribute(K,G[X])})},{immediate:!0})),U!==z&&Po(U)&&["role","aria-label","aria-modal","id"].forEach(G=>{U.removeAttribute(G)})},{immediate:!0}),Te(()=>s.visible,V,{immediate:!0})}),wn(()=>{L==null||L(),L=void 0,p.value=void 0}),e({popperContentRef:p,popperInstanceRef:y,updatePopper:R,contentStyle:P}),(B,F)=>(v(),A("div",Wt({ref_key:"contentRef",ref:p},E(S),{style:E(P),class:E(M),tabindex:"-1",onMouseenter:F[0]||(F[0]=z=>B.$emit("mouseenter",z)),onMouseleave:F[1]||(F[1]=z=>B.$emit("mouseleave",z))}),[_(E(z1),{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:w(()=>[le(B.$slots,"default")]),_:3},8,["loop","trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}}),kue=wue,Cue=fe({name:"ElPopper",inheritAttrs:!1,__name:"popper",props:bR,setup(t,{expose:e}){const n=t,i={triggerRef:J(),popperInstanceRef:J(),contentRef:J(),referenceRef:J(),role:Y(()=>n.role)};return e(i),Pt(e8,i),(s,o)=>le(s.$slots,"default")}}),xue=Cue;const Sue=qt(xue),zn=Ge({...sre,...$R,appendTo:{type:A4.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,...xr(["ariaLabel"])}),Ec=Ge({...kR,disabled:Boolean,trigger:{type:de([String,Array]),default:"hover"},triggerKeys:{type:de(Array),default:()=>[Ue.enter,Ue.numpadEnter,Ue.space]},focusOnTarget:Boolean}),{useModelToggleProps:$ue,useModelToggleEmits:Aue,useModelToggle:Eue}=MD("visible"),Mue=Ge({...bR,...$ue,...zn,...Ec,...SR,showArrow:{type:Boolean,default:!0}}),Tue=[...Aue,"before-show","before-hide","show","hide","open","close"],s8=Symbol("elTooltip"),cC=(t,e)=>Me(t)?t.includes(e):t===e,lh=(t,e,n)=>i=>{cC(E(t),e)&&n(i)};var Pue=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(s8,void 0),u=J(null),d=()=>{if(E(s)||n.disabled)return!0},h=Sn(n,"trigger"),f=Ms(d,lh(h,"hover",$=>{a($),n.focusOnTarget&&$.target&&ot(()=>{E4($.target,{preventScroll:!0})})})),p=Ms(d,lh(h,"hover",l)),m=Ms(d,lh(h,"click",$=>{$.button===0&&c($)})),y=Ms(d,lh(h,"focus",a)),b=Ms(d,lh(h,"focus",l)),k=Ms(d,lh(h,"contextmenu",$=>{$.preventDefault(),c($)})),C=Ms(d,$=>{const S=ls($);n.triggerKeys.includes(S)&&($.preventDefault(),c($))});return e({triggerRef:u}),($,S)=>(v(),D(E(ace),{id:E(o),"virtual-ref":t.virtualRef,open:E(r),"virtual-triggering":t.virtualTriggering,class:q(E(i).e("trigger")),onBlur:E(b),onClick:E(m),onContextmenu:E(k),onFocus:E(y),onMouseenter:E(f),onMouseleave:E(p),onKeydown:E(C)},{default:w(()=>[le($.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}}),Iue=Pue,Lue=fe({name:"ElTooltipContent",inheritAttrs:!1,__name:"content",props:zn,setup(t,{expose:e}){const n=t,{selector:i}=HD(),s=Be("tooltip"),o=J(),r=fD(()=>{var K;return(K=o.value)==null?void 0:K.popperContentRef});let a;const{controlled:l,id:c,open:u,trigger:d,onClose:h,onOpen:f,onShow:p,onHide:m,onBeforeShow:y,onBeforeHide:b}=qe(s8,void 0),k=Y(()=>n.transition||`${s.namespace.value}-fade-in-linear`),C=Y(()=>n.persistent);wn(()=>{a==null||a()});const $=Y(()=>E(C)?!0:E(u)),S=Y(()=>n.disabled?!1:E(u)),M=Y(()=>n.appendTo||i.value),P=Y(()=>n.style??{}),T=J(!0),I=()=>{m(),G()&&E4(document.body,{preventScroll:!0}),T.value=!0},L=()=>{if(E(l))return!0},R=Ms(L,()=>{n.enterable&&cC(E(d),"hover")&&f()}),V=Ms(L,()=>{cC(E(d),"hover")&&h()}),B=()=>{var K,X;(X=(K=o.value)==null?void 0:K.updatePopper)==null||X.call(K),y==null||y()},F=()=>{b==null||b()},z=()=>{p()},U=()=>{n.virtualTriggering||h()},G=K=>{var Q;const X=(Q=o.value)==null?void 0:Q.popperContentRef,W=(K==null?void 0:K.relatedTarget)||document.activeElement;return X==null?void 0:X.contains(W)};return Te(()=>E(u),K=>{K?(T.value=!1,a=yD(r,()=>{E(l)||ao(E(d)).every(X=>X!=="hover"&&X!=="focus")&&h()},{detectIframe:!0})):a==null||a()},{flush:"post"}),e({contentRef:o,isFocusInsideContent:G}),(K,X)=>(v(),D(E(Kb),{disabled:!t.teleported,to:M.value},{default:w(()=>[$.value||!T.value?(v(),D(Ho,{key:0,name:k.value,appear:!C.value,onAfterLeave:I,onBeforeEnter:B,onAfterEnter:z,onBeforeLeave:F,persisted:""},{default:w(()=>[Re(_(E(kue),Wt({id:E(c),ref_key:"contentRef",ref:o},K.$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:U,onClose:E(h)}),{default:w(()=>[le(K.$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"]))}}),Oue=Lue;const Due=["innerHTML"],Rue={key:1};var Vue=fe({name:"ElTooltip",__name:"tooltip",props:Mue,emits:Tue,setup(t,{expose:e,emit:n}){const i=t,s=n;nre();const o=Be("tooltip"),r=kr(),a=J(),l=J(),c=()=>{var S;const $=E(a);$&&((S=$.popperInstanceRef)==null||S.update())},u=J(!1),d=J(),{show:h,hide:f,hasUpdateHandler:p}=Eue({indicator:u,toggleReason:d}),{onOpen:m,onClose:y}=ire({showAfter:Sn(i,"showAfter"),hideAfter:Sn(i,"hideAfter"),autoClose:Sn(i,"autoClose"),open:h,close:f}),b=Y(()=>Jn(i.visible)&&!p.value),k=Y(()=>[o.b(),i.popperClass]);Pt(s8,{controlled:b,id:r,open:Rc(u),trigger:Sn(i,"trigger"),onOpen:m,onClose:y,onToggle:$=>{E(u)?y($):m($)},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,$=>{$&&u.value&&(u.value=!1),!$&&Jn(i.visible)&&(u.value=i.visible)});const C=$=>{var S;return(S=l.value)==null?void 0:S.isFocusInsideContent($)};return M6(()=>u.value&&f()),wn(()=>{d.value=void 0}),e({popperRef:a,contentRef:l,isFocusInsideContent:C,updatePopper:c,onOpen:m,onClose:y,hide:f}),($,S)=>(v(),D(E(Sue),{ref_key:"popperRef",ref:a,role:t.role},{default:w(()=>[_(Iue,{disabled:t.disabled,trigger:t.trigger,"trigger-keys":t.triggerKeys,"virtual-ref":t.virtualRef,"virtual-triggering":t.virtualTriggering,"focus-on-target":t.focusOnTarget},{default:w(()=>[$.$slots.default?le($.$slots,"default",{key:0}):O("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering","focus-on-target"]),_(Oue,{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:w(()=>[le($.$slots,"content",{},()=>[t.rawContent?(v(),A("span",{key:0,innerHTML:t.content},null,8,Due)):(v(),A("span",Rue,x(t.content),1))]),t.showArrow?(v(),D(E(oce),{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"]))}}),Fue=Vue;const Ss=qt(Fue),ri=t=>t,Nue=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:()=>ri({})},autofocus:Boolean,rows:{type:Number,default:2},...xr(["ariaLabel"]),inputmode:{type:de(String),default:void 0},name:String}),Bue={[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};Pi(Zc);let wi;const zue={height:"0",visibility:"hidden",overflow:M4()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Hue=["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"],K$=t=>{const e=Number.parseFloat(t);return Number.isNaN(e)?t:e};function Uue(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:Hue.map(o=>[o,e.getPropertyValue(o)]),paddingSize:i,borderSize:s,boxSizing:n}}function Z$(t,e=1,n){var u;if(!wi){wi=document.createElement("textarea");let d=document.body;!M4()&&t.parentNode&&(d=t.parentNode),d.appendChild(wi)}const{paddingSize:i,borderSize:s,boxSizing:o,contextStyle:r}=Uue(t);r.forEach(([d,h])=>wi==null?void 0:wi.style.setProperty(d,h)),Object.entries(zue).forEach(([d,h])=>wi==null?void 0:wi.style.setProperty(d,h,"important")),wi.value=t.value||t.placeholder||"";let a=wi.scrollHeight;const l={};o==="border-box"?a=a+s:o==="content-box"&&(a=a-i),wi.value="";const c=wi.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=wi.parentNode)==null||u.removeChild(wi),wi=void 0,l}const jue=["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode"],Wue=["id","name","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","inputmode"],J$="ElInput";var Yue=fe({name:J$,inheritAttrs:!1,__name:"input",props:Nue,emits:Bue,setup(t,{expose:e,emit:n}){const i=t,s=n,o=Dd(),r=Ub(),a=mi(),l=Y(()=>[i.type==="textarea"?y.b():m.b(),m.m(f.value),m.is("disabled",p.value),m.is("exceed",Z.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")]:X.value&&W.value,[m.b("hidden")]:i.type==="hidden"},o.class]),c=Y(()=>[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"),y=Be("textarea"),b=Fn(),k=Fn(),C=J(!1),$=J(!1),S=J(),M=Fn(i.inputStyle),P=Y(()=>b.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=Y(()=>(u==null?void 0:u.statusIcon)??!1),B=Y(()=>(d==null?void 0:d.validateState)||""),F=Y(()=>B.value&&Q4[B.value]),z=Y(()=>$.value?gR:fR),U=Y(()=>[o.style]),G=Y(()=>[i.inputStyle,M.value,{resize:i.resize}]),K=Y(()=>ui(i.modelValue)?"":String(i.modelValue)),X=Y(()=>i.clearable&&!p.value&&!i.readonly&&!!K.value&&(I.value||C.value)),W=Y(()=>i.showPassword&&!p.value&&!!K.value),Q=Y(()=>i.showWordLimit&&!!i.maxlength&&(i.type==="text"||i.type==="textarea")&&!p.value&&!i.readonly&&!i.showPassword),ne=Y(()=>K.value.length),Z=Y(()=>!!Q.value&&ne.value>Number(i.maxlength)),ae=Y(()=>!!a.suffix||!!i.suffixIcon||X.value||i.showPassword||Q.value||!!B.value&&V.value),ge=Y(()=>!!Object.keys(i.modelModifiers).length),[Ce,oe]=Vre(b);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(!(!Kt||ve!=="textarea"||!k.value))if(Pe){const Ie=yt(Pe)?Pe.minRows:void 0,_t=yt(Pe)?Pe.maxRows:void 0,Lt=Z$(k.value,Ie,_t);M.value={overflowY:"hidden",...Lt},ot(()=>{k.value.offsetHeight,M.value=Lt})}else M.value={minHeight:Z$(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(K.value):K.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=`${K$(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(Do,Ie);return}if(Ie=je(Ie),String(Ie)===K.value){i.formatter&&ke();return}Ce(),s(Mt,Ie),s(Do,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}=W4({emit:s,afterComposition:te}),We=()=>{$.value=!$.value},Fe=()=>{var ve;return(ve=P.value)==null?void 0:ve.focus()},ze=()=>{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()},ye=ve=>{s(Mt,""),s(dn,""),s("clear",ve),s(Do,"")};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(K,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)?`${K$(_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()}),Ft(()=>{!i.formatter&&i.parser&&Tt(J$,"If you set the parser, you also need to set the formatter."),ke(),ot(pe)}),e({input:b,textarea:k,ref:P,textareaStyle:G,autosize:Sn(i,"autosize"),isComposing:me,focus:Fe,blur:ze,select:it,clear:ye,resizeTextarea:pe}),(ve,Pe)=>(v(),A("div",{class:q([l.value,{[E(m).bm("group","append")]:ve.$slots.append,[E(m).bm("group","prepend")]:ve.$slots.prepend}]),style:Xe(U.value),onMouseenter:Ze,onMouseleave:Ae},[O(" input "),t.type!=="textarea"?(v(),A(ee,{key:0},[O(" prepend slot "),ve.$slots.prepend?(v(),A("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(),A("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(be),{key:0,class:q(E(m).e("icon"))},{default:w(()=>[(v(),D(Ct(t.prefixIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],2)):O("v-if",!0),g("input",Wt({id:E(h),ref_key:"input",ref:b,class:E(m).e("inner")},E(r),{name:t.name,minlength:t.minlength,maxlength:t.maxlength,type:t.showPassword?$.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,jue),O(" suffix slot "),ae.value?(v(),A("span",{key:1,class:q(E(m).e("suffix"))},[g("span",{class:q(E(m).e("suffix-inner"))},[!X.value||!W.value||!Q.value?(v(),A(ee,{key:0},[le(ve.$slots,"suffix"),t.suffixIcon?(v(),D(E(be),{key:0,class:q(E(m).e("icon"))},{default:w(()=>[(v(),D(Ct(t.suffixIcon)))]),_:1},8,["class"])):O("v-if",!0)],64)):O("v-if",!0),X.value?(v(),D(E(be),{key:1,class:q([E(m).e("icon"),E(m).e("clear")]),onMousedown:Ee(E(Dt),["prevent"]),onClick:ye},{default:w(()=>[(v(),D(Ct(t.clearIcon)))]),_:1},8,["class","onMousedown"])):O("v-if",!0),W.value?(v(),D(E(be),{key:2,class:q([E(m).e("icon"),E(m).e("password")]),onClick:We,onMousedown:Ee(E(Dt),["prevent"]),onMouseup:Ee(E(Dt),["prevent"])},{default:w(()=>[le(ve.$slots,"password-icon",{visible:$.value},()=>[(v(),D(Ct(z.value)))])]),_:3},8,["class","onMousedown","onMouseup"])):O("v-if",!0),Q.value?(v(),A("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),B.value&&F.value&&V.value?(v(),D(E(be),{key:4,class:q([E(m).e("icon"),E(m).e("validateIcon"),E(m).is("loading",B.value==="validating")])},{default:w(()=>[(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(),A("div",{key:1,class:q(E(m).be("group","append"))},[le(ve.$slots,"append")],2)):O("v-if",!0)],64)):(v(),A(ee,{key:1},[O(" textarea "),g("textarea",Wt({id:E(h),ref_key:"textarea",ref:k,class:[E(y).e("inner"),E(m).is("focus",E(I)),E(y).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:G.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,Wue),X.value?(v(),D(E(be),{key:0,class:q([E(y).e("icon"),E(y).e("clear")]),onMousedown:Ee(E(Dt),["prevent"]),onClick:ye},{default:w(()=>[(v(),D(Ct(t.clearIcon)))]),_:1},8,["class","onMousedown"])):O("v-if",!0),Q.value?(v(),A("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))}}),que=Yue;const ft=qt(que),Gue=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,...xr(["ariaLabel","ariaOrientation"])}),PR={"end-reached":t=>["left","right","top","bottom"].includes(t),scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(wt)},ch=4,Xue={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"}},Kue=({move:t,size:e,bar:n})=>({[n.size]:e,transform:`translate${n.axis}(${t}%)`}),Zue=Ge({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),i8=Symbol("scrollbarContextKey"),Jue=Ge({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),Que="Thumb";var ede=fe({__name:"thumb",props:Zue,setup(t){const e=t,n=qe(i8),i=Be("scrollbar");n||vo(Que,"can not inject scrollbar context");const s=J(),o=J(),r=J({}),a=J(!1);let l=!1,c=!1,u=0,d=0,h=Kt?document.onselectstart:null;const f=Y(()=>Xue[e.vertical?"vertical":"horizontal"]),p=Y(()=>Kue({size:e.size,move:e.move,bar:f.value})),m=Y(()=>s.value[f.value.offset]**2/n.wrapElement[f.value.scrollSize]/e.ratio/o.value[f.value.offset]),y=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]))},b=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",$),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},$=()=>{l=!1,r.value[f.value.axis]=0,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",$),P(),c&&(a.value=!1)},S=()=>{c=!1,a.value=!!e.size},M=()=>{c=!0,a.value=l};wn(()=>{P(),document.removeEventListener("mouseup",$)});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(Ho,{name:E(i).b("fade"),persisted:""},{default:w(()=>[Re(g("div",{ref_key:"instance",ref:s,class:q([E(i).e("bar"),E(i).is(f.value.key)]),onMousedown:b,onClick:I[0]||(I[0]=Ee(()=>{},["stop"]))},[g("div",{ref_key:"thumb",ref:o,class:q(E(i).e("thumb")),style:Xe(p.value),onMousedown:y},null,38)],34),[[jt,t.always||a.value]])]),_:1},8,["name"]))}}),Q$=ede,tde=fe({__name:"bar",props:Jue,setup(t,{expose:e}){const n=t,i=qe(i8),s=J(0),o=J(0),r=J(""),a=J(""),l=J(1),c=J(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,y=p**2/h.scrollWidth,b=Math.max(m,n.minSize),k=Math.max(y,n.minSize);l.value=m/(f-m)/(b/(f-b)),c.value=y/(p-y)/(k/(p-k)),a.value=b+ch<f?`${b}px`:"",r.value=k+ch<p?`${k}px`:""}}),(h,f)=>(v(),A(ee,null,[_(Q$,{move:s.value,ratio:c.value,size:r.value,always:t.always},null,8,["move","ratio","size","always"]),_(Q$,{move:o.value,ratio:l.value,size:a.value,vertical:"",always:t.always},null,8,["move","ratio","size","always"])],64))}}),nde=tde;const sde=["tabindex"],Pw="ElScrollbar";var ide=fe({name:Pw,__name:"scrollbar",props:Gue,emits:PR,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=J(),p=J(),m=J(),y=J(),b=Y(()=>{const V={},B=fi(i.height),F=fi(i.maxHeight);return B&&(V.height=B),F&&(V.maxHeight=F),[i.wrapStyle,V]}),k=Y(()=>[i.wrapClass,o.e("wrap"),{[o.em("wrap","hidden-default")]:!i.native}]),C=Y(()=>[o.e("view"),i.viewClass]),$=V=>h[V]??!1,S={top:"bottom",bottom:"top",left:"right",right:"left"},M=V=>{const B=S[d];if(!B)return;const F=V[d],z=V[B];F&&!h[d]&&(h[d]=!0),!z&&h[B]&&(h[B]=!1)},P=()=>{var V;if(p.value){(V=y.value)==null||V.handleScroll(p.value);const B=c,F=u;c=p.value.scrollTop,u=p.value.scrollLeft;const z={bottom:c+p.value.clientHeight>=p.value.scrollHeight-i.distance,top:c<=i.distance&&B!==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}),B!==c&&(d=c>B?"bottom":"top"),F!==u&&(d=u>F?"right":"left"),i.distance>0){if($(d))return;M(z)}z[d]&&s("end-reached",d)}};function T(V,B){yt(V)?p.value.scrollTo(V):wt(V)&&wt(B)&&p.value.scrollTo(V,B)}const I=V=>{if(!wt(V)){Tt(Pw,"value must be a number");return}p.value.scrollTop=V},L=V=>{if(!wt(V)){Tt(Pw,"value must be a number");return}p.value.scrollLeft=V},R=()=>{var V;(V=y.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=y.value)==null||V.handleScroll(p.value))})}),Pt(i8,In({scrollbarElement:f,wrapElement:p})),E6(()=>{p.value&&(p.value.scrollTop=c,p.value.scrollLeft=u)}),Ft(()=>{i.native||ot(()=>{R()})}),xl(()=>R()),e({wrapRef:p,update:R,scrollTo:T,setScrollTop:I,setScrollLeft:L,handleScroll:P}),(V,B)=>(v(),A("div",{ref_key:"scrollbarRef",ref:f,class:q(E(o).b())},[g("div",{ref_key:"wrapRef",ref:p,class:q(k.value),style:Xe(b.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:w(()=>[le(V.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,sde),t.native?O("v-if",!0):(v(),D(nde,{key:0,ref_key:"barRef",ref:y,always:t.always,"min-size":t.minSize},null,8,["always","min-size"]))],2))}}),ode=ide;const qs=qt(ode),rde=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"}}),ade={error:t=>t instanceof Event},IR=Symbol("avatarGroupContextKey"),lde={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])}},cde=["src","alt","srcset"];var ude=fe({name:"ElAvatar",__name:"avatar",props:rde,emits:ade,setup(t,{emit:e}){const n=t,i=e,s=qe(IR,void 0),o=Be("avatar"),r=J(!1),a=Y(()=>n.size??(s==null?void 0:s.size)),l=Y(()=>n.shape??(s==null?void 0:s.shape)??"circle"),c=Y(()=>{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=Y(()=>wt(a.value)?o.cssVarBlock({size:fi(a.value)}):void 0),d=Y(()=>({objectFit:n.fit}));Te(()=>[n.src,n.srcSet],()=>r.value=!1);function h(f){r.value=!0,i("error",f)}return(f,p)=>(v(),A("span",{class:q(c.value),style:Xe(u.value)},[(t.src||t.srcSet)&&!r.value?(v(),A("img",{key:0,src:t.src,alt:t.alt,srcset:t.srcSet,style:Xe(d.value),onError:h},null,44,cde)):t.icon?(v(),D(E(be),{key:1},{default:w(()=>[(v(),D(Ct(t.icon)))]),_:1})):le(f.$slots,"default",{key:2})],6))}}),LR=ude,OR=fe({name:"ElAvatarGroup",props:lde,setup(t,{slots:e}){const n=Be("avatar-group");return Pt(IR,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:()=>_(LR,{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 o8=qt(LR,{AvatarGroup:OR});Os(OR);const dde=Ge({separator:{type:String,default:"/"},separatorIcon:{type:ds}}),DR=Symbol("breadcrumbKey"),hde=Ge({to:{type:de([String,Object]),default:""},replace:Boolean}),fde=["aria-label"];var pde=fe({name:"ElBreadcrumb",__name:"breadcrumb",props:dde,setup(t){const{t:e}=Qt(),n=t,i=Be("breadcrumb"),s=J();return Pt(DR,n),Ft(()=>{const o=s.value.querySelectorAll(`.${i.e("item")}`);o.length&&o[o.length-1].setAttribute("aria-current","page")}),(o,r)=>(v(),A("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,fde))}}),mde=pde,gde=fe({name:"ElBreadcrumbItem",__name:"breadcrumb-item",props:hde,setup(t){const e=t,n=pt(),i=qe(DR,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(),A("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(be),{key:0,class:q(E(s).e("separator"))},{default:w(()=>[(v(),D(Ct(E(i).separatorIcon)))]),_:1},8,["class"])):(v(),A("span",{key:1,class:q(E(s).e("separator")),role:"presentation"},x((u=E(i))==null?void 0:u.separator),3))],2)}}}),RR=gde;const vde=qt(mde,{BreadcrumbItem:RR}),_de=Os(RR),yde=["default","primary","success","warning","info","danger","text",""],bde=["button","submit","reset"],uC=Ge({size:Zi,disabled:{type:Boolean,default:void 0},type:{type:String,values:yde,default:""},icon:{type:ds},nativeType:{type:String,values:bde,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"}}),wde={click:t=>t instanceof MouseEvent},VR=Symbol(),by=J();function Jc(t,e=void 0){const n=pt()?qe(VR,by):by;return t?Y(()=>{var i;return((i=n.value)==null?void 0:i[t])??e}):n}function r8(t,e){const n=Jc(),i=Be(t,Y(()=>{var a;return((a=n.value)==null?void 0:a.namespace)||Jm})),s=Qt(Y(()=>{var a;return(a=n.value)==null?void 0:a.locale})),o=Yb(Y(()=>{var a;return((a=n.value)==null?void 0:a.zIndex)||jD})),r=Y(()=>{var a;return E(e)||((a=n.value)==null?void 0:a.size)||""});return FR(Y(()=>E(n)||{})),{ns:i,locale:s,zIndex:o,size:r}}const FR=(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=Y(()=>{const a=E(t);return s!=null&&s.value?kde(s.value,a):a});return o(VR,r),o($D,Y(()=>r.value.locale)),o(AD,Y(()=>r.value.namespace)),o(WD,Y(()=>r.value.zIndex)),o(nR,{size:Y(()=>r.value.size||"")}),o(iR,Y(()=>({emptyValues:r.value.emptyValues,valueOnClear:r.value.valueOnClear}))),(n||!by.value)&&(by.value=r.value),r},kde=(t,e)=>{const n=[...new Set([...my(t),...my(e)])],i={};for(const s of n)i[s]=e[s]!==void 0?e[s]:t[s];return i},Cde=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)},...F1}),xde={placement:"top"},Sde=fe({name:"ElConfigProvider",props:Cde,setup(t,{slots:e}){const n=FR(t);return Te(()=>t.message,i=>{var s;Object.assign(xde,((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})}}),$de=qt(Sde),NR=Symbol("buttonGroupContextKey"),Ade=(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"},Y(()=>t.type==="text"));const n=qe(NR,void 0),i=Jc("button"),{form:s}=_o(),o=Ii(Y(()=>n==null?void 0:n.size)),r=bs(),a=J(),l=mi(),c=Y(()=>{var k;return t.type||(n==null?void 0:n.type)||((k=i.value)==null?void 0:k.type)||""}),u=Y(()=>{var k;return t.autoInsertSpace??((k=i.value)==null?void 0:k.autoInsertSpace)??!1}),d=Y(()=>{var k;return t.plain??((k=i.value)==null?void 0:k.plain)??!1}),h=Y(()=>{var k;return t.round??((k=i.value)==null?void 0:k.round)??!1}),f=Y(()=>{var k;return t.text??((k=i.value)==null?void 0:k.text)??!1}),p=Y(()=>{var k;return t.dashed??((k=i.value)==null?void 0:k.dashed)??!1}),m=Y(()=>t.tag==="button"?{ariaDisabled:r.value||t.loading,disabled:r.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),y=Y(()=>{var C;const k=(C=l.default)==null?void 0:C.call(l);if(u.value&&(k==null?void 0:k.length)===1){const $=k[0];if(($==null?void 0:$.type)===xa){const S=$.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:y,handleClick:k=>{if(r.value||t.loading){k.stopPropagation();return}t.nativeType==="reset"&&(s==null||s.resetFields()),e("click",k)}}};function di(t,e){Ede(t)&&(t="100%");const n=Mde(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 Jv(t){return Math.min(1,Math.max(0,t))}function Ede(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function Mde(t){return typeof t=="string"&&t.indexOf("%")!==-1}function BR(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Qv(t){return Number(t)<=1?`${Number(t)*100}%`:t}function Fu(t){return t.length===1?"0"+t:String(t)}function Tde(t,e,n){return{r:di(t,255)*255,g:di(e,255)*255,b:di(n,255)*255}}function eA(t,e,n){t=di(t,255),e=di(e,255),n=di(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 Iw(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 Pde(t,e,n){let i,s,o;if(t=di(t,360),e=di(e,100),n=di(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=Iw(a,r,t+1/3),s=Iw(a,r,t),o=Iw(a,r,t-1/3)}return{r:i*255,g:s*255,b:o*255}}function tA(t,e,n){t=di(t,255),e=di(e,255),n=di(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 Ide(t,e,n){t=di(t,360)*6,e=di(e,100),n=di(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 nA(t,e,n,i){const s=[Fu(Math.round(t).toString(16)),Fu(Math.round(e).toString(16)),Fu(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 Lde(t,e,n,i,s){const o=[Fu(Math.round(t).toString(16)),Fu(Math.round(e).toString(16)),Fu(Math.round(n).toString(16)),Fu(Dde(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 Ode(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 sA(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 Dde(t){return Math.round(parseFloat(t)*255).toString(16)}function iA(t){return So(t)/255}function So(t){return parseInt(t,16)}function Rde(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}const dC={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 Vde(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=Bde(t)),typeof t=="object"&&(Co(t.r)&&Co(t.g)&&Co(t.b)?(e=Tde(t.r,t.g,t.b),r=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Co(t.h)&&Co(t.s)&&Co(t.v)?(i=Qv(t.s),s=Qv(t.v),e=Ide(t.h,i,s),r=!0,a="hsv"):Co(t.h)&&Co(t.s)&&Co(t.l)?(i=Qv(t.s),o=Qv(t.l),e=Pde(t.h,i,o),r=!0,a="hsl"):Co(t.c)&&Co(t.m)&&Co(t.y)&&Co(t.k)&&(e=Ode(t.c,t.m,t.y,t.k),r=!0,a="cmyk"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=BR(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 Fde="[-\\+]?\\d+%?",Nde="[-\\+]?\\d*\\.\\d+%?",Cc="(?:"+Nde+")|(?:"+Fde+")",Lw="[\\s|\\(]+("+Cc+")[,|\\s]+("+Cc+")[,|\\s]+("+Cc+")\\s*\\)?",e0="[\\s|\\(]+("+Cc+")[,|\\s]+("+Cc+")[,|\\s]+("+Cc+")[,|\\s]+("+Cc+")\\s*\\)?",Qo={CSS_UNIT:new RegExp(Cc),rgb:new RegExp("rgb"+Lw),rgba:new RegExp("rgba"+e0),hsl:new RegExp("hsl"+Lw),hsla:new RegExp("hsla"+e0),hsv:new RegExp("hsv"+Lw),hsva:new RegExp("hsva"+e0),cmyk:new RegExp("cmyk"+e0),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 Bde(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;let e=!1;if(dC[t])t=dC[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:So(n[1]),g:So(n[2]),b:So(n[3]),a:iA(n[4]),format:e?"name":"hex8"}:(n=Qo.hex6.exec(t),n?{r:So(n[1]),g:So(n[2]),b:So(n[3]),format:e?"name":"hex"}:(n=Qo.hex4.exec(t),n?{r:So(n[1]+n[1]),g:So(n[2]+n[2]),b:So(n[3]+n[3]),a:iA(n[4]+n[4]),format:e?"name":"hex8"}:(n=Qo.hex3.exec(t),n?{r:So(n[1]+n[1]),g:So(n[2]+n[2]),b:So(n[3]+n[3]),format:e?"name":"hex"}:!1))))))))))}function Co(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=Rde(e)),this.originalInput=e;const i=Vde(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=BR(e),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:e}=this.toHsl();return e===0}toHsv(){const e=tA(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}}toHsvString(){const e=tA(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=eA(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}}toHslString(){const e=eA(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 nA(this.r,this.g,this.b,e)}toHexString(e=!1){return"#"+this.toHex(e)}toHex8(e=!1){return Lde(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(di(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(di(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{...sA(this.r,this.g,this.b)}}toCmykString(){const{c:e,m:n,y:i,k:s}=sA(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="#"+nA(this.r,this.g,this.b,!1);for(const[n,i]of Object.entries(dC))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=Jv(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=Jv(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=Jv(n.s),new Qn(n)}saturate(e=10){const n=this.toHsl();return n.s+=e/100,n.s=Jv(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 zde(t){const e=bs(),n=Be("button");return Y(()=>{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 Hde=fe({name:"ElButton",__name:"button",props:uC,emits:wde,setup(t,{expose:e,emit:n}){const i=t,s=n,o=zde(i),r=Be("button"),{_ref:a,_size:l,_type:c,_disabled:u,_props:d,_plain:h,_round:f,_text:p,_dashed:m,shouldAddSpace:y,handleClick:b}=Ade(i,s),k=Y(()=>[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:y}),(C,$)=>(v(),D(Ct(t.tag),Wt({ref_key:"_ref",ref:a},E(d),{class:k.value,style:E(o),onClick:E(b)}),{default:w(()=>[t.loading?(v(),A(ee,{key:0},[C.$slots.loading?le(C.$slots,"loading",{key:0}):(v(),D(E(be),{key:1,class:q(E(r).is("loading"))},{default:w(()=>[(v(),D(Ct(t.loadingIcon)))]),_:1},8,["class"]))],64)):t.icon||C.$slots.icon?(v(),D(E(be),{key:1},{default:w(()=>[t.icon?(v(),D(Ct(t.icon),{key:0})):le(C.$slots,"icon",{key:1})]),_:3})):O("v-if",!0),C.$slots.default?(v(),A("span",{key:2,class:q({[E(r).em("text","expand")]:E(y)})},[le(C.$slots,"default")],2)):O("v-if",!0)]),_:3},16,["class","style","onClick"]))}}),Ude=Hde;const jde={size:uC.size,type:uC.type,direction:{type:de(String),values:["horizontal","vertical"],default:"horizontal"}};var Wde=fe({name:"ElButtonGroup",__name:"button-group",props:jde,setup(t){const e=t;Pt(NR,In({size:Sn(e,"size"),type:Sn(e,"type")}));const n=Be("button");return(i,s)=>(v(),A("div",{class:q([E(n).b("group"),E(n).bm("group",e.direction)])},[le(i.$slots,"default")],2))}}),zR=Wde;const He=qt(Ude,{ButtonGroup:zR});Os(zR);const oA=["hours","minutes","seconds"],Ia="EP_PICKER_BASE",HR="ElPopperOptions",UR=Symbol("commonPickerContextKey"),Jg="HH:mm:ss",mc="YYYY-MM-DD",Yde={date:mc,dates:mc,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${mc} ${Jg}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:mc,datetimerange:`${mc} ${Jg}`};var xs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var jR={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",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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 z=["th","st","nd","rd"],U=F%100;return"["+F+(z[(U-20)%10]||z[U]||z[0])+"]"}},C=function(F,z,U){var G=String(F);return!G||G.length>=z?F:""+Array(z+1-G.length).join(U)+F},$={s:C,z:function(F){var z=-F.utcOffset(),U=Math.abs(z),G=Math.floor(U/60),K=U%60;return(z<=0?"+":"-")+C(G,2,"0")+":"+C(K,2,"0")},m:function F(z,U){if(z.date()<U.date())return-F(U,z);var G=12*(U.year()-z.year())+(U.month()-z.month()),K=z.clone().add(G,d),X=U-K<0,W=z.clone().add(G+(X?-1:1),d);return+(-(G+(U-K)/(X?K-W:W-K))||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(z,U,G){var K;if(!z)return S;if(typeof z=="string"){var X=z.toLowerCase();M[X]&&(K=X),U&&(M[X]=U,K=X);var W=z.split("-");if(!K&&W.length>1)return F(W[0])}else{var Q=z.name;M[Q]=z,K=Q}return!G&&K&&(S=K),K||!G&&S},L=function(F,z){if(T(F))return F.clone();var U=typeof z=="object"?z:{};return U.date=F,U.args=arguments,new V(U)},R=$;R.l=I,R.i=T,R.w=function(F,z){return L(F,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var V=function(){function F(U){this.$L=I(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[P]=!0}var z=F.prototype;return z.parse=function(U){this.$d=function(G){var K=G.date,X=G.utc;if(K===null)return new Date(NaN);if(R.u(K))return new Date;if(K instanceof Date)return new Date(K);if(typeof K=="string"&&!/Z$/i.test(K)){var W=K.match(y);if(W){var Q=W[2]-1||0,ne=(W[7]||"0").substring(0,3);return X?new Date(Date.UTC(W[1],Q,W[3]||1,W[4]||0,W[5]||0,W[6]||0,ne)):new Date(W[1],Q,W[3]||1,W[4]||0,W[5]||0,W[6]||0,ne)}}return new Date(K)}(U),this.init()},z.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},z.$utils=function(){return R},z.isValid=function(){return this.$d.toString()!==m},z.isSame=function(U,G){var K=L(U);return this.startOf(G)<=K&&K<=this.endOf(G)},z.isAfter=function(U,G){return L(U)<this.startOf(G)},z.isBefore=function(U,G){return this.endOf(G)<L(U)},z.$g=function(U,G,K){return R.u(U)?this[G]:this.set(K,U)},z.unix=function(){return Math.floor(this.valueOf()/1e3)},z.valueOf=function(){return this.$d.getTime()},z.startOf=function(U,G){var K=this,X=!!R.u(G)||G,W=R.p(U),Q=function(ie,re){var ke=R.w(K.$u?Date.UTC(K.$y,re,ie):new Date(K.$y,re,ie),K);return X?ke:ke.endOf(c)},ne=function(ie,re){return R.w(K.toDate()[ie].apply(K.toDate("s"),(X?[0,0,0,0]:[23,59,59,999]).slice(re)),K)},Z=this.$W,ae=this.$M,ge=this.$D,Ce="set"+(this.$u?"UTC":"");switch(W){case f:return X?Q(1,0):Q(31,11);case d:return X?Q(1,ae):Q(0,ae+1);case u:var oe=this.$locale().weekStart||0,pe=(Z<oe?Z+7:Z)-oe;return Q(X?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()}},z.endOf=function(U){return this.startOf(U,!1)},z.$set=function(U,G){var K,X=R.p(U),W="set"+(this.$u?"UTC":""),Q=(K={},K[c]=W+"Date",K[p]=W+"Date",K[d]=W+"Month",K[f]=W+"FullYear",K[l]=W+"Hours",K[a]=W+"Minutes",K[r]=W+"Seconds",K[o]=W+"Milliseconds",K)[X],ne=X===c?this.$D+(G-this.$W):G;if(X===d||X===f){var Z=this.clone().set(p,1);Z.$d[Q](ne),Z.init(),this.$d=Z.set(p,Math.min(this.$D,Z.daysInMonth())).$d}else Q&&this.$d[Q](ne);return this.init(),this},z.set=function(U,G){return this.clone().$set(U,G)},z.get=function(U){return this[R.p(U)]()},z.add=function(U,G){var K,X=this;U=Number(U);var W=R.p(G),Q=function(ae){var ge=L(X);return R.w(ge.date(ge.date()+Math.round(ae*U)),X)};if(W===d)return this.set(d,this.$M+U);if(W===f)return this.set(f,this.$y+U);if(W===c)return Q(1);if(W===u)return Q(7);var ne=(K={},K[a]=i,K[l]=s,K[r]=n,K)[W]||1,Z=this.$d.getTime()+U*ne;return R.w(Z,this)},z.subtract=function(U,G){return this.add(-1*U,G)},z.format=function(U){var G=this,K=this.$locale();if(!this.isValid())return K.invalidDate||m;var X=U||"YYYY-MM-DDTHH:mm:ssZ",W=R.z(this),Q=this.$H,ne=this.$m,Z=this.$M,ae=K.weekdays,ge=K.months,Ce=K.meridiem,oe=function(re,ke,je,te){return re&&(re[ke]||re(G,X))||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 X.replace(b,function(re,ke){return ke||function(je){switch(je){case"YY":return String(G.$y).slice(-2);case"YYYY":return R.s(G.$y,4,"0");case"M":return Z+1;case"MM":return R.s(Z+1,2,"0");case"MMM":return oe(K.monthsShort,Z,ge,3);case"MMMM":return oe(ge,Z);case"D":return G.$D;case"DD":return R.s(G.$D,2,"0");case"d":return String(G.$W);case"dd":return oe(K.weekdaysMin,G.$W,ae,2);case"ddd":return oe(K.weekdaysShort,G.$W,ae,3);case"dddd":return ae[G.$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(G.$s);case"ss":return R.s(G.$s,2,"0");case"SSS":return R.s(G.$ms,3,"0");case"Z":return W}return null}(re)||W.replace(":","")})},z.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},z.diff=function(U,G,K){var X,W=this,Q=R.p(G),ne=L(U),Z=(ne.utcOffset()-this.utcOffset())*i,ae=this-ne,ge=function(){return R.m(W,ne)};switch(Q){case f:X=ge()/12;break;case d:X=ge();break;case h:X=ge()/3;break;case u:X=(ae-Z)/6048e5;break;case c:X=(ae-Z)/864e5;break;case l:X=ae/s;break;case a:X=ae/i;break;case r:X=ae/n;break;default:X=ae}return K?X:R.a(X)},z.daysInMonth=function(){return this.endOf(d).$D},z.$locale=function(){return M[this.$L]},z.locale=function(U,G){if(!U)return this.$L;var K=this.clone(),X=I(U,G,!0);return X&&(K.$L=X),K},z.clone=function(){return R.w(this.$d,this)},z.toDate=function(){return new Date(this.valueOf())},z.toJSON=function(){return this.isValid()?this.toISOString():null},z.toISOString=function(){return this.$d.toISOString()},z.toString=function(){return this.$d.toUTCString()},F}(),B=V.prototype;return L.prototype=B,[["$ms",o],["$s",r],["$m",a],["$H",l],["$W",c],["$M",d],["$y",f],["$D",p]].forEach(function(F){B[F[1]]=function(z){return this.$g(z,F[0],F[1])}}),L.extend=function(F,z){return F.$i||(F(z,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})})(jR);var qde=jR.exports;const ht=vi(qde),Ow=(t,e)=>[t>0?t-1:void 0,t,t<e?t+1:void 0],WR=t=>Array.from(Array.from({length:t}).keys()),YR=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(),rA=function(t,e){const n=H_(t),i=H_(e);return n&&i?t.getTime()===e.getTime():!n&&!i?t===e:!1},GR=function(t,e){const n=Me(t),i=Me(e);return n&&i?t.length!==e.length?!1:t.every((s,o)=>rA(s,e[o])):!n&&!i?rA(t,e):!1},aA=function(t,e,n){const i=$4(e)||e==="x"?ht(t).locale(n):ht(t,e).locale(n);return i.isValid()?i:void 0},lA=function(t,e,n){return $4(e)?t:e==="x"?+t:ht(t).locale(n).format(e)},Dw=(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},O0=t=>Me(t)?t.map(e=>e.toDate()):t.toDate(),a8=Ge({disabledHours:{type:de(Function)},disabledMinutes:{type:de(Function)},disabledSeconds:{type:de(Function)}}),Gde=Ge({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),XR=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,...a8,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"]},...F1,...xr(["ariaLabel"]),showNow:{type:Boolean,default:!0},showConfirm:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},showWeekNumber:Boolean}),Xde=Ge({id:{type:de(Array)},name:{type:de(Array)},modelValue:{type:de([Array,String])},startPlaceholder:String,endPlaceholder:String,disabled:Boolean}),KR=(t,e)=>{const{lang:n}=Qt(),i=J(!1),s=J(!1),o=J(null),r=Y(()=>{const{modelValue:p}=t;return!p||Me(p)&&!p.filter(Boolean).length}),a=p=>{if(!GR(t.modelValue,p)){let m;Me(p)?m=p.map(y=>lA(y,t.valueFormat,n.value)):p&&(m=lA(p,t.valueFormat,n.value)),e(Mt,p&&m,n.value)}},l=Y(()=>{let p;if(r.value?c.value.getDefaultValue&&(p=c.value.getDefaultValue()):Me(t.modelValue)?p=t.modelValue.map(m=>aA(m,t.valueFormat,n.value)):p=aA(t.modelValue??"",t.valueFormat,n.value),c.value.getRangeAvailableTime){const m=c.value.getRangeAvailableTime(p);Wi(m,p)||(p=m,r.value||a(O0(p)))}return Me(p)&&p.some(m=>!m)&&(p=[]),p}),c=J({});return{parsedValue:l,pickerActualVisible:s,pickerOptions:c,pickerVisible:i,userInput:o,valueIsEmpty:r,emitInput:a,onCalendarChange:p=>{e("calendar-change",p)},onPanelChange:(p,m,y)=>{e("panel-change",p,m,y)},onPick:(p="",m=!1)=>{i.value=m;let y;Me(p)?y=p.map(b=>b.toDate()):y=p&&p.toDate(),o.value=null,a(y)},onSetPickerOption:p=>{c.value[p[0]]=p[1],c.value.panelReady=!0}}},Kde=["id","name","placeholder","value","disabled"],Zde=["id","name","placeholder","value","disabled"];var Jde=fe({name:"PickerRangeTrigger",inheritAttrs:!1,__name:"picker-range-trigger",props:Xde,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:Y(()=>{var T;return(T=i.id)==null?void 0:T[0]})}),{formItemContext:o}),a=Ub(),l=Be("date"),c=Be("range"),u=J(),d=J(),{wrapperRef:h,isFocused:f}=pp(u,{disabled:Y(()=>i.disabled)}),p=T=>{s("click",T)},m=T=>{s("mouseenter",T)},y=T=>{s("mouseleave",T)},b=T=>{s("touchstart",T)},k=T=>{s("startInput",T)},C=T=>{s("endInput",T)},$=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(),A("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:y,onTouchstartPassive:b},[le(T.$slots,"prefix"),g("input",Wt(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:$}),null,16,Kde),le(T.$slots,"range-separator"),g("input",Wt(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,Zde),le(T.$slots,"suffix")],38))}}),Qde=Jde,ehe=fe({name:"Picker",__name:"picker",props:XR,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=Dd(),r=Be("date"),a=Be("input"),l=Be("range"),{formItem:c}=_o(),u=qe(HR,{}),d=Y4(i,null),h=J(),f=J(),p=J(null);let m=!1;const y=bs(),b=KR(i,s),{parsedValue:k,pickerActualVisible:C,userInput:$,pickerVisible:S,pickerOptions:M,valueIsEmpty:P,emitInput:T,onPick:I,onSetPickerOption:L,onCalendarChange:R,onPanelChange:V}=b,{isFocused:B,handleFocus:F,handleBlur:z}=pp(f,{disabled:y,beforeFocus(){return i.readonly},afterFocus(){i.automaticDropdown&&(S.value=!0)},beforeBlur(ce){var De;return!m&&((De=h.value)==null?void 0:De.isFocusInsideContent(ce))},afterBlur(){var ce,De;re.value&&!i.saveOnBlur?P.value||(De=(ce=M.value).handleCancel)==null||De.call(ce):it(),S.value=!1,m=!1,i.validateEvent&&(c==null||c.validate("blur").catch(gt=>Tt(gt)))}}),U=J(!1),G=Y(()=>[r.b("editor"),r.bm("editor",i.type),a.e("wrapper"),r.is("disabled",y.value),r.is("active",S.value),l.b("editor"),Ae?l.bm("editor",Ae.value):"",o.class]),K=Y(()=>[a.e("icon"),l.e("close-icon"),me.value?"":l.em("close-icon","hidden")]);Te(S,ce=>{ce?ot(()=>{ce&&(p.value=i.modelValue)}):($.value=null,ot(()=>{X(i.modelValue)}))});const X=(ce,De)=>{(De||!GR(ce,p.value))&&(s(dn,ce),De&&(p.value=ce),i.validateEvent&&(c==null||c.validate("change").catch(gt=>Tt(gt))))},W=ce=>{s("keydown",ce)},Q=Y(()=>f.value?Array.from(f.value.$el.querySelectorAll("input")):[]),ne=(ce,De,gt)=>{const bn=Q.value;bn.length&&(!gt||gt==="min"?(bn[0].setSelectionRange(ce,De),bn[0].focus()):gt==="max"&&(bn[1].setSelectionRange(ce,De),bn[1].focus()))},Z=()=>{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=Y(()=>{const ce=ve(k.value);return Me($.value)?[$.value[0]||ce&&ce[0]||"",$.value[1]||ce&&ce[1]||""]:$.value!==null?$.value:re.value&&P.value&&!i.saveOnBlur||!re.value&&P.value||!S.value&&P.value?"":ce?ke.value||je.value||te.value?ce.join(", "):ce:""}),ie=Y(()=>i.type.includes("time")),re=Y(()=>i.type.startsWith("time")),ke=Y(()=>i.type==="dates"),je=Y(()=>i.type==="months"),te=Y(()=>i.type==="years"),se=Y(()=>i.prefixIcon||(ie.value?lR:dae)),me=Y(()=>i.clearable&&!y.value&&!i.readonly&&!P.value&&(U.value||B.value)),$e=ce=>{i.readonly||y.value||(me.value&&(ce==null||ce.stopPropagation(),M.value.handleClear?M.value.handleClear():T(d.valueOnClear.value),X(d.valueOnClear.value,!0),ge()),s("clear"))},Se=async ce=>{var De;i.readonly||y.value||(((De=ce.target)==null?void 0:De.tagName)!=="INPUT"||B.value||!i.automaticDropdown)&&(S.value=!0)},Le=()=>{i.readonly||y.value||!P.value&&i.clearable&&(U.value=!0)},We=()=>{U.value=!1},Fe=ce=>{var De;i.readonly||y.value||(((De=ce.touches[0].target)==null?void 0:De.tagName)!=="INPUT"||B.value||!i.automaticDropdown)&&(S.value=!0)},ze=Y(()=>i.type.includes("range")),Ae=Ii(),Ze=Y(()=>{var ce,De;return(De=(ce=E(h))==null?void 0:ce.popperRef)==null?void 0:De.contentRef}),Ye=yD(f,ce=>{const De=E(Ze),gt=js(f);De&&(ce.target===De||ce.composedPath().includes(De))||ce.target===gt||gt&&ce.composedPath().includes(gt)||(S.value=!1)});wn(()=>{Ye==null||Ye()});const it=()=>{if(!(re.value&&!i.saveOnBlur)){if($.value){const ce=ye(pe.value);ce&&(Pe(ce)&&T(O0(ce)),$.value=null)}$.value===""&&(T(d.valueOnClear.value),X(d.valueOnClear.value,!0),$.value=null)}},ye=ce=>ce?M.value.parseUserInput(ce):null,ve=ce=>ce?Me(ce)?ce.map(De=>De.format(i.format)):ce.format(i.format):null,Pe=ce=>M.value.isValidValue(ce),Ie=async ce=>{if(i.readonly||y.value)return;const De=ls(ce);if(W(ce),De===Ue.esc){S.value===!0&&(S.value=!1,ce.preventDefault(),ce.stopPropagation());return}if(De===Ue.down&&(M.value.handleFocusPicker&&(ce.preventDefault(),ce.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?($.value===null||$.value===""||Pe(ye(pe.value)))&&(it(),S.value=!1):S.value=!0,ce.preventDefault(),ce.stopPropagation();return}if($.value){ce.stopPropagation();return}M.value.handleKeydownInput&&M.value.handleKeydownInput(ce)},_t=ce=>{$.value=ce,S.value||(S.value=!0)},Lt=ce=>{const De=ce.target;$.value?$.value=[De.value,$.value[1]]:$.value=[De.value,null]},Je=ce=>{const De=ce.target;$.value?$.value=[$.value[0],De.value]:$.value=[null,De.value]},dt=()=>{var bn;const ce=$.value,De=ye(ce&&ce[0]),gt=E(k);if(De&&De.isValid()){$.value=[ve(De),((bn=pe.value)==null?void 0:bn[1])||null];const gs=[De,gt&&(gt[1]||null)];Pe(gs)&&(T(O0(gs)),$.value=null)}},mt=()=>{var bn;const ce=E($),De=ye(ce&&ce[1]),gt=E(k);if(De&&De.isValid()){$.value=[((bn=E(pe))==null?void 0:bn[0])||null,ve(De)];const gs=[gt&&gt[0],De];Pe(gs)&&(T(O0(gs)),$.value=null)}},_e=()=>{var ce;(ce=f.value)==null||ce.focus()},Oe=()=>{var ce;(ce=f.value)==null||ce.blur()};return Pt(Ia,{props:i,emptyValues:d}),Pt(UR,b),e({focus:_e,blur:Oe,handleOpen:Ce,handleClose:oe,onPick:I}),(ce,De)=>(v(),D(E(Ss),Wt({ref_key:"refPopper",ref:h,visible:E(S),effect:"light",pure:"",trigger:"click"},ce.$attrs,{role:"dialog",teleported:"",transition:`${E(r).namespace.value}-zoom-in-top`,"popper-class":[`${E(r).namespace.value}-picker__popper`,ce.popperClass],"popper-style":ce.popperStyle,"popper-options":E(u),"fallback-placements":ce.fallbackPlacements,"gpu-acceleration":!1,placement:ce.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:Z,onShow:ae,onHide:ge}),{default:w(()=>[ze.value?(v(),D(Qde,{key:1,id:ce.id,ref_key:"inputRef",ref:f,"model-value":pe.value,name:ce.name,disabled:E(y),readonly:!ce.editable||ce.readonly,"start-placeholder":ce.startPlaceholder,"end-placeholder":ce.endPlaceholder,class:q(G.value),style:Xe(ce.$attrs.style),"aria-label":ce.ariaLabel,tabindex:ce.tabindex,autocomplete:"off",role:"combobox",onClick:Se,onFocus:E(F),onBlur:E(z),onStartInput:Lt,onStartChange:dt,onEndInput:Je,onEndChange:mt,onMousedown:Se,onMouseenter:Le,onMouseleave:We,onTouchstartPassive:Fe,onKeydown:Ie},{prefix:w(()=>[se.value?(v(),D(E(be),{key:0,class:q([E(a).e("icon"),E(l).e("icon")])},{default:w(()=>[(v(),D(Ct(se.value)))]),_:1},8,["class"])):O("v-if",!0)]),"range-separator":w(()=>[le(ce.$slots,"range-separator",{},()=>[g("span",{class:q(E(l).b("separator"))},x(ce.rangeSeparator),3)])]),suffix:w(()=>[ce.clearIcon?(v(),D(E(be),{key:0,class:q(K.value),onMousedown:Ee(E(Dt),["prevent"]),onClick:$e},{default:w(()=>[(v(),D(Ct(ce.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(ft),{key:0,id:ce.id,ref_key:"inputRef",ref:f,"container-role":"combobox","model-value":pe.value,name:ce.name,size:E(Ae),disabled:E(y),placeholder:ce.placeholder,class:q([E(r).b("editor"),E(r).bm("editor",ce.type),E(r).is("focus",E(S)),ce.$attrs.class]),style:Xe(ce.$attrs.style),readonly:!ce.editable||ce.readonly||ke.value||je.value||te.value||ce.type==="week","aria-label":ce.ariaLabel,tabindex:ce.tabindex,"validate-event":!1,onInput:_t,onFocus:E(F),onBlur:E(z),onKeydown:Ie,onChange:it,onMousedown:Se,onMouseenter:Le,onMouseleave:We,onTouchstartPassive:Fe,onClick:De[0]||(De[0]=Ee(()=>{},["stop"]))},{prefix:w(()=>[se.value?(v(),D(E(be),{key:0,class:q(E(a).e("icon")),onMousedown:Ee(Se,["prevent"]),onTouchstartPassive:Fe},{default:w(()=>[(v(),D(Ct(se.value)))]),_:1},8,["class"])):O("v-if",!0)]),suffix:w(()=>[me.value&&ce.clearIcon?(v(),D(E(be),{key:0,class:q(`${E(a).e("icon")} clear-icon`),onMousedown:Ee(E(Dt),["prevent"]),onClick:$e},{default:w(()=>[(v(),D(Ct(ce.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:w(()=>[le(ce.$slots,"default",{visible:E(S),actualVisible:E(C),parsedValue:E(k),format:ce.format,dateFormat:ce.dateFormat,timeFormat:ce.timeFormat,unlinkPanels:ce.unlinkPanels,type:ce.type,defaultValue:ce.defaultValue,showNow:ce.showNow,showConfirm:ce.showConfirm,showFooter:ce.showFooter,showWeekNumber:ce.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]=Ee(()=>{},["stop"]))})]),_:3},16,["visible","transition","popper-class","popper-style","popper-options","fallback-placements","placement"]))}}),the=ehe;const ql=new Map;if(Kt){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 cA(t,e){let n=[];return Me(e.arg)?n=e.arg:Po(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 Qg={beforeMount(t,e){ql.has(t)||ql.set(t,[]),ql.get(t).push({documentHandler:cA(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:cA(t,e),bindingFn:e.value};i>=0?n.splice(i,1,s):n.push(s)},unmounted(t){ql.delete(t)}},nhe=100,she=600,t0="_RepeatClick",wy={beforeMount(t,e){const n=e.value,{interval:i=nhe,delay:s=she}=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[t0]={start:c,clear:l},t.addEventListener("mousedown",c)},unmounted(t){if(!t[t0])return;const{start:e,clear:n}=t[t0];e&&t.removeEventListener("mousedown",e),n&&(n(),document.removeEventListener("mouseup",n)),t[t0]=null}},hC="_trap-focus-children",Nu=[],uA=t=>{if(Nu.length===0)return;const e=ls(t),n=Nu[Nu.length-1][hC];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())}},ihe={beforeMount(t){t[hC]=m$(t),Nu.push(t),Nu.length<=1&&document.addEventListener("keydown",uA)},updated(t){ot(()=>{t[hC]=m$(t)})},unmounted(){Nu.shift(),Nu.length===0&&document.removeEventListener("keydown",uA)}};var dA=!1,Iu,fC,pC,D0,R0,ZR,V0,mC,gC,vC,JR,_C,yC,QR,eV;function eo(){if(!dA){dA=!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(_C=/\b(iPhone|iP[ao]d)/.exec(t),yC=/\b(iP[ao]d)/.exec(t),vC=/Android/i.exec(t),QR=/FBAN\/\w+;/i.exec(t),eV=/Mobile/i.exec(t),JR=!!/Win64/.exec(t),e){Iu=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,Iu&&document&&document.documentMode&&(Iu=document.documentMode);var i=/(?:Trident\/(\d+.\d+))/.exec(t);ZR=i?parseFloat(i[1])+4:Iu,fC=e[2]?parseFloat(e[2]):NaN,pC=e[3]?parseFloat(e[3]):NaN,D0=e[4]?parseFloat(e[4]):NaN,D0?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),R0=e&&e[1]?parseFloat(e[1]):NaN):R0=NaN}else Iu=fC=pC=R0=D0=NaN;if(n){if(n[1]){var s=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);V0=s?parseFloat(s[1].replace("_",".")):!0}else V0=!1;mC=!!n[2],gC=!!n[3]}else V0=mC=gC=!1}}var bC={ie:function(){return eo()||Iu},ieCompatibilityMode:function(){return eo()||ZR>Iu},ie64:function(){return bC.ie()&&JR},firefox:function(){return eo()||fC},opera:function(){return eo()||pC},webkit:function(){return eo()||D0},safari:function(){return bC.webkit()},chrome:function(){return eo()||R0},windows:function(){return eo()||mC},osx:function(){return eo()||V0},linux:function(){return eo()||gC},iphone:function(){return eo()||_C},mobile:function(){return eo()||_C||yC||vC||eV},nativeApp:function(){return eo()||QR},android:function(){return eo()||vC},ipad:function(){return eo()||yC}},ohe=bC,n0=!!(typeof window<"u"&&window.document&&window.document.createElement),rhe={canUseDOM:n0,canUseWorkers:typeof Worker<"u",canUseEventListeners:n0&&!!(window.addEventListener||window.attachEvent),canUseViewport:n0&&!!window.screen,isInWorker:!n0},tV=rhe,nV;tV.canUseDOM&&(nV=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function ahe(t,e){if(!tV.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&&nV&&t==="wheel"&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var lhe=ahe,hA=10,fA=40,pA=800;function sV(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*hA,s=n*hA,"deltaY"in t&&(s=t.deltaY),"deltaX"in t&&(i=t.deltaX),(i||s)&&t.deltaMode&&(t.deltaMode==1?(i*=fA,s*=fA):(i*=pA,s*=pA)),i&&!e&&(e=i<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:e,spinY:n,pixelX:i,pixelY:s}}sV.getEventType=function(){return ohe.firefox()?"DOMMouseScroll":lhe("wheel")?"wheel":"mousewheel"};var che=sV;/**
60 * Checks if an event is supported in the current execution environment.
61 *
62 * NOTE: This will not work correctly for non-generic events such as `change`,
63 * `reset`, `load`, `error`, and `select`.
64 *
65 * Borrows from Modernizr.
66 *
67 * @param {string} eventNameSuffix Event name, e.g. "click".
68 * @param {?boolean} capture Check if the capture phase is supported.
69 * @return {boolean} True if the event is supported.
70 * @internal
71 * @license Modernizr 3.0.0pre (Custom Build) | MIT
72 */const F0="_Mousewheel",mA=function(t,e){if(t&&t.addEventListener){iV(t);const n=function(i){const s=che(i);e&&Reflect.apply(e,this,[i,s])};t[F0]={wheelHandler:n},t.addEventListener("wheel",n,{passive:!0})}},iV=t=>{var e;(e=t[F0])!=null&&e.wheelHandler&&(t.removeEventListener("wheel",t[F0].wheelHandler),t[F0]=null)},uhe={beforeMount(t,e){mA(t,e.value)},unmounted(t){iV(t)},updated(t,e){e.value!==e.oldValue&&mA(t,e.value)}},dhe=Ge({...Gde,datetimeRole:String,parsedValue:{type:de(Object)}}),hhe=({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}}},Rw=t=>{const e=(i,s)=>i||s,n=i=>i!==!0;return t.map(e).filter(n)},oV=(t,e,n)=>({getHoursList:(r,a)=>Dw(24,t&&(()=>t==null?void 0:t(r,a))),getMinutesList:(r,a,l)=>Dw(60,e&&(()=>e==null?void 0:e(r,a,l))),getSecondsList:(r,a,l,c)=>Dw(60,n&&(()=>n==null?void 0:n(r,a,l,c)))}),fhe=(t,e,n)=>{const{getHoursList:i,getMinutesList:s,getSecondsList:o}=oV(t,e,n);return{getAvailableHours:(c,u)=>Rw(i(c,u)),getAvailableMinutes:(c,u,d)=>Rw(s(c,u,d)),getAvailableSeconds:(c,u,d,h)=>Rw(o(c,u,d,h))}},phe=(t,e)=>{const n=J(t.parsedValue);return Te(()=>t.visible,i=>{const s=fk(e.modelValue),o=fk(e.valueOnClear);if(i&&s===o){n.value=o;return}i||(n.value=t.parsedValue)}),n},mhe=Ge({role:{type:String,required:!0},spinnerDate:{type:de(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:de(String),default:""},...a8}),ghe=["onClick"],vhe=["onMouseenter"];var _he=fe({__name:"basic-time-spinner",props:mhe,emits:[dn,"select-range","set-option"],setup(t,{emit:e}){const n=t,{isRange:i,format:s,saveOnBlur:o}=qe(Ia).props,r=e,a=Be("time"),{getHoursList:l,getMinutesList:c,getSecondsList:u}=oV(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let d=!1;const h={hours:!1,minutes:!1,seconds:!1},f=J(),p={hours:J(),minutes:J(),seconds:J()},m=Y(()=>n.showSeconds?oA:oA.slice(0,2)),y=Y(()=>{const{spinnerDate:Q}=n;return{hours:Q.hour(),minutes:Q.minute(),seconds:Q.second()}}),b=Y(()=>{const{hours:Q,minutes:ne}=E(y),{role:Z,spinnerDate:ae}=n,ge=i?void 0:ae;return{hours:l(Z,ge),minutes:c(Q,Z,ge),seconds:u(Q,ne,Z,ge)}}),k=Y(()=>{const{hours:Q,minutes:ne,seconds:Z}=E(y);return{hours:Ow(Q,23),minutes:Ow(ne,59),seconds:Ow(Z,59)}}),C=_d(Q=>{d=!1,M(Q)},200),$=Q=>{if(!n.amPmMode)return"";const ne=n.amPmMode==="A";let Z=Q<12?" am":" pm";return ne&&(Z=Z.toUpperCase()),Z},S=Q=>{let ne=[0,0];const Z=s||Jg,ae=Z.indexOf("HH"),ge=Z.indexOf("mm"),Ce=Z.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(y)[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 Z=E(p[Q]);Z&&Z.$el&&(o||(h[Q]=!0,Yg(()=>{h[Q]=!1})),T(Z.$el).scrollTop=Math.max(0,ne*L(Q)))},L=Q=>{var Z;const ne=(Z=E(p[Q]))==null?void 0:Z.$el.querySelector("li");return ne&&Number.parseFloat(il(ne,"height"))||0},R=()=>{B(1)},V=()=>{B(-1)},B=Q=>{f.value||S("hours");const ne=f.value,Z=E(y)[ne],ae=F(ne,Z,Q,f.value==="hours"?24:60);z(ne,ae),I(ne,ae),ot(()=>S(ne))},F=(Q,ne,Z,ae)=>{let ge=(ne+Z+ae)%ae;const Ce=E(b)[Q];for(;Ce[ge]&&ge!==ne;)ge=(ge+Z+ae)%ae;return ge},z=(Q,ne)=>{if(E(b)[Q][ne])return;const{hours:Z,minutes:ae,seconds:ge}=E(y);let Ce;switch(Q){case"hours":Ce=n.spinnerDate.hour(ne).minute(ae).second(ge);break;case"minutes":Ce=n.spinnerDate.hour(Z).minute(ne).second(ge);break;case"seconds":Ce=n.spinnerDate.hour(Z).minute(ae).second(ne);break}r(dn,Ce)},U=(Q,{value:ne,disabled:Z})=>{Z||(z(Q,ne),S(Q),I(Q,ne))},G=Q=>{if(!o&&h[Q])return;const ne=E(p[Q]);ne&&(d=!0,C(Q),z(Q,Math.min(Math.round((T(ne.$el).scrollTop-(K(Q)*.5-10)/L(Q)+3)/L(Q)),Q==="hours"?23:59)))},K=Q=>E(p[Q]).$el.offsetHeight,X=()=>{const Q=ne=>{const Z=E(p[ne]);Z&&Z.$el&&(T(Z.$el).onscroll=()=>{G(ne)})};Q("hours"),Q("minutes"),Q("seconds")};Ft(()=>{ot(()=>{!n.arrowControl&&X(),P(),n.role==="start"&&S("hours")})});const W=(Q,ne)=>{p[ne].value=Q??void 0};return r("set-option",[`${n.role}_scrollDown`,B]),r("set-option",[`${n.role}_emitSelectRange`,S]),Te(()=>n.spinnerDate,()=>{d||P()}),(Q,ne)=>(v(),A("div",{class:q([E(a).b("spinner"),{"has-seconds":Q.showSeconds}])},[Q.arrowControl?O("v-if",!0):(v(!0),A(ee,{key:0},we(m.value,Z=>(v(),D(E(qs),{key:Z,ref_for:!0,ref:ae=>W(ae,Z),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(Z),onMousemove:ae=>M(Z)},{default:w(()=>[(v(!0),A(ee,null,we(b.value[Z],(ae,ge)=>(v(),A("li",{key:ge,class:q([E(a).be("spinner","item"),E(a).is("active",ge===y.value[Z]),E(a).is("disabled",ae)]),onClick:Ce=>U(Z,{value:ge,disabled:ae})},[Z==="hours"?(v(),A(ee,{key:0},[N(x(("0"+(Q.amPmMode?ge%12||12:ge)).slice(-2))+x($(ge)),1)],64)):(v(),A(ee,{key:1},[N(x(("0"+ge).slice(-2)),1)],64))],10,ghe))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),Q.arrowControl?(v(!0),A(ee,{key:1},we(m.value,Z=>(v(),A("div",{key:Z,class:q([E(a).be("spinner","wrapper"),E(a).is("arrow")]),onMouseenter:ae=>S(Z)},[Re((v(),D(E(be),{class:q(["arrow-up",E(a).be("spinner","arrow")])},{default:w(()=>[_(E(Zb))]),_:1},8,["class"])),[[E(wy),V]]),Re((v(),D(E(be),{class:q(["arrow-down",E(a).be("spinner","arrow")])},{default:w(()=>[_(E(Bd))]),_:1},8,["class"])),[[E(wy),R]]),g("ul",{class:q(E(a).be("spinner","list"))},[(v(!0),A(ee,null,we(k.value[Z],(ae,ge)=>(v(),A("li",{key:ge,class:q([E(a).be("spinner","item"),E(a).is("active",ae===y.value[Z]),E(a).is("disabled",b.value[Z][ae])])},[E(wt)(ae)?(v(),A(ee,{key:0},[Z==="hours"?(v(),A(ee,{key:0},[N(x(("0"+(Q.amPmMode?ae%12||12:ae)).slice(-2))+x($(ae)),1)],64)):(v(),A(ee,{key:1},[N(x(("0"+ae).slice(-2)),1)],64))],64)):O("v-if",!0)],2))),128))],2)],42,vhe))),128)):O("v-if",!0)],2))}}),yhe=_he,bhe=fe({__name:"panel-time-pick",props:dhe,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,i=e,s=qe(Ia),{arrowControl:o,disabledHours:r,disabledMinutes:a,disabledSeconds:l,defaultValue:c}=s.props,{getAvailableHours:u,getAvailableMinutes:d,getAvailableSeconds:h}=fhe(r,a,l),f=Be("time"),{t:p,lang:m}=Qt(),y=J([0,2]),b=phe(n,{modelValue:Y(()=>s.props.modelValue),valueOnClear:Y(()=>s!=null&&s.emptyValues?s.emptyValues.valueOnClear.value:null)}),k=Y(()=>nn(n.actualVisible)?`${f.namespace.value}-zoom-in-top`:""),C=Y(()=>n.format.includes("ss")),$=Y(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),S=K=>{const X=ht(K).locale(m.value),W=z(X);return X.isSame(W)},M=()=>{const K=b.value;i("pick",K,!1),ot(()=>{b.value=K})},P=(K=!1,X=!1)=>{X||i("pick",n.parsedValue,K)},T=K=>{n.visible&&i("pick",z(K).millisecond(0),!0)},I=(K,X)=>{i("select-range",K,X),y.value=[K,X]},L=K=>{const X=n.format,W=X.indexOf("HH"),Q=X.indexOf("mm"),ne=X.indexOf("ss"),Z=[],ae=[];W!==-1&&(Z.push(W),ae.push("hours")),Q!==-1&&(Z.push(Q),ae.push("minutes")),ne!==-1&&C.value&&(Z.push(ne),ae.push("seconds"));const ge=(Z.indexOf(y.value[0])+K+Z.length)%Z.length;V.start_emitSelectRange(ae[ge])},R=K=>{const X=ls(K),{left:W,right:Q,up:ne,down:Z}=Ue;if([W,Q].includes(X)){L(X===W?-1:1),K.preventDefault();return}if([ne,Z].includes(X)){const ae=X===ne?-1:1;V.start_scrollDown(ae),K.preventDefault();return}},{timePickerOptions:V,onSetOption:B,getAvailableTime:F}=hhe({getAvailableHours:u,getAvailableMinutes:d,getAvailableSeconds:h}),z=K=>F(K,n.datetimeRole||"",!0),U=K=>K?ht(K,n.format).locale(m.value):null,G=()=>ht(c).locale(m.value);return i("set-picker-option",["isValidValue",S]),i("set-picker-option",["parseUserInput",U]),i("set-picker-option",["handleKeydownInput",R]),i("set-picker-option",["getRangeAvailableTime",z]),i("set-picker-option",["getDefaultValue",G]),i("set-picker-option",["handleCancel",M]),(K,X)=>(v(),D(Ho,{name:k.value},{default:w(()=>[K.actualVisible||K.visible?(v(),A("div",{key:0,class:q(E(f).b("panel"))},[g("div",{class:q([E(f).be("panel","content"),{"has-seconds":C.value}])},[_(yhe,{ref:"spinner",role:K.datetimeRole||"start","arrow-control":E(o),"show-seconds":C.value,"am-pm-mode":$.value,"spinner-date":K.parsedValue,"disabled-hours":E(r),"disabled-minutes":E(a),"disabled-seconds":E(l),onChange:T,onSetOption:E(B),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:X[0]||(X[0]=W=>P())},x(E(p)("el.datepicker.confirm")),3)],2)],2)):O("v-if",!0)]),_:1},8,["name"]))}}),wC=bhe,rV={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(y){return(y=+y)+(y>68?1900:2e3)},u=function(y){return function(b){this[y]=+b}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var k=b.match(/([+-]|\d\d)/g),C=60*k[1]+(+k[2]||0);return C===0?0:k[0]==="+"?-C:C}(y)}],h=function(y){var b=l[y];return b&&(b.indexOf?b:b.s.concat(b.f))},f=function(y,b){var k,C=l.meridiem;if(C){for(var $=1;$<=24;$+=1)if(y.indexOf(C($,0,b))>-1){k=$>12;break}}else k=y===(b?"pm":"PM");return k},p={A:[a,function(y){this.afternoon=f(y,!1)}],a:[a,function(y){this.afternoon=f(y,!0)}],Q:[s,function(y){this.month=3*(y-1)+1}],S:[s,function(y){this.milliseconds=100*+y}],SS:[o,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],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(y){var b=l.ordinal,k=y.match(/\d+/);if(this.day=k[0],b)for(var C=1;C<=31;C+=1)b(C).replace(/\[|\]/g,"")===y&&(this.day=C)}],w:[r,u("week")],ww:[o,u("week")],M:[r,u("month")],MM:[o,u("month")],MMM:[a,function(y){var b=h("months"),k=(h("monthsShort")||b.map(function(C){return C.slice(0,3)})).indexOf(y)+1;if(k<1)throw new Error;this.month=k%12||k}],MMMM:[a,function(y){var b=h("months").indexOf(y)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(y){this.year=c(y)}],YYYY:[/\d{4}/,u("year")],Z:d,ZZ:d};function m(y){var b,k;b=y,k=l&&l.formats;for(var C=(y=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(L,R,V){var B=V&&V.toUpperCase();return R||k[V]||n[V]||k[B].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,z,U){return z||U.slice(1)})})).match(i),$=C.length,S=0;S<$;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,B=0;V<$;V+=1){var F=C[V];if(typeof F=="string")B+=F.length;else{var z=F.regex,U=F.parser,G=L.slice(B),K=z.exec(G)[0];U.call(R,K),L=L.replace(K,"")}}return function(X){var W=X.afternoon;if(W!==void 0){var Q=X.hours;W?Q<12&&(X.hours+=12):Q===12&&(X.hours=0),delete X.afternoon}}(R),R}}return function(y,b,k){k.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(c=y.parseTwoDigitYear);var C=b.prototype,$=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,B=T[2];R&&(B=T[2]),l=this.$locale(),!L&&B&&(l=k.Ls[B]),this.$d=function(G,K,X,W){try{if(["x","X"].indexOf(K)>-1)return new Date((K==="X"?1e3:1)*G);var Q=m(K)(G),ne=Q.year,Z=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||Z?1:ke.getDate()),te=ne||ke.getFullYear(),se=0;ne&&!Z||(se=Z>0?Z-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)):X?new Date(Date.UTC(te,se,je,$e,Se,Le,We)):(me=new Date(te,se,je,$e,Se,Le,We),re&&(me=W(me).week(re).toDate()),me)}catch{return new Date("")}}(M,I,P,k),this.init(),B&&B!==!0&&(this.$L=this.locale(B).$L),V&&M!=this.format(I)&&(this.$d=new Date("")),l={}}else if(I instanceof Array)for(var F=I.length,z=1;z<=F;z+=1){T[1]=I[z-1];var U=k.apply(this,T);if(U.isValid()){this.$d=U.$d,this.$L=U.$L,this.init();break}z===F&&(this.$d=new Date(""))}else $.call(this,S)}}})})(rV);var whe=rV.exports;const aV=vi(whe),e1=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}),khe={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},Che=["aria-label"],xhe=["aria-label"];var She=fe({name:"ElTag",__name:"tag",props:e1,emits:khe,setup(t,{emit:e}){const n=t,i=e,s=Ii(),{t:o}=Qt(),r=Be("tag"),a=Y(()=>{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(),A("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(),A("button",{key:0,"aria-label":E(o)("el.tag.close"),class:q(E(r).e("close")),type:"button",onClick:Ee(l,["stop"])},[_(E(be),null,{default:w(()=>[_(E(Bo))]),_:1})],10,Che)):O("v-if",!0)],6)):(v(),D(Ho,{key:1,name:`${E(r).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:u},{default:w(()=>[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(),A("button",{key:0,"aria-label":E(o)("el.tag.close"),class:q(E(r).e("close")),type:"button",onClick:Ee(l,["stop"])},[_(E(be),null,{default:w(()=>[_(E(Bo))]),_:1})],10,xhe)):O("v-if",!0)],6)]),_:3},8,["name"]))}}),$he=She;const hi=qt($he),lV=Symbol("ElSelectGroup"),t2=Symbol("ElSelect"),kC={label:"label",value:"value",disabled:"disabled",options:"options"};function Ahe(t){const e=J({...kC,...t.props});let n={...t.props};return Te(()=>t.props,a=>{Wi(a,n)||(e.value={...kC,...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 Ehe=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:Bd},tagType:{...e1.type,default:"info"},tagEffect:{...e1.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:()=>kC},...F1,...xr(["ariaLabel"])});Mt+"",dn+"",PR.scroll;const CC="ElOption",Mhe=Ge({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean});function The(t,e){const n=qe(t2);n||vo(CC,"usage: <el-select><el-option /></el-select/>");const i=qe(lV,{disabled:!1}),s=Y(()=>u(Us(n.props.modelValue),t.value)),o=Y(()=>{if(n.props.multiple){const f=Us(n.props.modelValue??[]);return!s.value&&f.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),r=Y(()=>t.label??(yt(t.value)?"":t.value)),a=Y(()=>t.value||t.label||""),l=Y(()=>t.disabled||e.groupDisabled||o.value),c=pt(),u=(f=[],p)=>{if(yt(t.value)){const m=n.props.valueKey;return f&&f.some(y=>an(ji(y,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(Oie(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:y}=n.props;if((m?f!==p:!Wi(f,p))&&(n.onOptionDestroy(p,c.proxy),n.onOptionCreate(c.proxy)),!t.created&&!m){if(y&&yt(f)&&yt(p)&&f[y]===p[y])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 Phe=fe({name:CC,componentName:CC,props:Mhe,setup(t){const e=Be("select"),n=kr(),i=Y(()=>[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}=The(t,s),{visible:d,hover:h}=go(s),f=pt().proxy;l.onOptionCreate(f),wn(()=>{const m=f.value;ot(()=>{const{selected:y}=l.states,b=y.some(k=>k.value===f.value);l.states.cachedOptions.get(m)===f&&!b&&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 Ihe=["id","aria-disabled","aria-selected"];function Lhe(t,e,n,i,s,o){return Re((v(),A("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]=Ee((...r)=>t.selectOptionClick&&t.selectOptionClick(...r),["stop"]))},[le(t.$slots,"default",{},()=>[g("span",null,x(t.currentLabel),1)])],42,Ihe)),[[jt,t.visible]])}var l8=gi(Phe,[["render",Lhe]]),Ohe=fe({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=Be("select"),n=J(),i=pt(),s=J([]);Pt(lV,In({...go(t)}));const o=Y(()=>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=Us(c),d=[];return u.forEach(h=>{var f;is(h)&&(r(h)?d.push(h.component.proxy):Me(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 Ft(()=>{l()}),xie(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:o,ns:e}}});function Dhe(t,e,n,i,s,o){return Re((v(),A("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 c8=gi(Ohe,[["render",Dhe]]),Rhe=fe({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=qe(t2),e=Be("select"),n=Y(()=>t.props.popperClass),i=Y(()=>t.props.multiple),s=Y(()=>t.props.fitInputWidth),o=J("");function r(){var l;const a=(l=t.selectRef)==null?void 0:l.offsetWidth;a?o.value=`${a-eJ}px`:o.value=""}return Ft(()=>{r(),Ts(t.selectRef,r)}),{ns:e,minWidth:o,popperClass:n,isMultiple:i,isFitInputWidth:s}}});function Vhe(t,e,n,i,s,o){return v(),A("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(),A("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(),A("div",{key:1,class:q(t.ns.be("dropdown","footer"))},[le(t.$slots,"footer")],2)):O("v-if",!0)],6)}var Fhe=gi(Rhe,[["render",Vhe]]);const Nhe=(t,e)=>{const{t:n}=Qt(),i=mi(),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=J(),c=J(),u=J(),d=J(),h=J(),f=J(),p=J(),m=J(),y=J(),b=J(),k=J(),C=J(!1),$=J(),S=J(!1),{form:M,formItem:P}=_o(),{inputId:T}=Tl(t,{formItemContext:P}),{valueOnClear:I,isEmptyValue:L}=Y4(t),{isComposing:R,handleCompositionStart:V,handleCompositionUpdate:B,handleCompositionEnd:F}=W4({afterComposition:xe=>_t(xe)}),z=bs(),{wrapperRef:U,isFocused:G,handleBlur:K}=pp(h,{disabled:z,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)))}}),X=Y(()=>Me(t.modelValue)?t.modelValue.length>0:!L(t.modelValue)),W=Y(()=>(M==null?void 0:M.statusIcon)??!1),Q=Y(()=>t.clearable&&!z.value&&X.value&&(G.value||a.inputHovering)),ne=Y(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),Z=Y(()=>o.is("reverse",!!(ne.value&&C.value))),ae=Y(()=>(P==null?void 0:P.validateState)||""),ge=Y(()=>ae.value&&Q4[ae.value]),Ce=Y(()=>t.remote?t.debounce:0),oe=Y(()=>t.remote&&!a.inputValue&&a.options.size===0),pe=Y(()=>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=Y(()=>re.value.filter(xe=>xe.visible).length),re=Y(()=>{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=Y(()=>Array.from(a.cachedOptions.values())),je=Y(()=>{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=Y(()=>["small"].includes(se.value)?"small":"default"),$e=Y({get(){return C.value&&(t.loading||!oe.value||t.remote&&!!i.empty)&&(!S.value||!$4(a.previousQuery)||a.options.size>0)},set(xe){C.value=xe}}),Se=Y(()=>{if(t.multiple&&!nn(t.modelValue))return Us(t.modelValue).length===0&&!a.inputValue;const xe=Me(t.modelValue)?t.modelValue[0]:t.modelValue;return t.filterable||nn(xe)?!a.inputValue:!0}),Le=Y(()=>{const xe=t.placeholder??n("el.select.placeholder");return t.multiple||!X.value?xe:a.selectedLabel}),We=Y(()=>qk?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(),()=>{Kt&&(Ae(),t.defaultFirstOption&&(t.filterable||t.remote)&&ie.value&&ze())},{flush:"post"}),Te([()=>a.hoveringIndex,re],([xe])=>{wt(xe)&&xe>-1?$.value=re.value[xe]||{}:$.value={},re.value.forEach(Qe=>{Qe.hover=$.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(ze):ot(Ye))},ze=()=>{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(Me(t.modelValue)?t.modelValue[0]:t.modelValue);a.selectedLabel=Qe.currentLabel,a.selected=[Qe];return}const xe=[];nn(t.modelValue)||Us(t.modelValue).forEach(Qe=>{xe.push(Ze(Qe))}),a.selected=xe},Ze=xe=>{let Qe;const $t=hd(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(Gs=>!Gs.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)},ye=()=>{a.collapseItemWidth=b.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=vD(()=>{Ie(),S.value=!1},Ce),Je=xe=>{Wi(t.modelValue,xe)||e(dn,xe)},dt=xe=>zse(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=Us(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&&!z.value){const Mn=Us(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()},ce=xe=>{if(t.multiple){const Qe=Us(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)=>nn(Qe)?-1:yt(Qe.value)?xe.findIndex($t=>Wi(ji($t,t.valueKey),Ko(Qe))):xe.indexOf(Qe.value),gt=xe=>{var Mn,ks,Gs,Np,c9;const Qe=Me(xe)?xe[xe.length-1]:xe;let $t=null;if(!ui(Qe==null?void 0:Qe.value)){const Bp=re.value.filter(PW=>PW.value===Qe.value);Bp.length>0&&($t=Bp[0].$el)}if(u.value&&$t){const Bp=(Np=(Gs=(ks=(Mn=u.value)==null?void 0:Mn.popperRef)==null?void 0:ks.contentRef)==null?void 0:Gs.querySelector)==null?void 0:Np.call(Gs,`.${o.be("dropdown","wrap")}`);Bp&&Wie(Bp,$t)}(c9=k.value)==null||c9.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)},du=Y(()=>{var xe,Qe;return(Qe=(xe=u.value)==null?void 0:xe.popperRef)==null?void 0:Qe.contentRef}),Vp=()=>{a.isBeforeHide=!1,ot(()=>{var xe;(xe=k.value)==null||xe.update(),gt(a.selected)})},Vl=()=>{var xe;(xe=h.value)==null||xe.focus()},ca=()=>{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,G.value){const Qe=new FocusEvent("blur",xe);ot(()=>K(Qe))}},nt=()=>{a.inputValue.length>0?a.inputValue="":C.value=!1},at=xe=>{var Qe;z.value||t.filterable&&C.value&&xe&&!((Qe=p.value)!=null&&Qe.contains(xe.target))||(qk&&(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&&ce(xe)}},Ko=xe=>yt(xe.value)?ji(xe.value,t.valueKey):xe.value,Fl=Y(()=>re.value.filter(xe=>xe.visible).every(xe=>xe.isDisabled)),hu=Y(()=>t.multiple?t.collapseTags?a.selected.slice(0,t.maxCollapseTags):a.selected:[]),SW=Y(()=>t.multiple?t.collapseTags?a.selected.slice(t.maxCollapseTags):[]:[]),Ev=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)&&Ev(xe),ot(()=>gt($.value))}},l9=(xe,Qe,$t,Mn)=>{for(let ks=Qe;ks>=0&&ks<Mn;ks+=$t){const Gs=xe[ks];if(!(Gs!=null&&Gs.isDisabled)&&(Gs!=null&&Gs.visible))return ks}return null},Mv=(xe,Qe)=>{const $t=a.options.size;if($t===0)return;const Mn=HO(xe,0,$t-1),ks=re.value,Gs=Qe==="up"?-1:1,Np=l9(ks,Mn,Gs,$t)??l9(ks,Mn-Gs,-Gs,$t);Np!=null&&(a.hoveringIndex=Np,ot(()=>gt($.value)))},$W=xe=>{const Qe=ls(xe);let $t=!0;switch(Qe){case Ue.up:Ev("prev");break;case Ue.down:Ev("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;Mv(0,"down");break;case Ue.end:if(!C.value)return;Mv(a.options.size-1,"up");break;case Ue.pageUp:if(!C.value)return;Mv(a.hoveringIndex-10,"up");break;case Ue.pageDown:if(!C.value)return;Mv(a.hoveringIndex+10,"down");break;default:$t=!1;break}$t&&(xe.preventDefault(),xe.stopPropagation())},AW=()=>{if(!c.value)return 0;const xe=window.getComputedStyle(c.value);return Number.parseFloat(xe.gap||"6px")},EW=Y(()=>{const xe=AW(),Qe=t.filterable?xe+a4:0;return{maxWidth:`${b.value&&t.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-xe-Qe:a.selectionWidth-Qe}px`}}),MW=Y(()=>({maxWidth:`${a.selectionWidth}px`})),TW=xe=>{e("popup-scroll",xe)};Ts(c,it),Ts(U,ve),Ts(y,Pe),Ts(b,ye);let Fp;return Te(()=>$e.value,xe=>{xe?Fp=Ts(m,ve).stop:(Fp==null||Fp(),Fp=void 0),e("visible-change",xe)}),Ft(()=>{Ae()}),{inputId:T,contentId:s,nsSelect:o,nsInput:r,states:a,isFocused:G,expanded:C,optionsArray:re,hoverOption:$,selectSize:se,filteredOptionsCount:ie,updateTooltip:ve,updateTagTooltip:Pe,debouncedOnInputChange:Lt,onInput:_t,deletePrevTag:mt,deleteTag:_e,deleteSelected:Oe,handleOptionSelect:ce,scrollToOption:gt,hasModelValue:X,shouldShowPlaceholder:Se,currentPlaceholder:Le,mouseEnterEventName:We,needStatusIcon:W,showClearBtn:Q,iconComponent:ne,iconReverse:Z,validateState:ae,validateIcon:ge,showNewOption:je,updateOptions:te,collapseTagSize:me,setSelected:Ae,selectDisabled:z,emptyText:pe,handleCompositionStart:V,handleCompositionUpdate:B,handleCompositionEnd:F,handleKeydown:$W,onOptionCreate:bn,onOptionDestroy:gs,handleMenuEnter:Vp,focus:Vl,blur:ca,handleClearClick:$n,handleClickOutside:Di,handleEsc:nt,toggleMenu:at,selectOption:vt,getValueKey:Ko,navigateOptions:Ev,dropdownMenuVisible:$e,showTagList:hu,collapseTagList:SW,popupScroll:TW,getOption:Ze,tagStyle:EW,collapseTagStyle:MW,popperRef:du,inputRef:h,tooltipRef:u,tagTooltipRef:d,prefixRef:f,suffixRef:p,selectRef:l,wrapperRef:U,selectionRef:c,scrollbarRef:k,menuRef:m,tagMenuRef:y,collapseItemRef:b}};var Bhe=fe({name:"ElOptions",setup(t,{slots:e}){const n=qe(t2);let i=[];return()=>{var a,l;const s=(a=e.default)==null?void 0:a.call(e),o=[];function r(c){Me(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)&&!Me(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):Me(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 gA="ElSelect",t1=new WeakMap,zhe=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=t1.get(t))==null?void 0:o.originalWarnHandler;if(i){i(...e);return}console.warn(...e)},Hhe=t=>{let e=t1.get(t);return e||(e={originalWarnHandler:t.config.warnHandler,handler:zhe(t),count:0},t1.set(t,e)),e};var Uhe=fe({name:gA,componentName:gA,components:{ElSelectMenu:Fhe,ElOption:l8,ElOptions:Bhe,ElOptionGroup:c8,ElTag:hi,ElScrollbar:qs,ElTooltip:Ss,ElIcon:be},directives:{ClickOutside:Qg},props:Ehe,emits:[Mt,dn,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(t,{emit:e,slots:n}){const i=pt(),s=Hhe(i.appContext);s.count+=1,i.appContext.config.warnHandler=s.handler;const o=Y(()=>{const{modelValue:k,multiple:C}=t,$=C?[]:void 0;return Me(k)?C?k:$:C?$:k}),r=In({...go(t),modelValue:o}),a=Nhe(r,e),{calculatorRef:l,inputStyle:c}=bD(),{getLabel:u,getValue:d,getOptions:h,getDisabled:f}=Ahe(t),p=k=>({label:u(k),value:d(k),disabled:f(k)}),m=k=>k.reduce((C,$)=>(C.push($),$.children&&$.children.length>0&&C.push(...m($.children)),C),[]),y=k=>{kc(k||[]).forEach(C=>{var $;if(yt(C)&&(C.type.name==="ElOption"||C.type.name==="ElTree")){const S=C.type.name;if(S==="ElTree")m((($=C.props)==null?void 0:$.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(),y((k=n.default)==null?void 0:k.call(n)))},{immediate:!0}),Pt(t2,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 b=Y(()=>t.multiple?a.states.selected.map(k=>k.currentLabel):a.states.selectedLabel);return wn(()=>{const k=t1.get(i.appContext);k&&(k.count-=1,k.count<=0&&(i.appContext.config.warnHandler=k.originalWarnHandler,t1.delete(i.appContext)))}),{...a,modelValue:o,selectedLabel:b,calculatorRef:l,inputStyle:c,getLabel:u,getValue:d,getOptions:h,getDisabled:f,getOptionProps:p}}});const jhe=["id","value","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],Whe=["textContent"],Yhe={key:1};function qhe(t,e,n,i,s,o){const r=H("el-tag"),a=H("el-tooltip"),l=H("el-icon"),c=H("el-option"),u=H("el-option-group"),d=H("el-options"),h=H("el-scrollbar"),f=H("el-select-menu"),p=xt("click-outside");return Re((v(),A("div",Wt({ref:"selectRef",class:[t.nsSelect.b(),t.nsSelect.m(t.selectSize)]},{[qu(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:w(()=>{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]=Ee((...y)=>t.toggleMenu&&t.toggleMenu(...y),["prevent"]))},[t.$slots.prefix?(v(),A("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 y,b,k,C,$,S,M,P,T,I,L,R,V;return[(v(!0),A(ee,null,we(t.showTagList,B=>(v(),A("div",{key:t.getValueKey(B),class:q(t.nsSelect.e("selected-item"))},[_(r,{closable:!t.selectDisabled&&!B.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:Xe(t.tagStyle),onClose:F=>t.deleteTag(F,B)},{default:w(()=>[g("span",{class:q(t.nsSelect.e("tags-text"))},[le(t.$slots,"label",{index:B.index,label:B.currentLabel,value:B.value},()=>[N(x(B.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":((y=t.tagTooltip)==null?void 0:y.fallbackPlacements)??["bottom","top","right","left"],effect:((b=t.tagTooltip)==null?void 0:b.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":(($=t.tagTooltip)==null?void 0:$.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:w(()=>[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:w(()=>[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:w(()=>[g("div",{ref:"tagMenuRef",class:q(t.nsSelect.e("selection"))},[(v(!0),A(ee,null,we(t.collapseTagList,B=>(v(),A("div",{key:t.getValueKey(B),class:q(t.nsSelect.e("selected-item"))},[_(r,{class:"in-tooltip",closable:!t.selectDisabled&&!B.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:F=>t.deleteTag(F,B)},{default:w(()=>[g("span",{class:q(t.nsSelect.e("tags-text"))},[le(t.$slots,"label",{index:B.index,label:B.currentLabel,value:B.value},()=>[N(x(B.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]=(...y)=>t.handleKeydown&&t.handleKeydown(...y)),onCompositionstart:e[1]||(e[1]=(...y)=>t.handleCompositionStart&&t.handleCompositionStart(...y)),onCompositionupdate:e[2]||(e[2]=(...y)=>t.handleCompositionUpdate&&t.handleCompositionUpdate(...y)),onCompositionend:e[3]||(e[3]=(...y)=>t.handleCompositionEnd&&t.handleCompositionEnd(...y)),onInput:e[4]||(e[4]=(...y)=>t.onInput&&t.onInput(...y)),onChange:e[5]||(e[5]=Ee(()=>{},["stop"])),onClick:e[6]||(e[6]=Ee((...y)=>t.toggleMenu&&t.toggleMenu(...y),["stop"]))},null,46,jhe),t.filterable?(v(),A("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:q(t.nsSelect.e("input-calculator")),textContent:x(t.states.inputValue)},null,10,Whe)):O("v-if",!0)],2),t.shouldShowPlaceholder?(v(),A("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(),A("span",Yhe,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:w(()=>[(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:w(()=>[(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:w(()=>[(v(),D(Ct(t.validateIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],2)]}),content:w(()=>[_(f,{ref:"menuRef"},{default:w(()=>[t.$slots.header?(v(),A("div",{key:0,class:q(t.nsSelect.be("dropdown","header")),onClick:e[8]||(e[8]=Ee(()=>{},["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:w(()=>[t.showNewOption?(v(),D(c,{key:0,value:t.states.inputValue,created:!0},null,8,["value"])):O("v-if",!0),_(d,null,{default:w(()=>[le(t.$slots,"default",{},()=>[(v(!0),A(ee,null,we(t.options,(m,y)=>{var b;return v(),A(ee,{key:y},[(b=t.getOptions(m))!=null&&b.length?(v(),D(u,{key:0,label:t.getLabel(m),disabled:t.getDisabled(m)},{default:w(()=>[(v(!0),A(ee,null,we(t.getOptions(m),k=>(v(),D(c,Wt({key:t.getValue(k)},{ref_for:!0},t.getOptionProps(k)),null,16))),128))]),_:2},1032,["label","disabled"])):(v(),D(c,Wt({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(),A("div",{key:1,class:q(t.nsSelect.be("dropdown","loading"))},[le(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(v(),A("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(),A("div",{key:3,class:q(t.nsSelect.be("dropdown","footer")),onClick:e[9]||(e[9]=Ee(()=>{},["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 Ghe=gi(Uhe,[["render",qhe]]);const Jt=qt(Ghe,{Option:l8,OptionGroup:c8}),sn=Os(l8),n2=Os(c8);var cV={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 y=d.name?d:d.$locale(),b=r(y[h]),k=r(y[f]),C=b||k.map(function(S){return S.slice(0,p)});if(!m)return C;var $=y.weekStart;return C.map(function(S,M){return C[(M+($||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,y){return m||y.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)}}})})(cV);var Xhe=cV.exports;const Khe=vi(Xhe),uV={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,...xr(["ariaControls"])},dV={[Mt]:t=>Ke(t)||wt(t)||Jn(t),change:t=>Ke(t)||wt(t)||Jn(t)},mp=Symbol("checkboxGroupContextKey"),Zhe=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:()=>hV},type:{type:String,values:["checkbox","button"],default:"checkbox"},...xr(["ariaLabel"])}),Jhe={[Mt]:t=>Me(t),change:t=>Me(t)},hV={label:"label",value:"value",disabled:"disabled"},Qhe=({model:t,isChecked:e})=>{const n=qe(mp,void 0),i=qe(zd,void 0),s=Y(()=>{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!nn(o)&&t.value.length>=o&&!e.value||!nn(r)&&t.value.length<=r&&e.value});return{isDisabled:bs(Y(()=>{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}},efe=(t,{model:e,isLimitExceeded:n,hasOwnLabel:i,isDisabled:s,isLabeledByFormItem:o})=>{const r=qe(mp,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=Y(()=>(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}},tfe=t=>{const e=J(!1),{emit:n}=pt(),i=qe(mp,void 0),s=Y(()=>nn(i)===!1),o=J(!1),r=Y({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&&Me(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}},nfe=(t,e,{model:n})=>{const i=qe(mp,void 0),s=J(!1),o=Y(()=>ka(t.value)?t.label:t.value),r=Y(()=>{const a=n.value;return Jn(a)?a:Me(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(Y(()=>{var a;return(a=i==null?void 0:i.size)==null?void 0:a.value}),{prop:!0}),isChecked:r,isFocused:s,checkboxSize:Ii(Y(()=>{var a;return(a=i==null?void 0:i.size)==null?void 0:a.value})),hasOwnLabel:Y(()=>!!e.default||!ka(o.value)),actualValue:o}},fV=(t,e)=>{const{formItem:n}=_o(),{model:i,isGroup:s,isLimitExceeded:o}=tfe(t),{isFocused:r,isChecked:a,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:u,actualValue:d}=nfe(t,e,{model:i}),{isDisabled:h}=Qhe({model:i,isChecked:a}),{inputId:f,isLabeledByFormItem:p}=Tl(t,{formItemContext:n,disableIdGeneration:u,disableIdManagement:s}),{handleChange:m,onClickRoot:y}=efe(t,{model:i,isLimitExceeded:o,hasOwnLabel:u,isDisabled:h,isLabeledByFormItem:p});return(()=>{function k(){Me(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"},Y(()=>s.value&&ka(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"},Y(()=>!!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"},Y(()=>!!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:y}},sfe=["id","indeterminate","name","tabindex","disabled"];var ife=fe({name:"ElCheckbox",__name:"checkbox",props:uV,emits:dV,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}=fV(e,mi()),f=Y(()=>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=Y(()=>[p.b(),p.m(a.value),p.is("disabled",o.value),p.is("bordered",e.border),p.is("checked",s.value)]),y=Y(()=>[p.e("input"),p.is("disabled",o.value),p.is("checked",s.value),p.is("indeterminate",e.indeterminate),p.is("focus",r.value)]);return(b,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:w(()=>[g("span",{class:q(y.value)},[Re(g("input",Wt({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]=Ee(()=>{},["stop"]))}),null,16,sfe),[[A1,E(c)]]),g("span",{class:q(E(p).e("inner"))},null,2)],2),E(l)?(v(),A("span",{key:0,class:q(E(p).e("label"))},[le(b.$slots,"default"),b.$slots.default?O("v-if",!0):(v(),A(ee,{key:0},[N(x(t.label),1)],64))],2)):O("v-if",!0)]),_:3},8,["for","class","aria-controls","aria-checked","aria-label","onClick"]))}}),pV=ife;const ofe=["name","tabindex","disabled"];var rfe=fe({name:"ElCheckboxButton",__name:"checkbox-button",props:uV,emits:dV,setup(t){const e=t,{isFocused:n,isChecked:i,isDisabled:s,checkboxButtonSize:o,model:r,actualValue:a,handleChange:l}=fV(e,mi()),c=Y(()=>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(mp,void 0),d=Be("checkbox"),h=Y(()=>{var m,y;const p=((m=u==null?void 0:u.fill)==null?void 0:m.value)??"";return{backgroundColor:p,borderColor:p,color:((y=u==null?void 0:u.textColor)==null?void 0:y.value)??"",boxShadow:p?`-1px 0 0 0 ${p}`:void 0}}),f=Y(()=>[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(),A("label",{class:q(f.value)},[Re(g("input",Wt({"onUpdate:modelValue":m[0]||(m[0]=y=>hn(r)?r.value=y: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]=(...y)=>E(l)&&E(l)(...y)),onFocus:m[2]||(m[2]=y=>n.value=!0),onBlur:m[3]||(m[3]=y=>n.value=!1),onClick:m[4]||(m[4]=Ee(()=>{},["stop"]))}),null,16,ofe),[[A1,E(r)]]),p.$slots.default||t.label?(v(),A("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))}}),u8=rfe,afe=fe({name:"ElCheckboxGroup",__name:"checkbox-group",props:Zhe,emits:Jhe,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=Y({get(){return n.modelValue},set(p){c(p)}}),d=Y(()=>({...hV,...n.props})),h=p=>{const{label:m,value:y,disabled:b}=d.value,k={label:p[m],value:p[y],disabled:p[b]};return{...zb(p,[m,y,b]),...k}},f=Y(()=>n.type==="button"?u8:pV);return Pt(mp,{...S4(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(y=>Tt(y)))}),(p,m)=>{var y;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)?(y=E(r))==null?void 0:y.labelId:void 0},{default:w(()=>[le(p.$slots,"default",{},()=>[(v(!0),A(ee,null,we(t.options,(b,k)=>(v(),D(Ct(f.value),Wt({key:k},{ref_for:!0},h(b)),null,16))),128))])]),_:3},8,["id","class","aria-label","aria-labelledby"])}}}),mV=afe;const Yt=qt(pV,{CheckboxButton:u8,CheckboxGroup:mV});Os(u8);const s2=Os(mV),gV=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}}),lfe=Ge({...gV,border:Boolean}),vV={[Mt]:t=>Ke(t)||wt(t)||Jn(t),[dn]:t=>Ke(t)||wt(t)||Jn(t)},_V=Symbol("radioGroupKey"),cfe=Ge({...gV}),yV={label:"label",value:"value",disabled:"disabled"},ufe=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:()=>yV},type:{type:String,values:["radio","button"],default:"radio"},...xr(["ariaLabel"])}),dfe=vV,bV=(t,e)=>{const n=J(),i=qe(_V,void 0),s=Y(()=>!!i),o=Y(()=>ka(t.value)?t.label:t.value),r=Y({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(Y(()=>i==null?void 0:i.size)),l=bs(Y(()=>i==null?void 0:i.disabled)),c=J(!1),u=Y(()=>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"},Y(()=>s.value&&ka(t.value))),{radioRef:n,isGroup:s,radioGroup:i,focus:c,size:a,disabled:l,tabIndex:u,modelValue:r,actualValue:o}},hfe=["value","name","disabled","checked"];var ffe=fe({name:"ElRadio",__name:"radio",props:lfe,emits:vV,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}=bV(n,i);function h(){ot(()=>i(dn,u.value))}return(f,p)=>{var m;return v(),A("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]=y=>hn(u)?u.value=y: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]=y=>a.value=!0),onBlur:p[2]||(p[2]=y=>a.value=!1),onChange:h,onClick:p[3]||(p[3]=Ee(()=>{},["stop"]))},null,42,hfe),[[E1,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]=Ee(()=>{},["stop"]))},[le(f.$slots,"default",{},()=>[N(x(t.label),1)])],34)],2)}}}),wV=ffe;const pfe=["value","name","disabled"];var mfe=fe({name:"ElRadioButton",__name:"radio-button",props:cfe,setup(t){const e=t,n=Be("radio"),{radioRef:i,focus:s,size:o,disabled:r,modelValue:a,radioGroup:l,actualValue:c}=bV(e),u=Y(()=>({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(),A("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]=Ee(()=>{},["stop"]))},null,42,pfe),[[E1,E(a)]]),g("span",{class:q(E(n).be("button","inner")),style:Xe(E(a)===E(c)?u.value:{}),onKeydown:h[4]||(h[4]=Ee(()=>{},["stop"]))},[le(d.$slots,"default",{},()=>[N(x(t.label),1)])],38)],2)}}}),d8=mfe;const gfe=["id","aria-label","aria-labelledby"];var vfe=fe({name:"ElRadioGroup",__name:"radio-group",props:ufe,emits:dfe,setup(t,{emit:e}){const n=t,i=e,s=Be("radio"),o=kr(),r=J(),{formItem:a}=_o(),{inputId:l,isLabeledByFormItem:c}=Tl(n,{formItemContext:a}),u=m=>{i(Mt,m),ot(()=>i(dn,m))};Ft(()=>{const m=r.value.querySelectorAll("[type=radio]"),y=m[0];!Array.from(m).some(b=>b.checked)&&y&&(y.tabIndex=0)});const d=Y(()=>n.name||o.value),h=Y(()=>({...yV,...n.props})),f=m=>{const{label:y,value:b,disabled:k}=h.value,C={label:m[y],value:m[b],disabled:m[k]};return{...zb(m,[y,b,k]),...C}},p=Y(()=>n.type==="button"?d8:wV);return Pt(_V,In({...go(n),changeEvent:u,name:d})),Te(()=>n.modelValue,(m,y)=>{n.validateEvent&&!Wi(m,y)&&(a==null||a.validate("change").catch(b=>Tt(b)))}),(m,y)=>(v(),A("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),A(ee,null,we(t.options,(b,k)=>(v(),D(Ct(p.value),Wt({key:k},{ref_for:!0},f(b)),null,16))),128))])],10,gfe))}}),kV=vfe;const Li=qt(wV,{RadioButton:d8,RadioGroup:kV}),ws=Os(kV),Hd=Os(d8),_fe=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:()=>ri({})},sm:{type:de([Number,Object]),default:()=>ri({})},md:{type:de([Number,Object]),default:()=>ri({})},lg:{type:de([Number,Object]),default:()=>ri({})},xl:{type:de([Number,Object]),default:()=>ri({})}}),yfe=["start","center","end","space-around","space-between","space-evenly"],bfe=["top","middle","bottom"],wfe=Ge({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:yfe,default:"start"},align:{type:String,values:bfe}}),CV=Symbol("rowContextKey");var kfe=fe({name:"ElRow",__name:"row",props:wfe,setup(t){const e=t,n=Be("row");Pt(CV,{gutter:Y(()=>e.gutter)});const i=Y(()=>{const o={};return e.gutter&&(o.marginRight=o.marginLeft=`-${e.gutter/2}px`),o}),s=Y(()=>[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:w(()=>[le(o.$slots,"default")]),_:3},8,["class","style"]))}}),Cfe=kfe;const Ud=qt(Cfe);var xfe=fe({name:"ElCol",__name:"col",props:_fe,setup(t){const e=t,{gutter:n}=qe(CV,{gutter:Y(()=>0)}),i=Be("col"),s=Y(()=>{const r={};return n.value&&(r.paddingLeft=r.paddingRight=`${n.value/2}px`),r}),o=Y(()=>{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:w(()=>[le(r.$slots,"default")]),_:3},8,["class","style"]))}}),Sfe=xfe;const jd=qt(Sfe),vA=t=>wt(t)||Ke(t)||Me(t),$fe=Ge({accordion:Boolean,modelValue:{type:de([Array,String,Number]),default:()=>ri([])},expandIconPosition:{type:de([String]),default:"right"},beforeCollapse:{type:de(Function)}}),Afe={[Mt]:vA,[dn]:vA},xV=Symbol("collapseContextKey"),Efe=Ge({title:{type:String,default:""},name:{type:de([String,Number]),default:void 0},icon:{type:ds,default:Hr},disabled:Boolean});var Mfe=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(Ho,Wt({name:E(e).b()},xb(i)),{default:w(()=>[le(s.$slots,"default")]),_:3},16,["name"]))}}),Tfe=Mfe;const Pfe=qt(Tfe),_A="ElCollapse",Ife=(t,e)=>{const n=J(Us(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);[dd(l),Jn(l)].includes(!0)||vo(_A,"beforeCollapse must return type `Promise<boolean>` or `boolean`"),dd(l)?l.then(c=>{c!==!1&&s(r)}).catch(c=>{Tt(_A,`some error occurred: ${c}`)}):l&&s(r)};return Te(()=>t.modelValue,()=>n.value=Us(t.modelValue),{deep:!0}),Pt(xV,{activeNames:n,handleItemClick:o}),{activeNames:n,setActiveNames:i}},Lfe=t=>{const e=Be("collapse");return{rootKls:Y(()=>[e.b(),e.b(`icon-position-${t.expandIconPosition}`)])}};var Ofe=fe({name:"ElCollapse",__name:"collapse",props:$fe,emits:Afe,setup(t,{expose:e,emit:n}){const i=t,{activeNames:s,setActiveNames:o}=Ife(i,n),{rootKls:r}=Lfe(i);return e({activeNames:s,setActiveNames:o}),(a,l)=>(v(),A("div",{class:q(E(r))},[le(a.$slots,"default")],2))}}),Dfe=Ofe;const Rfe=t=>{const e=qe(xV),{namespace:n}=Be("collapse"),i=J(!1),s=J(!1),o=z4(),r=Y(()=>o.current++),a=Y(()=>t.name??`${n.value}-id-${o.prefix}-${E(r)}`),l=Y(()=>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)))}}},Vfe=(t,{focusing:e,isActive:n,id:i})=>{const s=Be("collapse"),o=Y(()=>[s.b("item"),s.is("active",E(n)),s.is("disabled",t.disabled)]),r=Y(()=>[s.be("item","header"),s.is("active",E(n)),{focusing:E(e)&&!t.disabled}]),a=Y(()=>[s.be("item","arrow"),s.is("active",E(n))]);return{itemTitleKls:Y(()=>[s.be("item","title")]),arrowKls:a,headKls:r,rootKls:o,itemWrapperKls:Y(()=>s.be("item","wrap")),itemContentKls:Y(()=>s.be("item","content")),scopedContentId:Y(()=>s.b(`content-${E(i)}`)),scopedHeadId:Y(()=>s.b(`head-${E(i)}`))}},Ffe=["id","aria-expanded","aria-controls","aria-describedby","tabindex","aria-disabled"],Nfe=["id","aria-hidden","aria-labelledby"];var Bfe=fe({name:"ElCollapseItem",__name:"collapse-item",props:Efe,setup(t,{expose:e}){const n=t,{focusing:i,id:s,isActive:o,handleFocus:r,handleHeaderClick:a,handleEnterClick:l}=Rfe(n),{arrowKls:c,headKls:u,rootKls:d,itemTitleKls:h,itemWrapperKls:f,itemContentKls:p,scopedContentId:m,scopedHeadId:y}=Vfe(n,{focusing:i,isActive:o,id:s});return e({isActive:o}),(b,k)=>(v(),A("div",{class:q(E(d))},[g("div",{id:E(y),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(Ee((...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(b.$slots,"title",{isActive:E(o)},()=>[N(x(t.title),1)])],2),le(b.$slots,"icon",{isActive:E(o)},()=>[_(E(be),{class:q(E(c))},{default:w(()=>[(v(),D(Ct(t.icon)))]),_:1},8,["class"])])],42,Ffe),_(E(Pfe),null,{default:w(()=>[Re(g("div",{id:E(m),role:"region",class:q(E(f)),"aria-hidden":!E(o),"aria-labelledby":E(y)},[g("div",{class:q(E(p))},[le(b.$slots,"default")],2)],10,Nfe),[[jt,E(o)]])]),_:3})],2))}}),SV=Bfe;const zfe=qt(Dfe,{CollapseItem:SV}),Hfe=Os(SV),$V=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])}}),Ufe={[Mt]:t=>Ke(t)||ui(t)},AV=Symbol("colorCommonPickerKey"),EV=Symbol("colorPickerPanelContextKey"),MV=Ge({color:{type:de(Object),required:!0},vertical:Boolean,disabled:Boolean}),jfe=MV,TV=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 Vw=!1;function xC(t,e){if(!Kt)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,Vw=!1,(r=e.end)==null||r.call(e,o)},s=function(o){var r;Vw||(document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",i),document.addEventListener("touchmove",n),document.addEventListener("touchend",i),Vw=!0,(r=e.start)==null||r.call(e,o))};t.addEventListener("mousedown",s),t.addEventListener("touchstart",s,{passive:!1})}const PV=(t,{key:e,minValue:n,maxValue:i})=>{const s=pt(),o=Fn(),r=Fn(),a=Y(()=>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}=TV(h);let y;if(t.vertical){let b=m-f.top;b=Math.max(o.value.offsetHeight/2,b),b=Math.min(b,f.height-o.value.offsetHeight/2),y=Math.round((b-o.value.offsetHeight/2)/(f.height-o.value.offsetHeight)*i)}else{let b=p-f.left;b=Math.max(o.value.offsetWidth/2,b),b=Math.min(b,f.width-o.value.offsetWidth/2),y=Math.round((b-o.value.offsetWidth/2)/(f.width-o.value.offsetWidth)*i)}t.color.set(e,y)}function u(h){if(t.disabled)return;const{shiftKey:f}=h,p=ls(h),m=f?10:1,y=e==="hue"?-1:1;let b=!0;switch(p){case Ue.left:case Ue.down:d(-m*y);break;case Ue.right:case Ue.up:d(m*y);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*y);break;case Ue.pageUp:d(4*y);break;default:b=!1;break}b&&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}},IV=(t,{namespace:e,maxValue:n,bar:i,thumb:s,currentValue:o,handleDrag:r,getBackground:a})=>{const l=pt(),c=Be(e),u=J(0),d=J(0),h=J();function f(){if(!s.value||t.vertical)return 0;const C=l.vnode.el,$=o.value;return C?Math.round($*(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 $=o.value;return C?Math.round($*(C.offsetHeight-s.value.offsetHeight/2)/n):0}function m(){u.value=f(),d.value=p(),h.value=a==null?void 0:a()}Ft(()=>{if(!i.value||!s.value)return;const C={drag:$=>{r($)},end:$=>{r($)}};xC(i.value,C),xC(s.value,C),m()}),Te(o,()=>m()),Te(()=>t.color.value,()=>m());const y=Y(()=>[c.b(),c.is("vertical",t.vertical),c.is("disabled",t.disabled)]),b=Y(()=>c.e("bar")),k=Y(()=>c.e("thumb"));return{rootKls:y,barKls:b,barStyle:Y(()=>({background:h.value})),thumbKls:k,thumbStyle:Y(()=>({left:fi(u.value),top:fi(d.value)})),thumbLeft:u,thumbTop:d,update:m}},Wfe=["aria-label","aria-valuenow","aria-valuetext","aria-orientation","tabindex","aria-disabled"],yA=0,Fw=100;var Yfe=fe({name:"ElColorAlphaSlider",__name:"alpha-slider",props:MV,setup(t,{expose:e}){const n=t,{currentValue:i,bar:s,thumb:o,handleDrag:r,handleClick:a,handleKeydown:l}=PV(n,{key:"alpha",minValue:yA,maxValue:Fw}),{rootKls:c,barKls:u,barStyle:d,thumbKls:h,thumbStyle:f,update:p}=IV(n,{namespace:"color-alpha-slider",maxValue:Fw,currentValue:i,bar:s,thumb:o,handleDrag:r,getBackground:k}),{t:m}=Qt(),y=Y(()=>m("el.colorpicker.alphaLabel")),b=Y(()=>m("el.colorpicker.alphaDescription",{alpha:i.value,color:n.color.value}));function k(){if(n.color&&n.color.value){const{r:C,g:$,b:S}=n.color.toRgb();return`linear-gradient(to right, rgba(${C}, ${$}, ${S}, 0) 0%, rgba(${C}, ${$}, ${S}, 1) 100%)`}return""}return e({update:p,bar:s,thumb:o}),(C,$)=>(v(),A("div",{class:q(E(c))},[g("div",{ref_key:"bar",ref:s,class:q(E(u)),style:Xe(E(d)),onClick:$[0]||($[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":y.value,"aria-valuenow":E(i),"aria-valuetext":b.value,"aria-orientation":t.vertical?"vertical":"horizontal","aria-valuemin":yA,"aria-valuemax":Fw,role:"slider",tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,onKeydown:$[1]||($[1]=(...S)=>E(l)&&E(l)(...S))},null,46,Wfe)],2))}}),qfe=Yfe;const Gfe=["aria-label","aria-valuenow","aria-valuetext","aria-orientation","tabindex","aria-disabled"],bA=0,Nw=360;var Xfe=fe({name:"ElColorHueSlider",__name:"hue-slider",props:jfe,setup(t,{expose:e}){const n=t,{currentValue:i,bar:s,thumb:o,handleDrag:r,handleClick:a,handleKeydown:l}=PV(n,{key:"hue",minValue:bA,maxValue:Nw}),{rootKls:c,barKls:u,thumbKls:d,thumbStyle:h,thumbTop:f,update:p}=IV(n,{namespace:"color-hue-slider",maxValue:Nw,currentValue:i,bar:s,thumb:o,handleDrag:r}),{t:m}=Qt(),y=Y(()=>m("el.colorpicker.hueLabel")),b=Y(()=>m("el.colorpicker.hueDescription",{hue:i.value,color:n.color.value}));return e({bar:s,thumb:o,thumbTop:f,update:p}),(k,C)=>(v(),A("div",{class:q(E(c))},[g("div",{ref_key:"bar",ref:s,class:q(E(u)),onClick:C[0]||(C[0]=(...$)=>E(a)&&E(a)(...$))},null,2),g("div",{ref_key:"thumb",ref:o,class:q(E(d)),style:Xe(E(h)),"aria-label":y.value,"aria-valuenow":E(i),"aria-valuetext":b.value,"aria-orientation":t.vertical?"vertical":"horizontal","aria-valuemin":bA,"aria-valuemax":Nw,role:"slider",tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,onKeydown:C[1]||(C[1]=(...$)=>E(l)&&E(l)(...$))},null,46,Gfe)],2))}}),Kfe=Xfe;const Zfe=Ge({colors:{type:de(Array),required:!0},color:{type:de(Object),required:!0},enableAlpha:{type:Boolean,required:!0},disabled:Boolean});var ky=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 Jfe=t=>{const{currentColor:e}=qe(EV),n=J(s(t.colors,t.color));Te(()=>e.value,o=>{const r=new ky({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 ky({value:a,enableAlpha:t.enableAlpha});return l.selected=l.compare(r),l})}return{rgbaColors:n,handleSelect:i}},Qfe=t=>{const e=Be("color-predefine"),n=Y(()=>[e.b(),e.is("disabled",t.disabled)]),i=Y(()=>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}},epe=["disabled","aria-label","onClick"];var tpe=fe({name:"ElColorPredefine",__name:"predefine",props:Zfe,setup(t){const e=t,{rgbaColors:n,handleSelect:i}=Jfe(e),{rootKls:s,colorsKls:o,colorSelectorKls:r}=Qfe(e),{t:a}=Qt(),l=c=>a("el.colorpicker.predefineDescription",{value:c});return(c,u)=>(v(),A("div",{class:q(E(s))},[g("div",{class:q(E(o))},[(v(!0),A(ee,null,we(E(n),(d,h)=>(v(),A("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,epe))),128))],2)],2))}}),npe=tpe;const spe=Ge({color:{type:de(Object),required:!0},disabled:Boolean}),ipe=t=>{const e=pt(),n=J(),i=J(0),s=J(0),o=J("hsl(0, 100%, 50%)"),r=Y(()=>t.color.get("saturation")),a=Y(()=>t.color.get("value")),l=Y(()=>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:y,clientY:b}=TV(p);let k=y-m.left,C=b-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,y=ls(p),b=m?10:1;let k=!0;switch(y){case Ue.left:h(-b);break;case Ue.right:h(b);break;case Ue.up:f(b);break;case Ue.down:f(-b);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}},ope=(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 Ft(()=>{xC(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:Y(()=>r.b()),cursorKls:Y(()=>r.e("cursor")),rootStyle:Y(()=>({backgroundColor:i.value})),cursorStyle:Y(()=>({top:fi(e.value),left:fi(n.value)})),update:a}},rpe=["tabindex","aria-disabled","aria-label","aria-valuenow","aria-valuetext"];var ape=fe({name:"ElSvPanel",__name:"sv-panel",props:spe,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}=ipe(n),{rootKls:h,cursorKls:f,rootStyle:p,cursorStyle:m,update:y}=ope(n,{cursorTop:s,cursorLeft:o,background:r,handleDrag:u}),{t:b}=Qt(),k=Y(()=>b("el.colorpicker.svLabel")),C=Y(()=>b("el.colorpicker.svDescription",{saturation:a.value,brightness:l.value,color:n.color.value}));return e({update:y}),($,S)=>(v(),A("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,rpe)],6))}}),lpe=ape;const LV=(t,e)=>{const n=In(new ky({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 cpe=fe({name:"ElColorPickerPanel",__name:"color-picker-panel",props:$V,emits:Ufe,setup(t,{expose:e,emit:n}){const i=t,s=n,o=Be("color-picker-panel"),{formItem:r}=_o(),a=bs(),l=J(),c=J(),u=J(),d=J(),h=J(""),{color:f}=qe(AV,()=>LV(i,s),!0);function p(){f.fromString(h.value),f.value!==h.value&&(h.value=f.value)}function m(){var b;i.validateEvent&&((b=r==null?void 0:r.validate)==null||b.call(r,"blur").catch(k=>Tt(k)))}function y(){var b,k,C;(b=l.value)==null||b.update(),(k=c.value)==null||k.update(),(C=u.value)==null||C.update()}return Ft(()=>{i.modelValue&&(h.value=f.value),ot(y)}),Te(()=>i.modelValue,b=>{b!==f.value&&(b?f.fromString(b):f.clear())}),Te(()=>f.value,b=>{s(Mt,b),h.value=b,i.validateEvent&&(r==null||r.validate("change").catch(k=>Tt(k)))}),Pt(EV,{currentColor:Y(()=>f.value)}),e({color:f,inputRef:d,update:y}),(b,k)=>(v(),A("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"))},[_(Kfe,{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"]),_(lpe,{ref_key:"svRef",ref:c,color:E(f),disabled:E(a)},null,8,["color","disabled"])],2),t.showAlpha?(v(),D(qfe,{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(npe,{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(ft),{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(b.$slots,"footer")],2)],34))}}),upe=cpe;const dpe=qt(upe),hpe=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},...F1,...xr(["ariaLabel"])}),fpe={[Mt]:t=>Ke(t)||ui(t),[dn]:t=>Ke(t)||ui(t),activeChange:t=>Ke(t)||ui(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0},ppe=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"];var mpe=fe({name:"ElColorPicker",__name:"color-picker",props:hpe,emits:fpe,setup(t,{expose:e,emit:n}){const i=t,s=n,{t:o}=Qt(),r=Be("color"),{formItem:a}=_o(),l=Ii(),c=bs(),{valueOnClear:u,isEmptyValue:d}=Y4(i,null),h=LV(i,s),{inputId:f,isLabeledByFormItem:p}=Tl(i,{formItemContext:a}),m=J(),y=J(),b=J(),k=J(!1),C=J(!1);let $=!0;const{isFocused:S,handleFocus:M,handleBlur:P}=pp(y,{disabled:c,beforeBlur(re){var ke;return(ke=m.value)==null?void 0:ke.isFocusInsideContent(re)},afterBlur(){var re;U(!1),W(),i.validateEvent&&((re=a==null?void 0:a.validate)==null||re.call(a,"blur").catch(ke=>Tt(ke)))}}),T=hie(()=>{var re;return((re=b.value)==null?void 0:re.color)??h.color}),I=Y(()=>S4(i,Object.keys($V))),L=Y(()=>!i.modelValue&&!C.value?"transparent":z(T,i.showAlpha)),R=Y(()=>!i.modelValue&&!C.value?"":T.value),V=Y(()=>p.value?void 0:i.ariaLabel||o("el.colorpicker.defaultLabel")),B=Y(()=>p.value?a==null?void 0:a.labelId:void 0),F=Y(()=>[r.b("picker"),r.is("disabled",c.value),r.bm("picker",l.value),r.is("focused",S.value)]);function z(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 U(re){k.value=re}const G=_d(U,100,{leading:!0});function K(){c.value||U(!0)}function X(){G(!1),W()}function W(){ot(()=>{i.modelValue?T.fromString(i.modelValue):(T.value="",ot(()=>{C.value=!1}))})}function Q(){c.value||(k.value&&W(),G(!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))),G(!1),ot(()=>{const ke=new ky({enableAlpha:i.showAlpha,format:i.colorFormat||"",value:i.modelValue});T.compare(ke)||W()})}function Z(){G(!1),s(Mt,u.value),s(dn,u.value),i.modelValue!==u.value&&i.validateEvent&&(a==null||a.validate("change").catch(re=>Tt(re))),W(),s("clear")}function ae(){var re,ke;(ke=(re=b==null?void 0:b.value)==null?void 0:re.inputRef)==null||ke.focus()}function ge(){k.value&&(X(),S.value&&pe())}function Ce(re){re.preventDefault(),re.stopPropagation(),U(!1),W()}function oe(re){switch(ls(re)){case Ue.enter:case Ue.numpadEnter:case Ue.space:re.preventDefault(),re.stopPropagation(),K();break;case Ue.esc:Ce(re);break}}function pe(){y.value.focus()}function ie(){y.value.blur()}return Te(()=>R.value,re=>{$&&s("activeChange",re),$=!0}),Te(()=>T.value,()=>{!i.modelValue&&!C.value&&(C.value=!0)}),Te(()=>i.modelValue,re=>{re?re&&re!==T.value&&($=!1,T.fromString(re)):C.value=!1}),Te(()=>k.value,()=>{b.value&&ot(b.value.update)}),Pt(AV,h),e({color:T,show:K,hide:X,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=>U(!1))},{content:w(()=>[Re((v(),D(E(dpe),Wt({ref_key:"pickerPanelRef",ref:b},I.value,{border:!1,"validate-event":!1,onKeydown:ut(Ce,["esc"])}),{footer:w(()=>[g("div",null,[t.clearable?(v(),D(E(He),{key:0,class:q(E(r).be("footer","link-btn")),text:"",size:"small",onClick:Z},{default:w(()=>[N(x(E(o)("el.colorpicker.clear")),1)]),_:1},8,["class"])):O("v-if",!0),_(E(He),{plain:"",size:"small",class:q(E(r).be("footer","btn")),onClick:ne},{default:w(()=>[N(x(E(o)("el.colorpicker.confirm")),1)]),_:1},8,["class"])])]),_:1},16)),[[E(Qg),ge,y.value]])]),default:w(()=>[g("div",Wt({id:E(f),ref_key:"triggerRef",ref:y},re.$attrs,{class:F.value,role:"button","aria-label":V.value,"aria-labelledby":B.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(be),{class:q([E(r).be("picker","icon"),E(r).is("icon-arrow-down")])},{default:w(()=>[_(E(Bd))]),_:1},8,["class"]),[[jt,t.modelValue||C.value]]),Re(_(E(be),{class:q([E(r).be("picker","empty"),E(r).is("icon-close")])},{default:w(()=>[_(E(Bo))]),_:1},8,["class"]),[[jt,!t.modelValue&&!C.value]])],6)],2)],2)],16,ppe)]),_:1},8,["visible","popper-class","popper-style","teleported","transition","persistent","append-to"]))}}),gpe=mpe;const Qc=qt(gpe);var vpe=fe({name:"ElContainer",__name:"container",props:{direction:{type:String,required:!1}},setup(t){const e=t,n=mi(),i=Be("container"),s=Y(()=>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(),A("section",{class:q([E(i).b(),E(i).is("vertical",s.value)])},[le(o.$slots,"default")],2))}}),_pe=vpe,ype=fe({name:"ElAside",__name:"aside",props:{width:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=Be("aside"),i=Y(()=>e.width?n.cssVarBlock({width:e.width}):{});return(s,o)=>(v(),A("aside",{class:q(E(n).b()),style:Xe(i.value)},[le(s.$slots,"default")],6))}}),OV=ype,bpe=fe({name:"ElFooter",__name:"footer",props:{height:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=Be("footer"),i=Y(()=>e.height?n.cssVarBlock({height:e.height}):{});return(s,o)=>(v(),A("footer",{class:q(E(n).b()),style:Xe(i.value)},[le(s.$slots,"default")],6))}}),DV=bpe,wpe=fe({name:"ElHeader",__name:"header",props:{height:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=Be("header"),i=Y(()=>e.height?n.cssVarBlock({height:e.height}):{});return(s,o)=>(v(),A("header",{class:q(E(n).b()),style:Xe(i.value)},[le(s.$slots,"default")],6))}}),RV=wpe,kpe=fe({name:"ElMain",__name:"main",setup(t){const e=Be("main");return(n,i)=>(v(),A("main",{class:q(E(e).b())},[le(n.$slots,"default")],2))}}),VV=kpe;const H1=qt(_pe,{Aside:OV,Footer:DV,Header:RV,Main:VV}),U1=Os(OV);Os(DV);const j1=Os(RV),jo=Os(VV),Cpe=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,...a8,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}}),h8=Symbol("rootPickerContextKey"),W1="ElIsDefaultFormat",xpe=["date","dates","year","years","month","months","week","range"],f8=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}),FV=Ge({type:{type:de(String),required:!0,values:QZ},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}}),p8=Ge({unlinkPanels:Boolean,visible:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:{type:Boolean,default:!0},border:Boolean,disabled:Boolean,parsedValue:{type:de(Array)}}),m8=t=>({type:String,values:xpe,default:t}),Spe=Ge({...FV,parsedValue:{type:de([Object,Array])},visible:{type:Boolean,default:!0},format:{type:String,default:""}}),n1=t=>{if(!Me(t))return!1;const[e,n]=t;return ht.isDayjs(e)&&ht.isDayjs(n)&&ht(e).isValid()&&ht(n).isValid()&&e.isSameOrBefore(n)},i2=(t,{lang:e,step:n=1,unit:i,unlinkPanels:s})=>{let o;if(Me(t)){let[r,a]=t.map(l=>ht(l).locale(e));return s||(a=r.add(n,i)),[r,a]}else t?o=ht(t):o=ht();return o=o.locale(e),[o,o.add(n,i)]},$pe=(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)}},Cy=(t,e,n,i)=>{const s=ht().locale(i).startOf("month").month(n).year(e).hour(t.hour()).minute(t.minute()).second(t.second());return WR(s.daysInMonth()).map(o=>s.add(o,"day").toDate())},Wf=(t,e,n,i,s)=>{const o=ht().year(e).month(n).startOf("month").hour(t.hour()).minute(t.minute()).second(t.second()),r=Cy(t,e,n,i).find(a=>!(s!=null&&s(a)));return r?ht(r).locale(i):o.locale(i)},xy=(t,e,n)=>{const i=t.year();if(!(n!=null&&n(t.toDate())))return t.locale(e);const s=t.month();if(!Cy(t,i,s,e).every(n))return Wf(t,i,s,e,n);for(let o=0;o<12;o++)if(!Cy(t,i,o,e).every(n))return Wf(t,i,o,e,n);return t},Yf=(t,e,n,i)=>{if(Me(t))return t.map(s=>Yf(s,e,n,i));if(Ke(t)){const s=i!=null&&i.value?ht(t):ht(t,e);if(!s.isValid())return s}return ht(t,e).locale(n)},Ape=Ge({...f8,showWeekNumber:Boolean,selectionMode:m8("date")}),Epe=["changerange","pick","select"],Sy=(t="")=>["normal","today"].includes(t),Mpe=(t,e)=>{const{lang:n}=Qt(),i=J(),s=J(),o=J(),r=J(),a=J([[],[],[],[],[],[]]);let l=!1;const c=t.date.$locale().weekStart||7,u=t.date.locale("en").localeData().weekdaysShort().map(X=>X.toLowerCase()),d=Y(()=>c>3?7-c:-c),h=Y(()=>{const X=t.date.startOf("month");return X.subtract(X.day()||7,"day")}),f=Y(()=>u.concat(u).slice(c,c+7)),p=Y(()=>hy(E($)).some(X=>X.isCurrent)),m=Y(()=>{const X=t.date.startOf("month");return{startOfMonthDay:X.day()||7,dateCountOfMonth:X.daysInMonth(),dateCountOfLastMonth:X.subtract(1,"month").daysInMonth()}}),y=Y(()=>t.selectionMode==="dates"?ao(t.parsedValue):[]),b=(X,{count:W,rowIndex:Q,columnIndex:ne})=>{const{startOfMonthDay:Z,dateCountOfMonth:ae,dateCountOfLastMonth:ge}=E(m),Ce=E(d);if(Q>=0&&Q<=1){const oe=Z+Ce<0?7+Z+Ce:Z+Ce;if(ne+Q*7>=oe)return X.text=W,!0;X.text=ge-(oe-ne%7)+1+Q*7,X.type="prev-month"}else return W<=ae?X.text=W:(X.text=W-ae,X.type="next-month"),!0;return!1},k=(X,{columnIndex:W,rowIndex:Q},ne)=>{const{disabledDate:Z,cellClassName:ae}=t,ge=E(y),Ce=b(X,{count:ne,rowIndex:Q,columnIndex:W}),oe=X.dayjs.toDate();return X.selected=ge.find(pe=>pe.isSame(X.dayjs,"day")),X.isSelected=!!X.selected,X.isCurrent=M(X),X.disabled=Z==null?void 0:Z(oe),X.customClass=ae==null?void 0:ae(oe),Ce},C=X=>{if(t.selectionMode==="week"){const[W,Q]=t.showWeekNumber?[1,7]:[0,6],ne=K(X[W+1]);X[W].inRange=ne,X[W].start=ne,X[Q].inRange=ne,X[Q].end=ne}},$=Y(()=>{const{minDate:X,maxDate:W,rangeState:Q,showWeekNumber:ne}=t,Z=E(d),ae=E(a),ge="day";let Ce=1;if($pe({row:6,column:7},ae,{startDate:X,columnIndexOffset:ne?1:0,nextEndDate:Q.endDate||W||Q.selecting&&X||null,now:ht().locale(E(n)).startOf(ge),unit:ge,relativeDateGetter:oe=>E(h).add(oe-Z,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 X;(X=E(i))!=null&&X.contains(document.activeElement)&&(await ot(),await S())});const S=async()=>{var X;return(X=E(s))==null?void 0:X.focus()},M=X=>t.selectionMode==="date"&&Sy(X.type)&&P(X,t.parsedValue),P=(X,W)=>W?ht(W).locale(E(n)).isSame(t.date.date(Number(X.text)),"day"):!1,T=(X,W)=>{const Q=E(m).startOfMonthDay,ne=E(d),Z=Q+ne<0?7+Q+ne:Q+ne,ae=X*7+(W-(t.showWeekNumber?1:0));return t.date.startOf("month").subtract(Z,"day").add(ae,"day")},I=X=>{var Z;if(!t.rangeState.selecting)return;let W=X.target;if(W.tagName==="SPAN"&&(W=(Z=W.parentNode)==null?void 0:Z.parentNode),W.tagName==="DIV"&&(W=W.parentNode),W.tagName!=="TD")return;const Q=W.parentNode.rowIndex-1,ne=W.cellIndex;E($)[Q][ne].disabled||(Q!==E(o)||ne!==E(r))&&(o.value=Q,r.value=ne,e("changerange",{selecting:!0,endDate:T(Q,ne)}))},L=X=>!E(p)&&(X==null?void 0:X.text)===1&&Sy(X.type)||X.isCurrent,R=X=>{l||E(p)||t.selectionMode!=="date"||G(X,!0)},V=X=>{X.target.closest("td")&&(l=!0)},B=X=>{X.target.closest("td")&&(l=!1)},F=X=>{!t.rangeState.selecting||!t.minDate?(e("pick",{minDate:X,maxDate:null}),e("select",!0)):(X>=t.minDate?e("pick",{minDate:t.minDate,maxDate:X}):e("pick",{minDate:X,maxDate:t.minDate}),e("select",!1))},z=X=>{const W=X.week(),Q=`${X.year()}w${W}`;e("pick",{year:X.year(),week:W,value:Q,date:X.startOf("week")})},U=(X,W)=>{e("pick",W?ao(t.parsedValue).filter(Q=>(Q==null?void 0:Q.valueOf())!==X.valueOf()):ao(t.parsedValue).concat([X]))},G=(X,W=!1)=>{if(t.disabled)return;const Q=X.target.closest("td");if(!Q)return;const ne=Q.parentNode.rowIndex-1,Z=Q.cellIndex,ae=E($)[ne][Z];if(ae.disabled||ae.type==="week")return;const ge=T(ne,Z);switch(t.selectionMode){case"range":F(ge);break;case"date":e("pick",ge,W);break;case"week":z(ge);break;case"dates":U(ge,!!ae.selected);break}},K=X=>{if(t.selectionMode!=="week")return!1;let W=t.date.startOf("day");if(X.type==="prev-month"&&(W=W.subtract(1,"month")),X.type==="next-month"&&(W=W.add(1,"month")),W=W.date(Number.parseInt(X.text,10)),t.parsedValue&&!Me(t.parsedValue)){const Q=(t.parsedValue.day()-c+7)%7-1;return t.parsedValue.subtract(Q,"day").isSame(W,"day")}return!1};return{WEEKS:f,rows:$,tbodyRef:i,currentCellRef:s,focus:S,isCurrent:M,isWeekActive:K,isSelectedCell:L,handlePickDate:G,handleMouseUp:B,handleMouseDown:V,handleMouseMove:I,handleFocus:R}},Tpe=(t,{isCurrent:e,isWeekActive:n})=>{const i=Be("date-table"),{t:s}=Qt(),o=Y(()=>[i.b(),i.is("week-mode",t.selectionMode==="week"&&!t.disabled)]),r=Y(()=>s("el.datepicker.dateTablePrompt")),a=c=>{const u=[];return Sy(c.type)&&!c.disabled?(u.push("available"),c.type==="today"&&u.push("today")):u.push(c.type),e(c)&&u.push("current"),c.inRange&&(Sy(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}},Ppe=Ge({cell:{type:de(Object)}});var g8=fe({name:"ElDatePickerCell",props:Ppe,setup(t){const e=Be("date-table-cell"),{slots:n}=qe(h8);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 Ipe=["aria-label"],Lpe=["aria-label"],Ope=["aria-current","aria-selected","tabindex","aria-disabled"];var Dpe=fe({__name:"basic-date-table",props:Ape,emits:Epe,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:y}=Mpe(i,n),{tableLabel:b,tableKls:k,getCellClasses:C,getRowKls:$,weekHeaderClass:S,t:M}=Tpe(i,{isCurrent:c,isWeekActive:u});let P=!1;return wn(()=>{P=!0}),e({focus:l}),(T,I)=>(v(),A("table",{"aria-label":E(b),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(),A("th",{key:0,scope:"col",class:q(E(S))},null,2)):O("v-if",!0),(v(!0),A(ee,null,we(E(s),(L,R)=>(v(),A("th",{key:R,"aria-label":E(M)("el.datepicker.weeksFull."+L),scope:"col"},x(E(M)("el.datepicker.weeks."+L)),9,Lpe))),128))]),(v(!0),A(ee,null,we(E(o),(L,R)=>(v(),A("tr",{key:R,class:q(E($)(T.showWeekNumber?L[2]:L[1]))},[(v(!0),A(ee,null,we(L,(V,B)=>(v(),A("td",{key:`${R}.${B}`,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(y)&&E(y)(...F))},[_(E(g8),{cell:V},null,8,["cell"])],42,Ope))),128))],2))),128))],512)],42,Ipe))}}),SC=Dpe;const Rpe=Ge({...f8,selectionMode:m8("month")}),Vpe=["aria-label"],Fpe=["aria-selected","aria-label","tabindex","onKeydown"];var Npe=fe({__name:"basic-month-table",props:Rpe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const i=t,s=n,o=Be("month-table"),{t:r,lang:a}=Qt(),l=J(),c=J(),u=J(i.date.locale("en").localeData().monthsShort().map($=>$.toLowerCase())),d=J([[],[],[]]),h=J(),f=J(),p=Y(()=>{var M,P,T;const $=d.value,S=ht().locale(a.value).startOf("month");for(let I=0;I<3;I++){const L=$[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 B=I*4+R,F=i.date.startOf("year").month(B),z=i.rangeState.endDate||i.maxDate||i.rangeState.selecting&&i.minDate||null;V.inRange=!!(i.minDate&&F.isSameOrAfter(i.minDate,"month")&&z&&F.isSameOrBefore(z,"month"))||!!(i.minDate&&F.isSameOrBefore(i.minDate,"month")&&z&&F.isSameOrAfter(z,"month")),(M=i.minDate)!=null&&M.isSameOrAfter(z)?(V.start=!!(z&&F.isSame(z,"month")),V.end=i.minDate&&F.isSame(i.minDate,"month")):(V.start=!!(i.minDate&&F.isSame(i.minDate,"month")),V.end=!!(z&&F.isSame(z,"month"))),S.isSame(F)&&(V.type="today");const U=F.toDate();V.text=B,V.disabled=((P=i.disabledDate)==null?void 0:P.call(i,U))||!1,V.date=U,V.customClass=(T=i.cellClassName)==null?void 0:T.call(i,U),V.dayjs=F,V.timestamp=F.valueOf(),V.isSelected=b(V)}}return $}),m=()=>{var $;($=c.value)==null||$.focus()},y=$=>{const S={},M=i.date.year(),P=new Date,T=$.text;return S.disabled=i.disabled||(i.disabledDate?Cy(i.date,M,T,a.value).every(i.disabledDate):!1),S.current=ao(i.parsedValue).some(I=>ht.isDayjs(I)&&I.year()===M&&I.month()===T),S.today=P.getFullYear()===M&&P.getMonth()===T,$.customClass&&(S[$.customClass]=!0),$.inRange&&(S["in-range"]=!0,$.start&&(S["start-date"]=!0),$.end&&(S["end-date"]=!0)),S},b=$=>{const S=i.date.year(),M=$.text;return ao(i.date).some(P=>P.year()===S&&P.month()===M)},k=$=>{var T;if(!i.rangeState.selecting)return;let S=$.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=$=>{var I;if(i.disabled)return;const S=(I=$.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($.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([ht(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 $,S;($=l.value)!=null&&$.contains(document.activeElement)&&(await ot(),(S=c.value)==null||S.focus())}),e({focus:m}),($,S)=>(v(),A("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),A(ee,null,we(p.value,(M,P)=>(v(),A("tr",{key:P},[(v(!0),A(ee,null,we(M,(T,I)=>(v(),A("td",{key:I,ref_for:!0,ref:L=>T.isSelected&&(c.value=L),class:q(y(T)),"aria-selected":!!T.isSelected,"aria-label":E(r)(`el.datepicker.month${+T.text+1}`),tabindex:T.isSelected?0:-1,onKeydown:[ut(Ee(C,["prevent","stop"]),["space"]),ut(Ee(C,["prevent","stop"]),["enter"])]},[_(E(g8),{cell:{...T,renderText:E(r)("el.datepicker.months."+u.value[T.text])}},null,8,["cell"])],42,Fpe))),128))]))),128))],512)],42,Vpe))}}),s1=Npe;const Bpe=Ge({...f8,selectionMode:m8("year")}),zpe=["aria-label"],Hpe=["aria-selected","aria-label","tabindex","onKeydown"];var Upe=fe({__name:"basic-year-table",props:Bpe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const i=(S,M)=>{const P=ht(String(S)).locale(M).startOf("year");return WR(P.endOf("year").dayOfYear()).map(T=>P.add(T,"day").toDate())},s=t,o=n,r=Be("year-table"),{t:a,lang:l}=Qt(),c=J(),u=J(),d=Y(()=>Math.floor(s.date.year()/10)*10),h=J([[],[],[]]),f=J(),p=J(),m=Y(()=>{var P,T,I;const S=h.value,M=ht().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 B=R[V];B||(B={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}),B.type="normal";const F=L*4+V+d.value,z=ht().year(F),U=s.rangeState.endDate||s.maxDate||s.rangeState.selecting&&s.minDate||null;B.inRange=!!(s.minDate&&z.isSameOrAfter(s.minDate,"year")&&U&&z.isSameOrBefore(U,"year"))||!!(s.minDate&&z.isSameOrBefore(s.minDate,"year")&&U&&z.isSameOrAfter(U,"year")),(P=s.minDate)!=null&&P.isSameOrAfter(U)?(B.start=!!(U&&z.isSame(U,"year")),B.end=!!(s.minDate&&z.isSame(s.minDate,"year"))):(B.start=!!(s.minDate&&z.isSame(s.minDate,"year")),B.end=!!(U&&z.isSame(U,"year"))),M.isSame(z)&&(B.type="today"),B.text=F;const G=z.toDate();B.disabled=((T=s.disabledDate)==null?void 0:T.call(s,G))||!1,B.date=G,B.customClass=(I=s.cellClassName)==null?void 0:I.call(s,G),B.dayjs=z,B.timestamp=z.valueOf(),B.isSelected=k(B),R[V]=B}}return S}),y=()=>{var S;(S=u.value)==null||S.focus()},b=S=>{const M={},P=ht().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=ht().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=xy(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)},$=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:ht().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:y}),(S,M)=>(v(),A("table",{role:"grid","aria-label":E(a)("el.datepicker.yearTablePrompt"),class:q(E(r).b()),onClick:C,onMousemove:$},[g("tbody",{ref_key:"tbodyRef",ref:c},[(v(!0),A(ee,null,we(m.value,(P,T)=>(v(),A("tr",{key:T},[(v(!0),A(ee,null,we(P,(I,L)=>(v(),A("td",{key:`${T}_${L}`,ref_for:!0,ref:R=>I.isSelected&&(u.value=R),class:q(["available",b(I)]),"aria-selected":I.isSelected,"aria-label":String(I.text),tabindex:I.isSelected?0:-1,onKeydown:[ut(Ee(C,["prevent","stop"]),["space"]),ut(Ee(C,["prevent","stop"]),["enter"])]},[_(E(g8),{cell:I},null,8,["cell"])],42,Hpe))),128))]))),128))],512)],42,zpe))}}),i1=Upe;const jpe=["disabled","onClick"],Wpe=["aria-label","disabled"],Ype=["aria-label","disabled"],qpe=["tabindex","aria-disabled"],Gpe=["tabindex","aria-disabled"],Xpe=["aria-label","disabled"],Kpe=["aria-label","disabled"];var Zpe=fe({__name:"panel-date-pick",props:Spe,emits:["pick","set-picker-option","panel-change"],setup(t,{emit:e}){const n=(_e,Oe,ce)=>!0,i=t,s=e,o=Be("picker-panel"),r=Be("date-picker"),a=Dd(),l=mi(),{t:c,lang:u}=Qt(),d=qe(Ia),h=qe(W1,void 0),{shortcuts:f,disabledDate:p,cellClassName:m,defaultTime:y}=d.props,b=Sn(d.props,"defaultValue"),k=J(),C=J(ht().locale(u.value)),$=J(!1);let S=!1;const M=Y(()=>ht(y).locale(u.value)),P=Y(()=>C.value.month()),T=Y(()=>C.value.year()),I=J([]),L=J(null),R=J(null),V=_e=>I.value.length>0?n(_e,I.value,i.format||"HH:mm:ss"):!0,B=_e=>y&&!Le.value&&!$.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?Me(_e)?s("pick",_e.map(B),...Oe):s("pick",B(_e),...Oe):s("pick",_e,...Oe),L.value=null,R.value=null,$.value=!1,S=!1},z=async(_e,Oe)=>{if(Q.value==="date"&&ht.isDayjs(_e)){const ce=Gp(i.parsedValue);let De=ce?ce.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)},U=_e=>{const Oe=_e?"add":"subtract";C.value=C.value[Oe](1,"month"),mt("month")},G=_e=>{const Oe=C.value,ce=_e?"add":"subtract";C.value=K.value==="year"?Oe[ce](10,"year"):Oe[ce](1,"year"),mt("year")},K=J("date"),X=Y(()=>{const _e=c("el.datepicker.year");if(K.value==="year"){const Oe=Math.floor(T.value/10)*10;return _e?`${Oe} ${_e} - ${Oe+9} ${_e}`:`${Oe} - ${Oe+9}`}return`${T.value} ${_e}`}),W=_e=>{const Oe=et(_e.value)?_e.value():_e.value;if(Oe){S=!0,F(ht(Oe).locale(u.value));return}_e.onClick&&_e.onClick({attrs:a,slots:l,emit:s})},Q=Y(()=>{const{type:_e}=i;return["week","month","months","year","years","dates"].includes(_e)?_e:"date"}),ne=Y(()=>Q.value==="dates"||Q.value==="months"||Q.value==="years"),Z=Y(()=>Q.value==="date"?K.value:Q.value),ae=Y(()=>!!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),K.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=xy(C.value.startOf("year").year(_e),u.value,p),F(C.value,!1)):Q.value==="years"?F(_e,Oe??!0):(C.value=xy(C.value.year(_e),u.value,p),K.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||(K.value=_e,await ot(),_t())},ie=Y(()=>i.type==="datetime"||i.type==="datetimerange"),re=Y(()=>{const _e=ie.value||Q.value==="dates",Oe=Q.value==="years",ce=Q.value==="months",De=K.value==="date",gt=K.value==="year",bn=K.value==="month";return _e&&De||Oe&&gt||ce&&bn}),ke=Y(()=>!ne.value&&i.showNow||i.showConfirm),je=Y(()=>p?i.parsedValue?Me(i.parsedValue)?p(i.parsedValue[0].toDate()):p(i.parsedValue.toDate()):!0:!1),te=()=>{if(ne.value)F(i.parsedValue);else{let _e=Gp(i.parsedValue);if(!_e){const Oe=ht(y).locale(u.value),ce=Ie();_e=Oe.year(ce.year()).month(ce.month()).date(ce.date())}C.value=_e,F(_e)}},se=Y(()=>p?p(ht().locale(u.value).toDate()):!1),me=()=>{const _e=ht().locale(u.value).toDate();$.value=!0,(!p||!p(_e))&&V(_e)&&(C.value=ht().locale(u.value),F(C.value))},$e=Y(()=>i.timeFormat||qR(i.format)||Jg),Se=Y(()=>i.dateFormat||YR(i.format)||mc),Le=Y(()=>{if(R.value)return R.value;if(!(!i.parsedValue&&!b.value))return(Gp(i.parsedValue)||C.value).format($e.value)}),We=Y(()=>{if(L.value)return L.value;if(!(!i.parsedValue&&!b.value))return(Gp(i.parsedValue)||C.value).format(Se.value)}),Fe=J(!1),ze=()=>{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,ce)=>{const{hour:De,minute:gt,second:bn}=Ze(_e),gs=Gp(i.parsedValue);C.value=gs?gs.hour(De).minute(gt).second(bn):_e,F(C.value,!0),ce||(Fe.value=Oe)},it=_e=>{const Oe=ht(_e,$e.value).locale(u.value);if(Oe.isValid()&&V(Oe)){const{year:ce,month:De,date:gt}=Ze(C.value);C.value=Oe.year(ce).month(De).date(gt),R.value=null,Fe.value=!1,F(C.value,!0)}},ye=_e=>{const Oe=Yf(_e,Se.value,u.value,h);if(Oe.isValid()){if(p&&p(Oe.toDate()))return;const{hour:ce,minute:De,second:gt}=Ze(C.value);C.value=Oe.hour(ce).minute(De).second(gt),L.value=null,F(C.value,!0)}},ve=_e=>ht.isDayjs(_e)&&_e.isValid()&&(p?!p(_e.toDate()):!0),Pe=_e=>Yf(_e,i.format,u.value,h),Ie=()=>{const _e=ht(b.value).locale(u.value);if(!b.value){const Oe=M.value;return ht().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:ce,left:De,right:gt,home:bn,end:gs,pageUp:du,pageDown:Vp}=Ue,Vl={year:{[Oe]:-4,[ce]:4,[De]:-1,[gt]:1,offset:($n,Di)=>$n.setFullYear($n.getFullYear()+Di)},month:{[Oe]:-4,[ce]:4,[De]:-1,[gt]:1,offset:($n,Di)=>$n.setMonth($n.getMonth()+Di)},week:{[Oe]:-1,[ce]:1,[De]:-1,[gt]:1,offset:($n,Di)=>$n.setDate($n.getDate()+Di*7)},date:{[Oe]:-7,[ce]:7,[De]:-1,[gt]:1,[bn]:$n=>-$n.getDay(),[gs]:$n=>-$n.getDay()+6,[du]:$n=>-new Date($n.getFullYear(),$n.getMonth(),0).getDate(),[Vp]:$n=>new Date($n.getFullYear(),$n.getMonth()+1,0).getDate(),offset:($n,Di)=>$n.setDate($n.getDate()+Di)}},ca=C.value.toDate();for(;Math.abs(C.value.diff(ca,"year",!0))<1;){const $n=Vl[Z.value];if(!$n)return;if($n.offset(ca,et($n[_e])?$n[_e](ca):$n[_e]??0),p&&p(ca))break;const Di=ht(ca).locale(u.value);C.value=Di,s("pick",Di,!0);break}},mt=_e=>{s("panel-change",C.value.toDate(),_e,K.value)};return Te(()=>Q.value,_e=>{if(["month","year"].includes(_e)){K.value=_e;return}else if(_e==="years"){K.value="year";return}else if(_e==="months"){K.value="month";return}K.value="date"},{immediate:!0}),Te(()=>b.value,_e=>{_e&&(C.value=Ie())},{immediate:!0}),Te(()=>i.parsedValue,_e=>{if(_e){if(ne.value||Me(_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(),A("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(),A("div",{key:0,class:q(E(o).e("sidebar"))},[(v(!0),A(ee,null,we(E(f),(ce,De)=>(v(),A("button",{key:De,type:"button",disabled:E(oe),class:q(E(o).e("shortcut")),onClick:gt=>W(ce)},x(ce.text),11,jpe))),128))],2)):O("v-if",!0),g("div",{class:q(E(o).e("body"))},[ie.value?(v(),A("div",{key:0,class:q(E(r).e("time-header"))},[g("span",{class:q(E(r).e("editor-wrap"))},[_(E(ft),{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]=ce=>L.value=ce),onChange:ye},null,8,["placeholder","model-value","disabled","readonly"])],2),Re((v(),A("span",{class:q(E(r).e("editor-wrap"))},[_(E(ft),{placeholder:E(c)("el.datepicker.selectTime"),"model-value":Le.value,size:"small","validate-event":!1,disabled:E(oe),readonly:!_e.editable,onFocus:ze,onInput:Oe[1]||(Oe[1]=ce=>R.value=ce),onChange:it},null,8,["placeholder","model-value","disabled","readonly"]),_(E(wC),{visible:Fe.value,format:$e.value,"parsed-value":C.value,onPick:Ye},null,8,["visible","format","parsed-value"])],2)),[[E(Qg),Ae]])],2)):O("v-if",!0),Re(g("div",{class:q([E(r).e("header"),(K.value==="year"||K.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]=ce=>G(!1))},[le(_e.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(zc))]),_:1})])],10,Wpe),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]=ce=>U(!1))},[le(_e.$slots,"prev-month",{},()=>[_(E(be),null,{default:w(()=>[_(E(bd))]),_:1})])],10,Ype),[[jt,K.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(ce=>pe("year"),["enter"])),onClick:Oe[5]||(Oe[5]=ce=>pe("year"))},x(X.value),43,qpe),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:K.value==="month"}]),onKeydown:Oe[6]||(Oe[6]=ut(ce=>pe("month"),["enter"])),onClick:Oe[7]||(Oe[7]=ce=>pe("month"))},x(E(c)(`el.datepicker.month${P.value+1}`)),43,Gpe),[[jt,K.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]=ce=>U(!0))},[le(_e.$slots,"next-month",{},()=>[_(E(be),null,{default:w(()=>[_(E(Hr))]),_:1})])],10,Xpe),[[jt,K.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]=ce=>G(!0))},[le(_e.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Hc))]),_:1})])],10,Kpe)],2)],2),[[jt,K.value!=="time"]]),g("div",{class:q(E(o).e("content")),onKeydown:Je},[K.value==="date"?(v(),D(SC,{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:z},null,8,["selection-mode","date","parsed-value","disabled-date","disabled","cell-class-name","show-week-number"])):O("v-if",!0),K.value==="year"?(v(),D(i1,{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),K.value==="month"?(v(),D(s1,{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(),A("div",{key:0,class:q(E(o).e("footer"))},[Re(_(E(He),{text:"",size:"small",class:q(E(o).e("link-btn")),disabled:se.value,onClick:me},{default:w(()=>[N(x(E(c)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[jt,!ne.value&&_e.showNow]]),_e.showConfirm?(v(),D(E(He),{key:0,plain:"",size:"small",class:q(E(o).e("link-btn")),disabled:je.value,onClick:te},{default:w(()=>[N(x(E(c)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])):O("v-if",!0)],2)):O("v-if",!0)],2))}}),Jpe=Zpe;const Qpe=Ge({...FV,...p8}),eme=t=>{const{emit:e}=pt(),n=Dd(),i=mi();return o=>{const r=et(o.value)?o.value():o.value;if(r){e("pick",[ht(r[0]).locale(t.value),ht(r[1]).locale(t.value)]);return}o.onClick&&o.onClick({attrs:n,slots:i,emit:e})}},v8=(t,{defaultValue:e,defaultTime:n,leftDate:i,rightDate:s,step:o,unit:r,sortDates:a})=>{const{emit:l}=pt(),{pickerNs:c}=qe(h8),u=Be("date-range-picker"),{t:d,lang:h}=Qt(),f=eme(h),p=J(),m=J(),y=J({endDate:null,selecting:!1}),b=M=>{y.value=M},k=(M=!1)=>{const P=E(p),T=E(m);n1([P,T])&&l("pick",[P,T],M)},C=M=>{y.value.selecting=M,M||(y.value.endDate=null)},$=M=>{if(Me(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]=i2(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(Me(I)){const[V,B]=I.map(ht);L=T(V),R=T(B)}else{const V=T(ht(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]))&&$(M)},{immediate:!0}),Te(()=>t.visible,()=>{t.visible&&$(t.parsedValue)},{immediate:!0}),{minDate:p,maxDate:m,rangeState:y,lang:h,ppNs:c,drpNs:u,handleChangeRange:b,handleRangeConfirm:k,handleShortcutClick:f,onSelect:C,parseValue:$,t:d}},tme=(t,e,n,i)=>{const s=J("date"),o=J(),r=J("date"),a=J(),{disabledDate:l}=qe(Ia).props,{t:c,lang:u}=Qt(),d=Y(()=>n.value.year()),h=Y(()=>n.value.month()),f=Y(()=>i.value.year()),p=Y(()=>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 y(S){S==null||S.focus()}async function b(S,M){if(t.disabled)return;const P=S==="left"?s:r,T=S==="left"?o:a;P.value=M,await ot(),y(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=xy(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(),y(V.value),C(S)}function C(S){e("panel-change",[n.value.toDate(),i.value.toDate()],S)}function $(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:Y(()=>m(s,d)),rightYearLabel:Y(()=>m(r,f)),showLeftPicker:S=>b("left",S),showRightPicker:S=>b("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:$}},nme=["disabled","onClick"],sme=["aria-label","disabled"],ime=["aria-label","disabled"],ome=["disabled","aria-label"],rme=["disabled","aria-label"],ame=["tabindex","aria-disabled"],lme=["tabindex","aria-disabled"],cme=["disabled","aria-label"],ume=["disabled","aria-label"],dme=["aria-label","disabled"],hme=["disabled","aria-label"],fme=["tabindex","aria-disabled"],pme=["tabindex","aria-disabled"],s0="month";var mme=fe({__name:"panel-date-range",props:Qpe,emits:["pick","set-picker-option","calendar-change","panel-change","clear"],setup(t,{emit:e}){const n=t,i=e,s=qe(Ia),o=qe(W1,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}=Qt(),p=J(ht().locale(f.value)),m=J(ht().locale(f.value).add(1,s0)),{minDate:y,maxDate:b,rangeState:k,ppNs:C,drpNs:$,handleChangeRange:S,handleRangeConfirm:M,handleShortcutClick:P,onSelect:T,parseValue:I,t:L}=v8(n,{defaultValue:h,defaultTime:l,leftDate:p,rightDate:m,unit:s0,sortDates:Di});Te(()=>n.visible,nt=>{!nt&&k.value.selecting&&(I(n.parsedValue),T(!1))});const R=J({min:null,max:null}),V=J({min:null,max:null}),{leftCurrentView:B,rightCurrentView:F,leftCurrentViewRef:z,rightCurrentViewRef:U,leftYear:G,rightYear:K,leftMonth:X,rightMonth:W,leftYearLabel:Q,rightYearLabel:ne,showLeftPicker:Z,showRightPicker:ae,handleLeftYearPick:ge,handleRightYearPick:Ce,handleLeftMonthPick:oe,handleRightMonthPick:pe,handlePanelChange:ie,adjustDateByView:re}=tme(n,i,p,m),ke=Y(()=>!!d.value.length),je=Y(()=>R.value.min!==null?R.value.min:y.value?y.value.format(Se.value):""),te=Y(()=>R.value.max!==null?R.value.max:b.value||y.value?(b.value||y.value).format(Se.value):""),se=Y(()=>V.value.min!==null?V.value.min:y.value?y.value.format($e.value):""),me=Y(()=>V.value.max!==null?V.value.max:b.value||y.value?(b.value||y.value).format($e.value):""),$e=Y(()=>n.timeFormat||qR(u.value||"")||Jg),Se=Y(()=>n.dateFormat||YR(u.value||"")||mc),Le=nt=>n1(nt)&&(r?!r(nt[0].toDate())&&!r(nt[1].toDate()):!0),We=()=>{p.value=re(B.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")},ze=()=>{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(B.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")},ye=()=>{m.value=m.value.subtract(1,"month"),ie("month")},ve=Y(()=>{const nt=(X.value+1)%12,at=X.value+1>=12?1:0;return n.unlinkPanels&&new Date(G.value+at,nt)<new Date(K.value,W.value)}),Pe=Y(()=>n.unlinkPanels&&K.value*12+W.value-(G.value*12+X.value+1)>=12),Ie=bs(),_t=Y(()=>!(y.value&&b.value&&!k.value.selecting&&n1([y.value,b.value])&&!Ie.value)),Lt=Y(()=>n.type==="datetime"||n.type==="datetimerange"),Je=(nt,at)=>{if(nt)return l?ht(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),hu=Je(Ko,1);b.value===hu&&y.value===Fl||(i("calendar-change",[vt.toDate(),Ko&&Ko.toDate()]),b.value=hu,y.value=Fl,!Lt.value&&at&&(at=!Fl||!hu),M(at))},mt=J(!1),_e=J(!1),Oe=()=>{mt.value=!1},ce=()=>{_e.value=!1},De=(nt,at)=>{R.value[at]=nt;const vt=ht(nt,Se.value).locale(f.value);if(vt.isValid()){if(r&&r(vt.toDate()))return;at==="min"?(p.value=vt,y.value=(y.value||p.value).year(vt.year()).month(vt.month()).date(vt.date()),!n.unlinkPanels&&(!b.value||b.value.isBefore(y.value))&&(m.value=vt.add(1,"month"),b.value=y.value.add(1,"month"))):(m.value=vt,b.value=(b.value||m.value).year(vt.year()).month(vt.month()).date(vt.date()),!n.unlinkPanels&&(!y.value||y.value.isAfter(b.value))&&(p.value=vt.subtract(1,"month"),y.value=b.value.subtract(1,"month"))),Di(y.value,b.value),M(!0)}},gt=(nt,at)=>{R.value[at]=null},bn=(nt,at)=>{V.value[at]=nt;const vt=ht(nt,$e.value).locale(f.value);vt.isValid()&&(at==="min"?(mt.value=!0,y.value=(y.value||p.value).hour(vt.hour()).minute(vt.minute()).second(vt.second()),p.value=y.value):(_e.value=!0,b.value=(b.value||m.value).hour(vt.hour()).minute(vt.minute()).second(vt.second()),m.value=b.value))},gs=(nt,at)=>{V.value[at]=null,at==="min"?(p.value=y.value,mt.value=!1,(!b.value||b.value.isBefore(y.value))&&(b.value=y.value)):(m.value=b.value,_e.value=!1,b.value&&b.value.isBefore(y.value)&&(y.value=b.value)),M(!0)},du=(nt,at,vt)=>{V.value.min||(nt&&(y.value=(y.value||p.value).hour(nt.hour()).minute(nt.minute()).second(nt.second())),vt||(mt.value=at),(!b.value||b.value.isBefore(y.value))&&(b.value=y.value,m.value=nt,ot(()=>{I(n.parsedValue)})),M(!0))},Vp=(nt,at,vt)=>{V.value.max||(nt&&(b.value=(b.value||m.value).hour(nt.hour()).minute(nt.minute()).second(nt.second())),vt||(_e.value=at),b.value&&b.value.isBefore(y.value)&&(y.value=b.value),M(!0))},Vl=()=>{ca(),i("clear")},ca=()=>{let nt=null;s!=null&&s.emptyValues&&(nt=s.emptyValues.valueOnClear.value),p.value=i2(E(h),{lang:E(f),unit:"month",unlinkPanels:n.unlinkPanels})[0],m.value=p.value.add(1,"month"),b.value=void 0,y.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(),hu=at.month();m.value=vt===Fl&&Ko===hu?at.add(1,s0):at}else m.value=p.value.add(1,s0),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",ca]),(nt,at)=>(v(),A("div",{class:q([E(C).b(),E($).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(),A("div",{key:0,class:q(E(C).e("sidebar"))},[(v(!0),A(ee,null,we(d.value,(vt,Ko)=>(v(),A("button",{key:Ko,type:"button",disabled:E(Ie),class:q(E(C).e("shortcut")),onClick:Fl=>E(P)(vt)},x(vt.text),11,nme))),128))],2)):O("v-if",!0),g("div",{class:q(E(C).e("body"))},[Lt.value?(v(),A("div",{key:0,class:q(E($).e("time-header"))},[g("span",{class:q(E($).e("editors-wrap"))},[g("span",{class:q(E($).e("time-picker-wrap"))},[_(E(ft),{size:"small",disabled:E(k).selecting||E(Ie),placeholder:E(L)("el.datepicker.startDate"),class:q(E($).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(),A("span",{class:q(E($).e("time-picker-wrap"))},[_(E(ft),{size:"small",class:q(E($).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(wC),{visible:mt.value,format:$e.value,"datetime-role":"start","parsed-value":E(y)||p.value,onPick:du},null,8,["visible","format","parsed-value"])],2)),[[E(Qg),Oe]])],2),g("span",null,[_(E(be),null,{default:w(()=>[_(E(Hr))]),_:1})]),g("span",{class:q([E($).e("editors-wrap"),"is-right"])},[g("span",{class:q(E($).e("time-picker-wrap"))},[_(E(ft),{size:"small",class:q(E($).e("editor")),disabled:E(k).selecting||E(Ie),placeholder:E(L)("el.datepicker.endDate"),"model-value":te.value,readonly:!E(y)||!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(),A("span",{class:q(E($).e("time-picker-wrap"))},[_(E(ft),{size:"small",class:q(E($).e("editor")),disabled:E(k).selecting||E(Ie),placeholder:E(L)("el.datepicker.endTime"),"model-value":me.value,readonly:!E(y)||!nt.editable,"validate-event":!1,onFocus:at[7]||(at[7]=vt=>E(y)&&(_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(wC),{"datetime-role":"end",visible:_e.value,format:$e.value,"parsed-value":E(b)||m.value,onPick:Vp},null,8,["visible","format","parsed-value"])],2)),[[E(Qg),ce]])],2)],2)):O("v-if",!0),g("div",{class:q([[E(C).e("content"),E($).e("content")],"is-left"])},[g("div",{class:q(E($).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(be),null,{default:w(()=>[_(E(zc))]),_:1})])],10,sme),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(be),null,{default:w(()=>[_(E(bd))]),_:1})])],10,ime),[[jt,E(B)==="date"]]),nt.unlinkPanels?(v(),A("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(be),null,{default:w(()=>[_(E(Hc))]),_:1})])],10,ome)):O("v-if",!0),nt.unlinkPanels&&E(B)==="date"?(v(),A("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(be),null,{default:w(()=>[_(E(Hr))]),_:1})])],10,rme)):O("v-if",!0),g("div",null,[g("span",{role:"button",class:q(E($).e("header-label")),"aria-live":"polite",tabindex:nt.disabled?void 0:0,"aria-disabled":nt.disabled,onKeydown:at[10]||(at[10]=ut(vt=>E(Z)("year"),["enter"])),onClick:at[11]||(at[11]=vt=>E(Z)("year"))},x(E(Q)),43,ame),Re(g("span",{role:"button","aria-live":"polite",tabindex:nt.disabled?void 0:0,"aria-disabled":nt.disabled,class:q([E($).e("header-label"),{active:E(B)==="month"}]),onKeydown:at[12]||(at[12]=ut(vt=>E(Z)("month"),["enter"])),onClick:at[13]||(at[13]=vt=>E(Z)("month"))},x(E(L)(`el.datepicker.month${p.value.month()+1}`)),43,lme),[[jt,E(B)==="date"]])])],2),E(B)==="date"?(v(),D(SC,{key:0,ref_key:"leftCurrentViewRef",ref:z,"selection-mode":"range",date:p.value,"min-date":E(y),"max-date":E(b),"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(B)==="year"?(v(),D(i1,{key:1,ref_key:"leftCurrentViewRef",ref:z,"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(B)==="month"?(v(),D(s1,{key:2,ref_key:"leftCurrentViewRef",ref:z,"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($).e("content")],"is-right"])},[g("div",{class:q(E($).e("header"))},[nt.unlinkPanels?(v(),A("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(be),null,{default:w(()=>[_(E(zc))]),_:1})])],10,cme)):O("v-if",!0),nt.unlinkPanels&&E(F)==="date"?(v(),A("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:ye},[le(nt.$slots,"prev-month",{},()=>[_(E(be),null,{default:w(()=>[_(E(bd))]),_:1})])],10,ume)):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:ze},[le(nt.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Hc))]),_:1})])],10,dme),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(be),null,{default:w(()=>[_(E(Hr))]),_:1})])],10,hme),[[jt,E(F)==="date"]]),g("div",null,[g("span",{role:"button",class:q(E($).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,fme),Re(g("span",{role:"button","aria-live":"polite",tabindex:nt.disabled?void 0:0,"aria-disabled":nt.disabled,class:q([E($).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,pme),[[jt,E(F)==="date"]])])],2),E(F)==="date"?(v(),D(SC,{key:0,ref_key:"rightCurrentViewRef",ref:U,"selection-mode":"range",date:m.value,"min-date":E(y),"max-date":E(b),"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(i1,{key:1,ref_key:"rightCurrentViewRef",ref:U,"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(s1,{key:2,ref_key:"rightCurrentViewRef",ref:U,"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(),A("div",{key:0,class:q(E(C).e("footer"))},[E(c)?(v(),D(E(He),{key:0,text:"",size:"small",class:q(E(C).e("link-btn")),onClick:Vl},{default:w(()=>[N(x(E(L)("el.datepicker.clear")),1)]),_:1},8,["class"])):O("v-if",!0),nt.showConfirm?(v(),D(E(He),{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:w(()=>[N(x(E(L)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])):O("v-if",!0)],2)):O("v-if",!0)],2))}}),gme=mme;const vme=Ge({...p8}),_me=["pick","set-picker-option","calendar-change"],yme=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const{t:i}=Qt();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:Y(()=>`${e.value.year()} ${i("el.datepicker.year")}`),rightLabel:Y(()=>`${n.value.year()} ${i("el.datepicker.year")}`),leftYear:Y(()=>e.value.year()),rightYear:Y(()=>n.value.year()===e.value.year()?e.value.year()+1:n.value.year())}},bme=["disabled","onClick"],wme=["disabled"],kme=["disabled"],Cme=["disabled"],xme=["disabled"],i0="year";var Sme=fe({name:"DatePickerMonthRange",__name:"panel-month-range",props:vme,emits:_me,setup(t,{emit:e}){const n=t,i=e,{lang:s}=Qt(),o=qe(Ia),r=qe(W1,void 0),{shortcuts:a,disabledDate:l,cellClassName:c}=o.props,u=Sn(o.props,"format"),d=Sn(o.props,"defaultValue"),h=J(ht().locale(s.value)),f=J(ht().locale(s.value).add(1,i0)),{minDate:p,maxDate:m,rangeState:y,ppNs:b,drpNs:k,handleChangeRange:C,handleRangeConfirm:$,handleShortcutClick:S,onSelect:M,parseValue:P}=v8(n,{defaultValue:d,leftDate:h,rightDate:f,unit:i0,sortDates:Q}),T=Y(()=>!!a.length),{leftPrevYear:I,rightNextYear:L,leftNextYear:R,rightPrevYear:V,leftLabel:B,rightLabel:F,leftYear:z,rightYear:U}=yme({unlinkPanels:Sn(n,"unlinkPanels"),leftDate:h,rightDate:f}),G=Y(()=>n.unlinkPanels&&U.value>z.value+1),K=(Z,ae=!0)=>{const ge=Z.minDate,Ce=Z.maxDate;m.value===Ce&&p.value===ge||(i("calendar-change",[ge.toDate(),Ce&&Ce.toDate()]),m.value=Ce,p.value=ge,ae&&$())},X=()=>{let Z=null;o!=null&&o.emptyValues&&(Z=o.emptyValues.valueOnClear.value),h.value=i2(E(d),{lang:E(s),unit:"year",unlinkPanels:n.unlinkPanels})[0],f.value=h.value.add(1,"year"),i("pick",Z)},W=Z=>Yf(Z,u.value,s.value,r);function Q(Z,ae){n.unlinkPanels&&ae?f.value=((Z==null?void 0:Z.year())||0)===ae.year()?ae.add(1,i0):ae:f.value=h.value.add(1,i0)}const ne=bs();return Te(()=>n.visible,Z=>{!Z&&y.value.selecting&&(P(n.parsedValue),M(!1))}),i("set-picker-option",["isValidValue",n1]),i("set-picker-option",["parseUserInput",W]),i("set-picker-option",["handleClear",X]),(Z,ae)=>(v(),A("div",{class:q([E(b).b(),E(k).b(),E(b).is("border",Z.border),E(b).is("disabled",E(ne)),{"has-sidebar":!!Z.$slots.sidebar||T.value}])},[g("div",{class:q(E(b).e("body-wrapper"))},[le(Z.$slots,"sidebar",{class:q(E(b).e("sidebar"))}),T.value?(v(),A("div",{key:0,class:q(E(b).e("sidebar"))},[(v(!0),A(ee,null,we(E(a),(ge,Ce)=>(v(),A("button",{key:Ce,type:"button",class:q(E(b).e("shortcut")),disabled:E(ne),onClick:oe=>E(S)(ge)},x(ge.text),11,bme))),128))],2)):O("v-if",!0),g("div",{class:q(E(b).e("body"))},[g("div",{class:q([[E(b).e("content"),E(k).e("content")],"is-left"])},[g("div",{class:q(E(k).e("header"))},[g("button",{type:"button",class:q([E(b).e("icon-btn"),"d-arrow-left"]),disabled:E(ne),onClick:ae[0]||(ae[0]=(...ge)=>E(I)&&E(I)(...ge))},[le(Z.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(zc))]),_:1})])],10,wme),Z.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!G.value||E(ne),class:q([[E(b).e("icon-btn"),E(b).is("disabled",!G.value||E(ne))],"d-arrow-right"]),onClick:ae[1]||(ae[1]=(...ge)=>E(R)&&E(R)(...ge))},[le(Z.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Hc))]),_:1})])],10,kme)):O("v-if",!0),g("div",null,x(E(B)),1)],2),_(s1,{"selection-mode":"range",date:h.value,"min-date":E(p),"max-date":E(m),"range-state":E(y),"disabled-date":E(l),disabled:E(ne),"cell-class-name":E(c),onChangerange:E(C),onPick:K,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(b).e("content"),E(k).e("content")],"is-right"])},[g("div",{class:q(E(k).e("header"))},[Z.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!G.value||E(ne),class:q([[E(b).e("icon-btn"),E(b).is("disabled",!G.value||E(ne))],"d-arrow-left"]),onClick:ae[2]||(ae[2]=(...ge)=>E(V)&&E(V)(...ge))},[le(Z.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(zc))]),_:1})])],10,Cme)):O("v-if",!0),g("button",{type:"button",class:q([E(b).e("icon-btn"),"d-arrow-right"]),disabled:E(ne),onClick:ae[3]||(ae[3]=(...ge)=>E(L)&&E(L)(...ge))},[le(Z.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Hc))]),_:1})])],10,xme),g("div",null,x(E(F)),1)],2),_(s1,{"selection-mode":"range",date:f.value,"min-date":E(p),"max-date":E(m),"range-state":E(y),"disabled-date":E(l),disabled:E(ne),"cell-class-name":E(c),onChangerange:E(C),onPick:K,onSelect:E(M)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2)],2)],2)],2))}}),$me=Sme;const Ame=Ge({...p8}),Eme=["pick","set-picker-option","calendar-change"],Mme=({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:Y(()=>{const a=Math.floor(e.value.year()/10)*10;return`${a}-${a+9}`}),rightLabel:Y(()=>{const a=Math.floor(n.value.year()/10)*10;return`${a}-${a+9}`}),leftYear:Y(()=>Math.floor(e.value.year()/10)*10+9),rightYear:Y(()=>Math.floor(n.value.year()/10)*10)}),Tme=["disabled","onClick"],Pme=["disabled"],Ime=["disabled"],Lme=["disabled"],Ome=["disabled"],uh=10,Xp="year";var Dme=fe({name:"DatePickerYearRange",__name:"panel-year-range",props:Ame,emits:Eme,setup(t,{emit:e}){const n=t,i=e,{lang:s}=Qt(),o=J(ht().locale(s.value)),r=J(ht().locale(s.value).add(uh,Xp)),a=qe(W1,void 0),l=qe(Ia),{shortcuts:c,disabledDate:u,cellClassName:d}=l.props,h=Sn(l.props,"format"),f=Sn(l.props,"defaultValue"),{minDate:p,maxDate:m,rangeState:y,ppNs:b,drpNs:k,handleChangeRange:C,handleRangeConfirm:$,handleShortcutClick:S,onSelect:M,parseValue:P}=v8(n,{defaultValue:f,leftDate:o,rightDate:r,step:uh,unit:Xp,sortDates:Ce}),{leftPrevYear:T,rightNextYear:I,leftNextYear:L,rightPrevYear:R,leftLabel:V,rightLabel:B,leftYear:F,rightYear:z}=Mme({unlinkPanels:Sn(n,"unlinkPanels"),leftDate:o,rightDate:r}),U=bs(),G=Y(()=>!!c.length),K=Y(()=>[b.b(),k.b(),b.is("border",n.border),b.is("disabled",U.value),{"has-sidebar":!!mi().sidebar||G.value}]),X=Y(()=>({content:[b.e("content"),k.e("content"),"is-left"],arrowLeftBtn:[b.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[b.e("icon-btn"),b.is("disabled",!Q.value||U.value),"d-arrow-right"]})),W=Y(()=>({content:[b.e("content"),k.e("content"),"is-right"],arrowLeftBtn:[b.e("icon-btn"),b.is("disabled",!Q.value||U.value),"d-arrow-left"],arrowRightBtn:[b.e("icon-btn"),"d-arrow-right"]})),Q=Y(()=>n.unlinkPanels&&z.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&&$())},Z=oe=>Yf(oe,h.value,s.value,a),ae=oe=>n1(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=i2(E(f),{lang:E(s),step:uh,unit:Xp,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,Xp):pe}else r.value=o.value.add(uh,Xp)}return Te(()=>n.visible,oe=>{!oe&&y.value.selecting&&(P(n.parsedValue),M(!1))}),i("set-picker-option",["isValidValue",ae]),i("set-picker-option",["parseUserInput",Z]),i("set-picker-option",["handleClear",ge]),(oe,pe)=>(v(),A("div",{class:q(K.value)},[g("div",{class:q(E(b).e("body-wrapper"))},[le(oe.$slots,"sidebar",{class:q(E(b).e("sidebar"))}),G.value?(v(),A("div",{key:0,class:q(E(b).e("sidebar"))},[(v(!0),A(ee,null,we(E(c),(ie,re)=>(v(),A("button",{key:re,type:"button",class:q(E(b).e("shortcut")),disabled:E(U),onClick:ke=>E(S)(ie)},x(ie.text),11,Tme))),128))],2)):O("v-if",!0),g("div",{class:q(E(b).e("body"))},[g("div",{class:q(X.value.content)},[g("div",{class:q(E(k).e("header"))},[g("button",{type:"button",class:q(X.value.arrowLeftBtn),disabled:E(U),onClick:pe[0]||(pe[0]=(...ie)=>E(T)&&E(T)(...ie))},[le(oe.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(zc))]),_:1})])],10,Pme),oe.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!Q.value||E(U),class:q(X.value.arrowRightBtn),onClick:pe[1]||(pe[1]=(...ie)=>E(L)&&E(L)(...ie))},[le(oe.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Hc))]),_:1})])],10,Ime)):O("v-if",!0),g("div",null,x(E(V)),1)],2),_(i1,{"selection-mode":"range",date:o.value,"min-date":E(p),"max-date":E(m),"range-state":E(y),"disabled-date":E(u),disabled:E(U),"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(W.value.content)},[g("div",{class:q(E(k).e("header"))},[oe.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!Q.value||E(U),class:q(W.value.arrowLeftBtn),onClick:pe[2]||(pe[2]=(...ie)=>E(R)&&E(R)(...ie))},[le(oe.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(zc))]),_:1})])],10,Lme)):O("v-if",!0),g("button",{type:"button",class:q(W.value.arrowRightBtn),disabled:E(U),onClick:pe[3]||(pe[3]=(...ie)=>E(I)&&E(I)(...ie))},[le(oe.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Hc))]),_:1})])],10,Ome),g("div",null,x(E(B)),1)],2),_(i1,{"selection-mode":"range",date:r.value,"min-date":E(p),"max-date":E(m),"range-state":E(y),"disabled-date":E(u),disabled:E(U),"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))}}),Rme=Dme;const Vme=function(t){switch(t){case"daterange":case"datetimerange":return gme;case"monthrange":return $me;case"yearrange":return Rme;default:return Jpe}};var NV={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)}}})})(NV);var Fme=NV.exports;const Nme=vi(Fme);var BV={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)}}})})(BV);var Bme=BV.exports;const zme=vi(Bme);var zV={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}}})})(zV);var Hme=zV.exports;const Ume=vi(Hme);var HV={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")}}})})(HV);var jme=HV.exports;const Wme=vi(jme);var UV={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)}}})})(UV);var Yme=UV.exports;const qme=vi(Yme);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 Gme=jV.exports;const Xme=vi(Gme);function Kme(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!is(t)}ht.extend(Khe);ht.extend(Nme);ht.extend(aV);ht.extend(zme);ht.extend(Ume);ht.extend(Wme);ht.extend(qme);ht.extend(Xme);var Zme=fe({name:"ElDatePickerPanel",install:null,inheritAttrs:!1,props:Cpe,emits:[Mt,"calendar-change","panel-change","visible-change","clear"],setup(t,{slots:e,emit:n,attrs:i}){const s=Be("picker-panel");nn(qe(Ia,void 0))&&Pt(Ia,{props:In({...go(t)})}),Pt(h8,{slots:e,pickerNs:s});const{parsedValue:o,onCalendarChange:r,onPanelChange:a,onSetPickerOption:l,onPick:c}=qe(UR,()=>KR(t,n),!0);return()=>_(Vme(t.type),Wt(zb(i,"onPick"),t,{parsedValue:o.value,"onSet-picker-option":l,"onCalendar-change":r,"onPanel-change":a,onClear:()=>n("clear"),onPick:c}),Kme(e)?e:{default:()=>[e]})}});const Jme=qt(Zme),Qme=Ge({...XR,type:{type:de(String),default:"date"}});function ege(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!is(t)}var tge=fe({name:"ElDatePicker",install:null,props:Qme,emits:[Mt],setup(t,{expose:e,emit:n,slots:i}){Pt(W1,Y(()=>!t.format)),Pt(HR,In(Sn(t,"popperOptions")));const s=J();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??(Yde[t.type]||mc);return _(the,Wt(t,{format:r,type:t.type,ref:s,"onUpdate:modelValue":o}),{default:a=>_(Jme,Wt({disabled:t.disabled,editable:t.editable,border:!1},a),ege(i)?i:{default:()=>[i]}),"range-separator":i["range-separator"]})}}});const Wd=qt(tge),WV=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"}}),nge={close:()=>!0},YV=Ge({...WV,appendToBody:Boolean,appendTo:{type:A4.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}}),qV={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[Mt]:t=>Jn(t),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},sge=Ge({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:de([String,Array,Object])},zIndex:{type:de([String,Number])}}),ige={click:t=>t instanceof MouseEvent},oge="overlay";var rge=fe({name:"ElOverlay",props:sge,emits:ige,setup(t,{slots:e,emit:n}){const i=Be(oge),s=l=>{n("click",l)},{onClick:o,onMousedown:r,onMouseup:a}=B4(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")],$w.STYLE|$w.CLASS|$w.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 _8=rge,GV=Symbol("dialogInjectionKey"),Bw="dialog-fade",age="ElDialog",XV=(t,e)=>{const n=pt().emit,{nextZIndex:i}=Yb();let s="";const o=kr(),r=kr(),a=J(!1),l=J(!1),c=J(!1),u=J(t.zIndex??i()),d=J(!1);let h,f;const p=Jc(),m=Y(()=>{var W;return((W=p.value)==null?void 0:W.namespace)??Jm}),y=Y(()=>{var W;return(W=p.value)==null?void 0:W.dialog}),b=Y(()=>{const W={},Q=`--${m.value}-dialog`;if(!t.fullscreen){t.top&&(W[`${Q}-margin-top`]=t.top);const ne=fi(t.width);ne&&(W[`${Q}-width`]=ne)}return W}),k=Y(()=>{var W;return(t.draggable??((W=y.value)==null?void 0:W.draggable)??!1)&&!t.fullscreen}),C=Y(()=>{var W;return t.alignCenter??((W=y.value)==null?void 0:W.alignCenter)??!1}),$=Y(()=>{var W;return t.overflow??((W=y.value)==null?void 0:W.overflow)??!1}),S=Y(()=>C.value?{display:"flex"}:{}),M=Y(()=>{var ne;const W=t.transition??((ne=y.value)==null?void 0:ne.transition)??Bw,Q={name:W,onAfterEnter:P,onBeforeLeave:I,onAfterLeave:T};if(yt(W)){const Z={...W},ae=(ge,Ce)=>oe=>{Me(ge)?ge.forEach(pe=>{et(pe)&&pe(oe)}):et(ge)&&ge(oe),Ce()};return Z.onAfterEnter=ae(Z.onAfterEnter,P),Z.onBeforeLeave=ae(Z.onBeforeLeave,I),Z.onAfterLeave=ae(Z.onAfterLeave,T),Z.name||(Z.name=Bw,Tt(age,`transition.name is missing when using object syntax, fallback to '${Bw}'`)),Z}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}=Gk(()=>F(),t.openDelay):F()}function R(){h==null||h(),f==null||f(),t.closeDelay&&t.closeDelay>0?{stop:f}=Gk(()=>z(),t.closeDelay):z()}function V(){function W(Q){Q||(l.value=!0,a.value=!1)}t.beforeClose?t.beforeClose(W):R()}function B(){t.closeOnClickModal&&V()}function F(){Kt&&(a.value=!0)}function z(){a.value=!1}function U(){n("openAutoFocus")}function G(){n("closeAutoFocus")}function K(W){var Q;((Q=W.detail)==null?void 0:Q.focusReason)==="pointer"&&W.preventDefault()}t.lockScroll&&P4(a);function X(){t.closeOnPressEscape&&V()}return Te(()=>t.zIndex,()=>{u.value=t.zIndex??i()}),Te(()=>t.modelValue,W=>{W?(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,W=>{e.value&&(W?(s=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=s)}),Ft(()=>{t.modelValue&&(a.value=!0,c.value=!0,L())}),{afterEnter:P,afterLeave:T,beforeLeave:I,handleClose:V,onModalClick:B,close:R,doClose:z,onOpenAutoFocus:U,onCloseAutoFocus:G,onCloseRequested:X,onFocusoutPrevented:K,titleId:o,bodyId:r,closed:l,style:b,overlayDialogStyle:S,rendered:c,visible:a,zIndex:u,transitionConfig:M,_draggable:k,_alignCenter:C,_overflow:$,closing:d}},y8=(...t)=>e=>{t.forEach(n=>{n.value=e})},lge=["aria-level"],cge=["aria-label"],uge=["id"];var dge=fe({name:"ElDialogContent",__name:"dialog-content",props:WV,emits:nge,setup(t,{expose:e}){const{t:n}=Qt(),{Close:i}=Xle,s=t,{dialogRef:o,headerRef:r,bodyId:a,ns:l,style:c}=qe(GV),{focusTrapRef:u}=qe(MR),d=y8(u,o),h=Y(()=>!!s.draggable),{resetPosition:f,updatePosition:p,isDragging:m}=SD(o,r,h,Y(()=>!!s.overflow)),y=Y(()=>[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}),(b,k)=>(v(),A("div",{ref:E(d),class:q(y.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(b.$slots,"header",{},()=>[g("span",{role:"heading","aria-level":t.ariaLevel,class:q(E(l).e("title"))},x(t.title),11,lge)]),t.showClose?(v(),A("button",{key:0,"aria-label":E(n)("el.dialog.close"),class:q(E(l).e("headerbtn")),type:"button",onClick:k[0]||(k[0]=C=>b.$emit("close"))},[_(E(be),{class:q(E(l).e("close"))},{default:w(()=>[(v(),D(Ct(t.closeIcon||E(i))))]),_:1},8,["class"])],10,cge)):O("v-if",!0)],2),g("div",{id:E(a),class:q([E(l).e("body"),t.bodyClass])},[le(b.$slots,"default")],10,uge),b.$slots.footer?(v(),A("footer",{key:0,class:q([E(l).e("footer"),t.footerClass])},[le(b.$slots,"footer")],2)):O("v-if",!0)],6))}}),hge=dge;const fge=["aria-label","aria-labelledby","aria-describedby"];var pge=fe({name:"ElDialog",inheritAttrs:!1,__name:"dialog",props:YV,emits:qV,setup(t,{expose:e}){const n=t,i=mi();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"},Y(()=>!!i.title));const s=Be("dialog"),o=J(),r=J(),a=J(),{visible:l,titleId:c,bodyId:u,style:d,overlayDialogStyle:h,rendered:f,transitionConfig:p,zIndex:m,_draggable:y,_alignCenter:b,_overflow:k,handleClose:C,onModalClick:$,onOpenAutoFocus:S,onCloseAutoFocus:M,onCloseRequested:P,onFocusoutPrevented:T,closing:I}=XV(n,o);Pt(GV,{dialogRef:o,headerRef:r,bodyId:u,ns:s,rendered:f,style:d});const L=B4($),R=Y(()=>n.modalPenetrable&&!n.modal&&!n.fullscreen);return e({visible:l,dialogContentRef:a,resetPosition:()=>{var B;(B=a.value)==null||B.resetPosition()},handleClose:C}),(B,F)=>(v(),D(E(Kb),{to:t.appendTo,disabled:t.appendTo!=="body"?!1:!t.appendToBody},{default:w(()=>[_(Ho,Wt(E(p),{persisted:""}),{default:w(()=>[Re(_(E(_8),{"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:w(()=>[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]=(...z)=>E(L).onClick&&E(L).onClick(...z)),onMousedown:F[1]||(F[1]=(...z)=>E(L).onMousedown&&E(L).onMousedown(...z)),onMouseup:F[2]||(F[2]=(...z)=>E(L).onMouseup&&E(L).onMouseup(...z))},[_(E(z1),{loop:"",trapped:E(l),"focus-start-el":"container",onFocusAfterTrapped:E(S),onFocusAfterReleased:E(M),onFocusoutPrevented:E(T),onReleaseRequested:E(P)},{default:w(()=>[E(f)?(v(),D(hge,Wt({key:0,ref_key:"dialogContentRef",ref:a},B.$attrs,{center:t.center,"align-center":E(b),"close-icon":t.closeIcon,draggable:E(y),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:w(()=>[B.$slots.title?le(B.$slots,"title",{key:1}):le(B.$slots,"header",{key:0,close:E(C),titleId:E(c),titleClass:E(s).e("title")})]),default:w(()=>[le(B.$slots,"default")]),_:2},[B.$slots.footer?{name:"footer",fn:w(()=>[le(B.$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,fge)]),_:3},8,["mask","overlay-class","z-index"]),[[jt,E(l)]])]),_:3},16)]),_:3},8,["to","disabled"]))}}),mge=pge;const $s=qt(mge),gge=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 vge=fe({name:"ElDivider",__name:"divider",props:gge,setup(t){const e=t,n=Be("divider"),i=Y(()=>n.cssVar({"border-style":e.borderStyle}));return(s,o)=>(v(),A("div",{class:q([E(n).b(),E(n).m(t.direction)]),style:Xe(i.value),role:"separator"},[s.$slots.default&&t.direction!=="vertical"?(v(),A("div",{key:0,class:q([E(n).e("text"),E(n).is(t.contentPosition)])},[le(s.$slots,"default")],2)):O("v-if",!0)],6))}}),_ge=vge;const b8=qt(_ge),yge=Ge({...YV,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"}}),bge={...qV,"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 wge(t,e,n){const{width:i,height:s}=Pie(),o=Y(()=>["ltr","rtl"].includes(t.direction)),r=Y(()=>["ltr","ttb"].includes(t.direction)?1:-1),a=Y(()=>o.value?i.value:s.value),l=Y(()=>mD(c.value+r.value*u.value,4,a.value)),c=J(0),u=J(0),d=J(!1),h=J(!1);let f=[],p=[];const m=()=>{var S;const $=(S=e.value)==null?void 0:S.closest('[aria-modal="true"]');return $?o.value?$.offsetWidth:$.offsetHeight:100};Te(()=>[t.size,t.resizable],()=>{h.value=!1,c.value=0,u.value=0,k()});const y=$=>{t.resizable&&(h.value||(c.value=m(),h.value=!0),f=[$.pageX,$.pageY],d.value=!0,n("resize-start",$,c.value),p.push(Hn(window,"mouseup",k),Hn(window,"mousemove",b)))},b=$=>{const{pageX:S,pageY:M}=$,P=S-f[0],T=M-f[1];u.value=o.value?P:T,n("resize",$,l.value)},k=$=>{d.value&&(f=[],c.value=l.value,u.value=0,d.value=!1,p.forEach(S=>S==null?void 0:S()),p=[],$&&n("resize-end",$,c.value))},C=Hn(e,"mousedown",y);return wn(()=>{C(),k()}),{size:Y(()=>h.value?`${l.value}px`:fi(t.size)),isResizing:d,isHorizontal:o}}const kge=["aria-label","aria-labelledby","aria-describedby"],Cge=["id","aria-level"],xge=["aria-label"],Sge=["id"];var $ge=fe({name:"ElDrawer",inheritAttrs:!1,__name:"drawer",props:yge,emits:bge,setup(t,{expose:e,emit:n}){const i=t,s=n,o=mi();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"},Y(()=>!!o.title));const r=J(),a=J(),l=J(),c=Be("drawer"),{t:u}=Qt(),{afterEnter:d,afterLeave:h,beforeLeave:f,visible:p,rendered:m,titleId:y,bodyId:b,zIndex:k,onModalClick:C,onOpenAutoFocus:$,onCloseAutoFocus:S,onFocusoutPrevented:M,onCloseRequested:P,handleClose:T}=XV(i,r),{isHorizontal:I,size:L,isResizing:R}=wge(i,l,s),V=Y(()=>i.modalPenetrable&&!i.modal);return e({handleClose:T,afterEnter:d,afterLeave:h}),(B,F)=>(v(),D(E(Kb),{to:t.appendTo,disabled:t.appendTo!=="body"?!1:!t.appendToBody},{default:w(()=>[_(Ho,{name:E(c).b("fade"),onAfterEnter:E(d),onAfterLeave:E(h),onBeforeLeave:E(f),persisted:""},{default:w(()=>[Re(_(E(_8),{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:w(()=>[_(E(z1),{loop:"",trapped:E(p),"focus-trap-el":r.value,"focus-start-el":a.value,onFocusAfterTrapped:E($),onFocusAfterReleased:E(S),onFocusoutPrevented:E(M),onReleaseRequested:E(P)},{default:w(()=>[g("div",Wt({ref_key:"drawerRef",ref:r,"aria-modal":"true","aria-label":t.title||void 0,"aria-labelledby":t.title?void 0:E(y),"aria-describedby":E(b)},B.$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]=Ee(()=>{},["stop"]))}),[g("span",{ref_key:"focusStartRef",ref:a,class:q(E(c).e("sr-focus")),tabindex:"-1"},null,2),t.withHeader?(v(),A("header",{key:0,class:q([E(c).e("header"),t.headerClass])},[B.$slots.title?le(B.$slots,"title",{key:1},()=>[O(" DEPRECATED SLOT ")]):le(B.$slots,"header",{key:0,close:E(T),titleId:E(y),titleClass:E(c).e("title")},()=>[g("span",{id:E(y),role:"heading","aria-level":t.headerAriaLevel,class:q(E(c).e("title"))},x(t.title),11,Cge)]),t.showClose?(v(),A("button",{key:2,"aria-label":E(u)("el.drawer.close"),class:q(E(c).e("close-btn")),type:"button",onClick:F[0]||(F[0]=(...z)=>E(T)&&E(T)(...z))},[_(E(be),{class:q(E(c).e("close"))},{default:w(()=>[_(E(Bo))]),_:1},8,["class"])],10,xge)):O("v-if",!0)],2)):O("v-if",!0),E(m)?(v(),A("div",{key:1,id:E(b),class:q([E(c).e("body"),t.bodyClass])},[le(B.$slots,"default")],10,Sge)):O("v-if",!0),B.$slots.footer?(v(),A("div",{key:2,class:q([E(c).e("footer"),t.footerClass])},[le(B.$slots,"footer")],2)):O("v-if",!0),t.resizable?(v(),A("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,kge)]),_: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"]))}}),Age=$ge;const Va=qt(Age),N0=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:yR,default:"menu"},buttonProps:{type:de(Object)},teleported:zn.teleported,appendTo:zn.appendTo,persistent:{type:Boolean,default:!0}}),KV=Ge({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:ds}}),Ege=Ge({onKeydown:{type:de(Function)}}),o2=Symbol("elDropdown"),ZV="elDropdown";var Mge=fe({inheritAttrs:!1});function Tge(t,e,n,i,s,o){return le(t.$slots,"default")}var Pge=gi(Mge,[["render",Tge]]),Ige=fe({name:"ElCollectionItem",inheritAttrs:!1});function Lge(t,e,n,i,s,o){return le(t.$slots,"default")}var Oge=gi(Ige,[["render",Lge]]);const JV="data-el-collection-item",Dge=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({},Pge,{name:e,setup(){const o=J(),r=new Map;Pt(i,{itemMap:r,getItems:()=>{const l=E(o);if(!l)return[];const c=Array.from(l.querySelectorAll(`[${JV}]`));return[...r.values()].sort((u,d)=>c.indexOf(u.ref)-c.indexOf(d.ref))},collectionRef:o})}}),ElCollectionItem:Object.assign({},Oge,{name:n,setup(o,{attrs:r}){const a=J(),l=qe(i,void 0);Pt(s,{collectionItemRef:a}),Ft(()=>{const c=E(a);c&&l.itemMap.set(c,{ref:c,...r})}),wn(()=>{const c=E(a);l.itemMap.delete(c)})}})}},Rge=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:Vge,ElCollectionItem:Fge,COLLECTION_INJECTION_KEY:QV,COLLECTION_ITEM_INJECTION_KEY:Nge}=Dge("RovingFocusGroup"),w8=Symbol("elRovingFocusGroup"),eF=Symbol("elRovingFocusGroupItem"),Bge={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},zge=(t,e)=>{if(e!=="rtl")return t;switch(t){case Ue.right:return Ue.left;case Ue.left:return Ue.right;default:return t}},Hge=(t,e,n)=>{const i=zge(ls(t),n);if(!(e==="vertical"&&[Ue.left,Ue.right].includes(i))&&!(e==="horizontal"&&[Ue.up,Ue.down].includes(i)))return Bge[i]},Uge=(t,e)=>t.map((n,i)=>t[(i+e)%t.length]),wA=t=>{const{activeElement:e}=document;for(const n of t)if(n===e||(n.focus(),e!==document.activeElement))return},kA="currentTabIdChange",CA="rovingFocusGroup.entryFocus",jge={bubbles:!1,cancelable:!0};var Wge=fe({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:Rge,emits:[kA,"entryFocus"],setup(t,{emit:e}){const n=J((t.currentTabId||t.defaultCurrentTabId)??null),i=J(!1),s=J(!1),o=J(),{getItems:r}=qe(QV,void 0),a=Y(()=>[{outline:"none"},t.style]),l=m=>{e(kA,m)},c=()=>{i.value=!0},u=Ms(m=>{var y;(y=t.onMousedown)==null||y.call(t,m)},()=>{s.value=!0}),d=Ms(m=>{var y;(y=t.onFocus)==null||y.call(t,m)},m=>{const y=!E(s),{target:b,currentTarget:k}=m;if(b===k&&y&&!E(i)){const C=new Event(CA,jge);if(k==null||k.dispatchEvent(C),!C.defaultPrevented){const $=r().filter(S=>S.focusable);wA([$.find(S=>S.active),$.find(S=>S.id===E(n)),...$].filter(Boolean).map(S=>S.ref))}}s.value=!1}),h=Ms(m=>{var y;(y=t.onBlur)==null||y.call(t,m)},()=>{i.value=!1}),f=(...m)=>{e("entryFocus",...m)},p=m=>{const y=Hge(m);if(y){m.preventDefault();let b=r().filter(k=>k.focusable).map(k=>k.ref);switch(y){case"last":b.reverse();break;case"prev":case"next":{y==="prev"&&b.reverse();const k=b.indexOf(m.currentTarget);b=t.loop?Uge(b,k+1):b.slice(k+1);break}}ot(()=>{wA(b)})}};Pt(w8,{currentTabbedId:Rc(n),loop:Sn(t,"loop"),tabIndex:Y(()=>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,CA,f)}});function Yge(t,e,n,i,s,o){return le(t.$slots,"default")}var qge=gi(Wge,[["render",Yge]]),Gge=fe({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:Vge,ElRovingFocusGroupImpl:qge}});function Xge(t,e,n,i,s,o){const r=H("el-roving-focus-group-impl"),a=H("el-focus-group-collection");return v(),D(a,null,{default:w(()=>[_(r,ef(of(t.$attrs)),{default:w(()=>[le(t.$slots,"default")]),_:3},16)]),_:3})}var Kge=gi(Gge,[["render",Xge]]),Zge=fe({components:{ElRovingFocusCollectionItem:Fge},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(w8,void 0),r=kr(),a=J(),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=Y(()=>n.value===E(r));return Pt(eF,{rovingFocusGroupItemRef:a,tabIndex:Y(()=>E(d)?0:-1),handleMousedown:l,handleFocus:c,handleKeydown:u}),{id:r,handleKeydown:u,handleFocus:c,handleMousedown:l}}});function Jge(t,e,n,i,s,o){const r=H("el-roving-focus-collection-item");return v(),D(r,{id:t.id,focusable:t.focusable,active:t.active},{default:w(()=>[le(t.$slots,"default")]),_:3},8,["id","focusable","active"])}var Qge=gi(Zge,[["render",Jge]]),e1e=Kge;const{ButtonGroup:t1e}=He;var n1e=fe({name:"ElDropdown",components:{ElButton:He,ElButtonGroup:t1e,ElScrollbar:qs,ElTooltip:Ss,ElRovingFocusGroup:e1e,ElOnlyChild:CR,ElIcon:be,ArrowDown:Bd},props:N0,emits:["visible-change","click","command"],setup(t,{emit:e}){const n=pt(),i=Be("dropdown"),{t:s}=Qt(),o=J(),r=J(),a=J(),l=J(),c=J(null),u=J(null),d=J(!1),h=Y(()=>({maxHeight:fi(t.maxHeight)})),f=Y(()=>[i.m($.value)]),p=Y(()=>Us(t.trigger)),m=kr().value,y=Y(()=>t.id||m);function b(){var B;(B=a.value)==null||B.onClose(void 0,0)}function k(){var B;(B=a.value)==null||B.onClose()}function C(){var B;(B=a.value)==null||B.onOpen()}const $=Ii();function S(...B){e("command",...B)}function M(){}function P(){const B=E(l);p.value.includes("hover")&&(B==null||B.focus({preventScroll:!0})),u.value=null}function T(B){u.value=B}function I(){e("visible-change",!0)}function L(B){var F;d.value=(B==null?void 0:B.type)==="keydown",(F=l.value)==null||F.focus()}function R(){e("visible-change",!1)}return Pt(o2,{contentRef:l,role:Y(()=>t.role),triggerId:y,isUsingKeyboard:d,onItemEnter:M,onItemLeave:P,handleClose:k}),Pt(ZV,{instance:n,dropdownSize:$,handleClick:b,commandHandler:S,trigger:Sn(t,"trigger"),hideOnClick:Sn(t,"hideOnClick")}),{t:s,ns:i,scrollbar:c,wrapStyle:h,dropdownTriggerKls:f,dropdownSize:$,triggerId:y,currentTabId:u,handleCurrentTabIdChange:T,handlerMainButtonClick:B=>{e("click",B)},handleClose:k,handleOpen:C,handleBeforeShowTooltip:I,handleShowTooltip:L,handleBeforeHideTooltip:R,popperRef:a,contentRef:l,triggeringElementRef:o,referenceElementRef:r}}});function s1e(t,e,n,i,s,o){const r=H("el-roving-focus-group"),a=H("el-scrollbar"),l=H("el-only-child"),c=H("el-tooltip"),u=H("el-button"),d=H("arrow-down"),h=H("el-icon"),f=H("el-button-group");return v(),A("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:w(()=>[_(a,{ref:"scrollbar","wrap-style":t.wrapStyle,tag:"div","view-class":t.ns.e("list")},{default:w(()=>[_(r,{loop:t.loop,"current-tab-id":t.currentTabId,orientation:"horizontal",onCurrentTabIdChange:t.handleCurrentTabIdChange},{default:w(()=>[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:w(()=>[_(l,{id:t.triggerId,ref:"triggeringElementRef",role:"button",tabindex:t.tabindex},{default:w(()=>[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:w(()=>[_(u,Wt({ref:"referenceElementRef"},t.buttonProps,{size:t.dropdownSize,type:t.type,disabled:t.disabled,tabindex:t.tabindex,onClick:t.handlerMainButtonClick}),{default:w(()=>[le(t.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),_(u,Wt({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:w(()=>[_(h,{class:q(t.ns.e("icon"))},{default:w(()=>[_(d)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):O("v-if",!0)],2)}var i1e=gi(n1e,[["render",s1e]]),o1e=fe({name:"DropdownItemImpl",components:{ElIcon:be},props:KV,emits:["pointermove","pointerleave","click","clickimpl"],setup(t,{emit:e}){const n=Be("dropdown"),{role:i}=qe(o2,void 0),{collectionItemRef:s}=qe(Nge,void 0),{rovingFocusGroupItemRef:o,tabIndex:r,handleFocus:a,handleKeydown:l,handleMousedown:c}=qe(eF,void 0),u=y8(s,o),d=Y(()=>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:{[JV]:""},role:d,tabIndex:r,handleFocus:a,handleKeydown:h,handleMousedown:c}}});const r1e=["aria-disabled","tabindex","role"];function a1e(t,e,n,i,s,o){const r=H("el-icon");return v(),A(ee,null,[t.divided?(v(),A("li",{key:0,role:"separator",class:q(t.ns.bem("menu","item","divided"))},null,2)):O("v-if",!0),g("li",Wt({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]=Ee((...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:w(()=>[le(t.$slots,"icon",{},()=>[(v(),D(Ct(t.icon)))])]),_:3})):O("v-if",!0),le(t.$slots,"default")],16,r1e)],64)}var l1e=gi(o1e,[["render",a1e]]);const tF=()=>{const t=qe(ZV,{});return{elDropdown:t,_elDropdownSize:Y(()=>t==null?void 0:t.dropdownSize)}};var c1e=fe({name:"ElDropdownItem",components:{ElRovingFocusItem:Qge,ElDropdownItemImpl:l1e},inheritAttrs:!1,props:KV,emits:["pointermove","pointerleave","click"],setup(t,{emit:e,attrs:n}){const{elDropdown:i}=tF(),s=pt(),{onItemEnter:o,onItemLeave:r}=qe(o2,void 0),a=Ms(c=>(e("pointermove",c),c.defaultPrevented),g$(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),g$(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:Y(()=>({...t,...n}))}}});function u1e(t,e,n,i,s,o){const r=H("el-dropdown-item-impl"),a=H("el-roving-focus-item");return v(),D(a,{focusable:!t.disabled},{default:w(()=>[_(r,Wt(t.propsAndAttrs,{onPointerleave:t.handlePointerLeave,onPointermove:t.handlePointerMove,onClickimpl:t.handleClick}),hs({default:w(()=>[le(t.$slots,"default")]),_:2},[t.$slots.icon?{name:"icon",fn:w(()=>[le(t.$slots,"icon")]),key:"0"}:void 0]),1040,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])}var nF=gi(c1e,[["render",u1e]]),d1e=fe({name:"ElDropdownMenu",props:Ege,setup(t){const e=Be("dropdown"),{_elDropdownSize:n}=tF(),i=n.value,{contentRef:s,role:o,triggerId:r,isUsingKeyboard:a,handleClose:l}=qe(o2,void 0),{rovingFocusGroupRef:c,rovingFocusGroupRootStyle:u,onBlur:d,onFocus:h,onKeydown:f,onMousedown:p}=qe(w8,void 0),{collectionRef:m}=qe(QV,void 0),y=Y(()=>[e.b("menu"),e.bm("menu",i==null?void 0:i.value)]),b=y8(s,c,m),k=Ms($=>{var S;(S=t.onKeydown)==null||S.call(t,$)},$=>{const{currentTarget:S,target:M}=$,P=ls($);if(S.contains(M),Ue.tab===P)return l();f($)});function C($){a.value&&h($)}return{size:i,rovingFocusGroupRootStyle:u,dropdownKls:y,role:o,triggerId:r,dropdownListWrapperRef:b,handleKeydown:k,onBlur:d,handleFocus:C,onMousedown:p}}});const h1e=["role","aria-labelledby"];function f1e(t,e,n,i,s,o){return v(),A("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]=Ee((...r)=>t.handleKeydown&&t.handleKeydown(...r),["self"])),onMousedown:e[3]||(e[3]=Ee((...r)=>t.onMousedown&&t.onMousedown(...r),["self"]))},[le(t.$slots,"default")],46,h1e)}var sF=gi(d1e,[["render",f1e]]);const Sr=qt(i1e,{DropdownItem:nF,DropdownMenu:sF}),$r=Os(nF),Ar=Os(sF),p1e=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:()=>ri([])},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)}}),m1e={load:t=>t instanceof Event,error:t=>t instanceof Event,switch:t=>wt(t),close:()=>!0,show:()=>!0},g1e=Ge({urlList:{type:de(Array),default:()=>ri([])},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)}}),v1e={close:()=>!0,error:t=>t instanceof Event,switch:t=>wt(t),rotate:t=>wt(t)},_1e=["src","crossorigin"];var y1e=fe({name:"ElImageViewer",__name:"image-viewer",props:g1e,emits:v1e,setup(t,{expose:e,emit:n}){const i={CONTAIN:{name:"contain",icon:Pi(hR)},ORIGINAL:{name:"original",icon:Pi(Ile)}},s=t,o=n;let r;const{t:a}=Qt(),l=Be("image-viewer"),{nextZIndex:c}=Yb(),u=J(),d=J(),h=fb(),f=Y(()=>{const{scale:ie,minScale:re,maxScale:ke}=s;return mD(ie,re,ke)}),p=J(!0),m=J(!1),y=J(!1),b=J(s.initialIndex),k=Fn(i.CONTAIN),C=J({scale:f.value,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),$=J(s.zIndex??c());P4(y,{ns:l});const S=Y(()=>{const{urlList:ie}=s;return ie.length<=1}),M=Y(()=>b.value===0),P=Y(()=>b.value===s.urlList.length-1),T=Y(()=>s.urlList[b.value]),I=Y(()=>[l.e("btn"),l.e("prev"),l.is("disabled",!s.infinite&&M.value)]),L=Y(()=>[l.e("btn"),l.e("next"),l.is("disabled",!s.infinite&&P.value)]),R=Y(()=>{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=Y(()=>`${b.value+1} / ${s.urlList.length}`);function B(){z(),r==null||r(),y.value=!1,o("close")}function F(){const ie=jv(ke=>{switch(ls(ke)){case Ue.esc:s.closeOnPressEscape&&B();break;case Ue.space:Q();break;case Ue.left:Z();break;case Ue.up:ge("zoomIn");break;case Ue.right:ae();break;case Ue.down:ge("zoomOut");break}}),re=jv(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 z(){h.stop()}function U(){p.value=!1}function G(ie){m.value=!0,p.value=!1,o("error",ie),ie.target.alt=a("el.image.error")}function K(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=jv(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 X(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=jv(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 W(){C.value={scale:f.value,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function Q(){if(p.value||m.value)return;const ie=my(i),re=Object.values(i),ke=k.value.name;k.value=i[ie[(re.findIndex(je=>je.name===ke)+1)%ie.length]],W()}function ne(ie){m.value=!1;const re=s.urlList.length;b.value=(ie+re)%re}function Z(){M.value&&!s.infinite||ne(b.value-1)}function ae(){P.value&&!s.infinite||ne(b.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&&B()}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(b,ie=>{W(),o("switch",ie)}),Ft(()=>{y.value=!0,F(),r=Hn("wheel",pe,{passive:!1})}),e({setActiveItem:ne}),(ie,re)=>(v(),D(E(Kb),{to:"body",disabled:!t.teleported},{default:w(()=>[_(Ho,{name:"viewer-fade",appear:""},{default:w(()=>[g("div",{ref_key:"wrapper",ref:u,tabindex:-1,class:q(E(l).e("wrapper")),style:Xe({zIndex:$.value})},[_(E(z1),{loop:"",trapped:"","focus-trap-el":u.value,"focus-start-el":"container",onFocusoutPrevented:Ce,onReleaseRequested:oe},{default:w(()=>[g("div",{class:q(E(l).e("mask")),onClick:re[0]||(re[0]=Ee(ke=>t.hideOnClickModal&&B(),["self"]))},null,2),O(" CLOSE "),g("span",{class:q([E(l).e("btn"),E(l).e("close")]),onClick:B},[_(E(be),null,{default:w(()=>[_(E(Bo))]),_:1})],2),O(" ARROW "),S.value?O("v-if",!0):(v(),A(ee,{key:0},[g("span",{class:q(I.value),onClick:Z},[_(E(be),null,{default:w(()=>[_(E(bd))]),_:1})],2),g("span",{class:q(L.value),onClick:ae},[_(E(be),null,{default:w(()=>[_(E(Hr))]),_:1})],2)],64)),ie.$slots.progress||t.showProgress?(v(),A("div",{key:1,class:q([E(l).e("btn"),E(l).e("progress")])},[le(ie.$slots,"progress",{activeIndex:b.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:Z,next:ae,reset:Q,activeIndex:b.value,setActiveItem:ne},()=>[_(E(be),{onClick:re[1]||(re[1]=ke=>ge("zoomOut"))},{default:w(()=>[_(E(Gle))]),_:1}),_(E(be),{onClick:re[2]||(re[2]=ke=>ge("zoomIn"))},{default:w(()=>[_(E(vR))]),_:1}),g("i",{class:q(E(l).e("actions__divider"))},null,2),_(E(be),{onClick:Q},{default:w(()=>[(v(),D(Ct(k.value.icon)))]),_:1}),g("i",{class:q(E(l).e("actions__divider"))},null,2),_(E(be),{onClick:re[3]||(re[3]=ke=>ge("anticlockwise"))},{default:w(()=>[_(E(mR))]),_:1}),_(E(be),{onClick:re[4]||(re[4]=ke=>ge("clockwise"))},{default:w(()=>[_(E(Tle))]),_: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:b.value,src:T.value}):(v(),A("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:U,onError:G,onMousedown:K,onTouchstart:X},null,46,_1e))],2),le(ie.$slots,"default")]),_:3},8,["focus-trap-el"])],6)]),_:3})]),_:3},8,["disabled"]))}}),b1e=y1e;const iF=qt(b1e),w1e=["src","loading","crossorigin"],k1e={key:0};var C1e=fe({name:"ElImage",inheritAttrs:!1,__name:"image",props:p1e,emits:m1e,setup(t,{expose:e,emit:n}){const i=t,s=n,{t:o}=Qt(),r=Be("image"),a=Dd(),l=Y(()=>Df(Object.entries(a).filter(([G])=>/^(data-|on[A-Z])/i.test(G)||["id","style"].includes(G)))),c=Ub({excludeListeners:!0,excludeKeys:Y(()=>Object.keys(l.value))}),u=J(),d=J(!1),h=J(!0),f=J(!1),p=J(),m=J(),y=Kt&&"loading"in HTMLImageElement.prototype;let b;const k=Y(()=>[r.e("inner"),$.value&&r.e("preview"),h.value&&r.is("loading")]),C=Y(()=>{const{fit:G}=i;return Kt&&G?{objectFit:G}:{}}),$=Y(()=>{const{previewSrcList:G}=i;return Me(G)&&G.length>0}),S=Y(()=>{const{previewSrcList:G,initialIndex:K}=i;let X=K;return K>G.length-1&&(X=0),X}),M=Y(()=>i.loading==="eager"?!1:!y&&i.loading==="lazy"||i.lazy),P=()=>{Kt&&(h.value=!0,d.value=!1,u.value=i.src)};function T(G){h.value=!1,d.value=!1,s("load",G)}function I(G){h.value=!1,d.value=!0,s("error",G)}function L(G){G&&(P(),B())}const R=wie(L,200,!0);async function V(){if(!Kt)return;await ot();const{scrollContainer:G}=i;if(Po(G))m.value=G;else if(Ke(G)&&G!=="")m.value=document.querySelector(G)??void 0;else if(p.value){const X=Uie(p.value);m.value=aie(X)?void 0:X}const{stop:K}=Eie(p,([X])=>{R(X.isIntersecting)},{root:m});b=K}function B(){!Kt||!R||(b==null||b(),m.value=void 0,b=void 0)}function F(){$.value&&(f.value=!0,s("show"))}function z(){f.value=!1,s("close")}function U(G){s("switch",G)}return Te(()=>i.src,()=>{M.value?(h.value=!0,d.value=!1,B(),V()):P()}),Ft(()=>{M.value?V():P()}),e({showPreview:F}),(G,K)=>(v(),A("div",Wt({ref_key:"container",ref:p},l.value,{class:[E(r).b(),G.$attrs.class]}),[d.value?le(G.$slots,"error",{key:0},()=>[g("div",{class:q(E(r).e("error"))},x(E(o)("el.image.error")),3)]):(v(),A(ee,{key:1},[u.value!==void 0?(v(),A("img",Wt({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,w1e)):O("v-if",!0),h.value?(v(),A("div",{key:1,class:q(E(r).e("wrapper"))},[le(G.$slots,"placeholder",{},()=>[g("div",{class:q(E(r).e("placeholder"))},null,2)])],2)):O("v-if",!0)],64)),$.value?(v(),A(ee,{key:2},[f.value?(v(),D(E(iF),{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:z,onSwitch:U},hs({toolbar:w(X=>[le(G.$slots,"toolbar",ef(of(X)))]),default:w(()=>[G.$slots.viewer?(v(),A("div",k1e,[le(G.$slots,"viewer")])):O("v-if",!0)]),_:2},[G.$slots.progress?{name:"progress",fn:w(X=>[le(G.$slots,"progress",ef(of(X)))]),key:"0"}:void 0,G.$slots["viewer-error"]?{name:"viewer-error",fn:w(X=>[le(G.$slots,"viewer-error",ef(of(X)))]),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))}}),x1e=C1e;const Wo=qt(x1e),S1e=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},...xr(["ariaLabel"]),inputmode:{type:de(String),default:void 0},align:{type:de(String),default:"center"},disabledScientific:Boolean}),$1e={[dn]:(t,e)=>e!==t,blur:t=>t instanceof FocusEvent,focus:t=>t instanceof FocusEvent,[Do]:t=>wt(t)||ui(t),[Mt]:t=>wt(t)||ui(t)},A1e=["aria-label"],E1e=["aria-label"];var M1e=fe({name:"ElInputNumber",__name:"input-number",props:S1e,emits:$1e,setup(t,{expose:e,emit:n}){const i=t,s=n,{t:o}=Qt(),r=Be("input-number"),a=J(),l=In({currentValue:i.modelValue,userInput:null}),{formItem:c}=_o(),u=Y(()=>wt(i.modelValue)&&i.modelValue<=i.min),d=Y(()=>wt(i.modelValue)&&i.modelValue>=i.max),h=Y(()=>{const G=k(i.step);return nn(i.precision)?Math.max(k(i.modelValue),G):(G>i.precision&&Tt("InputNumber","precision should not be less than the decimal places of step"),i.precision)}),f=Y(()=>i.controls&&i.controlsPosition==="right"),p=Ii(),m=bs(),y=Y(()=>{if(l.userInput!==null)return l.userInput;let G=l.currentValue;if(ui(G))return"";if(wt(G)){if(Number.isNaN(G))return"";nn(i.precision)||(G=G.toFixed(i.precision))}return G}),b=(G,K)=>{if(nn(K)&&(K=h.value),K===0)return Math.round(G);let X=String(G);const W=X.indexOf(".");if(W===-1||!X.replace(".","").split("")[W+K])return G;const Q=X.length;return X.charAt(Q-1)==="5"&&(X=`${X.slice(0,Math.max(0,Q-1))}6`),Number.parseFloat(Number(X).toFixed(K))},k=G=>{if(ui(G))return 0;const K=G.toString(),X=K.indexOf(".");let W=0;return X!==-1&&(W=K.length-X-1),W},C=(G,K=1)=>wt(G)?G>=Number.MAX_SAFE_INTEGER&&K===1?(Tt("InputNumber","The value has reached the maximum safe integer limit."),G):G<=Number.MIN_SAFE_INTEGER&&K===-1?(Tt("InputNumber","The value has reached the minimum safe integer limit."),G):b(G+i.step*K):l.currentValue,$=G=>{const K=ls(G),X=ED(G);if(i.disabledScientific&&["e","E"].includes(X)){G.preventDefault();return}switch(K){case Ue.up:G.preventDefault(),S();break;case Ue.down:G.preventDefault(),M();break}},S=()=>{i.readonly||m.value||d.value||(T(C(Number(y.value)||0)),s(Do,l.currentValue),z())},M=()=>{i.readonly||m.value||u.value||(T(C(Number(y.value)||0,-1)),s(Do,l.currentValue),z())},P=(G,K)=>{const{max:X,min:W,step:Q,precision:ne,stepStrictly:Z,valueOnClear:ae}=i;X<W&&vo("InputNumber","min should not be greater than max.");let ge=Number(G);if(ui(G)||Number.isNaN(ge))return null;if(G===""){if(ae===null)return null;ge=Ke(ae)?{min:W,max:X}[ae]:ae}return Z&&(ge=b(Math.round(b(ge/Q))*Q,ne),ge!==G&&K&&s(Mt,ge)),nn(ne)||(ge=b(ge,ne)),(ge>X||ge<W)&&(ge=ge>X?X:W,K&&s(Mt,ge)),ge},T=(G,K=!0)=>{var Q;const X=l.currentValue,W=P(G);if(!K){s(Mt,W);return}l.userInput=null,!(X===W&&G)&&(s(Mt,W),X!==W&&s(dn,W,X),i.validateEvent&&((Q=c==null?void 0:c.validate)==null||Q.call(c,"change").catch(ne=>Tt(ne))),l.currentValue=W)},I=G=>{l.userInput=G;const K=G===""?null:Number(G);s(Do,K),T(K,!1)},L=G=>{const K=G!==""?Number(G):"";(wt(K)&&!Number.isNaN(K)||G==="")&&T(K),z(),l.userInput=null},R=()=>{var G,K;(K=(G=a.value)==null?void 0:G.focus)==null||K.call(G)},V=()=>{var G,K;(K=(G=a.value)==null?void 0:G.blur)==null||K.call(G)},B=G=>{s("focus",G)},F=G=>{var K,X;l.userInput=null,l.currentValue===null&&((K=a.value)!=null&&K.input)&&(a.value.input.value=""),s("blur",G),i.validateEvent&&((X=c==null?void 0:c.validate)==null||X.call(c,"blur").catch(W=>Tt(W)))},z=()=>{l.currentValue!==i.modelValue&&(l.currentValue=i.modelValue)},U=G=>{document.activeElement===G.target&&G.preventDefault()};return Te(()=>i.modelValue,(G,K)=>{const X=P(G,!0);l.userInput===null&&X!==K&&(l.currentValue=X)},{immediate:!0}),Te(()=>i.precision,()=>{l.currentValue=P(i.modelValue)}),Ft(()=>{var Q;const{min:G,max:K,modelValue:X}=i,W=(Q=a.value)==null?void 0:Q.input;if(W.setAttribute("role","spinbutton"),Number.isFinite(K)?W.setAttribute("aria-valuemax",String(K)):W.removeAttribute("aria-valuemax"),Number.isFinite(G)?W.setAttribute("aria-valuemin",String(G)):W.removeAttribute("aria-valuemin"),W.setAttribute("aria-valuenow",l.currentValue||l.currentValue===0?String(l.currentValue):""),W.setAttribute("aria-disabled",String(m.value)),!wt(X)&&X!=null){let ne=Number(X);Number.isNaN(ne)&&(ne=null),s(Mt,ne)}W.addEventListener("wheel",U,{passive:!1})}),xl(()=>{var G,K;(K=(G=a.value)==null?void 0:G.input)==null||K.setAttribute("aria-valuenow",`${l.currentValue??""}`)}),e({focus:R,blur:V}),(G,K)=>(v(),A("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:K[0]||(K[0]=Ee(()=>{},["prevent"]))},[t.controls?Re((v(),A("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(G.$slots,"decrease-icon",{},()=>[_(E(be),null,{default:w(()=>[f.value?(v(),D(E(Bd),{key:0})):(v(),D(E(cle),{key:1}))]),_:1})])],42,A1e)),[[E(wy),M]]):O("v-if",!0),t.controls?Re((v(),A("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(G.$slots,"increase-icon",{},()=>[_(E(be),null,{default:w(()=>[f.value?(v(),D(E(Zb),{key:0})):(v(),D(E(X4),{key:1}))]),_:1})])],42,E1e)),[[E(wy),S]]):O("v-if",!0),_(E(ft),{id:t.id,ref_key:"input",ref:a,type:"number",step:t.step,"model-value":y.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:$,onBlur:F,onFocus:B,onInput:I,onChange:L},hs({_:2},[G.$slots.prefix?{name:"prefix",fn:w(()=>[le(G.$slots,"prefix")]),key:"0"}:void 0,G.$slots.suffix?{name:"suffix",fn:w(()=>[le(G.$slots,"suffix")]),key:"1"}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","inputmode"])],34))}}),T1e=M1e;const r2=qt(T1e),P1e=Ge({modelValue:{type:de(Array)},max:Number,tagType:{...e1.type,default:"info"},tagEffect:e1.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}),I1e={[Mt]:t=>Me(t)||nn(t),[dn]:t=>Me(t)||nn(t),[Do]:t=>Ke(t),"add-tag":t=>Ke(t)||Me(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 L1e({wrapperRef:t,handleDragged:e,afterDragged:n}){const i=Be("input-tag"),s=Fn(),o=J(!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",nn(r)||r===m){o.value=!1;return}const y=t.value.querySelector(u(m)).getBoundingClientRect(),b=r+1!==m,k=r-1!==m,C=p.clientX-y.left,$=b?k?.5:1:-1,S=k?b?.5:0:1;C<=y.width*$?c="before":C>y.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=y.top-P.top;let L=-9999;if(c==="before")L=Math.max(y.left-P.left-T,Math.floor(-T/2));else if(c==="after"){const R=y.right-P.left;L=R+(P.width===R?Math.floor(T/2):T)}xD(s.value,{top:`${I}px`,left:`${L}px`}),o.value=!!c}function f(p){p.preventDefault(),a&&(a.style.opacity=""),c&&!nn(r)&&!nn(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 O1e(){const t=J(!1);return{hovering:t,handleMouseEnter:()=>{t.value=!0},handleMouseLeave:()=>{t.value=!1}}}function D1e({props:t,emit:e,formItem:n}){const i=bs(),s=Ii(),o=Fn(),r=J(),a=J(),l=Y(()=>["small"].includes(s.value)?"small":"default"),c=Y(()=>{var U;return(U=t.modelValue)!=null&&U.length?void 0:t.placeholder}),u=Y(()=>!(t.readonly||i.value)),d=Y(()=>{var U;return nn(t.max)?!1:(((U=t.modelValue)==null?void 0:U.length)??0)>=t.max}),h=Y(()=>{var U;return t.collapseTags?(U=t.modelValue)==null?void 0:U.slice(0,t.maxCollapseTags):t.modelValue}),f=Y(()=>{var U;return t.collapseTags?(U=t.modelValue)==null?void 0:U.slice(t.maxCollapseTags):[]}),p=U=>{const G=[...t.modelValue??[],...Us(U)];e(Mt,G),e(dn,G),e("add-tag",U),r.value=void 0},m=U=>{var X;const G=U.split(t.delimiter),K=G.length>1?G.map(W=>W.trim()).filter(Boolean):[];if(t.max){const W=t.max-(((X=t.modelValue)==null?void 0:X.length)??0);K.splice(W)}return K.length===1?K[0]:K},y=U=>{var Z;const G=(Z=U.clipboardData)==null?void 0:Z.getData("text");if(t.readonly||d.value||!t.delimiter||!G)return;const{selectionStart:K=0,selectionEnd:X=0,value:W}=U.target,Q=W.slice(0,K)+G+W.slice(X),ne=m(Q);ne.length&&(p(ne),e(Do,Q),U.preventDefault())},b=U=>{if(d.value){r.value=void 0;return}if(!V.value){if(t.delimiter&&r.value){const G=m(r.value);G.length&&p(G)}e(Do,U.target.value)}},k=U=>{var G;if(!V.value)switch(ls(U)){case t.trigger:U.preventDefault(),U.stopPropagation(),$();break;case Ue.numpadEnter:t.trigger===Ue.enter&&(U.preventDefault(),U.stopPropagation(),$());break;case Ue.backspace:!r.value&&((G=t.modelValue)!=null&&G.length)&&(U.preventDefault(),U.stopPropagation(),S(t.modelValue.length-1));break}},C=U=>{if(!(V.value||!kD()))switch(ls(U)){case Ue.space:t.trigger===Ue.space&&(U.preventDefault(),U.stopPropagation(),$());break}},$=()=>{var G;const U=(G=r.value)==null?void 0:G.trim();!U||d.value||p(U)},S=U=>{const G=(t.modelValue??[]).slice(),[K]=G.splice(U,1);e(Mt,G),e(dn,G),e("remove-tag",K,U)},M=()=>{r.value=void 0,e(Mt,void 0),e(dn,void 0),e("clear")},P=(U,G,K)=>{const X=(t.modelValue??[]).slice(),[W]=X.splice(U,1),Q=G>U&&K==="before"?-1:G<U&&K==="after"?1:0;X.splice(G+Q,0,W),e(Mt,X),e(dn,X),e("drag-tag",U,G+Q,W)},T=()=>{var U;(U=o.value)==null||U.focus()},I=()=>{var U;(U=o.value)==null||U.blur()},{wrapperRef:L,isFocused:R}=pp(o,{disabled:i,beforeBlur(U){var G;return(G=a.value)==null?void 0:G.isFocusInsideContent(U)},afterBlur(){var U;t.saveOnBlur?$():r.value=void 0,t.validateEvent&&((U=n==null?void 0:n.validate)==null||U.call(n,"blur").catch(G=>Tt(G)))}}),{isComposing:V,handleCompositionStart:B,handleCompositionUpdate:F,handleCompositionEnd:z}=W4({afterComposition:b});return Te(()=>t.modelValue,()=>{var U;t.validateEvent&&((U=n==null?void 0:n.validate)==null||U.call(n,dn).catch(G=>Tt(G)))}),{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:y,handleInput:b,handleKeydown:k,handleKeyup:C,handleAddTag:$,handleRemoveTag:S,handleClear:M,handleCompositionStart:B,handleCompositionUpdate:F,handleCompositionEnd:z,focus:T,blur:I}}function R1e({props:t,isFocused:e,hovering:n,disabled:i,inputValue:s,size:o,validateState:r,validateIcon:a,needStatusIcon:l}){const c=Dd(),u=mi(),d=Be("input-tag"),h=Be("input"),f=J(),p=J(),m=Y(()=>[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]),y=Y(()=>[c.style]),b=Y(()=>{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=Y(()=>{var I;return t.clearable&&!i.value&&!t.readonly&&(((I=t.modelValue)==null?void 0:I.length)||s.value)&&(e.value||n.value)}),C=Y(()=>u.suffix||k.value||r.value&&a.value&&l.value),$=In({innerWidth:0,collapseItemWidth:0}),S=()=>{if(!p.value)return 0;const I=window.getComputedStyle(p.value);return Number.parseFloat(I.gap||"6px")},M=()=>{$.innerWidth=Number.parseFloat(window.getComputedStyle(p.value).width)},P=()=>{$.collapseItemWidth=f.value.getBoundingClientRect().width},T=Y(()=>{if(!t.collapseTags)return{};const I=S(),L=I+a4,R=f.value&&t.maxCollapseTags===1?$.innerWidth-$.collapseItemWidth-I-L:$.innerWidth-L;return{maxWidth:`${Math.max(R,0)}px`}});return Ts(p,M),Ts(f,P),{ns:d,nsInput:h,containerKls:m,containerStyle:y,innerKls:b,showClear:k,showSuffix:C,tagStyle:T,collapseItemRef:f,innerRef:p}}const V1e=["id","minlength","maxlength","disabled","readonly","autocomplete","tabindex","placeholder","autofocus","ariaLabel"],F1e=["textContent"];var N1e=fe({name:"ElInputTag",inheritAttrs:!1,__name:"input-tag",props:P1e,emits:I1e,setup(t,{expose:e,emit:n}){const i=t,s=n,o=Ub(),r=mi(),{form:a,formItem:l}=_o(),{inputId:c}=Tl(i,{formItemContext:l}),u=Y(()=>(a==null?void 0:a.statusIcon)??!1),d=Y(()=>(l==null?void 0:l.validateState)||""),h=Y(()=>d.value&&Q4[d.value]),{inputRef:f,wrapperRef:p,tagTooltipRef:m,isFocused:y,inputValue:b,size:k,tagSize:C,placeholder:$,closable:S,disabled:M,showTagList:P,collapseTagList:T,handleDragged:I,handlePaste:L,handleInput:R,handleKeydown:V,handleKeyup:B,handleRemoveTag:F,handleClear:z,handleCompositionStart:U,handleCompositionUpdate:G,handleCompositionEnd:K,focus:X,blur:W}=D1e({props:i,emit:s,formItem:l}),{hovering:Q,handleMouseEnter:ne,handleMouseLeave:Z}=O1e(),{calculatorRef:ae,inputStyle:ge}=bD(),{dropIndicatorRef:Ce,showDropIndicator:oe,handleDragStart:pe,handleDragOver:ie,handleDragEnd:re}=L1e({wrapperRef:p,handleDragged:I,afterDragged:X}),{ns:ke,nsInput:je,containerKls:te,containerStyle:se,innerKls:me,showClear:$e,showSuffix:Se,tagStyle:Le,collapseItemRef:We,innerRef:Fe}=R1e({props:i,hovering:Q,isFocused:y,inputValue:b,disabled:M,size:k,validateState:d,validateIcon:h,needStatusIcon:u});return e({focus:X,blur:W}),(ze,Ae)=>(v(),A("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(Z)&&E(Z)(...Ze))},[E(r).prefix?(v(),A("div",{key:0,class:q(E(ke).e("prefix"))},[le(ze.$slots,"prefix")],2)):O("v-if",!0),g("div",{ref_key:"innerRef",ref:Fe,class:q(E(me))},[(v(!0),A(ee,null,we(E(P),(Ze,Ye)=>(v(),D(E(hi),{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]=Ee(()=>{},["stop"]))},{default:w(()=>[le(ze.$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:w(()=>[g("div",{ref_key:"collapseItemRef",ref:We,class:q(E(ke).e("collapse-tag"))},[_(E(hi),{closable:!1,size:E(C),type:t.tagType,effect:t.tagEffect,"disable-transitions":""},{default:w(()=>[N(" + "+x(t.modelValue.length-t.maxCollapseTags),1)]),_:1},8,["size","type","effect"])],2)]),content:w(()=>[g("div",{class:q(E(ke).e("input-tag-list"))},[(v(!0),A(ee,null,we(E(T),(Ze,Ye)=>(v(),D(E(hi),{key:Ye,size:E(C),closable:E(S),type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:it=>E(F)(Ye+t.maxCollapseTags)},{default:w(()=>[le(ze.$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",Wt({id:E(c),ref_key:"inputRef",ref:f,"onUpdate:modelValue":Ae[1]||(Ae[1]=Ze=>hn(b)?b.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($),autofocus:t.autofocus,ariaLabel:t.ariaLabel,class:E(ke).e("input"),style:E(ge),onCompositionstart:Ae[2]||(Ae[2]=(...Ze)=>E(U)&&E(U)(...Ze)),onCompositionupdate:Ae[3]||(Ae[3]=(...Ze)=>E(G)&&E(G)(...Ze)),onCompositionend:Ae[4]||(Ae[4]=(...Ze)=>E(K)&&E(K)(...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(B)&&E(B)(...Ze))}),null,16,V1e),[[md,E(b)]]),g("span",{ref_key:"calculatorRef",ref:ae,"aria-hidden":"true",class:q(E(ke).e("input-calculator")),textContent:x(E(b))},null,10,F1e)],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(),A("div",{key:1,class:q(E(ke).e("suffix"))},[le(ze.$slots,"suffix"),E($e)?(v(),D(E(be),{key:0,class:q([E(ke).e("icon"),E(ke).e("clear")]),onMousedown:Ee(E(Dt),["prevent"]),onClick:E(z)},{default:w(()=>[(v(),D(Ct(t.clearIcon)))]),_:1},8,["class","onMousedown","onClick"])):O("v-if",!0),d.value&&h.value&&u.value?(v(),D(E(be),{key:1,class:q([E(je).e("icon"),E(je).e("validateIcon"),E(je).is("loading",d.value==="validating")])},{default:w(()=>[(v(),D(Ct(h.value)))]),_:1},8,["class"])):O("v-if",!0)],2)):O("v-if",!0)],38))}}),B1e=N1e;const z1e=qt(B1e),H1e=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}}),U1e={click:t=>t instanceof MouseEvent},j1e=["href","target"];var W1e=fe({name:"ElLink",__name:"link",props:H1e,emits:U1e,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"},Y(()=>Jn(n.underline)));const o=Be("link"),r=Y(()=>{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=Y(()=>{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("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(be),{key:0},{default:w(()=>[(v(),D(Ct(t.icon)))]),_:1})):O("v-if",!0),c.$slots.default?(v(),A("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,j1e))}}),Y1e=W1e;const k8=qt(Y1e),oF=Symbol("elPaginationKey"),q1e=Ge({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:ds}}),G1e={click:t=>t instanceof MouseEvent},X1e=["disabled","aria-label","aria-disabled"],K1e={key:0};var Z1e=fe({name:"ElPaginationPrev",__name:"prev",props:q1e,emits:G1e,setup(t){const e=t,{t:n}=Qt(),i=Y(()=>e.disabled||e.currentPage<=1);return(s,o)=>(v(),A("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(),A("span",K1e,x(s.prevText),1)):(v(),D(E(be),{key:1},{default:w(()=>[(v(),D(Ct(s.prevIcon)))]),_:1}))],8,X1e))}}),J1e=Z1e;const Q1e=Ge({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:ds}}),eve=["disabled","aria-label","aria-disabled"],tve={key:0};var nve=fe({name:"ElPaginationNext",__name:"next",props:Q1e,emits:["click"],setup(t){const e=t,{t:n}=Qt(),i=Y(()=>e.disabled||e.currentPage===e.pageCount||e.pageCount===0);return(s,o)=>(v(),A("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(),A("span",tve,x(s.nextText),1)):(v(),D(E(be),{key:1},{default:w(()=>[(v(),D(Ct(s.nextIcon)))]),_:1}))],8,eve))}}),sve=nve;const C8=()=>qe(oF,{}),ive=Ge({pageSize:{type:Number,required:!0},pageSizes:{type:de(Array),default:()=>ri([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 ove=fe({name:"ElPaginationSizes",__name:"sizes",props:ive,emits:["page-size-change"],setup(t,{emit:e}){const n=t,i=e,{t:s}=Qt(),o=Be("pagination"),r=C8(),a=J(n.pageSize);Te(()=>n.pageSizes,(u,d)=>{Wi(u,d)||Me(u)&&i("page-size-change",u.includes(n.pageSize)?n.pageSize:n.pageSizes[0])}),Te(()=>n.pageSize,u=>{a.value=u});const l=Y(()=>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(),A("span",{class:q(E(o).e("sizes"))},[_(E(Jt),{"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:w(()=>[(v(!0),A(ee,null,we(l.value,h=>(v(),D(E(sn),{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))}}),rve=ove;const ave=Ge({size:{type:String,values:$l}}),lve=["disabled"];var cve=fe({name:"ElPaginationJumper",__name:"jumper",props:ave,setup(t){const{t:e}=Qt(),n=Be("pagination"),{pageCount:i,disabled:s,currentPage:o,changeEvent:r}=C8(),a=J(),l=Y(()=>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(),A("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(ft),{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,lve))}}),uve=cve;const dve=Ge({total:{type:Number,default:1e3}}),hve=["disabled"];var fve=fe({name:"ElPaginationTotal",__name:"total",props:dve,setup(t){const{t:e}=Qt(),n=Be("pagination"),{disabled:i}=C8();return(s,o)=>(v(),A("span",{class:q(E(n).e("total")),disabled:E(i)},x(E(e)("el.pagination.total",{total:s.total})),11,hve))}}),pve=fve;const mve=Ge({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),gve=["aria-current","aria-label","tabindex"],vve=["tabindex","aria-label"],_ve=["aria-current","aria-label","tabindex"],yve=["tabindex","aria-label"],bve=["aria-current","aria-label","tabindex"];var wve=fe({name:"ElPaginationPager",__name:"pager",props:mve,emits:[dn],setup(t,{emit:e}){const n=t,i=e,s=Be("pager"),o=Be("icon"),{t:r}=Qt(),a=J(!1),l=J(!1),c=J(!1),u=J(!1),d=J(!1),h=J(!1),f=Y(()=>{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 B=V;B<T;B++)R.push(B)}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 B=P-V;B<=P+V;B++)R.push(B)}else for(let V=2;V<T;V++)R.push(V);return R}),p=Y(()=>["more","btn-quickprev",o.b(),s.is("disabled",n.disabled)]),m=Y(()=>["more","btn-quicknext",o.b(),s.is("disabled",n.disabled)]),y=Y(()=>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 b(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")&&$(S)}function $(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(),A("ul",{class:q(E(s).b()),onClick:$,onKeyup:ut(C,["enter"])},[S.pageCount>0?(v(),A("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:y.value}," 1 ",10,gve)):O("v-if",!0),a.value?(v(),A("li",{key:1,class:q(p.value),tabindex:y.value,"aria-label":E(r)("el.pagination.prevPages",{pager:S.pagerCount-2}),onMouseenter:M[0]||(M[0]=P=>b(!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(sC),{key:1}))],42,vve)):O("v-if",!0),(v(!0),A(ee,null,we(f.value,P=>(v(),A("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:y.value},x(P),11,_ve))),128)),l.value?(v(),A("li",{key:2,class:q(m.value),tabindex:y.value,"aria-label":E(r)("el.pagination.nextPages",{pager:S.pagerCount-2}),onMouseenter:M[4]||(M[4]=P=>b()),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(sC),{key:1}))],42,yve)):O("v-if",!0),S.pageCount>1?(v(),A("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:y.value},x(S.pageCount),11,bve)):O("v-if",!0)],34))}}),kve=wve;const Ri=t=>typeof t!="number",Cve=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:()=>ri([10,20,30,40,50,100])},popperClass:{type:String,default:""},popperStyle:{type:de([String,Object])},prevText:{type:String,default:""},prevIcon:{type:ds,default:()=>bd},nextText:{type:String,default:""},nextIcon:{type:ds,default:()=>Hr},teleported:{type:Boolean,default:!0},small:Boolean,size:Zi,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean,appendSizeTo:String}),xve={"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)},xA="ElPagination";var Sve=fe({name:xA,props:Cve,emits:xve,setup(t,{emit:e,slots:n}){const{t:i}=Qt(),s=Be("pagination"),o=pt().vnode.props||{},r=sR(),a=Y(()=>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"},Y(()=>!!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=Y(()=>{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=J(Ri(t.defaultPageSize)?10:t.defaultPageSize),h=J(Ri(t.defaultCurrentPage)?1:t.defaultCurrentPage),f=Y({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=Y(()=>{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=Y({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 y(S){m.value=S}function b(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 $(S,M){S&&(S.props||(S.props={}),S.props.class=[S.props.class,M].join(" "))}return Pt(oF,{pageCount:p,disabled:Y(()=>t.disabled),currentPage:m,changeEvent:y,handleSizeChange:b}),()=>{var R;if(!u.value)return Tt(xA,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(J1e,{disabled:t.disabled,currentPage:m.value,prevText:t.prevText,prevIcon:t.prevIcon,onClick:k}),jumper:bt(uve,{size:a.value}),pager:bt(kve,{currentPage:m.value,pageCount:p.value,pagerCount:t.pagerCount,onChange:y,disabled:t.disabled}),next:bt(sve,{disabled:t.disabled,currentPage:m.value,pageCount:p.value,nextText:t.nextText,nextIcon:t.nextIcon,onClick:C}),sizes:bt(rve,{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(pve,{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])}),$(S[0],s.is("first")),$(S[S.length-1],s.is("last")),L&&M.length>0&&($(M[0],s.is("first")),$(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 $ve=qt(Sve),Ave=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}%`}}),Eve=["aria-valuenow"],Mve={viewBox:"0 0 100 100"},Tve=["d","stroke","stroke-linecap","stroke-width"],Pve=["d","stroke","opacity","stroke-linecap","stroke-width"],Ive={key:0};var Lve=fe({name:"ElProgress",__name:"progress",props:Ave,setup(t){const e={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},n=t,i=Be("progress"),s=Y(()=>{const C={width:`${n.percentage}%`,animationDuration:`${n.duration}s`},$=k(n.percentage);return $.includes("gradient")?C.background=$:C.backgroundColor=$,C}),o=Y(()=>(n.strokeWidth/n.width*100).toFixed(1)),r=Y(()=>["circle","dashboard"].includes(n.type)?Number.parseInt(`${50-Number.parseFloat(o.value)/2}`,10):0),a=Y(()=>{const C=r.value,$=n.type==="dashboard";return`
73 M 50 50
74 m 0 ${$?"":"-"}${C}
75 a ${C} ${C} 0 1 1 0 ${$?"-":""}${C*2}
76 a ${C} ${C} 0 1 1 0 ${$?"":"-"}${C*2}
77 `}),l=Y(()=>2*Math.PI*r.value),c=Y(()=>n.type==="dashboard"?.75:1),u=Y(()=>`${-1*l.value*(1-c.value)/2}px`),d=Y(()=>({strokeDasharray:`${l.value*c.value}px, ${l.value}px`,strokeDashoffset:u.value})),h=Y(()=>({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=Y(()=>{let C;return n.color?C=k(n.percentage):C=e[n.status]||e.default,C}),p=Y(()=>n.status==="warning"?J4:n.type==="line"?n.status==="success"?G4:Zc:n.status==="success"?q4:Bo),m=Y(()=>n.type==="line"?12+n.strokeWidth*.4:n.width*.111111+2),y=Y(()=>n.format(n.percentage));function b(C){const $=100/C.length;return C.map((S,M)=>Ke(S)?{color:S,percentage:(M+1)*$}:S).sort((S,M)=>S.percentage-M.percentage)}const k=C=>{var S;const{color:$}=n;if(et($))return $(C);if(Ke($))return $;{const M=b($);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,$)=>(v(),A("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(),A("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(),A("div",{key:0,class:q(E(i).be("bar","innerText"))},[le(C.$slots,"default",{percentage:t.percentage},()=>[g("span",null,x(y.value),1)])],2)):O("v-if",!0)],6)],6)],2)):(v(),A("div",{key:1,class:q(E(i).b("circle")),style:Xe({height:`${t.width}px`,width:`${t.width}px`})},[(v(),A("svg",Mve,[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,Tve),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,Pve)]))],6)),(t.showText||C.$slots.default)&&!t.textInside?(v(),A("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(be),{key:1},{default:w(()=>[(v(),D(Ct(p.value)))]),_:1})):(v(),A("span",Ive,x(y.value),1))])],6)):O("v-if",!0)],10,Eve))}}),Ove=Lve;const a2=qt(Ove),Dve="horizontal",Rve=({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=>{zie(s);let{deltaX:c,deltaY:u}=l;l.shiftKey&&u!==0&&(c=u,u=0);const d=n.value===Dve?c:u;r(d)||(o+=d,!M4()&&d!==0&&l.preventDefault(),s=Yg(()=>{i(o),o=0}))}}},Vve=Ge({animated:Boolean,count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:de([Number,Object])}}),Fve=Ge({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}});var Nve=fe({name:"ElSkeletonItem",__name:"skeleton-item",props:Fve,setup(t){const e=Be("skeleton");return(n,i)=>(v(),A("div",{class:q([E(e).e("item"),E(e).e(t.variant)])},[t.variant==="image"?(v(),D(E(ble),{key:0})):O("v-if",!0)],2))}}),$y=Nve,Bve=fe({name:"ElSkeleton",__name:"skeleton",props:Vve,setup(t,{expose:e}){const n=t,i=Be("skeleton"),s=Joe(Sn(n,"loading"),n.throttle);return e({uiLoading:s}),(o,r)=>E(s)?(v(),A("div",Wt({key:0,class:[E(i).b(),E(i).is("animated",t.animated)]},o.$attrs),[(v(!0),A(ee,null,we(t.count,a=>(v(),A(ee,{key:a},[E(s)?le(o.$slots,"template",{key:a},()=>[_($y,{class:q(E(i).is("first")),variant:"p"},null,8,["class"]),(v(!0),A(ee,null,we(t.rows,l=>(v(),D($y,{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(Wt({key:1},o.$attrs)))}}),zve=Bve;const Nt=qt(zve,{SkeletonItem:$y});Os($y);const rF=t=>["",...$l].includes(t),Hve=Ge({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:void 0},loading:Boolean,size:{type:String,validator:rF},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]},...xr(["ariaLabel"])}),Uve={[Mt]:t=>Jn(t)||Ke(t)||wt(t),[dn]:t=>Jn(t)||Ke(t)||wt(t),[Do]:t=>Jn(t)||Ke(t)||wt(t)},jve=["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex"],Wve=["aria-hidden"],Yve={key:1},qve={key:1},Gve=["aria-hidden"],zw="ElSwitch";var Xve=fe({name:zw,__name:"switch",props:Hve,emits:Uve,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(Y(()=>{if(i.loading)return!0})),u=J(i.modelValue!==!1),d=Fn(),h=Y(()=>[a.b(),a.m(r.value),a.is("disabled",c.value),a.is("checked",b.value)]),f=Y(()=>[a.e("label"),a.em("label","left"),a.is("active",!b.value)]),p=Y(()=>[a.e("label"),a.em("label","right"),a.is("active",b.value)]),m=Y(()=>({width:fi(i.width)}));Te(()=>i.modelValue,()=>{u.value=!0});const y=Y(()=>u.value?i.modelValue:!1),b=Y(()=>y.value===i.activeValue);[i.activeValue,i.inactiveValue].includes(y.value)||(s(Mt,i.inactiveValue),s(dn,i.inactiveValue),s(Do,i.inactiveValue)),Te(b,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=b.value?i.inactiveValue:i.activeValue;s(Mt,S),s(dn,S),s(Do,S),ot(()=>{d.value.checked=b.value})},C=()=>{if(c.value)return;const{beforeChange:S}=i;if(!S){k();return}const M=S();[dd(M),Jn(M)].includes(!0)||vo(zw,"beforeChange must return type `Promise<boolean>` or `boolean`"),dd(M)?M.then(P=>{P&&k()}).catch(P=>{Tt(zw,`some error occurred: ${P}`)}):M&&k()},$=()=>{var S,M;(M=(S=d.value)==null?void 0:S.focus)==null||M.call(S)};return Ft(()=>{d.value.checked=b.value}),e({focus:$,checked:b}),(S,M)=>(v(),A("div",{class:q(h.value),onClick:Ee(C,["prevent"])},[g("input",{id:E(l),ref_key:"input",ref:d,class:q(E(a).e("input")),type:"checkbox",role:"switch","aria-checked":b.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,jve),!t.inlinePrompt&&(t.inactiveIcon||t.inactiveText||S.$slots.inactive)?(v(),A("span",{key:0,class:q(f.value)},[le(S.$slots,"inactive",{},()=>[t.inactiveIcon?(v(),D(E(be),{key:0},{default:w(()=>[(v(),D(Ct(t.inactiveIcon)))]),_:1})):O("v-if",!0),!t.inactiveIcon&&t.inactiveText?(v(),A("span",{key:1,"aria-hidden":b.value},x(t.inactiveText),9,Wve)):O("v-if",!0)])],2)):O("v-if",!0),g("span",{class:q(E(a).e("core")),style:Xe(m.value)},[t.inlinePrompt?(v(),A("div",{key:0,class:q(E(a).e("inner"))},[b.value?(v(),A("div",{key:1,class:q(E(a).e("inner-wrapper"))},[le(S.$slots,"active",{},()=>[t.activeIcon?(v(),D(E(be),{key:0},{default:w(()=>[(v(),D(Ct(t.activeIcon)))]),_:1})):O("v-if",!0),!t.activeIcon&&t.activeText?(v(),A("span",qve,x(t.activeText),1)):O("v-if",!0)])],2)):(v(),A("div",{key:0,class:q(E(a).e("inner-wrapper"))},[le(S.$slots,"inactive",{},()=>[t.inactiveIcon?(v(),D(E(be),{key:0},{default:w(()=>[(v(),D(Ct(t.inactiveIcon)))]),_:1})):O("v-if",!0),!t.inactiveIcon&&t.inactiveText?(v(),A("span",Yve,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(be),{key:0,class:q(E(a).is("loading"))},{default:w(()=>[_(E(Uf))]),_:1},8,["class"])):b.value?le(S.$slots,"active-action",{key:1},()=>[t.activeActionIcon?(v(),D(E(be),{key:0},{default:w(()=>[(v(),D(Ct(t.activeActionIcon)))]),_:1})):O("v-if",!0)]):b.value?O("v-if",!0):le(S.$slots,"inactive-action",{key:2},()=>[t.inactiveActionIcon?(v(),D(E(be),{key:0},{default:w(()=>[(v(),D(Ct(t.inactiveActionIcon)))]),_:1})):O("v-if",!0)])],2)],6),!t.inlinePrompt&&(t.activeIcon||t.activeText||S.$slots.active)?(v(),A("span",{key:1,class:q(p.value)},[le(S.$slots,"active",{},()=>[t.activeIcon?(v(),D(E(be),{key:0},{default:w(()=>[(v(),D(Ct(t.activeIcon)))]),_:1})):O("v-if",!0),!t.activeIcon&&t.activeText?(v(),A("span",{key:1,"aria-hidden":!b.value},x(t.activeText),9,Gve)):O("v-if",!0)])],2)):O("v-if",!0)],2))}}),Kve=Xve;const eu=qt(Kve),Hw=function(t){var e;return(e=t.target)==null?void 0:e.closest("td")},Zve=function(t,e,n,i,s){if(!e&&!i&&(!s||Me(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?aD(Us(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)},aF=function(t,e){let n=null;return t.columns.forEach(i=>{i.id===e&&(n=i)}),n},Jve=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},SA=function(t,e,n){const i=(e.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return i?aF(t,i[0]):null},ai=(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[ai(r,e)]={row:r,index:a},n){const l=r[i];Me(l)&&Object.assign(o,lf(l,e,!0,i))}}),o};function Qve(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];nn(s)||(n[i]=s)}return n}function x8(t){return t===""||nn(t)||(t=Number.parseInt(t,10),Number.isNaN(t)&&(t="")),t}function lF(t){return t===""||nn(t)||(t=x8(t),Number.isNaN(t)&&(t=80)),t}function e0e(t){return wt(t)?t:Ke(t)?/^\d+(?:px)?$/.test(t)?Number.parseInt(t,10):t:null}function t0e(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...i)=>e(n(...i)))}function Ay(t,e,n,i,s,o,r){let a=o??0,l=!1;const u=(()=>{if(!r)return t.indexOf(e);const m=ai(e,r);return t.findIndex(y=>ai(y,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 y=0;const b=(i==null?void 0:i.children)&&m[i.children];return b&&Me(b)&&(y+=b.length,b.forEach(k=>{y+=p(k)})),y};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)&&Me(e[i.children])&&e[i.children].forEach(m=>{const y=Ay(t,m,n??!d,i,s,a+1,r);a+=p(m)+1,y&&(l=y)}),l}function n0e(t,e,n="children",i="hasChildren",s=!1){const o=a=>!(Me(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 s0e=(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 i0e(t,e,n,i,s,o){var f;const r=s0e(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;lD(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,y;(y=(m=u.component)==null?void 0:m.exposed)!=null&&y.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 cF(t){return t.children?aD(t.children,cF):[t]}function $A(t,e){return t+e.colSpan}const uF=(t,e,n,i)=>{let s=0,o=t;const r=n.states.columns.value;if(i){const l=cF(i[t]);s=r.slice(0,r.indexOf(l[0])).reduce($A,0),o=s+l.reduce($A,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}:{}},S8=(t,e,n,i,s,o=0)=>{const r=[],{direction:a,start:l,after:c}=uF(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 AA(t,e){return t+(Bb(e.realWidth)||Number.isNaN(e.realWidth)?Number(e.width):e.realWidth)}const $8=(t,e,n,i)=>{const{direction:s,start:o=0,after:r=0}=uF(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(AA,0):a.right=c.slice(r+1).reverse().reduce(AA,0),a},qf=(t,e)=>{t&&(Number.isNaN(t[e])||(t[e]=`${t[e]}px`))};function dF(t){return t.some(e=>is(e)?!(e.type===Zn||e.type===ee&&!dF(e.children)):!0)?t:null}function o0e(t){const e=pt(),n=J(!1),i=J([]),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[ai(h,u)]&&s(h,f))}else i.value=[]},toggleRowExpansion:(c,u)=>{const d=(t.data.value||[]).indexOf(c);d>-1&&!s(c,d)||Ay(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)[ai(c,u)]:i.value.includes(c)},states:{expandRows:i,defaultExpandAll:n}}}function r0e(t){const e=pt(),n=J(null),i=J(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=>ai(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(ai(d,c)):(i.value=null,e.emit("current-change",null,d)):n.value&&(r(n.value),o())},states:{_currentRowKey:n,currentRow:i}}}function a0e(t){const e=J([]),n=J({}),i=J(16),s=J(!1),o=J({}),r=J("hasChildren"),a=J("children"),l=J(!1),c=pt(),u=Y(()=>t.rowKey.value?h(t.data.value||[]):{}),d=Y(()=>{const $=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=ai(I,$);T.children.push(L),I[r.value]&&!M[L]&&(M[L]={children:[]})}),M[P]=T}}),M}),h=$=>{const S=t.rowKey.value,M={};return n0e($,(P,T,I)=>{const L=ai(P,S);Me(T)?M[L]={children:T.map(R=>ai(R,S)),level:I}:s.value&&(M[L]={children:[],lazy:!0,level:I})},a.value,r.value,s.value),M},f=($=!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),B=[],F=(U,G)=>{if($)return e.value?S||e.value.includes(G):!!(S||U!=null&&U.expanded);{const K=S||e.value&&e.value.includes(G);return!!(U!=null&&U.expanded||K)}};T.forEach(U=>{const G=V[U],K={...M[U]};if(K.expanded=F(G,U),K.lazy){const{loaded:X=!1,loading:W=!1}=G||{};K.loaded=!!X,K.loading=!!W,B.push(U)}I[U]=K});const z=Object.keys(P);s.value&&z.length&&B.length&&z.forEach(U=>{var X;const G=V[U],K=P[U].children;if(B.includes(U)){if(((X=I[U].children)==null?void 0:X.length)!==0)throw new Error("[ElTable]children must be an empty array.");I[U].children=K}else{const{loaded:W=!1,loading:Q=!1}=G||{};I[U]={lazy:!0,loaded:!!W,loading:!!Q,expanded:F(G,U),children:K,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=$=>{e.value=$,f()},m=$=>s.value&&$&&"loaded"in $&&!$.loaded,y=($,S)=>{c.store.assertRowKey();const M=t.rowKey.value,P=ai($,M),T=P&&n.value[P];if(P&&T&&"expanded"in T){const I=T.expanded;S=nn(S)?!T.expanded:S,n.value[P].expanded=S,I!==S&&c.emit("expand-change",$,S),S&&m(T)&&k($,P,T),c.store.updateTableScrollY()}},b=$=>{c.store.assertRowKey();const S=t.rowKey.value,M=ai($,S),P=n.value[M];m(P)?k($,M,P):y($,void 0)},k=($,S,M)=>{const{load:P}=c.props;P&&!n.value[S].loaded&&(n.value[S].loading=!0,P($,M,T=>{if(!Me(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",$,!0)}))};return{loadData:k,loadOrToggle:b,toggleTreeExpansion:y,updateTreeExpandKeys:p,updateTreeData:f,updateKeyChildren:($,S)=>{const{lazy:M,rowKey:P}=c.props;if(M){if(!P)throw new Error("[Table] rowKey is required in updateKeyChild");o.value[$]&&(o.value[$]=S)}},normalize:h,states:{expandRowKeys:e,treeData:n,indent:i,lazy:s,lazyTreeNodeMap:o,lazyColumnIdentifier:r,childrenColumnName:a,checkStrictly:l}}}const l0e=(t,e)=>{const n=e.sortingColumn;return!n||Ke(n.sortable)?t:Zve(t,e.sortProp,e.sortOrder,n.sortMethod,n.sortBy)},B0=t=>{const e=[];return t.forEach(n=>{n.children&&n.children.length>0?e.push.apply(e,B0(n.children)):e.push(n)}),e};function c0e(){var Lt;const t=pt(),{size:e}=go((Lt=t.proxy)==null?void 0:Lt.$props),n=J(null),i=J([]),s=J([]),o=J(!1),r=J([]),a=J([]),l=J([]),c=J([]),u=J([]),d=J([]),h=J([]),f=J([]),p=[],m=J(0),y=J(0),b=J(0),k=J(!1),C=J([]),$=J(!1),S=J(!1),M=J(null),P=J(null),T=J({}),I=J(null),L=J(null),R=J(null),V=J(null),B=J(null),F=Y(()=>n.value?lf(C.value,n.value):void 0);Te(i,()=>{var Je;t.state&&(K(!1),t.props.tableLayout==="auto"&&((Je=t.refs.tableHeaderRef)==null||Je.updateFixedColumnStyle()))},{deep:!0});const z=()=>{if(!n.value)throw new Error("[ElTable] prop row-key is required")},U=Je=>{var dt;(dt=Je.children)==null||dt.forEach(mt=>{mt.fixed=Je.fixed,U(mt)})},G=()=>{r.value.forEach(De=>{U(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=B0(mt),Oe=B0(c.value),ce=B0(u.value);m.value=_e.length,y.value=Oe.length,b.value=ce.length,l.value=Array.from(Oe).concat(_e).concat(ce),o.value=c.value.length>0||u.value.length>0},K=(Je,dt=!1)=>{Je&&G(),dt?t.state.doLayout():t.state.debouncedUpdateLayout()},X=Je=>F.value?!!F.value[ai(Je,n.value)]:C.value.includes(Je),W=()=>{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 ce in F.value)zt(F.value,ce)&&!Oe[ce]&&Je.push(F.value[ce].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(),Z=(Je,dt,mt=!0,_e=!1)=>{var ce,De,gt,bn;const Oe={children:(De=(ce=t==null?void 0:t.store)==null?void 0:ce.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(Ay(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,ce={children:Oe.value,checkStrictly:!1};i.value.forEach((bn,gs)=>{const du=gs+mt;Ay(C.value,bn,Je,ce,M.value,du,_e)&&(dt=!0),mt+=Ce(ai(bn,_e))}),dt&&t.emit("selection-change",C.value?C.value.slice():[]),t.emit("select-all",(C.value||[]).slice())},ge=()=>{var ce;if(((ce=i.value)==null?void 0:ce.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(X(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(ce=>{mt+=Ce(ce)})),mt},oe=(Je,dt)=>{const mt={};return Us(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=aF({columns:l.value},dt);_e&&_e.filterMethod&&(Je=Je.filter(Oe=>mt.some(ce=>_e.filterMethod.call(null,ce,Oe,_e))))}),I.value=Je},re=()=>{i.value=l0e(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]),Me(Je)){const Oe=Je.map(ce=>Jve({columns:l.value},ce));_e.forEach(ce=>{const De=Oe.find(gt=>gt.id===ce);De&&(De.filteredValue=[])}),t.store.commit("filterChange",{column:Oe,values:[],silent:!0,multi:!0})}else _e.forEach(Oe=>{const ce=l.value.find(De=>De.id===Oe);ce&&(ce.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}=o0e({data:i,rowKey:n}),{updateTreeExpandKeys:We,toggleTreeExpansion:Fe,updateTreeData:ze,updateKeyChildren:Ae,loadOrToggle:Ze,states:Ye}=a0e({data:i,rowKey:n}),{updateCurrentRowData:it,updateCurrentRow:ye,setCurrentRowKey:ve,states:Pe}=r0e({data:i,rowKey:n});return{assertRowKey:z,updateColumns:G,scheduleLayout:K,isSelected:X,clearSelection:W,cleanSelection:Q,getSelectionRows:ne,toggleRowSelection:Z,_toggleAllSelection:ae,toggleAllSelection:null,updateAllSelected:ge,updateFilters:oe,updateCurrentRow:ye,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:ze,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:y,rightFixedLeafColumnsLength:b,isAllSelected:k,selection:C,reserveSelection:$,selectOnIndeterminate:S,selectable:M,rowExpandable:P,filters:T,filteredData:I,sortingColumn:L,sortProp:R,sortOrder:V,hoverRow:B,...Se,...Ye,...Pe}}}function $C(t,e){return t.map(n=>{var i;return n.id===e.id?e:((i=n.children)!=null&&i.length&&(n.children=$C(n.children,e)),n)})}function AC(t){t.forEach(e=>{var n,i;e.no=(n=e.getColumnIndex)==null?void 0:n.call(e),(i=e.children)!=null&&i.length&&AC(e.children)}),t.sort((e,n)=>e.no-n.no)}function u0e(){const t=pt(),e=c0e(),n=Be("table"),{t:i}=Qt();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=$C(d,c)):(d.push(l),h=d),AC(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&&(AC(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=$C(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);Bb(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 A8={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 d0e(t,e){if(!t)throw new Error("Table is required.");const n=u0e();return n.toggleAllSelection=_d(n._toggleAllSelection,10),Object.keys(A8).forEach(i=>{hF(fF(e,i),i,n)}),h0e(n,e),n}function h0e(t,e){Object.keys(A8).forEach(n=>{Te(()=>fF(e,n),i=>{hF(i,n,t)})})}function hF(t,e,n){let i=t,s=A8[e];yt(s)&&(i=i||s.default,s=s.key),n.states[s].value=i}function fF(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 f0e=class{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=J(null),this.scrollX=J(!1),this.scrollY=J(!1),this.bodyWidth=J(null),this.fixedWidth=J(null),this.rightFixedWidth=J(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(Bb(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(!Kt)return;const n=this.table.vnode.el;if(t=e0e(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(!Kt)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 ia=Symbol("ElTable"),pF=t=>{const e=[];return t.forEach(n=>{n.children?(e.push(n),e.push.apply(e,pF(n.children))):e.push(n)}),e},mF=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 pF(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 p0e(t){const e=qe(ia),n=Y(()=>mF(t.store.states.originColumns.value));return{isGroup:Y(()=>{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 m0e=fe({name:"ElTableFilterPanel",components:{ElCheckbox:Yt,ElCheckboxGroup:s2,ElScrollbar:qs,ElTooltip:Ss,ElIcon:be,ArrowDown:Bd,ArrowUp:Zb},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}=Qt(),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=J(null),r=J(null),a=J(0),l=Y(()=>t.column&&t.column.filters),c=Y(()=>t.column&&t.column.filterClassName?`${i.b()} ${t.column.filterClassName}`:i.b()),u=Y({get:()=>{var P;return(((P=t.column)==null?void 0:P.filteredValue)||[])[0]},set:P=>{d.value&&(ka(P)?d.value.splice(0,1):d.value.splice(0,1,P))}}),d=Y({get(){return t.column?t.column.filteredValue||[]:[]},set(P){var T;t.column&&((T=t.upDataColumn)==null||T.call(t,"filteredValue",P))}}),h=Y(()=>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()},y=()=>{d.value=[],k(d.value),p()},b=(P,T)=>{u.value=P,a.value=T,ka(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))},$=()=>{var P;t.column&&((P=t.upDataColumn)==null||P.call(t,"filterOpened",!1))},S=()=>{if(ka(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:y,handleSelect:b,isPropAbsent:ka,isActive:f,t:n,ns:i,tooltipRef:o,rootRef:r,checkedIndex:a,handleShowTooltip:C,handleHideTooltip:$,handleKeydown:P=>{var V,B;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)b(null,0);else{const F=(l.value||[])[L-1];F.value&&b(F.value,L)}break;default:R=!1;break}R&&P.preventDefault(),a.value=L,(B=(V=r.value)==null?void 0:V.querySelector(`.${i.e("list-item")}:nth-child(${L+1})`))==null||B.focus()}}}});const g0e=["disabled"],v0e=["tabindex","aria-checked"],_0e=["tabindex","aria-checked","onClick"],y0e=["aria-label"];function b0e(t,e,n,i,s,o){const r=H("el-checkbox"),a=H("el-checkbox-group"),l=H("el-scrollbar"),c=H("arrow-up"),u=H("arrow-down"),d=H("el-icon"),h=H("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:w(()=>[t.multiple?(v(),A("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:w(()=>[_(a,{modelValue:t.filteredValue,"onUpdate:modelValue":e[0]||(e[0]=f=>t.filteredValue=f),class:q(t.ns.e("checkbox-group"))},{default:w(()=>[(v(!0),A(ee,null,we(t.filters,f=>(v(),D(r,{key:f.value,value:f.value},{default:w(()=>[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,g0e),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(),A("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,v0e),(v(!0),A(ee,null,we(t.filters,(f,p)=>(v(),A("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,_0e))),128))],34))]),default:w(()=>{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:w(()=>[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,y0e)]}),_:3},8,["placement","popper-class","append-to","onShow","onHide"])}var w0e=gi(m0e,[["render",b0e]]);function E8(t){const e=pt();Od(()=>{n.value.addObserver(e)}),Ft(()=>{i(n.value),s(n.value)}),xl(()=>{i(n.value),s(n.value)}),Sl(()=>{n.value.removeObserver(e)});const n=Y(()=>{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 k0e(t,e){const n=pt(),i=qe(ia),s=m=>{m.stopPropagation()},o=(m,y)=>{!y.filters&&y.sortable?p(m,y,!1):y.filterable&&!y.sortable&&s(m),i==null||i.emit("header-click",y,m)},r=(m,y)=>{i==null||i.emit("header-contextmenu",y,m)},a=J(null),l=J(!1),c=J(),u=(m,y)=>{var b,k,C;if(Kt&&!(y.children&&y.children.length>0)&&a.value&&t.border&&a.value.id===y.id){l.value=!0;const $=i;e("set-drag-visible",!0);const S=(b=$==null?void 0:$.vnode.el)==null?void 0:b.getBoundingClientRect().left,M=(C=(k=n==null?void 0:n.vnode)==null?void 0:k.el)==null?void 0:C.querySelector(`th.${y.id}`),P=M.getBoundingClientRect(),T=P.left-S+30;yd(M,"noclick"),c.value={startMouseLeft:m.clientX,startLeft:P.right-S,startColumnLeft:P.left-S,tableLeft:S};const I=$==null?void 0:$.refs.resizeProxy;I.style.left=`${c.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const L=V=>{const B=V.clientX-c.value.startMouseLeft,F=c.value.startLeft+B;I.style.left=`${Math.max(T,F)}px`},R=()=>{if(l.value){const{startColumnLeft:V,startLeft:B}=c.value;y.width=y.realWidth=Number.parseInt(I.style.left,10)-V,$==null||$.emit("header-dragend",y.width,B-V,y,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(()=>{Ma(M,"noclick")},0)};document.addEventListener("mousemove",L),document.addEventListener("mouseup",R)}},d=(m,y)=>{var I;if(!t.border||y.children&&y.children.length>0)return;const b=m.target,k=Po(b)?b.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(!y.resizable||l.value){a.value=null;return}const $=k.getBoundingClientRect(),S=((I=k.parentNode)==null?void 0:I.lastElementChild)===k,M=t.allowDragLastColumn||!S,P=$.width>12&&$.right-m.clientX<8&&M,T=P?"col-resize":"";document.body.style.cursor=T,a.value=P?y:null,C&&(k.style.cursor=T)},h=()=>{!Kt||l.value||(document.body.style.cursor="")},f=({order:m,sortOrders:y})=>{if(m==="")return y[0];const b=y.indexOf(m||null);return y[b>y.length-2?0:b+1]},p=(m,y,b)=>{var I;m.stopPropagation();const k=y.order===b?null:b||f(y),C=(I=m.target)==null?void 0:I.closest("th");if(C&&pl(C,"noclick")){Ma(C,"noclick");return}if(!y.sortable)return;const $=m.currentTarget;if(["ascending","descending"].some(L=>pl($,L)&&!y.sortOrders.includes(L)))return;const S=t.store.states;let M=S.sortProp.value,P;const T=S.sortingColumn.value;(T!==y||T===y&&Bb(T.order))&&(T&&(T.order=null),S.sortingColumn.value=y,M=y.property),k?P=y.order=k:P=y.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 C0e(t){const e=qe(ia),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=$8(l,u.fixed,t.store,c);return qf(h,"left"),qf(h,"right"),Object.assign({},d,h)},getHeaderCellClass:(a,l,c,u)=>{const d=S8(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 x0e=fe({name:"ElTableHeader",components:{ElCheckbox:Yt},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(ia),s=Be("table"),o=J({}),{onColumnsChange:r,onScrollableChange:a}=E8(i),l=(i==null?void 0:i.props.tableLayout)==="auto",c=In(new Map),u=J();let d;const h=()=>{d=setTimeout(()=>{c.size>0&&(c.forEach((V,B)=>{const F=u.value.querySelector(`.${B.replace(/\s/g,".")}`);F&&(V.width=F.getBoundingClientRect().width||V.width)}),c.clear())})};Te(c,h),wn(()=>{d&&(clearTimeout(d),d=void 0)}),Ft(async()=>{await ot(),await ot();const{prop:V,order:B}=t.defaultSort;i==null||i.store.commit("sort",{prop:V,order:B,init:!0}),h()});const{handleHeaderClick:f,handleHeaderContextMenu:p,handleMouseDown:m,handleMouseMove:y,handleMouseOut:b,handleSortClick:k,handleFilterClick:C}=k0e(t,e),{getHeaderRowStyle:$,getHeaderRowClass:S,getHeaderCellStyle:M,getHeaderCellClass:P}=C0e(t),{isGroup:T,toggleAllSelection:I,columnRows:L}=p0e(t),{t:R}=Qt();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:$,getHeaderCellClass:P,getHeaderCellStyle:M,handleHeaderClick:f,handleHeaderContextMenu:p,handleMouseDown:m,handleMouseMove:y,handleMouseOut:b,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:y,isTableLayoutAuto:b}=this;let k=1;return bt("thead",{ref:"theadRef",class:t.is("group",n)},i.map((C,$)=>bt("tr",{class:r($),key:$,style:a($)},C.map((S,M)=>{S.rowSpan>k&&(k=S.rowSpan);const P=o($,M,C,S);return b&&S.fixed&&y.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($,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(w0e,{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 S0e(t){const e=qe(ia),n=J(""),i=J(bt("div")),s=(p,m,y)=>{var S,M;const b=e,k=Hw(p);let C=null;const $=(S=b==null?void 0:b.vnode.el)==null?void 0:S.dataset.prefix;k&&(C=SA({columns:((M=t.store)==null?void 0:M.states.columns.value)??[]},k,$),C&&(b==null||b.emit(`cell-${y}`,m,C,k,p))),b==null||b.emit(`row-${y}`,m,C,p)},o=(p,m)=>{s(p,m,"dblclick")},r=(p,m)=>{var y;(y=t.store)==null||y.commit("setCurrentRow",m),s(p,m,"click")},a=(p,m)=>{s(p,m,"contextmenu")},l=_d(p=>{var m;(m=t.store)==null||m.commit("setHoverRow",p)},30),c=_d(()=>{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,y)=>{var k;let b=(k=m==null?void 0:m.target)==null?void 0:k.parentNode;for(;p>1&&(b=b==null?void 0:b.nextSibling,!(!b||b.nodeName!=="TR"));)y(b,"hover-row hover-fixed-row"),p--};return{handleDoubleClick:o,handleClick:r,handleContextMenu:a,handleMouseEnter:l,handleMouseLeave:c,handleCellMouseEnter:(p,m,y)=>{var G,K,X;if(!e)return;const b=e,k=Hw(p),C=(G=b==null?void 0:b.vnode.el)==null?void 0:G.dataset.prefix;let $=null;if(k){if($=SA({columns:((K=t.store)==null?void 0:K.states.columns.value)??[]},k,C),!$)return;k.rowSpan>1&&d(k.rowSpan,p,yd);const W=b.hoverState={cell:k,column:$,row:m};b==null||b.emit("cell-mouse-enter",W.row,W.column,W.cell,p)}if(!y){(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&&((X=S.textContent)!=null&&X.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:B,bottom:F}=u(S),z=V+B,U=R+F;cf(P+z,I)||cf(T+U,L)||cf(S.scrollWidth,I)?i0e(y,((k==null?void 0:k.innerText)||(k==null?void 0:k.textContent))??"",m,$,k,b):(Rn==null?void 0:Rn.trigger)===k&&(Rn==null||Rn())},handleCellMouseLeave:p=>{const m=Hw(p);if(!m)return;m.rowSpan>1&&d(m.rowSpan,p,Ma);const y=e==null?void 0:e.hoverState;e==null||e.emit("cell-mouse-leave",y==null?void 0:y.row,y==null?void 0:y.column,y==null?void 0:y.cell,p)},tooltipContent:n,tooltipTrigger:i}}function $0e(t){const e=qe(ia),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=$8(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=S8(n.b(),u,t==null?void 0:t.fixed,t.store,void 0,f),m=[h.id,h.align,h.className,...p],y=e==null?void 0:e.props.cellClassName;return Ke(y)?m.push(y):et(y)&&m.push(y.call(null,{rowIndex:c,columnIndex:u,row:d,column:h})),m.push(n.e("cell")),m.filter(b=>!!b).join(" ")},getSpan:(c,u,d,h)=>{let f=1,p=1;const m=e==null?void 0:e.props.spanMethod;if(et(m)){const y=m({row:c,column:u,rowIndex:d,columnIndex:h});Me(y)?(f=y[0],p=y[1]):yt(y)&&(f=y.rowspan,p=y.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 A0e=["colspan","rowspan"];var E0e=fe({name:"TableTdWrapper",__name:"td-wrapper",props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup(t){return(e,n)=>(v(),A("td",{colspan:t.colspan,rowspan:t.rowspan},[le(e.$slots,"default")],8,A0e))}}),M0e=E0e;function T0e(t){const e=qe(ia),n=Be("table"),{handleDoubleClick:i,handleClick:s,handleContextMenu:o,handleMouseEnter:r,handleMouseLeave:a,handleCellMouseEnter:l,handleCellMouseLeave:c,tooltipContent:u,tooltipTrigger:d}=S0e(t),{getRowStyle:h,getRowClass:f,getCellStyle:p,getCellClass:m,getSpan:y,getColspanRealWidth:b}=$0e(t);let k=-1;const C=Y(()=>{var T;return(T=t.store)==null?void 0:T.states.columns.value.findIndex(({type:I})=>I==="default")}),$=(T,I)=>{var R;const L=(R=e==null?void 0:e.props)==null?void 0:R.rowKey;return L?ai(T,L):I},S=(T,I,L,R=!1)=>{const{tooltipEffect:V,tooltipOptions:B,store:F}=t,{indent:z,columns:U}=F.states,G=[];let K=!0;return L&&(G.push(n.em("row",`level-${L.level}`)),K=!!L.display),I===0&&(k=-1),t.stripe&&K&&k++,G.push(...f(T,I,k)),bt("tr",{style:[K?null:{display:"none"},h(T,I)],class:G,key:$(T,I),onDblclick:X=>i(X,T),onClick:X=>s(X,T),onContextmenu:X=>o(X,T),onMouseenter:()=>r(I),onMouseleave:a},U.value.map((X,W)=>{const{rowspan:Q,colspan:ne}=y(T,X,I,W);if(!Q||!ne)return null;const Z=Object.assign({},X);Z.realWidth=b(U.value,ne,W);const ae={store:F,_self:t.context||e,column:Z,row:T,$index:I,cellIndex:W,expanded:R};W===C.value&&L&&(ae.treeNode={indent:L.level&&L.level*z.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=`${$(T,I)},${W}`,Ce=Z.columnKey||Z.rawColumnKey||"",oe=X.showOverflowTooltip&&lD({effect:V},B,X.showOverflowTooltip);return bt(M0e,{style:p(I,W,T,X),class:m(I,W,T,X,ne-1),key:`${Ce}${ge}`,rowspan:Q,colspan:ne,onMouseenter:pe=>l(pe,T,oe),onMouseleave:c},{default:()=>M(W,X,ae)})}))},M=(T,I,L)=>I.renderCell(L);return{wrappedRowRender:(T,I)=>{const L=t.store,{isRowExpanded:R,assertRowKey:V}=L,{treeData:B,lazyTreeNodeMap:F,childrenColumnName:z,rowKey:U}=L.states,G=L.states.columns.value;if(G.some(({type:K})=>K==="expand")){const K=R(T),X=S(T,I,void 0,K),W=e==null?void 0:e.renderExpanded;if(!W)return console.error("[Element Error]renderExpanded is required."),X;const Q=[[X]];return(e.props.preserveExpandedContent||K)&&Q[0].push(bt("tr",{key:`expanded-row__${X.key}`,style:{display:K?"":"none"}},[bt("td",{colspan:G.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[W({row:T,$index:I,store:L,expanded:K})])])),Q}else if(Object.keys(B.value).length){V();const K=ai(T,U.value);let X=B.value[K],W=null;X&&(W={expanded:X.expanded,level:X.level,display:!0,noLazyChildren:void 0,loading:void 0},Jn(X.lazy)&&(W&&Jn(X.loaded)&&X.loaded&&(W.noLazyChildren=!(X.children&&X.children.length)),W.loading=X.loading));const Q=[S(T,I,W??void 0)];if(X){let ne=0;const Z=(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=ai(Ce,U.value);if(ka(pe))throw new Error("For nested data item, row-key is required.");X={...B.value[pe]},X&&(oe.expanded=X.expanded,X.level=X.level||oe.level,X.display=!!(X.expanded&&oe.display),Jn(X.lazy)&&(Jn(X.loaded)&&X.loaded&&(oe.noLazyChildren=!(X.children&&X.children.length)),oe.loading=X.loading)),ne++,Q.push(S(Ce,I+ne,oe)),X&&Z(F.value[pe]||Ce[z.value],X)})};X.display=!0,Z(F.value[K]||T[z.value],X)}return Q}else return S(T,I,void 0)},tooltipContent:u,tooltipTrigger:d}}const P0e={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 I0e=fe({name:"ElTableBody",props:P0e,setup(t){var u;const e=pt(),n=qe(ia),i=Be("table"),{wrappedRowRender:s,tooltipContent:o,tooltipTrigger:r}=T0e(t),{onColumnsChange:a,onScrollableChange:l}=E8(n),c=[];return Te((u=t.store)==null?void 0:u.states.hoverRow,(d,h)=>{var b,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 y=(b=p[m])==null?void 0:b.childNodes;if(y!=null&&y.length){let C=0;Array.from(y).reduce(($,S,M)=>{var P,T;return((P=y[M])==null?void 0:P.colSpan)>1&&(C=(T=y[M])==null?void 0:T.colSpan),S.nodeName!=="TD"&&C===0&&$.push(M),C>0&&C--,$},[]).forEach($=>{var S;for(m=d;m>0;){const M=(S=p[m-1])==null?void 0:S.childNodes;if(M[$]&&M[$].nodeName==="TD"&&M[$].rowSpan>1){yd(M[$],"hover-cell"),c.push(M[$]);break}m--}})}else c.forEach(C=>Ma(C,"hover-cell")),c.length=0;!((k=t.store)!=null&&k.states.isComplex.value)||!Kt||Yg(()=>{const C=p[h],$=p[d];C&&!C.classList.contains("hover-fixed-row")&&Ma(C,"hover-row"),$&&yd($,"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 L0e(){var e;const t=(e=qe(ia))==null?void 0:e.store;return{leftFixedLeafCount:Y(()=>(t==null?void 0:t.states.fixedLeafColumnsLength.value)??0),rightFixedLeafCount:Y(()=>(t==null?void 0:t.states.rightFixedColumns.value.length)??0),columnsCount:Y(()=>(t==null?void 0:t.states.columns.value.length)??0),leftFixedCount:Y(()=>(t==null?void 0:t.states.fixedColumns.value.length)??0),rightFixedCount:Y(()=>(t==null?void 0:t.states.rightFixedColumns.value.length)??0),columns:Y(()=>(t==null?void 0:t.states.columns.value)??[])}}function O0e(t){const{columns:e}=L0e(),n=Be("table");return{getCellClasses:(o,r)=>{const a=o[r],l=[n.e("cell"),a.id,a.align,a.labelClassName,...S8(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=$8(r,o.fixed,t.store);return qf(a,"left"),qf(a,"right"),a},columns:e}}var D0e=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(ia),n=Be("table"),{getCellClasses:i,getCellStyles:s,columns:o}=O0e(t),{onScrollableChange:r,onColumnsChange:a}=E8(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 R0e(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 V0e(t,e,n,i){const s=J(!1),o=J(null),r=J(!1),a=z=>{r.value=z},l=J({width:null,height:null,headerHeight:null}),c=J(!1),u={display:"inline-block",verticalAlign:"middle"},d=J(),h=J(0),f=J(0),p=J(0),m=J(0),y=J(0);Te(()=>t.height,z=>{e.setHeight(z??null)},{immediate:!0}),Te(()=>t.maxHeight,z=>{e.setMaxHeight(z??null)},{immediate:!0}),Te(()=>[t.currentRowKey,n.states.rowKey],([z,U])=>{!E(U)||!E(z)||n.setCurrentRowKey(`${z}`)},{immediate:!0}),Te(()=>t.data,z=>{i.store.commit("setData",z)},{immediate:!0,deep:!0}),_l(()=>{t.expandRowKeys&&n.setExpandRowKeysAdapter(t.expandRowKeys)});const b=()=>{i.store.commit("setHoverRow",null),i.hoverState&&(i.hoverState=null)},k=(z,U)=>{const{pixelX:G,pixelY:K}=U;Math.abs(G)>=Math.abs(K)&&(i.refs.bodyWrapper.scrollLeft+=U.pixelX/5)},C=Y(()=>t.height||t.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),$=Y(()=>({width:e.bodyWidth.value?`${e.bodyWidth.value}px`:""})),S=()=>{C.value&&e.updateElsHeight(),e.updateColumnsWidth(),!(typeof window>"u")&&requestAnimationFrame(I)};Ft(async()=>{await ot(),n.updateColumns(),L(),requestAnimationFrame(S);const z=i.vnode.el,U=i.refs.headerWrapper;t.flexible&&z&&z.parentElement&&(z.parentElement.style.minWidth="0"),l.value={width:d.value=z.offsetWidth,height:z.offsetHeight,headerHeight:t.showHeader&&U?U.offsetHeight:null},n.states.columns.value.forEach(G=>{G.filteredValue&&G.filteredValue.length&&i.store.commit("filterChange",{column:G,values:G.filteredValue,silent:!0})}),i.$ready=!0});const M=(z,U)=>{if(!z)return;const G=Array.from(z.classList).filter(K=>!K.startsWith("is-scrolling-"));G.push(e.scrollX.value?U:"is-scrolling-none"),z.className=G.join(" ")},P=z=>{const{tableWrapper:U}=i.refs;M(U,z)},T=z=>{const{tableWrapper:U}=i.refs;return!!(U&&U.classList.contains(z))},I=function(){if(!i.refs.scrollBarRef)return;if(!e.scrollX.value){const Q="is-scrolling-none";T(Q)||P(Q);return}const z=i.refs.scrollBarRef.wrapRef;if(!z)return;const{scrollLeft:U,offsetWidth:G,scrollWidth:K}=z,{headerWrapper:X,footerWrapper:W}=i.refs;X&&(X.scrollLeft=U),W&&(W.scrollLeft=U),U>=K-G-1?P("is-scrolling-right"):P(U===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 z,U;R(),(U=(z=i.refs)==null?void 0:z.scrollBarRef)==null||U.update()}))},R=()=>{var Z,ae,ge,Ce;const z=i.vnode.el;if(!i.$ready||!z)return;let U=!1;const{width:G,height:K,headerHeight:X}=l.value,W=d.value=z.offsetWidth;G!==W&&(U=!0);const Q=z.offsetHeight;(t.height||C.value)&&K!==Q&&(U=!0);const ne=t.tableLayout==="fixed"?i.refs.headerWrapper:(Z=i.refs.tableHeaderRef)==null?void 0:Z.$el;t.showHeader&&(ne==null?void 0:ne.offsetHeight)!==X&&(U=!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,y.value=((Ce=i.refs.appendWrapper)==null?void 0:Ce.offsetHeight)||0,f.value=h.value-p.value-m.value-y.value,U&&(l.value={width:W,height:Q,headerHeight:t.showHeader&&(ne==null?void 0:ne.offsetHeight)||0},S())},V=Ii(),B=Y(()=>{const{bodyWidth:z,scrollY:U,gutterWidth:G}=e;return z.value?`${z.value-(U.value?G:0)}px`:""}),F=Y(()=>t.maxHeight?"fixed":t.tableLayout);return{isHidden:s,renderExpanded:o,setDragVisible:a,isGroup:c,handleMouseLeave:b,handleHeaderFooterMousewheel:k,tableSize:V,emptyBlockStyle:Y(()=>{if(t.data&&t.data.length)return;let z="100%";t.height&&f.value&&(z=`${f.value}px`);const U=d.value;return{width:U?`${U}px`:"",height:z}}),resizeProxyVisible:r,bodyWidth:B,resizeState:l,doLayout:S,tableBodyStyles:$,tableLayout:F,scrollbarViewStyle:u,scrollbarStyle:Y(()=>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 F0e(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)};Ft(()=>{n()}),Sl(()=>{e==null||e.disconnect()})}var N0e={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 gF(t){const e=t.tableLayout==="auto";let n=t.columns||[];e&&n.every(({width:s})=>nn(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))))}gF.props=["columns","tableLayout"];const B0e=()=>{const t=J(),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 z0e=1;var H0e=fe({name:"ElTable",directives:{Mousewheel:uhe},components:{TableHeader:x0e,TableBody:I0e,TableFooter:D0e,ElScrollbar:qs,hColgroup:gF},props:N0e,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}=Qt(),n=Be("table"),i=Jc("table"),s=pt();Pt(ia,s);const o=d0e(s,t);s.store=o;const r=new f0e({store:s.store,table:s,fit:t.fit,showHeader:t.showHeader});s.layout=r;const a=Y(()=>(o.states.data.value||[]).length===0),{setCurrentRow:l,getSelectionRows:c,toggleRowSelection:u,clearSelection:d,clearFilter:h,toggleAllSelection:f,toggleRowExpansion:p,clearSort:m,sort:y,updateKeyChildren:b}=R0e(o),{isHidden:k,renderExpanded:C,setDragVisible:$,isGroup:S,handleMouseLeave:M,handleHeaderFooterMousewheel:P,tableSize:T,emptyBlockStyle:I,resizeProxyVisible:L,bodyWidth:R,resizeState:V,doLayout:B,tableBodyStyles:F,tableLayout:z,scrollbarViewStyle:U,scrollbarStyle:G}=V0e(t,r,o,s),{scrollBarRef:K,scrollTo:X,setScrollLeft:W,setScrollTop:Q}=B0e(),ne=_d(B,50),Z=`${n.namespace.value}-table_${z0e++}`;s.tableId=Z,s.state={isGroup:S,resizeState:V,doLayout:B,debouncedUpdateLayout:ne};const ae=Y(()=>t.sumText??e("el.table.sumText")),ge=Y(()=>t.emptyText??e("el.table.emptyText")),Ce=Y(()=>{var ie;return t.tooltipEffect??((ie=i.value)==null?void 0:ie.tooltipEffect)}),oe=Y(()=>{var ie;return t.tooltipOptions??((ie=i.value)==null?void 0:ie.tooltipOptions)}),pe=Y(()=>mF(o.states.originColumns.value)[0]);return F0e(s),wn(()=>{ne.cancel()}),{ns:n,layout:r,store:o,columns:pe,handleHeaderFooterMousewheel:P,handleMouseLeave:M,tableId:Z,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:B,sort:y,updateKeyChildren:b,t:e,setDragVisible:$,context:s,computedSumText:ae,computedEmptyText:ge,computedTooltipEffect:Ce,computedTooltipOptions:oe,tableLayout:z,scrollbarViewStyle:U,scrollbarStyle:G,scrollBarRef:K,scrollTo:X,setScrollLeft:W,setScrollTop:Q,allowDragLastColumn:t.allowDragLastColumn}}});const U0e=["data-prefix"],j0e={ref:"hiddenColumns",class:"hidden-columns"};function W0e(t,e,n,i,s,o){const r=H("hColgroup"),a=H("table-header"),l=H("table-body"),c=H("table-footer"),u=H("el-scrollbar"),d=xt("mousewheel");return v(),A("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",j0e,[le(t.$slots,"default")],512),t.showHeader&&t.tableLayout==="fixed"?Re((v(),A("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:w(()=>[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(),A("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(),A("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(),A("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(),A("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,U0e)}var Y0e=gi(H0e,[["render",W0e]]);const q0e={selection:"table-column--selection",expand:"table__expand-column"},G0e={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:""}},X0e=t=>q0e[t]||"",K0e={selection:{renderHeader({store:t}){function e(){return t.states.data.value&&t.states.data.value.length===0}return bt(Yt,{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(Yt,{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(be,null,{default:()=>[bt(Hr)]})]})},sortable:!1,resizable:!1}};function Z0e({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 J0e({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=Hr;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(be,{class:s.is("loading",e.loading)},{default:()=>[bt(l)]})]}))}else o.push(bt("span",{class:s.e("placeholder")}));return o}function EA(t,e){return t.reduce((n,i)=>(n[i]=i,n),e)}function Q0e(t,e){const n=pt();return{registerComplexWatchers:()=>{const o=["fixed"],r={realWidth:"width",realMinWidth:"minWidth"},a=EA(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=x8(u)),c==="minWidth"&&l==="realMinWidth"&&(d=lF(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=EA(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"&&nn(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"&&(!nn(e.showOverflowTooltip)||!nn(t.value.props.showOverflowTooltip)||(n.columnConfig.value.showOverflowTooltip=u))})}}}function e_e(t,e,n){const i=pt(),s=J(""),o=J(!1),r=J(),a=J(),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=Y(()=>{let $=i.vnode.vParent||i.parent;for(;$&&!$.tableId&&!$.columnId;)$=$.vnode.vParent||$.parent;return $}),u=Y(()=>{const{store:$}=i.parent;if(!$)return!1;const{treeData:S}=$.states,M=S.value;return M&&Object.keys(M).length>0}),d=J(x8(t.width)),h=J(lF(t.minWidth)),f=$=>(d.value&&($.width=d.value),h.value&&($.minWidth=h.value),!d.value&&h.value&&($.width=void 0),$.minWidth||($.minWidth=80),$.realWidth=Number(nn($.width)?$.minWidth:$.width),$),p=$=>{const S=$.type,M=K0e[S]||{};Object.keys(M).forEach(T=>{const I=M[T];T!=="className"&&!nn(I)&&($[T]=I)});const P=X0e(S);if(P){const T=`${E(l.namespace)}-${P}`;$.className=$.className?`${$.className} ${T}`:T}return $},m=$=>{Me($)?$.forEach(M=>S(M)):S($);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:$=>{t.renderHeader?Tt("TableColumn","Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header."):$.type!=="selection"&&($.renderHeader=M=>{if(i.columnConfig.value.label,e.header){const P=e.header(M);if(dF(P))return bt(ee,P)}return N($.label)}),e["filter-icon"]&&($.renderFilterIcon=M=>le(e,"filter-icon",M)),e.expand&&($.renderExpand=M=>le(e,"expand",M));let S=$.renderCell;return $.type==="expand"?($.renderCell=M=>bt("div",{class:"cell"},[S(M)]),n.value.renderExpanded=M=>e.default?e.default(M):e.default):(S=S||Z0e,$.renderCell=M=>{let P=null;if(e.default){const V=e.default(M);P=V.some(B=>B.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=J0e(M,u.value&&M.cellIndex===I),R={class:"cell",style:{}};return $.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])}),$},getPropsData:(...$)=>$.reduce((S,M)=>(Me(M)&&M.forEach(P=>{S[P]=t[P]}),S),{}),getColumnElIndex:($,S)=>Array.prototype.indexOf.call($,S),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",i.columnConfig.value)}}}var t_e={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 n_e=1;var s_e=fe({name:"ElTableColumn",components:{ElCheckbox:Yt},props:t_e,setup(t,{slots:e}){const n=pt(),i=Jc("table"),s=J({}),o=Y(()=>{let $=n.parent;for(;$&&!$.tableId;)$=$.parent;return $}),{registerNormalWatchers:r,registerComplexWatchers:a}=Q0e(o,t),{columnId:l,isSubColumn:c,realHeaderAlign:u,columnOrTableParent:d,setColumnWidth:h,setColumnForcedProps:f,setColumnRenders:p,getPropsData:m,getColumnElIndex:y,realAlign:b,updateColumnOrder:k}=e_e(t,e,o),C=d.value;l.value=`${"tableId"in C&&C.tableId||"columnId"in C&&C.columnId}_column_${n_e++}`,Od(()=>{var L,R;c.value=o.value!==C;const $=t.type||"default",S=t.sortable===""?!0:t.sortable,M=$==="selection"?!1:nn(t.showOverflowTooltip)?C.props.showOverflowTooltip??((L=i.value)==null?void 0:L.showOverflowTooltip):t.showOverflowTooltip,P=nn(t.tooltipFormatter)?C.props.tooltipFormatter??((R=i.value)==null?void 0:R.tooltipFormatter):t.tooltipFormatter,T={...G0e[$],id:l.value,type:$,property:t.prop||t.property,align:b,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=Qve(T,I),I=t0e(p,h,f)(I),s.value=I,r(),a()}),Ft(()=>{var P,T;const $=d.value,S=c.value?(P=$.vnode.el)==null?void 0:P.children:(T=$.refs.hiddenColumns)==null?void 0:T.children,M=()=>y(S||[],n.vnode.el);s.value.getColumnIndex=M,M()>-1&&o.value.store.commit("insertColumn",s.value,c.value?"columnConfig"in $&&$.columnConfig.value:null,k)}),wn(()=>{const $=s.value.getColumnIndex;($?$():-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(Me(i))for(const o of i)((n=o.type)==null?void 0:n.name)==="ElTableColumn"||o.shapeFlag&2?s.push(o):o.type===ee&&Me(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",[])}}}),vF=s_e;const Pl=qt(Y0e,{TableColumn:vF}),Il=Os(vF),l2=Symbol("tabsRootContextKey"),i_e=Ge({tabs:{type:de(Array),default:()=>ri([])},tabRefs:{type:de(Object),default:()=>ri({})}}),MA="ElTabBar";var o_e=fe({name:MA,__name:"tab-bar",props:i_e,setup(t,{expose:e}){const n=t,i=qe(l2);i||vo(MA,"<el-tabs><el-tab-bar /></el-tabs>");const s=Be("tabs"),o=J(),r=J(),a=Y(()=>{var f;return nn(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",y=m==="width"?"x":"y",b=y==="x"?"left":"top";return n.tabs.every(k=>{if(nn(k.paneName))return!1;const C=n.tabRefs[k.paneName];if(!C)return!1;if(!k.active)return!0;f=C[`offset${xw(b)}`],p=C[`client${xw(m)}`];const $=window.getComputedStyle(C);return m==="width"&&(p-=Number.parseFloat($.paddingLeft)+Number.parseFloat($.paddingRight),f+=Number.parseFloat($.paddingLeft)),!1}),{[m]:`${p}px`,transform:`translate${xw(y)}(${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(),A("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)}}),r_e=o_e;const a_e=Ge({panes:{type:de(Array),default:()=>ri([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean,tabindex:{type:[String,Number],default:void 0}}),l_e={tabClick:(t,e,n)=>n instanceof Event,tabRemove:(t,e)=>e instanceof Event},TA="ElTabNav",c_e=fe({name:TA,props:a_e,emits:l_e,setup(t,{expose:e,emit:n}){const i=qe(l2);i||vo(TA,"<el-tabs><tab-nav /></el-tabs>");const s=Be("tabs"),o=Aie(),r=Tie(),a=J(),l=J(),c=J(),u=J({}),d=J(),h=J(!1),f=J(0),p=J(!1),m=J(!0),y=J(!1),b=Fn(),k=Y(()=>["top","bottom"].includes(i.props.tabPosition)),C=Y(()=>k.value?"width":"height"),$=Y(()=>{const ne=C.value==="width"?"X":"Y";return{transition:y.value?"none":void 0,transform:`translate${ne}(-${f.value}px)`}}),{width:S,height:M}=f$(a),{width:P,height:T}=f$(l,{width:0,height:0},{box:"border-box"}),I=Y(()=>k.value?S.value:M.value),L=Y(()=>k.value?P.value:T.value),{onWheel:R}=Rve({atStartEdge:Y(()=>f.value<=0),atEndEdge:Y(()=>L.value-f.value<=I.value),layout:Y(()=>k.value?"horizontal":"vertical")},ne=>{f.value=HO(f.value+ne,0,L.value-I.value)}),V=ne=>{y.value=!0,R(ne),Yg(()=>{y.value=!1})},B=()=>{if(!a.value)return;const ne=a.value.getBoundingClientRect()[C.value],Z=f.value;Z&&(f.value=Z>ne?Z-ne:0)},F=()=>{if(!a.value||!l.value)return;const ne=l.value.getBoundingClientRect()[C.value],Z=a.value.getBoundingClientRect()[C.value],ae=f.value;cf(ne-ae,Z)&&(f.value=ne-ae>Z*2?ae+Z:ne-Z)},z=async()=>{const ne=l.value;if(!h.value||!c.value||!a.value||!ne)return;await ot();const Z=u.value[t.currentName];if(!Z)return;const ae=a.value,ge=Z.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)},U=()=>{var ge;if(!l.value||!a.value)return;t.stretch&&((ge=d.value)==null||ge.update());const ne=l.value.getBoundingClientRect()[C.value],Z=a.value.getBoundingClientRect()[C.value],ae=f.value;Z<ne?(h.value=h.value||{},h.value.prev=ae,h.value.next=cf(ne,ae+Z),cf(Z,ne-ae)&&(f.value=ne-Z)):(h.value=!1,ae>0&&(f.value=0))},G=ne=>{const Z=ls(ne);let ae=0;switch(Z){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(),K()},K=()=>{m.value&&(p.value=!0)},X=()=>p.value=!1,W=(ne,Z)=>{u.value[Z]=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,()=>{Yg(U)}),Ft(()=>setTimeout(()=>z(),0)),xl(()=>U()),e({scrollToActiveTab:z,removeFocus:X,focusActiveTab:Q,tabListRef:l,tabBarRef:d,scheduleRender:()=>Hm(b)}),()=>{const ne=h.value?[_("span",{class:[s.e("nav-prev"),s.is("disabled",!h.value.prev)],onClick:B},[_(be,null,{default:()=>[_(bd,null,null)]})]),_("span",{class:[s.e("nav-next"),s.is("disabled",!h.value.next)],onClick:F},[_(be,null,{default:()=>[_(Hr,null,null)]})])]:null,Z=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?_(be,{class:"is-icon-close",onClick:me=>n("tabRemove",ae,me)},{default:()=>[_(Bo,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=>W(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:()=>K(),onBlur:()=>X(),onClick:me=>{X(),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 b.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:$.value,role:"tablist",onKeydown:G,onWheel:V},[t.type?null:_(r_e,{ref:d,tabs:[...t.panes],tabRefs:u.value},null),Z]):null])])}}}),u_e=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}}),Uw=t=>Ke(t)||wt(t),d_e={[Mt]:t=>Uw(t),tabClick:(t,e)=>e instanceof Event,tabChange:t=>Uw(t),edit:(t,e)=>["remove","add"].includes(e),tabRemove:t=>Uw(t),tabAdd:()=>!0},h_e=fe({name:"ElTabs",props:u_e,emits:d_e,setup(t,{emit:e,slots:n,expose:i}){const s=Be("tabs"),o=Y(()=>["left","right"].includes(t.tabPosition)),{children:r,addChild:a,removeChild:l,ChildrenSorter:c}=Bre(pt(),"ElTabPane"),u=J(),d=J((nn(t.modelValue)?t.defaultValue:t.modelValue)??"0"),h=async(k,C=!1)=>{var $,S,M,P;if(!(d.value===k||nn(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=($=r.value.find(L=>L.paneName===d.value))==null?void 0:$.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,$)=>{k.props.disabled||(e("tabClick",k,$),h(C,!0))},p=(k,C)=>{k.props.disabled||nn(k.props.name)||(C.stopPropagation(),e("edit",k.props.name,"remove"),e("tabRemove",k.props.name))},m=()=>{e("edit",void 0,"add"),e("tabAdd")},y=k=>{const C=ls(k);[Ue.enter,Ue.numpadEnter].includes(C)&&m()},b=k=>{const C=k.el.firstChild,$=["bottom","right"].includes(t.tabPosition)?k.children[0].el:k.children[1].el;C!==$&&C.before($)};return Te(()=>t.modelValue,k=>h(k)),Te(d,async()=>{var k;await ot(),(k=u.value)==null||k.scrollToActiveTab()}),Pt(l2,{props:t,currentName:d,registerPane:a,unregisterPane:l,nav$:u}),i({currentName:d,get tabNavRef(){return zb(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:y},[k?le(n,"add-icon"):_(be,{class:s.is("icon-plus")},{default:()=>[_(X4,null,null)]})]):null,$=()=>_(c_e,{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:$,$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:b,onVnodeUpdated:b},[M,S])}}}),f_e=Ge({label:{type:String,default:""},name:{type:[String,Number]},closable:{type:Boolean,default:void 0},disabled:Boolean,lazy:Boolean}),p_e=["id","aria-hidden","aria-labelledby"],PA="ElTabPane";var m_e=fe({name:PA,__name:"tab-pane",props:f_e,setup(t){const e=t,n=pt(),i=mi(),s=qe(l2);s||vo(PA,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const o=Be("tab-pane"),r=J(),a=J(),l=Y(()=>e.closable??s.props.closable),c=Y(()=>s.currentName.value===(e.name??a.value)),u=J(c.value),d=Y(()=>e.name??a.value),h=Y(()=>!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)}),Cb(()=>{var m;i.label&&((m=s.nav$.value)==null||m.scheduleRender())}),(m,y)=>h.value?Re((v(),A("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,p_e)),[[jt,c.value]]):O("v-if",!0)}}),_F=m_e;const c2=qt(h_e,{TabPane:_F}),u2=Os(_F),EC="00:30",g_e=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:EC},minTime:{type:de(String)},maxTime:{type:de(String)},includeEndTime:Boolean,name:String,prefixIcon:{type:de([String,Object]),default:()=>lR},clearIcon:{type:de([String,Object]),default:()=>Zc},popperClass:{type:String,default:""},popperStyle:{type:de([String,Object])},...F1}),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},jw=(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},IA=t=>`${t}`.padStart(2,"0"),Eh=t=>`${IA(t.hours)}:${IA(t.minutes)}`,v_e=(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 __e=fe({name:"ElTimeSelect",__name:"time-select",props:g_e,emits:[dn,"blur","focus","clear",Mt],setup(t,{expose:e}){ht.extend(aV);const{Option:n}=Jt,i=t,s=Be("input"),o=J(),r=bs(),{lang:a}=Qt(),l=Y(()=>i.modelValue),c=Y(()=>{const b=ol(i.start);return b?Eh(b):null}),u=Y(()=>{const b=ol(i.end);return b?Eh(b):null}),d=Y(()=>{const b=ol(i.minTime||"");return b?Eh(b):null}),h=Y(()=>{const b=ol(i.maxTime||"");return b?Eh(b):null}),f=Y(()=>{const b=ol(i.step),k=!b||b.hours<0||b.minutes<0||Number.isNaN(b.hours)||Number.isNaN(b.minutes)||b.hours===0&&b.minutes===0;return k&&Tt("ElTimeSelect",`invalid step, fallback to default step (${EC}).`),k?EC:Eh(b)}),p=Y(()=>{var C;const b=[],k=($,S)=>{b.push({value:$,rawValue:S,disabled:jw(S,d.value||"-1:-1")<=0||jw(S,h.value||"100:100")>=0})};if(i.start&&i.end&&i.step){let $=c.value,S;for(;$&&u.value&&jw($,u.value)<=0;)S=ht($,"HH:mm").locale(a.value).format(i.format),k(S,$),$=v_e($,f.value);i.includeEndTime&&u.value&&((C=b[b.length-1])==null?void 0:C.rawValue)!==u.value&&k(ht(u.value,"HH:mm").locale(a.value).format(i.format),u.value)}return b});return e({blur:()=>{var b,k;(k=(b=o.value)==null?void 0:b.blur)==null||k.call(b)},focus:()=>{var b,k;(k=(b=o.value)==null?void 0:b.focus)==null||k.call(b)}}),(b,k)=>(v(),D(E(Jt),{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=>b.$emit(E(Mt),C)),onChange:k[1]||(k[1]=C=>b.$emit(E(dn),C)),onBlur:k[2]||(k[2]=C=>b.$emit("blur",C)),onFocus:k[3]||(k[3]=C=>b.$emit("focus",C)),onClear:k[4]||(k[4]=()=>b.$emit("clear"))},{prefix:w(()=>[t.prefixIcon?(v(),D(E(be),{key:0,class:q(E(s).e("prefix-icon"))},{default:w(()=>[(v(),D(Ct(t.prefixIcon)))]),_:1},8,["class"])):O("v-if",!0)]),default:w(()=>[(v(!0),A(ee,null,we(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"]))}}),y_e=__e;const M8=qt(y_e),b_e="ElUpload";var w_e=class extends Error{constructor(t,e,n,i){super(t),this.name="UploadAjaxError",this.status=e,this.method=n,this.url=i}};function LA(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 w_e(i,n.status,e.method,t)}function k_e(t){const e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}const C_e=t=>{typeof XMLHttpRequest>"u"&&vo(b_e,"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))Me(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(LA(n,t,e))}),e.addEventListener("load",()=>{if(e.status<200||e.status>=300)return t.onError(LA(n,t,e));t.onSuccess(k_e(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))ui(r)||e.setRequestHeader(o,String(r));return e.send(i),e},yF=["text","picture","picture-card"];let x_e=1;const MC=()=>Date.now()+x_e++,bF=Ge({action:{type:String,default:"#"},headers:{type:de(Object)},method:{type:String,default:"post"},data:{type:de([Object,Function,Promise]),default:()=>ri({})},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:()=>ri([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:yF,default:"text"},httpRequest:{type:de(Function),default:C_e},disabled:{type:Boolean,default:void 0},limit:Number,directory:Boolean}),S_e=Ge({...bF,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)}}),wF=Symbol("uploadContextKey"),$_e=Ge({files:{type:de(Array),default:()=>ri([])},disabled:{type:Boolean,default:void 0},handlePreview:{type:de(Function),default:Dt},listType:{type:String,values:yF,default:"text"},crossorigin:{type:de(String)}}),A_e={remove:t=>!!t},E_e=Ge({...bF,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}}),M_e=Ge({disabled:{type:Boolean,default:void 0},directory:Boolean}),T_e={file:t=>Me(t)},P_e=["tabindex","aria-disabled","onKeydown"],I_e=["src","crossorigin"],L_e=["onClick"],O_e=["title"],D_e=["onClick"],R_e=["onClick"];var V_e=fe({name:"ElUploadList",__name:"upload-list",props:$_e,emits:A_e,setup(t,{emit:e}){const n=t,i=e,{t:s}=Qt(),o=Be("upload"),r=Be("icon"),a=Be("list"),l=bs(),c=J(!1),u=Y(()=>[o.b("list"),o.bm("list",n.listType),o.is("disabled",l.value)]),d=h=>{i("remove",h)};return(h,f)=>(v(),D(Eb,{tag:"ul",class:q(u.value),name:E(a).b()},{default:w(()=>[(v(!0),A(ee,null,we(t.files,(p,m)=>(v(),A("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(y=>!E(l)&&d(p),["delete"]),onFocus:f[0]||(f[0]=y=>c.value=!0),onBlur:f[1]||(f[1]=y=>c.value=!1),onClick:f[2]||(f[2]=y=>c.value=!1)},[le(h.$slots,"default",{file:p,index:m},()=>[t.listType==="picture"||p.status!=="uploading"&&t.listType==="picture-card"?(v(),A("img",{key:0,class:q(E(o).be("list","item-thumbnail")),src:p.url,crossorigin:t.crossorigin,alt:""},null,10,I_e)):O("v-if",!0),p.status==="uploading"||t.listType!=="picture-card"?(v(),A("div",{key:1,class:q(E(o).be("list","item-info"))},[g("a",{class:q(E(o).be("list","item-name")),onClick:Ee(y=>t.handlePreview(p),["prevent"])},[_(E(be),{class:q(E(r).m("document"))},{default:w(()=>[_(E(N1))]),_:1},8,["class"]),g("span",{class:q(E(o).be("list","item-file-name")),title:p.name},x(p.name),11,O_e)],10,L_e),p.status==="uploading"?(v(),D(E(a2),{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(be),{key:0,class:q([E(r).m("upload-success"),E(r).m("circle-check")])},{default:w(()=>[_(E(G4))]),_:1},8,["class"])):["picture-card","picture"].includes(t.listType)?(v(),D(E(be),{key:1,class:q([E(r).m("upload-success"),E(r).m("check")])},{default:w(()=>[_(E(q4))]),_:1},8,["class"])):O("v-if",!0)],2),E(l)?O("v-if",!0):(v(),D(E(be),{key:2,class:q(E(r).m("close")),"aria-label":E(s)("el.upload.delete"),role:"button",tabindex:"0",onClick:y=>d(p),onKeydown:ut(Ee(y=>d(p),["prevent"]),["enter","space"])},{default:w(()=>[_(E(Bo))]),_:1},8,["class","aria-label","onClick","onKeydown"])),E(l)?O("v-if",!0):(v(),A("i",{key:3,class:q(E(r).m("close-tip"))},x(E(s)("el.upload.deleteTip")),3)),t.listType==="picture-card"?(v(),A("span",{key:4,class:q(E(o).be("list","item-actions"))},[g("span",{class:q(E(o).be("list","item-preview")),onClick:y=>t.handlePreview(p)},[_(E(be),{class:q(E(r).m("zoom-in"))},{default:w(()=>[_(E(vR))]),_:1},8,["class"])],10,D_e),E(l)?O("v-if",!0):(v(),A("span",{key:0,class:q(E(o).be("list","item-delete")),onClick:y=>d(p)},[_(E(be),{class:q(E(r).m("delete"))},{default:w(()=>[_(E(Jb))]),_:1},8,["class"])],10,R_e))],2)):O("v-if",!0)])],42,P_e))),128)),le(h.$slots,"append")]),_:3},8,["class","name"]))}}),OA=V_e;const DA="ElUploadDrag";var F_e=fe({name:DA,__name:"upload-dragger",props:M_e,emits:T_e,setup(t,{emit:e}){const n=t,i=e;qe(wF)||vo(DA,"usage: <el-upload><el-upload-dragger /></el-upload>");const s=Be("upload"),o=J(!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 y=await p();for(;y.length>0;)m.push(...y),y=await p();const b=m.map(k=>l(k).catch(()=>[]));return hy(await Promise.all(b))}}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(y=>{var b;return(b=y==null?void 0:y.webkitGetAsEntry)==null?void 0:b.call(y)}).filter(y=>y);i("file",hy(await Promise.all(m.map(l))));return}f.forEach((m,y)=>{var k,C;const b=(C=(k=p[y])==null?void 0:k.webkitGetAsEntry)==null?void 0:C.call(k);b&&(m.isDirectory=b.isDirectory)}),i("file",f)},u=()=>{r.value||(o.value=!0)},d=h=>{h.currentTarget.contains(h.relatedTarget)||(o.value=!1)};return(h,f)=>(v(),A("div",{class:q([E(s).b("dragger"),E(s).is("dragover",o.value)]),onDrop:Ee(c,["prevent"]),onDragover:Ee(u,["prevent"]),onDragleave:Ee(d,["prevent"])},[le(h.$slots,"default")],34))}}),N_e=F_e;const B_e=["tabindex","aria-disabled","onKeydown"],z_e=["name","disabled","multiple","accept","webkitdirectory"];var H_e=fe({name:"ElUploadContent",inheritAttrs:!1,__name:"upload-content",props:E_e,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:y,limit:b,fileList:k,multiple:C,onStart:$,onExceed:S}=n;if(b&&k.length+m.length>b){S(m,k);return}C||(m=m.slice(0,1));for(const M of m){const P=M;P.uid=MC(),$(P),y&&l(P)}},l=async m=>{if(r.value.value="",!n.beforeUpload)return u(m);let y,b={};try{const C=n.data,$=n.beforeUpload(m);b=hd(n.data)?Qu(n.data):n.data,y=await $,hd(n.data)&&Wi(C,b)&&(b=Qu(n.data))}catch{y=!1}if(y===!1){n.onRemove(m);return}let k=m;y instanceof Blob&&(y instanceof File?k=y:k=new File([y],m.name,{type:m.type})),u(Object.assign(k,{uid:m.uid}),b)},c=async(m,y)=>et(m)?m(y):m,u=async(m,y)=>{const{headers:b,data:k,method:C,withCredentials:$,name:S,action:M,onProgress:P,onSuccess:T,onError:I,httpRequest:L}=n;try{y=await c(y??k,m)}catch{n.onRemove(m);return}const{uid:R}=m,V={headers:b||{},withCredentials:$,file:m,data:y,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]}},B=L(V);o.value[R]=B,B instanceof Promise&&B.then(V.onSuccess,V.onError)},d=m=>{const y=m.target.files;y&&a(Array.from(y))},h=()=>{s.value||(r.value.value="",r.value.click())},f=()=>{h()};return e({abort:m=>{uD(o.value).filter(m?([y])=>String(m.uid)===y:()=>!0).forEach(([y,b])=>{b instanceof XMLHttpRequest&&b.abort(),delete o.value[y]})},upload:l}),(m,y)=>(v(),A("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(Ee(f,["self"]),["enter","space"])},[t.drag?(v(),D(N_e,{key:0,disabled:E(s),directory:t.directory,onFile:a},{default:w(()=>[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:y[0]||(y[0]=Ee(()=>{},["stop"]))},null,42,z_e)],42,B_e))}}),RA=H_e;const VA="ElUpload",FA=t=>{var e;(e=t.url)!=null&&e.startsWith("blob:")&&URL.revokeObjectURL(t.url)},U_e=(t,e)=>{const n=Mie(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 y=i(m);y&&(console.error(p),y.status="fail",r(y),t.onError(p,y,n.value),a(y))},c=(p,m)=>{const y=i(m);y&&(t.onProgress(p,y,n.value),y.status="uploading",y.percentage=Math.round(p.percent))},u=(p,m)=>{const y=i(m);y&&(y.status="success",y.response=p,t.onSuccess(p,y,n.value),a(y))},d=p=>{ui(p.uid)&&(p.uid=MC());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(y){Tt(VA,y.message),t.onError(y,m,n.value)}n.value=[...n.value,m],a(m)},h=async p=>{const m=p instanceof File?i(p):p;m||vo(VA,"file to be removed not found");const y=b=>{s(b),r(b),t.onRemove(b,n.value),FA(b)};t.beforeRemove?await t.beforeRemove(m,n.value)!==!1&&y(m):y(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:y,url:b}=m;if(!b&&y)try{m.url=URL.createObjectURL(y)}catch(k){t.onError(k,m,n.value)}return m}))}),Te(n,p=>{for(const m of p)m.uid||(m.uid=MC()),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:FA}};var j_e=fe({name:"ElUpload",__name:"upload",props:S_e,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}=U_e(n,s),m=Y(()=>n.listType==="picture-card"),y=Y(()=>({...n,fileList:l.value,onStart:c,onProgress:f,onSuccess:h,onError:u,onRemove:d}));return wn(()=>{l.value.forEach(p)}),Pt(wF,{accept:Sn(n,"accept")}),e({abort:o,submit:r,clearFiles:a,handleStart:c,handleRemove:d}),(b,k)=>(v(),A("div",null,[m.value&&t.showFileList?(v(),D(OA,{key:0,disabled:E(i),"list-type":t.listType,files:E(l),crossorigin:t.crossorigin,"handle-preview":t.onPreview,onRemove:E(d)},hs({append:w(()=>[_(RA,Wt({ref_key:"uploadRef",ref:s},y.value),{default:w(()=>[b.$slots.trigger?le(b.$slots,"trigger",{key:0}):O("v-if",!0),!b.$slots.trigger&&b.$slots.default?le(b.$slots,"default",{key:1}):O("v-if",!0)]),_:3},16)]),_:2},[b.$slots.file?{name:"default",fn:w(({file:C,index:$})=>[le(b.$slots,"file",{file:C,index:$})]),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(RA,Wt({key:1,ref_key:"uploadRef",ref:s},y.value),{default:w(()=>[b.$slots.trigger?le(b.$slots,"trigger",{key:0}):O("v-if",!0),!b.$slots.trigger&&b.$slots.default?le(b.$slots,"default",{key:1}):O("v-if",!0)]),_:3},16)):O("v-if",!0),b.$slots.trigger?le(b.$slots,"default",{key:2}):O("v-if",!0),le(b.$slots,"tip"),!m.value&&t.showFileList?(v(),D(OA,{key:3,disabled:E(i),"list-type":t.listType,files:E(l),crossorigin:t.crossorigin,"handle-preview":t.onPreview,onRemove:E(d)},hs({_:2},[b.$slots.file?{name:"default",fn:w(({file:C,index:$})=>[le(b.$slots,"file",{file:C,index:$})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):O("v-if",!0)]))}}),W_e=j_e;const Y1=qt(W_e);function Y_e(t,e){let n;const i=J(!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()):(Ma(h,f.bm("parent","relative")),h.removeAttribute("loading-number")),Ma(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=Pg(fe({name:"ElLoading",setup(h,{expose:f}){const{ns:p,zIndex:m}=r8("loading");return f({ns:p,zIndex:m}),()=>{const y=s.spinner||s.svg,b=bt("svg",{class:"circular",viewBox:s.svgViewBox?s.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},[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(Ho,{name:p.b("fade"),onAfterLeave:c},{default:w(()=>[Re(_("div",{style:{backgroundColor:s.background||""},class:[p.b("mask"),s.customClass,p.is("fullscreen",s.fullscreen)]},[bt("div",{class:p.b("spinner")},[b,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 o0;const uf=function(t={},e){if(!Kt)return;const n=q_e(t);if(n.fullscreen&&o0)return o0;const i=Y_e({...n,closed:()=>{var o;(o=n.closed)==null||o.call(n),n.fullscreen&&(o0=void 0)}},e??uf._context);G_e(n,n.parent,i),NA(n,n.parent,i),n.parent.vLoadingAddClassList=()=>NA(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&&(o0=i),i},q_e=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}},G_e=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},NA=(t,e,n)=>{const i=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?Ma(e,i.bm("parent","relative")):yd(e,i.bm("parent","relative")),t.fullscreen&&t.lock?yd(e,i.bm("parent","hidden")):Ma(e,i.bm("parent","hidden"))};uf._context=null;const sm=Symbol("ElLoading"),ku=t=>`element-loading-${zi(t)}`,BA=(t,e)=>{const n=e.instance,i=c=>yt(e.value)?e.value[c]:void 0,s=c=>J(Ke(c)&&(n==null?void 0:n[c])||c),o=c=>s(i(c)||t.getAttribute(ku(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=sg._context,t[sm]={options:a,instance:l}},X_e=(t,e)=>{for(const n of Object.keys(t))hn(t[n])&&(t[n].value=e[n])},sg={mounted(t,e){e.value&&BA(t,e)},updated(t,e){const n=t[sm];if(!e.value){n==null||n.instance.close(),t[sm]=null;return}n?X_e(n.options,yt(e.value)?e.value:{text:t.getAttribute(ku("text")),svg:t.getAttribute(ku("svg")),svgViewBox:t.getAttribute(ku("svgViewBox")),spinner:t.getAttribute(ku("spinner")),background:t.getAttribute(ku("background")),customClass:t.getAttribute(ku("customClass"))}):BA(t,e)},unmounted(t){var e;(e=t[sm])==null||e.instance.close(),t[sm]=null}};sg._context=null;const K_e={install(t){uf._context=t._context,sg._context=t._context,t.directive("loading",sg),t.config.globalProperties.$loading=uf},directive:sg,service:uf};var Z_e=fe({name:"ElMessageBox",directives:{TrapFocus:ihe},components:{ElButton:He,ElFocusTrap:z1,ElInput:ft,ElOverlay:_8,ElIcon:be,..._R},inheritAttrs:!1,props:{buttonSize:{type:String,validator:rF},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}=r8("message-box",Y(()=>t.buttonSize)),{t:r}=n,{nextZIndex:a}=i,l=J(!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:Pi(Uf),cancelButtonLoadingIcon:Pi(Uf),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:a()}),u=Y(()=>{const z=c.type;return{[s.bm("icon",z)]:z&&jf[z]}}),d=kr(),h=kr(),f=Y(()=>{const z=c.type;return c.icon||z&&jf[z]||""}),p=Y(()=>!!c.message),m=J(),y=J(),b=J(),k=J(),C=J(),$=Y(()=>c.confirmButtonClass);Te(()=>c.inputValue,async z=>{await ot(),t.boxType==="prompt"&&z&&R()},{immediate:!0}),Te(()=>l.value,z=>{var U;z&&(t.boxType!=="prompt"&&(c.autofocus?b.value=((U=C.value)==null?void 0:U.$el)??m.value:b.value=m.value),c.zIndex=a()),t.boxType==="prompt"&&(z?ot().then(()=>{k.value&&k.value.$el&&(c.autofocus?b.value=V()??m.value:b.value=m.value)}):(c.editorErrorMessage="",c.validateError=!1))});const{isDragging:S}=SD(m,y,Y(()=>t.draggable),Y(()=>t.overflow));Ft(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=B4(P),I=z=>{var U;if(c.inputType!=="textarea"&&!((U=k.value)!=null&&U.isComposing))return z.preventDefault(),L("confirm")},L=z=>{var U;t.boxType==="prompt"&&z==="confirm"&&!R()||(c.action=z,c.beforeClose?(U=c.beforeClose)==null||U.call(c,z,c,M):M())},R=()=>{if(t.boxType==="prompt"){const z=c.inputPattern;if(z&&!z.test(c.inputValue||""))return c.editorErrorMessage=c.inputErrorMessage||r("el.messagebox.error"),c.validateError=!0,!1;const U=c.inputValidator;if(et(U)){const G=U(c.inputValue);if(G===!1)return c.editorErrorMessage=c.inputErrorMessage||r("el.messagebox.error"),c.validateError=!0,!1;if(Ke(G))return c.editorErrorMessage=G,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},V=()=>{var U;const z=(U=k.value)==null?void 0:U.$refs;return(z==null?void 0:z.input)??(z==null?void 0:z.textarea)},B=()=>{L("close")},F=()=>{t.closeOnPressEscape&&B()};return t.lockScroll&&P4(l,{ns:s}),{...go(c),ns:s,overlayEvent:T,visible:l,hasMessage:p,typeClass:u,contentId:d,inputId:h,btnSize:o,iconComponent:f,confirmButtonClasses:$,rootRef:m,focusStartRef:b,headerRef:y,inputRef:k,isDragging:S,confirmRef:C,doClose:M,handleClose:B,onCloseRequested:F,handleWrapperClick:P,handleInputEnter:I,handleAction:L,t:r}}});const J_e=["aria-label","aria-describedby"],Q_e=["aria-label"],eye=["id"];function tye(t,e,n,i,s,o){const r=H("el-icon"),a=H("el-input"),l=H("el-button"),c=H("el-focus-trap"),u=H("el-overlay");return v(),D(Ho,{name:"fade-in-linear",onAfterLeave:e[11]||(e[11]=d=>t.$emit("vanish")),persisted:""},{default:w(()=>[Re(_(u,{"z-index":t.zIndex,"overlay-class":[t.ns.is("message-box"),t.modalClass],mask:t.modal},{default:w(()=>[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:w(()=>[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]=Ee(()=>{},["stop"]))},[t.title!==null&&t.title!==void 0?(v(),A("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:w(()=>[(v(),D(Ct(t.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),g("span",null,x(t.title),1)],2),t.showClose?(v(),A("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(Ee(d=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[_(r,{class:q(t.ns.e("close"))},{default:w(()=>[(v(),D(Ct(t.closeIcon||"close")))]),_:1},8,["class"])],42,Q_e)):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:w(()=>[(v(),D(Ct(t.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),t.hasMessage?(v(),A("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,eye),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(Ee(d=>t.handleAction("cancel"),["prevent"]),["enter"]))},{default:w(()=>[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(Ee(d=>t.handleAction("confirm"),["prevent"]),["enter"]))},{default:w(()=>[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,J_e)]),_:3},8,["z-index","overlay-class","mask"]),[[jt,t.visible]])]),_:3})}var nye=gi(Z_e,[["render",tye]]);const o1=new Map,sye=t=>{let e=document.body;return t.appendTo&&(Ke(t.appendTo)&&(e=document.querySelector(t.appendTo)),Po(t.appendTo)&&(e=t.appendTo),Po(e)||(Tt("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),e=document.body)),e},iye=(t,e,n=null)=>{const i=_(nye,t,et(t.message)||is(t.message)?{default:et(t.message)?t.message:()=>t.message}:null);return i.appContext=n,Fc(i,e),sye(t).appendChild(e.firstElementChild),i.component},oye=()=>document.createElement("div"),rye=(t,e)=>{const n=oye();t.onVanish=()=>{Fc(null,n),o1.delete(s)},t.onAction=o=>{const r=o1.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=iye(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]=Pi(t[o]):s[o]=t[o]);return s.visible=!0,s};function gp(t,e=null){if(!Kt)return Promise.reject();let n;return Ke(t)||is(t)?t={message:t}:n=t.callback,new Promise((i,s)=>{const o=rye(t,e??gp._context);o1.set(o,{options:t,callback:n,resolve:i,reject:s})})}const aye=["alert","confirm","prompt"],lye={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};aye.forEach(t=>{gp[t]=cye(t)});function cye(t){return(e,n,i,s)=>{let o="";return yt(n)?(i=n,o=""):nn(n)?o="":o=n,gp(Object.assign({title:o,message:e,type:"",...lye[t]},i,{boxType:t}),s)}}gp.close=()=>{o1.forEach((t,e)=>{e.doClose()}),o1.clear()};gp._context=null;const Gl=gp;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 Ww=Gl,kF=["primary","success","info","warning","error"],uye=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:[...kF,""],default:""},zIndex:Number,closeIcon:{type:ds,default:Bo}}),dye={destroy:()=>!0},hye=["id"],fye=["textContent"],pye={key:0},mye=["innerHTML"];var gye=fe({name:"ElNotification",__name:"notification",props:uye,emits:dye,setup(t,{expose:e}){const n=t,{ns:i,zIndex:s}=r8("notification"),{nextZIndex:o,currentZIndex:r}=s,a=J(!1);let l;const c=Y(()=>{const k=n.type;return k&&jf[n.type]?i.m(k):""}),u=Y(()=>n.type&&jf[n.type]||n.icon),d=Y(()=>n.position.endsWith("right")?"right":"left"),h=Y(()=>n.position.startsWith("top")?"top":"bottom"),f=Y(()=>({[h.value]:`${n.offset}px`,zIndex:n.zIndex??r.value}));function p(){n.duration>0&&({stop:l}=Gk(()=>{a.value&&y()},n.duration))}function m(){l==null||l()}function y(){a.value=!1}function b(k){switch(ls(k)){case Ue.delete:case Ue.backspace:m();break;case Ue.esc:a.value&&y();break;default:p();break}}return Ft(()=>{p(),o(),a.value=!0}),Hn(document,"keydown",b),e({visible:a,close:y}),(k,C)=>(v(),D(Ho,{name:E(i).b("fade"),onBeforeLeave:t.onClose,onAfterLeave:C[1]||(C[1]=$=>k.$emit("destroy")),persisted:""},{default:w(()=>[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]=(...$)=>t.onClick&&t.onClick(...$))},[u.value?(v(),D(E(be),{key:0,class:q([E(i).e("icon"),c.value])},{default:w(()=>[(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,fye),Re(g("div",{class:q(E(i).e("content")),style:Xe(t.title?void 0:{margin:0})},[le(k.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(v(),A(ee,{key:1},[O(" Caution here, message could've been compromised, never use user's input as message "),g("p",{innerHTML:t.message},null,8,mye)],2112)):(v(),A("p",pye,x(t.message),1))])],6),[[jt,t.message]]),t.showClose?(v(),D(E(be),{key:0,class:q(E(i).e("closeBtn")),onClick:Ee(y,["stop"])},{default:w(()=>[(v(),D(Ct(t.closeIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],46,hye),[[jt,a.value]])]),_:3},8,["name","onBeforeLeave"]))}}),vye=gye;const Gf={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},Ey=16;let _ye=1;const kd=function(t={},e){if(!Kt)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)+Ey}),i+=Ey;const s=`notification_${_ye++}`,o=t.onClose,r={...t,offset:i,id:s,onClose:()=>{yye(s,n,o)}};let a=document.body;Po(t.appendTo)?a=t.appendTo:Ke(t.appendTo)&&(a=document.querySelector(t.appendTo)),Po(a)||(Tt("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),a=document.body);const l=document.createElement("div"),c=_(vye,r,et(r.message)?r.message:is(r.message)?()=>r.message:null);return c.appContext=nn(e)?kd._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}}};kF.forEach(t=>{kd[t]=(e={},n)=>((Ke(e)||is(e))&&(e={message:e}),kd({...e,type:t},n))});function yye(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-Ey;d.props.offset=h}}function bye(){for(const t of Object.values(Gf))t.forEach(({vm:e})=>{e.component.exposed.visible.value=!1})}function wye(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)+Ey}kd.closeAll=bye;kd.updateOffsets=wye;kd._context=null;const kye=Wre(kd,"$notify"),Cye=Ge({trigger:Ec.trigger,triggerKeys:Ec.triggerKeys,placement:N0.placement,disabled:Ec.disabled,visible:zn.visible,transition:zn.transition,popperOptions:N0.popperOptions,tabindex:N0.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}}),xye={"update:visible":t=>Jn(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},Sye="onUpdate:visible";var $ye=fe({name:"ElPopover",__name:"popover",props:Cye,emits:xye,setup(t,{expose:e,emit:n}){const i=t,s=n,o=Y(()=>i[Sye]),r=Be("popover"),a=J(),l=Y(()=>{var b;return(b=E(a))==null?void 0:b.popperRef}),c=Y(()=>[{width:fi(i.width)},i.popperStyle]),u=Y(()=>[r.b(),i.popperClass,{[r.m("plain")]:!!i.content}]),d=Y(()=>i.transition===`${r.namespace.value}-fade-in-linear`),h=()=>{var b;(b=a.value)==null||b.hide()},f=()=>{s("before-enter")},p=()=>{s("before-leave")},m=()=>{s("after-enter")},y=()=>{s("update:visible",!1),s("after-leave")};return e({popperRef:l,hide:h}),(b,k)=>(v(),D(E(Ss),Wt({ref_key:"tooltipRef",ref:a},b.$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:y}),{content:w(()=>[t.title?(v(),A("div",{key:0,class:q(E(r).e("title")),role:"title"},x(t.title),3)):O("v-if",!0),le(b.$slots,"default",{hide:h},()=>[N(x(t.content),1)])]),default:w(()=>[b.$slots.reference?le(b.$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"]))}}),Aye=$ye;const zA=(t,e)=>{var i;const n=(i=e.arg||e.value)==null?void 0:i.popperRef;n&&(n.triggerRef=t)};var Eye={mounted(t,e){zA(t,e)},updated(t,e){zA(t,e)}};const Mye="popover",Tye=Yre(Eye,Mye),Yo=qt(Aye,{directive:Tye});var Pye=!1;/*!
78 * pinia v2.3.1
79 * (c) 2025 Eduardo San Martin Morote
80 * @license MIT
81 */let CF;const d2=t=>CF=t,xF=Symbol();function TC(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var ig;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(ig||(ig={}));function Iye(){const t=fb(!0),e=t.run(()=>J({}));let n=[],i=[];const s=Pi({install(o){d2(s),s._a=o,o.provide(xF,s),o.config.globalProperties.$pinia=s,i.forEach(r=>n.push(r)),i=[]},use(o){return!this._a&&!Pye?i.push(o):n.push(o),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return s}const SF=()=>{};function HA(t,e,n,i=SF){t.push(e);const s=()=>{const o=t.indexOf(e);o>-1&&(t.splice(o,1),i())};return!n&&pb()&&mb(s),s}function dh(t,...e){t.slice().forEach(n=>{n(...e)})}const Lye=t=>t(),UA=Symbol(),Yw=Symbol();function PC(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];TC(s)&&TC(i)&&t.hasOwnProperty(n)&&!hn(i)&&!Fr(i)?t[n]=PC(s,i):t[n]=i}return t}const Oye=Symbol();function Dye(t){return!TC(t)||!t.hasOwnProperty(Oye)}const{assign:Xl}=Object;function Rye(t){return!!(hn(t)&&t.effect)}function Vye(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]=Pi(Y(()=>{d2(n);const f=n._s.get(t);return r[h].call(f,f)})),d),{}))}return l=$F(t,c,e,n,i,!0),l}function $F(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 y(T){let I;c=u=!1,typeof T=="function"?(T(i.state.value[t]),I={type:ig.patchFunction,storeId:t,events:f}):(PC(i.state.value[t],T),I={type:ig.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 b=o?function(){const{state:I}=n,L=I?I():{};this.$patch(R=>{Xl(R,L)})}:SF;function k(){r.stop(),d=[],h=[],i._s.delete(t)}const C=(T,I="")=>{if(UA in T)return T[Yw]=I,T;const L=function(){d2(i);const R=Array.from(arguments),V=[],B=[];function F(G){V.push(G)}function z(G){B.push(G)}dh(h,{args:R,name:L[Yw],store:S,after:F,onError:z});let U;try{U=T.apply(this&&this.$id===t?this:S,R)}catch(G){throw dh(B,G),G}return U instanceof Promise?U.then(G=>(dh(V,G),G)).catch(G=>(dh(B,G),Promise.reject(G))):(dh(V,U),U)};return L[UA]=!0,L[Yw]=I,L},$={_p:i,$id:t,$onAction:HA.bind(null,h),$patch:y,$reset:b,$subscribe(T,I={}){const L=HA(d,T,I.detached,()=>R()),R=r.run(()=>Te(()=>i.state.value[t],V=>{(I.flush==="sync"?u:c)&&T({storeId:t,type:ig.direct,events:f},V)},Xl({},l,I)));return L},$dispose:k},S=In($);i._s.set(t,S);const P=(i._a&&i._a.runWithContext||Lye)(()=>i._e.run(()=>(r=fb()).run(()=>e({action:C}))));for(const T in P){const I=P[T];if(hn(I)&&!Rye(I)||Fr(I))o||(p&&Dye(I)&&(hn(I)?I.value=p[T]:PC(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=>{y(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=rI();return a=a||(c?qe(xF,null):null),a&&d2(a),a=CF,a._s.has(i)||(o?$F(i,e,s,a):Vye(i,s,a)),a._s.get(i)}return r.$id=i,r}function Fye(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 Nye(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 Bye(t){return typeof t=="object"&&t!==null}function jA(t,e){return t=Bye(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 zye(t,e){return e.reduce((n,i)=>n==null?void 0:n[i],t)}function Hye(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 Uye(t,e){return e.reduce((n,i)=>{const s=i.split(".");return Hye(n,s,zye(t,s))},{})}function jye(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 WA(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 YA(t,{storage:e,serializer:n,key:i,paths:s,debug:o}){try{const r=Array.isArray(s)?Uye(t,s):t;e.setItem(i,n.serialize(r))}catch(r){o&&console.error("[pinia-plugin-persistedstate]",r)}}function Wye(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=>jA(a,t)):[jA(i,t)]).map(jye(t,s)).filter(Boolean);s.$persist=()=>{r.forEach(a=>{YA(s.$state,a)})},s.$hydrate=({runHooks:a=!0}={})=>{r.forEach(l=>{const{beforeRestore:c,afterRestore:u}=l;a&&(c==null||c(e)),WA(s,l),a&&(u==null||u(e))})},r.forEach(a=>{const{beforeRestore:l,afterRestore:c}=a;l==null||l(e),WA(s,a),c==null||c(e),s.$subscribe((u,d)=>{YA(d,a)},{detached:!0})})}}var Yye=Wye();const ue=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},qye={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()}}},Gye=["id"];function Xye(t,e,n,i,s,o){const r=Va;return v(),D(r,Wt({"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:w(()=>[g("div",{class:q(n.bodyClass)},[le(t.$slots,"default")],2)]),_:2},[n.withHeader?{name:"header",fn:w(({close:a,titleId:l,titleClass:c})=>[le(t.$slots,"header",{close:a,titleId:l,titleClass:c},()=>[n.title?(v(),A("h4",{key:0,id:l,class:q([c,n.headerClass]),style:{margin:"0"}},x(n.title),11,Gye)):O("",!0)])]),key:"0"}:void 0,t.$slots.footer?{name:"footer",fn:w(()=>[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 tu=ue(qye,[["render",Xye]]);function Kye(t,e){for(var n=-1,i=t==null?0:t.length;++n<i&&e(t[n],n,t)!==!1;);return t}var Zye=Kye;function Jye(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 Qye=Jye,ebe=Qye,tbe=ebe(),nbe=tbe;function sbe(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}var ibe=sbe,obe=typeof xs=="object"&&xs&&xs.Object===Object&&xs,AF=obe,rbe=AF,abe=typeof self=="object"&&self&&self.Object===Object&&self,lbe=rbe||abe||Function("return this")(),Fa=lbe,cbe=Fa,ube=cbe.Symbol,h2=ube,qA=h2,EF=Object.prototype,dbe=EF.hasOwnProperty,hbe=EF.toString,Kp=qA?qA.toStringTag:void 0;function fbe(t){var e=dbe.call(t,Kp),n=t[Kp];try{t[Kp]=void 0;var i=!0}catch{}var s=hbe.call(t);return i&&(e?t[Kp]=n:delete t[Kp]),s}var pbe=fbe,mbe=Object.prototype,gbe=mbe.toString;function vbe(t){return gbe.call(t)}var _be=vbe,GA=h2,ybe=pbe,bbe=_be,wbe="[object Null]",kbe="[object Undefined]",XA=GA?GA.toStringTag:void 0;function Cbe(t){return t==null?t===void 0?kbe:wbe:XA&&XA in Object(t)?ybe(t):bbe(t)}var G1=Cbe;function xbe(t){return t!=null&&typeof t=="object"}var X1=xbe,Sbe=G1,$be=X1,Abe="[object Arguments]";function Ebe(t){return $be(t)&&Sbe(t)==Abe}var Mbe=Ebe,KA=Mbe,Tbe=X1,MF=Object.prototype,Pbe=MF.hasOwnProperty,Ibe=MF.propertyIsEnumerable,Lbe=KA(function(){return arguments}())?KA:function(t){return Tbe(t)&&Pbe.call(t,"callee")&&!Ibe.call(t,"callee")},T8=Lbe,Obe=Array.isArray,Na=Obe,My={exports:{}};function Dbe(){return!1}var Rbe=Dbe;My.exports;(function(t,e){var n=Fa,i=Rbe,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})(My,My.exports);var P8=My.exports,Vbe=9007199254740991,Fbe=/^(?:0|[1-9]\d*)$/;function Nbe(t,e){var n=typeof t;return e=e??Vbe,!!e&&(n=="number"||n!="symbol"&&Fbe.test(t))&&t>-1&&t%1==0&&t<e}var TF=Nbe,Bbe=9007199254740991;function zbe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Bbe}var I8=zbe,Hbe=G1,Ube=I8,jbe=X1,Wbe="[object Arguments]",Ybe="[object Array]",qbe="[object Boolean]",Gbe="[object Date]",Xbe="[object Error]",Kbe="[object Function]",Zbe="[object Map]",Jbe="[object Number]",Qbe="[object Object]",e2e="[object RegExp]",t2e="[object Set]",n2e="[object String]",s2e="[object WeakMap]",i2e="[object ArrayBuffer]",o2e="[object DataView]",r2e="[object Float32Array]",a2e="[object Float64Array]",l2e="[object Int8Array]",c2e="[object Int16Array]",u2e="[object Int32Array]",d2e="[object Uint8Array]",h2e="[object Uint8ClampedArray]",f2e="[object Uint16Array]",p2e="[object Uint32Array]",ts={};ts[r2e]=ts[a2e]=ts[l2e]=ts[c2e]=ts[u2e]=ts[d2e]=ts[h2e]=ts[f2e]=ts[p2e]=!0;ts[Wbe]=ts[Ybe]=ts[i2e]=ts[qbe]=ts[o2e]=ts[Gbe]=ts[Xbe]=ts[Kbe]=ts[Zbe]=ts[Jbe]=ts[Qbe]=ts[e2e]=ts[t2e]=ts[n2e]=ts[s2e]=!1;function m2e(t){return jbe(t)&&Ube(t.length)&&!!ts[Hbe(t)]}var g2e=m2e;function v2e(t){return function(e){return t(e)}}var _2e=v2e,Ty={exports:{}};Ty.exports;(function(t,e){var n=AF,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})(Ty,Ty.exports);var y2e=Ty.exports,b2e=g2e,w2e=_2e,ZA=y2e,JA=ZA&&ZA.isTypedArray,k2e=JA?w2e(JA):b2e,L8=k2e,C2e=ibe,x2e=T8,S2e=Na,$2e=P8,A2e=TF,E2e=L8,M2e=Object.prototype,T2e=M2e.hasOwnProperty;function P2e(t,e){var n=S2e(t),i=!n&&x2e(t),s=!n&&!i&&$2e(t),o=!n&&!i&&!s&&E2e(t),r=n||i||s||o,a=r?C2e(t.length,String):[],l=a.length;for(var c in t)(e||T2e.call(t,c))&&!(r&&(c=="length"||s&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||A2e(c,l)))&&a.push(c);return a}var I2e=P2e,L2e=Object.prototype;function O2e(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||L2e;return t===n}var PF=O2e;function D2e(t,e){return function(n){return t(e(n))}}var R2e=D2e,V2e=R2e,F2e=V2e(Object.keys,Object),N2e=F2e,B2e=PF,z2e=N2e,H2e=Object.prototype,U2e=H2e.hasOwnProperty;function j2e(t){if(!B2e(t))return z2e(t);var e=[];for(var n in Object(t))U2e.call(t,n)&&n!="constructor"&&e.push(n);return e}var IF=j2e;function W2e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var K1=W2e,Y2e=G1,q2e=K1,G2e="[object AsyncFunction]",X2e="[object Function]",K2e="[object GeneratorFunction]",Z2e="[object Proxy]";function J2e(t){if(!q2e(t))return!1;var e=Y2e(t);return e==X2e||e==K2e||e==G2e||e==Z2e}var LF=J2e,Q2e=LF,ewe=I8;function twe(t){return t!=null&&ewe(t.length)&&!Q2e(t)}var O8=twe,nwe=I2e,swe=IF,iwe=O8;function owe(t){return iwe(t)?nwe(t):swe(t)}var D8=owe,rwe=nbe,awe=D8;function lwe(t,e){return t&&rwe(t,e,awe)}var cwe=lwe,uwe=O8;function dwe(t,e){return function(n,i){if(n==null)return n;if(!uwe(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 hwe=dwe,fwe=cwe,pwe=hwe,mwe=pwe(fwe),gwe=mwe;function vwe(t){return t}var OF=vwe,_we=OF;function ywe(t){return typeof t=="function"?t:_we}var bwe=ywe,wwe=Zye,kwe=gwe,Cwe=bwe,xwe=Na;function Swe(t,e){var n=xwe(t)?wwe:kwe;return n(t,Cwe(e))}var $we=Swe,Awe=$we;const Mc=vi(Awe);function Bt(t){return window.fluentComAdmin.i18n[t]||t}const Ewe={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")}},Mwe={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.")}},Twe={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.")}},Pwe={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]},Iwe={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 Lwe(t,e,n,i,s,o){const r=He,a=Y1,l=H("CloseBold"),c=be,u=xt("loading");return v(),A(ee,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:w(()=>[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:w(()=>[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:w(()=>[le(t.$slots,"remove",{},()=>[n.removeIcon?(v(),D(c,{key:0},{default:w(()=>[_(l)]),_:1})):O("",!0),g("span",null,x(t.$t("Remove")),1)])]),_:3},8,["onClick","text","aria-label"])):O("",!0)],64)}const Ll=ue(Iwe,[["render",Lwe]]),Owe={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])}}},Dwe={class:"fcom_svg_generator"},Rwe={class:"fcom_form_item"},Vwe={class:"fcom_form_item"},Fwe=["innerHTML"];function Nwe(t,e,n,i,s,o){const r=Qc,a=Hd,l=ws;return v(),A("div",Dwe,[g("div",Rwe,[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",Vwe,[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:w(()=>[(v(!0),A(ee,null,we(o.svgShapes,(c,u)=>(v(),D(a,{key:u,value:u},{default:w(()=>[g("div",{innerHTML:c},null,8,Fwe)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])])}const Bwe=ue(Owe,[["render",Nwe]]);var R8="emoji-mart";const zwe=JSON;var DF=typeof window<"u"&&"localStorage"in window;let IC,LC;function Hwe(t){t||(t={}),IC=t.getter,LC=t.setter}function Uwe(t){R8=t}function jwe(t){for(let e in t){let n=t[e];RF(e,n)}}function RF(t,e){if(LC)LC(t,e);else{if(!DF)return;try{window.localStorage[`${R8}.${t}`]=zwe.stringify(e)}catch{}}}function Wwe(t){if(IC)return IC(t);if(!DF)return;try{var e=window.localStorage[`${R8}.${t}`]}catch{return}if(e)return JSON.parse(e)}const Xf={update:jwe,set:RF,get:Wwe,setNamespace:Uwe,setHandlers:Hwe},qw={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"},VF=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 FF(t){var e=Object.getOwnPropertyNames(t);for(let n of e){let i=t[n];t[n]=i&&typeof i=="object"?FF(i):i}return Object.freeze(t)}const Ywe=t=>{if(!t.compressed)return t;t.compressed=!1;for(let e in t.emojis){let n=t.emojis[e];for(let i in qw)n[i]=n[qw[i]],delete n[qw[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=VF(n)}return t=FF(t),t},Gw=["+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,V8,OC={};function NF(){V8=!0,or=Xf.get("frequently")}function qwe(t){V8||NF();var{id:e}=t;or||(or=OC),or[e]||(or[e]=0),or[e]+=1,Xf.set("last",e),Xf.set("frequently",or)}function Gwe(t){if(V8||NF(),!or){OC={};const r=[];let a=Math.min(t,Gw.length);for(let l=0;l<a;l++)OC[Gw[l]]=parseInt((a-l)/4,10)+1,r.push(Gw[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 DC={add:qwe,get:Gwe},Xwe={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>'},Kwe={props:{i18n:{type:Object,required:!0},color:{type:String},categories:{type:Array,required:!0},activeCategory:{type:Object,default(){return{}}}},emits:["click"],created(){this.svgs=Xwe}},Zwe={role:"tablist",class:"emoji-mart-anchors"},Jwe=["aria-label","aria-selected","data-title","onClick"],Qwe=["innerHTML"];function e3e(t,e,n,i,s,o){return v(),A("div",Zwe,[(v(!0),A(ee,null,we(n.categories,r=>(v(),A("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,Qwe),g("span",{"aria-hidden":"true",class:"emoji-mart-anchor-bar",style:Xe({backgroundColor:n.color})},null,4)],14,Jwe))),128))])}const t3e=ue(Kwe,[["render",e3e]]),n3e=String,s3e=n3e.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 i3e(t){var e=t.split("-"),n=e.map(i=>`0x${i}`);return s3e.apply(null,n)}function QA(t){return t.reduce((e,n)=>(e.indexOf(n)===-1&&e.push(n),e),[])}function o3e(t,e){const n=QA(t),i=QA(e);return n.filter(s=>i.indexOf(s)>=0)}function BF(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=BF(s,o)),n[i]=o}return n}function r3e(){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 a3e=61,l3e=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/,eE=["1F3FA","1F3FB","1F3FC","1F3FD","1F3FE","1F3FF"];class c3e{constructor(e,{emojisToShowFilter:n,include:i,exclude:s,custom:o,recent:r,recentLength:a=20}={}){this._data=Ywe(e),this._emojisFilter=n||null,this._include=i||null,this._exclude=s||null,this._custom=o||[],this._recent=r||DC.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(l3e);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,y=r.substr(0,c),b=m.indexOf(y);if(b!=-1){let k=b+1;y==f&&(k=0),l.results.push(p),l.emojis[f]=p,h[f]=k}}l.results.sort((f,p)=>{var m=h[f.id],y=h[p.id];return m-y})}a=l.emojis}return l.results}).filter(r=>r);var o=null;return s.length>1?o=o3e.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=VF(n));let i=new Py(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 Py(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 Py{constructor(e){if(this._data=Object.assign({},e),this._skins=null,this._data.skin_variations){this._skins=[];for(var n in eE){let i=eE[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 Py(o))}}this._sanitized=u3e(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=a3e-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 zF{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 u3e(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:i3e(r)})}const d3e={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"}},h3e={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{}}}},f3e={props:{...d3e,data:{type:Object,required:!0}},emits:["click","mouseenter","mouseleave"],computed:{view(){return new zF(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 p3e(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:w(()=>[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 HF=ue(f3e,[["render",p3e]]),m3e={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 zF(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:HF}},g3e=["aria-label"],v3e={class:"emoji-mart-category-label"},_3e={class:"emoji-mart-category-label"},y3e=["aria-label","data-title","title","onMouseenter","onMouseleave","onClick"],b3e={key:0},w3e={class:"emoji-mart-no-results-label"};function k3e(t,e,n,i,s,o){const r=H("emoji");return o.isVisible&&(o.isSearch||o.hasResults)?(v(),A("section",{key:0,class:q({"emoji-mart-category":!0,"emoji-mart-no-results":!o.hasResults}),"aria-label":n.i18n.categories[n.id]},[g("div",v3e,[g("h3",_3e,x(n.i18n.categories[n.id]),1)]),(v(!0),A(ee,null,we(o.emojiObjects,({emojiObject:a,emojiView:l})=>(v(),A(ee,null,[l.canRender?(v(),A("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,y3e)):O("",!0)],64))),256)),o.hasResults?O("",!0):(v(),A("div",b3e,[_(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",w3e,x(n.i18n.notfound),1)]))],10,g3e)):O("",!0)}const C3e=ue(m3e,[["render",k3e]]),x3e={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}}},S3e=["onClick"];function $3e(t,e,n,i,s,o){return v(),A("div",{class:q({"emoji-mart-skin-swatches":!0,"emoji-mart-skin-swatches-opened":s.opened})},[(v(),A(ee,null,we(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,S3e)],2)),64))],2)}const A3e=ue(x3e,[["render",$3e]]),E3e={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:HF,Skins:A3e}},M3e={class:"emoji-mart-preview"},T3e={class:"emoji-mart-preview-emoji"},P3e={class:"emoji-mart-preview-data"},I3e={class:"emoji-mart-preview-name"},L3e={class:"emoji-mart-preview-shortnames"},O3e={class:"emoji-mart-preview-emoticons"},D3e={class:"emoji-mart-preview-emoji"},R3e={class:"emoji-mart-preview-data"},V3e={class:"emoji-mart-title-label"},F3e={key:0,class:"emoji-mart-preview-skins"};function N3e(t,e,n,i,s,o){const r=H("emoji"),a=H("skins");return v(),A("div",M3e,[n.emoji?(v(),A(ee,{key:0},[g("div",T3e,[_(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",P3e,[g("div",I3e,x(n.emoji.name),1),g("div",L3e,[(v(!0),A(ee,null,we(o.emojiShortNames,l=>(v(),A("span",{key:l,class:"emoji-mart-preview-shortname"},":"+x(l)+":",1))),128))]),g("div",O3e,[(v(!0),A(ee,null,we(o.emojiEmoticons,l=>(v(),A("span",{key:l,class:"emoji-mart-preview-emoticon"},x(l),1))),128))])])],64)):(v(),A(ee,{key:1},[g("div",D3e,[_(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",R3e,[g("span",V3e,x(n.title),1)]),n.showSkinTones?(v(),A("div",F3e,[_(a,{skin:n.skinProps.skin,onChange:e[0]||(e[0]=l=>n.onSkinChange(l))},null,8,["skin"])])):O("",!0)],64))])}const B3e=ue(E3e,[["render",N3e]]),z3e={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()}},H3e={class:"emoji-mart-search"},U3e=["placeholder"];function j3e(t,e,n,i,s,o){return v(),A("div",H3e,[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,U3e),[[md,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 W3e=ue(z3e,[["render",j3e]]);var Y3e=typeof window<"u";Y3e&&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 G3e={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"}},X3e={props:{...h3e,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+r3e()},filteredCategories(){return this.view.filteredCategories},mergedI18n(){return Object.freeze(BF(G3e,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),DC.add(this.view.previewEmoji))},onEmojiClick(t){this.$emit("select",t),DC.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:t3e,Category:C3e,Preview:B3e,Search:W3e}},K3e={key:0,class:"emoji-mart-bar emoji-mart-bar-anchors"},Z3e={id:"emoji-mart-list",ref:"scrollContent",role:"listbox","aria-expanded":"true"},J3e={key:0,class:"emoji-mart-bar emoji-mart-bar-preview"};function Q3e(t,e,n,i,s,o){const r=H("anchors"),a=H("search"),l=H("category"),c=H("preview");return v(),A("section",{class:"emoji-mart emoji-mart-static",style:Xe(o.customStyles)},[t.showCategories?(v(),A("div",K3e,[_(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",Z3e,[le(t.$slots,"customCategory"),(v(!0),A(ee,null,we(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(),A("div",J3e,[_(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 eke=ue(X3e,[["render",Q3e]]),tke={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){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)}},nke=["onClick","onKeydown"];function ske(t,e,n,i,s,o){const r=H("MoreFilled"),a=be,l=He,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:w(()=>[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:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1})]),_:1},8,["aria-label","aria-expanded"])])],512)]),default:w(()=>[le(t.$slots,"default",{hide:o.hide},()=>[g("ul",{class:"actions_items",role:"menu","aria-orientation":"vertical",onKeydown:e[1]||(e[1]=ut(Ee((...u)=>o.hideAndFocusTrigger&&o.hideAndFocusTrigger(...u),["prevent","stop"]),["esc"]))},[(v(!0),A(ee,null,we(n.items,(u,d)=>(v(),A("li",{key:d,ref_for:!0,ref:"menuItems",class:q(["fcom_action_popover_item",u.type?"fcom_action_popover_item_"+u.type:""]),role:"menuitem",tabindex:"0",onClick:h=>o.handleAction(u),onKeydown:[ut(Ee(h=>o.handleAction(u),["prevent"]),["enter"]),ut(Ee(h=>o.handleAction(u),["prevent"]),["space"]),ut(Ee(h=>o.focusItem(d+1),["prevent"]),["down"]),ut(Ee(h=>o.focusItem(d-1),["prevent"]),["up"])]},x(u.label),43,nke))),128))],32)])]),_:3},8,["placement","persistent","width","visible","teleported","onAfterEnter"])}const oa=ue(tke,[["render",ske]]),ike={name:"SmilyIcon"},oke={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rke(t,e,n,i,s,o){return v(),A("svg",oke,[...e[0]||(e[0]=[Ra('<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 ake=ue(ike,[["render",rke]]),lke={name:"EmojiPicker",components:{Picker:eke,ActionPopover:oa,SmilyIcon:ake},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 c3e(e),this.applyEmojiIndex()):this.errorMessage=this.$t("Emoji loading failed")}).catch(()=>{this.errorMessage=this.$t("Emoji loading failed")}).finally(()=>{this.isLoading=!1})}}},cke={key:0,class:"emoji-mart emoji-mart-static",style:{width:"320px",padding:"10px 20px"}},uke={key:0},dke={style:{"text-align":"center","margin-bottom":"20px"}},hke={key:1,class:"fcom_emoji_holder"};function fke(t,e,n,i,s,o){const r=H("SmilyIcon"),a=be,l=He,c=Nt,u=H("Picker"),d=H("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:w(({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:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1})]),_:1},8,["aria-label","aria-expanded","onKeydown"])]),default:w(()=>[g("div",{class:"ffcom_emoji",onKeydown:e[0]||(e[0]=ut(Ee(h=>o.closeAndRefocus(),["prevent","stop"]),["esc"]))},[s.emojiLoading?(v(),A("div",cke,[s.errorMessage?(v(),A("div",uke,x(s.errorMessage),1)):(v(),A(ee,{key:1},[g("div",dke,x(t.$t("Loading...")),1),_(c,{animated:!0,rows:3})],64))])):s.emojiIndex?(v(),A("div",hke,[_(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 UF=ue(lke,[["render",fke]]),pke={name:"LogoEmojiSelector",components:{EmojiPicker:UF,ImageUploader:Ll,SvgShapeGenerator:Bwe,ActionPopover:oa},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"}}},mke=["innerHTML"];function gke(t,e,n,i,s,o){const r=He,a=H("EmojiPicker"),l=ft,c=u2,u=H("SvgShapeGenerator"),d=Wo,h=H("ImageUploader"),f=c2,p=H("action-popover");return v(),D(p,{ref:"iconPicker","close-on-click-outside":!0,"trigger-interactive":!0,teleported:!0,width:t.modalWidth},{trigger:w(()=>[_(r,{"aria-label":t.$t("Pick Emoji"),style:{padding:"4px 16px",display:"flex","justify-content":"center","align-items":"center"}},{default:w(()=>[g("span",{class:"logo_emoji_holder",style:{cursor:"pointer"},innerHTML:o.currentMark||""},null,8,mke)]),_:1},8,["aria-label"])]),default:w(({hide:m})=>[g("div",null,[_(f,{modelValue:s.selectedTab,"onUpdate:modelValue":e[5]||(e[5]=y=>s.selectedTab=y),type:"border-card"},{default:w(()=>[_(c,{name:"emoji",label:t.$t("Emoji")},{default:w(()=>[_(l,{onChange:e[1]||(e[1]=y=>o.setData("emoji")),modelValue:s.emoji,"onUpdate:modelValue":e[2]||(e[2]=y=>s.emoji=y),placeholder:t.$t("Select or paste your emoji here"),style:{width:"100%"}},hs({_:2},[t.has_pro?{name:"append",fn:w(()=>[_(a,{close_on_select:!0,onEmojiSelected:e[0]||(e[0]=y=>{s.emoji=y,o.setData("emoji")})})]),key:"0"}:void 0]),1032,["modelValue","placeholder"])]),_:1},8,["label"]),_(c,{name:"shape",label:t.$t("Shape")},{default:w(()=>[_(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:w(()=>[_(l,{rows:4,type:"textarea",onChange:e[3]||(e[3]=y=>o.setData("shape_svg")),modelValue:s.shape_svg,"onUpdate:modelValue":e[4]||(e[4]=y=>s.shape_svg=y),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:w(()=>[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:y=>m(),type:"success",plain:"",class:"fcom_mt_20"},{default:w(()=>[N(x(t.$t("Close")),1)]),_:1},8,["onClick"])])]),_:1},8,["width"])}const Z1=ue(pke,[["render",gke]]),vke={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})}}},_ke={key:0,class:"fcom_slug_input_info"},yke=["innerHTML"],bke={key:1,class:"fcom_help_text"};function wke(t,e,n,i,s,o){const r=He,a=ft;return v(),A(ee,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:w(()=>[g("span",null,x(n.prefix),1)]),key:"0"}:void 0,s.showEdit?{name:"append",fn:w(()=>[_(r,{onClick:e[0]||(e[0]=l=>o.confirmEditInit()),text:"",type:"info"},{default:w(()=>[N(x(t.$t("change")),1)]),_:1})]),key:"1"}:void 0]),1032,["disabled","readonly","modelValue","placeholder","onInput"]),!s.showEdit&&n.edit_notice?(v(),A("div",_ke,[g("p",{innerHTML:n.edit_notice},null,8,yke)])):O("",!0),n.description?(v(),A("div",bke,[g("p",null,x(n.description),1)])):O("",!0)],64)}const Yd=ue(vke,[["render",wke]]),kke={name:"ErrorAlerts",props:{errors:{type:Array,default:()=>[]},dismissable:{type:Boolean,default:!1}},data(){return{dismissed:!1}},watch:{errors(){this.dismissed=!1}}},Cke={class:"fcom_errors_alert_list"};function xke(t,e,n,i,s,o){const r=sa;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:w(()=>[g("ul",Cke,[(v(!0),A(ee,null,we(n.errors,(a,l)=>(v(),A("li",{key:l},x(a),1))),128))])]),_:1},8,["closable"])):O("",!0)}const J1=ue(kke,[["render",xke]]),Ske={name:"TopicSelector",props:["modelValue","creatable","space_id"],emits:["update:modelValue"],components:{SlugInput:Yd,ActionPopover:oa,ErrorAlerts:J1},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()}},$ke={class:"fcom_topic_selector"},Ake={key:0,class:"fcom_meta_text"};function Eke(t,e,n,i,s,o){const r=sn,a=Jt,l=H("Plus"),c=be,u=He,d=ft,h=en,f=H("slug-input"),p=H("error-alerts"),m=tn,y=H("action-popover"),b=xt("loading");return v(),A("div",$ke,[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:w(()=>[(v(!0),A(ee,null,we(s.topics,k=>(v(),D(r,{key:k.slug,label:k.title,value:k.id},{default:w(()=>[g("span",null,x(k.title),1),k.description?(v(),A("span",Ake,x(k.description),1)):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","multiple-limit","placeholder"])),[[b,s.loading]]),t.isAdmin()&&n.creatable?(v(),D(y,{key:0,placement:"left",width:400,onShow:o.initCreatetopic},{trigger:w(()=>[_(u,{disabled:o.isTopicLimitReached,class:"fcom_secondary_button"},{default:w(()=>[_(c,null,{default:w(()=>[_(l)]),_:1}),g("span",null,x(t.$t("New")),1)]),_:1},8,["disabled"])]),default:w(({hide:k})=>[_(m,{modelValue:s.newTopic,"onUpdate:modelValue":e[4]||(e[4]=C=>s.newTopic=C),"label-position":"top","require-asterisk-position":"right"},{default:w(()=>[_(h,{label:t.$t("Title"),required:""},{default:w(()=>[_(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:w(()=>[_(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:w(()=>[_(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:w(()=>[_(u,{class:"fcom_primary_button",onClick:C=>o.createTopic(k),loading:s.creatingTopic},{default:w(()=>[N(x(t.$t("Create")),1)]),_:1},8,["onClick","loading"])]),_:2},1024)]),_:2},1032,["modelValue"])]),_:1},8,["onShow"])):O("",!0)])}const jF=ue(Ske,[["render",Eke]]),Mke={name:"ListViewIcon"},Tke={width:"160",height:"158",viewBox:"0 0 160 158",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Pke(t,e,n,i,s,o){return v(),A("svg",Tke,[...e[0]||(e[0]=[Ra('<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 Ike=ue(Mke,[["render",Pke]]),Lke={name:"TimelineViewIcon"},Oke={width:"160",height:"158",viewBox:"0 0 160 158",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Dke(t,e,n,i,s,o){return v(),A("svg",Oke,[...e[0]||(e[0]=[Ra('<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 Rke=ue(Lke,[["render",Dke]]),Vke={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 Fke(t,e,n,i,s,o){const r=sn,a=Jt,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:w(()=>[(v(!0),A(ee,null,we(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 F8=ue(Vke,[["render",Fke]]),Nke={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)}}},Bke={class:"fcom_form_builder"},zke=["innerHTML"],Hke={key:8},Uke={key:9,class:"fcom_help_text"},jke=["innerHTML"];function Wke(t,e,n,i,s,o){const r=ft,a=Li,l=ws,c=sn,u=Jt,d=Yt,h=s2,f=Wd,p=Qc,m=en,y=He,b=tn;return v(),A("div",Bke,[_(b,{"label-position":"top",model:n.formData,onSubmit:Ee(t.doNothing,["prevent"])},{default:w(()=>[(v(!0),A(ee,null,we(n.formFields,(k,C)=>(v(),D(m,{key:t.index,label:k.label},hs({default:w(()=>[k.type=="text"?(v(),D(r,{key:0,modelValue:n.formData[C],"onUpdate:modelValue":$=>n.formData[C]=$,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":$=>n.formData[C]=$},{default:w(()=>[(v(!0),A(ee,null,we(k.options,($,S)=>(v(),D(a,{key:S,value:$.value,label:$.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":$=>n.formData[C]=$,placeholder:k.placeholder},{default:w(()=>[(v(!0),A(ee,null,we(k.options,($,S)=>(v(),D(c,{key:S,label:$.label,value:$.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":$=>n.formData[C]=$},{default:w(()=>[(v(!0),A(ee,null,we(k.options,($,S)=>(v(),D(d,{key:S,value:$.value,label:$.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":$=>n.formData[C]=$,"true-value":k.true_value||"yes","false-value":k.false_value||"no",class:"fcom_checkbox"},{default:w(()=>[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":$=>n.formData[C]=$,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":$=>n.formData[C]=$},null,8,["modelValue","onUpdate:modelValue"])):k.type=="raw_html"?(v(),A("div",{key:7,innerHTML:k.content},null,8,zke)):(v(),A("div",Hke,[g("pre",null,x(k),1)])),k.help_text?(v(),A("div",Uke,[g("p",{innerHTML:k.help_text},null,8,jke)])):O("",!0)]),_:2},[k.label?{name:"label",fn:w(()=>[N(x(k.label),1)]),key:"0"}:void 0]),1032,["label"]))),128)),n.disableSubmit?O("",!0):(v(),D(m,{key:0},{default:w(()=>[_(y,{class:"fcom_primary_button",onClick:Ee(o.handleSubmit,["prevent"])},{default:w(()=>[N(x(n.submitButtonText),1)]),_:1},8,["onClick"])]),_:1}))]),_:1},8,["model","onSubmit"])])}const WF=ue(Nke,[["render",Wke]]),Yke={name:"CardViewIcon"},qke={xmlns:"http://www.w3.org/2000/svg",width:"160",height:"158",viewBox:"0 0 160 158",fill:"none"};function Gke(t,e,n,i,s,o){return v(),A("svg",qke,[...e[0]||(e[0]=[Ra('<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 Xke=ue(Yke,[["render",Gke]]),Kke={name:"CreateSpaceForm",emits:["completed"],components:{SpaceGroupSelector:F8,SlugInput:Yd,ImageUploader:Ll,LogoEmojiSelector:Z1,TopicSelector:jF,ListViewIcon:Ike,TimelineViewIcon:Rke,FormBuilder:WF,ErrorAlerts:J1,CardViewIcon:Xke},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:Ewe,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}},Zke={key:0},Jke={class:"fcom_form_section"},Qke={class:"fcom_help_text"},eCe={class:"fcom_form_section"},tCe={style:{"font-weight":"bold"}},nCe=["innerHTML"],sCe={key:0},iCe={class:"fcom_help_text"},oCe={key:0},rCe={key:1,class:"fcom_form_section"},aCe={class:"fcom_lined_checkboxes"},lCe={key:0,class:"fcom_pro_feature"},cCe={key:0,class:"fcom_feature_nested"},uCe={key:0,class:"fcom_pro_feature"},dCe={key:1,class:"fcom_feature_nested"},hCe={class:"fcom_form_section"},fCe={class:"fcom_svg_radio_item"},pCe={class:"svg_radio_label"},mCe={class:"fcom_svg_radio_item"},gCe={class:"svg_radio_label"},vCe={class:"fcom_svg_radio_item"},_Ce={class:"svg_radio_label"},yCe={class:"fcom_help_text"},bCe={key:0},wCe={key:1},kCe={class:"fcom_form_section"},CCe={class:"fcom_help_text"},xCe=["href"],SCe={class:"fcom_image_uploader_wrapper"},$Ce={class:"fcom_help_text"},ACe={class:"fcom_image_uploader_wrapper"},ECe={class:"fcom_help_text"},MCe={class:"fcom_space_form_bottom"},TCe={class:"fcom_space_form_bottom"},PCe={key:0},ICe={class:"fcom_form_section fcom_mt_20"};function LCe(t,e,n,i,s,o){const r=H("logo-emoji-selector"),a=ft,l=en,c=H("SlugInput"),u=H("space-group-selector"),d=sn,h=Jt,f=Li,p=ws,m=Yt,y=H("TimelineViewIcon"),b=H("ListViewIcon"),k=H("CardViewIcon"),C=H("topic-selector"),$=Wo,S=H("EditPen"),M=be,P=He,T=H("Delete"),I=H("ImageUploader"),L=H("error-alerts"),R=tn,V=H("form-builder"),B=xt("loading");return v(),A("div",null,[_(R,{onSubmit:e[32]||(e[32]=Ee(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:w(()=>[s.showingSections.indexOf("basic")!==-1?(v(),A(ee,{key:0},[s.form.id?O("",!0):(v(),A("h4",Zke,x(t.$t("Basic Info")),1)),g("div",Jke,[g("h4",null,x(t.$t("General")),1),_(l,{label:t.$t("Space Title"),required:""},{default:w(()=>[_(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:w(()=>{var F,z;return[s.dataLoaded?(v(),D(r,{key:0,custom_svg:!0,onUpdate:e[0]||(e[0]=U=>{s.form.settings.emoji=U.emoji,s.form.logo=U.logo,s.form.settings.shape_svg=U.shape_svg}),config:{logo:s.form.logo,emoji:((F=s.form.settings)==null?void 0:F.emoji)||"",shape_svg:((z=s.form.settings)==null?void 0:z.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:w(()=>[_(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:w(()=>[_(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:w(()=>[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",Qke,[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",eCe,[g("h4",null,x(t.$t("Access Control")),1),_(l,{label:t.$t("Privacy")},{default:w(()=>[_(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:w(()=>[(v(!0),A(ee,null,we(s.privacies,(F,z)=>(v(),D(d,{key:z,label:F.label,value:z},{default:w(()=>[g("span",tCe,x(t.$labelize(F.label)),1),g("p",{innerHTML:F.description},null,8,nCe)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),s.form.privacy=="private"?(v(),A(ee,{key:0},[_(l,{label:t.$t("Lock Screen Type")},{default:w(()=>[_(p,{modelValue:s.form.settings.custom_lock_screen,"onUpdate:modelValue":e[6]||(e[6]=F=>s.form.settings.custom_lock_screen=F),class:""},{default:w(()=>[_(f,{value:"yes"},{default:w(()=>[N(x(t.$t("Custom Lock Screen")),1)]),_:1}),_(f,{value:"no"},{default:w(()=>[N(x(t.$t("Default Lock Screen")),1)]),_:1}),_(f,{disabled:!t.has_pro,value:"redirect"},{default:w(()=>[N(x(t.$t("Redirect to an URL"))+" ",1),t.has_pro?O("",!0):(v(),A("span",sCe,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:w(()=>[_(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",iCe,[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:w(()=>[_(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:w(()=>[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:w(()=>[_(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:w(()=>[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:w(()=>[_(h,{modelValue:s.form.settings.members_page_status,"onUpdate:modelValue":e[10]||(e[10]=F=>s.form.settings.members_page_status=F)},{default:w(()=>[_(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(),A(ee,{key:1},[s.form.id?O("",!0):(v(),A("h4",oCe,x(t.$t("Customization")),1)),s.form.settings?(v(),A("div",rCe,[g("h4",null,x(t.$t("Features Customizations")),1),_(l,null,{default:w(()=>[g("div",aCe,[_(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:w(()=>[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:w(()=>[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:w(()=>[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:w(()=>[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:w(()=>[N(x(t.$t("Enable File/Document Library for this space"))+" ",1),t.has_pro?O("",!0):(v(),A("span",lCe," ("+x(t.$t("Pro Feature"))+") ",1))]),_:1},8,["disabled","modelValue"]),s.form.settings.document_library=="yes"?(v(),A("div",cCe,[_(l,{label:t.$t("Document Library Access (View & Download)")},{default:w(()=>[_(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:w(()=>[_(f,{value:"members_only"},{default:w(()=>[N(x(t.$t("Members of this space")),1)]),_:1}),_(f,{value:"logged_in"},{default:w(()=>[N(x(t.$t("Any Logged in users")),1)]),_:1}),_(f,{value:"everybody"},{default:w(()=>[N(x(t.$t("Public")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(l,{label:t.$t("Who can upload the documents?")},{default:w(()=>[_(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:w(()=>[_(f,{value:"members_only"},{default:w(()=>[N(x(t.$t("Any Members")),1)]),_:1}),_(f,{value:"admin_only"},{default:w(()=>[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:w(()=>[N(x(t.$t("Enable Media Gallery for this space"))+" ",1),t.has_pro?O("",!0):(v(),A("span",uCe," ("+x(t.$t("Pro Feature"))+") ",1))]),_:1},8,["disabled","modelValue"]),t.has_pro&&s.form.settings.media_gallery=="yes"?(v(),A("div",dCe,[_(l,{label:t.$t("Media Gallery Access (View)")},{default:w(()=>[_(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:w(()=>[_(f,{value:"members_only"},{default:w(()=>[N(x(t.$t("Members of this space")),1)]),_:1}),_(f,{value:"logged_in"},{default:w(()=>[N(x(t.$t("Any Logged in users")),1)]),_:1}),_(f,{value:"everybody"},{default:w(()=>[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:w(()=>[_(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:w(()=>[(v(!0),A(ee,null,we(s.postOrderOptions,(F,z)=>(v(),D(d,{key:z,value:z,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:w(()=>[N(x(t.$t("Disable Post Sort By Options")),1)]),_:1},8,["modelValue"]),_(l,{label:t.$t("Default Comment Sort By")},{default:w(()=>[_(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:w(()=>[(v(!0),A(ee,null,we(s.commentOrderOptions,(F,z)=>(v(),D(d,{key:z,value:z,label:F},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])])):O("",!0),g("div",hCe,[g("h4",null,x(t.$t("Layout")),1),_(l,{label:t.$t("Default Layout Styles"),class:"fcom_mb_10"},{default:w(()=>[_(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:w(()=>[g("div",fCe,[_(f,{value:"timeline"},{default:w(()=>[_(y,{style:{width:"100px",height:"auto"}}),g("p",pCe,x(t.$t("Timeline")),1)]),_:1})]),g("div",mCe,[_(f,{value:"list"},{default:w(()=>[_(b,{style:{width:"100px",height:"auto"}}),g("p",gCe,x(t.$t("List")),1)]),_:1})]),g("div",vCe,[_(f,{value:"card"},{default:w(()=>[_(k,{style:{width:"100px",height:"auto"}}),g("p",_Ce,x(t.$t("Card")),1)]),_:1})])]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(l,{style:{"margin-top":"0"}},{default:w(()=>[_(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:w(()=>[N(x(t.$t("Disable Layout Style Change Option")),1)]),_:1},8,["modelValue"]),g("div",yCe,[s.form.settings.disable_layout_style==="yes"?(v(),A("p",bCe,x(t.$t("The selected layout will be applied for all members. They cannot switch to a different view.")),1)):(v(),A("p",wCe,x(t.$t("User can change the layout style to their own preference.")),1))])]),_:1})]),g("div",kCe,[g("h4",null,x(t.$t("Others")),1),t.has_pro&&s.dataLoaded?(v(),D(l,{key:0,label:t.$t("Topic navigation")},{default:w(()=>[_(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",CCe,[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("a",{key:0,target:"_blank",rel:"noopener",href:t.$getRouteLink("admin/settings/topics-settings")},x(t.$t("Manage all topics.")),9,xCe)):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:w(()=>[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("Group Chat?")},{default:w(()=>[_(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:w(()=>[N(x(t.$t("Enable group chat for this space members")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),_(l,{label:t.$t("Thumbnail / Open Graph Image (Recommended Size: 1200 x 630)")},{default:w(()=>[s.form.settings.og_image?(v(),D($,{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",SCe,[_(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:w(()=>[_(M,null,{default:w(()=>[_(T)]),_:1})]),_:2},[s.form.settings.og_image?{name:"trigger",fn:w(()=>[_(P,{"aria-label":t.$t("Edit image"),class:"fcom_plain_button"},{default:w(()=>[_(M,null,{default:w(()=>[_(S)]),_:1})]),_:1},8,["aria-label"])]),key:"0"}:void 0]),1032,["can_remove"])]),g("div",$Ce,[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:w(()=>[s.form.cover_photo?(v(),D($,{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",ACe,[_(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:w(()=>[_(M,null,{default:w(()=>[_(T)]),_:1})]),_:2},[s.form.cover_photo?{name:"trigger",fn:w(()=>[_(P,{class:"fcom_plain_button"},{default:w(()=>[_(M,null,{default:w(()=>[_(S)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove","onUploaded"])]),g("div",ECe,[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:w(()=>[g("div",MCe,[s.showingSections.indexOf("basic")===-1?(v(),D(P,{key:0,class:"plain_button",text:"",onClick:e[29]||(e[29]=()=>{s.showingSections=["basic"]})},{default:w(()=>[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:w(()=>[g("span",null,x(t.$t("Create")),1)]),_:1},8,["disabled"])),[[B,s.saving]])])]),_:1}))])],64)):(v(),A(ee,{key:2},[_(L,{errors:s.formErrors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),_(l,null,{default:w(()=>[g("div",TCe,[e[34]||(e[34]=g("span",null,null,-1)),_(P,{onClick:e[31]||(e[31]=F=>o.goToCustomization()),class:"fcom_primary_button"},{default:w(()=>[g("span",null,x(t.$t("Next")),1)]),_:1})])]),_:1})],64))]),_:1},8,["modelValue"]),Re((v(),A("div",null,[s.metaSettings&&Object.keys(s.metaSettings).length>0?(v(),A("div",PCe,[(v(!0),A(ee,null,we(s.metaSettings,F=>(v(),A("div",ICe,[g("h4",null,x(F.section_title),1),_(V,{formData:F.settings,formFields:F.fields,disableSubmit:!0},null,8,["formData","formFields"])]))),256))])):O("",!0)])),[[B,s.fetchingMetaBoxes]])])}const N8=ue(Kke,[["render",LCe]]);var yo=(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))(yo||{});let qo=class extends Error{constructor(e,n){super(n),this.name="MilkdownError",this.code=e}};const OCe=(t,e)=>typeof e=="function"?"[Function]":e,Kf=t=>JSON.stringify(t,OCe);function DCe(t){return new qo(yo.docTypeError,`Doc type error, unsupported type: ${Kf(t)}`)}function RCe(t){return new qo(yo.contextNotFound,`Context "${t}" not found, do you forget to inject it?`)}function VCe(t){return new qo(yo.timerNotFound,`Timer "${t}" not found, do you forget to record it?`)}function B8(){return new qo(yo.ctxCallOutOfScope,"Should not call a context out of the plugin.")}function FCe(...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(yo.createNodeInParserFail,e)}function YF(){return new qo(yo.stackOverFlow,"Stack over flow, cannot pop on an empty stack.")}function NCe(t){return new qo(yo.parserMatchError,`Cannot match target parser for node: ${Kf(t)}.`)}function BCe(t){return new qo(yo.serializerMatchError,`Cannot match target serializer for node: ${Kf(t)}.`)}function zCe(t,e){return new qo(yo.getAtomFromSchemaFail,`Cannot get ${t}: ${e} from schema.`)}function ra(t){return new qo(yo.expectDomTypeError,`Expect to be a dom, but get: ${Kf(t)}.`)}function HCe(){return new qo(yo.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 qF(t){return new qo(yo.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${t}" in schema.`)}function UCe(t){return new qo(yo.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${t}" in schema.`)}var GF=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},kt=(t,e,n)=>(GF(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)=>(GF(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);let XF=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 RCe(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 ha,Kl,im;let jCe=class{constructor(e,n,i){vs(this,ha,void 0),vs(this,Kl,void 0),vs(this,im,void 0),xn(this,ha,[]),xn(this,im,()=>{kt(this,ha).forEach(s=>s(kt(this,Kl)))}),this.set=s=>{xn(this,Kl,s),kt(this,im).call(this)},this.get=()=>kt(this,Kl),this.update=s=>{xn(this,Kl,s(kt(this,Kl))),kt(this,im).call(this)},this.type=i,xn(this,Kl,n),e.set(i.id,this)}on(e){return kt(this,ha).push(e),()=>{xn(this,ha,kt(this,ha).filter(n=>n!==e))}}once(e){const n=this.on(i=>{e(i),n()});return n}off(e){xn(this,ha,kt(this,ha).filter(n=>n!==e))}offAll(){xn(this,ha,[])}};ha=new WeakMap,Kl=new WeakMap,im=new WeakMap;let WCe=class{constructor(e,n){this.id=Symbol(`Context-${n}`),this.name=n,this._defaultValue=e,this._typeInfo=()=>{throw B8()}}create(e,n=this._defaultValue){return new jCe(e,n,this)}};const kn=(t,e)=>new WCe(t,e);var z0,H0,U0,Th,om,Cu,rm,am,lm;let YCe=class{constructor(e,n,i){vs(this,z0,void 0),vs(this,H0,void 0),vs(this,U0,void 0),vs(this,Th,void 0),vs(this,om,void 0),vs(this,Cu,void 0),vs(this,rm,void 0),vs(this,am,void 0),vs(this,lm,void 0),xn(this,Th,new Set),xn(this,om,new Set),xn(this,Cu,new Map),xn(this,rm,new Map),this.read=()=>({metadata:kt(this,z0),injectedSlices:[...kt(this,Th)].map(s=>({name:typeof s=="string"?s:s.name,value:kt(this,am).call(this,s)})),consumedSlices:[...kt(this,om)].map(s=>({name:typeof s=="string"?s:s.name,value:kt(this,am).call(this,s)})),recordedTimers:[...kt(this,Cu)].map(([s,{duration:o}])=>({name:s.name,duration:o,status:kt(this,lm).call(this,s)})),waitTimers:[...kt(this,rm)].map(([s,{duration:o}])=>({name:s.name,duration:o,status:kt(this,lm).call(this,s)}))}),this.onRecord=s=>{kt(this,Cu).set(s,{start:Date.now(),duration:0})},this.onClear=s=>{kt(this,Cu).delete(s)},this.onDone=s=>{const o=kt(this,Cu).get(s);o&&(o.duration=Date.now()-o.start)},this.onWait=(s,o)=>{const r=Date.now();o.finally(()=>{kt(this,rm).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,om).add(s)},xn(this,am,s=>kt(this,H0).get(s).get()),xn(this,lm,s=>kt(this,U0).get(s).status),xn(this,H0,e),xn(this,U0,n),xn(this,z0,i)}};z0=new WeakMap,H0=new WeakMap,U0=new WeakMap,Th=new WeakMap,om=new WeakMap,Cu=new WeakMap,rm=new WeakMap,am=new WeakMap,lm=new WeakMap;var Zl,Jl,j0,Mr;const qCe=class KF{constructor(e,n,i){vs(this,Zl,void 0),vs(this,Jl,void 0),vs(this,j0,void 0),vs(this,Mr,void 0),this.produce=s=>s&&Object.keys(s).length?new KF(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,Mr))==null||r.onInject(s),this},this.remove=s=>{var o;return kt(this,Zl).remove(s),(o=kt(this,Mr))==null||o.onRemove(s),this},this.record=s=>{var o;return s.create(kt(this,Jl).store),(o=kt(this,Mr))==null||o.onRecord(s),this},this.clearTimer=s=>{var o;return kt(this,Jl).remove(s),(o=kt(this,Mr))==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,Mr))==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,Mr))==null||o.onDone(s)},this.wait=s=>{var o;const r=this.timer(s).start();return(o=kt(this,Mr))==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,j0,i),i&&xn(this,Mr,new YCe(e,n,i))}get meta(){return kt(this,j0)}get inspector(){return kt(this,Mr)}};Zl=new WeakMap,Jl=new WeakMap,j0=new WeakMap,Mr=new WeakMap;let GCe=qCe,XCe=class{constructor(){this.store=new Map,this.get=e=>{const n=this.store.get(e.id);if(!n)throw VCe(e.name);return n},this.remove=e=>{this.store.delete(e.id)},this.has=e=>this.store.has(e.id)}};var Ph,xu,cm,Ql,um,W0;let KCe=class{constructor(e,n){vs(this,Ph,void 0),vs(this,xu,void 0),vs(this,cm,void 0),vs(this,Ql,void 0),vs(this,um,void 0),vs(this,W0,void 0),xn(this,Ph,null),xn(this,xu,null),xn(this,Ql,"pending"),this.start=()=>(kt(this,Ph)??xn(this,Ph,new Promise((i,s)=>{xn(this,xu,o=>{o instanceof CustomEvent&&o.detail.id===kt(this,cm)&&(xn(this,Ql,"resolved"),kt(this,um).call(this),o.stopImmediatePropagation(),i())}),kt(this,W0).call(this,()=>{kt(this,Ql)==="pending"&&xn(this,Ql,"rejected"),kt(this,um).call(this),s(new Error(`Timing ${this.type.name} timeout.`))}),xn(this,Ql,"pending"),addEventListener(this.type.name,kt(this,xu))})),kt(this,Ph)),this.done=()=>{const i=new CustomEvent(this.type.name,{detail:{id:kt(this,cm)}});dispatchEvent(i)},xn(this,um,()=>{kt(this,xu)&&removeEventListener(this.type.name,kt(this,xu))}),xn(this,W0,i=>{setTimeout(()=>{i()},this.type.timeout)}),xn(this,cm,Symbol(n.name)),this.type=n,e.set(n.id,this)}get status(){return kt(this,Ql)}};Ph=new WeakMap,xu=new WeakMap,cm=new WeakMap,Ql=new WeakMap,um=new WeakMap,W0=new WeakMap;let ZCe=class{constructor(e,n=3e3){this.create=i=>new KCe(i,this),this.id=Symbol(`Timer-${e}`),this.name=e,this.timeout=n}};const nu=(t,e=3e3)=>new ZCe(t,e);function Js(t){this.content=t}Js.prototype={constructor:Js,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 Js(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 Js(n)},addToStart:function(t,e){return new Js([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Js(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 Js(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=Js.from(t),t.size?new Js(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Js.from(t),t.size?new Js(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Js.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}};Js.from=function(t){if(t instanceof Js)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Js(e)};function ZF(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=ZF(s.content,o.content,n+1);if(r!=null)return r}n+=s.nodeSize}}function JF(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=JF(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 ZF(this,e,n)}findDiffEnd(e,n=this.size,i=e.size){return JF(this,e,n,i)}findIndex(e,n=-1){if(e==0)return r0(0,e);if(e==this.size)return r0(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?r0(i+1,r):r0(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 Xw={index:0,offset:0};function r0(t,e){return Xw.index=t,Xw.offset=e,Xw}function Iy(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(!Iy(t[i],e[i]))return!1}else{for(let i in t)if(!(i in e)||!Iy(t[i],e[i]))return!1;for(let i in e)if(!(i in t))return!1}return!0}let En=class RC{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&&Iy(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 RC.none;if(e instanceof RC)return[e];let n=e.slice();return n.sort((i,s)=>i.type.rank-s.type.rank),n}};En.none=[];class Ly 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=eN(this.content,e+this.openStart,n);return i&&new rt(i,this.openStart,this.openEnd)}removeBetween(e,n){return new rt(QF(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 QF(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(QF(o.content,e-s-1,n-s-1)))}function eN(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=eN(r.content,e-o-1,n);return a&&t.replaceChild(s,r.copy(a))}function JCe(t,e,n){if(n.openStart>t.depth)throw new Ly("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Ly("Inconsistent open depths");return tN(t,e,n,0)}function tN(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=tN(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 nd(r,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:r,end:a}=QCe(n,t);return nd(o,sN(t,r,a,e,i))}else return nd(o,Oy(t,e,i))}function nN(t,e){if(!e.type.compatibleContent(t.type))throw new Ly("Cannot join "+e.type.name+" onto "+t.type.name)}function VC(t,e,n){let i=t.node(n);return nN(i,e.node(n)),i}function td(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 og(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&&(td(t.nodeAfter,i),o++));for(let a=o;a<r;a++)td(s.child(a),i);e&&e.depth==n&&e.textOffset&&td(e.nodeBefore,i)}function nd(t,e){return t.type.checkContent(e),t.copy(e)}function sN(t,e,n,i,s){let o=t.depth>s&&VC(t,e,s+1),r=i.depth>s&&VC(n,i,s+1),a=[];return og(null,t,s,a),o&&r&&e.index(s)==n.index(s)?(nN(o,r),td(nd(o,sN(t,e,n,i,s+1)),a)):(o&&td(nd(o,Oy(t,e,s+1)),a),og(e,n,s,a),r&&td(nd(r,Oy(n,i,s+1)),a)),og(i,null,s,a),new st(a)}function Oy(t,e,n){let i=[];if(og(null,t,n,i),t.depth>n){let s=VC(t,e,n+1);td(nd(s,Oy(t,e,n+1)),i)}return og(e,null,n,i),new st(i)}function QCe(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 r1{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 iN(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 r1(n,i,o)}static resolveCached(e,n){let i=tE.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 tE.set(e,i=new exe);let s=i.elts[i.i]=r1.resolve(e,n);return i.i=(i.i+1)%txe,s}}class exe{constructor(){this.elts=[],this.i=0}}const txe=12,tE=new WeakMap;class iN{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 nxe=Object.create(null);let Tc=class FC{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&&Iy(this.attrs,n||e.defaultAttrs||nxe)&&En.sameSet(this.marks,i||En.none)}copy(e=null){return e==this.content?this:new FC(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new FC(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 JCe(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 r1.resolveCached(this,e)}resolveNoCache(e){return r1.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()+")"),oN(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 Dy 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):oN(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 Dy(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Dy(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 oN(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Cd{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let i=new sxe(e,n);if(i.next==null)return Cd.empty;let s=rN(i);i.next&&i.err("Unexpected trailing text");let o=uxe(cxe(s));return dxe(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 `)}}Cd.empty=new Cd(!0);class sxe{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 rN(t){let e=[];do e.push(ixe(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function ixe(t){let e=[];do e.push(oxe(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function oxe(t){let e=lxe(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=rxe(t,e);else break;return e}function nE(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function rxe(t,e){let n=nE(t),i=n;return t.eat(",")&&(t.next!="}"?i=nE(t):i=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:e}}function axe(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 lxe(t){if(t.eat("(")){let e=rN(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=axe(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 cxe(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 aN(t,e){return e-t}function sE(t,e){let n=[];return i(e),n.sort(aN);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 uxe(t){let e=Object.create(null);return n(sE(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]);sE(t,l).forEach(u=>{c||s.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[i.join(",")]=new Cd(i.indexOf(t.length-1)>-1);for(let r=0;r<s.length;r++){let a=s[r][1].sort(aN);o.next.push({type:s[r][0],next:e[a.join(",")]||n(a)})}return o}}function dxe(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 lN(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 cN(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 uN(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 dN(t,e){let n=Object.create(null);if(e)for(let i in e)n[i]=new fxe(t,i,e[i]);return n}let Ry=class hN{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=dN(e,i.attrs),this.defaultAttrs=lN(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==Cd.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:cN(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){uN(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 hN(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 hxe(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 fxe{constructor(e,n,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?hxe(e,n,i.validate):i.validate}get isRequired(){return!this.hasDefault}}class f2{constructor(e,n,i,s){this.name=e,this.rank=n,this.schema=i,this.spec=s,this.attrs=dN(e,s.attrs),this.excluded=null;let o=lN(this.attrs);this.instance=o?new En(this,o):null}create(e=null){return!e&&this.instance?this.instance:new En(this,cN(this.attrs,e))}static compile(e,n){let i=Object.create(null),s=0;return e.forEach((o,r)=>i[o]=new f2(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){uN(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class pxe{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=Js.from(e.nodes),n.marks=Js.from(e.marks||{}),this.nodes=Ry.compile(this.spec.nodes,this),this.marks=f2.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]=Cd.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?iE(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==""?[]:iE(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 Ry){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 Dy(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 iE(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 mxe(t){return t.tag!=null}function gxe(t){return t.style!=null}let p2=class NC{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let i=this.matchedStyles=[];n.forEach(s=>{if(mxe(s))this.tags.push(s);else if(gxe(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 rE(this,n,!1);return i.addAll(e,En.none,n.from,n.to),i.finish()}parseSlice(e,n={}){let i=new rE(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(yxe(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=aE(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=aE(r)),r.node||r.ignore||r.mark||(r.node=s)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new NC(e,NC.schemaRules(e)))}};const fN={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},vxe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},pN={ol:!0,ul:!0},Vy=1,Fy=2,rg=4;function oE(t,e,n){return e!=null?(e?Vy:0)|(e==="full"?Fy:0):t&&t.whitespace=="pre"?Vy|Fy:n&~rg}class a0{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&rg?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&Vy)){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&&!fN.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class rE{constructor(e,n,i){this.parser=e,this.options=n,this.isOpen=i,this.open=0;let s=n.topNode,o,r=oE(null,n.preserveWhitespace,0)|(i?rg:0);s?o=new a0(s.type,s.attrs,En.none,!0,n.topMatch||s.type.contentMatch,r):i?o=new a0(null,null,En.none,!0,null,r):o=new a0(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&Fy||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(i)){if(s.options&Vy)s.options&Fy?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;pN.hasOwnProperty(s)&&this.parser.normalizeLists&&_xe(e);let r=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,i));if(r?r.ignore:vxe.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(fN.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):lE(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=oE(e,o,r.options);r.options&rg&&r.content.length==0&&(a|=rg);let l=En.none;return i=i.filter(c=>(r.type?r.type.allowsMarkType(c.type):lE(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new a0(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 _xe(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let i=e.nodeType==1?e.nodeName.toLowerCase():null;i&&pN.hasOwnProperty(i)&&n?(n.appendChild(e),e=n):i=="li"?n=e:i&&(n=null)}}function yxe(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function aE(t){let e={};for(let n in t)e[n]=t[n];return e}function lE(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 su{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},i){i||(i=Kw(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}=Y0(Kw(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&&Y0(Kw(i),s(e,n),null,e.attrs)}static renderSpec(e,n,i=null,s){return Y0(e,n,i,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new su(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=cE(e.nodes);return n.text||(n.text=i=>i.text),n}static marksFromSchema(e){return cE(e.marks)}}function cE(t){let e={};for(let n in t){let i=t[n].spec.toDOM;i&&(e[n]=i)}return e}function Kw(t){return t.document||window.document}const uE=new WeakMap;function bxe(t){let e=uE.get(t);return e===void 0&&uE.set(t,e=wxe(t)),e}function wxe(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 Y0(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=bxe(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}=Y0(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 kxe={};function z8(t,e){const n=e||kxe,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return mN(t,i,s)}function mN(t,e,n){if(Cxe(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 dE(t.children,e,n)}return Array.isArray(t)?dE(t,e,n):""}function dE(t,e,n){const i=[];let s=-1;for(;++s<t.length;)i[s]=mN(t[s],e,n);return i.join("")}function Cxe(t){return!!(t&&typeof t=="object")}const hE=document.createElement("i");function H8(t){const e="&"+t+";";hE.innerHTML=e;const n=hE.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 fE={}.hasOwnProperty;function gN(t){const e={};let n=-1;for(;++n<t.length;)xxe(e,t[n]);return e}function xxe(t,e){let n;for(n in e){const s=(fE.call(t,n)?t[n]:void 0)||(t[n]={}),o=e[n];let r;if(o)for(r in o){fE.call(s,r)||(s[r]=[]);const a=o[r];Sxe(s[r],Array.isArray(a)?a:a?[a]:[])}}}function Sxe(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 vN(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 Ur(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Hi=iu(/[A-Za-z]/),co=iu(/[\dA-Za-z]/),$xe=iu(/[#-'*+\--9=?A-Z^-~]/);function Ny(t){return t!==null&&(t<32||t===127)}const BC=iu(/\d/),Axe=iu(/[\dA-Fa-f]/),Exe=iu(/[!-/:-@[-`{-~]/);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 m2=iu(/\p{P}|\p{S}/u),xd=iu(/\s/);function iu(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 Mxe={tokenize:Txe};function Txe(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 Pxe={tokenize:Ixe},pE={tokenize:Lxe};function Ixe(t){const e=this,n=[];let i=0,s,o,r;return a;function a(C){if(i<n.length){const $=n[i];return e.containerState=$[1],t.attempt($[0].continuation,l,c)(C)}return c(C)}function l(C){if(i++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,s&&k();const $=e.events.length;let S=$,M;for(;S--;)if(e.events[S][0]==="exit"&&e.events[S][1].type==="chunkFlow"){M=e.events[S][1].end;break}b(i);let P=$;for(;P<e.events.length;)e.events[P][1].end=Object.assign({},M),P++;return pr(e.events,S+1,0,e.events.slice($)),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(pE,u,d)(C)}function u(C){return s&&k(),b(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(pE,f,p)(C)}function f(C){return i++,n.push([e.currentConstruct,e.containerState]),h(C)}function p(C){if(C===null){s&&k(),b(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){y(t.exit("chunkFlow"),!0),b(0),t.consume(C);return}return Et(C)?(t.consume(C),y(t.exit("chunkFlow")),i=0,e.interrupt=void 0,a):(t.consume(C),m)}function y(C,$){const S=e.sliceStream(C);if($&&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(b(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 b(C){let $=n.length;for(;$-- >C;){const S=n[$];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 Lxe(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 By(t){if(t===null||jn(t)||xd(t))return 1;if(m2(t))return 2}function g2(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 zC={name:"attention",tokenize:Dxe,resolveAll:Oxe};function Oxe(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);mE(d,-l),mE(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,g2(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 Dxe(t,e){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,s=By(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=By(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 mE(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const Rxe={name:"autolink",tokenize:Vxe};function Vxe(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||Ny(f)?n(f):(t.consume(f),l)}function c(f){return f===64?(t.consume(f),u):$xe(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 Q1={tokenize:Fxe,partial:!0};function Fxe(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 _N={name:"blockQuote",tokenize:Nxe,continuation:{tokenize:Bxe},exit:zxe};function Nxe(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 Bxe(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(_N,e,n)(r)}}function zxe(t){t.exit("blockQuote")}const yN={name:"characterEscape",tokenize:Hxe};function Hxe(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 Exe(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(o)}}const bN={name:"characterReference",tokenize:Uxe};function Uxe(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=Axe,u):(t.enter("characterReferenceValue"),o=7,r=BC,u(d))}function u(d){if(d===59&&s){const h=t.exit("characterReferenceValue");return r===co&&!H8(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 gE={tokenize:Wxe,partial:!0},vE={name:"codeFenced",tokenize:jxe,concrete:!0};function jxe(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(gE,m,$)(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,$,y)(M)}function y(M){return t.enter("lineEnding"),t.consume(M),t.exit("lineEnding"),b}function b(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(gE,m,$)(M):(t.enter("codeFlowValue"),C(M))}function C(M){return M===null||Et(M)?(t.exit("codeFlowValue"),k(M)):(t.consume(M),C)}function $(M){return t.exit("codeFenced"),e(M)}function S(M,P,T){let I=0;return L;function L(z){return M.enter("lineEnding"),M.consume(z),M.exit("lineEnding"),R}function R(z){return M.enter("codeFencedFence"),un(z)?_n(M,V,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):V(z)}function V(z){return z===a?(M.enter("codeFencedFenceSequence"),B(z)):T(z)}function B(z){return z===a?(I++,M.consume(z),B):I>=r?(M.exit("codeFencedFenceSequence"),un(z)?_n(M,F,"whitespace")(z):F(z)):T(z)}function F(z){return z===null||Et(z)?(M.exit("codeFencedFence"),P(z)):T(z)}}}function Wxe(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 Zw={name:"codeIndented",tokenize:qxe},Yxe={tokenize:Gxe,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(Yxe,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 Gxe(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 Xxe={name:"codeText",tokenize:Jxe,resolve:Kxe,previous:Zxe};function Kxe(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 Zxe(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Jxe(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 Qxe{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&&Zp(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),Zp(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Zp(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);Zp(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Zp(this.left,n.reverse())}}}function Zp(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 wN(t){const e={};let n=-1,i,s,o,r,a,l,c;const u=new Qxe(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,e6e(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 e6e(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 y=[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,y.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):y.pop(),h=y.length;h--;){const b=a.slice(y[h],y[h+1]),k=o.pop();l.push([k,k+b.length-1]),t.splice(k,2,b)}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 t6e={tokenize:i6e,resolve:s6e},n6e={tokenize:o6e,partial:!0};function s6e(t){return wN(t),t}function i6e(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(n6e,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 o6e(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 kN(t,e,n,i,s,o,r,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(b){return b===60?(t.enter(i),t.enter(s),t.enter(o),t.consume(b),t.exit(o),h):b===null||b===32||b===41||Ny(b)?n(b):(t.enter(i),t.enter(r),t.enter(a),t.enter("chunkString",{contentType:"string"}),m(b))}function h(b){return b===62?(t.enter(o),t.consume(b),t.exit(o),t.exit(s),t.exit(i),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),f(b))}function f(b){return b===62?(t.exit("chunkString"),t.exit(a),h(b)):b===null||b===60||Et(b)?n(b):(t.consume(b),b===92?p:f)}function p(b){return b===60||b===62||b===92?(t.consume(b),f):f(b)}function m(b){return!u&&(b===null||b===41||jn(b))?(t.exit("chunkString"),t.exit(a),t.exit(r),t.exit(i),e(b)):u<c&&b===40?(t.consume(b),u++,m):b===41?(t.consume(b),u--,m):b===null||b===32||b===40||Ny(b)?n(b):(t.consume(b),b===92?y:m)}function y(b){return b===40||b===41||b===92?(t.consume(b),m):m(b)}}function CN(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 xN(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 ag(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 r6e={name:"definition",tokenize:l6e},a6e={tokenize:c6e,partial:!0};function l6e(t,e,n){const i=this;let s;return o;function o(f){return t.enter("definition"),r(f)}function r(f){return CN.call(i,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return s=Ur(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)?ag(t,c)(f):c(f)}function c(f){return kN(t,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return t.attempt(a6e,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 c6e(t,e,n){return i;function i(a){return jn(a)?ag(t,s)(a):n(a)}function s(a){return xN(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 u6e={name:"hardBreakEscape",tokenize:d6e};function d6e(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 h6e={name:"headingAtx",tokenize:p6e,resolve:f6e};function f6e(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 p6e(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 m6e=["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"],_E=["pre","script","style","textarea"],g6e={name:"htmlFlow",tokenize:b6e,resolveTo:y6e,concrete:!0},v6e={tokenize:k6e,partial:!0},_6e={tokenize:w6e,partial:!0};function y6e(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 b6e(t,e,n){const i=this;let s,o,r,a,l;return c;function c(Z){return u(Z)}function u(Z){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(Z),d}function d(Z){return Z===33?(t.consume(Z),h):Z===47?(t.consume(Z),o=!0,m):Z===63?(t.consume(Z),s=3,i.interrupt?e:W):Hi(Z)?(t.consume(Z),r=String.fromCharCode(Z),y):n(Z)}function h(Z){return Z===45?(t.consume(Z),s=2,f):Z===91?(t.consume(Z),s=5,a=0,p):Hi(Z)?(t.consume(Z),s=4,i.interrupt?e:W):n(Z)}function f(Z){return Z===45?(t.consume(Z),i.interrupt?e:W):n(Z)}function p(Z){const ae="CDATA[";return Z===ae.charCodeAt(a++)?(t.consume(Z),a===ae.length?i.interrupt?e:V:p):n(Z)}function m(Z){return Hi(Z)?(t.consume(Z),r=String.fromCharCode(Z),y):n(Z)}function y(Z){if(Z===null||Z===47||Z===62||jn(Z)){const ae=Z===47,ge=r.toLowerCase();return!ae&&!o&&_E.includes(ge)?(s=1,i.interrupt?e(Z):V(Z)):m6e.includes(r.toLowerCase())?(s=6,ae?(t.consume(Z),b):i.interrupt?e(Z):V(Z)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(Z):o?k(Z):C(Z))}return Z===45||co(Z)?(t.consume(Z),r+=String.fromCharCode(Z),y):n(Z)}function b(Z){return Z===62?(t.consume(Z),i.interrupt?e:V):n(Z)}function k(Z){return un(Z)?(t.consume(Z),k):L(Z)}function C(Z){return Z===47?(t.consume(Z),L):Z===58||Z===95||Hi(Z)?(t.consume(Z),$):un(Z)?(t.consume(Z),C):L(Z)}function $(Z){return Z===45||Z===46||Z===58||Z===95||co(Z)?(t.consume(Z),$):S(Z)}function S(Z){return Z===61?(t.consume(Z),M):un(Z)?(t.consume(Z),S):C(Z)}function M(Z){return Z===null||Z===60||Z===61||Z===62||Z===96?n(Z):Z===34||Z===39?(t.consume(Z),l=Z,P):un(Z)?(t.consume(Z),M):T(Z)}function P(Z){return Z===l?(t.consume(Z),l=null,I):Z===null||Et(Z)?n(Z):(t.consume(Z),P)}function T(Z){return Z===null||Z===34||Z===39||Z===47||Z===60||Z===61||Z===62||Z===96||jn(Z)?S(Z):(t.consume(Z),T)}function I(Z){return Z===47||Z===62||un(Z)?C(Z):n(Z)}function L(Z){return Z===62?(t.consume(Z),R):n(Z)}function R(Z){return Z===null||Et(Z)?V(Z):un(Z)?(t.consume(Z),R):n(Z)}function V(Z){return Z===45&&s===2?(t.consume(Z),U):Z===60&&s===1?(t.consume(Z),G):Z===62&&s===4?(t.consume(Z),Q):Z===63&&s===3?(t.consume(Z),W):Z===93&&s===5?(t.consume(Z),X):Et(Z)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(v6e,ne,B)(Z)):Z===null||Et(Z)?(t.exit("htmlFlowData"),B(Z)):(t.consume(Z),V)}function B(Z){return t.check(_6e,F,ne)(Z)}function F(Z){return t.enter("lineEnding"),t.consume(Z),t.exit("lineEnding"),z}function z(Z){return Z===null||Et(Z)?B(Z):(t.enter("htmlFlowData"),V(Z))}function U(Z){return Z===45?(t.consume(Z),W):V(Z)}function G(Z){return Z===47?(t.consume(Z),r="",K):V(Z)}function K(Z){if(Z===62){const ae=r.toLowerCase();return _E.includes(ae)?(t.consume(Z),Q):V(Z)}return Hi(Z)&&r.length<8?(t.consume(Z),r+=String.fromCharCode(Z),K):V(Z)}function X(Z){return Z===93?(t.consume(Z),W):V(Z)}function W(Z){return Z===62?(t.consume(Z),Q):Z===45&&s===2?(t.consume(Z),W):V(Z)}function Q(Z){return Z===null||Et(Z)?(t.exit("htmlFlowData"),ne(Z)):(t.consume(Z),Q)}function ne(Z){return t.exit("htmlFlow"),e(Z)}}function w6e(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 k6e(t,e,n){return i;function i(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(Q1,e,n)}}const C6e={name:"htmlText",tokenize:x6e};function x6e(t,e,n){const i=this;let s,o,r;return a;function a(W){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(W),l}function l(W){return W===33?(t.consume(W),c):W===47?(t.consume(W),S):W===63?(t.consume(W),C):Hi(W)?(t.consume(W),T):n(W)}function c(W){return W===45?(t.consume(W),u):W===91?(t.consume(W),o=0,p):Hi(W)?(t.consume(W),k):n(W)}function u(W){return W===45?(t.consume(W),f):n(W)}function d(W){return W===null?n(W):W===45?(t.consume(W),h):Et(W)?(r=d,G(W)):(t.consume(W),d)}function h(W){return W===45?(t.consume(W),f):d(W)}function f(W){return W===62?U(W):W===45?h(W):d(W)}function p(W){const Q="CDATA[";return W===Q.charCodeAt(o++)?(t.consume(W),o===Q.length?m:p):n(W)}function m(W){return W===null?n(W):W===93?(t.consume(W),y):Et(W)?(r=m,G(W)):(t.consume(W),m)}function y(W){return W===93?(t.consume(W),b):m(W)}function b(W){return W===62?U(W):W===93?(t.consume(W),b):m(W)}function k(W){return W===null||W===62?U(W):Et(W)?(r=k,G(W)):(t.consume(W),k)}function C(W){return W===null?n(W):W===63?(t.consume(W),$):Et(W)?(r=C,G(W)):(t.consume(W),C)}function $(W){return W===62?U(W):C(W)}function S(W){return Hi(W)?(t.consume(W),M):n(W)}function M(W){return W===45||co(W)?(t.consume(W),M):P(W)}function P(W){return Et(W)?(r=P,G(W)):un(W)?(t.consume(W),P):U(W)}function T(W){return W===45||co(W)?(t.consume(W),T):W===47||W===62||jn(W)?I(W):n(W)}function I(W){return W===47?(t.consume(W),U):W===58||W===95||Hi(W)?(t.consume(W),L):Et(W)?(r=I,G(W)):un(W)?(t.consume(W),I):U(W)}function L(W){return W===45||W===46||W===58||W===95||co(W)?(t.consume(W),L):R(W)}function R(W){return W===61?(t.consume(W),V):Et(W)?(r=R,G(W)):un(W)?(t.consume(W),R):I(W)}function V(W){return W===null||W===60||W===61||W===62||W===96?n(W):W===34||W===39?(t.consume(W),s=W,B):Et(W)?(r=V,G(W)):un(W)?(t.consume(W),V):(t.consume(W),F)}function B(W){return W===s?(t.consume(W),s=void 0,z):W===null?n(W):Et(W)?(r=B,G(W)):(t.consume(W),B)}function F(W){return W===null||W===34||W===39||W===60||W===61||W===96?n(W):W===47||W===62||jn(W)?I(W):(t.consume(W),F)}function z(W){return W===47||W===62||jn(W)?I(W):n(W)}function U(W){return W===62?(t.consume(W),t.exit("htmlTextData"),t.exit("htmlText"),e):n(W)}function G(W){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(W),t.exit("lineEnding"),K}function K(W){return un(W)?_n(t,X,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):X(W)}function X(W){return t.enter("htmlTextData"),r(W)}}const U8={name:"labelEnd",tokenize:T6e,resolveTo:M6e,resolveAll:E6e},S6e={tokenize:P6e},$6e={tokenize:I6e},A6e={tokenize:L6e};function E6e(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 M6e(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,g2(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 T6e(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(Ur(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(S6e,u,r?u:d)(h):h===91?t.attempt($6e,u,r?c:d)(h):r?u(h):d(h)}function c(h){return t.attempt(A6e,u,d)(h)}function u(h){return e(h)}function d(h){return o._balanced=!0,n(h)}}function P6e(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)?ag(t,o)(d):o(d)}function o(d){return d===41?u(d):kN(t,r,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function r(d){return jn(d)?ag(t,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?xN(t,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return jn(d)?ag(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 I6e(t,e,n){const i=this;return s;function s(a){return CN.call(i,t,o,r,"reference","referenceMarker","referenceString")(a)}function o(a){return i.parser.defined.includes(Ur(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function r(a){return n(a)}}function L6e(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 O6e={name:"labelStartImage",tokenize:D6e,resolveAll:U8.resolveAll};function D6e(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 R6e={name:"labelStartLink",tokenize:V6e,resolveAll:U8.resolveAll};function V6e(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 Jw={name:"lineEnding",tokenize:F6e};function F6e(t,e){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),_n(t,e,"linePrefix")}}const q0={name:"thematicBreak",tokenize:N6e};function N6e(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:H6e,continuation:{tokenize:U6e},exit:W6e},B6e={tokenize:Y6e,partial:!0},z6e={tokenize:j6e,partial:!0};function H6e(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:BC(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(q0,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 BC(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(Q1,i.interrupt?n:u,t.attempt(B6e,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 U6e(t,e,n){const i=this;return i.containerState._closeFlow=void 0,t.check(Q1,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(z6e,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 j6e(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 W6e(t){t.exit(this.containerState.type)}function Y6e(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 yE={name:"setextUnderline",tokenize:G6e,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 G6e(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 X6e={tokenize:K6e};function K6e(t){const e=this,n=t.attempt(Q1,i,t.attempt(this.parser.constructs.flowInitial,s,_n(t,t.attempt(this.parser.constructs.flow,s,t.attempt(t6e,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 Z6e={resolveAll:$N()},J6e=SN("string"),Q6e=SN("text");function SN(t){return{tokenize:e,resolveAll:$N(t==="text"?e4e: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 $N(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 e4e(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 t4e(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:$,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),y(),r[r.length-1]!==null?[]:(T(e,0),c.events=g2(o,c.events,c),c.events)}function h(R,V){return s4e(f(R),V)}function f(R){return n4e(r,R)}function p(){const{line:R,column:V,offset:B,_index:F,_bufferIndex:z}=i;return{line:R,column:V,offset:B,_index:F,_bufferIndex:z}}function m(R){s[R.line]=R.column,L()}function y(){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;)b(V.charCodeAt(i._bufferIndex));else b(V)}}function b(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 B=V||{};return B.type=R,B.start=p(),c.events.push(["enter",B,c]),a.push(B),B}function $(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 B;function B(F,z,U){let G,K,X,W;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 G=Ce,K=0,Ce.length===0?U:Z(Ce[K])}function Z(Ce){return oe;function oe(pe){return W=I(),X=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(X,W),z}function ge(Ce){return W.restore(),++K<G.length?Z(G[K]):U}}}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,B=c.currentConstruct,F=c.events.length,z=Array.from(a);return{restore:U,from:F};function U(){i=R,c.previous=V,c.currentConstruct=B,c.events.length=F,a=z,L()}}function L(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function n4e(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 s4e(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 i4e={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:_N},o4e={91:r6e},r4e={[-2]:Zw,[-1]:Zw,32:Zw},a4e={35:h6e,42:q0,45:[yE,q0],60:g6e,61:yE,95:q0,96:vE,126:vE},l4e={38:bN,92:yN},c4e={[-5]:Jw,[-4]:Jw,[-3]:Jw,33:O6e,38:bN,42:zC,60:[Rxe,C6e],91:R6e,92:[u6e,yN],93:U8,95:zC,96:Xxe},u4e={null:[zC,Z6e]},d4e={null:[42,95]},h4e={null:[]},f4e=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:d4e,contentInitial:o4e,disable:h4e,document:i4e,flow:a4e,flowInitial:r4e,insideSpan:u4e,string:l4e,text:c4e},Symbol.toStringTag,{value:"Module"}));function p4e(t){const n=gN([f4e,...(t||{}).extensions||[]]),i={defined:[],lazy:{},constructs:n,content:s(Mxe),document:s(Pxe),flow:s(X6e),string:s(J6e),text:s(Q6e)};return i;function s(o){return r;function r(a){return t4e(i,o,a)}}}function m4e(t){for(;!wN(t););return t}const bE=/[\0\t\n\r]/g;function g4e(){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(bE.lastIndex=d,c=bE.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 v4e=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function AN(t){return t.replace(v4e,_4e)}function _4e(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return vN(n.slice(o?2:1),o?16:10)}return H8(n)||t}function lg(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?wE(t.position):"start"in t||"end"in t?wE(t):"line"in t||"column"in t?HC(t):""}function HC(t){return kE(t&&t.line)+":"+kE(t&&t.column)}function wE(t){return HC(t&&t.start)+"-"+HC(t&&t.end)}function kE(t){return t&&typeof t=="number"?t:1}const EN={}.hasOwnProperty;function y4e(t,e,n){return typeof e!="string"&&(n=e,e=void 0),b4e(n)(m4e(p4e(n).document().write(g4e()(t,e,!0))))}function b4e(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(ze),listItemValue:h,listOrdered:o(Fe,d),listUnordered:o(Fe),paragraph:o(Ae),reference:Z,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(y),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:L,codeIndented:l(b),codeText:l(z),codeTextData:L,data:L,definition:l(),definitionDestinationString:$,definitionLabelString:k,definitionTitleString:C,emphasis:l(),hardBreakEscape:l(V),hardBreakTrailing:l(V),htmlFlow:l(B),htmlFlowData:L,htmlText:l(F),htmlTextData:L,image:l(G),label:X,labelText:K,lineEnding:R,link:l(U),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ae,resourceDestinationString:W,resourceTitleString:Q,resource:ne,setextHeading:l(T),setextHeadingLineSequence:P,setextHeadingText:M,strong:l(),thematicBreak:l()}};MN(e,(t||{}).mdastExtensions||[]);const n={};return i;function i(ye){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<ye.length;)if(ye[_t][1].type==="listOrdered"||ye[_t][1].type==="listUnordered")if(ye[_t][0]==="enter")Ie.push(_t);else{const Lt=Ie.pop();_t=s(ye,Lt,_t)}for(_t=-1;++_t<ye.length;){const Lt=e[ye[_t][0]];EN.call(Lt,ye[_t][1].type)&&Lt[ye[_t][1].type].call(Object.assign({sliceSerialize:ye[_t][2].sliceSerialize},Pe),ye[_t][1])}if(Pe.tokenStack.length>0){const Lt=Pe.tokenStack[Pe.tokenStack.length-1];(Lt[1]||CE).call(Pe,void 0,Lt[0])}for(ve.position={start:Ul(ye.length>0?ye[0][1].start:{line:1,column:1,offset:0}),end:Ul(ye.length>0?ye[ye.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(ye,ve,Pe){let Ie=ve-1,_t=-1,Lt=!1,Je,dt,mt,_e;for(;++Ie<=Pe;){const Oe=ye[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 ce=Ie;for(dt=void 0;ce--;){const De=ye[ce];if(De[1].type==="lineEnding"||De[1].type==="lineEndingBlank"){if(De[0]==="exit")continue;dt&&(ye[dt][1].type="lineEndingBlank",Lt=!0),De[1].type="lineEnding",dt=ce}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?ye[dt][1].start:Oe[1].end),ye.splice(dt||Ie,0,["exit",Je,Oe[2]]),Ie++,Pe++}if(Oe[1].type==="listItemPrefix"){const ce={type:"listItem",_spread:!1,start:Object.assign({},Oe[1].start),end:void 0};Je=ce,ye.splice(Ie,0,["enter",ce,Oe[2]]),Ie++,Pe++,mt=void 0,_e=!0}}}return ye[ve][1]._spread=Lt,Pe}function o(ye,ve){return Pe;function Pe(Ie){a.call(this,ye(Ie),Ie),ve&&ve.call(this,Ie)}}function r(){this.stack.push({type:"fragment",children:[]})}function a(ye,ve,Pe){this.stack[this.stack.length-1].children.push(ye),this.stack.push(ye),this.tokenStack.push([ve,Pe]),ye.position={start:Ul(ve.start),end:void 0}}function l(ye){return ve;function ve(Pe){ye&&ye.call(this,Pe),c.call(this,Pe)}}function c(ye,ve){const Pe=this.stack.pop(),Ie=this.tokenStack.pop();if(Ie)Ie[0].type!==ye.type&&(ve?ve.call(this,ye,Ie[0]):(Ie[1]||CE).call(this,ye,Ie[0]));else throw new Error("Cannot close `"+ye.type+"` ("+lg({start:ye.start,end:ye.end})+"): it’s not open");Pe.position.end=Ul(ye.end)}function u(){return z8(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(ye){if(this.data.expectingFirstListItemValue){const ve=this.stack[this.stack.length-2];ve.start=Number.parseInt(this.sliceSerialize(ye),10),this.data.expectingFirstListItemValue=void 0}}function f(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.lang=ye}function p(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.meta=ye}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ye.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ye.replace(/(\r?\n|\r)$/g,"")}function k(ye){const ve=this.resume(),Pe=this.stack[this.stack.length-1];Pe.label=ve,Pe.identifier=Ur(this.sliceSerialize(ye)).toLowerCase()}function C(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.title=ye}function $(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.url=ye}function S(ye){const ve=this.stack[this.stack.length-1];if(!ve.depth){const Pe=this.sliceSerialize(ye).length;ve.depth=Pe}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function P(ye){const ve=this.stack[this.stack.length-1];ve.depth=this.sliceSerialize(ye).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function I(ye){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(ye.start),end:void 0},Pe.push(Ie)),this.stack.push(Ie)}function L(ye){const ve=this.stack.pop();ve.value+=this.sliceSerialize(ye),ve.position.end=Ul(ye.end)}function R(ye){const ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Pe=ve.children[ve.children.length-1];Pe.position.end=Ul(ye.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(ve.type)&&(I.call(this,ye),L.call(this,ye))}function V(){this.data.atHardBreak=!0}function B(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ye}function F(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ye}function z(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ye}function U(){const ye=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";ye.type+="Reference",ye.referenceType=ve,delete ye.url,delete ye.title}else delete ye.identifier,delete ye.label;this.data.referenceType=void 0}function G(){const ye=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";ye.type+="Reference",ye.referenceType=ve,delete ye.url,delete ye.title}else delete ye.identifier,delete ye.label;this.data.referenceType=void 0}function K(ye){const ve=this.sliceSerialize(ye),Pe=this.stack[this.stack.length-2];Pe.label=AN(ve),Pe.identifier=Ur(ve).toLowerCase()}function X(){const ye=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=ye.children;Pe.children=Ie}else Pe.alt=ve}function W(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.url=ye}function Q(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.title=ye}function ne(){this.data.inReference=void 0}function Z(){this.data.referenceType="collapsed"}function ae(ye){const ve=this.resume(),Pe=this.stack[this.stack.length-1];Pe.label=ve,Pe.identifier=Ur(this.sliceSerialize(ye)).toLowerCase(),this.data.referenceType="full"}function ge(ye){this.data.characterReferenceType=ye.type}function Ce(ye){const ve=this.sliceSerialize(ye),Pe=this.data.characterReferenceType;let Ie;Pe?(Ie=vN(ve,Pe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ie=H8(ve);const _t=this.stack[this.stack.length-1];_t.value+=Ie}function oe(ye){const ve=this.stack.pop();ve.position.end=Ul(ye.end)}function pe(ye){L.call(this,ye);const ve=this.stack[this.stack.length-1];ve.url=this.sliceSerialize(ye)}function ie(ye){L.call(this,ye);const ve=this.stack[this.stack.length-1];ve.url="mailto:"+this.sliceSerialize(ye)}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(ye){return{type:"list",ordered:ye.type==="listOrdered",start:null,spread:ye._spread,children:[]}}function ze(ye){return{type:"listItem",spread:ye._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 MN(t,e){let n=-1;for(;++n<e.length;){const i=e[n];Array.isArray(i)?MN(t,i):w4e(t,i)}}function w4e(t,e){let n;for(n in e)if(EN.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 CE(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+lg({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+lg({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+lg({start:e.start,end:e.end})+") is still open")}function UC(t){const e=this;e.parser=n;function n(i){return y4e(i,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}const xE={}.hasOwnProperty;function k4e(t,e){const n=e||{};function i(s,...o){let r=i.invalid;const a=i.handlers;if(s&&xE.call(s,t)){const l=String(s[t]);r=xE.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 C4e={}.hasOwnProperty;function TN(t,e){let n=-1,i;if(e.extensions)for(;++n<e.extensions.length;)TN(t,e.extensions[n]);for(i in e)if(C4e.call(e,i))switch(i){case"extensions":break;case"unsafe":{SE(t[i],e[i]);break}case"join":{SE(t[i],e[i]);break}case"handlers":{x4e(t[i],e[i]);break}default:t.options[i]=e[i]}return t}function SE(t,e){e&&t.push(...e)}function x4e(t,e){e&&Object.assign(t,e)}function S4e(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()),$4e);return s(),r}function $4e(t,e,n){return">"+(n?"":" ")+t}function PN(t,e){return $E(t,e.inConstruct,!0)&&!$E(t,e.notInConstruct,!1)}function $E(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 AE(t,e,n,i){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
87 `&&PN(n.stack,n.unsafe[s]))return/[ \t]/.test(i.before)?"":" ";return`\\
88 `}function A4e(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 jC(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 E4e(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 M4e(t,e,n,i){const s=E4e(n),o=t.value||"",r=s==="`"?"GraveAccent":"Tilde";if(jC(t,n)){const d=n.enter("codeIndented"),h=n.indentLines(o,T4e);return d(),h}const a=n.createTracker(i),l=s.repeat(Math.max(A4e(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 T4e(t,e,n){return(n?"":" ")+t}function j8(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 P4e(t,e,n,i){const s=j8(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 I4e(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}IN.peek=L4e;function IN(t,e,n,i){const s=I4e(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 L4e(t,e,n){return n.options.emphasis||"*"}const v2=function(t){if(t==null)return V4e;if(typeof t=="function")return _2(t);if(typeof t=="object")return Array.isArray(t)?O4e(t):D4e(t);if(typeof t=="string")return R4e(t);throw new Error("Expected function, string, or object as test")};function O4e(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=v2(t[n]);return _2(i);function i(...s){let o=-1;for(;++o<e.length;)if(e[o].apply(this,s))return!0;return!1}}function D4e(t){const e=t;return _2(n);function n(i){const s=i;let o;for(o in t)if(s[o]!==e[o])return!1;return!0}}function R4e(t){return _2(e);function e(n){return n&&n.type===t}}function _2(t){return e;function e(n,i,s){return!!(F4e(n)&&t.call(this,n,typeof i=="number"?i:void 0,s||void 0))}}function V4e(){return!0}function F4e(t){return t!==null&&typeof t=="object"&&"type"in t}const LN=[],N4e=!0,WC=!1,YC="skip";function ON(t,e,n,i){let s;typeof e=="function"&&typeof n!="function"?(i=n,n=e):s=e;const o=v2(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=LN,p,m,y;if((!e||o(l,c,u[u.length-1]||void 0))&&(f=B4e(n(l,u)),f[0]===WC))return f;if("children"in l&&l.children){const b=l;if(b.children&&f[0]!==YC)for(m=(i?b.children.length:-1)+r,y=u.concat(b);m>-1&&m<b.children.length;){const k=b.children[m];if(p=a(k,m,y)(),p[0]===WC)return p;m=typeof p[1]=="number"?p[1]:m+r}}return f}}}function B4e(t){return Array.isArray(t)?t:typeof t=="number"?[N4e,t]:t==null?LN:[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),ON(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 DN(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,WC}),!!((!t.depth||t.depth<3)&&z8(t)&&(e.options.setext||n))}function z4e(t,e,n,i){const s=Math.max(Math.min(6,t.depth||1),1),o=n.createTracker(i);if(DN(t,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(t,{...o.current(),before:`
93 `,after:`
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}RN.peek=H4e;function RN(t){return t.value||""}function H4e(){return"<"}VN.peek=U4e;function VN(t,e,n,i){const s=j8(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 U4e(){return"!"}FN.peek=j4e;function FN(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 j4e(){return"!"}NN.peek=W4e;function NN(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 W4e(){return"`"}function BN(t,e){const n=z8(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))}zN.peek=Y4e;function zN(t,e,n,i){const s=j8(n),o=s==='"'?"Quote":"Apostrophe",r=n.createTracker(i);let a,l;if(BN(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 Y4e(t,e,n){return BN(t,n)?"<":"["}HN.peek=q4e;function HN(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 W8(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 G4e(t){const e=W8(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 X4e(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 UN(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 K4e(t,e,n,i){const s=n.enter("list"),o=n.bulletCurrent;let r=t.ordered?X4e(n):W8(n);const a=t.ordered?r==="."?")":".":G4e(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),UN(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 Z4e(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 J4e(t,e,n,i){const s=Z4e(n);let o=n.bulletCurrent||W8(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 Q4e(t,e,n,i){const s=n.enter("paragraph"),o=n.enter("phrasing"),r=n.containerPhrasing(t,i);return o(),s(),r}const e8e=v2(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function t8e(t,e,n,i){return(t.children.some(function(r){return e8e(r)})?n.containerPhrasing:n.containerFlow).call(n,t,i)}function n8e(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}jN.peek=s8e;function jN(t,e,n,i){const s=n8e(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 s8e(t,e,n){return n.options.strong||"*"}function i8e(t,e,n,i){return n.safe(t.value,i)}function o8e(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 r8e(t,e,n){const i=(UN(n)+(n.options.ruleSpaces?" ":"")).repeat(o8e(n));return n.options.ruleSpaces?i.slice(0,-1):i}const Y8={blockquote:S4e,break:AE,code:M4e,definition:P4e,emphasis:IN,hardBreak:AE,heading:z4e,html:RN,image:VN,imageReference:FN,inlineCode:NN,link:zN,linkReference:HN,list:K4e,listItem:J4e,paragraph:Q4e,root:t8e,strong:jN,text:i8e,thematicBreak:r8e},a8e=[l8e];function l8e(t,e,n,i){if(e.type==="code"&&jC(e,i)&&(t.type==="list"||t.type===e.type&&jC(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"&&DN(e,i))?void 0:n.spread?1:0}const gu=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],c8e=[{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:gu},{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:gu},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
100 *])`},{character:"*",inConstruct:"phrasing",notInConstruct:gu},{atBreak:!0,character:"+",after:`(?:[ \r
101 ])`},{atBreak:!0,character:"-",after:`(?:[ \r
102 -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
103 ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:gu},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:gu},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:gu},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:gu},{atBreak:!0,character:"~"}];function u8e(t){return t.label||!t.identifier?t.label||"":AN(t.identifier)}function d8e(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 h8e(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 f8e(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:`
105 `,after:`
106 `,...o.current()}))),l.type!=="list"&&(e.bulletLastUsed=void 0),a<s.length-1&&r.push(o.move(p8e(l,s[a+1],t,e)))}return i.pop(),r.join("")}function p8e(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`
108
109 <!---->
110
111 `}return`
112
113 `}const m8e=/\r?\n|\r/g;function g8e(t,e){const n=[];let i=0,s=0,o;for(;o=m8e.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 v8e(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(!PN(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(_8e);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(EE(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(EE(i.slice(l,c),n.after)),o.join("")}function _8e(t,e){return t-e}function EE(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 y8e(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 b8e(t,e={}){const n={enter:s,indentLines:g8e,associationId:u8e,containerPhrasing:x8e,containerFlow:S8e,createTracker:y8e,compilePattern:d8e,safe:$8e,stack:[],unsafe:[...c8e],join:[...a8e],handlers:{...Y8},options:{},indexStack:[],handle:void 0};TN(n,e),n.options.tightDefinitions&&n.join.push(C8e),n.handle=k4e("type",{invalid:w8e,unknown:k8e,handlers:n.handlers});let i=n.handle(t,void 0,n,{before:`
114 `,after:`
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 w8e(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function k8e(t){const e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}function C8e(t,e){if(t.type==="definition"&&t.type===e.type)return 0}function x8e(t,e){return h8e(t,this,e)}function S8e(t,e){return f8e(t,this,e)}function $8e(t,e){return v8e(this,t,e)}function qC(t){const e=this;e.compiler=n;function n(i){return b8e(i,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}}function ME(t){if(t)throw t}var G0=Object.prototype.hasOwnProperty,WN=Object.prototype.toString,TE=Object.defineProperty,PE=Object.getOwnPropertyDescriptor,IE=function(e){return typeof Array.isArray=="function"?Array.isArray(e):WN.call(e)==="[object Array]"},LE=function(e){if(!e||WN.call(e)!=="[object Object]")return!1;var n=G0.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&G0.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;var s;for(s in e);return typeof s>"u"||G0.call(e,s)},OE=function(e,n){TE&&n.name==="__proto__"?TE(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},DE=function(e,n){if(n==="__proto__")if(G0.call(e,n)){if(PE)return PE(e,n).value}else return;return e[n]},A8e=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=DE(a,n),s=DE(e,n),a!==s&&(u&&s&&(LE(s)||(o=IE(s)))?(o?(o=!1,r=i&&IE(i)?i:[]):r=i&&LE(i)?i:{},OE(a,{name:n,newValue:t(u,r,s)})):typeof s<"u"&&OE(a,{name:n,newValue:s}));return a};const Qw=vi(A8e);function GC(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 E8e(){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?M8e(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 M8e(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 bo 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=lg(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}}bo.prototype.file="";bo.prototype.name="";bo.prototype.reason="";bo.prototype.message="";bo.prototype.stack="";bo.prototype.column=void 0;bo.prototype.line=void 0;bo.prototype.ancestors=void 0;bo.prototype.cause=void 0;bo.prototype.fatal=void 0;bo.prototype.place=void 0;bo.prototype.ruleId=void 0;bo.prototype.source=void 0;const _a={basename:T8e,dirname:P8e,extname:I8e,join:L8e,sep:"/"};function T8e(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');ev(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 P8e(t){if(ev(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 I8e(t){ev(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 L8e(...t){let e=-1,n;for(;++e<t.length;)ev(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":O8e(n)}function O8e(t){ev(t);const e=t.codePointAt(0)===47;let n=D8e(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function D8e(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 ev(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const R8e={cwd:V8e};function V8e(){return"/"}function XC(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function F8e(t){if(typeof t=="string")t=new URL(t);else if(!XC(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 N8e(t)}function N8e(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 e3=["history","path","basename","stem","extname","dirname"];class B8e{constructor(e){let n;e?XC(e)?n={path:e}:typeof e=="string"||z8e(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":R8e.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<e3.length;){const o=e3[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)e3.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?_a.basename(this.path):void 0}set basename(e){n3(e,"basename"),t3(e,"basename"),this.path=_a.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?_a.dirname(this.path):void 0}set dirname(e){RE(this.basename,"dirname"),this.path=_a.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?_a.extname(this.path):void 0}set extname(e){if(t3(e,"extname"),RE(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=_a.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){XC(e)&&(e=F8e(e)),n3(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?_a.basename(this.path,this.extname):void 0}set stem(e){n3(e,"stem"),t3(e,"stem"),this.path=_a.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 bo(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 t3(t,e){if(t&&t.includes(_a.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+_a.sep+"`")}function n3(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function RE(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function z8e(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const H8e=function(t){const i=this.constructor.prototype,s=i[t],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,i),o},U8e={}.hasOwnProperty;class q8 extends H8e{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=E8e()}copy(){const e=new q8;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];e.use(...i)}return e.data(Qw(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(o3("data",this.frozen),this.namespace[e]=n,this):U8e.call(this.namespace,e)&&this.namespace[e]||void 0:e?(o3("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=l0(e),i=this.parser||this.Parser;return s3("parse",i),i(String(n),n)}process(e,n){const i=this;return this.freeze(),s3("process",this.parser||this.Parser),i3("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(o,r){const a=l0(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);W8e(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(),s3("processSync",this.parser||this.Parser),i3("processSync",this.compiler||this.Compiler),this.process(e,s),FE("processSync","process",n),i;function s(o,r){n=!0,ME(o),i=r}}run(e,n,i){VE(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=l0(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),FE("runSync","run",i),s;function o(r,a){ME(r),s=a,i=!0}}stringify(e,n){this.freeze();const i=l0(n),s=this.compiler||this.Compiler;return i3("stringify",s),VE(e),s(e,i)}use(e,...n){const i=this.attachers,s=this.namespace;if(o3("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=Qw(!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];GC(m)&&GC(f)&&(f=Qw(!0,m,f)),i[h]=[c,f,...p]}}}}const KC=new q8().freeze();function s3(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function i3(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function o3(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 VE(t){if(!GC(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function FE(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function l0(t){return j8e(t)?t:new B8e(t)}function j8e(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function W8e(t){return typeof t=="string"||Y8e(t)}function Y8e(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var YN=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},rn=(t,e,n)=>(YN(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)=>(YN(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);let qN=class{},GN=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 YF();return e}}},q8e=class XN extends qN{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 XN(e,n,i)}};var fa,dm,X0,K0,Z0,hm,fm;const ZC=class extends GN{constructor(e){super(),As(this,fa,void 0),As(this,dm,void 0),As(this,X0,void 0),As(this,K0,void 0),As(this,Z0,void 0),As(this,hm,void 0),As(this,fm,void 0),ns(this,fa,En.none),ns(this,dm,n=>n.isText),ns(this,X0,(n,i)=>{if(rn(this,dm).call(this,n)&&rn(this,dm).call(this,i)&&En.sameSet(n.marks,i.marks))return this.schema.text(n.text+i.text,n.marks)}),ns(this,K0,n=>{const i=Object.values({...this.schema.nodes,...this.schema.marks}).find(s=>s.spec.parseMarkdown.match(n));if(!i)throw NCe(n);return i}),ns(this,Z0,n=>{const i=rn(this,K0).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,hm,()=>{ns(this,fa,En.none);const n=this.close();return rn(this,fm).call(this,n.type,n.attrs,n.content)}),this.closeNode=()=>(rn(this,hm).call(this),this),ns(this,fm,(n,i,s)=>{const o=n.createAndFill(i,s,rn(this,fa));if(!o)throw FCe(n,i,s);return this.push(o),o}),this.addNode=(n,i,s)=>(rn(this,fm).call(this,n,i,s),this),this.openMark=(n,i)=>{const s=n.create(i);return ns(this,fa,s.addToSet(rn(this,fa))),this},this.closeMark=n=>(ns(this,fa,n.removeFromSet(rn(this,fa))),this),this.addText=n=>{const i=this.top();if(!i)throw YF();const s=i.pop(),o=this.schema.text(n,rn(this,fa));if(!s)return i.push(o),this;const r=rn(this,X0).call(this,s,o);return r?(i.push(r),this):(i.push(s,o),this)},this.build=()=>{let n;do n=rn(this,hm).call(this);while(this.size());return n},this.next=(n=[])=>([n].flat().forEach(i=>rn(this,Z0).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}};fa=new WeakMap,dm=new WeakMap,X0=new WeakMap,K0=new WeakMap,Z0=new WeakMap,hm=new WeakMap,fm=new WeakMap,ZC.create=(t,e)=>{const n=new ZC(t);return i=>(n.run(e,i),n.toDoc())};let G8e=ZC;const JC=class extends qN{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()}}};JC.create=(t,e,n,i={})=>new JC(t,e,n,i);let NE=JC;const X8e=t=>Object.prototype.hasOwnProperty.call(t,"size");var Ga,pm,J0,Q0,mm,e_,gm,t_,n_,Ih,Su,s_,vm;const QC=class extends GN{constructor(e){super(),As(this,Ga,void 0),As(this,pm,void 0),As(this,J0,void 0),As(this,Q0,void 0),As(this,mm,void 0),As(this,e_,void 0),As(this,gm,void 0),As(this,t_,void 0),As(this,n_,void 0),As(this,Ih,void 0),As(this,Su,void 0),As(this,s_,void 0),As(this,vm,void 0),ns(this,Ga,En.none),ns(this,pm,n=>{const i=Object.values({...this.schema.nodes,...this.schema.marks}).find(s=>s.spec.toMarkdown.match(n));if(!i)throw BCe(n.type);return i}),ns(this,J0,n=>rn(this,pm).call(this,n).spec.toMarkdown.runner(this,n)),ns(this,Q0,(n,i)=>rn(this,pm).call(this,n).spec.toMarkdown.runner(this,n,i)),ns(this,mm,n=>{const{marks:i}=n,s=o=>o.type.spec.priority??50;[...i].sort((o,r)=>s(o)-s(r)).every(o=>!rn(this,Q0).call(this,o,n))&&rn(this,J0).call(this,n),i.forEach(o=>rn(this,vm).call(this,o))}),ns(this,e_,(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,gm,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,e_).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,gm).call(this,h))}}return s.concat(o)},[])),n}),ns(this,t_,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(NE.create(n,void 0,i,s)),this),ns(this,n_,(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,Su).call(this,"text",void 0,s);const u=i();return o.length&&rn(this,Su).call(this,"text",void 0,o),u}),ns(this,Ih,(n=!1)=>{const i=this.close(),s=()=>rn(this,Su).call(this,i.type,i.children,i.value,i.props);return n?rn(this,n_).call(this,i,s):s()}),this.closeNode=()=>(rn(this,Ih).call(this),this),ns(this,Su,(n,i,s,o)=>{const r=NE.create(n,i,s,o),a=rn(this,gm).call(this,rn(this,t_).call(this,r));return this.push(a),a}),this.addNode=(n,i,s,o)=>(rn(this,Su).call(this,n,i,s,o),this),ns(this,s_,(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,vm,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,s_).call(this,n,i,s,o),this),this.closeMark=n=>(rn(this,vm).call(this,n),this),this.build=()=>{let n=null;do n=rn(this,Ih).call(this);while(this.size());return n},this.next=n=>X8e(n)?(n.forEach(i=>{rn(this,mm).call(this,i)}),this):(rn(this,mm).call(this,n),this),this.toString=n=>n.stringify(this.build()),this.run=n=>(this.next(n),this),this.schema=e}};Ga=new WeakMap,pm=new WeakMap,J0=new WeakMap,Q0=new WeakMap,mm=new WeakMap,e_=new WeakMap,gm=new WeakMap,t_=new WeakMap,n_=new WeakMap,Ih=new WeakMap,Su=new WeakMap,s_=new WeakMap,vm=new WeakMap,QC.create=(t,e)=>{const n=new QC(t);return i=>(n.run(i),n.toString(e))};let K8e=QC;const KN=65535,ZN=Math.pow(2,16);function Z8e(t,e){return t+e*ZN}function BE(t){return t&KN}function J8e(t){return(t-(t&KN))/ZN}const JN=1,QN=2,i_=4,eB=8;class ex{constructor(e,n,i){this.pos=e,this.delInfo=n,this.recover=i}get deleted(){return(this.delInfo&eB)>0}get deletedBefore(){return(this.delInfo&(JN|i_))>0}get deletedAfter(){return(this.delInfo&(QN|i_))>0}get deletedAcross(){return(this.delInfo&i_)>0}}class Mo{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Mo.empty)return Mo.empty}recover(e){let n=0,i=BE(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+J8e(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:Z8e(a/3,e-l),m=e==l?QN:e==d?JN:i_;return(n<0?e!=l:e!=d)&&(m|=eB),new ex(f,m,p)}s+=u-c}return i?e+s:new ex(e+s,0,null)}touches(e,n){let i=0,s=BE(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 Mo(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Mo.empty:new Mo(e<0?[0,-e,0]:[0,0,e])}}Mo.empty=new Mo([]);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 ex(e,s,null)}}const r3=Object.create(null);class Oi{getMap(){return Mo.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let i=r3[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 r3)throw new RangeError("Duplicate use of step JSON ID "+e);return r3[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 Ly)return Is.fail(o.message);throw o}}}function G8(t,e,n){let i=[];for(let s=0;s<t.childCount;s++){let o=t.child(s);o.content.size&&(o=o.copy(G8(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(G8(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 Ca(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 Ca 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(G8(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 Ca(n.pos,i.pos,this.mark)}merge(e){return e instanceof Ca&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ca(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 Ca(n.from,n.to,e.markFromJSON(n.mark))}}Oi.jsonID("removeMark",Ca);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 ti 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&&tx(e,this.from,this.to)?Is.fail("Structure replace would overwrite content"):Is.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Mo([this.from,this.to-this.from,this.slice.size])}invert(e){return new ti(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 ti(n.pos,Math.max(n.pos,i.pos),this.slice)}merge(e){if(!(e instanceof ti)||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 ti(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 ti(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 ti(n.from,n.to,rt.fromJSON(e,n.slice),!!n.structure)}}Oi.jsonID("replace",ti);class Ti 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&&(tx(e,this.from,this.gapFrom)||tx(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 Mo([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 Ti(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 Ti(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 Ti(n.from,n.to,n.gapFrom,n.gapTo,rt.fromJSON(e,n.slice),n.insert,!!n.structure)}}Oi.jsonID("replaceAround",Ti);function tx(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 Q8e(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 Ca(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 e5e(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 f2){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 Ca(r.from,r.to,r.style)))}function tB(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 ti(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 Ca(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 ti(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 t5e(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function y2(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||!t5e(s,o,r))break}return null}function n5e(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 Ti(l,c,r,a,new rt(u.append(h),d,f),u.size-d,!0))}function X8(t,e,n=null,i=t){let s=s5e(t,e),o=s&&i5e(i,e);return o?s.map(zE).concat({type:e,attrs:n}).concat(o.map(zE)):null}function zE(t){return{type:t,attrs:null}}function s5e(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 i5e(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 o5e(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 Ti(s,o,s,o,new rt(i,0,0),n.length,!0))}function r5e(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)&&c5e(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&&l5e(t,r,a,o),tB(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 Ti(d,h,d+1,h-1,new rt(st.from(i.create(l,null,r.marks)),0,0),1,!0)),c===!0&&a5e(t,r,a,o),!1}})}function a5e(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 l5e(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 c5e(t,e,n){let i=t.resolve(e),s=i.index();return i.parent.canReplaceWith(s,s+1,n)}function u5e(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 Ti(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new rt(st.from(r),0,0),1,!0))}function cg(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 d5e(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 ti(e,e,new rt(o.append(r),n,n),!0))}function b2(t,e){let n=t.resolve(e),i=n.index();return h5e(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(i,i+1)}function h5e(t,e){return!!(t&&e&&!t.isLeaf&&t.canAppend(e))}function f5e(t,e,n){let i=new ti(e-n,e+n,rt.empty,!0);t.step(i)}function p5e(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 m5e(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 K8(t,e,n=e,i=rt.empty){if(e==n&&!i.size)return null;let s=t.resolve(e),o=t.resolve(n);return nB(s,o,i)?new ti(e,n,i):new g5e(s,o,i).fit()}function nB(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class g5e{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 Ti(i.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||i.pos!=this.$to.pos?new ti(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=a3(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=a3(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=a3(e,n);if(s.childCount<=1&&n>0){let o=e.size-n<=n+s.size;this.unplaced=new rt(_m(e,n-1,1),n-1,o?n-1:i)}else this.unplaced=new rt(_m(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),y=d.matchType(m.type);if(!y)break;c++,(c>1||l==0||m.content.size)&&(d=y,u.push(sB(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=ym(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,y=a;m<f;m++){let b=y.lastChild;this.frontier.push({type:b.type,match:b.contentMatchAt(b.childCount)}),y=b.content}this.unplaced=p?e==0?rt.empty:new rt(_m(r.content,e-1,1),e-1,f<0?r.openEnd:e-1):new rt(_m(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||!l3(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=l3(e,n,s,i,o);if(r){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=l3(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=ym(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=ym(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=ym(this.placed,this.frontier.length,n))}}function _m(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(_m(t.firstChild.content,e-1,n)))}function ym(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(ym(t.lastChild.content,e-1,n)))}function a3(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function sB(t,e,n){if(e<=0)return t;let i=t.content;return e>1&&(i=i.replaceChild(0,sB(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 l3(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&&!v5e(n,o.content,r)?a:null}function v5e(t,e,n){for(let i=n;i<e.childCount;i++)if(!t.allowsMarks(e.child(i).marks))return!0;return!1}function _5e(t){return t.spec.defining||t.spec.definingForContent}function y5e(t,e,n,i){if(!i.size)return t.deleteRange(e,n);let s=t.doc.resolve(e),o=t.doc.resolve(n);if(nB(s,o,i))return t.step(new ti(e,n,i));let r=oB(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=_5e(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 y=r[(m+l)%r.length],b=!0;y<0&&(b=!1,y=-y);let k=s.node(y-1),C=s.index(y-1);if(k.canReplaceWith(C,C,p.type,p.marks))return t.replace(s.before(y),b?o.after(y):n,new rt(iB(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 iB(t,e,n,i,s){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(iB(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 b5e(t,e,n,i){if(!i.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let s=p5e(t.doc,e,i.type);s!=null&&(e=n=s)}t.replaceRange(e,n,new rt(st.from(i),0,0))}function w5e(t,e,n){let i=t.doc.resolve(e),s=t.doc.resolve(n),o=oB(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 oB(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 Mo.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 a1 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 Mo.empty}invert(e){return new a1(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 a1(n.attr,n.value)}}Oi.jsonID("docAttr",a1);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 rB{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=K8(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 y5e(this,e,n,i),this}replaceRangeWith(e,n,i){return b5e(this,e,n,i),this}deleteRange(e,n){return w5e(this,e,n),this}lift(e,n){return n5e(this,e,n),this}join(e,n=1){return f5e(this,e,n),this}wrap(e,n){return o5e(this,e,n),this}setBlockType(e,n=e,i,s=null){return r5e(this,e,n,i,s),this}setNodeMarkup(e,n,i=null,s){return u5e(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 a1(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 d5e(this,e,n,i),this}addMark(e,n,i){return Q8e(this,e,n,i),this}removeMark(e,n,i){return e5e(this,e,n,i),this}clearIncompatible(e,n,i){return tB(this,e,n,i),this}}const c3=Object.create(null);class Ut{constructor(e,n,i){this.$anchor=e,this.$head=n,this.ranges=i||[new zy(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&&jE(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),jE(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 Fo(e.node(0))}static atStart(e){return Lh(e,e,0,0,1)||new Fo(e)}static atEnd(e){return Lh(e,e,e.content.size,e.childCount,-1)||new Fo(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=c3[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 c3)throw new RangeError("Duplicate use of selection JSON ID "+e);return c3[e]=n,n.prototype.jsonID=e,n}getBookmark(){return Ot.between(this.$anchor,this.$head).getBookmark()}}Ut.prototype.visible=!0;class zy{constructor(e,n){this.$from=e,this.$to=n}}let HE=!1;function UE(t){!HE&&!t.parent.inlineContent&&(HE=!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){UE(e),UE(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 w2(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 w2{constructor(e,n){this.anchor=e,this.head=n}map(e){return new w2(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 Z8(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 Z8{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:i}=e.mapResult(this.anchor);return n?new w2(i,i):new Z8(i)}resolve(e){let n=e.resolve(this.anchor),i=n.nodeAfter;return i&&Rt.isSelectable(i)?new Rt(n):Ut.near(n)}}class Fo 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 Fo(e)}map(e){return new Fo(e)}eq(e){return e instanceof Fo}getBookmark(){return k5e}}Ut.jsonID("all",Fo);const k5e={map(){return this},resolve(t){return new Fo(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 jE(t,e,n){let i=t.steps.length-1;if(i<e)return;let s=t.steps[i];if(!(s instanceof ti||s instanceof Ti))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 WE=1,c0=2,YE=4;class C5e extends rB{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|WE)&~c0,this.storedMarks=null,this}get selectionSet(){return(this.updated&WE)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=c0,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&c0)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~c0,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|=YE,this}get scrolledIntoView(){return(this.updated&YE)>0}}function qE(t,e){return!e||!t?t:t.bind(e)}class bm{constructor(e,n,i){this.name=e,this.init=qE(n.init,i),this.apply=qE(n.apply,i)}}const x5e=[new bm("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new bm("selection",{init(t,e){return t.selection||Ut.atStart(e.doc)},apply(t){return t.selection}}),new bm("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,i){return i.selection.$cursor?t.storedMarks:null}}),new bm("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class u3{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=x5e.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 bm(i.key,i.spec.state,i))})}}class Bu{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 Bu(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 C5e(this)}static create(e){let n=new u3(e.doc?e.doc.type.schema:e.schema,e.plugins),i=new Bu(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 u3(this.schema,e.plugins),i=n.fields,s=new Bu(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 u3(e.schema,e.plugins),o=new Bu(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 aB(t,e,n){for(let i in t){let s=t[i];s instanceof Function?s=s.bind(e):i=="handleDOMEvents"&&(s=aB(s,e,{})),n[i]=s}return n}class rs{constructor(e){this.spec=e,this.props={},e.props&&aB(e.props,this,this.props),this.key=e.key?e.key.key:lB("plugin")}getState(e){return e[this.key]}}const d3=Object.create(null);function lB(t){return t in d3?t+"$"+ ++d3[t]:(d3[t]=0,t+"$")}class ps{constructor(e="key"){this.key=lB(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"?S5e(n):n,this.undoable=i.undoable!==!1,this.inCode=i.inCode||!1}}function S5e(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 $5e=(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 J8(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&&X8(d,e,l);if(!h)return null;c.wrap(d,h);let f=c.doc.resolve(r-1).nodeBefore;return f&&f.type==e&&b2(c.doc,r-1)&&(!i||i(o,f))&&c.join(r-1),c})}function cB(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,GE=typeof document<"u"?document:null,ou=Uc&&Uc.userAgent||"",nx=/Edge\/(\d+)/.exec(ou),uB=/MSIE \d/.exec(ou),sx=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ou),k2=!!(uB||sx||nx),A5e=uB?document.documentMode:sx?+sx[1]:nx?+nx[1]:0,dB=!k2&&/gecko\/(\d+)/i.test(ou),E5e=dB&&+(/Firefox\/(\d+)/.exec(ou)||[0,0])[1],ix=!k2&&/Chrome\/(\d+)/.exec(ou),M5e=!!ix,T5e=ix?+ix[1]:0,hB=!k2&&!!Uc&&/Apple Computer/.test(Uc.vendor),fB=hB&&(/Mobile\/\w+/.test(ou)||!!Uc&&Uc.maxTouchPoints>2),P5e=fB||(Uc?/Mac/.test(Uc.platform):!1),I5e=/Android \d/.test(ou),pB=!!GE&&"webkitFontSmoothing"in GE.documentElement.style,L5e=pB?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;var u0=Object.freeze({__proto__:null,android:I5e,chrome:M5e,chrome_version:T5e,gecko:dB,gecko_version:E5e,ie:k2,ie_version:A5e,ios:fB,mac:P5e,safari:hB,webkit:pB,webkit_version:L5e});function h3(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 O5e=new ps("MILKDOWN_CUSTOM_INPUTRULES");function D5e({rules:t}){const e=new rs({key:O5e,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 h3(n,i,s,o,t,e)},handleDOMEvents:{compositionend:n=>(setTimeout(()=>{const{$cursor:i}=n.state.selection;i&&h3(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?h3(n,s.pos,s.pos,`
118 `,t,e):!1}}});return e}function tv(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=[],y=r;const b={group:f,fullMatch:p,start:o,end:r},k=(a=n.updateCaptured)==null?void 0:a.call(n,b);if(Object.assign(b,k),{group:f,fullMatch:p,start:o,end:r}=b,p===null||(f==null?void 0:f.trim())==="")return null;if(f){const C=p.search(/\S/),$=o+p.indexOf(f),S=$+f.length;m=(l=d.storedMarks)!=null?l:[],S<r&&d.delete(S,r),$>o&&d.delete(o+C,$),y=o+C+f.length;const M=(c=n.getAttr)==null?void 0:c.call(n,s);d.addMark(o,y,e.create(M)),d.setStoredMarks(m),(u=n.beforeDispatch)==null||u.call(n,{match:s,start:o,end:r,tr:d})}return d})}var R5e=Object.defineProperty,V5e=Object.defineProperties,F5e=Object.getOwnPropertyDescriptors,XE=Object.getOwnPropertySymbols,N5e=Object.prototype.hasOwnProperty,B5e=Object.prototype.propertyIsEnumerable,KE=(t,e,n)=>e in t?R5e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,z5e=(t,e)=>{for(var n in e||(e={}))N5e.call(e,n)&&KE(t,n,e[n]);if(XE)for(var n of XE(e))B5e.call(e,n)&&KE(t,n,e[n]);return t},H5e=(t,e)=>V5e(t,F5e(e));function ZE(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function C2(t,e,n){const s=t.state.doc.content.size,o=ZE(e,0,s),r=ZE(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,b={top:c,bottom:u,left:d,right:h,width:f,height:p,x:d,y:c};return H5e(z5e({},b),{toJSON:()=>b})}function x2(t){return Object.assign(Object.create(t),t).setTime(Date.now())}function U5e(t,e){return Array.isArray(t)&&t.includes(e.type)||e.type===t}function Q8(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 j5e(t,e){return Q8(n=>n.type===e)(t)}function W5e(t,e){const n=e.nodes[t];if(!n)throw zCe("node",t);return n}function e5(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 Y5e(t){return e=>e5(t)(e.$from)}function q5e(t,e){if(!(t instanceof Rt))return;const{node:n,$from:i}=t;if(U5e(e,n))return{node:n,pos:i.pos,start:i.start(i.depth),depth:i.depth}}const t5=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function G5e(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const mB=(t,e,n)=>{let i=G5e(t,n);if(!i)return!1;let s=vB(i);if(!s){let r=i.blockRange(),a=r&&y2(r);return a==null?!1:(e&&e(t.tr.lift(r,a).scrollIntoView()),!0)}let o=s.nodeBefore;if(yB(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=K8(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 gB=(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=vB(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 vB(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 X5e(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const K5e=(t,e,n)=>{let i=X5e(t,n);if(!i)return!1;let s=_B(i);if(!s)return!1;let o=s.nodeAfter;if(yB(t,s,e,1))return!0;if(i.parent.content.size==0&&(Qf(o,"start")||Rt.isSelectable(o))){let r=K8(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},Z5e=(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=_B(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 _B(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 J5e=(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 n5(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 Q5e=(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=n5(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},eSe=(t,e)=>{let n=t.selection,{$from:i,$to:s}=n;if(n instanceof Fo||i.parent.inlineContent||s.parent.inlineContent)return!1;let o=n5(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},tSe=(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(cg(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let i=n.blockRange(),s=i&&y2(i);return s==null?!1:(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)};function nSe(t){return(e,n)=>{let{$from:i,$to:s}=e.selection;if(e.selection instanceof Rt&&e.selection.node.isBlock)return!i.parentOffset||!cg(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 Fo)&&r.deleteSelection();let a=i.depth==0?null:n5(i.node(-1).contentMatchAt(i.indexAfter(-1))),l=t&&t(s.parent,o,i),c=l?[l]:o&&a?[{type:a}]:void 0,u=cg(r.doc,r.mapping.map(i.pos),1,c);if(!c&&!u&&cg(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 sSe=nSe(),iSe=(t,e)=>(e&&e(t.tr.setSelection(new Fo(t.doc))),!0);function oSe(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||b2(t.doc,e.pos))?!1:(n&&n(t.tr.clearIncompatible(e.pos,i.type,i.contentMatchAt(i.childCount)).join(e.pos).scrollIntoView()),!0)}function yB(t,e,n,i){let s=e.nodeBefore,o=e.nodeAfter,r,a,l=s.type.spec.isolating||o.type.spec.isolating;if(!l&&oSe(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 b=r.length-1;b>=0;b--)p=st.from(r[b].create(null,p));p=st.from(s.copy(p));let m=t.tr.step(new Ti(e.pos-1,f,e.pos,f,new rt(p,1,0),r.length,!0)),y=f+2*r.length;b2(m.doc,y)&&m.join(y),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&&y2(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,y=1;for(;!m.isTextblock;m=m.firstChild)y++;if(f.canReplace(f.childCount,f.childCount,m.content)){if(n){let b=st.empty;for(let C=p.length-1;C>=0;C--)b=st.from(p[C].copy(b));let k=t.tr.step(new Ti(e.pos-p.length,e.pos+o.nodeSize,e.pos+y,e.pos+o.nodeSize-y,new rt(b,p.length,0),0,!0));n(k.scrollIntoView())}return!0}}return!1}function bB(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 rSe=bB(-1),aSe=bB(1);function s5(t,e=null){return function(n,i){let{$from:s,$to:o}=n.selection,r=s.blockRange(o),a=r&&X8(r,t,e);return a?(i&&i(n.tr.wrap(r,a).scrollIntoView()),!0):!1}}function l1(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 lSe(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 cSe(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 zy(i,i.doc.resolve(r+1))),i=i.doc.resolve(r+1+o.content.size),!1}),i.pos<s.pos&&e.push(new zy(i,s))}return e}function S2(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||!lSe(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=cSe(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,y)=>{if(f)return!1;f=!t.isInSet(p.marks)&&!!y&&y.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,y=p.pos,b=f.nodeAfter,k=p.nodeBefore,C=b&&b.isText?/^\s*/.exec(b.text)[0].length:0,$=k&&k.isText?/\s*$/.exec(k.text)[0].length:0;m+C<y&&(m+=C,y-=$),d.addMark(m,y,t.create(e))}}r(d.scrollIntoView())}return!0}}function $2(...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 f3=$2(t5,mB,gB),JE=$2(t5,K5e,Z5e);const Qa={Enter:$2(J5e,eSe,tSe,sSe),"Mod-Enter":Q5e,Backspace:f3,"Mod-Backspace":f3,"Shift-Backspace":f3,Delete:JE,"Mod-Delete":JE,"Mod-a":iSe},wB={"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":rSe,"Ctrl-e":aSe};for(let t in Qa)wB[t]=Qa[t];const uSe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,dSe=uSe?wB: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:"'"},Hy={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},hSe=typeof navigator<"u"&&/Mac/.test(navigator.platform),fSe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ni=0;ni<10;ni++)jc[48+ni]=jc[96+ni]=String(ni);for(var ni=1;ni<=24;ni++)jc[ni+111]="F"+ni;for(var ni=65;ni<=90;ni++)jc[ni]=String.fromCharCode(ni+32),Hy[ni]=String.fromCharCode(ni);for(var p3 in jc)Hy.hasOwnProperty(p3)||(Hy[p3]=jc[p3]);function pSe(t){var e=hSe&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||fSe&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Hy: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 mSe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function gSe(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))mSe?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 vSe(t){let e=Object.create(null);for(let n in t)e[gSe(n)]=t[n];return e}function m3(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 kB(t){return new rs({props:{handleKeyDown:CB(t)}})}function CB(t){let e=vSe(t);return function(n,i){let s=pSe(i),o,r=e[m3(s,i)];if(r&&r(n.state,n.dispatch,n))return!0;if(s.length==1&&s!=" "){if(i.shiftKey){let a=e[m3(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[m3(o,i)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const si=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},c1=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let ox=null;const Za=function(t,e,n){let i=ox||(ox=document.createRange());return i.setEnd(t,n??t.nodeValue.length),i.setStart(t,e||0),i},_Se=function(){ox=null},Sd=function(t,e,n,i){return n&&(QE(t,e,n,i,-1)||QE(t,e,n,i,1))},ySe=/^(img|br|input|textarea|hr)$/i;function QE(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||nv(t)||ySe.test(t.nodeName)||t.contentEditable=="false")return!1;e=si(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 bSe(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&&!nv(t))e=si(t),t=t.parentNode;else return null}}function wSe(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&&!nv(t))e=si(t)+1,t=t.parentNode;else return null}}function kSe(t,e,n){for(let i=e==0,s=e==ar(t);i||s;){if(t==n)return!0;let o=si(t);if(t=t.parentNode,!t)return!1;i=i&&o==0,s=s&&o==ar(t)}}function nv(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 A2=function(t){return t.focusNode&&Sd(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Lu(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function CSe(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function xSe(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 La=typeof navigator<"u"?navigator:null,eM=typeof document<"u"?document:null,ru=La&&La.userAgent||"",rx=/Edge\/(\d+)/.exec(ru),xB=/MSIE \d/.exec(ru),ax=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ru),po=!!(xB||ax||rx),Pc=xB?document.documentMode:ax?+ax[1]:rx?+rx[1]:0,Jr=!po&&/gecko\/(\d+)/i.test(ru);Jr&&+(/Firefox\/(\d+)/.exec(ru)||[0,0])[1];const lx=!po&&/Chrome\/(\d+)/.exec(ru),Ei=!!lx,SB=lx?+lx[1]:0,Gi=!po&&!!La&&/Apple Computer/.test(La.vendor),ep=Gi&&(/Mobile\/\w+/.test(ru)||!!La&&La.maxTouchPoints>2),nr=ep||(La?/Mac/.test(La.platform):!1),SSe=La?/Win/.test(La.platform):!1,Pr=/Android \d/.test(ru),sv=!!eM&&"webkitFontSmoothing"in eM.documentElement.style,$Se=sv?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function ASe(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 ESe(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 tM(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=c1(r)){if(r.nodeType!=1)continue;let a=r,l=a==o.body,c=l?ASe(o):ESe(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 MSe(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:$B(t.dom)}}function $B(t){let e=[],n=t.ownerDocument;for(let i=t;i&&(e.push({dom:i,top:i.scrollTop,left:i.scrollLeft}),t!=n);i=c1(i));return e}function TSe({refDOM:t,refTop:e,stack:n}){let i=t?t.getBoundingClientRect().top:0;AB(n,i==0?0:i-e)}function AB(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 PSe(t){if(t.setActive)return t.setActive();if(hh)return t.focus(hh);let e=$B(t);t.focus(hh==null?{get preventScroll(){return hh={preventScroll:!0},!0}}:void 0),hh||(hh=!1,AB(e,0))}function EB(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?ISe(n,s):!n||i&&n.nodeType==1?{node:t,offset:o}:EB(n,s)}function ISe(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&&i5(e,o))return{node:t,offset:s+(e.left>=(o.left+o.right)/2?1:0)}}return{node:t,offset:0}}function i5(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function LSe(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function OSe(t,e,n){let{node:i,offset:s}=EB(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 DSe(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 MB(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(i5(e,c))return MB(r,e,c)}}if((o=(o+1)%i)==s)break}return t}function RSe(t,e){let n=t.dom.ownerDocument,i,s=0,o=xSe(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(!i5(e,c)||(r=MB(t.dom,e,c),!r))return null}if(Gi)for(let c=r;i&&c;c=c1(c))c.draggable&&(i=void 0);if(r=LSe(r,e),i){if(Jr&&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;sv&&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=DSe(t,i,s,e))}a==null&&(a=OSe(t,r,e));let l=t.docView.nearestDesc(r,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function nM(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(nM(i))return i}return Array.prototype.find.call(n,nM)||t.getBoundingClientRect()}const VSe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function TB(t,e,n){let{node:i,offset:s,atom:o}=t.docView.domFromPos(e,n<0?-1:1),r=sv||Jr;if(i.nodeType==3)if(r&&(VSe.test(i.nodeValue)||(n<0?!s:s==i.nodeValue.length))){let l=ec(Za(i,s,s),n);if(Jr&&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 Jp(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++,Jp(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 g3(l.getBoundingClientRect(),!1)}if(o==null&&s<ar(i)){let l=i.childNodes[s];if(l.nodeType==1)return g3(l.getBoundingClientRect(),!0)}return g3(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 Jp(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 Jp(ec(c,-1),!0)}return Jp(ec(i.nodeType==3?Za(i):i,-n),n>=0)}function Jp(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 g3(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 PB(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 FSe(t,e,n){let i=e.selection,s=n=="up"?i.$from:i.$to;return PB(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=TB(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 NSe=/[\u0590-\u08ac]/;function BSe(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?!NSe.test(i.parent.textContent)||!a.modify?n=="left"||n=="backward"?o:r:PB(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(),y=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),y}):i.pos==i.start()||i.pos==i.end()}let sM=null,iM=null,oM=!1;function zSe(t,e,n){return sM==e&&iM==n?oM:(sM=e,iM=n,oM=n=="up"||n=="down"?FSe(t,e,n):BSe(t,e,n))}const mr=0,rM=1,zu=2,Oa=3;class iv{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>si(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 LB){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 IB&&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?si(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?si(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=si(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=si(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((Jr||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:si(m)+1});break}let y=p.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let p=h.childNodes[f-1];u=p&&(p.nodeName=="BR"||p.contentEditable=="false")}}if(Jr&&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)&&Sd(a.node,a.offset,c.anchorNode,c.anchorOffset)&&Sd(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?zu:rM,e==a&&n==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=Oa:o.markDirty(e-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?zu:Oa}i=r}this.dirty=zu}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let i=e==1?zu:rM;n.dirty<i&&(n.dirty=i)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class IB extends iv{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 HSe extends iv{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 $d extends iv{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=su.renderSpec(document,n.type.spec.toDOM(n,i),null,n.attrs)),new $d(e,n,r.dom,r.contentDOM||r.dom)}parseRule(){return this.dirty&Oa||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Oa&&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=$d.create(this.parent,this.mark,!0,i),o=this.children,r=this.size;n<r&&(o=dx(o,n,r,i)),e>0&&(o=dx(o,0,e,i));for(let a=0;a<o.length;a++)o[a].parent=s;return s.children=o,s}}class Ic extends iv{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}=su.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=RB(u,i,n),c?l=new USe(e,n,i,s,u,d||null,h,c,o,r+1):n.isText?new E2(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)&&ux(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 WSe(this,r&&r.node,e);GSe(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==zu)&&(r&&this.protectLocalComposition(e,r),OB(this.contentDOM,this.children,e),ep&&XSe(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=KSe(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 HSe(this,o,n,s);e.input.compositionNodes.push(r),this.children=dx(this.children,i,i+s.length,e,r)}update(e,n,i,s){return this.dirty==Oa||!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(ux(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,i=this.dom;this.dom=DB(this.dom,this.nodeDOM,cx(this.outerDeco,this.node,n),cx(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 aM(t,e,n,i,s){RB(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 E2 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==Oa||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 E2(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=Oa)}get domAtom(){return!1}isText(e){return this.node.text==e}}class LB extends iv{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 USe 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==Oa)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 OB(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=lM(i),s=!0;i=i.nextSibling}else s=!0,t.insertBefore(a,i);if(r instanceof $d){let l=i?i.previousSibling:t.lastChild;OB(r.contentDOM,r.children,n),i=l?l.nextSibling:t.firstChild}}for(;i;)i=lM(i),s=!0;s&&n.trackWrites==t&&(n.trackWrites=null)}const ug=function(t){t&&(this.nodeName=t)};ug.prototype=Object.create(null);const Hu=[new ug];function cx(t,e,n){if(t.length==0)return Hu;let i=n?Hu[0]:new ug,s=[i];for(let o=0;o<t.length;o++){let r=t[o].type.attrs;if(r){r.nodeName&&s.push(i=new ug(r.nodeName));for(let a in r){let l=r[a];l!=null&&(n&&s.length==1&&s.push(i=new ug(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 DB(t,e,n,i){if(n==Hu&&i==Hu)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=Hu[0]),s=l}jSe(s,a||Hu[0],r)}return s}function jSe(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 RB(t,e,n){return DB(t,t,Hu,cx(e,n,t.nodeType!=1))}function ux(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 lM(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class WSe{constructor(e,n,i){this.lock=n,this.view=i,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=YSe(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=$d.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==Oa&&r.dom==r.contentDOM&&(r.dirty=zu),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!=Oa&&ux(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=zu,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 IB(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 $d;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof E2)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Gi||Ei)&&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 LB(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 YSe(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 $d)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 GSe(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 y=s[r++];y.widget&&(u?(d||(d=[u])).push(y):u=y)}if(u)if(d){d.sort(qSe);for(let y=0;y<d.length;y++)n(d[y],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 y=0;y<a.length;y++)a[y].to<=o&&a.splice(y--,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 y=p;r<s.length&&s[r].from<y&&(y=s[r].from);for(let b=0;b<a.length;b++)a[b].to<y&&(y=a[b].to);y<p&&(l=h.cut(y-o),h=h.cut(0,y-o),p=y,f=-1)}else for(;r<s.length&&s[r].to<p;)r++;let m=h.isInline&&!h.isLeaf?a.filter(y=>!y.inline):a.slice();i(h,m,e.forChild(o,h),f),o=p}}function XSe(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 KSe(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 dx(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 o5(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(A2(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&&kSe(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=r5(t,l,a,u)}return c}function VB(t){return t.editable?t.hasFocus():NB(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function ml(t,e=!1){let n=t.state.selection;if(FB(t,n),!!VB(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&Ei){let i=t.domSelectionRange(),s=t.domObserver.currentSelection;if(i.anchorNode&&s.anchorNode&&Sd(i.anchorNode,i.anchorOffset,s.anchorNode,s.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)JSe(t);else{let{anchor:i,head:s}=n,o,r;cM&&!(n instanceof Ot)&&(n.$from.parent.inlineContent||(o=uM(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(r=uM(t,n.to))),t.docView.setSelection(i,s,t.root,e),cM&&(o&&dM(o),r&&dM(r)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&ZSe(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const cM=Gi||Ei&&SB<63;function uM(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 v3(s);if((!s||s.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(s)return v3(s);if(o)return v3(o)}}function v3(t){return t.contentEditable="true",Gi&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function dM(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function ZSe(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(()=>{(!VB(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function JSe(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,si(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 FB(t,e){if(e instanceof Rt){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(hM(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else hM(t)}function hM(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function r5(t,e,n,i){return t.someProp("createSelectionBetween",s=>s(t,e,n))||Ot.between(e,n,i)}function fM(t){return t.editable&&!t.hasFocus()?!1:NB(t)}function NB(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 QSe(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return Sd(e.node,e.offset,n.anchorNode,n.anchorOffset)}function hx(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 pM(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=hx(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)):sv?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=hx(t.state,e);return s?hc(t,s):!1}}}function Uy(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function dg(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?e9e(t):t9e(t)}function e9e(t){let e=t.domSelectionRange(),n=e.focusNode,i=e.focusOffset;if(!n)return;let s,o,r=!1;for(Jr&&n.nodeType==1&&i<Uy(n)&&dg(n.childNodes[i],-1)&&(r=!0);;)if(i>0){if(n.nodeType!=1)break;{let a=n.childNodes[i-1];if(dg(a,-1))s=n,o=--i;else if(a.nodeType==3)n=a,i=n.nodeValue.length;else break}}else{if(BB(n))break;{let a=n.previousSibling;for(;a&&dg(a,-1);)s=n.parentNode,o=si(a),a=a.previousSibling;if(a)n=a,i=Uy(n);else{if(n=n.parentNode,n==t.dom)break;i=0}}}r?fx(t,n,i):s&&fx(t,s,o)}function t9e(t){let e=t.domSelectionRange(),n=e.focusNode,i=e.focusOffset;if(!n)return;let s=Uy(n),o,r;for(;;)if(i<s){if(n.nodeType!=1)break;let a=n.childNodes[i];if(dg(a,1))o=n,r=++i;else break}else{if(BB(n))break;{let a=n.nextSibling;for(;a&&dg(a,1);)o=a.parentNode,r=si(a)+1,a=a.nextSibling;if(a)n=a,i=0,s=Uy(n);else{if(n=n.parentNode,n==t.dom)break;i=s=0}}}o&&fx(t,o,r)}function BB(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function n9e(t,e){for(;t&&e==t.childNodes.length&&!nv(t);)e=si(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 s9e(t,e){for(;t&&!e&&!nv(t);)e=si(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 fx(t,e,n){if(e.nodeType!=3){let o,r;(r=n9e(e,n))?(e=r,n=0):(o=s9e(e,n))&&(e=o,n=o.nodeValue.length)}let i=t.domSelection();if(!i)return;if(A2(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 mM(t,e){let n=t.state.doc.resolve(e);if(!(Ei||SSe)&&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 gM(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=hx(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 Fo?Ut.near(r,e):Ut.findFrom(r,e);return a?hc(t,a):!1}return!1}function vM(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 _M(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function i9e(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;_M(t,i,"true"),setTimeout(()=>_M(t,i,"false"),20)}return!1}function o9e(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function r9e(t,e){let n=e.keyCode,i=o9e(e);if(n==8||nr&&n==72&&i=="c")return vM(t,-1)||fh(t,-1);if(n==46&&!e.shiftKey||nr&&n==68&&i=="c")return vM(t,1)||fh(t,1);if(n==13||n==27)return!0;if(n==37||nr&&n==66&&i=="c"){let s=n==37?mM(t,t.state.selection.from)=="ltr"?-1:1:-1;return pM(t,s,i)||fh(t,s)}else if(n==39||nr&&n==70&&i=="c"){let s=n==39?mM(t,t.state.selection.from)=="ltr"?1:-1:1;return pM(t,s,i)||fh(t,s)}else{if(n==38||nr&&n==80&&i=="c")return gM(t,-1,i)||fh(t,-1);if(n==40||nr&&n==78&&i=="c")return i9e(t)||gM(t,1,i)||fh(t,1);if(i==(nr?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function zB(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")||su.fromSchema(t.state.schema),a=qB(),l=a.createElement("div");l.appendChild(r.serializeFragment(i,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=YB[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,`
121
122 `);return{dom:l,text:h,slice:e}}function HB(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=su.fromSchema(f);r=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let y=r.appendChild(document.createElement("p"));m&&y.appendChild(p.serializeNode(f.text(m,h)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),r=u9e(n),sv&&d9e(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")||p2.fromSchema(t.state.schema)).parseSlice(r,{preserveWhitespace:!!(l||u),context:s,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!a9e.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)a=h9e(yM(a,+u[1],+u[2]),u[4]);else if(a=rt.maxOpen(l9e(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=yM(a,d,h)}return t.someProp("transformPasted",d=>{a=d(a,t)}),a}const a9e=/^(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 l9e(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&&jB(l,o,a,r[r.length-1],0))r[r.length-1]=c;else{r.length&&(r[r.length-1]=WB(r[r.length-1],o.length));let u=UB(a,l);r.push(u),s=s.matchType(u.type),o=l}}),r)return st.from(r)}return t}function UB(t,e,n=0){for(let i=e.length-1;i>=n;i--)t=e[i].create(null,st.from(t));return t}function jB(t,e,n,i,s){if(s<t.length&&s<e.length&&t[s]==e[s]){let o=jB(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(UB(n,t,s+1))))}}function WB(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,WB(t.lastChild,e-1)),i=t.contentMatchAt(t.childCount).fillBefore(st.empty,!0);return t.copy(n.append(i))}function px(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=px(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 yM(t,e,n){return e<t.openStart&&(t=new rt(px(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new rt(px(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const YB={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 bM=null;function qB(){return bM||(bM=document.implementation.createHTMLDocument("title"))}function c9e(t){let e=window.trustedTypes;return e?e.createPolicy("detachedDocument",{createHTML:n=>n}).createHTML(t):t}function u9e(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=qB().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(t),s;if((s=i&&YB[i[1].toLowerCase()])&&(t=s.map(o=>"<"+o+">").join("")+t+s.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=c9e(t),s)for(let o=0;o<s.length;o++)n=n.querySelector(s[o])||n;return n}function d9e(t){let e=t.querySelectorAll(Ei?"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 h9e(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={},f9e={touchstart:!0,touchmove:!0};class p9e{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 m9e(t){for(let e in Xi){let n=Xi[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=i=>{v9e(t,i)&&!a5(t,i)&&(t.editable||!(i.type in Ki))&&n(t,i)},f9e[e]?{passive:!0}:void 0)}Gi&&t.dom.addEventListener("input",()=>null),mx(t)}function Sc(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function g9e(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 mx(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=i=>a5(t,i))})}function a5(t,e){return t.someProp("handleDOMEvents",n=>{let i=n[e.type];return i?i(t,e)||e.defaultPrevented:!1})}function v9e(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 _9e(t,e){!a5(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,!XB(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Pr&&Ei&&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,Lu(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",i=>i(t,n))||r9e(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(XB(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 M2(t){return{left:t.clientX,top:t.clientY}}function y9e(t,e){let n=e.x-t.clientX,i=e.y-t.clientY;return n*n+i*i<100}function l5(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 b9e(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 w9e(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 k9e(t,e,n,i,s){return l5(t,"handleClickOn",e,n,i)||t.someProp("handleClick",o=>o(t,e,i))||(s?w9e(t,n):b9e(t,n))}function C9e(t,e,n,i){return l5(t,"handleDoubleClickOn",e,n,i)||t.someProp("handleDoubleClick",s=>s(t,e,i))}function x9e(t,e,n,i){return l5(t,"handleTripleClickOn",e,n,i)||t.someProp("handleTripleClick",s=>s(t,e,i))||S9e(t,n,i)}function S9e(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 c5(t){return jy(t)}const GB=nr?"metaKey":"ctrlKey";Xi.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let i=c5(t),s=Date.now(),o="singleClick";s-t.input.lastClick.time<500&&y9e(n,t.input.lastClick)&&!n[GB]&&(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(M2(n));r&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new $9e(t,r,n,!!i)):(o=="doubleClick"?C9e:x9e)(t,r.pos,r.inside,n)?n.preventDefault():Sc(t,"pointer"))};class $9e{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[GB],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&&Jr&&!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(M2(e))),this.updateAllowDefault(e),this.allowDefault||!n?Sc(this.view,"pointer"):k9e(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Gi&&this.mightDrag&&!this.mightDrag.node.isAtom||Ei&&!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(),c5(t),Sc(t,"pointer")};Xi.touchmove=t=>{t.input.lastTouch=Date.now(),Sc(t,"pointer")};Xi.contextmenu=t=>c5(t);function XB(t,e){return t.composing?!0:Gi&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const A9e=Pr?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(),jy(t,!0),t.markCursor=null;else if(jy(t,!e.selection.empty),Jr&&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}KB(t,A9e)};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++,KB(t,20))};function KB(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>jy(t),e))}function ZB(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=M9e());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function E9e(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=bSe(e.focusNode,e.focusOffset),i=wSe(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 M9e(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function jy(t,e=!1){if(!(Pr&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),ZB(t),e||t.docView&&t.docView.dirty){let n=o5(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 T9e(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 u1=po&&Pc<15||ep&&$Se<604;Xi.copy=Ki.cut=(t,e)=>{let n=e,i=t.state.selection,s=n.type=="cut";if(i.empty)return;let o=u1?null:n.clipboardData,r=i.content(),{dom:a,text:l}=zB(t,r);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):T9e(t,a),s&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function P9e(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function I9e(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?d1(t,i.value,null,s,e):d1(t,i.textContent,i.innerHTML,s,e)},50)}function d1(t,e,n,i,s){let o=HB(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=P9e(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 JB(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&&!Pr)return;let i=u1?null:n.clipboardData,s=t.input.shiftKey&&t.input.lastKeyCode!=45;i&&d1(t,JB(i),i.getData("text/html"),s,n)?n.preventDefault():I9e(t,n)};class QB{constructor(e,n,i){this.slice=e,this.move=n,this.node=i}}const ez=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(M2(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}=zB(t,a);(!n.dataTransfer.files.length||!Ei||SB>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(u1?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",u1||n.dataTransfer.setData("text/plain",c),t.dragging=new QB(u,!n[ez],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(M2(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=HB(t,JB(n.dataTransfer),u1?null:n.dataTransfer.getData("text/html"),!1,o);let a=!!(i&&!n[ez]);if(t.someProp("handleDrop",p=>p(t,n,r||rt.empty,a))){n.preventDefault();return}if(!r)return;n.preventDefault();let l=r?m5e(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,y,b,k)=>p=k),c.setSelection(r5(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(Ei&&Pr&&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,Lu(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 h1(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 Wy{constructor(e,n){this.toDOM=e,this.spec=n||sd,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 Wy&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&h1(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Lc{constructor(e,n){this.attrs=e,this.spec=n||sd}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&&h1(this.attrs,e.attrs)&&h1(this.spec,e.spec)}static is(e){return e.type instanceof Lc}destroy(){}}class u5{constructor(e,n){this.attrs=e,this.spec=n||sd}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 u5&&h1(this.attrs,e.attrs)&&h1(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 Wy(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 u5(i,s))}get spec(){return this.type.spec}get inline(){return this.type instanceof Lc}get widget(){return this.type instanceof Wy}}const Oh=[],sd={};class Kn{constructor(e,n){this.local=e.length?e:Oh,this.children=n.length?n:Oh}static create(e,n){return n.length?Yy(n,e,0,sd):xi}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==xi||e.maps.length==0?this:this.mapInner(e,n,0,0,i||sd)}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?L9e(this.children,r||[],e,n,i,s,o):r?new Kn(r.sort(id),Oh):xi}add(e,n){return n.length?this==xi?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=nz(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,Yy(u,a,c+1,sd)),o+=3}});let r=tz(o?sz(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(id):this.local,s||this.children)}remove(e){return e.length==0||this==xi?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!=xi?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):xi}forChild(e,n){if(this==xi)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(id),Oh);return i?new gc([a,i]):a}return i||xi}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 d5(this.localsInner(e))}localsInner(e){if(this==xi)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=d5;const xi=Kn.empty;class gc{constructor(e){this.members=e}map(e,n){const i=this.members.map(s=>s.map(e,n,sd));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!=xi&&(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?d5(i?n:n.sort(id)):Oh}static from(e){switch(e.length){case 0:return xi;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 L9e(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 y=m-p-(f-h);for(let b=0;b<a.length;b+=3){let k=a[b+1];if(k<0||h>k+u-d)continue;let C=a[b]+u-d;f>=C?a[b+1]=h<=C?-2:-1:h>=u&&y&&(a[b]+=y,a[b+1]+=y)}d+=y}),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),y=i.maybeChild(p);if(y&&m==d&&m+y.nodeSize==f){let b=a[c+2].mapInner(n,y,u+1,t[c]+o+1,r);b!=xi?(a[c]=d,a[c+1]=f,a[c+2]=b):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=O9e(a,t,e,n,s,o,r),u=Yy(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(id),a)}function tz(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 O9e(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 nz(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 sz(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Yy(t,e,n,i){let s=[],o=!1;e.forEach((a,l)=>{let c=nz(t,a,l+n);if(c){o=!0;let u=Yy(c,a,n+l+1,i);u!=xi&&s.push(l,l+a.nodeSize,u)}});let r=tz(o?sz(t):t,-n).sort(id);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):xi}function id(t,e){return t.from-e.from||t.to-e.to}function d5(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),wM(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),wM(e,s,i.copy(o.from,i.to)));break}}}return e}function wM(t,e,n){for(;e<t.length&&id(n,t[e])>0;)e++;t.splice(e,0,n)}function _3(t){let e=[];return t.someProp("decorations",n=>{let i=n(t.state);i&&i!=xi&&e.push(i)}),t.cursorWrapper&&e.push(Kn.create(t.state.doc,[t.cursorWrapper.deco])),gc.from(e)}const D9e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},R9e=po&&Pc<=11;class V9e{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 F9e{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new V9e,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()}),R9e&&(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,D9e)),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(fM(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&&Sd(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=c1(o))n.add(o);for(let o=e.anchorNode;o;o=c1(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)&&fM(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(Jr&&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||z9e(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&&A2(i)&&(c=o5(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),N9e(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?si(s)+1:0,a=i.localPosFromDOM(e.target,r,-1),l=o&&o.parentNode==e.target?si(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 kM=new WeakMap,CM=!1;function N9e(t){if(!kM.has(t)&&(kM.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Jr,CM)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."),CM=!0}}function xM(t,e){let n=e.startContainer,i=e.startOffset,s=e.endContainer,o=e.endOffset,r=t.domAtPos(t.state.selection.anchor);return Sd(r.node,r.offset,s,o)&&([n,i,s,o]=[s,o,n,i]),{anchorNode:n,anchorOffset:i,focusNode:s,focusOffset:o}}function B9e(t,e){if(e.getComposedRanges){let s=e.getComposedRanges(t.root)[0];if(s)return xM(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?xM(t,n):null}function z9e(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 H9e(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}],A2(l)||c.push({node:l.focusNode,offset:l.focusOffset})),Ei&&t.input.lastKeyCode===8)for(let y=o;y>s;y--){let b=i.childNodes[y-1],k=b.pmViewDesc;if(b.nodeName=="BR"&&!k){o=y;break}if(!k||k.size)break}let d=t.state.doc,h=t.someProp("domParser")||p2.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:U9e,context:f});if(c&&c[0].pos!=null){let y=c[0].pos,b=c[1]&&c[1].pos;b==null&&(b=y),p={anchor:y+r,head:b+r}}return{doc:m,sel:p,from:r,to:a}}function U9e(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 j9e=/^(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 W9e(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=o5(t,I);if(L&&!t.state.selection.eq(L)){if(Ei&&Pr&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",V=>V(t,Lu(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=H9e(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=G9e(d.content,c.doc.content,c.from,h,f);if(p&&t.input.domChangeCount++,(ep&&t.input.lastIOSEnter>Date.now()-225||Pr)&&s.some(I=>I.nodeType==1&&!j9e.test(I.nodeName))&&(!p||p.endA>=p.endB)&&t.someProp("handleKeyDown",I=>I(t,Lu(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=SM(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),y=c.doc.resolveNoCache(p.endB-c.from),b=u.resolve(p.start),k=m.sameParent(y)&&m.parent.inlineContent&&b.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(y)&&(C=Ut.findFrom(c.doc.resolve(m.pos+1),1,!0))&&C.head==y.pos)&&t.someProp("handleKeyDown",I=>I(t,Lu(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>p.start&&q9e(u,p.start,p.endA,m,y)&&t.someProp("handleKeyDown",I=>I(t,Lu(8,"Backspace")))){Pr&&Ei&&t.domObserver.suppressSelectionUpdates();return}Ei&&Pr&&p.endB==p.start&&(t.input.lastAndroidDelete=Date.now()),Pr&&!k&&m.start()!=y.start()&&y.parentOffset==0&&m.depth==y.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,y=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(I){return I(t,Lu(13,"Enter"))})},20));let $=p.start,S=p.endA,M,P,T;if(k){if(m.pos==y.pos)po&&Pc<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>ml(t),20)),M=t.state.tr.delete($,S),P=u.resolve(p.start).marksAcross(u.resolve(p.endA));else if(p.endA==p.endB&&(T=Y9e(m.parent.content.cut(m.parentOffset,y.parentOffset),b.parent.content.cut(b.parentOffset,p.endA-b.start()))))M=t.state.tr,T.type=="add"?M.addMark($,S,T.mark):M.removeMark($,S,T.mark);else if(m.parent.child(m.index()).isText&&m.index()==y.index()-(y.textOffset?0:1)){let I=m.parent.textBetween(m.parentOffset,y.parentOffset);if(t.someProp("handleTextInput",L=>L(t,$,S,I)))return;M=t.state.tr.insertText(I,$,S)}}if(M||(M=t.state.tr.replace($,S,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let I=SM(t,M.doc,c.sel);I&&!(Ei&&Pr&&t.composing&&I.empty&&(p.start!=p.endB||t.input.lastAndroidDelete<Date.now()-100)&&(I.head==$||I.head==M.mapping.map(S)-1)||po&&I.empty&&I.head==$)&&M.setSelection(I)}P&&M.ensureMarks(P),o&&M.setMeta("composition",o),t.dispatch(M.scrollIntoView())}function SM(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:r5(t,e.resolve(n.anchor),e.resolve(n.head))}function Y9e(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||y3(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(y3(o,!0,!0));return!r.parent.isTextblock||r.pos>n||y3(r,!0,!1)<n?!1:i.parent.content.cut(i.parentOffset).eq(r.parent.content)}function y3(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 G9e(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&&$M(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&&$M(t.textBetween(o-1,o+1))&&(o+=l?1:-1),r=o+(r-a),a=o}return{start:o,endA:r,endB:a}}function $M(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 X9e{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 p9e,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(PM),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=MM(this),EM(this),this.nodeViews=TM(this),this.docView=aM(this.state.doc,AM(this),_3(this),this.dom,this),this.domObserver=new F9e(this,(i,s,o,r)=>W9e(this,i,s,o,r)),this.domObserver.start(),m9e(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&&mx(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(PM),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&&(ZB(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=TM(this);Z9e(f,this.nodeViews)&&(this.nodeViews=f,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&mx(this),this.editable=MM(this),EM(this);let l=_3(this),c=AM(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&&MSe(this);if(r){this.domObserver.stop();let f=d&&(po||Ei)&&!this.composing&&!s.selection.empty&&!e.selection.empty&&K9e(s.selection,e.selection);if(d){let p=Ei?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=E9e(this)),(o||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=aM(e.doc,c,l,this.dom,this)),p&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&QSe(this))?ml(this,f):(FB(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&&TSe(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&&tM(this,n.getBoundingClientRect(),e)}else tM(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 QB(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&&PSe(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 RSe(this,e)}coordsAtPos(e,n=1){return TB(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 zSe(this,n||this.state,e)}pasteHTML(e,n){return d1(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return d1(this,e,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(g9e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],_3(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,_Se())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return _9e(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&&CSe(this.dom.ownerDocument)==this.dom&&B9e(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function AM(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 EM(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 MM(t){return!t.someProp("editable",e=>e(t.state)===!1)}function K9e(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 TM(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 Z9e(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 PM(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 iz=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},St=(t,e,n)=>(iz(t,e,"read from private field"),n?n.call(t):e.get(t)),Xs=(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)=>(iz(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);function au(t,e){return t.meta={package:"@milkdown/core",group:"System",...e},t}const oz={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"),wm=kn({},"editorState"),b3=kn([],"initTimer"),IM=kn({},"editor"),f1=kn([],"inputRules"),Qr=kn([],"prosePlugins"),p1=kn([],"remarkPlugins"),m1=kn([],"nodeView"),g1=kn([],"markView"),od=kn(KC().use(UC).use(qC),"remark"),hg=kn({handlers:oz},"remarkStringifyOptions"),o_=nu("ConfigReady");function J9e(t){const e=n=>(n.record(o_),async()=>(await t(n),n.done(o_),()=>{n.clearTimer(o_)}));return au(e,{displayName:"Config"}),e}const rd=nu("InitReady");function Q9e(t){const e=n=>(n.inject(IM,t).inject(Qr,[]).inject(p1,[]).inject(f1,[]).inject(m1,[]).inject(g1,[]).inject(hg,{handlers:oz}).inject(od,KC().use(UC).use(qC)).inject(b3,[o_]).record(rd),async()=>{await n.waitTimers(b3);const i=n.get(hg);return n.set(od,KC().use(UC).use(qC,i)),n.done(rd),()=>{n.remove(IM).remove(Qr).remove(p1).remove(f1).remove(m1).remove(g1).remove(hg).remove(od).remove(b3).clearTimer(rd)}});return au(e,{displayName:"Init"}),e}const jr=nu("SchemaReady"),w3=kn([],"schemaTimer"),Wr=kn({},"schema"),pf=kn([],"nodes"),mf=kn([],"marks");function LM(t){var e;return{...t,parseDOM:(e=t.parseDOM)==null?void 0:e.map(n=>({priority:t.priority,...n}))}}const rz=t=>(t.inject(Wr,{}).inject(pf,[]).inject(mf,[]).inject(w3,[rd]).record(jr),async()=>{await t.waitTimers(w3);const e=t.get(od),n=t.get(p1).reduce((r,a)=>r.use(a.plugin,a.options),e);t.set(od,n);const i=Object.fromEntries(t.get(pf).map(([r,a])=>[r,LM(a)])),s=Object.fromEntries(t.get(mf).map(([r,a])=>[r,LM(a)])),o=new pxe({nodes:i,marks:s});return t.set(Wr,o),t.done(jr),()=>{t.remove(Wr).remove(pf).remove(mf).remove(w3).clearTimer(jr)}});au(rz,{displayName:"Schema"});var Dh,$u;let az=class{constructor(){Xs(this,Dh,void 0),Xs(this,$u,void 0),fs(this,Dh,new XF),fs(this,$u,null),this.setCtx=e=>{fs(this,$u,e)}}get ctx(){return St(this,$u)}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,$u)==null)throw HCe();const i=this.get(e)(n),s=St(this,$u).get(Vn);return i(s.state,s.dispatch,s)}};Dh=new WeakMap,$u=new WeakMap;function e7e(t="cmdKey"){return kn(()=>()=>!1,t)}const gn=kn(new az,"commands"),k3=kn([jr],"commandsTimer"),fg=nu("CommandsReady"),lz=t=>{const e=new az;return e.setCtx(t),t.inject(gn,e).inject(k3,[jr]).record(fg),async()=>(await t.waitTimers(k3),t.done(fg),()=>{t.remove(gn).remove(k3).clearTimer(fg)})};au(lz,{displayName:"Commands"});const r_=nu("ParserReady"),cz=()=>{throw B8()},gf=kn(cz,"parser"),C3=kn([],"parserTimer"),uz=t=>(t.inject(gf,cz).inject(C3,[jr]).record(r_),async()=>{await t.waitTimers(C3);const e=t.get(od),n=t.get(Wr);return t.set(gf,G8e.create(n,e)),t.done(r_),()=>{t.remove(gf).remove(C3).clearTimer(r_)}});au(uz,{displayName:"Parser"});const pg=nu("SerializerReady"),x3=kn([],"serializerTimer"),dz=()=>{throw B8()},vf=kn(dz,"serializer"),hz=t=>(t.inject(vf,dz).inject(x3,[jr]).record(pg),async()=>{await t.waitTimers(x3);const e=t.get(od),n=t.get(Wr);return t.set(vf,K8e.create(n,e)),t.done(pg),()=>{t.remove(vf).remove(x3).clearTimer(pg)}});au(hz,{displayName:"Serializer"});const a_=kn("","defaultValue"),l_=kn(t=>t,"stateOptions"),S3=kn([],"editorStateTimer"),c_=nu("EditorStateReady");function t7e(t,e,n){if(typeof t=="string")return e(t);if(t.type==="html")return p2.fromSchema(n).parse(t.dom);if(t.type==="json")return Tc.fromJSON(n,t.value);throw DCe(t)}const n7e=new ps("MILKDOWN_STATE_TRACKER");function s7e(t){const e=$2($5e,t5,mB,gB);return t.Backspace=e,t}const fz=t=>(t.inject(a_,"").inject(wm,{}).inject(l_,e=>e).inject(S3,[r_,pg,fg]).record(c_),async()=>{await t.waitTimers(S3);const e=t.get(Wr),n=t.get(gf),i=t.get(f1),s=t.get(l_),o=t.get(Qr),r=t.get(a_),a=t7e(r,n,e),l=[...o,new rs({key:n7e,state:{init:()=>{},apply:(d,h,f,p)=>{t.set(wm,p)}}}),D5e({rules:i}),kB(s7e(dSe))];t.set(Qr,l);const c=s({schema:e,doc:a,plugins:l}),u=Bu.create(c);return t.set(wm,u),t.done(c_),()=>{t.remove(a_).remove(wm).remove(l_).remove(S3).clearTimer(c_)}});au(fz,{displayName:"EditorState"});const u_=nu("EditorViewReady"),$3=kn([],"editorViewTimer"),mg=kn({},"editorViewOptions"),d_=kn(null,"root"),gx=kn(null,"rootDOM"),vx=kn({},"rootAttrs");function i7e(t,e){const n=document.createElement("div");n.className="milkdown",t.appendChild(n),e.set(gx,n);const i=e.get(vx);return Object.entries(i).forEach(([s,o])=>n.setAttribute(s,o)),n}function o7e(t){t.classList.add("editor"),t.setAttribute("role","textbox")}const r7e=new ps("MILKDOWN_VIEW_CLEAR"),pz=t=>(t.inject(d_,document.body).inject(Vn,{}).inject(mg,{}).inject(gx,null).inject(vx,{}).inject($3,[c_]).record(u_),async()=>{await t.wait(rd);const e=t.get(d_)||document.body,n=typeof e=="string"?document.querySelector(e):e;t.update(Qr,l=>[new rs({key:r7e,view:c=>{const u=n?i7e(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($3);const i=t.get(wm),s=t.get(mg),o=Object.fromEntries(t.get(m1)),r=Object.fromEntries(t.get(g1)),a=new X9e(n,{state:i,nodeViews:o,markViews:r,...s});return o7e(a.dom),t.set(Vn,a),t.done(u_),()=>{a==null||a.destroy(),t.remove(d_).remove(Vn).remove(mg).remove(gx).remove(vx).remove($3).clearTimer(u_)}});au(pz,{displayName:"EditorView"});var Rh,er,tc,km,h_,f_,$o,nc,Vh,p_,Fh,Cm,m_,Au,xm;const a7e=class mz{constructor(){Xs(this,Rh,void 0),Xs(this,er,void 0),Xs(this,tc,void 0),Xs(this,km,void 0),Xs(this,h_,void 0),Xs(this,f_,void 0),Xs(this,$o,void 0),Xs(this,nc,void 0),Xs(this,Vh,void 0),Xs(this,p_,void 0),Xs(this,Fh,void 0),Xs(this,Cm,void 0),Xs(this,m_,void 0),Xs(this,Au,void 0),Xs(this,xm,void 0),fs(this,Rh,!1),fs(this,er,"Idle"),fs(this,tc,[]),fs(this,km,()=>{}),fs(this,h_,new XF),fs(this,f_,new XCe),fs(this,$o,new Map),fs(this,nc,new Map),fs(this,Vh,new GCe(St(this,h_),St(this,f_))),fs(this,p_,()=>{const e=J9e(async i=>{await Promise.all(St(this,tc).map(s=>s(i)))}),n=[rz,uz,hz,lz,fz,pz,Q9e(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,Cm,(e,n=!1)=>Promise.all([e].flat().map(i=>{const s=St(this,$o).get(i),o=s==null?void 0:s.cleanup;return n?St(this,$o).delete(i):St(this,$o).set(i,{ctx:void 0,handler:void 0,cleanup:void 0}),typeof o=="function"?o():o}))),fs(this,m_,async()=>{await Promise.all([...St(this,nc).entries()].map(([e,{cleanup:n}])=>typeof n=="function"?n():n)),St(this,nc).clear()}),fs(this,Au,e=>{fs(this,er,e),St(this,km).call(this,e)}),fs(this,xm,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,km,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,$o).set(i,{ctx:void 0,handler:void 0,cleanup:void 0})}),St(this,er)==="Created"&&St(this,Fh).call(this,n,St(this,$o)),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,Cm).call(this,[e].flat(),!0),this),this.create=async()=>St(this,er)==="OnCreate"?this:(St(this,er)==="Created"&&await this.destroy(),St(this,Au).call(this,"OnCreate"),St(this,p_).call(this),St(this,Fh).call(this,[...St(this,$o).keys()],St(this,$o)),await Promise.all([St(this,xm).call(this,St(this,nc)),St(this,xm).call(this,St(this,$o))].flat()),St(this,Au).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,Au).call(this,"OnDestroy"),await St(this,Cm).call(this,[...St(this,$o).keys()],e),await St(this,m_).call(this),St(this,Au).call(this,"Destroyed"),this),this.action=e=>e(St(this,Vh)),this.inspect=()=>St(this,Rh)?[...St(this,nc).values(),...St(this,$o).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 mz}get ctx(){return St(this,Vh)}get status(){return St(this,er)}};Rh=new WeakMap,er=new WeakMap,tc=new WeakMap,km=new WeakMap,h_=new WeakMap,f_=new WeakMap,$o=new WeakMap,nc=new WeakMap,Vh=new WeakMap,p_=new WeakMap,Fh=new WeakMap,Cm=new WeakMap,m_=new WeakMap,Au=new WeakMap,xm=new WeakMap;let l7e=a7e,c7e=t=>crypto.getRandomValues(new Uint8Array(t)),u7e=(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}}},d7e=(t,e=21)=>u7e(t,e|0,c7e);d7e("abcedfghicklmn",10);function on(t,e){const n=e7e(t),i=s=>async()=>{i.key=n,await s.wait(fg);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 wo(t){const e=n=>async()=>{await n.wait(jr);const i=t(n);return n.update(f1,s=>[...s,i]),e.inputRule=i,()=>{n.update(f1,s=>s.filter(o=>o!==i))}};return e}function h7e(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(Wr).marks[t];if(!s)throw UCe(t);return s},n}function h5(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(Wr).nodes[t];if(!s)throw qF(t);return s},n}function Ls(t){let e;const n=i=>async()=>(await i.wait(jr),e=t(i),i.update(Qr,s=>[...s,e]),()=>{i.update(Qr,s=>s.filter(o=>o!==e))});return n.plugin=()=>e,n.key=()=>e.spec.key,n}function f7e(t){const e=n=>async()=>{await n.wait(jr);const i=t(n),s=kB(i);return n.update(Qr,o=>[...o,s]),e.keymap=i,()=>{n.update(Qr,o=>o.filter(r=>r!==s))}};return e}function gz(t,e){const n=i=>async()=>{await i.wait(jr);const s=e(i);return t.type(i)instanceof Ry?i.update(m1,o=>[...o,[t.id,s]]):i.update(g1,o=>[...o,[t.id,s]]),n.view=s,n.type=t,()=>{t.type(i)instanceof Ry?i.update(m1,o=>o.filter(r=>r[0]!==t.id)):i.update(g1,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 zs(t,e){const n=ms(e,t),i=h5(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 ov(t,e){const n=ms(e,t),i=h7e(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 ko(t,e){const n=Object.fromEntries(Object.entries(e).map(([r,{shortcuts:a}])=>[r,a])),i=ms(n,`${t}Keymap`),s=f7e(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 aa=(t,e=()=>({}))=>ms(e,`${t}Attr`),rv=(t,e=()=>({}))=>ms(e,`${t}Attr`);function Gd(t,e,n){const i=ms(n??{},t),s=r=>async()=>{await r.wait(rd);const a={plugin:e(r),options:r.get(i.key)};return r.update(p1,l=>[...l,a]),()=>{r.update(p1,l=>l.filter(c=>c!==a))}},o=[i,s];return o.id=t,o.plugin=s,o.options=i,o}function p7e(){return t=>{const e=t.get(Vn);return t.get(vf)(e.state.doc)}}function m7e(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(Wr),r=n.get(l_),a=n.get(Qr),l=Bu.create({schema:o,doc:s,plugins:a,...r});i.updateState(l)}}function T2(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const g7e=[["ß","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"]],v7e=(t,e)=>{for(const[n,i]of e)t=t.replace(new RegExp(T2(n),"g"),i);return t};function _7e(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={customReplacements:[],...e};const n=new Map([...g7e,...e.customReplacements]);return t=t.normalize(),t=v7e(t,n),t=t.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),t}const y7e=[["&"," and "],["🦄"," unicorn "],["♥"," love "]],b7e=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"),w7e=(t,e)=>{const n=T2(e);return t.replace(new RegExp(`${n}{2,}`,"g"),e).replace(new RegExp(`^${n}|${n}$`,"g"),"")},k7e=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+=T2(n)}return new RegExp(`[^${e}]+`,"g")};function C7e(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([...y7e,...e.customReplacements]);t=_7e(t,{customReplacements:s}),e.decamelize&&(t=b7e(t));const o=k7e(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=w7e(t,e.separator)),n&&(t=`_${t}`),i&&(t=`${t}-`),t}function x7e(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 b=s.depth-h;b>=s.depth-3;b--)d=st.from(s.node(b).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)),y=-1;m.doc.nodesBetween(p,m.doc.content.size,(b,k)=>{if(y>-1)return!1;b.isTextblock&&b.content.size==0&&(y=k+1)}),y>-1&&m.setSelection(Ut.near(m.doc.resolve(y))),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 cg(c.doc,s.pos,2,u)?(i&&i(c.split(s.pos,2,u).scrollIntoView()),!0):!1}}function vz(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?S7e(e,n,t,o):$7e(e,n,o):!0:!1}}function S7e(t,e,n,i){let s=t.tr,o=i.end,r=i.$to.end(i.depth);o<r&&(s.step(new Ti(o-1,r,o,r,new rt(st.from(n.create(null,i.parent.copy())),1,0),1,!0)),i=new iN(s.doc.resolve(i.$from.pos),s.doc.resolve(r),i.depth));const a=y2(i);if(a==null)return!1;s.lift(i,a);let l=s.mapping.map(o,-1)-1;return b2(s.doc,l)&&s.join(l),e(s.scrollIntoView()),!0}function $7e(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 Ti(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 A7e(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 Ti(h-(c?3:1),f,h,f,d,1,!0)).scrollIntoView())}return!0}}function E7e(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=OM(i.identifier);s&&!e.get(s)&&e.set(s,i)}),n;function n(i){const s=OM(i);return e.get(s)}}function OM(t){return String(t||"").toUpperCase()}function M7e(){return function(t){const e=E7e(t);qd(t,function(n,i,s){if(n.type==="definition"&&s!==void 0&&typeof i=="number")return s.children.splice(i,1),[YC,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},[YC,i]}})}}function _z(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 f5=rv("emphasis");Ve(f5,{displayName:"Attr<emphasis>",group:"Emphasis"});const Xd=ov("emphasis",t=>({attrs:{marker:{default:t.get(hg).emphasis||"*"}},parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:e=>e==="italic"}],toDOM:e=>["em",t.get(f5.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 P2=on("ToggleEmphasis",t=>()=>S2(Xd.type(t)));Ve(P2,{displayName:"Command<toggleEmphasisCommand>",group:"Emphasis"});const yz=wo(t=>tv(/(?:^|[^*])\*([^*]+)\*$/,Xd.type(t),{getAttr:()=>({marker:"*"}),updateCaptured:({fullMatch:e,start:n})=>e.startsWith("*")?{}:{fullMatch:e.slice(1),start:n+1}}));Ve(yz,{displayName:"InputRule<emphasis>|Star",group:"Emphasis"});const bz=wo(t=>tv(/(?:^|[^_])_([^_]+)_$/,Xd.type(t),{getAttr:()=>({marker:"_"}),updateCaptured:({fullMatch:e,start:n})=>e.startsWith("_")?{}:{fullMatch:e.slice(1),start:n+1}}));Ve(bz,{displayName:"InputRule<emphasis>|Underscore",group:"Emphasis"});const p5=ko("emphasisKeymap",{ToggleEmphasis:{shortcuts:"Mod-i",command:t=>{const e=t.get(gn);return()=>e.call(P2.key)}}});Ve(p5.ctx,{displayName:"KeymapCtx<emphasis>",group:"Emphasis"});Ve(p5.shortcuts,{displayName:"Keymap<emphasis>",group:"Emphasis"});const m5=rv("strong");Ve(m5,{displayName:"Attr<strong>",group:"Strong"});const vp=ov("strong",t=>({attrs:{marker:{default:t.get(hg).strong||"*"}},parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-style",getAttrs:e=>e==="bold"}],toDOM:e=>["strong",t.get(m5.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(vp.mark,{displayName:"MarkSchema<strong>",group:"Strong"});Ve(vp.ctx,{displayName:"MarkSchemaCtx<strong>",group:"Strong"});const I2=on("ToggleStrong",t=>()=>S2(vp.type(t)));Ve(I2,{displayName:"Command<toggleStrongCommand>",group:"Strong"});const wz=wo(t=>tv(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,vp.type(t),{getAttr:e=>({marker:e[0].startsWith("*")?"*":"_"})}));Ve(wz,{displayName:"InputRule<strong>",group:"Strong"});const g5=ko("strongKeymap",{ToggleBold:{shortcuts:["Mod-b"],command:t=>{const e=t.get(gn);return()=>e.call(I2.key)}}});Ve(g5.ctx,{displayName:"KeymapCtx<strong>",group:"Strong"});Ve(g5.shortcuts,{displayName:"Keymap<strong>",group:"Strong"});const v5=rv("inlineCode");Ve(v5,{displayName:"Attr<inlineCode>",group:"InlineCode"});const ll=ov("inlineCode",t=>({priority:100,code:!0,inclusive:!1,parseDOM:[{tag:"code"}],toDOM:e=>["code",t.get(v5.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 L2=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(L2,{displayName:"Command<toggleInlineCodeCommand>",group:"InlineCode"});const kz=wo(t=>tv(/(?:\`)([^\`]+)(?:\`)$/,ll.type(t)));Ve(kz,{displayName:"InputRule<inlineCodeInputRule>",group:"InlineCode"});const _5=ko("inlineCodeKeymap",{ToggleInlineCode:{shortcuts:"Mod-e",command:t=>{const e=t.get(gn);return()=>e.call(L2.key)}}});Ve(_5.ctx,{displayName:"KeymapCtx<inlineCode>",group:"InlineCode"});Ve(_5.shortcuts,{displayName:"Keymap<inlineCode>",group:"InlineCode"});const y5=rv("link");Ve(y5,{displayName:"Attr<link>",group:"Link"});const Yr=ov("link",t=>({attrs:{href:{},title:{default:null}},parseDOM:[{tag:"a[href]",getAttrs:e=>{if(!(e instanceof HTMLElement))throw ra(e);return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM:e=>["a",{...t.get(y5.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(Yr.mark,{displayName:"MarkSchema<link>",group:"Link"});const Cz=on("ToggleLink",t=>(e={})=>S2(Yr.type(t),e));Ve(Cz,{displayName:"Command<toggleLinkCommand>",group:"Link"});const xz=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(Yr.type(t).isInSet(p.marks))return s=p,o=m,!1}),!s)return!1;const c=s.marks.find(({type:p})=>p===Yr.type(t));if(!c)return!1;const u=o,d=o+s.nodeSize,{tr:h}=n,f=Yr.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(xz,{displayName:"Command<updateLinkCommand>",group:"Link"});const Sz=h5("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(Sz,{displayName:"NodeSchema<doc>",group:"Doc"});const b5=aa("paragraph");Ve(b5,{displayName:"Attr<paragraph>",group:"Paragraph"});const Ol=zs("paragraph",t=>({content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:e=>["p",t.get(b5.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"),_z(e,n),e.closeNode()}}}));Ve(Ol.node,{displayName:"NodeSchema<paragraph>",group:"Paragraph"});Ve(Ol.ctx,{displayName:"NodeSchemaCtx<paragraph>",group:"Paragraph"});const w5=on("TurnIntoText",t=>()=>l1(Ol.type(t)));Ve(w5,{displayName:"Command<turnIntoTextCommand>",group:"Paragraph"});const k5=ko("paragraphKeymap",{TurnIntoText:{shortcuts:"Mod-Alt-0",command:t=>{const e=t.get(gn);return()=>e.call(w5.key)}}});Ve(k5.ctx,{displayName:"KeymapCtx<paragraph>",group:"Paragraph"});Ve(k5.shortcuts,{displayName:"Keymap<paragraph>",group:"Paragraph"});const T7e=Array(6).fill(0).map((t,e)=>e+1);function P7e(t){return C7e(t.textContent)}const O2=ms(P7e,"headingIdGenerator");Ve(O2,{displayName:"Ctx<HeadingIdGenerator>",group:"Heading"});const C5=aa("heading");Ve(C5,{displayName:"Attr<heading>",group:"Heading"});const $a=zs("heading",t=>{const e=t.get(O2.key);return{content:"inline*",group:"block",defining:!0,attrs:{id:{default:""},level:{default:1}},parseDOM:T7e.map(n=>({tag:`h${n}`,getAttrs:i=>{if(!(i instanceof HTMLElement))throw ra(i);return{level:n,id:i.id}}})),toDOM:n=>[`h${n.attrs.level}`,{...t.get(C5.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}),_z(n,i),n.closeNode()}}}});Ve($a.node,{displayName:"NodeSchema<heading>",group:"Heading"});Ve($a.ctx,{displayName:"NodeSchemaCtx<heading>",group:"Heading"});const $z=wo(t=>cB(/^(?<hashes>#+)\s$/,$a.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($z,{displayName:"InputRule<wrapInHeadingInputRule>",group:"Heading"});const fc=on("WrapInHeading",t=>e=>(e??(e=1),e<1?l1(Ol.type(t)):l1($a.type(t),{level:e})));Ve(fc,{displayName:"Command<wrapInHeadingCommand>",group:"Heading"});const x5=on("DowngradeHeading",t=>()=>(e,n,i)=>{const{$from:s}=e.selection,o=s.node();if(o.type!==$a.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):l1(Ol.type(t))(e,n,i)});Ve(x5,{displayName:"Command<downgradeHeadingCommand>",group:"Heading"});const S5=ko("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(x5.key)}}});Ve(S5.ctx,{displayName:"KeymapCtx<heading>",group:"Heading"});Ve(S5.shortcuts,{displayName:"Keymap<heading>",group:"Heading"});const $5=aa("blockquote");Ve($5,{displayName:"Attr<blockquote>",group:"Blockquote"});const _p=zs("blockquote",t=>({content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:e=>["blockquote",t.get($5.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(_p.node,{displayName:"NodeSchema<blockquote>",group:"Blockquote"});Ve(_p.ctx,{displayName:"NodeSchemaCtx<blockquote>",group:"Blockquote"});const Az=wo(t=>J8(/^\s*>\s$/,_p.type(t)));Ve(Az,{displayName:"InputRule<wrapInBlockquoteInputRule>",group:"Blockquote"});const A5=on("WrapInBlockquote",t=>()=>s5(_p.type(t)));Ve(A5,{displayName:"Command<wrapInBlockquoteCommand>",group:"Blockquote"});const E5=ko("blockquoteKeymap",{WrapInBlockquote:{shortcuts:"Mod-Shift-b",command:t=>{const e=t.get(gn);return()=>e.call(A5.key)}}});Ve(E5.ctx,{displayName:"KeymapCtx<blockquote>",group:"Blockquote"});Ve(E5.shortcuts,{displayName:"Keymap<blockquote>",group:"Blockquote"});const M5=aa("codeBlock",()=>({pre:{},code:{}}));Ve(M5,{displayName:"Attr<codeBlock>",group:"CodeBlock"});const yp=zs("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 ra(e);return{language:e.dataset.language}}}],toDOM:e=>{const n=t.get(M5.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(yp.node,{displayName:"NodeSchema<codeBlock>",group:"CodeBlock"});Ve(yp.ctx,{displayName:"NodeSchemaCtx<codeBlock>",group:"CodeBlock"});const Ez=wo(t=>cB(/^```(?<language>[a-z]*)?[\s\n]$/,yp.type(t),e=>{var n;return{language:((n=e.groups)==null?void 0:n.language)??""}}));Ve(Ez,{displayName:"InputRule<createCodeBlockInputRule>",group:"CodeBlock"});const T5=on("CreateCodeBlock",t=>(e="")=>l1(yp.type(t),{language:e}));Ve(T5,{displayName:"Command<createCodeBlockCommand>",group:"CodeBlock"});const I7e=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(I7e,{displayName:"Command<updateCodeBlockLanguageCommand>",group:"CodeBlock"});const P5=ko("codeBlockKeymap",{CreateCodeBlock:{shortcuts:"Mod-Alt-c",command:t=>{const e=t.get(gn);return()=>e.call(T5.key)}}});Ve(P5.ctx,{displayName:"KeymapCtx<codeBlock>",group:"CodeBlock"});Ve(P5.shortcuts,{displayName:"Keymap<codeBlock>",group:"CodeBlock"});const I5=aa("image");Ve(I5,{displayName:"Attr<image>",group:"Image"});const Kd=zs("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 ra(e);return{src:e.getAttribute("src")||"",alt:e.getAttribute("alt")||"",title:e.getAttribute("title")||e.getAttribute("alt")||""}}}],toDOM:e=>["img",{...t.get(I5.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 Mz=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(Mz,{displayName:"Command<insertImageCommand>",group:"Image"});const Tz=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(Tz,{displayName:"Command<updateImageCommand>",group:"Image"});const L7e=wo(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(L7e,{displayName:"InputRule<insertImageInputRule>",group:"Image"});const qy=aa("hardbreak",t=>({"data-type":"hardbreak","data-is-inline":t.attrs.isInline}));Ve(qy,{displayName:"Attr<hardbreak>",group:"Hardbreak"});const ad=zs("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(qy.key)(e)," "]:["br",t.get(qy.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(ad.node,{displayName:"NodeSchema<hardbreak>",group:"Hardbreak"});Ve(ad.ctx,{displayName:"NodeSchemaCtx<hardbreak>",group:"Hardbreak"});const L5=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(ad.type(t).create()).scrollIntoView()),!0});Ve(L5,{displayName:"Command<insertHardbreakCommand>",group:"Hardbreak"});const O5=ko("hardbreakKeymap",{InsertHardbreak:{shortcuts:"Shift-Enter",command:t=>{const e=t.get(gn);return()=>e.call(L5.key)}}});Ve(O5.ctx,{displayName:"KeymapCtx<hardbreak>",group:"Hardbreak"});Ve(O5.shortcuts,{displayName:"Keymap<hardbreak>",group:"Hardbreak"});const D5=aa("hr");Ve(D5,{displayName:"Attr<hr>",group:"Hr"});const bp=zs("hr",t=>({group:"block",parseDOM:[{tag:"hr"}],toDOM:e=>["hr",t.get(D5.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(bp.node,{displayName:"NodeSchema<hr>",group:"Hr"});Ve(bp.ctx,{displayName:"NodeSchemaCtx<hr>",group:"Hr"});const Pz=wo(t=>new Go(/^(?:---|___\s|\*\*\*\s)$/,(e,n,i,s)=>{const{tr:o}=e;return n[0]&&o.replaceWith(i-1,s,bp.type(t).create()),o}));Ve(Pz,{displayName:"InputRule<insertHrInputRule>",group:"Hr"});const Iz=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=bp.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(Iz,{displayName:"Command<insertHrCommand>",group:"Hr"});const R5=aa("bulletList");Ve(R5,{displayName:"Attr<bulletList>",group:"BulletList"});const Zd=zs("bullet_list",t=>({content:"listItem+",group:"block",attrs:{spread:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>{if(!(e instanceof HTMLElement))throw ra(e);return{spread:e.dataset.spread}}}],toDOM:e=>["ul",{...t.get(R5.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 Lz=wo(t=>J8(/^\s*([-+*])\s$/,Zd.type(t)));Ve(Lz,{displayName:"InputRule<wrapInBulletListInputRule>",group:"BulletList"});const V5=on("WrapInBulletList",t=>()=>s5(Zd.type(t)));Ve(V5,{displayName:"Command<wrapInBulletListCommand>",group:"BulletList"});const F5=ko("bulletListKeymap",{WrapInBulletList:{shortcuts:"Mod-Alt-8",command:t=>{const e=t.get(gn);return()=>e.call(V5.key)}}});Ve(F5.ctx,{displayName:"KeymapCtx<bulletListKeymap>",group:"BulletList"});Ve(F5.shortcuts,{displayName:"Keymap<bulletListKeymap>",group:"BulletList"});const N5=aa("orderedList");Ve(N5,{displayName:"Attr<orderedList>",group:"OrderedList"});const Jd=zs("ordered_list",t=>({content:"listItem+",group:"block",attrs:{order:{default:1},spread:{default:!1}},parseDOM:[{tag:"ol",getAttrs:e=>{if(!(e instanceof HTMLElement))throw ra(e);return{spread:e.dataset.spread,order:e.hasAttribute("start")?Number(e.getAttribute("start")):1}}}],toDOM:e=>["ol",{...t.get(N5.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 Oz=wo(t=>J8(/^\s*(\d+)\.\s$/,Jd.type(t),e=>({order:Number(e[1])}),(e,n)=>n.childCount+n.attrs.order===Number(e[1])));Ve(Oz,{displayName:"InputRule<wrapInOrderedListInputRule>",group:"OrderedList"});const B5=on("WrapInOrderedList",t=>()=>s5(Jd.type(t)));Ve(B5,{displayName:"Command<wrapInOrderedListCommand>",group:"OrderedList"});const z5=ko("orderedListKeymap",{WrapInOrderedList:{shortcuts:"Mod-Alt-7",command:t=>{const e=t.get(gn);return()=>e.call(B5.key)}}});Ve(z5.ctx,{displayName:"KeymapCtx<orderedList>",group:"OrderedList"});Ve(z5.shortcuts,{displayName:"Keymap<orderedList>",group:"OrderedList"});const H5=aa("listItem");Ve(H5,{displayName:"Attr<listItem>",group:"ListItem"});const Da=zs("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 ra(e);return{label:e.dataset.label,listType:e.dataset.listType,spread:e.dataset.spread}}}],toDOM:e=>["li",{...t.get(H5.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(Da.node,{displayName:"NodeSchema<listItem>",group:"ListItem"});Ve(Da.ctx,{displayName:"NodeSchemaCtx<listItem>",group:"ListItem"});const U5=on("SinkListItem",t=>()=>A7e(Da.type(t)));Ve(U5,{displayName:"Command<sinkListItemCommand>",group:"ListItem"});const j5=on("LiftListItem",t=>()=>vz(Da.type(t)));Ve(j5,{displayName:"Command<liftListItemCommand>",group:"ListItem"});const W5=on("SplitListItem",t=>()=>x7e(Da.type(t)));Ve(W5,{displayName:"Command<splitListItemCommand>",group:"ListItem"});function O7e(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!==Da.type(t)||a.firstChild!==r.node()||r.node(-2).childCount>1?!1:vz(Da.type(t))(e,n,i)}}const Y5=on("LiftFirstListItem",t=>()=>O7e(t));Ve(Y5,{displayName:"Command<liftFirstListItemCommand>",group:"ListItem"});const q5=ko("listItemKeymap",{NextListItem:{shortcuts:"Enter",command:t=>{const e=t.get(gn);return()=>e.call(W5.key)}},SinkListItem:{shortcuts:["Tab","Mod-]"],command:t=>{const e=t.get(gn);return()=>e.call(U5.key)}},LiftListItem:{shortcuts:["Shift-Tab","Mod-["],command:t=>{const e=t.get(gn);return()=>e.call(j5.key)}},LiftFirstListItem:{shortcuts:["Backspace","Delete"],command:t=>{const e=t.get(gn);return()=>e.call(Y5.key)}}});Ve(q5.ctx,{displayName:"KeymapCtx<listItem>",group:"ListItem"});Ve(q5.shortcuts,{displayName:"Keymap<listItem>",group:"ListItem"});const Dz=h5("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(Dz,{displayName:"NodeSchema<text>",group:"Text"});const G5=aa("html");Ve(G5,{displayName:"Attr<html>",group:"Html"});const X5=zs("html",t=>({atom:!0,group:"inline",inline:!0,attrs:{value:{default:""}},toDOM:e=>{const n=document.createElement("span"),i={...t.get(G5.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(X5.node,{displayName:"NodeSchema<html>",group:"Html"});Ve(X5.ctx,{displayName:"NodeSchemaCtx<html>",group:"Html"});const D7e=[Sz,b5,Ol,O2,C5,$a,qy,ad,$5,_p,M5,yp,D5,bp,I5,Kd,R5,Zd,N5,Jd,H5,Da,f5,Xd,m5,vp,v5,ll,y5,Yr,G5,X5,Dz].flat(),R7e=[Az,Lz,Oz,Ez,Pz,$z].flat(),V7e=[yz,bz,kz,wz],F7e=[w5,A5,fc,x5,T5,L5,Iz,Mz,Tz,B5,V5,U5,W5,j5,Y5,P2,L2,I2,Cz,xz],N7e=[E5,P5,O5,S5,q5,z5,F5,k5,p5,_5,g5].flat(),K5=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(K5.plugin,{displayName:"Remark<remarkAddOrderInListPlugin>",group:"Remark"});Ve(K5.options,{displayName:"RemarkConfig<remarkAddOrderInListPlugin>",group:"Remark"});const Z5=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(Z5.plugin,{displayName:"Remark<remarkLineBreak>",group:"Remark"});Ve(Z5.options,{displayName:"RemarkConfig<remarkLineBreak>",group:"Remark"});const J5=Gd("remarkInlineLink",()=>M7e);Ve(J5.plugin,{displayName:"Remark<remarkInlineLinkPlugin>",group:"Remark"});Ve(J5.options,{displayName:"RemarkConfig<remarkInlineLinkPlugin>",group:"Remark"});const B7e=t=>!!t.children,z7e=t=>t.type==="html";function H7e(t,e){return n(t,0,null)[0];function n(i,s,o){if(B7e(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 Q5=Gd("remarkHTMLTransformer",()=>()=>t=>{H7e(t,(e,n,i)=>z7e(e)?((i==null?void 0:i.type)==="root"&&(e.children=[{...e}],delete e.value,e.type="paragraph"),[e]):[e])});Ve(Q5.plugin,{displayName:"Remark<remarkHtmlTransformer>",group:"Remark"});Ve(Q5.options,{displayName:"RemarkConfig<remarkHtmlTransformer>",group:"Remark"});const eS=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(eS.plugin,{displayName:"Remark<remarkMarker>",group:"Remark"});Ve(eS.options,{displayName:"RemarkConfig<remarkMarker>",group:"Remark"});const Rz=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(Rz,{displayName:"Prose<inlineNodesCursorPlugin>",group:"Prose"});const Vz=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 ti))return;const{from:r}=o;return i.tr.setNodeMarkup(r,ad.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===ad.type(t)&&(r=r.setNodeMarkup(u,ad.type(t),void 0,[]))}),r}}}));Ve(Vz,{displayName:"Prose<hardbreakClearMarkPlugin>",group:"Prose"});const tS=ms(["table","code_block"],"hardbreakFilterNodes");Ve(tS,{displayName:"Ctx<hardbreakFilterNodes>",group:"Prose"});const Fz=Ls(t=>{const e=t.get(tS.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(Fz,{displayName:"Prose<hardbreakFilterPlugin>",group:"Prose"});const Nz=Ls(t=>{const e=new ps("MILKDOWN_HEADING_ID"),n=i=>{if(i.composing)return;const s=t.get(O2.key),o=i.state.tr.setMeta("addToHistory",!1);let r=!1;i.state.doc.descendants((a,l)=>{if(a.type===$a.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(Nz,{displayName:"Prose<syncHeadingIdPlugin>",group:"Prose"});const Bz=Ls(t=>{const e=n=>{if(n.composing||!n.editable)return;const i=Jd.type(t),s=Zd.type(t),o=Da.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,y,b,k)=>{if(m.type===o){const C={...m.attrs};a(C,k)&&(l=l.setNodeMarkup(y,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(Bz,{displayName:"Prose<syncListOrderPlugin>",group:"Prose"});const U7e=[Vz,tS,Fz,Rz,K5,J5,Z5,Q5,eS,Nz,Bz].flat(),j7e=[D7e,R7e,V7e,F7e,N7e,U7e].flat();var _x,yx;if(typeof WeakMap<"u"){let t=new WeakMap;_x=e=>t.get(e),yx=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;_x=i=>{for(let s=0;s<t.length;s+=2)if(t[s]==i)return t[s+1]},yx=(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 _x(t)||yx(t,W7e(t))}};function W7e(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=Y7e(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:y,rowspan:b,colwidth:k}=m.attrs;for(let C=0;C<b;C++){if(C+c>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:b-C});break}const $=s+C*e;for(let S=0;S<y;S++){i[$+S]==0?i[$+S]=u:(o||(o=[])).push({type:"collision",row:c,pos:u,n:y-S});const M=k&&k[S];if(M){const P=($+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+=y,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 Y7e(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=G7e(l)))[c]=d)}a&&t.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}function G7e(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function DM(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 RM(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 X7e(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=>DM(i,e)}],toDOM(i){return["td",RM(i,e),0]}},table_header:{content:t.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:i=>DM(i,e)}],toDOM(i){return["th",RM(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 av(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 Er(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 D2(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=av(e.$head)||K7e(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function K7e(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 bx(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function Z7e(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function nS(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function zz(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 Ad(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 J7e(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 Q7e(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 zy(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(bx(i)&&bx(s)&&nS(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,y=f.right-s.right;if(m>0||y>0){let b=p.attrs;if(m>0&&(b=Ad(b,0,m)),y>0&&(b=Ad(b,b.colspan-y,y)),f.left<s.left){if(p=p.type.createAndFill(b),!p)throw RangeError(`Could not create cell with attrs ${JSON.stringify(b)}`)}else p=p.type.create(b,p.content)}if(f.top<s.top||f.bottom>s.bottom){const b={...p.attrs,rowspan:Math.min(f.bottom,s.bottom)-Math.max(f.top,s.top)};f.top<s.top?p=p.type.createAndFill(b):p=p.type.create(b,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 e$e(this.$anchorCell.pos,this.$headCell.pos)}};as.prototype.visible=!1;Ut.jsonID("cell",as);var e$e=class Hz{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Hz(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&&nS(n,i)?new as(n,i):Ut.near(i,1)}};function t$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 n$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 s$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 i$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&&n$e(i)?o=Ot.create(s,i.from):i instanceof Ot&&s$e(i)&&(o=Ot.create(s,i.$from.start(),i.$from.end()));return o&&(e||(e=t.tr)).setSelection(o),e}var o$e=new ps("fix-tables");function Uz(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)?Uz(t.child(a),l,n+1,i):l.nodesBetween(0,l.content.size,i,n+1),n+=l.nodeSize}}function r$e(t,e){let n;const i=(s,o)=>{s.type.spec.tableRole=="table"&&(n=a$e(t,s,o,n))};return e?e.doc!=t.doc&&Uz(e.doc,t.doc,0,i):t.doc.descendants(i),n}function a$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,Ad(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 y=0;y<h;y++){const b=Cr(t.schema)[f].createAndFill();b&&p.push(b)}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(o$e,{fixTables:!0})}function lu(t){const e=t.selection,n=D2(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 jz(t,{map:e,tableStart:n,table:i},s){let o=s>0?-1:0;Q7e(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,J7e(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 l$e(t,e){if(!Er(t))return!1;if(e){const n=lu(t);e(jz(t.tr,n,n.left))}return!0}function c$e(t,e){if(!Er(t))return!1;if(e){const n=lu(t);e(jz(t.tr,n,n.right))}return!0}function u$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,Ad(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 d$e(t,e){if(!Er(t))return!1;if(e){const n=lu(t),i=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let s=n.right-1;u$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 h$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 f$e(t,e){if(!Er(t))return!1;if(e){const n=lu(t),i=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let s=n.bottom-1;h$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 p$e(t,e){return function(n,i){if(!Er(n))return!1;const s=D2(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 m$e(t){return function(e,n){if(!Er(e))return!1;if(n){const i=Cr(e.schema),s=lu(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 VM(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 sS(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?m$e(t):function(n,i){if(!Er(n))return!1;if(i){const s=Cr(n.schema),o=lu(n),r=n.tr,a=VM("row",o,s),l=VM("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}}sS("row",{useDeprecatedLogic:!0});sS("column",{useDeprecatedLogic:!0});sS("cell",{useDeprecatedLogic:!0});function g$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 Wz(t){return function(e,n){if(!Er(e))return!1;const i=g$e(D2(e),t);if(i==null)return!1;if(n){const s=e.doc.resolve(i);n(e.tr.setSelection(Ot.between(s,Z7e(s))).scrollIntoView())}return!0}}function v$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 d0(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 _$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=wx(Cr(r).row,new rt(c,u,d)).content),a.push(c)}else if(o=="cell"||o=="header_cell")a.push(n||i?wx(Cr(r).row,new rt(e,n,i)).content:e);else return null;return y$e(r,a)}function y$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 wx(t,e){const n=t.createAndFill();return new rB(n).replace(0,n.content.size,e).doc}function b$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(Ad(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 w$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 y=e.width;y<s;y++)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 y=p>=e.width?!1:n.nodeAt(e.map[m+p]).type==l.header_cell;d.push(y?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 FM(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 NM(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,Ad(h.attrs,r-f,h.attrs.colspan-(r-f))),t.insert(p+h.nodeSize,h.type.createAndFill(Ad(h.attrs,0,r-f))),c+=h.attrs.rowspan-1}}return l}function BM(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}w$e(d,r,o,n,c,u,h)&&f(),FM(d,r,o,n,l,c,a,h)&&f(),FM(d,r,o,n,l,c,u,h)&&f(),NM(d,r,o,n,a,u,l,h)&&f(),NM(d,r,o,n,a,u,c,h)&&f();for(let p=a;p<u;p++){const m=r.positionAt(p,l,o),y=r.positionAt(p,c,o);d.replace(d.mapping.slice(h).map(m+n),d.mapping.slice(h).map(y+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 k$e=CB({ArrowLeft:h0("horiz",-1),ArrowRight:h0("horiz",1),ArrowUp:h0("vert",-1),ArrowDown:h0("vert",1),"Shift-ArrowLeft":f0("horiz",-1),"Shift-ArrowRight":f0("horiz",1),"Shift-ArrowUp":f0("vert",-1),"Shift-ArrowDown":f0("vert",1),Backspace:d0,"Mod-Backspace":d0,Delete:d0,"Mod-Delete":d0});function g_(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function h0(t,e){return(n,i,s)=>{if(!s)return!1;const o=n.selection;if(o instanceof as)return g_(n,i,Ut.near(o.$headCell,e));if(t!="horiz"&&!o.empty)return!1;const r=Yz(s,t,e);if(r==null)return!1;if(t=="horiz")return g_(n,i,Ut.near(n.doc.resolve(o.head+e),e));{const a=n.doc.resolve(r),l=zz(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),g_(n,i,c)}}}function f0(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=Yz(s,t,e);if(l==null)return!1;r=new as(n.doc.resolve(l))}const a=zz(r.$headCell,t,e);return a?g_(n,i,new as(r.$anchorCell,a)):!1}}function C$e(t,e){const n=t.state.doc,i=av(n.resolve(e));return i?(t.dispatch(t.state.tr.setSelection(new as(i))),!0):!1}function x$e(t,e,n){if(!Er(t.state))return!1;let i=_$e(n);const s=t.state.selection;if(s instanceof as){i||(i={width:1,height:1,rows:[st.from(wx(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=b$e(i,a.right-a.left,a.bottom-a.top),BM(t.state,t.dispatch,r,a,i),!0}else if(i){const o=D2(t.state),r=o.start(-1);return BM(t.state,t.dispatch,r,Pn.get(o.node(-1)).findCell(o.pos-r),i),!0}else return!1}function S$e(t,e){var n;if(e.ctrlKey||e.metaKey)return;const i=zM(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=av(t.state.selection.$anchor))!=null&&((n=A3(t,e))==null?void 0:n.pos)!=s.pos)o(s,e),e.preventDefault();else if(!i)return;function o(l,c){let u=A3(t,c);const d=vc.getState(t.state)==null;if(!u||!nS(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(zM(t,c.target)!=i&&(d=A3(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 Yz(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 zM(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function A3(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?av(t.state.doc.resolve(n.pos)):null}var $$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")),kx(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,kx(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function kx(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 y=s==h?o:p&&p[m],b=y?y+"px":"";a+=y||i,y||(l=!1),c?(c.style.width!=b&&(c.style.width=b),c=c.nextSibling):e.appendChild(document.createElement("col")).style.width=b}}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 A$e({handleWidth:t=5,cellMinWidth:e=25,View:n=$$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 E$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)=>{M$e(o,r,t,e,i)},mouseleave:o=>{T$e(o)},mousedown:(o,r)=>{P$e(o,r,e)}},decorations:o=>{const r=lr.getState(o);if(r&&r.activeHandle>-1)return V$e(o,r.activeHandle)},nodeViews:{}}});return s}var E$e=class v_{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 v_(i.setHandle,!1);if(i&&i.setDragging!==void 0)return new v_(n.activeHandle,i.setDragging);if(n.activeHandle>-1&&e.docChanged){let s=e.mapping.map(n.activeHandle,-1);return bx(e.doc.resolve(s))||(s=-1),new v_(s,n.dragging)}return n}};function M$e(t,e,n,i,s){const o=lr.getState(t.state);if(o&&!o.dragging){const r=L$e(e.target);let a=-1;if(r){const{left:l,right:c}=r.getBoundingClientRect();e.clientX-l<=n?a=HM(t,e,"left",n):c-e.clientX<=n&&(a=HM(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}qz(t,a)}}}function T$e(t){const e=lr.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&qz(t,-1)}function P$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=I$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&&(O$e(t,d.activeHandle,UM(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=UM(d.dragging,u,n);D$e(t,d.activeHandle,h,n)}}return s.addEventListener("mouseup",l),s.addEventListener("mousemove",c),e.preventDefault(),!0}function I$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 L$e(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function HM(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=av(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 UM(t,e,n){const i=e.clientX-t.startX;return Math.max(n,t.startWidth+i)}function qz(t,e){t.dispatch(t.state.tr.setMeta(lr,{setHandle:e}))}function O$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():R$e(h.colspan);p[f]=n,l.setNodeMarkup(r+d,null,{...h,colwidth:p})}l.docChanged&&t.dispatch(l)}function D$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&&kx(o,l.firstChild,l,i,a,n)}function R$e(t){return Array(t).fill(0)}function V$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 F$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:t$e,handleDOMEvents:{mousedown:S$e},createSelectionBetween(e){return vc.getState(e.state)!=null?e.state.selection:null},handleTripleClick:C$e,handleKeyDown:k$e,handlePaste:x$e},appendTransaction(e,n,i){return i$e(i,r$e(i,n),t)}})}var Gy=typeof navigator<"u"?navigator:null,iS=Gy&&Gy.userAgent||"",N$e=/Edge\/(\d+)/.exec(iS),B$e=/MSIE \d/.exec(iS),z$e=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(iS),H$e=!!(B$e||z$e||N$e),U$e=!H$e&&!!Gy&&/Apple Computer/.test(Gy.vendor),Gz=new ps("safari-ime-span"),Cx=!1,j$e={key:Gz,props:{decorations:W$e,handleDOMEvents:{compositionstart:()=>{Cx=!0},compositionend:()=>{Cx=!1}}}};function W$e(t){const{$from:e,$to:n,to:i}=t.selection;if(Cx&&e.sameParent(n)){const s=Fs.widget(i,Y$e,{ignoreSelection:!0,key:"safari-ime-span"});return Kn.create(t.doc,[s])}}function Y$e(t){const e=t.dom.ownerDocument.createElement("span");return e.className="ProseMirror-safari-ime-span",e}var q$e=new rs(U$e?j$e:{key:Gz});function jM(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 G$e(t,e,n){const s=v2((n||{}).ignore||[]),o=X$e(e);let r=-1;for(;++r<o.length;)ON(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 y=d.children.indexOf(c);let b=!1,k=[];h.lastIndex=0;let C=h.exec(c.value);for(;C;){const $=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=$+1:(p!==$&&k.push({type:"text",value:c.value.slice(p,$)}),Array.isArray(M)?k.push(...M):M&&k.push(M),p=$+C[0].length,b=!0),!h.global)break;C=h.exec(c.value)}return b?(p<c.value.length&&k.push({type:"text",value:c.value.slice(p)}),d.children.splice(y,1,...k)):k=[c],y+k.length}}function X$e(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([K$e(s[0]),Z$e(s[1])])}return e}function K$e(t){return typeof t=="string"?new RegExp(T2(t),"g"):t}function Z$e(t){return typeof t=="function"?t:function(){return t}}const E3="phrasing",M3=["autolink","link","image","label"];function J$e(){return{transforms:[oAe],enter:{literalAutolink:eAe,literalAutolinkEmail:T3,literalAutolinkHttp:T3,literalAutolinkWww:T3},exit:{literalAutolink:iAe,literalAutolinkEmail:sAe,literalAutolinkHttp:tAe,literalAutolinkWww:nAe}}}function Q$e(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:E3,notInConstruct:M3},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:E3,notInConstruct:M3},{character:":",before:"[ps]",after:"\\/",inConstruct:E3,notInConstruct:M3}]}}function eAe(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function T3(t){this.config.enter.autolinkProtocol.call(this,t)}function tAe(t){this.config.exit.autolinkProtocol.call(this,t)}function nAe(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 sAe(t){this.config.exit.autolinkEmail.call(this,t)}function iAe(t){this.exit(t)}function oAe(t){G$e(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,rAe],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,aAe]],{ignore:["link","linkReference"]})}function rAe(t,e,n,i,s){let o="";if(!Xz(s)||(/^w/i.test(e)&&(n=e+n,e="",o="http://"),!lAe(n)))return!1;const r=cAe(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 aAe(t,e,n,i){return!Xz(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function lAe(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 cAe(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=jM(t,"(");let o=jM(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 Xz(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||xd(n)||m2(n))&&(!e||n!==47)}Kz.peek=bAe;function uAe(){return{enter:{gfmFootnoteDefinition:hAe,gfmFootnoteDefinitionLabelString:fAe,gfmFootnoteCall:gAe,gfmFootnoteCallString:vAe},exit:{gfmFootnoteDefinition:mAe,gfmFootnoteDefinitionLabelString:pAe,gfmFootnoteCall:yAe,gfmFootnoteCallString:_Ae}}}function dAe(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:wAe,footnoteReference:Kz}}}function hAe(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function fAe(){this.buffer()}function pAe(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=Ur(this.sliceSerialize(t)).toLowerCase()}function mAe(t){this.exit(t)}function gAe(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function vAe(){this.buffer()}function _Ae(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=Ur(this.sliceSerialize(t)).toLowerCase()}function yAe(t){this.exit(t)}function Kz(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 bAe(){return"["}function wAe(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()),kAe)),r(),o}function kAe(t,e,n){return e===0?t:(n?"":" ")+t}const CAe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Zz.peek=EAe;function xAe(){return{canContainEols:["delete"],enter:{strikethrough:$Ae},exit:{strikethrough:AAe}}}function SAe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:CAe}],handlers:{delete:Zz}}}function $Ae(t){this.enter({type:"delete",children:[]},t)}function AAe(t){this.exit(t)}function Zz(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 EAe(){return"~"}function MAe(t,e={}){const n=(e.align||[]).concat(),i=e.stringLength||PAe,s=[],o=[],r=[],a=[];let l=0,c=-1;for(;++c<t.length;){const p=[],m=[];let y=-1;for(t[c].length>l&&(l=t[c].length);++y<t[c].length;){const b=TAe(t[c][y]);if(e.alignDelimiters!==!1){const k=i(b);m[y]=k,(a[y]===void 0||k>a[y])&&(a[y]=k)}p.push(b)}o[c]=p,r[c]=m}let u=-1;if(typeof n=="object"&&"length"in n)for(;++u<l;)s[u]=WM(n[u]);else{const p=WM(n);for(;++u<l;)s[u]=p}u=-1;const d=[],h=[];for(;++u<l;){const p=s[u];let m="",y="";p===99?(m=":",y=":"):p===108?m=":":p===114&&(y=":");let b=e.alignDelimiters===!1?1:Math.max(1,a[u]-m.length-y.length);const k=m+"-".repeat(b)+y;e.alignDelimiters!==!1&&(b=m.length+b+y.length,b>a[u]&&(a[u]=b),h[u]=b),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 y=[];for(;++u<l;){const b=p[u]||"";let k="",C="";if(e.alignDelimiters!==!1){const $=a[u]-(m[u]||0),S=s[u];S===114?k=" ".repeat($):S===99?$%2?(k=" ".repeat($/2+.5),C=" ".repeat($/2-.5)):(k=" ".repeat($/2),C=k):C=" ".repeat($)}e.delimiterStart!==!1&&!u&&y.push("|"),e.padding!==!1&&!(e.alignDelimiters===!1&&b==="")&&(e.delimiterStart!==!1||u)&&y.push(" "),e.alignDelimiters!==!1&&y.push(k),y.push(b),e.alignDelimiters!==!1&&y.push(C),e.padding!==!1&&y.push(" "),(e.delimiterEnd!==!1||u!==l-1)&&y.push("|")}f.push(e.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return f.join(`
126 `)}function TAe(t){return t==null?"":String(t)}function PAe(t){return t.length}function WM(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 IAe(){return{enter:{table:LAe,tableData:YM,tableHeader:YM,tableRow:DAe},exit:{codeText:RAe,table:OAe,tableData:P3,tableHeader:P3,tableRow:P3}}}function LAe(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 OAe(t){this.exit(t),this.data.inTable=void 0}function DAe(t){this.enter({type:"tableRow",children:[]},t)}function P3(t){this.exit(t)}function YM(t){this.enter({type:"tableCell",children:[]},t)}function RAe(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,VAe));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function VAe(t,e){return e==="|"?e:t}function FAe(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,y){return c(u(f,m,y),f.align)}function a(f,p,m,y){const b=d(f,m,y),k=c([b]);return k.slice(0,k.indexOf(`
128 `))}function l(f,p,m,y){const b=m.enter("tableCell"),k=m.enter("phrasing"),C=m.containerPhrasing(f,{...y,before:o,after:o});return k(),b(),C}function c(f,p){return MAe(f,{align:p,alignDelimiters:i,padding:n,stringLength:s})}function u(f,p,m){const y=f.children;let b=-1;const k=[],C=p.enter("table");for(;++b<y.length;)k[b]=d(y[b],p,m);return C(),k}function d(f,p,m){const y=f.children;let b=-1;const k=[],C=p.enter("tableRow");for(;++b<y.length;)k[b]=l(y[b],f,p,m);return C(),k}function h(f,p,m){let y=Y8.inlineCode(f,p,m);return m.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function NAe(){return{exit:{taskListCheckValueChecked:qM,taskListCheckValueUnchecked:qM,paragraph:zAe}}}function BAe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:HAe}}}function qM(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function zAe(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 HAe(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=Y8.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 UAe(){return[J$e(),uAe(),xAe(),IAe(),NAe()]}function jAe(t){return{extensions:[Q$e(),dAe(),SAe(),FAe(t),BAe()]}}const WAe={tokenize:ZAe,partial:!0},Jz={tokenize:JAe,partial:!0},Qz={tokenize:QAe,partial:!0},eH={tokenize:eEe,partial:!0},YAe={tokenize:tEe,partial:!0},tH={name:"wwwAutolink",tokenize:XAe,previous:sH},nH={name:"protocolAutolink",tokenize:KAe,previous:iH},Dl={name:"emailAutolink",tokenize:GAe,previous:oH},Ba={};function qAe(){return{text:Ba}}let vu=48;for(;vu<123;)Ba[vu]=Dl,vu++,vu===58?vu=65:vu===91&&(vu=97);Ba[43]=Dl;Ba[45]=Dl;Ba[46]=Dl;Ba[95]=Dl;Ba[72]=[Dl,nH];Ba[104]=[Dl,nH];Ba[87]=[Dl,tH];Ba[119]=[Dl,tH];function GAe(t,e,n){const i=this;let s,o;return r;function r(d){return!xx(d)||!oH.call(i,i.previous)||oS(i.events)?n(d):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(d))}function a(d){return xx(d)?(t.consume(d),a):d===64?(t.consume(d),l):n(d)}function l(d){return d===46?t.check(YAe,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 XAe(t,e,n){const i=this;return s;function s(r){return r!==87&&r!==119||!sH.call(i,i.previous)||oS(i.events)?n(r):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(WAe,t.attempt(Jz,t.attempt(Qz,o),n),n)(r))}function o(r){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(r)}}function KAe(t,e,n){const i=this;let s="",o=!1;return r;function r(d){return(d===72||d===104)&&iH.call(i,i.previous)&&!oS(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||Ny(d)||jn(d)||xd(d)||m2(d)?n(d):t.attempt(Jz,t.attempt(Qz,u),n)(d)}function u(d){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(d)}}function ZAe(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 JAe(t,e,n){let i,s,o;return r;function r(c){return c===46||c===95?t.check(eH,l,a)(c):c===null||jn(c)||xd(c)||c!==45&&m2(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 QAe(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(eH,e,o)(r):r===null||jn(r)||xd(r)?e(r):(t.consume(r),s)}function o(r){return r===41&&i++,t.consume(r),s}}function eEe(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)||xd(a)?e(a):n(a)}function s(a){return a===null||a===40||a===91||jn(a)||xd(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 tEe(t,e,n){return i;function i(o){return t.consume(o),s}function s(o){return co(o)?n(o):e(o)}}function sH(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||jn(t)}function iH(t){return!Hi(t)}function oH(t){return!(t===47||xx(t))}function xx(t){return t===43||t===45||t===46||t===95||co(t)}function oS(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 nEe={tokenize:uEe,partial:!0};function sEe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:aEe,continuation:{tokenize:lEe},exit:cEe}},text:{91:{name:"gfmFootnoteCall",tokenize:rEe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:iEe,resolveTo:oEe}}}}function iEe(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=Ur(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 oEe(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 rEe(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(Ur(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 aEe(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=Ur(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 lEe(t,e,n){return t.check(Q1,e,t.attempt(nEe,e,n))}function cEe(t){t.exit("gfmFootnoteDefinition")}function uEe(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 dEe(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,g2(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=By(c);if(p===126)return d>1?l(p):(r.consume(p),d++,f);if(d<2&&!n)return l(p);const y=r.exit("strikethroughSequenceTemporary"),b=By(p);return y._open=!b||b===2&&!!m,y._close=!m||m===2&&!!b,a(p)}}}class hEe{constructor(){this.map=[]}add(e,n,i){fEe(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 fEe(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 pEe(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 mEe(){return{flow:{null:{name:"table",tokenize:gEe,resolveAll:vEe}}}}function gEe(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,B=V==="tableHead"||V==="tableRow"?M:l;return B===M&&i.parser.lazy[i.now().line]?n(L):B(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?y(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,y,"whitespace")(L):y(L)}function y(L){return L===58?(o+=1,r=!0,t.enter("tableDelimiterMarker"),t.consume(L),t.exit("tableDelimiterMarker"),b):L===45?(o+=1,b(L)):L===null||Et(L)?$(L):S(L)}function b(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,$,"whitespace")(L):$(L)}function $(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 vEe(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 hEe;for(;++n<t.length;){const f=t[n],p=f[1];f[0]==="enter"?p.type==="tableHead"?(a=!1,l!==0&&(GM(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=p0(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=p0(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=p0(h,e,o,s,n,d)):r[1]!==0&&(d=p0(h,e,r,s,n,d)),s=0):s&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(r[3]=n)}for(l!==0&&GM(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=pEe(e.events,n))}return t}function p0(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 GM(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 _Ee={name:"tasklistCheck",tokenize:bEe};function yEe(){return{text:{91:_Ee}}}function bEe(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:wEe},e,n)(l):n(l)}}function wEe(t,e,n){return _n(t,i,"whitespace");function i(s){return s===null?n(s):e(s)}}function kEe(t){return gN([qAe(),sEe(),dEe(t),mEe(),yEe()])}const CEe={};function xEe(t){const e=this,n=t||CEe,i=e.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),o=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),r=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(kEe(n)),o.push(UAe()),r.push(jAe(n))}function Vt(t,e){return Object.assign(t,{meta:{package:"@milkdown/preset-gfm",...e}}),t}const rS=rv("strike_through");Vt(rS,{displayName:"Attr<strikethrough>",group:"Strikethrough"});const wp=ov("strike_through",t=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:e=>e==="line-through"}],toDOM:e=>["del",t.get(rS.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")}}}));Vt(wp.mark,{displayName:"MarkSchema<strikethrough>",group:"Strikethrough"});Vt(wp.ctx,{displayName:"MarkSchemaCtx<strikethrough>",group:"Strikethrough"});const R2=on("ToggleStrikeThrough",t=>()=>S2(wp.type(t)));Vt(R2,{displayName:"Command<ToggleStrikethrough>",group:"Strikethrough"});const rH=wo(t=>tv(/~([^~]+)~$/,wp.type(t)));Vt(rH,{displayName:"InputRule<strikethrough>",group:"Strikethrough"});const aS=ko("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:t=>{const e=t.get(gn);return()=>e.call(R2.key)}}});Vt(aS.ctx,{displayName:"KeymapCtx<strikethrough>",group:"Strikethrough"});Vt(aS.shortcuts,{displayName:"Keymap<strikethrough>",group:"Strikethrough"});const lv=X7e({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:t=>t.style.textAlign||"left",setDOMAttr:(t,e)=>{e.style=`text-align: ${t||"left"}`}}}}),kp=zs("table",()=>({...lv.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()}}}));Vt(kp.node,{displayName:"NodeSchema<table>",group:"Table"});Vt(kp.ctx,{displayName:"NodeSchemaCtx<table>",group:"Table"});const V2=zs("table_header_row",()=>({...lv.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()}}}));Vt(V2.node,{displayName:"NodeSchema<tableHeaderRow>",group:"Table"});Vt(V2.ctx,{displayName:"NodeSchemaCtx<tableHeaderRow>",group:"Table"});const cv=zs("table_row",()=>({...lv.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()}}}));Vt(cv.node,{displayName:"NodeSchema<tableRow>",group:"Table"});Vt(cv.ctx,{displayName:"NodeSchemaCtx<tableRow>",group:"Table"});const uv=zs("table_cell",()=>({...lv.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()}}}));Vt(uv.node,{displayName:"NodeSchema<tableCell>",group:"Table"});Vt(uv.ctx,{displayName:"NodeSchemaCtx<tableCell>",group:"Table"});const F2=zs("table_header",()=>({...lv.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()}}}));Vt(F2.node,{displayName:"NodeSchema<tableHeader>",group:"Table"});Vt(F2.ctx,{displayName:"NodeSchemaCtx<tableHeader>",group:"Table"});function aH(t,e=3,n=3){const i=Array(n).fill(0).map(()=>uv.type(t).createAndFill()),s=Array(n).fill(0).map(()=>F2.type(t).createAndFill()),o=Array(e).fill(0).map((r,a)=>a===0?V2.type(t).create(null,s):cv.type(t).create(null,i));return kp.type(t).create(null,o)}function dv(t){return e5(e=>e.type.spec.tableRole==="table")(t)}function Bh(t,e){const n=dv(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=dv(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 SEe(t){const e=dv(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 $Ee(t){const e=SEe(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 x2(t.setSelection(new as(s,n)))}}return t}function lH(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 uv.type(t).createAndFill({alignment:u==null?void 0:u.attrs.alignment})});return e.insert(r,cv.type(t).create(null,a)),e}function cH(t){return(e,n)=>i=>{n=n??i.selection.from;const s=i.doc.resolve(n),o=e5(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 x2(i.setSelection(d(u,f)))}}return i}}const AEe=cH("row"),EEe=cH("col");function XM(t){return t[0].map((e,n)=>t.map(i=>i[n]))}function uH(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 dH(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 hH(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 MEe(t,e,n,i){let s=XM(dH(t.node));return s=hH(s,e,n,i),s=XM(s),uH(t.node,s)}function TEe(t,e,n,i){let s=dH(t.node);return s=hH(s,e,n,i),uH(t.node,s)}function KM(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 ZM(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 PEe(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=dv(r);if(!a)return e;const{indexes:l}=KM(n,e),{indexes:c}=KM(i,e);if(l.includes(i))return e;const u=MEe(a,l,c,0),d=x2(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),y=d.doc.resolve(f+m),b=as.colSelection,k=h.positionAt(0,p,u),C=d.doc.resolve(f+k);return d.setSelection(b(y,C))}function IEe(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=dv(r);if(!a)return e;const{indexes:l}=ZM(n,e),{indexes:c}=ZM(i,e);if(l.includes(i))return e;const u=TEe(a,l,c,0),d=x2(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),y=d.doc.resolve(f+m),b=as.rowSelection,k=h.positionAt(p,0,u),C=d.doc.resolve(f+k);return d.setSelection(b(y,C))}const lS=on("GoToPrevTableCell",()=>()=>Wz(-1));Vt(lS,{displayName:"Command<goToPrevTableCellCommand>",group:"Table"});const cS=on("GoToNextTableCell",()=>()=>Wz(1));Vt(cS,{displayName:"Command<goToNextTableCellCommand>",group:"Table"});const uS=on("ExitTable",t=>()=>(e,n)=>{if(!Er(e))return!1;const{$head:i}=e.selection,s=j5e(i,kp.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});Vt(uS,{displayName:"Command<breakTableCommand>",group:"Table"});const fH=on("InsertTable",t=>({row:e,col:n}={})=>(i,s)=>{const{selection:o,tr:r}=i,{from:a}=o,l=aH(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});Vt(fH,{displayName:"Command<insertTableCommand>",group:"Table"});const pH=on("MoveRow",()=>({from:t,to:e,pos:n}={})=>(i,s)=>{const{tr:o}=i;return!!(s!=null&&s(IEe({tr:o,origin:t??0,target:e??0,pos:n,select:!0})))});Vt(pH,{displayName:"Command<moveRowCommand>",group:"Table"});const mH=on("MoveCol",()=>({from:t,to:e,pos:n}={})=>(i,s)=>{const{tr:o}=i;return!!(s!=null&&s(PEe({tr:o,origin:t??0,target:e??0,pos:n,select:!0})))});Vt(mH,{displayName:"Command<moveColCommand>",group:"Table"});const gH=on("SelectRow",()=>(t={index:0})=>(e,n)=>{const{tr:i}=e;return!!(n!=null&&n(AEe(t.index,t.pos)(i)))});Vt(gH,{displayName:"Command<selectRowCommand>",group:"Table"});const vH=on("SelectCol",()=>(t={index:0})=>(e,n)=>{const{tr:i}=e;return!!(n!=null&&n(EEe(t.index,t.pos)(i)))});Vt(vH,{displayName:"Command<selectColCommand>",group:"Table"});const _H=on("SelectTable",()=>()=>(t,e)=>{const{tr:n}=t;return!!(e!=null&&e($Ee(n)))});Vt(_H,{displayName:"Command<selectTableCommand>",group:"Table"});const yH=on("DeleteSelectedCells",()=>()=>(t,e)=>{const{selection:n}=t;if(!(n instanceof as))return!1;const i=n.isRowSelection(),s=n.isColSelection();return i&&s?v$e(t,e):s?d$e(t,e):f$e(t,e)});Vt(yH,{displayName:"Command<deleteSelectedCellsCommand>",group:"Table"});const bH=on("AddColBefore",()=>()=>l$e);Vt(bH,{displayName:"Command<addColBeforeCommand>",group:"Table"});const wH=on("AddColAfter",()=>()=>c$e);Vt(wH,{displayName:"Command<addColAfterCommand>",group:"Table"});const kH=on("AddRowBefore",t=>()=>(e,n)=>{if(!Er(e))return!1;if(n){const i=lu(e);n(lH(t,e.tr,i,i.top))}return!0});Vt(kH,{displayName:"Command<addRowBeforeCommand>",group:"Table"});const CH=on("AddRowAfter",t=>()=>(e,n)=>{if(!Er(e))return!1;if(n){const i=lu(e);n(lH(t,e.tr,i,i.bottom))}return!0});Vt(CH,{displayName:"Command<addRowAfterCommand>",group:"Table"});const xH=on("SetAlign",()=>(t="left")=>p$e("alignment",t));Vt(xH,{displayName:"Command<setAlignCommand>",group:"Table"});const SH=wo(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),kp.type(t)))return null;const l=aH(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()}));Vt(SH,{displayName:"InputRule<insertTableInputRule>",group:"Table"});const dS=ko("tableKeymap",{NextCell:{shortcuts:["Mod-]","Tab"],command:t=>{const e=t.get(gn);return()=>e.call(cS.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:t=>{const e=t.get(gn);return()=>e.call(lS.key)}},ExitTable:{shortcuts:["Mod-Enter"],command:t=>{const e=t.get(gn);return()=>e.call(uS.key)}}});Vt(dS.ctx,{displayName:"KeymapCtx<table>",group:"Table"});Vt(dS.shortcuts,{displayName:"Keymap<table>",group:"Table"});const I3="footnote_definition",JM="footnoteDefinition",hS=zs("footnote_definition",()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:""}},parseDOM:[{tag:`dl[data-type="${I3}"]`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw ra(t);return{label:t.dataset.label}},contentElement:"dd"}],toDOM:t=>{const e=t.attrs.label;return["dl",{"data-label":e,"data-type":I3},["dt",e],["dd",0]]},parseMarkdown:{match:({type:t})=>t===JM,runner:(t,e,n)=>{t.openNode(n,{label:e.label}).next(e.children).closeNode()}},toMarkdown:{match:t=>t.type.name===I3,runner:(t,e)=>{t.openNode(JM,void 0,{label:e.attrs.label,identifier:e.attrs.label}).next(e.content).closeNode()}}}));Vt(hS.ctx,{displayName:"NodeSchemaCtx<footnodeDef>",group:"footnote"});Vt(hS.node,{displayName:"NodeSchema<footnodeDef>",group:"footnote"});const L3="footnote_reference",fS=zs("footnote_reference",()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:""}},parseDOM:[{tag:`sup[data-type="${L3}"]`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw ra(t);return{label:t.dataset.label}}}],toDOM:t=>{const e=t.attrs.label;return["sup",{"data-label":e,"data-type":L3},e]},parseMarkdown:{match:({type:t})=>t==="footnoteReference",runner:(t,e,n)=>{t.addNode(n,{label:e.label})}},toMarkdown:{match:t=>t.type.name===L3,runner:(t,e)=>{t.addNode("footnoteReference",void 0,void 0,{label:e.attrs.label,identifier:e.attrs.label})}}}));Vt(fS.ctx,{displayName:"NodeSchemaCtx<footnodeRef>",group:"footnote"});Vt(fS.node,{displayName:"NodeSchema<footnodeRef>",group:"footnote"});const $H=Da.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 ra(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()}}}});Vt($H,{displayName:"NodeSchema<listItem>",group:"ListItem"});const AH=wo(()=>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}));Vt(AH,{displayName:"InputRule<wrapInTaskListInputRule>",group:"ListItem"});const LEe=[aS,dS].flat(),OEe=[SH,AH],DEe=[rH],EH=Ls(()=>q$e);Vt(EH,{displayName:"Prose<autoInsertSpanPlugin>",group:"Prose"});const REe=Ls(()=>A$e({}));Vt(REe,{displayName:"Prose<columnResizingPlugin>",group:"Prose"});const MH=Ls(()=>F$e({allowTableNodeSelection:!0}));Vt(MH,{displayName:"Prose<tableEditingPlugin>",group:"Prose"});const pS=Gd("remarkGFM",()=>xEe);Vt(pS.plugin,{displayName:"Remark<remarkGFMPlugin>",group:"Remark"});Vt(pS.options,{displayName:"RemarkConfig<remarkGFMPlugin>",group:"Remark"});const VEe=new ps("MILKDOWN_KEEP_TABLE_ALIGN_PLUGIN");function FEe(t,e){let n=0;return e.forEach((i,s,o)=>{i===t&&(n=o)}),n}const TH=Ls(()=>new rs({key:VEe,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=FEe(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}}));Vt(TH,{displayName:"Prose<keepTableAlignPlugin>",group:"Prose"});const NEe=[TH,EH,pS,MH].flat(),BEe=[$H,kp,V2,cv,F2,uv,hS,fS,rS,wp].flat(),zEe=[cS,lS,uS,fH,pH,mH,gH,vH,_H,yH,kH,CH,bH,wH,xH,R2],HEe=[BEe,OEe,DEe,LEe,zEe,NEe].flat();var Xy=200,Ys=function(){};Ys.prototype.append=function(e){return e.length?(e=Ys.from(e),!this.length&&e||e.length<Xy&&this.leafAppend(e)||this.length<Xy&&e.leafPrepend(this)||this.appendInner(e)):this};Ys.prototype.prepend=function(e){return e.length?Ys.from(e).append(this):this};Ys.prototype.appendInner=function(e){return new UEe(this,e)};Ys.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Ys.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Ys.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Ys.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)};Ys.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};Ys.from=function(e){return e instanceof Ys?e:e&&e.length?new PH(e):Ys.empty};var PH=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<=Xy)return new e(this.values.concat(s.flatten()))},e.prototype.leafPrepend=function(s){if(this.length+s.length<=Xy)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}(Ys);Ys.empty=new PH([]);var UEe=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}(Ys);const jEe=500;class Lr{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 ya(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 ya(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 Lr(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 ya(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>YEe&&(a=WEe(a,c),r-=c),new Lr(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 Lr(this.items.append(e.map(n=>new ya(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]),y=h.selection&&h.selection.map(o.slice(l+1,f));y&&a++,i.push(new ya(p,m,y))}else i.push(new ya(p))},s);let c=[];for(let h=n;h<r;h++)c.push(new ya(o.maps[h]));let u=this.items.slice(0,s).append(c).append(i),d=new Lr(u,a);return d.emptyItemCount()>jEe&&(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 ya(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 Lr(Ys.from(s.reverse()),o)}}Lr.empty=new Lr(Ys.empty,0);function WEe(t,e){let n;return t.forEach((i,s)=>{if(i.selection&&e--==0)return n=s,!1}),t.slice(n)}class ya{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 ya(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 YEe=20;function qEe(t,e,n,i){let s=n.getMeta(ld),o;if(s)return s.historyState;n.getMeta(KEe)&&(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(ld))return r.getMeta(ld).redo?new pc(t.done.addTransform(n,void 0,i,__(e)),t.undone,QM(n.mapping.maps),t.prevTime,t.prevComposition):new pc(t.done,t.undone.addTransform(n,void 0,i,__(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||!GEe(n,t.prevRanges)),c=r?O3(t.prevRanges,n.mapping):QM(n.mapping.maps);return new pc(t.done.addTransform(n,l?e.selection.getBookmark():void 0,i,__(e)),Lr.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),O3(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new pc(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),O3(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function GEe(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 QM(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 O3(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 XEe(t,e,n){let i=__(e),s=ld.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(ld,{redo:n,historyState:l})}let D3=!1,eT=null;function __(t){let e=t.plugins;if(eT!=e){D3=!1,eT=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){D3=!0;break}}return D3}const ld=new ps("history"),KEe=new ps("closeHistory");function ZEe(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new rs({key:ld,state:{init(){return new pc(Lr.empty,Lr.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"?LH:i=="historyRedo"?OH:null;return s?(n.preventDefault(),s(e.state,e.dispatch)):!1}}}})}function IH(t,e){return(n,i)=>{let s=ld.getState(n);if(!s||(t?s.undone:s.done).eventCount==0)return!1;if(i){let o=XEe(s,n,t);o&&i(e?o.scrollIntoView():o)}return!0}}const LH=IH(!1,!0),OH=IH(!0,!0);function Cp(t,e){return Object.assign(t,{meta:{package:"@milkdown/plugin-history",...e}}),t}const mS=on("Undo",()=>()=>LH);Cp(mS,{displayName:"Command<undo>"});const gS=on("Redo",()=>()=>OH);Cp(gS,{displayName:"Command<redo>"});const vS=ms({},"historyProviderConfig");Cp(vS,{displayName:"Ctx<historyProviderConfig>"});const DH=Ls(t=>ZEe(t.get(vS.key)));Cp(DH,{displayName:"Ctx<historyProviderPlugin>"});const _S=ko("historyKeymap",{Undo:{shortcuts:"Mod-z",command:t=>{const e=t.get(gn);return()=>e.call(mS.key)}},Redo:{shortcuts:["Mod-y","Shift-Mod-z"],command:t=>{const e=t.get(gn);return()=>e.call(gS.key)}}});Cp(_S.ctx,{displayName:"KeymapCtx<history>"});Cp(_S.shortcuts,{displayName:"Keymap<history>"});const JEe=[vS,DH,_S,mS,gS].flat();function Sx(t){if(!t)return!1;if(Array.isArray(t))return t.length>1?!1:Sx(t[0]);const e=t.content;return e?Sx(e):t.type==="text"}function QEe(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 RH=Ls(t=>{const e=t.get(Wr);t.update(mg,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 b=JSON.parse(d),k=b==null?void 0:b.mode;if(u&&k){const{tr:C}=i.state,$=W5e("code_block",e);return C.replaceSelectionWith($.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=p2.fromSchema(e);let p;if(h.length===0){const b=a(u);if(!b||typeof b=="string")return!1;p=su.fromSchema(e).serializeFragment(b.content)}else{const b=document.createElement("template");b.innerHTML=h,p=b.content.cloneNode(!0),b.remove()}const m=f.parseSlice(p),y=QEe(m);return y?(i.dispatch(i.state.tr.replaceSelectionWith(y,!0)),!0):(i.dispatch(i.state.tr.replaceSelection(m)),!0)},clipboardTextSerializer:i=>{const s=t.get(vf);if(Sx(i.content.toJSON()))return i.content.textBetween(0,i.content.size,`
130
131 `);const o=e.topNodeType.createAndFill(void 0,i.content);return o?s(o):""}}})});RH.meta={displayName:"Prose<clipboard>",package:"@milkdown/plugin-clipboard"};const yS=ms({shouldAppend:t=>!(!t||["heading","paragraph"].includes(t.type.name)),getNode:t=>t.schema.nodes.paragraph.create()},"trailingConfig");yS.meta={package:"@milkdown/plugin-trailing",displayName:"Ctx<trailingConfig>"};const VH=Ls(t=>{const e=new ps("MILKDOWN_TRAILING"),{shouldAppend:n,getNode:i}=t.get(yS.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});VH.meta={package:"@milkdown/plugin-trailing",displayName:"Prose<trailing>"};const eMe=[yS,VH];var FH=(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))(FH||{});const tMe={cursor:!0,"link-tooltip":!0,"block-edit":!0,placeholder:!0,toolbar:!0,"code-mirror":!0,"image-block":!0};async function nMe(t,e,n){switch(t){case"link-tooltip":{const{defineFeature:i}=await Qs(()=>Promise.resolve().then(()=>p3t),void 0);return i(e,n)}case"block-edit":{const{defineFeature:i}=await Qs(()=>Promise.resolve().then(()=>hkt),void 0);return i(e,n)}case"placeholder":{const{defineFeature:i}=await Qs(()=>Promise.resolve().then(()=>gkt),void 0);return i(e,n)}case"toolbar":{const{defineFeature:i}=await Qs(()=>Promise.resolve().then(()=>ykt),void 0);return i(e,n)}case"image-block":{const{defineFeature:i}=await Qs(()=>Promise.resolve().then(()=>Tkt),void 0);return i(e,n)}}}const sMe=kn([],"FeaturesCtx");function iMe(t){return e=>{e.inject(sMe,t)}}var oMe="Expected a function",tT=0/0,rMe="[object Symbol]",aMe=/^\s+|\s+$/g,lMe=/^[-+]0x[0-9a-f]+$/i,cMe=/^0b[01]+$/i,uMe=/^0o[0-7]+$/i,dMe=parseInt,hMe=typeof xs=="object"&&xs&&xs.Object===Object&&xs,fMe=typeof self=="object"&&self&&self.Object===Object&&self,pMe=hMe||fMe||Function("return this")(),mMe=Object.prototype,gMe=mMe.toString,vMe=Math.max,_Me=Math.min,R3=function(){return pMe.Date.now()};function yMe(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(oMe);e=nT(e)||0,$x(n)&&(u=!!n.leading,d="maxWait"in n,o=d?vMe(nT(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(b,e),u?f(M):r}function m(M){var P=M-l,T=M-c,I=e-P;return d?_Me(I,o-T):I}function y(M){var P=M-l,T=M-c;return l===void 0||P>=e||P<0||d&&T>=o}function b(){var M=R3();if(y(M))return k(M);a=setTimeout(b,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 $(){return a===void 0?r:k(R3())}function S(){var M=R3(),P=y(M);if(i=arguments,s=this,l=M,P){if(a===void 0)return p(l);if(d)return a=setTimeout(b,e),f(l)}return a===void 0&&(a=setTimeout(b,e)),r}return S.cancel=C,S.flush=$,S}function $x(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function bMe(t){return!!t&&typeof t=="object"}function wMe(t){return typeof t=="symbol"||bMe(t)&&gMe.call(t)==rMe}function nT(t){if(typeof t=="number")return t;if(wMe(t))return tT;if($x(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=$x(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(aMe,"");var n=cMe.test(t);return n||uMe.test(t)?dMe(t.slice(2),n?2:8):lMe.test(t)?tT:+t}var kMe=yMe;const N2=vi(kMe);let NH=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 Ax=kn(new NH,"listener"),CMe=new ps("MILKDOWN_LISTENER"),BH=t=>(t.inject(Ax,new NH),async()=>{await t.wait(rd);const e=t.get(Ax),{listeners:n}=e;n.beforeMount.forEach(a=>a(t)),await t.wait(pg);const i=t.get(vf);let s=null,o=null;const r=new rs({key:CMe,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:N2(()=>{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(Qr,a=>a.concat(r)),await t.wait(u_),n.mounted.forEach(a=>a(t))});BH.meta={package:"@milkdown/plugin-listener",displayName:"Listener"};function xMe(t){return new Promise(e=>{const n=new FileReader;n.addEventListener("load",()=>{e({alt:t.name,src:n.result})},!1),n.readAsDataURL(t)})}const SMe=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 qF("image");return(await Promise.all(n.map(s=>xMe(s)))).map(({alt:s,src:o})=>i.createAndFill({src:o,alt:s}))},_f=ms({uploader:SMe,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 zH=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(Wr),{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}}})});zH.meta={package:"@milkdown/plugin-upload",displayName:"Prose<upload>"};const $Me=[_f,zH];var bS=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Ks=(t,e,n)=>(bS(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)},Sm=(t,e,n,i)=>(bS(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),AMe=(t,e,n)=>(bS(t,e,"access private method"),n),tr,$m,gg,y_,yf,Ex,HH;class UH{constructor({root:e,features:n={},featureConfigs:i={},defaultValue:s="",onUpdate:o=a=>{},handleCommonActions:r=(a,l)=>{}}){var u;ph(this,Ex),ph(this,tr,void 0),ph(this,$m,void 0),ph(this,gg,void 0),ph(this,y_,!0),ph(this,yf,null);const a=Object.entries({...tMe,...n}).filter(([,d])=>d).map(([d])=>d);Sm(this,gg,(typeof e=="string"?document.querySelector(e):e)??document.body),Sm(this,tr,l7e.make().config(iMe(a)).config(d=>{d.set(d_,Ks(this,gg)),d.set(a_,s),d.set(mg,{editable:()=>Ks(this,y_)})}).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(Ax);h.markdownUpdated((f,p,m)=>{p!==m&&o(p)}),h.updated((f,p,m)=>{r("editor_updated",f)})}).use(j7e).use(JEe).use(eMe).use(RH).use(BH).use($Me).use(HEe));const l=(u=i==null?void 0:i["block-edit"])==null?void 0:u.canAddImage;l&&Ks(this,tr).use(Ls(()=>new rs({filterTransaction:d=>d.docChanged?!d.steps.some(f=>{var m,y;let p=!1;return(y=(m=f.slice)==null?void 0:m.content)==null||y.forEach(b=>{var k;b.type.name.includes("image")&&(p=!0),(k=b.content)==null||k.forEach(C=>{C.type.name.includes("image")&&(p=!0)})}),p})||l():!0}))),Ks(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 y=d.state.doc.resolve(h),b=/(?:^|\s)((?:https?:\/\/|www\.)\S+)$/.exec(y.parent.textBetween(0,y.parentOffset,void 0,""));if(!b)return!1;const k=b[1].replace(/[.,)]+$/,""),C=h-b[1].length,$=C+k.length;if(d.state.doc.rangeHasMark(C,$,m))return!1;const S=(k.startsWith("http")?"":"https://")+k,M=d.state.tr.insertText(p,h).addMark(C,$,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 y=M=>M==null?void 0:M.marks.find(P=>P.type===p);if((f.storedMarks??m.marks()).some(M=>M.type===p)&&!y(m.nodeBefore)&&!y(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 $=y(f.doc.resolve(C-1).nodeBefore),S=y(f.doc.resolve(C).nodeAfter);return S&&($==null?void 0:$.attrs.href)===S.attrs.href?null:f.tr.removeMark(C-1,C,p).removeStoredMark(p)}}))),Ks(this,tr).use(Ls(()=>{let d=!1,h=!1;return new rs({view:f=>({update(){var $;const p=f.state.schema.marks.link,m=f.state.selection.$cursor,y=S=>S.type===p,b=!!p&&!!(m!=null&&m.marks().some(y)),k=document.querySelector("milkdown-link-preview"),C=(k==null?void 0:k.style.display)==="none"&&!h;if(b&&!C){k&&h&&(k.style.display=""),h=!1;const S=f.coordsAtPos(($=m.nodeBefore)!=null&&$.marks.some(y)?m.pos-1:m.pos);f.dom.dispatchEvent(new MouseEvent("mousemove",{bubbles:!0,clientX:S.left+1,clientY:(S.top+S.bottom)/2}))}else!b&&d&&(f.dom.dispatchEvent(new MouseEvent("mouseleave",{bubbles:!0})),k&&(k.style.display="none"),h=!0);d=b}})})}));const c=[];a.forEach(d=>{const h=i[d];c.push(nMe(d,Ks(this,tr),h))}),Sm(this,$m,Promise.all(c))}async create(){await Ks(this,$m);const e=await Ks(this,tr).create();return AMe(this,Ex,HH).call(this),e}async destroy(){var e;return(e=Ks(this,yf))==null||e.disconnect(),await Ks(this,$m),Ks(this,tr).destroy()}get editor(){return Ks(this,tr)}setReadonly(e){return Sm(this,y_,!e),this}getMarkdown(){return Ks(this,tr).action(p7e())}getEditor(){return Ks(this,tr)}destroyEditor(){this.destroy()}}tr=new WeakMap;$m=new WeakMap;gg=new WeakMap;y_=new WeakMap;yf=new WeakMap;Ex=new WeakSet;HH=function(){const t=Ks(this,gg),e=i=>{parseFloat(i.style.left)<0&&(i.style.left="0px")},n=i=>{const s=t.querySelector(i);s&&(Ks(this,yf).observe(s,{attributes:!0,attributeFilter:["style"]}),setTimeout(()=>e(s),0))};Sm(this,yf,new MutationObserver(i=>{const s=i[0];s.type==="childList"?(n("milkdown-link-edit"),n("milkdown-link-preview")):e(s.target)})),Ks(this,yf).observe(t,{childList:!0,subtree:!0})};UH.Feature=FH;const EMe=Symbol("editorInfoCtxKey"),MMe=fe({name:"MilkdownProvider",setup:(t,{slots:e})=>(Pt(EMe,{loading:J(!0),dom:J(null),editor:J(void 0),editorFactory:J(void 0)}),()=>{var r;return _(ee,null,[(r=e.default)==null?void 0:r.call(e)])})});var TMe=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},jH=(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)},Mx=(t,e,n)=>(TMe(t,e,"access private method"),n),b_,Tx;let PMe=class{constructor({node:e,view:n,getPos:i,decorations:s,innerDecorations:o,options:r}){jH(this,b_),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 Mx(this,b_,Tx).call(this,e)}createContentDOM(e){return Mx(this,b_,Tx).call(this,e)}get component(){return this.options.component}};b_=new WeakSet,Tx=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 IMe=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 Px,WH;let LMe=class{constructor({pos:e,spec:n,options:i}){jH(this,Px),this.pos=e,this.options=i,this.spec=n,this.dom=Mx(this,Px,WH).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}};Px=new WeakSet,WH=function(t){return t instanceof HTMLElement?t:document.createElement(t)};let wS=(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 OMe=Object.defineProperty,DMe=(t,e,n)=>e in t?OMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ur=(t,e,n)=>(DMe(t,typeof e!="symbol"?e+"":e,n),n);const RMe=Symbol("[ProsemirrorAdapter]nodeViewContext"),VMe=Symbol("[ProsemirrorAdapter]useNodeViewFactory");let FMe=class extends PMe{constructor(){super(...arguments),ur(this,"key",wS()),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 Pi(fe({name:"ProsemirrorNodeView",setup:()=>(Pt(RMe,this.context),()=>_(ea,{key:this.key,to:this.dom},{default:()=>[_(e,null,null)]}))}))})}};const NMe=(t,e)=>n=>(i,s,o,r,a)=>{const l=new FMe({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},BMe=Symbol("[ProsemirrorAdapter]nodeViewContext"),zMe=Symbol("[ProsemirrorAdapter]usePluginViewFactory");let HMe=class extends IMe{constructor(){super(...arguments),ur(this,"key",wS()),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 Pi(fe({name:"ProsemirrorNodeView",setup:()=>(Pt(BMe,this.context),()=>_(ea,{key:this.key,to:this.root},{default:()=>[_(e,null,null)]}))}))})}};const UMe=(t,e)=>n=>i=>{const s=new HMe({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},jMe=()=>{const t=J({}),e=pt(),n=Pi({});return Od(()=>{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]}}},WMe=Symbol("[ProsemirrorAdapter]widgetViewContext"),YMe=Symbol("[ProsemirrorAdapter]useWidgetViewFactory");let qMe=class extends LMe{constructor(){super(...arguments),ur(this,"key",wS()),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 Pi(fe({name:"ProsemirrorWidgetView",setup:()=>(Pt(WMe,this.context),()=>_(ea,{key:this.key,to:this.dom},{default:()=>[_(e,null,null)]}))}))})}};const GMe=(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)},XMe=fe({name:"ProsemirrorAdapterProvider",setup:(t,{slots:e})=>{const{portals:n,renderVueRenderer:i,removeVueRenderer:s}=jMe(),o=NMe(i,s),r=UMe(i,s),a=GMe(i,s);return Pt(VMe,o),Pt(zMe,r),Pt(YMe,a),()=>{var l;return _(ee,null,[(l=e.default)==null?void 0:l.call(e),Object.values(n.value).map(c=>bt(c))])}}}),KMe={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:MMe,ProsemirrorAdapterProvider:XMe},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 UH({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(m7e(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)}},ZMe={style:{position:"relative"},class:"fcom_md_editor"},JMe={ref:"crepe_editor_vue",class:"crepe-editor feed_md_content fcom_md_seditor_wrapper"},QMe=["placeholder","value"],eTe={class:"fcom_mention_pop_wrap"},tTe={key:0},nTe={key:0},sTe=["onClick"],iTe=["src"],oTe={key:1};function rTe(t,e,n,i,s,o){const r=H("ProsemirrorAdapterProvider"),a=H("MilkdownProvider"),l=Yo;return v(),A(ee,null,[_(a,null,{default:w(()=>[_(r,null,{default:w(()=>[g("div",ZMe,[Re(g("div",JMe,null,512),[[jt,!s.editorFailed]]),s.editorFailed?(v(),A("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,QMe)):O("",!0)])]),_:1})]),_:1}),g("div",eTe,[_(l,{"popper-class":"fcom_mention_pop",ref:"mentionPopoverRef",placement:"bottom",visible:s.showMentionPop,width:300,persistent:!1},{reference:w(()=>[...e[1]||(e[1]=[g("span",{style:{}},null,-1)])]),default:w(()=>[s.justReplaced?O("",!0):(v(),A("div",tTe,[s.mentionResults.length?(v(),A("ul",nTe,[(v(!0),A(ee,null,we(s.mentionResults,c=>(v(),A("li",{key:c.user_id,onClick:u=>o.addMention("@"+c.username)},[c.avatar?(v(),A("img",{key:0,alt:"",src:c.avatar},null,8,iTe)):O("",!0),g("span",null,x(c.display_name)+" (@"+x(c.username)+")",1)],8,sTe))),128))])):s.searchingMention?O("",!0):(v(),A("div",oTe,[g("p",null,x(t.$t("No results found. Please search by username")),1)]))]))]),_:1},8,["visible"])])],64)}const cu=ue(KMe,[["render",rTe]]),aTe={name:"CreateCorseForm",components:{FormBuilder:WF,SpaceGroupSelector:F8,TopicSelector:jF,SlugInput:Yd,ImageUploader:Ll,LogoEmojiSelector:Z1,ErrorAlerts:J1,CrepeEditor:cu},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:Mwe,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:Twe,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})}},lTe={key:0},cTe={class:"fcom_form_section"},uTe={class:"fcom_help_text"},dTe={class:"fcom_help_text"},hTe={class:"fcom_form_section"},fTe={style:{"font-weight":"bold"}},pTe={key:0},mTe={class:"fcom_help_text"},gTe={style:{"font-weight":"bold"}},vTe={class:"fcom_form_section"},_Te={class:"fcom_lined_checkboxes"},yTe={class:"fcom_checkbox_with_tooltip"},bTe={key:0},wTe={key:0},kTe={class:"fcom_help_text"},CTe={key:0,class:"fcom_form_section"},xTe={class:"fcom_select_photo",style:{float:"left"}},STe=["src","alt"],$Te={style:{float:"right",color:"#8492a6","font-size":"13px"}},ATe={class:"fcom_lined_checkboxes"},ETe={class:"fcom_form_section"},MTe={class:"fcom_help_text"},TTe=["href"],PTe={class:"fcom_image_uploader_wrapper"},ITe={class:"fcom_help_text"},LTe={class:"fcom_space_form_bottom"},OTe={key:0},DTe={class:"fcom_form_section fcom_mt_20"},RTe={key:1},VTe=["href"];function FTe(t,e,n,i,s,o){const r=H("logo-emoji-selector"),a=ft,l=en,c=H("SlugInput"),u=H("crepe-editor"),d=H("space-group-selector"),h=Li,f=ws,p=sn,m=Jt,y=Yt,b=H("InfoFilled"),k=be,C=Ss,$=H("topic-selector"),S=Wo,M=H("EditPen"),P=He,T=H("Delete"),I=H("ImageUploader"),L=H("error-alerts"),R=tn,V=H("form-builder"),B=xt("loading");return t.hasFeature("has_course")?(v(),A("div",lTe,[_(R,{onSubmit:e[23]||(e[23]=Ee(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:w(()=>[g("div",cTe,[g("h4",null,x(t.$t("General")),1),_(l,{label:t.$t("Course Title"),required:""},{default:w(()=>[_(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:w(()=>{var F,z;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:((z=s.form.settings)==null?void 0:z.shape_svg)||""},onUpdate:e[0]||(e[0]=U=>{s.form.settings.emoji=U.emoji,s.form.logo=U.logo,s.form.settings.shape_svg=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:w(()=>[_(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:w(()=>[_(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:w(()=>[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",uTe,[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:w(()=>[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",dTe,[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:w(()=>[_(f,{modelValue:s.form.status,"onUpdate:modelValue":e[6]||(e[6]=F=>s.form.status=F),class:"fcom_radio_group"},{default:w(()=>[_(h,{value:"published"},{default:w(()=>[N(x(t.$t("Published")),1)]),_:1}),_(h,{value:"draft"},{default:w(()=>[N(x(t.$t("Draft")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])]),g("div",hTe,[g("h4",null,x(t.$t("Access Control")),1),_(l,{label:t.$t("Privacy")},{default:w(()=>[_(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:w(()=>[(v(!0),A(ee,null,we(s.privacies,(F,z)=>(v(),D(p,{key:z,label:F.label,value:z},{default:w(()=>[g("span",fTe,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(),A(ee,{key:0},[_(l,{label:t.$t("Lock Screen Type")},{default:w(()=>[_(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:w(()=>[_(h,{value:"yes"},{default:w(()=>[N(x(t.$t("Custom")),1)]),_:1}),_(h,{value:"no"},{default:w(()=>[N(x(t.$t("Default")),1)]),_:1}),_(h,{disabled:!t.has_pro,value:"redirect"},{default:w(()=>[N(x(t.$t("Redirect to an URL"))+" ",1),t.has_pro?O("",!0):(v(),A("span",pTe,"("+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:w(()=>[_(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",mTe,[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:w(()=>[_(y,{"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:w(()=>[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:w(()=>[_(y,{"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:w(()=>[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:w(()=>[_(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:w(()=>[(v(!0),A(ee,null,we(s.courseTypes,(F,z)=>(v(),D(p,{key:z,label:F.label,value:z},{default:w(()=>[g("span",gTe,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",vTe,[g("h4",null,x(t.$t("Features Customizations")),1),_(l,null,{default:w(()=>[g("div",_Te,[s.form.privacy=="public"&&s.form.course_type=="self_paced"?(v(),D(y,{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:w(()=>[N(x(t.$t("Public users can view the lessons without enrolling in the course")),1)]),_:1},8,["modelValue"])):O("",!0),_(y,{"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:w(()=>[N(x(t.$t("Disable comments for all the lessons for this course")),1)]),_:1},8,["modelValue"]),_(y,{"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:w(()=>[N(x(t.$t("Hide students count from courses page")),1)]),_:1},8,["modelValue"]),g("div",yTe,[_(y,{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:w(()=>[N(x(t.$t("Lesson order enforcement"))+" ",1),t.has_pro?O("",!0):(v(),A("span",bTe,"("+x(t.$t("Pro Required"))+")",1))]),_:1},8,["disabled","model-value"]),_(C,{class:"box-item fcom_checkbox_tooltip",effect:"dark",placement:"right-end"},{content:w(()=>[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:w(()=>[_(k,null,{default:w(()=>[_(b)]),_:1})]),_:1})])])]),_:1}),_(l,{label:t.$t("Course Layout")},{default:w(()=>[_(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:w(()=>[_(h,{value:"classic"},{default:w(()=>[N(x(t.$t("Classic")),1)]),_:1}),_(h,{disabled:!t.has_pro,value:"modern"},{default:w(()=>[N(x(t.$t("Modern"))+" ",1),t.has_pro?O("",!0):(v(),A("span",wTe,"("+x(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",kTe,[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(),A("div",CTe,[g("h4",null,x(t.$t("Course Instructor")),1),_(l,{label:t.$t("Instructor")},{default:w(()=>[_(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:w(()=>[(v(!0),A(ee,null,we(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:w(()=>[g("span",xTe,[g("img",{src:F.photo,alt:F.display_name},null,8,STe),g("span",null,x(F.display_name),1)]),g("span",$Te,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:w(()=>[g("div",ATe,[_(y,{"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:w(()=>[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(y,{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:w(()=>[N(x(t.$t("Show students count in course instructor view")),1)]),_:1},8,["modelValue"])):O("",!0)])]),_:1})])):O("",!0),g("div",ETe,[g("h4",null,x(t.$t("Others")),1),t.has_pro&&s.dataLoaded?(v(),D(l,{key:0,label:t.$t("Topic navigation")},{default:w(()=>[_($,{modelValue:s.form.category_ids,"onUpdate:modelValue":e[21]||(e[21]=F=>s.form.category_ids=F),creatable:!0},null,8,["modelValue"]),g("div",MTe,[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("a",{key:0,target:"_blank",rel:"noopener",href:t.$getRouteLink("admin/settings/topics-settings")},x(t.$t("Manage all topics")),9,TTe)):O("",!0)])])]),_:1},8,["label"])):O("",!0),_(l,{label:t.$t("Thumbnail / Open Graph Image (Recommended Size: 1200 x 630)")},{default:w(()=>[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",PTe,[_(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:w(()=>[_(k,null,{default:w(()=>[_(T)]),_:1})]),_:2},[s.form.cover_photo?{name:"trigger",fn:w(()=>[_(P,{class:"fcom_plain_button"},{default:w(()=>[_(k,null,{default:w(()=>[_(M)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove","onUploaded"])]),g("div",ITe,[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:w(()=>[g("div",LTe,[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:w(()=>[g("span",null,x(t.$t("Create")),1)]),_:1},8,["disabled","loading"])])]),_:1}))])]),_:1},8,["modelValue"]),Re((v(),A("div",null,[s.metaSettings&&Object.keys(s.metaSettings).length>0?(v(),A("div",OTe,[(v(!0),A(ee,null,we(s.metaSettings,F=>(v(),A("div",DTe,[g("h4",null,x(F.section_title),1),_(V,{formData:F.settings,formFields:F.fields,disableSubmit:!0},null,8,["formData","formFields"])]))),256))])):O("",!0)])),[[B,s.fetchingMetaBoxes]])])):(v(),A("div",RTe,[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,VTe)]))}const kS=ue(aTe,[["render",FTe]]),NTe={name:"SpaceIcon",props:["space_profile"]},BTe=["alt","src"],zTe={key:1,class:"fcom_emoji"},HTe={key:2,class:"fcom_shape"},UTe={key:3,class:"fcom_no_avatar"};function jTe(t,e,n,i,s,o){var a,l,c,u;const r=be;return n.space_profile.logo?(v(),A("img",{key:0,alt:t.$t("Space Logo"),src:n.space_profile.logo},null,8,BTe)):(a=n.space_profile.settings)!=null&&a.emoji?(v(),A("span",zTe,x((l=n.space_profile.settings)==null?void 0:l.emoji),1)):(c=n.space_profile.settings)!=null&&c.shape_svg?(v(),A("span",HTe,[_(r,{innerHTML:(u=n.space_profile.settings)==null?void 0:u.shape_svg},null,8,["innerHTML"])])):(v(),A("span",UTe))}const xp=ue(NTe,[["render",jTe]]),WTe={name:"SpaceCourseSelector",components:{SpaceIcon:xp},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}},YTe={key:0,class:"fcom_space_title"},qTe={key:0},GTe={key:1};function XTe(t,e,n,i,s,o){const r=H("SpaceIcon"),a=sn,l=n2,c=Jt,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:w(()=>[(v(!0),A(ee,null,we(s.formattedSpaceGroups,d=>Re((v(),D(l,{key:d.label,label:d.label},{default:w(()=>[(v(!0),A(ee,null,we(d.spaces,h=>(v(),D(a,{key:h.slug,label:h.title,disabled:o.isMemberOfSpace(h.id),value:h.id.toString()},{default:w(()=>[h.id?(v(),A("span",YTe,[_(r,{space_profile:h},null,8,["space_profile"]),g("span",null,[N(x(t.getExcerpt(h.title,50))+" ",1),h.type=="course"?(v(),A("span",qTe," ("+x(t.$t("course"))+")",1)):O("",!0)])])):(v(),A("span",GTe,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 CS=ue(WTe,[["render",XTe]]),KTe={name:"SidebarLinkForm",components:{SpaceGroupSelector:F8,LogoEmojiSelector:Z1,SpaceCourseSelector:CS,ErrorAlerts:J1},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}},ZTe={class:"fcom_form_section"},JTe={class:"fcom_help_text"},QTe={class:"fcom_help_text"},ePe={class:"fcom_help_text"},tPe={key:0},nPe={key:1};function sPe(t,e,n,i,s,o){const r=H("logo-emoji-selector"),a=ft,l=en,c=Yt,u=H("space-group-selector"),d=Li,h=ws,f=H("SpaceCourseSelector"),p=H("error-alerts"),m=He,y=tn,b=xt("loading");return v(),D(y,{onSubmit:e[8]||(e[8]=Ee(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:w(()=>[g("div",ZTe,[_(l,{label:t.$t("Link Title"),required:""},{default:w(()=>[_(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:w(()=>{var k,C;return[s.dataLoaded?(v(),D(r,{key:0,custom_svg:!0,onUpdate:e[0]||(e[0]=$=>{s.form.settings.emoji=$.emoji,s.form.logo=$.logo,s.form.settings.shape_svg=$.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:w(()=>[_(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",JTe,[_(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:w(()=>[N(x(t.$t("Open this link in new tab")),1)]),_:1},8,["modelValue"])])]),_:1},8,["label"]),_(l,{label:t.$t("Menu Group")},{default:w(()=>[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",QTe,[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:w(()=>[_(h,{modelValue:s.form.privacy,"onUpdate:modelValue":e[5]||(e[5]=k=>s.form.privacy=k)},{default:w(()=>[_(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",ePe,[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:w(()=>[_(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:w(()=>[Re((v(),D(m,{class:"fcom_primary_button",disabled:s.saving,onClick:e[7]||(e[7]=k=>o.saveSettings())},{default:w(()=>[s.form.id?(v(),A("span",tPe,x(t.$t("Update")),1)):(v(),A("span",nPe,x(t.$t("Create Link")),1))]),_:1},8,["disabled"])),[[b,s.saving]])]),_:1})])]),_:1},8,["modelValue"])}const YH=ue(KTe,[["render",sPe]]),iPe={name:"SpaceIcon"},oPe={version:"1.1",viewBox:"0 0 128 128","xml:space":"preserve"};function rPe(t,e,n,i,s,o){return v(),A("svg",oPe,[...e[0]||(e[0]=[Ra('<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 aPe=ue(iPe,[["render",rPe]]),lPe={name:"CourseIcon"},cPe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function uPe(t,e,n,i,s,o){return v(),A("svg",cPe,[...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 qH=ue(lPe,[["render",uPe]]),dPe={name:"SpaceCreateModal",components:{Drawer:tu,CreateSpaceForm:N8,CreateCourseForm:kS,SidebarLinkForm:YH,ArrowLeftBold:Qre,SpaceIcon:aPe,CourseIcon:qH,Link:pR},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})})}},hPe={class:"dialog_header"},fPe={class:"dialog_left"},pPe={class:"dialog_body"},mPe={key:0,class:"space-type-selector"},gPe={class:"space-cards"},vPe={class:"space-card-label"},_Pe={class:"space-card-label"},yPe={key:0,class:"space-card-note"},bPe={class:"space-card-label"},wPe={key:0,class:"space-card-note"},kPe={class:"dialog_footer"};function CPe(t,e,n,i,s,o){const r=H("ArrowLeftBold"),a=be,l=He,c=H("SpaceIcon"),u=H("CourseIcon"),d=H("Link"),h=H("create-space-form"),f=H("create-course-form"),p=H("sidebar-link-form"),m=H("Drawer");return v(),D(m,{modelValue:s.showCreateSpaceModal,"onUpdate:modelValue":e[5]||(e[5]=y=>s.showCreateSpaceModal=y),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:w(()=>[g("div",hPe,[g("div",fPe,[s.step!="choose_type"?(v(),D(l,{key:0,"aria-label":t.$t("Back"),onClick:e[0]||(e[0]=y=>s.step="choose_type"),text:"",size:"small"},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1})]),_:1},8,["aria-label"])):O("",!0),g("h4",null,x(o.currentTitle),1)])])]),default:w(()=>[g("div",pPe,[s.step=="choose_type"?(v(),A("div",mPe,[g("div",gPe,[g("div",{onClick:e[1]||(e[1]=y=>s.select_type="space_form"),class:q([{"is-active":s.select_type==="space_form"},"space-card"])},[_(a,{class:"space-card-icon"},{default:w(()=>[_(c)]),_:1}),g("span",vPe,x(t.$t("Discussion Space")),1)],2),g("div",{onClick:e[2]||(e[2]=y=>!!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:w(()=>[_(u)]),_:1}),g("span",_Pe,x(t.$t("Course")),1),t.hasFeature("has_course")?O("",!0):(v(),A("span",yPe,x(t.$t("Course Module is disabled")),1))],2),g("div",{onClick:e[3]||(e[3]=y=>!!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:w(()=>[_(d)]),_:1}),g("span",bPe,x(t.$t("Link")),1),t.appVars.pro?O("",!0):(v(),A("span",wPe,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:w(()=>[g("div",kPe,[_(l,{disabled:!s.select_type,class:"fcom_primary_button",onClick:e[4]||(e[4]=y=>o.handleNextStep())},{default:w(()=>[N(x(t.$t("Next")),1)]),_:1},8,["disabled"])])]),key:"0"}:void 0]),1032,["modelValue","size","has-close-confirmation","close-confirmation-message"])}const xPe=ue(dPe,[["render",CPe]]),Hs=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)})}}}),xS=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=Hs(),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=Hs();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=Hs(),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){Hs().invalidate(`user-profile:${t}`),delete this.lastFetched[t]},clearAll(){this.currentUser=null,this.profilesByUsername={},this.follows={},this.followers=[],this.loading={},this.lastFetched={};const t=Hs();t.invalidatePattern("user-profile:"),t.invalidate("user-following")}}});var SPe=Fa,$Pe=SPe["__core-js_shared__"],APe=$Pe,V3=APe,sT=function(){var t=/[^.]+$/.exec(V3&&V3.keys&&V3.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function EPe(t){return!!sT&&sT in t}var MPe=EPe,TPe=Function.prototype,PPe=TPe.toString;function IPe(t){if(t!=null){try{return PPe.call(t)}catch{}try{return t+""}catch{}}return""}var GH=IPe,LPe=LF,OPe=MPe,DPe=K1,RPe=GH,VPe=/[\\^$.*+?()[\]{}|]/g,FPe=/^\[object .+?Constructor\]$/,NPe=Function.prototype,BPe=Object.prototype,zPe=NPe.toString,HPe=BPe.hasOwnProperty,UPe=RegExp("^"+zPe.call(HPe).replace(VPe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jPe(t){if(!DPe(t)||OPe(t))return!1;var e=LPe(t)?UPe:FPe;return e.test(RPe(t))}var WPe=jPe;function YPe(t,e){return t==null?void 0:t[e]}var qPe=YPe,GPe=WPe,XPe=qPe;function KPe(t,e){var n=XPe(t,e);return GPe(n)?n:void 0}var Sp=KPe,ZPe=Sp,JPe=Fa,QPe=ZPe(JPe,"DataView"),eIe=QPe,tIe=Sp,nIe=Fa,sIe=tIe(nIe,"Map"),SS=sIe,iIe=Sp,oIe=Fa,rIe=iIe(oIe,"Promise"),aIe=rIe,lIe=Sp,cIe=Fa,uIe=lIe(cIe,"Set"),XH=uIe,dIe=Sp,hIe=Fa,fIe=dIe(hIe,"WeakMap"),pIe=fIe,Ix=eIe,Lx=SS,Ox=aIe,Dx=XH,Rx=pIe,KH=G1,$p=GH,iT="[object Map]",mIe="[object Object]",oT="[object Promise]",rT="[object Set]",aT="[object WeakMap]",lT="[object DataView]",gIe=$p(Ix),vIe=$p(Lx),_Ie=$p(Ox),yIe=$p(Dx),bIe=$p(Rx),Eu=KH;(Ix&&Eu(new Ix(new ArrayBuffer(1)))!=lT||Lx&&Eu(new Lx)!=iT||Ox&&Eu(Ox.resolve())!=oT||Dx&&Eu(new Dx)!=rT||Rx&&Eu(new Rx)!=aT)&&(Eu=function(t){var e=KH(t),n=e==mIe?t.constructor:void 0,i=n?$p(n):"";if(i)switch(i){case gIe:return lT;case vIe:return iT;case _Ie:return oT;case yIe:return rT;case bIe:return aT}return e});var ZH=Eu,wIe=IF,kIe=ZH,CIe=T8,xIe=Na,SIe=O8,$Ie=P8,AIe=PF,EIe=L8,MIe="[object Map]",TIe="[object Set]",PIe=Object.prototype,IIe=PIe.hasOwnProperty;function LIe(t){if(t==null)return!0;if(SIe(t)&&(xIe(t)||typeof t=="string"||typeof t.splice=="function"||$Ie(t)||EIe(t)||CIe(t)))return!t.length;var e=kIe(t);if(e==MIe||e==TIe)return!t.size;if(AIe(t))return!wIe(t).length;for(var n in t)if(IIe.call(t,n))return!1;return!0}var OIe=LIe;const JH=vi(OIe),DIe={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),JH(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}}},RIe={key:0,class:"fcom_social_links"},VIe=["href","title"];function FIe(t,e,n,i,s,o){const r=be,a=H("router-link");return o.hasSocialLinks?(v(),A("div",RIe,[(v(!0),A(ee,null,we(o.socialLinks,l=>(v(),A("a",{rel:"noopener nofollow",target:"_blank",href:l.url,key:l.title,title:l.title},[_(r,{innerHTML:l.icon},null,8,["innerHTML"])],8,VIe))),128)),n.isOwn&&!o.hasSocialLinks?(v(),D(a,{key:0,to:{name:"update_profile",params:{username:n.xprofile.username}}},{default:w(()=>[N(x("+ "+t.$t("Add social links")),1)]),_:1},8,["to"])):O("",!0)])):O("",!0)}const NIe=ue(DIe,[["render",FIe]]),QH=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}}}),cT=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=Hs(),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,y,b;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=((y=(m=this.feedsByContext[t])==null?void 0:m.data)==null?void 0:y.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,(b=window.fluentFrameworkApp)!=null&&b.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("newest_feed_fetched",{last_fetched_timestamp:f.last_fetched_timestamp})),f.current_user_follows&&xS().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=Hs(),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"),Hs().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}))),Hs().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))}),Hs().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--,Hs().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]="",Hs().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 y=u.get(m.id);return y?{...m,...y}: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)),Hs().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={}}}}),$S=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=Hs(),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=Hs(),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=Hs(),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=Hs();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=Hs();t.invalidatePattern("space:"),t.invalidatePattern("space-topics:"),t.invalidate("my-spaces")}}}),BIe={name:"FollowAction",props:{profile:{type:Object,required:!0},followButtonText:{type:String,default:""}},emits:["refetch"],setup(){return{userStore:xS()}},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})}}},zIe={key:0},HIe={key:1},UIe={key:0},jIe={key:1};function WIe(t,e,n,i,s,o){const r=He;return o.showFollowAction?(v(),A(ee,{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:w(()=>[s.hovering?(v(),A("span",HIe,x(t.$t("Unblock")),1)):(v(),A("span",zIe,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:w(()=>[s.hovering?(v(),A("span",jIe,x(t.$t("Unfollow")),1)):(v(),A("span",UIe,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:w(()=>[g("span",null,x(o.followBtnText),1)]),_:1},8,["onClick","loading","disabled"]))],64)):O("",!0)}const YIe=ue(BIe,[["render",WIe]]),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:NIe,FollowAction:YIe},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)}},GIe=["href"],XIe={class:"fcom_user_display_name"},KIe={key:1,class:"user_route"},ZIe=["href"],JIe={class:"fcom_user_display_name"},QIe={class:"fcom_profile_pop_avatar"},eLe={key:0,class:"fcom_prfile_tagline"},tLe={class:"fcom_level_name"},nLe={style:{display:"block"},class:"fcoml_level_sub meta_line"},sLe={class:"fcom_profile_pop_info"},iLe={class:"pop_info_header"},oLe={class:"header_name"},rLe=["href"],aLe={class:"fcom_user_display_name"},lLe={class:"fcom_user_name"},cLe={key:0,class:"header_actions"},uLe={key:0,class:"fcom_profile_pop_bio"},dLe=["title"],hLe=["title"],fLe={class:"pop_info_btns"},pLe=["href"],mLe=["href"];function gLe(t,e,n,i,s,o){const r=H("verified-sign"),a=H("UserBadge"),l=H("UserAvatar"),c=jd,u=H("follow-action"),d=H("SocialLinks"),h=Ud,f=Yo;return n.show_pop?(v(),A("span",KIe,[_(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:w(()=>[le(t.$slots,"default",{},()=>[g("a",{href:t.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[g("p",JIe,x(n.xprofile.display_name),1)],8,ZIe)])]),default:w(()=>[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:w(()=>[_(c,{sm:24,md:8},{default:w(()=>[g("div",QIe,[_(l,{xprofile:n.xprofile},null,8,["xprofile"]),o.userLevel?(v(),A("div",eLe,[g("div",tLe,x(o.userLevel.title),1),g("div",nLe,x(o.userLevel.tagline),1)])):O("",!0)])]),_:1}),_(c,{sm:24,md:16},{default:w(()=>{var p,m;return[g("div",sLe,[g("div",iLe,[g("div",oLe,[g("a",{href:t.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[g("p",aLe,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,rLe),g("span",lLe," @"+x(n.xprofile.username),1)]),n.show_follow?(v(),A("div",cLe,[_(u,{profile:n.xprofile},null,8,["profile"])])):O("",!0)]),(p=n.xprofile.meta)!=null&&p.short_description_rendered||n.xprofile.short_description_rendered?(v(),A("div",uLe,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(),A("div",{key:1,title:n.xprofile.created_at,class:"meta_line"},x(t.$t("Joined: %s",t.humanDateDiff(n.xprofile.created_at))),9,dLe)):O("",!0),n.xprofile.last_activity?(v(),A("div",{key:2,title:n.xprofile.last_activity,class:"meta_line"},x(t.$t("Last seen: %s",t.humanDateDiff(n.xprofile.last_activity))),9,hLe)):O("",!0),g("div",fLe,[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,pLe),t.appVars.has_chat&&t.hasPermission("can_initiate_message")?(v(),A("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,mLe)):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("a",{key:0,href:t.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[le(t.$slots,"default",{},()=>[g("p",XIe,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,GIe))}const la=ue(qIe,[["render",gLe]]),vLe={name:"MentionPopover",components:{UserRouteLink:la},setup(){return{userStore:xS()}},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 _Le(t,e,n,i,s,o){const r=H("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 yLe=ue(vLe,[["render",_Le]]),bLe={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)}},wLe={class:"dialog_header"},kLe={class:"dialog_left"},CLe={class:"dialog_body"},xLe={class:"dialog_footer"};function SLe(t,e,n,i,s,o){const r=He,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:w(()=>[g("div",wLe,[g("div",kLe,[g("h4",null,x(t.$t("Leave Page?")),1)])])]),footer:w(()=>[g("div",xLe,[_(r,{class:"fcom_secondary_button",onClick:o.handleCancel},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1},8,["onClick"]),_(r,{class:"fcom_primary_button",onClick:o.handleProceed},{default:w(()=>[N(x(t.$t("Leave")),1)]),_:1},8,["onClick"])])]),default:w(()=>[g("div",CLe,[g("span",null,x(s.message),1)])]),_:1},8,["modelValue","width"])}const $Le=ue(bLe,[["render",SLe]]),ALe={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")}}},ELe={class:"fcom_pagination_wrap"};function MLe(t,e,n,i,s,o){const r=$ve;return v(),A("div",ELe,[_(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 uu=ue(ALe,[["render",MLe]]),TLe={name:"ReportReviewModal",components:{Pagination:uu},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)}},PLe={class:"dialog_body"},ILe={class:"report_details"},LLe={class:"report_details_header"},OLe={class:"report_details_header_left"},DLe={class:"report_details_header_right"},RLe={key:0},VLe={key:1},FLe={key:1},NLe={class:"report_reason"},BLe=["title"],zLe={key:0,class:"report_details_body"},HLe=["textContent"],ULe=["aria-label"],jLe={class:"dialog_footer report_footer"};function WLe(t,e,n,i,s,o){const r=H("UserAvatar"),a=H("UserRouteLink"),l=Nt,c=H("Pagination"),u=He,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:w(()=>[g("div",jLe,[_(u,{class:"fcom_secondary_button",onClick:e[1]||(e[1]=h=>o.unpublishReport()),loading:s.unpublishing,disabled:!s.loading&&!s.report},{default:w(()=>[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:w(()=>[N(x(o.getPublishBtnText),1)]),_:1},8,["loading","disabled"])])]),default:w(()=>{var h,f;return[g("div",PLe,[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",ILe,[s.loading?(v(),D(l,{key:1,rows:5,animated:!0})):(v(!0),A(ee,{key:0},we(s.postReports,p=>(v(),A("div",{key:p.id,class:"report_details_item"},[g("div",LLe,[g("div",OLe,[p.reporter?(v(),D(r,{key:0,with_level:!1,xprofile:p.reporter},null,8,["xprofile"])):O("",!0)]),g("div",DLe,[!p.reporter&&!o.getReason(p.reason)?(v(),A("div",RLe,x(t.$t("Flagged automatically by the site rule")),1)):(v(),A("div",VLe,[p.reporter?(v(),D(a,{key:0,show_verified:!1,xprofile:p.reporter},null,8,["xprofile"])):(v(),A("span",FLe,x(t.$t("By System ")),1)),o.getReason(p.reason)?(v(),A(ee,{key:2},[g("span",null,x(t.$t("reported for ")),1),g("span",NLe,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,BLe)])]),p.explanation?(v(),A("div",zLe,[g("div",{textContent:x(p.explanation)},null,8,HLe)])):O("",!0)]))),128)),s.pagination.total?(v(),A("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,ULe)):O("",!0)])])]}),_:1},8,["modelValue","width","onClose"])}const YLe=ue(TLe,[["render",WLe]]),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)}},GLe={class:"dialog_header"},XLe={class:"dialog_left"},KLe={class:"dialog_body"},ZLe={class:"fcom_report_content_form"},JLe={class:"dialog_footer"};function QLe(t,e,n,i,s,o){const r=sn,a=Jt,l=en,c=ft,u=tn,d=He,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:w(()=>[g("div",GLe,[g("div",XLe,[g("h4",null,x(o.currentTitle),1)])])]),footer:w(()=>[g("div",JLe,[_(d,{class:"fcom_secondary_button",onClick:e[2]||(e[2]=f=>o.closeModal())},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1}),_(d,{class:"fcom_primary_button",onClick:e[3]||(e[3]=f=>o.validateAndSubmit()),loading:s.saving},{default:w(()=>[N(x(t.$t("Report")),1)]),_:1},8,["loading"])])]),default:w(()=>[g("div",KLe,[g("div",ZLe,[_(u,{ref:"reportForm","label-position":"top"},{default:w(()=>[_(l,{label:t.$t("Reason")},{default:w(()=>[_(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:w(()=>[(v(!0),A(ee,null,we(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:w(()=>[_(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 eOe=ue(qLe,[["render",QLe]]);/*! Element Plus v2.13.6 */var eU={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 tOe=window.fluentComAdmin.el_i18n;for(const[t,e]of Object.entries(tOe))eU.el[t]=e;const nOe={name:"PortalApplication",components:{Back:rR,SpaceCreateModal:xPe,CourseIcon:qH,AnalyticsIcon:Gae,MentionPopover:yLe,UnfinishedChangesModal:$Le,ReportReviewModal:YLe,ReportContentModal:eOe},data(){return{loading:!1,hasSearchHolder:!1,hasNotificationHolder:!1,isSmallScreen:!1,menuItems:this.appVars.portalSettingsMenus,enLang:eU}},created(){this.isSmallScreen=window.innerWidth<=1024}},sOe={class:"fcom_general_menu"},iOe=["href"],oOe={class:"el-icon fcom_arrow_icon"},rOe={class:"fcom_communities_menu fcom_admin_menu"},aOe={class:"fcom_general_menu"},lOe={class:"community_avatar"},cOe={class:"fcom_shape"},uOe={class:"community_name"},dOe={class:"fcom_general_menu"},hOe={class:"community_avatar"},fOe={class:"fcom_shape"},pOe={class:"community_name"},mOe={class:"fcom_general_menu"},gOe={class:"community_avatar"},vOe={class:"fcom_shape"},_Oe={class:"community_name"};function yOe(t,e,n,i,s,o){const r=H("router-view"),a=H("Back"),l=be,c=H("router-link"),u=H("CourseIcon"),d=H("AnalyticsIcon"),h=H("space-create-modal"),f=H("mention-popover"),p=H("unfinished-changes-modal"),m=H("report-review-modal"),y=H("report-content-modal"),b=$de;return v(),D(b,{locale:s.enLang},{default:w(()=>[_(r),(v(),D(ea,{to:"#fcom_menu_sidebar"},[g("ul",sOe,[g("li",null,[g("a",{href:t.appVars.portal_url},[g("i",oOe,[_(a)]),g("span",null,x(t.$t("Back to home")),1)],8,iOe)])]),g("div",rOe,[Object.keys(s.menuItems).length>0?(v(),A(ee,{key:0},[g("h4",null,x(t.$t("Portal Settings")),1),g("ul",aOe,[(v(!0),A(ee,null,we(s.menuItems,k=>(v(),A("li",{key:k.route,class:q("settings_inner_menu_"+k.route)},[_(c,{to:{name:k.route}},{default:w(()=>[g("div",lOe,[g("span",cOe,[_(l,{innerHTML:k.icon_svg},null,8,["innerHTML"])])]),g("span",uOe,x(k.label),1)]),_:2},1032,["to"])],2))),128))])],64)):O("",!0),t.hasFeature("has_course")&&t.hasCourseCreatorAccess()?(v(),A(ee,{key:1},[g("h4",null,x(t.$t("Course Management")),1),g("ul",dOe,[g("li",null,[_(c,{to:{name:"manage_courses"}},{default:w(()=>[g("div",hOe,[g("span",fOe,[_(l,null,{default:w(()=>[_(u)]),_:1})])]),g("span",pOe,x(t.$t("Manage Courses")),1)]),_:1})])])],64)):O("",!0),t.hasFeature("has_analytics")&&t.isAdmin()?(v(),A(ee,{key:2},[g("h4",null,x(t.$t("Reports")),1),g("ul",mOe,[g("li",null,[_(c,{to:{name:"analytics_overview"}},{default:w(()=>[g("div",gOe,[g("span",vOe,[_(l,null,{default:w(()=>[_(d)]),_:1})])]),g("span",_Oe,x(t.$t("Analytics")),1)]),_:1})])])],64)):O("",!0)])])),_(h),_(f),_(p),_(m),_(y)]),_:1},8,["locale"])}const bOe=ue(nOe,[["render",yOe]]),wOe={name:"AddMembersForm",components:{SpaceCourseSelector:CS},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()}},kOe={class:"fcom_add_members_form"},COe={key:0,class:"fcom_source_selector_wrap fcom_mb_20"},xOe={key:1,class:"fcom_import_done"},SOe={class:"fcom_done_title"},$Oe={class:"fcom_done_subtitle"},AOe={class:"fcom_import_summary"},EOe={class:"fcom_import_summary_title"},MOe={class:"fcom_import_summary_row"},TOe={class:"fcom_import_summary_row"},POe={key:0,class:"fcom_import_summary_row"},IOe={key:1,class:"fcom_import_summary_row"},LOe={key:2,class:"fcom_import_progress_wrap"},OOe={class:"fcom_help_text fcom_mb_15"},DOe={key:0,class:"fcom_muted_text fcom_mt_10"},ROe={class:"fcom_select_photo",style:{float:"left"}},VOe=["src","alt"],FOe={style:{float:"right",color:"#8492a6","font-size":"13px"}},NOe={style:{padding:"4px","text-align":"center"}},BOe={style:{margin:"0 0 8px"}},zOe={key:0},HOe={key:1},UOe={key:2},jOe={key:1,style:{margin:"4px 0 0","font-size":"12px"}},WOe={key:0,class:"fcom_help_text fcom_mb_10"},YOe=["href"],qOe={class:"fcom_help_text fcom_mb_15"},GOe={key:0},XOe={key:2},KOe={class:"fcom_spaced_flex fcom_mb_10"},ZOe={class:"fcom_csv_drop_inner"},JOe={class:"el-upload__text fcom_mt_10"},QOe={key:0},eDe={class:"el-upload__tip"},tDe={class:"fcom_spaced_flex fcom_mb_10"},nDe={class:"fcom_muted_text",style:{"margin-left":"8px"}},sDe={key:0,class:"fcom_muted_text fcom_mb_10"},iDe=["aria-label"],oDe={class:"fcom_help_text fcom_mb_15"},rDe=["aria-label"],aDe={class:"fcom_help_text fcom_mb_15"},lDe={key:0};function cDe(t,e,n,i,s,o){const r=Hd,a=ws,l=a2,c=sn,u=He,d=Jt,h=en,f=tn,p=H("SpaceCourseSelector"),m=Y1,y=Il,b=Pl,k=Yt,C=xt("loading");return v(),A("div",kOe,[!s.batchRunning&&!s.importDone?(v(),A("div",COe,[_(a,{modelValue:s.sourceMode,"onUpdate:modelValue":e[0]||(e[0]=$=>s.sourceMode=$),size:"small"},{default:w(()=>[_(r,{value:"wp_users"},{default:w(()=>[N(x(t.$t("WP Users")),1)]),_:1}),_(r,{value:"from_source"},{default:w(()=>[N(x(t.$t("From Space/Course")),1)]),_:1}),_(r,{value:"csv"},{default:w(()=>[N(x(t.$t("CSV Import")),1)]),_:1}),t.appVars.has_fluentcrm?(v(),D(r,{key:0,value:"crm_tag"},{default:w(()=>[N(x(t.$t("CRM Tag")),1)]),_:1})):O("",!0)]),_:1},8,["modelValue"])])):O("",!0),s.importDone?(v(),A("div",xOe,[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",SOe,x(t.$t("All Done!")),1),g("p",$Oe,x(t.$t("Import has been completed. You may close this now.")),1),g("div",AOe,[g("strong",EOe,x(t.$t("Import Summary")),1),g("p",MOe,x(t.$t("Total Records:"))+" "+x(s.importDone.total),1),g("p",TOe,x(n.context==="course"?t.$t("Enrolled:"):t.$t("Added:"))+" "+x(s.importDone.added),1),s.importDone.skipped?(v(),A("p",POe,x(t.$t("Skipped:"))+" "+x(s.importDone.skipped),1)):O("",!0),s.importDone.failed?(v(),A("p",IOe,x(t.$t("Failed:"))+" "+x(s.importDone.failed),1)):O("",!0)])])):s.batchRunning?(v(),A("div",LOe,[g("div",OOe,[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(),A("p",DOe,x(s.batchProcessed)+" / "+x(s.batchTotal)+" "+x(t.$t("processed")),1)):O("",!0)])):(v(),A(ee,{key:3},[s.sourceMode==="wp_users"?(v(),D(f,{key:0,onSubmit:e[5]||(e[5]=Ee(()=>{},["prevent"])),"label-position":"top"},{default:w(()=>[_(h,{label:t.$t("Users")},{default:w(()=>[_(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]=$=>s.selectedUserIds=$)},{empty:w(()=>[g("div",NOe,[g("p",BOe,[o.isEmail?(v(),A("span",zOe,[N(x(t.$t("User not registered:"))+" ",1),g("strong",null,x(s.currentSearch),1)])):s.currentSearch?(v(),A("span",HOe,x(t.$t("No matching user found.")),1)):(v(),A("span",UOe,x(t.$t("No data")),1))]),n.context==="space"?(v(),A(ee,{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]=$=>o.inviteToSpace())},{default:w(()=>[N(x(t.$t("Send Email Invitation")),1)]),_:1},8,["loading","disabled","aria-label"])):s.currentSearch?(v(),A("p",jOe,x(t.$t("Type a valid email to invite.")),1)):O("",!0)],64)):O("",!0)])]),default:w(()=>[(v(!0),A(ee,null,we(s.wpUsers,$=>(v(),D(c,{class:"fcom_with_photo_option",key:$.ID,label:`${$.display_name} (${$.user_email||$.ID})`,value:$.ID},{default:w(()=>[g("span",ROe,[g("img",{src:$.photo,alt:$.display_name},null,8,VOe),g("span",null,x($.display_name),1)]),g("span",FOe,x($.user_email||$.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:w(()=>[_(d,{modelValue:s.role,"onUpdate:modelValue":e[3]||(e[3]=$=>s.role=$),placeholder:t.$t("Select Role")},{default:w(()=>[_(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:w(()=>[s.selectedUserIds.length>1&&!t.appVars.pro?(v(),A("div",WOe,[g("p",null,[N(x(t.$t("Bulk adding requires FluentCommunity Pro."))+" ",1),t.appVars.upgrade_url?(v(),A("a",{key:0,href:t.$upgradeUrl("feature_lock_bulk_add_members"),target:"_blank"},x(t.$t("Upgrade")),9,YOe)):O("",!0)])])):O("",!0),Re((v(),D(u,{class:"fcom_primary_button",onClick:e[4]||(e[4]=$=>o.addWpUsers())},{default:w(()=>[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:w(()=>[_(h,{label:t.$t("Select Source Space or Course")},{default:w(()=>[_(p,{modelValue:s.selectedSourceId,"onUpdate:modelValue":e[6]||(e[6]=$=>s.selectedSourceId=$),placeholder_text:t.$t("Select a space or course..."),memberships:[n.target.id.toString()],onSelectedType:e[7]||(e[7]=$=>s.selectedSourceType=$),onSelectedSlug:e[8]||(e[8]=$=>s.selectedSourceSlug=$)},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]=$=>o.importFromSource())},{default:w(()=>[N(x(n.context==="course"?t.$t("Import Students"):t.$t("Import Members"))+" ",1),t.appVars.pro?O("",!0):(v(),A("span",GOe,"  ("+x(t.$t("Pro"))+")",1))]),_:1})]),_:1})):s.sourceMode==="csv"?(v(),A("div",XOe,[s.csvRows.length?(v(),A(ee,{key:1},[g("div",tDe,[g("div",null,[g("strong",null,x(s.csvFileName),1),g("span",nDe,x(s.csvRows.length)+" "+x(t.$t("contacts")),1)]),_(u,{link:"",size:"small",onClick:e[11]||(e[11]=$=>o.resetCsvImport())},{default:w(()=>[N(x(t.$t("Change")),1)]),_:1})]),_(b,{data:s.csvRows.slice(0,5),size:"small",class:"fcom_mb_10"},{default:w(()=>[_(y,{prop:"name",label:t.$t("Name"),"min-width":"120"},null,8,["label"]),_(y,{prop:"email",label:t.$t("Email"),"min-width":"160"},null,8,["label"]),_(y,{prop:"username",label:t.$t("Username"),"min-width":"110"},null,8,["label"])]),_:1},8,["data"]),s.csvRows.length>5?(v(),A("p",sDe," + "+x(s.csvRows.length-5)+" "+x(t.$t("more rows")),1)):O("",!0),_(f,{"label-position":"top"},{default:w(()=>[_(h,null,{default:w(()=>[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]=$=>s.createMissingUsers=$),class:"fcom_checkbox"},{default:w(()=>[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]=$=>s.sendWelcomeEmailCsv=$),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Send default WordPress welcome email for new users")),1)]),_:1},8,["modelValue"]),[[jt,s.createMissingUsers]])])],8,iDe)]),_:1}),g("div",oDe,[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:w(()=>[_(u,{class:"fcom_primary_button",onClick:e[14]||(e[14]=$=>o.importCsv())},{default:w(()=>[N(x(n.context==="course"?t.$t("Import Students"):t.$t("Import Members")),1)]),_:1})]),_:1})]),_:1})],64)):(v(),A(ee,{key:0},[g("div",KOe,[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]=$=>o.downloadSampleCsv())},{default:w(()=>[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:w(()=>[g("div",eDe,x(t.$t("Columns: Name, Email, Username")),1)]),default:w(()=>[g("div",ZOe,[e[22]||(e[22]=g("div",{class:"fcom_csv_drop_arrow"},"↑",-1)),g("div",JOe,[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(),A("span",QOe,"  ("+x(t.$t("Pro"))+")",1))])])]),_:1},8,["on-change","disabled"])],64))])):s.sourceMode==="crm_tag"?(v(),D(f,{key:3,"label-position":"top"},{default:w(()=>[_(h,{label:t.$t("FluentCRM Tag")},{default:w(()=>[_(d,{modelValue:s.selectedTagId,"onUpdate:modelValue":e[15]||(e[15]=$=>s.selectedTagId=$),loading:s.crmTagsLoading,placeholder:t.$t("Select a tag"),style:{width:"100%"}},{default:w(()=>[(v(!0),A(ee,null,we(s.crmTags,$=>(v(),D(c,{key:$.id,label:$.title,value:$.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","placeholder"])]),_:1},8,["label"]),_(h,null,{default:w(()=>[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]=$=>s.createMissingCrmUsers=$),class:"fcom_checkbox"},{default:w(()=>[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]=$=>s.sendWelcomeEmailCrm=$),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Send default WordPress welcome email for new users")),1)]),_:1},8,["modelValue"]),[[jt,s.createMissingCrmUsers]])])],8,rDe)]),_:1}),g("div",aDe,[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]=$=>o.addFromCrmTag())},{default:w(()=>[N(x(n.context==="course"?t.$t("Add Students"):t.$t("Add Members")),1),t.appVars.pro?O("",!0):(v(),A("span",lDe,"  ("+x(t.$t("Pro"))+")",1))]),_:1})]),_:1})):O("",!0)],64))])}const uDe=ue(wOe,[["render",cDe]]),dDe={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"}}},hDe={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"},fDe=["d"];function pDe(t,e,n,i,s,o){return v(),A("svg",hDe,[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,fDe)])}const mDe=ue(dDe,[["render",pDe]]);let gDe=0;const vDe={name:"SortControl",components:{SortDirIcon:mDe},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=++gDe;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"))}}},_De={class:"fcom_feed_filter_icon"},yDe={class:"fcom_feed_filter_value"},bDe={role:"presentation",class:"fcom_feed_filter_group"},wDe=["id"],kDe=["aria-labelledby"],CDe={role:"presentation",class:"fcom_feed_filter_group"},xDe=["id"],SDe=["aria-labelledby"],$De={class:"fcom_sort_option"},ADe={class:"fcom_sort_option"};function EDe(t,e,n,i,s,o){const r=H("SortDirIcon"),a=H("ArrowDown"),l=be,c=He,u=$r,d=Ar,h=Sr;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:w(()=>[_(d,{class:"fcom_feed_filter_menu"},{default:w(()=>[g("li",bDe,[g("span",{id:s.sortLabelId,class:"fcom_feed_filter_group_label"},x(t.$t("Sort by")),9,wDe),g("ul",{role:"group","aria-labelledby":s.sortLabelId,class:"fcom_feed_filter_group_list"},[(v(!0),A(ee,null,we(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:w(()=>[N(x(f.label),1)]),_:2},1032,["aria-checked","aria-current","class","onClick"]))),128))],8,kDe)]),g("li",CDe,[g("span",{id:s.orderLabelId,class:"fcom_feed_filter_group_label fcom_feed_filter_group_divided"},x(t.$t("Order")),9,xDe),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:w(()=>[g("span",$De,[_(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:w(()=>[g("span",ADe,[_(r,{dir:"desc"}),N(x(t.$t("Descending")),1)])]),_:1},8,["aria-checked","aria-current","class"])],8,SDe)])]),_:1})]),default:w(()=>[_(c,{text:"",class:"fcom_feed_filter_trigger","aria-label":o.ariaLabel},{default:w(()=>[g("span",_De,[_(r,{dir:n.dir},null,8,["dir"])]),g("span",yDe,x(o.currentLabel),1),_(l,{class:"fcom_feed_filter_caret"},{default:w(()=>[_(a)]),_:1})]),_:1},8,["aria-label"])]),_:1})}const MDe=ue(vDe,[["render",EDe]]),TDe={name:"ExportIcon"},PDe={viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function IDe(t,e,n,i,s,o){return v(),A("svg",PDe,[...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 tU=ue(TDe,[["render",IDe]]),LDe={name:"CourseMembers",props:["course"],components:{Search:Qb,UserRouteLink:la,Pagination:uu,AddMembersForm:uDe,ExportIcon:tU,SortControl:MDe},setup(){return{uiStore:QH()}},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()}},ODe={class:"fcom_course_members"},DDe={class:"fcom_course_member_header"},RDe={class:"fcom_course_member_actions"},VDe={key:0},FDe={key:1},NDe={class:"search_member fcom_mb_20"},BDe={class:"feed_filters"},zDe={class:"table_user_card"},HDe={class:"card_avatar"},UDe={class:"card_info"},jDe={class:"card_name"},WDe={key:0,class:"meta_line"},YDe={class:"progress_wrap"},qDe=["title"],GDe=["title"];function XDe(t,e,n,i,s,o){const r=H("ExportIcon"),a=be,l=He,c=H("Search"),u=ft,d=H("SortControl"),h=H("UserAvatar"),f=H("UserRouteLink"),p=Il,m=a2,y=H("MoreFilled"),b=$r,k=Ar,C=Sr,$=Pl,S=H("pagination"),M=H("add-members-form"),P=Va,T=xt("loading");return v(),A("div",ODe,[g("div",DDe,[g("h3",null,x(t.$t("Course Students")),1),g("div",RDe,[t.hasCourseCreatorAccess()?(v(),D(l,{key:0,class:"fcom_secondary_button",loading:s.exporting,onClick:e[0]||(e[0]=I=>o.exportStudents())},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),t.has_pro?(v(),A("span",VDe,x(t.$t("Export")),1)):(v(),A("span",FDe,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:w(()=>[N(x(t.$t("Add Student")),1)]),_:1})):O("",!0)])]),g("div",NDe,[_(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:w(()=>[_(a,null,{default:w(()=>[_(c)]),_:1})]),_:1},8,["onKeydown","onInput","modelValue","onClear","placeholder"])]),g("div",BDe,[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($,{data:s.students,style:{width:"100%","border-radius":"8px"},"empty-text":t.$t("No Students Found")},{default:w(()=>[_(p,{prop:"ID",label:t.$t("Name"),"min-width":"200"},{default:w(I=>{var L;return[g("div",zDe,[g("div",HDe,[_(h,{xprofile:I.row},null,8,["xprofile"])]),g("div",UDe,[g("div",jDe,[_(f,{show_badge:!0,xprofile:I.row},null,8,["xprofile"])]),I.row.short_description?(v(),A("div",WDe,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:w(I=>[g("div",YDe,[_(m,{class:"fcom_progress",percentage:parseInt(I.row.progress)},null,8,["percentage"])])]),_:1},8,["label"]),_(p,{width:"160",label:t.$t("Start Date")},{default:w(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:w(I=>[g("div",{title:I.row.last_activity},x(t.humanDateDiff(I.row.last_activity)),9,GDe)]),_:1},8,["label"]),_(p,{width:"60"},{default:w(I=>[t.hasCourseCreatorAccess()?(v(),D(C,{key:0,trigger:"click"},{dropdown:w(()=>[_(k,null,{default:w(()=>[O("",!0),_(b,{onClick:L=>o.removeStudentPrompt(I.row)},{default:w(()=>[N(x(t.$t("Remove")),1)]),_:1},8,["onClick"])]),_:2},1024)]),default:w(()=>[_(l,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu",size:"small",text:""},{default:w(()=>[_(a,null,{default:w(()=>[_(y)]),_: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:w(()=>[g("h4",null,x(t.$t("Add Student")),1)]),default:w(()=>[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 KDe=ue(LDe,[["render",XDe]]),ZDe={name:"ViewQuizResult",props:["result","course"],emits:["close","updateResult"],components:{Check:q4},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},isSingleChoice(t){return t.type==="single_choice"},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")})}}},JDe={class:"dialog_header"},QDe={class:"dialog_left"},eRe={class:"fcom_view_quiz_result"},tRe={class:"fcom_result_details"},nRe={class:"fcom_questions_wrap"},sRe={key:0,class:"fcom_question_image"},iRe={class:"fcom_question_header"},oRe=["innerHTML"],rRe={class:"fcom_question_body"},aRe={key:0,class:"correct_text"},lRe={key:1,class:"correct_text"},cRe={class:"fcom_written_answer_answer"},uRe={class:"fcom_user_answer_text"},dRe={key:0,class:"correct_text"},hRe={key:1,class:"correct_text"},fRe={class:"fcom_question_options"},pRe={key:2,class:"question_help_text"},mRe={class:"fcom_result_info"},gRe={class:"result_info_item"},vRe={class:"left_side"},_Re={class:"sub_title"},yRe={class:"right_side"},bRe={class:"result_info_item"},wRe={class:"left_side"},kRe={class:"title"},CRe={class:"sub_title"},xRe={class:"result_info_item"},SRe={class:"left_side"},$Re={class:"title"},ARe={class:"sub_title"},ERe={class:"result_info_item"},MRe={class:"left_side"},TRe={class:"title"},PRe={class:"score"},IRe={class:"right_side"},LRe={class:"title"},ORe={class:"score"},DRe={class:"result_info_item"},RRe={class:"left_side"},VRe={class:"title"},FRe={class:"dialog_footer"};function NRe(t,e,n,i,s,o){const r=Wo,a=H("Check"),l=be,c=H("Close"),u=Yt,d=H("UserRouteLink"),h=H("UserAvatar"),f=sn,p=Jt,m=He,y=$s;return v(),D(y,{modelValue:s.openModal,"onUpdate:modelValue":e[1]||(e[1]=b=>s.openModal=b),"close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,"modal-class":"fcom_common_dialog result_dialog",onClose:o.closeModal},{header:w(()=>[g("div",JDe,[g("div",QDe,[g("h4",null,x(t.$t("Quiz Result")),1)])])]),footer:w(()=>[g("div",FRe,[_(m,{class:"fcom_secondary_button",onClick:o.closeModal},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1},8,["onClick"]),_(m,{class:"fcom_primary_button",onClick:o.updateResult},{default:w(()=>[N(x(t.$t("Update Result")),1)]),_:1},8,["onClick"])])]),default:w(()=>{var b;return[g("div",eRe,[g("div",tRe,[g("div",nRe,[(v(!0),A(ee,null,we(o.questions,k=>{var C;return v(),A(ee,{key:k.slug},[o.showQuestion(k)?(v(),A("div",{key:0,class:q(["fcom_question",k.type])},[o.showQuestionImage(k)?(v(),A("div",sRe,[_(r,{src:k.image_url},null,8,["src"])])):O("",!0),g("div",iRe,[g("div",{innerHTML:k.label_rendered,class:"fcom_question_label"},null,8,oRe)]),g("div",rRe,[o.isWrittenAnswer(k)?(v(),A(ee,{key:0},[g("div",{class:q(["fcom_is_correct",o.freeTextBadgeClass(k)])},[o.isExactMatchQuestion(k)?(v(),A("p",aRe,[o.isQuestionCorrect(k)?(v(),A(ee,{key:0},[_(l,null,{default:w(()=>[_(a)]),_:1}),N(" "+x(t.$t("Correct")),1)],64)):(v(),A(ee,{key:1},[_(l,null,{default:w(()=>[_(c)]),_:1}),N(" "+x(t.$t("Incorrect")),1)],64))])):(v(),A("p",lRe,[_(l,null,{default:w(()=>[_(a)]),_:1}),N(" "+x(t.$t("Answered")),1)]))],2),g("div",cRe,[g("div",uRe,x((C=s.userAnswers[k.slug])==null?void 0:C.user_answer),1)])],64)):(v(),A(ee,{key:1},[g("div",{class:q(["fcom_is_correct",o.isQuestionCorrect(k)?"correct":"incorrect"])},[o.isQuestionCorrect(k)?(v(),A("p",dRe,[_(l,null,{default:w(()=>[_(a)]),_:1}),N(" "+x(t.$t("Correct")),1)])):(v(),A("p",hRe,[_(l,null,{default:w(()=>[_(c)]),_:1}),N(" "+x(t.$t("Incorrect")),1)]))],2),g("div",fRe,[(v(!0),A(ee,null,we(k.options,$=>(v(),A("div",{key:$.label,class:"fcom_question_option"},[_(u,{class:q({single_choice:o.isSingleChoice(k)}),"model-value":o.isOptionSelected(k,$),onChange:S=>o.handleOptionChange(k,$)},{default:w(()=>[N(x($.label),1)]),_:2},1032,["class","model-value","onChange"])]))),128))])],64)),k.help_text?(v(),A("div",pRe,x(k.help_text),1)):O("",!0)])],2)):O("",!0)],64)}),128))])]),g("div",mRe,[g("div",gRe,[g("div",vRe,[_(d,{show_badge:!0,xprofile:s.xprofile},null,8,["xprofile"]),g("div",_Re,x(t.$t("Attempts")+": "+n.result.meta.attempts),1)]),g("div",yRe,[_(h,{xprofile:s.xprofile,with_level:!1},null,8,["xprofile"])])]),g("div",bRe,[g("div",wRe,[g("div",kRe,x(n.result.lesson.title),1),g("div",CRe,x((b=n.course)==null?void 0:b.title),1)])]),g("div",xRe,[g("div",SRe,[g("div",$Re,x(t.$t("Submitted")),1),g("div",ARe,x(t.smartDate(n.result.updated_at,!0)),1)])]),g("div",ERe,[g("div",MRe,[g("div",TRe,x(t.$t("Score")),1),g("div",PRe,x(n.result.score+"%"),1)]),g("div",IRe,[g("div",LRe,x(t.$t("Correct")),1),g("div",ORe,x(n.result.meta.correct_answers+"/"+n.result.meta.total_questions),1)])]),g("div",DRe,[g("div",RRe,[g("div",VRe,x(t.$t("Did the student pass or fail?")),1),_(p,{modelValue:s.currentStatus,"onUpdate:modelValue":e[0]||(e[0]=k=>s.currentStatus=k),placeholder:t.$t("-- Select --")},{default:w(()=>[(v(!0),A(ee,null,we(Object.keys(s.statuses),k=>(v(),D(f,{key:k,label:s.statuses[k],value:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])])])])]}),_:1},8,["modelValue","width","onClose"])}const BRe=ue(ZDe,[["render",NRe]]),zRe={name:"QuizResults",props:["course","course_id"],components:{UserRouteLink:la,Pagination:uu,ViewQuizResult:BRe,Search:Qb,ExportIcon:tU},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()}},HRe={class:"fcom_course_members"},URe={class:"fcom_course_member_header"},jRe={key:0,class:"fcom_course_member_actions"},WRe={class:"search_member"},YRe={class:"feed_filters"},qRe={id:"feed_short_by",class:"fcom_feed_filter_label"},GRe={class:"table_user_card"},XRe={class:"card_avatar"},KRe={class:"card_info"},ZRe={class:"card_name"},JRe={class:"meta_line"};function QRe(t,e,n,i,s,o){const r=H("ExportIcon"),a=be,l=He,c=H("Search"),u=ft,d=sn,h=Jt,f=H("UserAvatar"),p=H("UserRouteLink"),m=Il,y=hi,b=Pl,k=H("pagination"),C=H("ViewQuizResult"),$=xt("loading");return v(),A("div",HRe,[g("div",URe,[g("h3",null,x(t.$t("Quiz Results")),1),t.has_pro?(v(),A("div",jRe,[_(l,{class:"fcom_secondary_button",loading:s.exporting,onClick:e[0]||(e[0]=S=>o.exportResults())},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),g("span",null,x(t.$t("Export")),1)]),_:1},8,["loading"])])):O("",!0)]),g("div",WRe,[_(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:w(()=>[_(a,null,{default:w(()=>[_(c)]),_:1})]),_:1},8,["onClear","onKeydown","onInput","modelValue","placeholder"])]),g("div",YRe,[e[4]||(e[4]=g("div",{class:"fcom_feed_divider"},null,-1)),g("span",qRe,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:w(()=>[_(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(b,{data:s.results,style:{width:"100%","border-radius":"8px"},"empty-text":t.$t("No Results Found")},{default:w(()=>[_(m,{prop:"ID",label:t.$t("Name & Quiz"),"min-width":"260"},{default:w(S=>{var M;return[g("div",GRe,[g("div",XRe,[_(f,{xprofile:S.row.xprofile},null,8,["xprofile"])]),g("div",KRe,[g("div",ZRe,[_(p,{show_badge:!0,xprofile:S.row.xprofile},null,8,["xprofile"])]),g("div",JRe,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:w(S=>[N(x(t.smartDate(S.row.updated_at,!0)),1)]),_:1},8,["label"]),_(m,{width:"120",label:t.$t("Score")},{default:w(S=>[N(x(S.row.score)+"% ",1)]),_:1},8,["label"]),_(m,{width:"120",label:t.$t("Result")},{default:w(S=>[_(y,{type:o.getTagType(S.row.status),size:"small"},{default:w(()=>[N(x(o.getResultText(S.row.status)),1)]),_:2},1032,["type"])]),_:1},8,["label"]),_(m,{width:"160",label:t.$t("Actions")},{default:w(S=>[_(l,{class:"fcom_secondary_button",onClick:M=>o.isOpenResult(S.row)},{default:w(()=>[N(x(t.$t("View")),1)]),_:1},8,["onClick"])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])),[[$,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 eVe=ue(zRe,[["render",QRe]]),tVe={name:"ChatIcon"},nVe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function sVe(t,e,n,i,s,o){return v(),A("svg",nVe,[...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 nU=ue(tVe,[["render",sVe]]),iVe={name:"HeartIcon",props:{filled:{default:!1}}},oVe={key:0,viewBox:"0 0 24 24","aria-hidden":"true"},rVe={key:1,viewBox:"0 0 24 24","aria-hidden":"true"};function aVe(t,e,n,i,s,o){return n.filled?(v(),A("svg",oVe,[...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(),A("svg",rVe,[...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 B2=ue(iVe,[["render",aVe]]),lVe={name:"ImageIcon"},cVe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function uVe(t,e,n,i,s,o){return v(),A("svg",cVe,[...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 sU=ue(lVe,[["render",uVe]]),dVe={name:"PollIcon"},hVe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function fVe(t,e,n,i,s,o){return v(),A("svg",hVe,[...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 pVe=ue(dVe,[["render",fVe]]),mVe={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)}}},gVe={class:"fcom_compose_app_form"},vVe={class:"fcom_app_header"},_Ve={class:"fcom_app_options"},yVe={class:"fcom_app_pref"},bVe={class:"fcom_app_footer"},wVe={style:{"font-weight":"500",color:"var(--el-text-color-regular)","font-size":"14px"}};function kVe(t,e,n,i,s,o){const r=He,a=ft,l=H("Plus"),c=be,u=Yt,d=Wd;return v(),A("div",gVe,[g("div",vVe,[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:w(()=>[N(x(t.$t("cancel")),1)]),_:1})])]),g("div",_Ve,[(v(!0),A(ee,null,we(n.form.options,(h,f)=>(v(),A("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:w(()=>[_(r,{onClick:p=>o.removeOption(f),text:"",size:"small"},{default:w(()=>[...e[3]||(e[3]=[N("x",-1)])]),_:1},8,["onClick"])]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","placeholder"])]))),128)),g("div",yVe,[_(r,{onClick:o.addOption,text:"",size:"small"},{default:w(()=>[_(c,null,{default:w(()=>[_(l)]),_:1}),g("span",null,x(t.$t("Add More")),1)]),_:1},8,["onClick"])])]),g("div",bVe,[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:w(()=>[N(x(t.$t("Users can choose multiple options")),1)]),_:1},8,["modelValue"])),e[4]||(e[4]=g("br",null,null,-1)),g("label",wVe,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 CVe=ue(mVe,[["render",kVe]]),xVe={name:"GiphyIcon"},SVe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function $Ve(t,e,n,i,s,o){return v(),A("svg",SVe,[...e[0]||(e[0]=[Ra('<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 AVe=ue(xVe,[["render",$Ve]]);var EVe=Fa,MVe=function(){return EVe.Date.now()},TVe=MVe,PVe=/\s/;function IVe(t){for(var e=t.length;e--&&PVe.test(t.charAt(e)););return e}var LVe=IVe,OVe=LVe,DVe=/^\s+/;function RVe(t){return t&&t.slice(0,OVe(t)+1).replace(DVe,"")}var VVe=RVe,FVe=G1,NVe=X1,BVe="[object Symbol]";function zVe(t){return typeof t=="symbol"||NVe(t)&&FVe(t)==BVe}var z2=zVe,HVe=VVe,uT=K1,UVe=z2,dT=0/0,jVe=/^[-+]0x[0-9a-f]+$/i,WVe=/^0b[01]+$/i,YVe=/^0o[0-7]+$/i,qVe=parseInt;function GVe(t){if(typeof t=="number")return t;if(UVe(t))return dT;if(uT(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=uT(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=HVe(t);var n=WVe.test(t);return n||YVe.test(t)?qVe(t.slice(2),n?2:8):jVe.test(t)?dT:+t}var XVe=GVe,KVe=K1,F3=TVe,hT=XVe,ZVe="Expected a function",JVe=Math.max,QVe=Math.min;function eFe(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(ZVe);e=hT(e)||0,KVe(n)&&(u=!!n.leading,d="maxWait"in n,o=d?JVe(hT(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(b,e),u?f(M):r}function m(M){var P=M-l,T=M-c,I=e-P;return d?QVe(I,o-T):I}function y(M){var P=M-l,T=M-c;return l===void 0||P>=e||P<0||d&&T>=o}function b(){var M=F3();if(y(M))return k(M);a=setTimeout(b,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 $(){return a===void 0?r:k(F3())}function S(){var M=F3(),P=y(M);if(i=arguments,s=this,l=M,P){if(a===void 0)return p(l);if(d)return clearTimeout(a),a=setTimeout(b,e),f(l)}return a===void 0&&(a=setTimeout(b,e)),r}return S.cancel=C,S.flush=$,S}var tFe=eFe;const nFe=vi(tFe),sFe={name:"Giphy",components:{GiphyIcon:AVe},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:nFe(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()}}},iFe={class:"fcom_giphy_composer"},oFe={class:"search-container"},rFe=["onLoad","src","alt","onClick"],aFe={key:0,class:"img_loading"},lFe={key:1,class:"no_result"};function cFe(t,e,n,i,s,o){const r=ft,a=jd,l=Ud,c=H("GiphyIcon"),u=be,d=He,h=Yo,f=xt("loading");return v(),A("div",iFe,[_(h,{placement:"bottom-end",width:300,persistent:!1,trigger:"click",teleported:!1,"popper-class":"fcom_giphy_popover fcom_menu_below_nav",ref:"popover"},{reference:w(()=>[_(d,{"aria-label":t.$t("Pick GIF"),text:"",onClick:o.handleGiphyClick},{default:w(()=>[_(u,{class:q(["fcom_apps_icon"])},{default:w(()=>[_(c)]),_:1})]),_:1},8,["aria-label","onClick"])]),default:w(()=>[Re((v(),A("div",oFe,[_(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:w(()=>[(v(!0),A(ee,null,we(s.gifs,p=>(v(),D(a,{span:12,key:p.id,class:"gif_item"},{default:w(()=>[g("img",{alt:"",onLoad:m=>p.loaded=!0,src:p.images.preview_gif.url,onClick:m=>o.selectGiphy(p)},null,40,rFe),p.loaded?O("",!0):(v(),A("p",aFe))]),_:2},1024))),128))]),_:1})):(v(),A("p",lFe,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=ue(sFe,[["render",cFe]]),dFe={name:"VideoIcon"},hFe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function fFe(t,e,n,i,s,o){return v(),A("svg",hFe,[...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 pFe=ue(dFe,[["render",fFe]]),mFe={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(){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 e=this.getStableMediaId(),n=await this.withTimeout(this.$get("fluent-player/video-content/"+e,{...this.media,media_id:e,player_instance_key:this.getPlayerInstanceKey()}),this.getFallbackTiming("content_timeout_ms",1e4));if(t!==this.guardGeneration)return;n.html?(this.html=n.html,this.$nextTick(()=>{if(t!==this.guardGeneration)return;const i=this.$el&&this.$el.querySelector(".fluent-player");if(!i){this.fallBack("player markup missing");return}this.startFallbackGuard(i,n.media)})):this.$emit("load-failed")}catch(e){if(t!==this.guardGeneration)return;console.warn("Failed to load fluent-player assets:",e),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(b=>e.addEventListener(b,r));let l=null;const c=()=>{const b=e.querySelector("iframe");b&&b!==l&&(l=b,l.addEventListener("load",r),r())};c();let u=null;const d=()=>{u&&(clearInterval(u),u=null)},h=()=>{u||(u=setInterval(y,o))},f="IntersectionObserver"in window?new IntersectionObserver(b=>{const k=b[b.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(b=>e.removeEventListener(b,r)),l&&l.removeEventListener("load",r),f&&f.disconnect()},y=()=>{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{}})}}},gFe={class:"fluent-player-preview"},vFe={key:0,class:"player-container"},_Fe=["innerHTML"];function yFe(t,e,n,i,s,o){const r=Nt;return v(),A("div",gFe,[s.html?(v(),A("div",vFe,[g("div",{innerHTML:s.html},null,8,_Fe)])):O("",!0),s.loading?(v(),D(r,{key:1,animated:"",rows:5})):O("",!0)])}const iU=ue(mFe,[["render",yFe],["__scopeId","data-v-f5d37d95"]]),bFe={name:"TuneIcon"},wFe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",fill:"none","aria-hidden":"true",focusable:"false"};function kFe(t,e,n,i,s,o){return v(),A("svg",wFe,[...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 CFe=ue(bFe,[["render",kFe]]),xFe={name:"AudioList",components:{FluentPlayerPreview:iU,TuneIcon:CFe,Close:Bo},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}}},SFe={class:"fcom_audio_list"},$Fe={key:1,class:"fcom_audio_native_wrap"},AFe={class:"fcom_audio_native",controls:"",preload:"metadata"},EFe=["src","type"],MFe=["aria-label","onClick"],TFe=["aria-label","onClick"];function PFe(t,e,n,i,s,o){const r=H("fluent-player-preview"),a=H("tune-icon"),l=H("Close"),c=be;return v(),A("div",SFe,[(v(!0),A(ee,null,we(n.audios,(u,d)=>(v(),A("div",{key:o.audioKey(u,d),class:"fcom_audio_player_wrap"},[s.failedItems[u.media_id||d]?(v(),A("div",$Fe,[g("audio",AFe,[g("source",{src:o.audioUrl(u),type:o.audioType(u)},null,8,EFe)])])):(v(),D(r,{key:0,media:o.playerMediaFor(u),onLoadFailed:h=>o.onLoadFailed(u.media_id||d)},null,8,["media","onLoadFailed"])),n.editable?(v(),A(ee,{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,MFe),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:w(()=>[_(l)]),_:1})],8,TFe)],64)):O("",!0)]))),128))])}const oU=ue(xFe,[["render",PFe]]),IFe={name:"MediaPreview",components:{Postcard:Sle,FluentPlayerPreview:iU,AudioList:oU},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)}}},LFe={key:0,class:"feed_media feed_media_audio_list"},OFe={key:0},DFe={key:1},RFe=["innerHTML"],VFe={key:2,class:"native_audio_wrapper"},FFe=["preload"],NFe=["src","type"],BFe=["controls","preload","poster"],zFe=["src","type"],HFe={key:4,class:"native_video_wrapper"},UFe={key:1,class:"fcom_media_load_error"},jFe=["href"],WFe={key:0,class:"feed_media_image"},YFe={key:1,class:"feed_media_content"},qFe={class:"media_domain"},GFe={class:"feed_media_title"},XFe={key:0,class:"feed_media_description"},KFe={class:"feed_meta_desc"};function ZFe(t,e,n,i,s,o){const r=H("audio-list"),a=H("fluent-player-preview"),l=Wo,c=Nt;return o.audioMedias.length?(v(),A("div",LFe,[_(r,{feed:n.feed,audios:o.audioMedias},null,8,["feed","audios"])])):(v(),A("div",{key:1,class:q(["feed_media","feed_media_"+o.mediaWrapperType])},[o.isVideoMedia?(v(),A(ee,{key:0},[o.hasFluentPlayer&&o.isSupportedByFluentPlayer()&&!s.fluentPlayerFailed?(v(),A("div",OFe,[_(a,{media:o.playerMedia,onLoadFailed:e[0]||(e[0]=u=>s.fluentPlayerFailed=!0)},null,8,["media"])])):o.media.html?(v(),A("div",DFe,[g("div",{class:"feed_media_ext_video",innerHTML:o.media.html},null,8,RFe)])):o.media.url&&o.isAudioUrl(o.media.url)?(v(),A("div",VFe,[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,NFe)],8,FFe)])):o.media.url&&!s.videoFailed?(v(),A("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,zFe)],40,BFe),s.isPlaying?O("",!0):(v(),A("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(),A("div",HFe,[o.media.thumbnail?(v(),D(l,{key:0,src:o.media.thumbnail,alt:"",style:{width:"100%"}},null,8,["src"])):(v(),A("p",UFe,x(t.$t("This video could not be played.")),1))])):O("",!0)],64)):o.media.type=="image"||o.media.is_uploaded?(v(),A("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:w(()=>[_(c,{animated:!0})]),_:1},8,["style","src","previewSrcList","onError","class"])):O("",!0)],2)):(v(),A("a",{key:2,href:o.toAbsoluteUrl(o.media.url),target:"_blank",rel:"noopener",class:"feed_media_link"},[o.media.image&&!s.is_error?(v(),A("div",WFe,[_(l,{onError:e[6]||(e[6]=u=>o.handleImageError()),style:{width:"100%"},src:o.media.image},{error:w(()=>[...e[8]||(e[8]=[g("span",null,null,-1)])]),_:1},8,["src"])])):O("",!0),o.media.title||o.media.url?(v(),A("div",YFe,[g("div",qFe,x(o.getDomainName(o.media.url)),1),g("div",GFe,x(t.getExcerpt(o.media.title||o.media.url,88)),1),o.media.description?(v(),A("div",XFe,[g("div",KFe,x(t.getExcerpt(o.media.description,160)),1)])):O("",!0)])):O("",!0)],8,jFe))],2))}const Ap=ue(IFe,[["render",ZFe],["__scopeId","data-v-de1ae8ac"]]),fT={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}},pT=[{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}],JFe={name:"FluentPlayerUploader",components:{UploadFilled:Z4},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 fT[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 fT[this.uploadKind].pattern.test(t.name||"")?!0:(this.$handleError(this.kindErrorMessage),!1)},async handleUrlSubmit(){if(!this.videoUrl)return;const t=pT.some(i=>i.name==="file"&&i.regex.test(this.videoUrl)),e=pT.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}}},QFe=["element-loading-text"],eNe={key:0,class:"upload-options"},tNe={class:"uploader-content"},nNe={class:"el-upload__text"},sNe={key:1,class:"url-input-section"};function iNe(t,e,n,i,s,o){const r=H("upload-filled"),a=be,l=He,c=Y1,u=ft,d=xt("loading");return Re((v(),A("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(),A("div",eNe,[_(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:w(()=>[g("div",tNe,[_(a,{class:"el-icon--upload"},{default:w(()=>[_(r)]),_:1}),g("div",nNe,[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:w(()=>[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(),A("div",sNe,[_(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:w(()=>[_(l,{onClick:o.handleUrlSubmit,loading:s.processing},{default:w(()=>[N(x(t.$t("Embed")),1)]),_:1},8,["onClick","loading"])]),_:1},8,["modelValue","placeholder"])]))],8,QFe)),[[d,s.processing]])}const oNe=ue(JFe,[["render",iNe]]),rNe={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:Ap,FluentPlayerUploader:oNe},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()}},aNe={key:0},lNe={key:0,class:"fcom_media_editor_actions"},cNe={key:1,class:"fcom_media_editor fcom_media_embeder"},uNe={key:0},dNe={key:1},hNe={key:2,class:"fcom_course_media"};function fNe(t,e,n,i,s,o){var f;const r=He,a=Hd,l=ws,c=ft,u=H("fluent-player-uploader"),d=H("media-preview"),h=xt("loading");return s.appReady?Re((v(),A("div",aNe,[n.has_iframe||o.hasUpload?(v(),A("div",lNe,[o.showPreview?(v(),D(r,{key:0,onClick:e[0]||(e[0]=p=>s.showInput=!0),size:"small",text:""},{default:w(()=>[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:w(()=>[_(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(),A("div",hNe,[_(d,{media_item:n.media},null,8,["media_item"])])):(v(),A("div",cNe,[n.media.type=="iframe_html"&&n.has_iframe?(v(),A(ee,{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:w(()=>[N(x(t.$t("Embed")),1)]),_:1})],64)):(v(),A(ee,{key:1},[g("h3",null,x(o.editorTitle),1),o.hasFluentPlayerInstalled&&n.media.type==="upload"?(v(),A("p",uNe,x(o.uploadHint),1)):(v(),A("p",dNe,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:w(()=>[_(r,{onClick:o.fetchData,class:"fcom_primary_button"},{default:w(()=>[N(x(t.$t("Embed")),1)]),_:1},8,["onClick"])]),_:1},8,["onKeydown","modelValue","placeholder"]))],64))]))])),[[h,s.fetching]]):O("",!0)}const hv=ue(rNe,[["render",fNe]]),pNe={name:"VideoEmbeder",emits:["embeded"],props:["is_admin","space"],components:{MediaEmbeder:hv,VideoIcon:pFe},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())}}},mNe={class:"fcom_video_embeder"};function gNe(t,e,n,i,s,o){const r=H("VideoIcon"),a=be,l=He,c=H("media-embeder"),u=$s;return v(),A("div",mNe,[_(l,{"aria-label":t.$t("Add Video"),text:"",onClick:o.show},{default:w(()=>[_(a,{class:q(["fcom_apps_icon"])},{default:w(()=>[_(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:w(()=>[_(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 vNe=ue(pNe,[["render",gNe]]),_Ne={name:"AudioEditModal",components:{ImageUploader:Ll,EditPen:dR,Delete:Jb},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}}}},yNe={class:"fcom_audio_edit"},bNe={id:"fcom_audio_name_label",class:"fcom_audio_edit__label"},wNe={class:"fcom_audio_edit__label"},kNe={class:"fcom_audio_edit__thumb_row"},CNe={class:"fcom_image_uploader_wrapper"},xNe={class:"fcom_sr_only"};function SNe(t,e,n,i,s,o){const r=ft,a=Wo,l=H("EditPen"),c=be,u=He,d=H("Delete"),h=H("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:w(()=>[_(u,{class:"fcom_secondary_button",onClick:e[2]||(e[2]=p=>t.$emit("update:visible",!1))},{default:w(()=>[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:w(()=>[N(x(t.$t("Save")),1)]),_:1},8,["loading","disabled","onClick"])]),default:w(()=>[g("div",yNe,[g("label",bNe,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",wNe,x(t.$t("Thumbnail")),1),g("div",kNe,[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",CNe,[_(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:w(()=>[_(c,null,{default:w(()=>[_(d)]),_:1}),g("span",xNe,x(t.$t("Remove Thumbnail")),1)]),_:2},[s.localPoster?{name:"trigger",fn:w(({loading:p})=>[_(u,{class:"fcom_plain_button",loading:p,disabled:p,"aria-label":t.$t("Change Thumbnail"),title:t.$t("Change Thumbnail")},{default:w(()=>[_(c,null,{default:w(()=>[_(l)]),_:1})]),_:1},8,["loading","disabled","aria-label","title"])]),key:"0"}:void 0]),1032,["can_remove"])])])])]),_:1},8,["model-value","title"])}const $Ne=ue(_Ne,[["render",SNe]]),ANe={name:"MusicIcon"},ENe={width:"22",height:"22",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",focusable:"false"};function MNe(t,e,n,i,s,o){return v(),A("svg",ENe,[...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 TNe=ue(ANe,[["render",MNe]]),PNe={name:"AudioUploadButton",components:{MusicIcon:TNe},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 INe(t,e,n,i,s,o){const r=H("MusicIcon"),a=be,l=He;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:w(()=>[_(a,{class:"fcom_status_img_icon"},{default:w(()=>[_(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 LNe=ue(PNe,[["render",INe]]),ONe={name:"DocumentsUploader",components:{UploadFilled:Z4,Document:N1},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))}}},DNe={class:"fcom_documents_uploader"},RNe={class:"el-upload__text"},VNe={key:0},FNe={class:"fcom_document_lists"},NNe={class:"fcom_each_document"},BNe={class:"fcom_document_info"},zNe={class:"fcom_document_icon"},HNe={class:"fcom_document_title"},UNe={class:"fcom_document_actions"};function jNe(t,e,n,i,s,o){const r=H("UploadFilled"),a=be,l=Y1,c=H("Document"),u=He;return v(),A("div",DNe,[_(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:w(()=>[_(a,{class:"el-icon--upload"},{default:w(()=>[_(r)]),_:1}),g("div",RNe,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(),A("div",VNe,[g("div",FNe,[(v(!0),A(ee,null,we(o.uploadingFiles,d=>(v(),A("div",NNe,[g("div",BNe,[g("div",zNe,[_(a,null,{default:w(()=>[_(c)]),_:1})]),g("span",HNe,x(d.name),1)]),g("div",UNe,[_(u,{text:"",size:"small",loading:!0},{default:w(()=>[N(x(t.$t("Uploading...")),1)]),_:1})])]))),256))])])):O("",!0)])}const rU=ue(ONe,[["render",jNe]]),WNe={name:"PdfIcon"},YNe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function qNe(t,e,n,i,s,o){return v(),A("svg",YNe,[...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 GNe=ue(WNe,[["render",qNe]]),XNe={name:"ZipIcon"},KNe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function ZNe(t,e,n,i,s,o){return v(),A("svg",KNe,[...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 JNe=ue(XNe,[["render",ZNe]]),QNe={name:"AudioIcon"},eBe={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(),A("svg",eBe,[...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 nBe=ue(QNe,[["render",tBe]]),sBe={name:"DocIcon"},iBe={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(),A("svg",iBe,[...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 rBe=ue(sBe,[["render",oBe]]),aBe={name:"VideoFileIcon"},lBe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function cBe(t,e,n,i,s,o){return v(),A("svg",lBe,[...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=ue(aBe,[["render",cBe]]),dBe={name:"DocumentLists",components:{Document:N1,Download:Vae,PdfIcon:GNe,ImageIcon:sU,ZipIcon:JNe,AudioIcon:nBe,DocIcon:rBe,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})}}},hBe={class:"fcom_document_lists"},fBe={class:"fcom_each_document"},pBe={class:"fcom_document_info"},mBe={class:"fcom_document_icon"},gBe={class:"fcom_document_ext"},vBe={class:"fcom_rename_actions"},_Be=["href"],yBe={class:"fcom_document_actions"},bBe=["href","aria-label"];function wBe(t,e,n,i,s,o){const r=be,a=ft,l=He,c=H("EditPen"),u=H("Download"),d=H("DeleteFilled"),h=xt("loading");return v(),A("div",hBe,[(v(!0),A(ee,null,we(n.document_lists,(f,p)=>(v(),A("div",fBe,[g("div",pBe,[g("div",mBe,[_(r,null,{default:w(()=>[(v(),D(Ct(o.getIcon(f.type))))]),_:2},1024)]),o.canEditTitle&&s.editingIndex==p?(v(),A(ee,{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:w(()=>[g("span",gBe,x(o.getFileExtension(f.title)),1)]),key:"0"}:void 0]),1032,["readonly","aria-label","modelValue"]),g("div",vBe,[_(l,{disabled:s.isSaving||!s.editingTitle.trim(),loading:s.isSaving,onClick:m=>o.saveDoc(f),type:"primary",size:"small"},{default:w(()=>[N(x(t.$t("Update")),1)]),_:1},8,["disabled","loading","onClick"]),_(l,{disabled:s.isSaving,onClick:o.cancelEdit,size:"small"},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1},8,["disabled","onClick"])])],64)):(v(),A("a",{key:1,href:f.url,target:"_blank",rel:"noopener",class:"fcom_document_title"},x(f.title),9,_Be))]),Re((v(),A("div",yBe,[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:w(()=>[_(r,null,{default:w(()=>[_(c)]),_:1})]),_:1},8,["aria-label","onClick"])):O("",!0),!n.is_editable&&f.url?(v(),A("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:w(()=>[_(u)]),_:1})],8,bBe)):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:w(()=>[_(r,null,{default:w(()=>[_(d)]),_:1})]),_:1},8,["aria-label","onClick"])):O("",!0)])),[[h,s.isSaving]])]))),256))])}const fv=ue(dBe,[["render",wBe]]),kBe={name:"DocumentUploaderPop",components:{DocumentLists:fv,DocumentsUploader:rU,Document:N1},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="")}}},CBe={class:"fcom_inline_docs_form"},xBe={class:"fcom_doc_upload_modal"};function SBe(t,e,n,i,s,o){var c;const r=He,a=H("documents-uploader"),l=H("document-lists");return v(),A("div",CBe,[g("div",xBe,[_(r,{onClick:e[0]||(e[0]=u=>o.reset()),class:"fcom_file_cancel_btn",text:"",size:"small"},{default:w(()=>[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 $Be=ue(kBe,[["render",SBe]]),ABe={name:"PaperClipIcon"},EBe={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function MBe(t,e,n,i,s,o){return v(),A("svg",EBe,[...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 TBe=ue(ABe,[["render",MBe]]),PBe=window.fluentComAdmin.auth,IBe={name:"FeedTextComposer",components:{AudioEditModal:$Ne,AudioList:oU,AudioUploadButton:LNe,PaperClipIcon:TBe,DocumentLists:fv,DocumentUploaderPop:$Be,Document:N1,MediaPreview:Ap,Giphy:uFe,ImageUploader:Ll,SurveyEditForm:CVe,MarkdownEditor:cu,EmojiPicker:UF,VideoEmbeder:vNe,ImageIcon:sU,PollIcon:pVe},emits:["editorCreated"],props:{placeholder:{type:String,default(){return"What's happening, "+PBe.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()})}},LBe={class:"fcom_text_composer"},OBe={class:"fcom_editor status_text_input"},DBe={key:1,class:"fcom_audio_compose_list"},RBe={key:2,style:{position:"relative","text-align":"center"}},VBe={key:3,class:"fcom_media_items"},FBe={key:0,class:"fcom_media_images"},NBe=["src","alt"],BBe={key:1,class:"fcrom_media_images"},zBe={class:"fcrom_media_image"},HBe=["src","alt"],UBe={key:4,class:"fcrom_media_images"},jBe=["src","alt"],WBe={key:5,class:"fcrom_media_images"},YBe={class:"fcrom_media_image"},qBe=["src","alt"],GBe={class:"fcom_composer_footer"},XBe={class:"fcom_composer_apps"},KBe={key:0},ZBe={ref:"composerActions",class:"fcom_composer_actions"};function JBe(t,e,n,i,s,o){var T,I,L,R,V,B,F,z,U,G,K;const r=H("MarkdownEditor"),a=H("DocumentUploaderPop"),l=H("SurveyEditForm"),c=H("audio-list"),u=H("audio-edit-modal"),d=He,h=H("media-preview"),f=H("CloseBold"),p=be,m=H("ImageIcon"),y=H("image-uploader"),b=H("video-embeder"),k=H("audio-upload-button"),C=H("PaperClipIcon"),$=H("PollIcon"),S=H("EmojiPicker"),M=H("Giphy"),P=xt("loading");return v(),A(ee,null,[g("div",LBe,[g("div",OBe,[le(t.$slots,"before_input"),_(r,{ref:"markdownEditor",modelValue:n.content.message,"onUpdate:modelValue":e[0]||(e[0]=X=>n.content.message=X),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?X=>o.uploadImage(X,!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(),A(ee,{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(),A(ee,{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(),A("div",DBe,[_(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]=X=>s.showAudioEdit=X),onSaved:o.onComposerAudioSaved},null,8,["media","visible","onSaved"])):O("",!0)])):(R=(L=n.content)==null?void 0:L.media)!=null&&R.type?(v(),A("div",RBe,[_(d,{onClick:e[3]||(e[3]=X=>{n.content.media=null}),text:"",type:"danger"},{default:w(()=>[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(),A("div",VBe,[(F=(B=n.content.meta)==null?void 0:B.media_items)!=null&&F.length?(v(!0),A(ee,{key:0},we(n.content.meta.media_items,(X,W)=>(v(),A("div",{key:W},[X.type=="image"?(v(),A("div",FBe,[g("img",{class:"fcom_media_image",src:X.url,alt:t.$t("Media image")},null,8,NBe),_(d,{"aria-label":t.$t("Remove image"),class:"fcom_media_images_cross_button",link:"",onClick:Q=>n.content.meta.media_items.splice(W,1)},{default:w(()=>[_(p,null,{default:w(()=>[_(f)]),_:1})]),_:1},8,["aria-label","onClick"])])):O("",!0)]))),128)):((U=(z=n.content.meta)==null?void 0:z.media_preview)==null?void 0:U.type)=="image"||(K=(G=n.content.meta)==null?void 0:G.media_preview)!=null&&K.image?(v(),A("div",BBe,[g("div",zBe,[g("img",{src:n.content.meta.media_preview.image,alt:t.$t("Media Preview image")},null,8,HBe),_(d,{"aria-label":t.$t("Remove image"),link:"",onClick:e[4]||(e[4]=X=>n.content.meta.media_preview=null)},{default:w(()=>[_(p,null,{default:w(()=>[_(f)]),_:1})]),_:1},8,["aria-label"])])])):O("",!0)])):n.content.media_images&&n.content.media_images.length?(v(),A("div",UBe,[(v(!0),A(ee,null,we(n.content.media_images,(X,W)=>(v(),A("div",{class:"fcrom_media_image",key:W},[g("img",{src:X.url,alt:t.$t("Media image")},null,8,jBe),_(d,{"aria-label":t.$t("Remove image"),link:"",onClick:Q=>n.content.media_images.splice(W,1)},{default:w(()=>[_(p,null,{default:w(()=>[_(f)]),_:1})]),_:1},8,["aria-label","onClick"])]))),128))])):o.checkHasImageForCommentsEdit(n.content)?(v(),A("div",WBe,[g("div",YBe,[g("img",{src:n.content.media.media_url,alt:t.$t("Media image")},null,8,qBe),_(d,{"aria-label":t.$t("Remove image"),link:"",onClick:e[5]||(e[5]=X=>o.removeImageFromComments())},{default:w(()=>[_(p,null,{default:w(()=>[_(f)]),_:1})]),_:1},8,["aria-label"])])])):O("",!0)],64))]),le(t.$slots,"before_composer_footer"),Re((v(),A("div",GBe,[g("div",XBe,[o.hasActiveApp?O("",!0):(v(),A(ee,{key:0},[s.maxMediaPerPost?(v(),D(y,{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:w(()=>[_(d,{"aria-label":t.$t("Upload Media"),loading:s.uploading,text:""},{default:w(()=>[_(p,{class:"fcom_status_img_icon"},{default:w(()=>[_(m)]),_:1}),s.uploading?(v(),A("span",KBe,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(b,{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]=X=>n.content.content_type="document")},{default:w(()=>[_(p,{class:q(["fcom_apps_icon"])},{default:w(()=>[_(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:w(()=>[_(p,{class:"fcom_apps_icon"},{default:w(()=>[_($)]),_: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",ZBe,[le(t.$slots,"default")],512)])),[[P,s.uploading]]),le(t.$slots,"after_composer_footer")],64)}const pv=ue(IBe,[["render",JBe]]),QBe={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()}},eze=["innerHTML"];function tze(t,e,n,i,s,o){const r=iF;return v(),A(ee,null,[g("div",{ref:"content",class:q(["feed_md_content",n.class_name]),innerHTML:n.content},null,10,eze),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 mv=ue(QBe,[["render",tze]]),nze={name:"CommentReacts",components:{UserRouteLink:la},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}))}}},sze={style:{"margin-left":"5px"}},ize={key:0},oze={key:1},rze={class:"fcom_user_lists"},aze={key:2};function lze(t,e,n,i,s,o){const r=Nt,a=H("UserAvatar"),l=H("UserRouteLink"),c=qs,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:w(()=>[g("span",sze,x(n.comment.reactions_count),1)]),default:w(()=>[s.loading?(v(),A("div",ize,[_(r,{animated:!0,rows:1})])):s.reactions?(v(),A("div",oze,[_(c,{"max-height":"300px"},{default:w(()=>[g("ul",rze,[(v(!0),A(ee,null,we(s.reactions,d=>(v(),A("li",null,[d.xprofile?(v(),A(ee,{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(),A("div",aze,[g("p",null,x(t.$t("Failed to load the list")),1)]))]),_:1},8,["title","onShow"])}const aU=ue(nze,[["render",lze]]),cze={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"},dze={key:0},hze=["preload","poster"],fze=["src","type","onError"],pze={key:1,class:"fcom_media_load_error"},mze={key:1,class:"fcom_image_wrap"},gze={key:0,class:"fcom_image_overlay"};function vze(t,e,n,i,s,o){const r=Wo;return v(),A("div",uze,[g("div",{class:q([o.carouselClass+" "+n.feed.type,"fcom_image_carousel__container"])},[(v(!0),A(ee,null,we(o.visibleMedia,(a,l)=>(v(),A("div",{class:q(["fcom_carousel__image","fcom_media_type_"+a.type])},[a.type==="video"?(v(),A("div",dze,[s.failedMedia[a.url]?(v(),A("p",pze,x(t.$t("This video could not be played.")),1)):(v(),A("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,fze)],8,hze))])):(v(),A("div",mze,[_(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(),A("div",gze,"+"+x(o.overflowCount),1)):O("",!0)]))],2))),256))],2)])}const AS=ue(cze,[["render",vze]]),_ze={name:"ErrorIcon"},yze={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 bze(t,e,n,i,s,o){return v(),A("svg",yze,[...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 wze=ue(_ze,[["render",bze]]),kze={name:"ReportReview",components:{ErrorIcon:wze},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)}},Cze={class:"fcom_feed_report_wrap"},xze={class:"fcom_feed_report_content"},Sze={key:0},$ze={key:1},Aze={key:2},Eze={class:"fcom_feed_report_action"};function Mze(t,e,n,i,s,o){const r=H("ErrorIcon"),a=He;return v(),A("div",Cze,[g("div",xze,[_(r),n.feed.meta.auto_flagged=="yes"?(v(),A("span",Sze,x(t.$t("This %s has been flagged automatically by the site rule.",n.type)),1)):n.feed.meta.reports_count>1?(v(),A("span",$ze,x(t.$t("This %1$s has been flagged with %2$s reports",n.type,n.feed.meta.reports_count)),1)):(v(),A("span",Aze,x(t.$t("This %1$s has been flagged with %2$s report",n.type,n.feed.meta.reports_count)),1))]),g("div",Eze,[_(a,{onClick:e[0]||(e[0]=l=>o.openReportDetails())},{default:w(()=>[N(x(t.$t("Review")),1)]),_:1})])])}const lU=ue(kze,[["render",Mze]]),Tze={name:"StickyIcon"},Pze={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 Ize(t,e,n,i,s,o){return v(),A("svg",Pze,[...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 cU=ue(Tze,[["render",Ize]]),Lze=80,Oze=20,Dze=5e3,H2={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"),Dze),setTimeout(()=>{const l=o.getBoundingClientRect();l.top>=Lze&&l.bottom<=window.innerHeight-Oze||o.scrollIntoView({behavior:"smooth",block:"center"})},50)}}},Rze={name:"SingleComment",mixins:[H2],components:{ImageCarousel:AS,FeedTextComposer:pv,MediaPreview:Ap,ReportReview:lU,StickyIcon:cU,FeedMdContent:mv,ActionPopover:oa},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"))}}},Vze={key:1,class:"person_avatar"},Fze={class:"comment_wrap"},Nze={key:0,class:"comment_text"},Bze={key:0,class:"comment_text_head"},zze={class:"comment_text_head_name"},Hze=["title"],Uze={key:0,class:"comment_text_head_status"},jze={class:"comment_actions"},Wze={key:2,class:"comment_text_media"},Yze={key:3,class:"comment_text_media"};function qze(t,e,n,i,s,o){const r=H("ReportReview"),a=H("UserAvatar"),l=H("UserRouteLink"),c=hi,u=H("StickyIcon"),d=be,h=He,f=H("MoreFilled"),p=H("ActionPopover"),m=H("FeedMdContent"),y=H("MediaPreview"),b=H("ImageCarousel"),k=H("feed-text-composer"),C=xt("loading");return v(),A(ee,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(),A("div",Vze,[_(a,{with_level:!1,xprofile:n.comment.xprofile,is_rounded:!0},null,8,["xprofile"])])):O("",!0),Re((v(),A("div",Fze,[s.isEdit?(v(),A("div",{key:1,onKeydown:e[4]||(e[4]=ut((...$)=>o.maybeSave&&o.maybeSave(...$),["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:w(()=>[g("div",null,[_(h,{onClick:e[2]||(e[2]=$=>s.isEdit=!1),class:"fcom_secondary_button"},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1}),_(h,{class:"fcom_primary_button",onClick:e[3]||(e[3]=$=>o.updateComment(s.editingComment))},{default:w(()=>[N(x(t.$t("Update")),1)]),_:1})])]),_:1},8,["placeholder","content","autofocus_changed"])],32)):(v(),A("div",Nze,[n.show_header?(v(),A("div",Bze,[g("div",zze,[_(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,Hze),n.comment.status=="pending"?(v(),A("div",Uze,[_(c,{type:"warning"},{default:w(()=>[N(x(t.$t("In Review")),1)]),_:1})])):O("",!0)]),g("div",jze,[n.comment.is_sticky?(v(),D(h,{key:0,onClick:e[0]||(e[0]=$=>o.toggleSticky()),"aria-label":t.$t("Toggle Sticky"),class:"no_pad_btn",text:"",size:"small"},{default:w(()=>[_(d,{title:t.$t("Unpin from Top"),class:"fcom_sticky"},{default:w(()=>[_(u)]),_:1},8,["title"])]),_:1},8,["aria-label"])):O("",!0),_(p,{ref:"comment_actions",items:o.commentActions,placement:"bottom",width:200},{trigger:w(()=>[_(h,{"aria-label":t.$t("View comment actions"),class:"fcom_dot_menu",size:"small",text:""},{default:w(()=>[_(d,null,{default:w(()=>[_(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(),A("button",{key:1,type:"button",class:"fcom_see_more_btn",onClick:e[1]||(e[1]=(...$)=>o.toggleExpand&&o.toggleExpand(...$))},x(s.expanded?t.$t("See less"):t.$t("See more")),1)):O("",!0),n.comment.meta.media_preview?(v(),A("div",Wze,[_(y,{media_item:n.comment.meta.media_preview},null,8,["media_item"])])):n.comment.meta.media_items?(v(),A("div",Yze,[n.comment.meta.media_items?(v(),D(b,{key:0,feed:n.comment},null,8,["feed"])):O("",!0)])):O("",!0)])),le(t.$slots,"after_comment_text")])),[[C,s.working]])],64)}const U2=ue(Rze,[["render",qze]]),Gze={name:"IndividualCommentReply",mixins:[H2],components:{FeedTextComposer:pv,FeedMdContent:mv,HeartIcon:B2,SingleComment:U2,CommentReactions:aU},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()}},Xze={class:"fcom_course_comment each_comment"},Kze={key:0,class:"person_avatar"},Zze=["src","alt"],Jze={class:"comment_wrap"},Qze={class:"comment_text"},eHe={class:"comment_text_head"},tHe={class:"comment_text_head_name"},nHe=["title"],sHe={class:"reply_box"},iHe={class:"fcom_comments_react"},oHe={class:"child_comments"},rHe=["id"],aHe={class:"reply_box"},lHe=["onClick"],cHe={class:"fcom_comments_react fcom_reaction_list"},uHe={key:0,class:"child_reply_wrap"},dHe={class:"feed_commenting"},hHe={class:"person_avatar"},fHe=["src"],pHe={class:"feed_comment_input comment_text"};function mHe(t,e,n,i,s,o){const r=H("UserRouteLink"),a=H("FeedMdContent"),l=H("HeartIcon"),c=be,u=H("CommentReactions"),d=H("single-comment"),h=He,f=H("FeedTextComposer"),p=xt("loading");return v(),A("div",Xze,[s.replyingComment.xprofile?(v(),A("div",Kze,[g("img",{src:s.replyingComment.xprofile.avatar,alt:t.$t("avatar")},null,8,Zze)])):O("",!0),g("div",Jze,[g("div",Qze,[g("div",eHe,[g("div",tHe,[_(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,nHe)])]),_(a,{content:s.replyingComment.message_rendered,class_name:"comment_text_body"},null,8,["content"])]),g("div",sHe,[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",iHe,[_(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(Ee(m=>o.toggleLike(s.replyingComment),["prevent"]),["enter"])),e[3]||(e[3]=ut(Ee(m=>o.toggleLike(s.replyingComment),["prevent"]),["space"]))]},{default:w(()=>[_(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",oHe,[(v(!0),A(ee,null,we(s.replyingComment.comments,(m,y)=>(v(),A("div",{id:"comment_"+m.id,class:"each_comment"},[_(d,{onDeleted:b=>o.handleCommentDelete(y),comment:m,show_report:!0},{after_comment_text:w(()=>[g("div",aHe,[g("span",{onClick:b=>o.toggleCommentBox(m),class:"reply_btn"},x(t.$t("Reply")),9,lHe),g("span",{class:q([{fcom_is_liked:m.liked},"reply_btn"])},[g("div",cHe,[_(c,{role:"button",tabindex:"0","aria-label":t.$t("React"),"aria-pressed":!!m.liked,class:q({user_reacted:m.liked}),onClick:b=>o.toggleLike(m),onKeydown:[ut(Ee(b=>o.toggleLike(m),["prevent"]),["enter"]),ut(Ee(b=>o.toggleLike(m),["prevent"]),["space"])]},{default:w(()=>[_(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,rHe))),256))]),s.commenting?(v(),A("div",uHe,[g("div",dHe,[g("div",hHe,[g("img",{alt:"",src:t.auth.avatar},null,8,fHe)]),g("div",pHe,[_(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:w(()=>[Re((v(),D(h,{disabled:s.saving,class:"fcom_primary_button",onClick:e[4]||(e[4]=m=>o.postComment())},{default:w(()=>[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 gHe=ue(Gze,[["render",mHe]]),vHe={name:"CourseComments",props:["course"],components:{IndividualCommentReply:gHe,Pagination:uu,ChatIcon:nU,HeartIcon:B2,FeedMdContent:mv,ActionPopover:oa},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()}},_He={key:0,class:"white_loaded"},yHe={key:0,class:"fcom_course_comments_header"},bHe={class:"course_comments feed_comments overview_comments"},wHe={key:0,class:"person_avatar"},kHe={class:"comment_wrap"},CHe={class:"comment_text"},xHe={class:"comment_text_head"},SHe={class:"comment_text_head_name"},$He=["title"],AHe={class:"comment_actions"},EHe={class:"comment_text_details"},MHe=["href"],THe={class:"comment_text_actions"},PHe={key:0};function IHe(t,e,n,i,s,o){const r=Nt,a=H("UserAvatar"),l=H("UserRouteLink"),c=H("MoreFilled"),u=be,d=He,h=H("ActionPopover"),f=H("FeedMdContent"),p=H("ChatIcon"),m=H("HeartIcon"),y=H("pagination"),b=H("IndividualCommentReply"),k=Va,C=xt("loading");return s.loading?(v(),A("div",_He,[_(r,{row:5})])):(v(),A(ee,{key:1},[s.pagination.total?(v(),A("div",yHe,[g("h5",null,x(t.$t("Comments (%s)",s.pagination.total)),1)])):O("",!0),g("div",bHe,[(v(!0),A(ee,null,we(s.comments,($,S)=>(v(),A("div",{key:$.id,class:"fcom_course_comment each_comment"},[$.xprofile?(v(),A("div",wHe,[_(a,{with_level:!1,xprofile:$.xprofile},null,8,["xprofile"])])):O("",!0),g("div",kHe,[g("div",CHe,[g("div",xHe,[g("div",SHe,[_(l,{xprofile:$.xprofile},null,8,["xprofile"]),g("div",{title:$.created_at,class:"comment_text_head_time"},x(t.humanDateDiff($.created_at)),9,$He)]),Re((v(),A("div",AHe,[t.canDeleteComment($)?(v(),D(h,{key:0,placement:"bottom",width:200,items:[{label:t.$t("Delete"),type:"danger",action:()=>o.deleteComment($,S)}]},{trigger:w(()=>[_(d,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu",text:""},{default:w(()=>[_(u,null,{default:w(()=>[_(c)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["items"])):O("",!0)])),[[C,s.working]])]),g("div",EHe,[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:$.post.slug,comment_id:$.id})},[N(x(t.$t("Commented in"))+" ",1),g("b",null,x(t.getExcerpt($.post.title,60)),1)],8,MHe)]),_(f,{content:$.message_rendered,class_name:"comment_text_body"},null,8,["content"]),g("div",THe,[_(d,{onClick:M=>o.initCommentReply($),text:""},{default:w(()=>[_(u,null,{default:w(()=>[_(p)]),_:1}),g("span",null,x(t.$t("Reply")),1)]),_:1},8,["onClick"]),_(d,{"aria-label":t.$t("React"),text:""},{default:w(()=>[_(u,{class:q({user_reacted:$.liked}),onClick:M=>o.toggleLike($)},{default:w(()=>[_(m,{filled:$.liked},null,8,["filled"])]),_:2},1032,["class","onClick"]),g("span",null,x($.reactions_count||""),1)]),_:2},1032,["aria-label"])])])])]))),128)),s.pagination.total?O("",!0):(v(),A("div",PHe,[g("h5",null,x(t.$t("No comments from any lessons yet! Comments from all lessons will be shown here.")),1)]))]),_(y,{pagination:s.pagination,onFetch:o.fetchComments},null,8,["pagination","onFetch"]),_(k,{"append-to-body":!0,modelValue:s.isReplying,"onUpdate:modelValue":e[0]||(e[0]=$=>s.isReplying=$),size:t.dialogWidth},{header:w(()=>{var $;return[g("p",null,[N(x(t.$t("Replying to"))+" ",1),g("b",null,x(($=s.replyingComemnt)==null?void 0:$.post.title),1)])]}),default:w(()=>[s.replyingComemnt?(v(),D(b,{key:0,comment:s.replyingComemnt,comments:s.comments,onToggleLike:o.toggleLike},null,8,["comment","comments","onToggleLike"])):O("",!0)]),_:1},8,["modelValue","size"])],64))}const LHe=ue(vHe,[["render",IHe]]),OHe={name:"CourseOverview",props:["course","course_id"],components:{CourseComments:LHe}},DHe={class:"fcom_cards fcom_cards_2"},RHe={class:"fcom_card"},VHe={class:"fcom_card_body"},FHe={class:"fcom_card"},NHe={class:"fcom_card_body"};function BHe(t,e,n,i,s,o){const r=H("course-comments");return v(),A(ee,null,[g("div",DHe,[g("div",RHe,[g("div",VHe,[g("p",null,x(t.$t("Students")),1),g("h3",null,x(n.course.students_count),1)])]),g("div",FHe,[g("div",NHe,[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 zHe=ue(OHe,[["render",BHe]]),HHe={name:"ContentLayout",props:["title","content_class","wrapper_class"]},UHe={key:0,class:"fhr_content_layout_header"},jHe=["aria-label"],WHe=["aria-label"];function YHe(t,e,n,i,s,o){return v(),A("div",{class:q([n.wrapper_class,"fhr_content_layout"])},[le(t.$slots,"header",{},()=>[n.title?(v(),A("div",UHe,[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,jHe)]),g("div",{role:"region","aria-label":t.$t("Actions"),class:"fhr_page_actions"},[le(t.$slots,"actions")],8,WHe)])):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 _i=ue(HHe,[["render",YHe]]),qHe={name:"AppLayout",props:["wrapper_class"]},GHe={class:"feeds_main"};function XHe(t,e,n,i,s,o){const r=H("router-view");return v(),A("div",{class:q([n.wrapper_class,"feeds fcom_feeds"])},[g("div",GHe,[le(t.$slots,"before_route_view"),le(t.$slots,"default",{},()=>[_(r)]),le(t.$slots,"after_route_view")])],2)}const yi=ue(qHe,[["render",XHe]]),KHe={name:"EditCourseRoute",components:{AppLayout:yi,Layout:_i},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}})}},ZHe={class:"object_menu"},JHe={class:"fcom_space_menu_ul"},QHe={key:0},eUe={class:"actions_items"},tUe={key:0,class:"white_loaded"},nUe={key:2};function sUe(t,e,n,i,s,o){const r=_de,a=vde,l=H("router-link"),c=H("MoreFilled"),u=be,d=He,h=Yo,f=Nt,p=H("router-view"),m=H("layout"),y=H("app-layout");return v(),D(y,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:w(()=>[_(m,{wrapper_class:"no_bg_layout",title:t.$t("Courses")},{title:w(()=>[_(a,null,{default:w(()=>[_(r,{to:{name:"manage_courses"}},{default:w(()=>[N(x(t.$t("Courses")),1)]),_:1}),s.course.id?(v(),D(r,{key:0},{default:w(()=>[N(x(s.course.title)+" ",1),t.hasCourseCreatorAccess()?(v(),A("span",{key:0,class:"fcom_edit_course fcom_secondary_button clickable",onClick:e[0]||(e[0]=b=>o.goToSettings())},x(t.$t("Edit Info")),1)):O("",!0)]),_:1})):O("",!0)]),_:1})]),actions:w(()=>[g("div",ZHe,[g("ul",JHe,[(v(!0),A(ee,null,we(o.computedMenuItems,b=>(v(),A("li",{key:b.name,class:q("course_inner_menu_"+b.name)},[_(l,{to:{name:b.route,params:{course_id:s.course.id}}},{default:w(()=>[N(x(b.title),1)]),_:2},1032,["to"])],2))),128)),t.hasCourseCreatorAccess()?(v(),A("li",QHe,[_(h,{placement:"bottom",ref:"course_actions",persistent:!1,width:200,trigger:"click"},{reference:w(()=>[_(d,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu",size:"small",text:""},{default:w(()=>[_(u,null,{default:w(()=>[_(c)]),_:1})]),_:1},8,["aria-label"])]),default:w(()=>[g("ul",eUe,[g("li",{onClick:e[1]||(e[1]=b=>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]=(...b)=>o.initDuplicateCourse&&o.initDuplicateCourse(...b))},x(t.$t("Duplicate Course")),1),g("li",{onClick:e[4]||(e[4]=(...b)=>o.initDeleteCourse&&o.initDeleteCourse(...b))},x(t.$t("Delete Course")),1)])]),_:1},512)])):O("",!0)])])]),default:w(()=>[s.loading?(v(),A("div",tUe,[_(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(),A("div",nUe,[g("h3",null,x(t.$t("Sorry, the course cannot be loaded")),1)]))]),_:1},8,["title"])]),_:1})}const iUe=ue(KHe,[["render",sUe]]),oUe={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}},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.$nextTick(()=>{var o;(o=this.$el.querySelectorAll(":scope > .drag-group > .drag-item")[i])==null||o.focus()}))},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)}}},rUe=["onDragstart","onDragover","onDrop","onKeydown","onMousedown","draggable","tabindex","aria-label"];function aUe(t,e,n,i,s,o){return v(),A("div",{class:"drag-container",onDragover:e[2]||(e[2]=Ee((...r)=>o.onContainerDragOver&&o.onContainerDragOver(...r),["prevent"])),onDrop:e[3]||(e[3]=Ee((...r)=>o.onContainerDrop&&o.onContainerDrop(...r),["prevent"]))},[_(Eb,{name:"flip-list",tag:"div",class:"drag-group",style:Xe(n.gap?{display:"flex",flexDirection:"column",gap:n.gap}:{})},{default:w(()=>[(v(!0),A(ee,null,we(n.items,(r,a)=>(v(),A("div",{key:r[n.rowKey],onDragstart:l=>o.dragStart(l,a),onDragend:e[0]||(e[0]=(...l)=>o.dragEnd&&o.dragEnd(...l)),onDragover:Ee(l=>o.dragOver(l,a),["prevent"]),onDrop:Ee(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,rUe))),128))]),_:3},8,["style"])],32)}const za=ue(oUe,[["render",aUe],["__scopeId","data-v-5e8fd425"]]),lUe={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)}},cUe={class:"fcom_block_editor"};function uUe(t,e,n,i,s,o){const r=Nt;return v(),A("div",cUe,[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 uU=ue(lUe,[["render",uUe]]),dUe={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 fUe(t,e,n,i,s,o){const r=ft;return v(),A("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:w(()=>[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:w(()=>[N(x(t.$t("sec")),1)]),_:1},8,["modelValue","onChange"])])}const pUe=ue(dUe,[["render",fUe]]),mUe={name:"LessonDocuments",components:{DocumentLists:fv,DocumentsUploader:rU},props:["lesson"],methods:{fileAdded(t){this.lesson.meta.document_ids=this.lesson.meta.document_lists||[],this.lesson.meta.document_lists.push(t)}}},gUe={class:"fcom_meta_section fcom_lesson_documents_form"},vUe={class:"fcom_meta_label"},_Ue={style:{"font-size":"90%",padding:"0px",margin:"0 0 15px","line-height":"120%"}},yUe={key:0,class:"fcom_lesson_documents_list"},bUe={key:1,class:"fcom_lesson_documents_list"};function wUe(t,e,n,i,s,o){const r=H("documents-uploader"),a=H("document-lists");return v(),A("div",gUe,[g("div",vUe,x(t.$t("Documents & Files")),1),g("p",_Ue,x(t.$t("These files will be available to your students to view and download")),1),t.has_pro?(v(),A("div",yUe,[_(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(),A("div",bUe,[g("p",null,x(t.$t("You need to upgrade to Pro to upload documents")),1)]))])}const dU=ue(mUe,[["render",wUe]]),kUe={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 CUe(t,e,n,i,s,o){const r=Wo,a=He,l=Y1,c=H("CloseBold"),u=be;return v(),A(ee,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:w(()=>[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:w(()=>[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:w(()=>[_(u,null,{default:w(()=>[_(c)]),_:1})]),_:1},8,["aria-label","onClick"])):O("",!0)],64)}const gv=ue(kUe,[["render",CUe]]),xUe={name:"CourseMeta",components:{LessonDocuments:dU,MediaEmbeder:hv,LengthInput:pUe,BgImageUpload:gv},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"}}},SUe={class:"fcom_course_meta"},$Ue={class:"fcom_meta_section"},AUe={class:"fcom_meta_label"},EUe={class:"fcom_meta_content"},MUe={key:2,class:"checkbox_with_tooltip"},TUe={key:0},PUe={key:1,class:"checkbox_with_tooltip"},IUe={key:0,class:"fcom_meta_section"},LUe={key:0,class:"fcom_meta_content"},OUe={class:"fcom_meta_label"},DUe={class:"fcom_meta_content"},RUe={key:1,class:"fcom_meta_section"},VUe={class:"fcom_meta_label"},FUe={class:"fcom_edit_lesson_documents"};function NUe(t,e,n,i,s,o){var y;const r=Yt,a=H("InfoFilled"),l=be,c=Ss,u=ft,d=H("media-embeder"),h=H("length-input"),f=H("BgImageUpload"),p=en,m=H("LessonDocuments");return v(),A("div",SUe,[g("div",$Ue,[g("div",AUe,x(t.$t("Features Settings")),1),g("div",EUe,[_(r,{modelValue:n.lesson.meta.enable_media,"onUpdate:modelValue":e[0]||(e[0]=b=>n.lesson.meta.enable_media=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[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:w(()=>[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]=b=>n.lesson.meta.enable_comments=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Enable Comments")),1)]),_:1},8,["modelValue"])),n.quiz_meta?O("",!0):(v(),A("div",MUe,[_(r,{modelValue:n.lesson.meta.free_preview_lesson,"onUpdate:modelValue":e[2]||(e[2]=b=>n.lesson.meta.free_preview_lesson=b),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Free Preview Lesson"))+" ",1),t.has_pro?O("",!0):(v(),A("span",TUe,"("+x(t.$t("Available on Pro"))+")",1))]),_:1},8,["modelValue","disabled"]),_(c,{class:"box-item",effect:"dark",placement:"right-end"},{content:w(()=>[N(x(t.$t("If enabled, public users can view this lesson without enrolling in the course.")),1)]),default:w(()=>[_(l,null,{default:w(()=>[_(a)]),_:1})]),_:1})])),n.quiz_meta?(v(),A(ee,{key:3},[_(r,{modelValue:n.lesson.meta.enable_passing_score,"onUpdate:modelValue":e[3]||(e[3]=b=>n.lesson.meta.enable_passing_score=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[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]=b=>n.lesson.meta.passing_score=b),min:10,max:100,step:1,type:"number",class:"fcom_input_number",placeholder:"80"},{append:w(()=>[...e[9]||(e[9]=[N("%",-1)])]),_:1},8,["modelValue"])):O("",!0),o.enablePassingScore?(v(),A("div",PUe,[_(r,{modelValue:n.lesson.meta.enforce_passing_score,"onUpdate:modelValue":e[5]||(e[5]=b=>n.lesson.meta.enforce_passing_score=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Enforce pass to continue")),1)]),_:1},8,["modelValue"]),_(c,{class:"box-item",effect:"dark",placement:"right-end"},{content:w(()=>[N(x(t.$t("If enabled, members will have to achieve a minimum score before")),1),e[10]||(e[10]=g("br",null,null,-1)),N(" "+x(t.$t("proceeding to the next lesson. They can re-take this quiz multiple times.")),1)]),default:w(()=>[_(l,null,{default:w(()=>[_(a)]),_:1})]),_:1})])):O("",!0),_(r,{modelValue:n.lesson.meta.hide_result,"onUpdate:modelValue":e[6]||(e[6]=b=>n.lesson.meta.hide_result=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Hide answers on result page")),1)]),_:1},8,["modelValue"])],64)):O("",!0)])]),((y=n.lesson.meta)==null?void 0:y.enable_media)=="yes"?(v(),A("div",IUe,[o.isFluentPlayerMedia?(v(),A("div",LUe,[g("p",null,x(t.$t("The feature video is managed by the FluentPlayer block in the lesson editor.")),1)])):(v(),D(d,{key:1,style:{margin:"0"},media:n.lesson.meta.media},null,8,["media"])),g("div",OUe,x(t.$t("Lesson Duration")),1),g("div",DUe,[_(h,{modelValue:n.lesson.meta.video_length,"onUpdate:modelValue":e[7]||(e[7]=b=>n.lesson.meta.video_length=b)},null,8,["modelValue"])])])):O("",!0),n.quiz_meta?(v(),A("div",RUe,[g("div",VUe,x(t.$t("Featured Image")),1),_(p,{class:"fcom_bg_image"},{default:w(()=>[_(f,{modelValue:n.lesson.meta.featured_image_id,"onUpdate:modelValue":e[8]||(e[8]=b=>n.lesson.meta.featured_image_id=b),can_remove:!0},null,8,["modelValue"])]),_:1})])):O("",!0),g("div",FUe,[_(m,{lesson:n.lesson},null,8,["lesson"])])])}const hU=ue(xUe,[["render",NUe]]),BUe={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())}}},zUe={key:0,style:{display:"flex","justify-content":"center","align-items":"center","column-gap":"10px"}},HUe=["element-loading-text"];function UUe(t,e,n,i,s,o){const r=He,a=Nt,l=xt("loading");return v(),A(ee,null,[o.hasFailed?(v(),A("div",zUe,[g("p",null,x(t.$t("Problem with loading the editor?")),1),_(r,{onClick:e[0]||(e[0]=c=>o.editorFailed())},{default:w(()=>[N(x(t.$t("Use Alternative Editor")),1)]),_:1})])):O("",!0),Re((v(),A("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,HUe)),[[l,!s.dataSent&&!o.hasFailed]])],64)}const ES=ue(BUe,[["render",UUe],["__scopeId","data-v-1796445f"]]),jUe={name:"LessonEditor",props:["lesson","section","course","editingIndex"],emits:["saved","close","changeLesson"],components:{LessonDocuments:dU,BlockEditor:uU,MediaEmbeder:hv,LessonMeta:hU,FullEditorFrame:ES},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")}},WUe={class:"fcom_full_editor"},YUe={class:"fcom_full_editor_header"},qUe=["aria-label"],GUe={class:"fcom_desktop_only"},XUe={key:0},KUe={class:"full_editor_actions"},ZUe={class:"fcom_lesson_camp"},JUe={class:"fcom_lesson_nav"},QUe=["title","href"],eje={style:{padding:"20px"}},tje={class:"fcom_lesson_content"},nje={key:0},sje={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},ije={class:"fcom_lesson_title"},oje={class:"fcom_documents_dialog_footer"};function rje(t,e,n,i,s,o){const r=H("ArrowLeft"),a=be,l=He,c=H("ArrowRight"),u=H("arrow-down"),d=$r,h=Ar,f=Sr,p=H("View"),m=j1,y=H("lesson-meta"),b=qs,k=U1,C=ft,$=H("block-editor"),S=H("FullEditorFrame"),M=jo,P=H1,T=H("LessonDocuments"),I=$s,L=xt("loading");return v(),A("div",WUe,[_(P,null,{default:w(()=>[_(m,{class:"fcom_full_editor_header_wrap"},{default:w(()=>[g("div",YUe,[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:w(()=>[_(r)]),_:1}),g("span",GUe,x(t.$t("Back to Lessons")),1),n.course&&n.course.title?(v(),A("span",XUe,"("+x(n.course.title)+")",1)):O("",!0)],8,qUe),g("div",KUe,[g("div",ZUe,[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",JUe,[_(l,{onClick:e[1]||(e[1]=R=>t.$emit("changeLesson",n.editingIndex-1)),disabled:n.editingIndex===0,size:"small"},{default:w(()=>[_(a,{class:"fcom_arrow_icon"},{default:w(()=>[_(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:w(()=>[_(a,{class:"fcom_arrow_icon"},{default:w(()=>[_(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:w(()=>[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:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"draft"},{default:w(()=>[N(x(t.$t("Draft")),1)]),_:1}),_(d,{command:"published"},{default:w(()=>[N(x(t.$t("Published")),1)]),_:1})]),_:1})]),default:w(()=>[_(l,{type:n.lesson.status=="published"?"success":"info",bg:"",text:"",class:"el-dropdown-link"},{default:w(()=>[N(x(t.$labelize(n.lesson.status))+" ",1),_(a,{class:"el-icon--right"},{default:w(()=>[_(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:w(()=>[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:w(()=>[_(p)]),_:1})],8,QUe)])])]),_:1}),_(P,{class:"fcom_full_editor_container fcom_lesson_editor_full"},{default:w(()=>[s.useClassic?Re((v(),D(k,{key:0,style:{padding:"0"},class:"fcom_full_editor_side",width:"300px"},{default:w(()=>[_(b,{height:"calc(100vh - 60px)"},{default:w(()=>[g("div",eje,[_(y,{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:w(()=>[_(a,{class:"fcom_arrow_icon"},{default:w(()=>[_(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:w(()=>[O("",!0),g("div",tje,[s.useClassic?(v(),A("div",nje,[_(b,{height:"calc(100vh - 60px)",class:"fcom_lesson_editor_scroll"},{default:w(()=>[g("div",sje,[g("div",ije,[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),_($,{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:w(()=>[g("div",oje,[_(l,{type:"primary",onClick:e[14]||(e[14]=R=>s.showDocumentsModal=!1)},{default:w(()=>[N(x(t.$t("Done")),1)]),_:1})])]),default:w(()=>[_(T,{lesson:n.lesson},null,8,["lesson"])]),_:1},8,["modelValue","title","onClosed"])])}const fU=ue(jUe,[["render",rje]]),aje={name:"LessonLine",emits:["showEditor","updated","deleteLesson","moveLesson","duplicateLesson"],props:["course","sections","lesson"],components:{LessonEditor:fU,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")})}}},lje={key:0,class:"fcom_heading_item"},cje=["innerHTML"],uje={class:"fcom_section_item_actions"},dje={class:"fcom_action_lesson"},hje={class:"fcom_move_popup_close"},fje={class:"fcom_move_popup_close"};function pje(t,e,n,i,s,o){const r=hi,a=He,l=ft,c=H("arrow-down"),u=be,d=$r,h=Ar,f=Sr,p=H("MoreFilled"),m=sn,y=Jt,b=en,k=tn,C=H("Close"),$=H("slug-input");return v(),A(ee,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:w(()=>[_(a,{onClick:o.updateLessonTitle},{default:w(()=>[N(x(t.$t("Save")),1)]),_:1},8,["onClick"])]),_:1},8,["onKeyup","modelValue"])):(v(),A("p",lje,[g("span",{onClick:e[0]||(e[0]=S=>t.$emit("showEditor",n.lesson)),innerHTML:n.lesson.title},null,8,cje),o.isQuizType?(v(),D(r,{key:0},{default:w(()=>[N(x(t.$t("quiz")),1)]),_:1})):O("",!0)]))],2),g("div",uje,[_(a,{onClick:e[3]||(e[3]=S=>t.$emit("showEditor",n.lesson)),class:"fcom_show_hover",text:""},{default:w(()=>[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:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"draft"},{default:w(()=>[N(x(t.$t("Draft")),1)]),_:1}),_(d,{command:"published"},{default:w(()=>[N(x(t.$t("Published")),1)]),_:1})]),_:1})]),default:w(()=>[_(a,{class:q(["el-dropdown-link",`fcom_button_${n.lesson.status==="published"?"success":"info"}`]),bg:"",text:""},{default:w(()=>[N(x(t.$labelize(n.lesson.status))+" ",1),_(u,{class:"el-icon--right"},{default:w(()=>[_(c)]),_:1})]),_:1},8,["class"])]),_:1}),g("div",dje,[_(f,{onCommand:o.handleLessonAction,trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"edit_lesson"},{default:w(()=>[N(x(t.$t("Edit Content")),1)]),_:1}),_(d,{command:"edit_title"},{default:w(()=>[N(x(t.$t("Edit Title")),1)]),_:1}),_(d,{command:"edit_slug"},{default:w(()=>[N(x(t.$t("Edit Slug")),1)]),_:1}),_(d,{command:"preview_lesson"},{default:w(()=>[N(x(o.menuLabels.preview),1)]),_:1}),_(d,{command:"move_lesson"},{default:w(()=>[N(x(o.menuLabels.move),1)]),_:1}),_(d,{command:"duplicate_lesson"},{default:w(()=>[N(x(o.menuLabels.duplicate),1)]),_:1}),_(d,{command:"delete"},{default:w(()=>[N(x(o.menuLabels.delete),1)]),_:1})]),_:1})]),default:w(()=>[_(a,{"aria-label":t.$t("View actions"),size:"small",class:"fcom_dot_menu",text:""},{default:w(()=>[_(u,null,{default:w(()=>[_(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]=Ee(S=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(b,{label:t.$t("Move to a different Section")},{default:w(()=>[_(y,{placeholder:t.$t("Select Section"),modelValue:s.selectedSectionId,"onUpdate:modelValue":e[5]||(e[5]=S=>s.selectedSectionId=S)},{default:w(()=>[(v(!0),A(ee,null,we(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:w(()=>[N(x(o.menuLabels.move),1)]),_:1},8,["onClick","disabled"])]),_:1}),g("div",hje,[_(u,{onClick:e[7]||(e[7]=S=>s.showMoveLessonPopup=!1)},{default:w(()=>[_(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]=Ee(S=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(b,{label:t.$t("Slug (optional)")},{default:w(()=>[_($,{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:w(()=>[N(x(t.$t("Save")),1)]),_:1},8,["onClick"])]),_:1}),g("div",fje,[_(u,{onClick:e[10]||(e[10]=S=>s.editingSlugPopup=!1)},{default:w(()=>[_(C)]),_:1})])],2),[[jt,s.editingSlugPopup]])])])],64)}const mje=ue(aje,[["render",pje]]),gje={name:"AddQuestionModal",components:{CrepeEditor:cu,BgImageUpload:gv,FluentDnD:za},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,DeleteIcon:Pi(Jb),questionTypes:this.appVars.question_types,newQuestion:{slug:"",type:"single_choice",label:"",image_url:"",enabled:!0,image_enabled:!1,help_text:"",grading_mode:"open",correct_answers:[],options:[{label:"Option 1",is_correct:!0},{label:"Option 2",is_correct:!1}]}}},watch:{showModal(t){t||this.$emit("close")},"questionData.type"(t,e){t=="single_choice"&&e=="multiple_choice"&&this.questionData.options.forEach((n,i)=>{n.is_correct=i===0}),t!=="written_answer"&&e==="written_answer"&&(!this.questionData.options||this.questionData.options.length===0)&&(this.questionData.options=[{label:"Option 1",is_correct:!0},{label:"Option 2",is_correct:!1}]),t==="written_answer"&&(this.questionData.grading_mode||(this.questionData.grading_mode="open"),Array.isArray(this.questionData.correct_answers)||(this.questionData.correct_answers=[]))}},computed:{isDirty(){return!this.questionData||!this.originalQuestionData?!1:JSON.stringify(this.cleanQuestion())!==this.originalQuestionData},isRemovable(){return this.questionData.options.length>1},isSingleChoice(){return this.questionData.type=="single_choice"},isWrittenAnswer(){return this.questionData.type==="written_answer"},isExactMatch(){return this.questionData.grading_mode==="exact_match"},isNewQuestion(){return!this.question}},methods:{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},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})},checkValidation(){if(!this.has_pro)return!1;const{label:t,options:e,type:n,grading_mode:i}=this.questionData,s=[{valid:!!t&&t.trim()!=="",message:this.$t("Please enter a question")}];n!=="written_answer"&&s.push({valid:Array.isArray(e)&&e.length>=2,message:this.$t("Please add at least 2 options")},{valid:e&&e.every(r=>r.label&&r.label.trim()!==""),message:this.$t("Please enter a label for each option")},{valid:e&&e.some(r=>r.is_correct===!0),message:this.$t("Please select the correct option")}),n==="written_answer"&&i==="exact_match"&&s.push({valid:this.getCleanCorrectAnswers().length>0,message:this.$t("Please add at least one correct answer")});const o=s.find(r=>!r.valid);return o?(this.$handleError(o.message),!1):!0}},created(){const t=this.isNewQuestion?this.newQuestion:this.question;this.questionData=JSON.parse(JSON.stringify(t)),this.questionData.options.forEach(e=>{e._key=++this.optKeyCounter}),this.originalQuestionData=JSON.stringify(this.cleanQuestion())},mounted(){Array.isArray(this.questionData.correct_answers)||(this.questionData.correct_answers=[]),this.questionData.grading_mode||(this.questionData.grading_mode="open"),this.$nextTick(()=>{this.appReady=!0})}},vje={class:"dialog_header"},_je={class:"dialog_left"},yje={class:"dialog_body"},bje={key:0,class:"fcom_banner_image_holder"},wje={key:1,class:"fcom_banner_image_preview"},kje=["aria-label"],Cje=["aria-checked","onClick","onKeydown"],xje={class:"fcom_choice_btn"},Sje={class:"fcom_help_text"},$je={class:"sub_label"},Aje={class:"fcom_question_option"},Eje={class:"dialog_footer"},Mje={key:0};function Tje(t,e,n,i,s,o){const r=eu,a=H("BgImageUpload"),l=Wo,c=H("CloseBold"),u=be,d=He,h=en,f=H("crepe-editor"),p=Li,m=ws,y=z1e,b=Yt,k=ft,C=k8,$=H("FluentDnD"),S=tn,M=$s;return v(),D(M,{modelValue:s.showModal,"onUpdate:modelValue":e[9]||(e[9]=P=>s.showModal=P),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:w(()=>[g("div",vje,[g("div",_je,[g("h4",null,x(o.isNewQuestion?t.$t("Add Question"):t.$t("Edit Question")),1)])])]),footer:w(()=>[g("div",Eje,[_(d,{class:"fcom_secondary_button",onClick:o.requestClose},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1},8,["onClick"]),o.isNewQuestion?(v(),D(d,{key:0,class:"fcom_primary_button",onClick:o.addQuestion},{default:w(()=>[N(x(t.$t("Add Question")),1)]),_:1},8,["onClick"])):(v(),D(d,{key:1,class:"fcom_primary_button",onClick:o.updateQuestion},{default:w(()=>[N(x(t.$t("Update Question"))+" ",1),t.has_pro?O("",!0):(v(),A("span",Mje," ("+x(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"]))])]),default:w(()=>[g("div",yje,[_(S,{onSubmit:e[8]||(e[8]=Ee(P=>t.doNothing(),["prevent"])),"label-position":"top",model:s.questionData},{default:w(()=>[_(h,{label:t.$t("Image")},{default:w(()=>[_(r,{class:"fcom_question_switch",modelValue:s.questionData.image_enabled,"onUpdate:modelValue":e[0]||(e[0]=P=>s.questionData.image_enabled=P)},null,8,["modelValue"]),s.questionData.image_enabled&&!s.questionData.image_url?(v(),A("div",bje,[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),_(a,{modelValue:s.questionData.image_url,"onUpdate:modelValue":e[1]||(e[1]=P=>s.questionData.image_url=P)},null,8,["modelValue"])])):s.questionData.image_enabled&&s.questionData.image_url?(v(),A("div",wje,[_(l,{alt:t.$t("Image Preview"),src:s.questionData.image_url},null,8,["alt","src"]),_(d,{class:"fcom_secondary_button",text:"",onClick:e[2]||(e[2]=P=>s.questionData.image_url="")},{default:w(()=>[_(u,null,{default:w(()=>[_(c)]),_:1})]),_:1})])):O("",!0)]),_:1},8,["label"]),_(h,{label:t.$t("Question")},{default:w(()=>[s.appReady?(v(),D(f,{key:0,modelValue:s.questionData.label,"onUpdate:modelValue":e[3]||(e[3]=P=>s.questionData.label=P),placeholder:t.$t("Write your question here")},null,8,["modelValue","placeholder"])):O("",!0)]),_:1},8,["label"]),_(h,{label:t.$t("Type")},{default:w(()=>[g("div",{class:"fcom_choices question_choices",role:"radiogroup","aria-label":t.$t("Type")},[(v(!0),A(ee,null,we(s.questionTypes,P=>(v(),A("div",{key:P.value,role:"radio",tabindex:"0","aria-checked":s.questionData.type==P.value,onClick:T=>s.questionData.type=P.value,onKeydown:[ut(Ee(T=>s.questionData.type=P.value,["prevent"]),["enter"]),ut(Ee(T=>s.questionData.type=P.value,["prevent"]),["space"])],class:q({fcom_choice:!0,fcom_choice_active:s.questionData.type==P.value})},[g("div",xje,[g("p",null,x(t.$t(P.label)),1)])],42,Cje))),128))],8,kje)]),_:1},8,["label"]),o.isWrittenAnswer?(v(),D(h,{key:0,label:t.$t("Grading Mode")},{default:w(()=>[_(m,{modelValue:s.questionData.grading_mode,"onUpdate:modelValue":e[4]||(e[4]=P=>s.questionData.grading_mode=P)},{default:w(()=>[_(p,{value:"open"},{default:w(()=>[N(x(t.$t("Open (any answer accepted)")),1)]),_:1}),_(p,{value:"exact_match"},{default:w(()=>[N(x(t.$t("Exact Match (auto-graded)")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),o.isWrittenAnswer&&o.isExactMatch?(v(),D(h,{key:1,label:t.$t("Correct Answer(s)")},{default:w(()=>[_(y,{modelValue:s.questionData.correct_answers,"onUpdate:modelValue":e[5]||(e[5]=P=>s.questionData.correct_answers=P),trigger:"Enter",placeholder:t.$t("Type an answer and press Enter"),style:{width:"100%"}},null,8,["modelValue","placeholder"]),g("div",Sje,[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.isWrittenAnswer?O("",!0):(v(),D(h,{key:2,label:t.$t("Responses"),class:"fcom_question_options"},{default:w(()=>[g("span",$je,x(t.$t("Select correct answer")),1),_($,{items:s.questionData.options,"row-key":"_key",class:"fcom_modal_options"},{item:w(({data:P,index:T})=>[g("div",Aje,[e[10]||(e[10]=g("div",{class:"fcom_drag_handle fcom_option_drag","aria-hidden":"true"},"⋮⋮",-1)),_(b,{modelValue:P.is_correct,"onUpdate:modelValue":I=>P.is_correct=I,onChange:I=>o.checkOption(P),class:q({single_choice:o.isSingleChoice})},null,8,["modelValue","onUpdate:modelValue","onChange","class"]),_(k,{modelValue:P.label,"onUpdate:modelValue":I=>P.label=I,type:"text"},null,8,["modelValue","onUpdate:modelValue"]),o.isRemovable?(v(),D(C,{key:0,type:"danger",title:t.$t("Remove"),"aria-label":t.$t("Remove option"),icon:s.DeleteIcon,underline:!1,onClick:I=>o.removeOption(T)},null,8,["title","aria-label","icon","onClick"])):O("",!0)])]),_:1},8,["items"]),_(C,{type:"primary",underline:!1,onClick:o.addNewOption},{default:w(()=>[N(x("+ "+t.$t("Add new option")),1)]),_:1},8,["onClick"])]),_:1},8,["label"])),_(h,{label:t.$t("Help Text")},{default:w(()=>[_(k,{modelValue:s.questionData.help_text,"onUpdate:modelValue":e[6]||(e[6]=P=>s.questionData.help_text=P),type:"textarea",autosize:{minRows:2,maxRows:5}},null,8,["modelValue"])]),_:1},8,["label"]),_(h,{label:t.$t("Status")},{default:w(()=>[_(b,{modelValue:s.questionData.enabled,"onUpdate:modelValue":e[7]||(e[7]=P=>s.questionData.enabled=P)},{default:w(()=>[N(x(t.$t("Enable this question")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model"])])]),_:1},8,["modelValue","width","before-close"])}const Pje=ue(gje,[["render",Tje]]),Ije={name:"QuizEditor",props:["lesson","section","course","editingIndex"],emits:["close","changeLesson","saved"],components:{LessonMeta:hU,CrepeEditor:cu,AddQuestionModal:Pje,FluentDnD:za,ActionPopover:oa},data(){return{saving:!1,showSideBar:!1,appReady:!1,showQuestionModal:!1,question:null,keyCounter:0}},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:{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));e.slug="";const[n,...i]=t.label.split(`
133 `),s=n.replace(/\s*\(Copy(?:\s+\d+)?\)\s*$/,""),o=l=>[s+(l>1?` (Copy ${l})`:" (Copy)"),...i].join(`
134 `);let r=1;for(;this.lesson.meta.quiz_questions.some(l=>l.label===o(r));)r++;e.label=o(r),e.label_rendered="";const a=this.lesson.meta.quiz_questions.indexOf(t)+1;this.lesson.meta.quiz_questions.splice(a,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},normalizeSingleChoice(){var t;(((t=this.lesson.meta)==null?void 0:t.quiz_questions)||[]).forEach(e=>{if(e.type!=="single_choice")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];l&&(l.slug=r.slug,l.label_rendered=r.label_rendered)})},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(t.type=="single_choice"&&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})}},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})}},Lje={class:"fcom_full_editor"},Oje={class:"fcom_full_editor_header"},Dje=["aria-label"],Rje={class:"fcom_desktop_only"},Vje={key:0},Fje={class:"full_editor_actions"},Nje={class:"fcom_lesson_camp"},Bje={class:"fcom_lesson_nav"},zje=["title","href"],Hje={class:"fcom_lesson_content"},Uje={class:"fcom_quiz_editor"},jje={key:1,class:"fcom_questions_wrap"},Wje=["id"],Yje={key:0,class:"fcom_question_image"},qje={class:"fcom_question_header"},Gje=["aria-label","onClick","onKeydown"],Xje=["innerHTML"],Kje={key:1},Zje={class:"fcom_question_actions"},Jje={class:"fcom_question_body"},Qje={class:"fcom_question_option"},eWe={key:0,class:"question_help_text"},tWe={key:1,class:"fcom_meta_sorting"},nWe={key:2,class:"fcom_banner_image_holder add_quiz_banner"},sWe={key:0},iWe={key:0},oWe={style:{padding:"20px"}};function rWe(t,e,n,i,s,o){const r=H("ArrowLeft"),a=be,l=He,c=H("ArrowRight"),u=H("arrow-down"),d=$r,h=Ar,f=Sr,p=H("View"),m=j1,y=ft,b=H("crepe-editor"),k=Wo,C=H("action-popover"),$=Yt,S=H("FluentDnD"),M=H("Top"),P=H("Bottom"),T=qs,I=jo,L=H("lesson-meta"),R=U1,V=H("AddQuestionModal"),B=H1,F=xt("loading");return v(),A("div",Lje,[_(B,null,{default:w(()=>[_(m,{class:"fcom_full_editor_header_wrap"},{default:w(()=>{var z;return[g("div",Oje,[g("button",{type:"button",onClick:e[0]||(e[0]=U=>t.$emit("close")),class:"fcom_back_header","aria-label":t.$t("Back to Lessons")},[_(a,{class:"fcom_arrow_icon"},{default:w(()=>[_(r)]),_:1}),g("span",Rje,x(t.$t("Back to Lessons")),1),(z=n.course)!=null&&z.title?(v(),A("span",Vje,"("+x(n.course.title)+")",1)):O("",!0)],8,Dje),g("div",Fje,[g("div",Nje,[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",Bje,[_(l,{onClick:e[1]||(e[1]=U=>t.$emit("changeLesson",n.editingIndex-1)),disabled:n.editingIndex===0,size:"small"},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1})]),_:1},8,["disabled"]),_(l,{onClick:e[2]||(e[2]=U=>t.$emit("changeLesson",n.editingIndex+1)),disabled:n.editingIndex+1===n.section.lessons.length,size:"small"},{default:w(()=>[_(a,{class:"fcom_arrow_icon"},{default:w(()=>[_(c)]),_:1})]),_:1},8,["disabled"])])]),t.isMobile&&!s.showSideBar?(v(),D(l,{key:0,text:"",onClick:e[3]||(e[3]=U=>s.showSideBar=!s.showSideBar)},{default:w(()=>[g("span",null,x(t.$t("Features")),1)]),_:1})):O("",!0),_(f,{onCommand:e[4]||(e[4]=U=>{n.lesson.status=U}),trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"draft"},{default:w(()=>[N(x(t.$t("Draft")),1)]),_:1}),_(d,{command:"published"},{default:w(()=>[N(x(t.$t("Published")),1)]),_:1})]),_:1})]),default:w(()=>[_(l,{type:n.lesson.status=="published"?"success":"info",bg:"",text:"",class:"el-dropdown-link"},{default:w(()=>[N(x(t.$labelize(n.lesson.status))+" ",1),_(a,{class:"el-icon--right"},{default:w(()=>[_(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:w(()=>[N(x(t.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[F,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:w(()=>[_(p)]),_:1})],8,zje)])])]}),_:1}),_(B,{class:"fcom_full_editor_container fcom_lesson_editor_full"},{default:w(()=>[_(I,{style:{overflow:"hidden",padding:"0"},class:"fcom_full_editor_main"},{default:w(()=>[g("div",Hje,[_(T,{height:"calc(100vh - 60px)",class:"fcom_lesson_editor_scroll"},{default:w(()=>{var z,U,G,K;return[g("div",Uje,[_(y,{modelValue:n.lesson.title,"onUpdate:modelValue":e[5]||(e[5]=X=>n.lesson.title=X),placeholder:t.$t("Title")},null,8,["modelValue","placeholder"]),s.appReady?(v(),D(b,{key:0,modelValue:n.lesson.message,"onUpdate:modelValue":e[6]||(e[6]=X=>n.lesson.message=X),autofocus:!0,placeholder:t.$t("Describe this quiz")+"...",disable_media:!0},null,8,["modelValue","placeholder"])):O("",!0),(U=(z=n.lesson.meta)==null?void 0:z.quiz_questions)!=null&&U.length?(v(),A("div",jje,[(v(!0),A(ee,null,we(n.lesson.meta.quiz_questions,(X,W)=>(v(),A("div",{key:X.slug,id:"fcom_question_"+X.slug,class:q(["fcom_question",[X.type,{disabled:!X.enabled}]])},[o.showQuestionImage(X)?(v(),A("div",Yje,[_(k,{src:X.image_url},null,8,["src"])])):O("",!0),g("div",qje,[g("div",{class:"fcom_question_label",role:"button",tabindex:"0","aria-label":t.$t("Edit question"),onClick:Q=>o.openEditQuestionModal(X),onKeydown:[ut(Q=>o.openEditQuestionModal(X),["enter"]),ut(Ee(Q=>o.openEditQuestionModal(X),["prevent"]),["space"])]},[X.label_rendered?(v(),A("span",{key:0,innerHTML:X.label_rendered},null,8,Xje)):(v(),A("span",Kje,x(X.label||t.$t("Untitled question")),1))],40,Gje),g("div",Zje,[_(C,{items:[{label:o.getStatusText(X),action:()=>{o.toggleQuestion(X)}},{label:t.$t("Edit"),action:()=>{o.openEditQuestionModal(X)}},{label:t.$t("Duplicate"),action:()=>{o.duplicateQuestion(X)}},{label:t.$t("Delete"),type:"danger",action:()=>{o.openDeleteQuestionPrompt(X.slug)}}],placement:"bottom-end"},null,8,["items"])])]),g("div",Jje,[_(S,{class:"fcom_question_options",items:X.options,"row-key":"_key","item-class":"fcom_question_option_dnd",onDrop:o.saveData},{item:w(({data:Q})=>[g("div",Qje,[e[8]||(e[8]=g("div",{class:"fcom_drag_handle fcom_option_drag","aria-hidden":"true"},"⋮⋮",-1)),_($,{modelValue:Q.is_correct,"onUpdate:modelValue":ne=>Q.is_correct=ne,onChange:ne=>o.checkAndSaveQuestion(X,Q),class:q({single_choice:X.type=="single_choice"})},{default:w(()=>[N(x(Q.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange","class"])])]),_:2},1032,["items","onDrop"]),X.help_text?(v(),A("div",eWe,x(X.help_text),1)):O("",!0)]),o.showMoving?(v(),A("div",tWe,[_(a,{role:"button",tabindex:W===0?-1:0,"aria-disabled":W===0,"aria-label":t.$t("Move question up"),onClick:Q=>o.moveUp(W),onKeydown:[ut(Q=>o.moveUp(W),["enter"]),ut(Ee(Q=>o.moveUp(W),["prevent"]),["space"])]},{default:w(()=>[_(M)]),_:1},8,["tabindex","aria-disabled","aria-label","onClick","onKeydown"]),_(a,{role:"button",tabindex:W===n.lesson.meta.quiz_questions.length-1?-1:0,"aria-disabled":W===n.lesson.meta.quiz_questions.length-1,"aria-label":t.$t("Move question down"),onClick:Q=>o.moveDown(W),onKeydown:[ut(Q=>o.moveDown(W),["enter"]),ut(Ee(Q=>o.moveDown(W),["prevent"]),["space"])]},{default:w(()=>[_(P)]),_:1},8,["tabindex","aria-disabled","aria-label","onClick","onKeydown"])])):O("",!0)],10,Wje))),128))])):O("",!0),(K=(G=n.lesson.meta)==null?void 0:G.quiz_questions)!=null&&K.length?(v(),D(l,{key:3,onClick:o.openAddQuestionModal,class:"fcom_primary_button add_btn"},{default:w(()=>[N(x("+ "+t.$t("Add Question"))+" ",1),t.has_pro?O("",!0):(v(),A("span",iWe," ("+x(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"])):(v(),A("div",nWe,[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:w(()=>[N(x("+ "+t.$t("Add Question"))+" ",1),t.has_pro?O("",!0):(v(),A("span",sWe," ("+x(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"])]))])]}),_:1})])]),_:1}),Re(_(R,{style:{padding:"0"},class:"fcom_full_editor_side",width:"300px"},{default:w(()=>[_(T,{height:"calc(100vh - 60px)"},{default:w(()=>[g("div",oWe,[_(L,{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:w(()=>[_(a,null,{default:w(()=>[_(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(V,{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 aWe=ue(Ije,[["render",rWe]]),lWe={name:"SectionScheduler",components:{CaretBottom:mae},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}}},cWe={style:{"padding-left":"10px"},class:"fcom_section_scheduler"},uWe={class:"fcom_scheduler_form"},dWe={class:"fcom_input_group"},hWe={class:"el_inline_date_picker"},fWe={class:"fcom_input_group"},pWe={class:"fcom_input_group"},mWe={class:"fcom_scheduler_form scheduler_structured"},gWe={class:"fcom_input_group"},vWe={class:"fcom_label"},_We={class:"fcom_input_group"};function yWe(t,e,n,i,s,o){const r=H("CaretBottom"),a=be,l=Wd,c=M8,u=He,d=Yo,h=r2,f=xt("loading");return v(),A("div",cWe,[n.course.settings.course_type=="scheduled"?(v(),D(d,{key:0,persistent:!1,placement:"bottom",width:400,visible:s.show},{reference:w(()=>[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:w(()=>[_(r)]),_:1})])]),default:w(()=>[g("div",uWe,[g("div",dWe,[g("div",hWe,[_(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",fWe,[_(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",pWe,[Re((v(),D(u,{disabled:s.saving,type:"success",onClick:o.saveSchedule},{default:w(()=>[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:w(()=>[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:w(()=>[_(r)]),_:1})])]),default:w(()=>[g("div",mWe,[g("div",gWe,[g("div",vWe,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",_We,[Re((v(),D(u,{disabled:s.saving,type:"success",onClick:o.saveUnlockDays},{default:w(()=>[N(x(t.$t("Update")),1)]),_:1},8,["disabled","onClick"])),[[f,s.saving]])])])]),_:1},8,["visible"])):O("",!0)])}const bWe=ue(lWe,[["render",yWe]]),wWe={name:"_SectionSechedulerEmail",components:{CrepeEditor:cu},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()})}},kWe={class:"fcom_section_email_config"},CWe={class:"dialog_header"},xWe={class:"dialog_left"},SWe={class:"dialog_body"},$We={class:"fcom_input_group"},AWe={class:"fcom_label label_row"},EWe={class:"fcom_input_group"},MWe={class:"fcom_label label_row"},TWe={class:"fcom_extra_editor"},PWe={class:"dialog_footer"};function IWe(t,e,n,i,s,o){const r=eu,a=He,l=$r,c=Ar,u=Sr,d=ft,h=H("crepe-editor"),f=$s;return v(),A("div",kWe,[_(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:w(()=>[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:w(()=>[g("div",CWe,[g("div",xWe,[g("h4",null,x(t.$t("Edit Email Notification")),1)])])]),footer:w(()=>[g("div",PWe,[_(a,{class:"fcom_secondary_button",onClick:e[3]||(e[3]=p=>s.editorOpen=!1)},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1}),_(a,{class:"fcom_primary_button",loading:s.savingEmailMeta,onClick:o.saveSectionMeta},{default:w(()=>[N(x(t.$t("Save")),1)]),_:1},8,["loading","onClick"])])]),default:w(()=>[g("div",SWe,[g("div",$We,[g("div",AWe,[g("span",null,x(t.$t("Subject")),1),_(u,{trigger:"click",onCommand:o.insertIntoSubject},{dropdown:w(()=>[_(c,null,{default:w(()=>[(v(!0),A(ee,null,we(s.smartCodes,(p,m)=>(v(),D(l,{key:m,command:m},{default:w(()=>[N(x(p),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:w(()=>[_(a,{class:"fcom_secondary_button"},{default:w(()=>[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",EWe,[g("div",MWe,[g("span",null,x(t.$t("Message")),1),_(u,{trigger:"click",onCommand:o.insertIntoMessage},{dropdown:w(()=>[_(c,null,{default:w(()=>[(v(!0),A(ee,null,we(s.smartCodes,(p,m)=>(v(),D(l,{key:m,command:m},{default:w(()=>[N(x(p),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:w(()=>[_(a,{class:"fcom_secondary_button"},{default:w(()=>[N(x(t.$t("Add shortcode")),1)]),_:1})]),_:1},8,["onCommand"])]),g("div",TWe,[_(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 LWe=ue(wWe,[["render",IWe]]),OWe={name:"SectionPart",props:["course","sections","section"],emits:["reload"],components:{LessonEditor:fU,LessonLine:mje,SectionScheduler:bWe,FluentDnD:za,QuizEditor:aWe,SectionSechedulerEmail:LWe},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)}}},DWe={class:"fcom_section_primary"},RWe={class:"fcom_section_primary_item"},VWe={key:0,class:"fcom_heading_item"},FWe={class:"fcom_space_counts"},NWe={class:"fcom_section_config fcom_label_schedule"},BWe={class:"fcom_section_config fcom_label_email"},zWe={class:"fcom_section_primary_item_actions fcom_label_actions add_section_item"},HWe={key:0},UWe={class:"fcom_move_popup_close"},jWe={class:"fcom_move_popup_close"},WWe={key:0,class:"fcom_section_items"},YWe={key:0};function qWe(t,e,n,i,s,o){const r=be,a=He,l=ft,c=H("section-scheduler"),u=H("SectionSechedulerEmail"),d=$r,h=Ar,f=Sr,p=en,m=tn,y=H("Close"),b=sn,k=Jt,C=H("MoreFilled"),$=H("lesson-line"),S=H("FluentDnD"),M=H("LessonEditor"),P=H("QuizEditor"),T=xt("loading");return v(),A(ee,null,[Re((v(),A("div",DWe,[g("div",RWe,[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:w(()=>[_(a,{onClick:e[2]||(e[2]=I=>o.patchSection(["title"]))},{default:w(()=>[N(x(t.$t("save")),1)]),_:1})]),_:1},8,["modelValue"])):(v(),A("h4",VWe,[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:w(()=>[_(r,{style:Xe(n.section.isCollapsed?"transform: rotate(-90deg);":"")},{default:w(()=>[...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",FWe,x(t.$_n("%s lesson","%s lessons",n.section.lessons.length)),1)]),_:1})):O("",!0)]))],2),o.hasSchedule?(v(),A(ee,{key:0},[g("div",NWe,[_(c,{section:n.section,course:n.course},null,8,["section","course"])]),g("div",BWe,[o.showEmailConfig?(v(),D(u,{key:0,section:n.section,course:n.course},null,8,["section","course"])):O("",!0)])],64)):O("",!0),g("div",zWe,[_(f,{onCommand:o.handleAddSectionItem,trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"lesson"},{default:w(()=>[N(x(t.$t("Lesson")),1)]),_:1}),_(d,{disabled:!t.has_pro,command:"quiz"},{default:w(()=>[N(x(t.$t("Quiz"))+" ",1),t.has_pro?O("",!0):(v(),A("span",HWe," ("+x(t.$t("Pro Required"))+")",1))]),_:1},8,["disabled"])]),_:1})]),default:w(()=>[_(a,{"aria-label":t.$t("Add New"),class:"fcom_secondary_button"},{default:w(()=>[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]=Ee(I=>t.doNothing(),["prevent"])),o.addSectionItem],"label-position":"top"},{default:w(()=>[_(p,{label:o.selectedType==="quiz"?t.$t("Quiz Title"):t.$t("Lesson Title")},{default:w(()=>[_(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:w(()=>[Re((v(),D(a,{disabled:s.addingSectionItem,class:"fcom_secondary_button",onClick:o.addSectionItem},{default:w(()=>[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:w(()=>[N(x(t.$t("Add & Edit")),1)]),_:1},8,["disabled"])),[[T,s.addingSectionItem]])]),_:1})]),_:1},8,["onSubmit"]),g("div",UWe,[_(r,{onClick:e[8]||(e[8]=I=>s.showAddSectionPopup=!1)},{default:w(()=>[_(y)]),_:1})])],2),[[jt,s.showAddSectionPopup]]),Re(g("div",{class:q(["fcom_copy_section_popup","section_"+n.section.id])},[_(m,{onSubmit:e[10]||(e[10]=Ee(I=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(p,{label:t.$t("Copy Section to a different Course")},{default:w(()=>[_(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:w(()=>[(v(!0),A(ee,null,we(s.courses,I=>(v(),D(b,{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:w(()=>[N(x(t.$t("Copy Section")),1)]),_:1},8,["onClick","disabled"])]),_:1}),g("div",jWe,[_(r,{onClick:e[11]||(e[11]=I=>s.showCopySectionPopup=!1)},{default:w(()=>[_(y)]),_:1})])],2),[[jt,s.showCopySectionPopup]]),_(f,{onCommand:o.handleSectionAction,trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"edit_title"},{default:w(()=>[N(x(t.$t("Edit Title")),1)]),_:1}),_(d,{command:"copy_section"},{default:w(()=>[N(x(t.$t("Copy To")),1)]),_:1}),_(d,{command:"delete"},{default:w(()=>[N(x(t.$t("Delete section")),1)]),_:1})]),_:1})]),default:w(()=>[_(a,{"aria-label":t.$t("View actions"),size:"small",class:"fcom_dot_menu",text:""},{default:w(()=>[_(r,null,{default:w(()=>[_(C)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"])])]),n.section.lessons.length&&!n.section.isCollapsed?(v(),A("div",WWe,[_(S,{items:n.section.lessons,onDrop:o.dropLesson,"item-class":"fcom_section_item"},{item:w(({data:I,index:L})=>[(v(),D($,{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:w(()=>[...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(),A("div",YWe,[(v(),D(ea,{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 GWe=ue(OWe,[["render",qWe]]),XWe={name:"EditLessons",props:["course"],components:{SectionPart:GWe,FluentDnD:za},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()}},KWe={class:"fcom_course_lessons"},ZWe={class:"fcom_settings_header"},JWe={class:"fcom_settings_header_meta"},QWe={class:"fcom_settings_header_meta_item"},eYe={class:"fcom_card_section_heading"},tYe={key:0},nYe={class:"fcom_section_labels"},sYe={class:"fcom_lebel fcom_label_lesson"},iYe={class:"fcom_lebel fcom_label_schedule"},oYe={class:"fcom_lebel fcom_label_email"};function rYe(t,e,n,i,s,o){const r=Nt,a=be,l=He,c=ft,u=en,d=tn,h=Yo,f=H("section-part"),p=H("FluentDnD"),m=xt("loading");return v(),A("div",KWe,[g("div",ZWe,[g("div",null,[g("h2",null,x(t.$t("Lessons")),1),g("div",JWe,[g("div",QWe,[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",eYe,[s.loading?(v(),D(r,{key:1,rows:1})):(v(),A("h3",tYe,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:w(()=>[_(a,{style:Xe(s.isCollapsed?"transform: rotate(-90deg);":"")},{default:w(()=>[...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:w(()=>[_(l,{class:"fcom_primary_button",bg:""},{default:w(()=>[N(x(t.$t("+ Add Section")),1)]),_:1})]),default:w(()=>[_(d,{onSubmit:e[1]||(e[1]=Ee(y=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(u,{label:t.$t("Section Title")},{default:w(()=>[_(c,{ref:"fcom_section_title_add",onKeydown:ut(Ee(o.addSection,["prevent"]),["enter"]),modelValue:s.newSection.title,"onUpdate:modelValue":e[0]||(e[0]=y=>s.newSection.title=y),placeholder:t.$t("Enter Section title")},null,8,["onKeydown","modelValue","placeholder"])]),_:1},8,["label"]),_(u,null,{default:w(()=>[Re((v(),D(l,{disabled:s.addingSection,class:"fcom_primary_button",onClick:o.addSection},{default:w(()=>[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",nYe,[g("div",sYe,x(t.$t("Lesson name")),1),g("div",iYe,x(t.$t("Schedule")),1),g("div",oYe,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:w(({data:y})=>[_(f,{onReload:o.fetchSections,course:n.course,sections:s.sections,section:y},{before_section_heading:w(()=>[...e[4]||(e[4]=[g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)])]),_:1},8,["onReload","course","sections","section"])]),_:1},8,["items","onDrop"])],2)])}const aYe=ue(XWe,[["render",rYe]]),lYe={name:"GroupIcon"},cYe={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function uYe(t,e,n,i,s,o){return v(),A("svg",cYe,[...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 dYe=ue(lYe,[["render",uYe]]),hYe={name:"ManageCourses",components:{CreateCourseForm:kS,AppLayout:yi,Layout:_i,GroupIcon:dYe,Pagination:uu,Search:Qb},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()}},fYe={class:"object_menu"},pYe={class:"fcom_space_menu_ul"},mYe={key:0,class:"fcom_space_topics"},gYe={class:"fcom_topics_filters"},vYe={class:"search_member"},_Ye={class:"feed_filters"},yYe={class:"fcom_feed_filter_label"},bYe={class:"fcom_courses"},wYe={class:"fcom_box_card_list"},kYe=["onClick"],CYe=["src","onError"],xYe={key:1,class:"fcom_no_image"},SYe={class:"fcom_box_card_info"},$Ye={class:"fcom_box_card_name"},AYe={class:"fcom_box_card_by"},EYe={class:"fcom_box_card_details"},MYe={class:"inline_details"},TYe={class:"inline_details"},PYe={key:0,class:"fcom_box_card_description"},IYe={class:"fcom_box_card_action"},LYe=["onClick"],OYe={key:0,class:"fcom_no_items_wrap"};function DYe(t,e,n,i,s,o){const r=He,a=qs,l=H("Search"),c=be,u=ft,d=sn,h=Jt,f=hi,p=H("router-link"),m=H("GroupIcon"),y=H("pagination"),b=H("layout"),k=H("app-layout"),C=H("create-course-form"),$=Va,S=xt("loading");return v(),A(ee,null,[_(k,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:w(()=>[_(b,{wrapper_class:"no_bg_layout",title:t.$t("Manage Courses")+(s.pagination.total?" ("+s.pagination.total+")":"")},{actions:w(()=>[g("div",fYe,[g("ul",pYe,[g("li",null,[g("a",{onClick:e[0]||(e[0]=Ee(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]=Ee(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]=Ee(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:w(()=>[N(x(t.$t("Add Course")),1)]),_:1})])])])]),default:w(()=>[s.courseCategories&&s.courseCategories.length?(v(),A("div",mYe,[_(a,null,{default:w(()=>[g("div",gYe,[_(r,{onClick:e[4]||(e[4]=M=>o.setTopic("")),class:q({fcom_active_topic:!s.topic_slug})},{default:w(()=>[N(x(t.$t("All")),1)]),_:1},8,["class"]),(v(!0),A(ee,null,we(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:w(()=>[N(x(M.title),1)]),_:2},1032,["onClick","class"]))),128))])]),_:1})])):O("",!0),g("div",vYe,[_(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:w(()=>[_(c,null,{default:w(()=>[_(l)]),_:1})]),_:1},8,["onClear","onKeydown","onInput","modelValue","placeholder"])]),g("div",_Ye,[e[10]||(e[10]=g("div",{class:"fcom_feed_divider"},null,-1)),g("span",yYe,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:w(()=>[_(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(),A("div",bYe,[g("div",wYe,[(v(!0),A(ee,null,we(s.courses,M=>{var P;return v(),A("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(),A("img",{key:0,src:M.cover_photo,alt:"",onError:T=>M.coverError=!0},null,40,CYe)):(v(),A("div",xYe))],8,kYe),g("div",SYe,[g("div",$Ye,[_(p,{class:"course_route",to:{name:"course_overview",params:{course_id:M.id}}},{default:w(()=>[N(x(o.getExcerpt(M.title,20))+" ",1),M.status=="draft"?(v(),D(f,{key:0,type:"info"},{default:w(()=>[N(x(M.status),1)]),_:2},1024)):O("",!0)]),_:2},1032,["to"]),g("span",AYe,x(t.$t("by %s",(P=M==null?void 0:M.owner)==null?void 0:P.display_name)),1)]),g("div",EYe,[g("div",MYe,[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",TYe,[_(c,null,{default:w(()=>[_(m)]),_:1}),N(" "+x(t.$_n("%d student","%d students",M.students_count||0)),1)])]),M.description?(v(),A("div",PYe,x(o.getExcerpt(M.description,40)),1)):O("",!0),g("div",IYe,[g("button",{class:"fcom_card_button",onClick:T=>o.navigateToEditLessons(M.id)},x(t.$t("Manage")),9,LYe)])])])}),128))]),_(y,{hide_on_single:!0,onFetch:o.fetchCourses,pagination:s.pagination},null,8,["onFetch","pagination"]),!s.loading&&!s.courses.length?(v(),A("div",OYe,[s.topic_slug?(v(),A(ee,{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(),A(ee,{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(),A(ee,{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(),A(ee,{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:w(()=>[N(x(t.$t("Create a Course")),1)]),_:1})],64))])):O("",!0)])),[[S,s.loading]])]),_:1},8,["title"])]),_:1}),_($,{"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:w(()=>[g("h4",null,x(t.$t("Create a new course")),1)]),default:w(()=>[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 RYe=ue(hYe,[["render",DYe]]),VYe={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()}},FYe={class:"setting_header"},NYe={class:"setting_body"},BYe={key:1,class:"fcom_bp_migration_space_table"},zYe={style:{margin:"20px 0 20px"}},HYe={class:"fcom_listed fcom_mb_20"},UYe={key:0},jYe={key:1},WYe={key:3,class:"fcom_mt_10"},YYe={key:2,style:{"text-align":"center"}},qYe={style:{"text-align":"left",margin:"0px 20px 30px","font-size":"20px"},class:"fcom_listed"},GYe={key:0},XYe={key:1},KYe={key:0},ZYe={key:1},JYe={key:2},QYe={key:3},eqe=["href"],tqe={key:3};function nqe(t,e,n,i,s,o){const r=Nt,a=hi,l=Il,c=H("InfoFilled"),u=be,d=Ss,h=sn,f=Jt,p=Pl,m=Yt,y=sa,b=ft,k=He,C=a2,$=xt("loading");return v(),A(ee,null,[g("div",FYe,[g("h2",null,x(t.$t("%s Migration",o.providerName)),1)]),g("div",NYe,[s.loading?(v(),D(r,{key:0,animated:!0,rows:5})):s.stage=="config"?(v(),A("div",BYe,[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:w(()=>[_(l,{label:n.is_buddyboss?t.$t("BudyBoss Group"):t.$t("BudyPress Group")},{default:w(S=>[g("div",null,[N(x(S.row.name)+" ",1),S.row.is_migrated?(v(),D(a,{key:0,type:"success"},{default:w(()=>[N(x(t.$t("Migrated")),1)]),_:1})):O("",!0)])]),_:1},8,["label"]),_(l,{label:t.$t("FluentCommunity Menu Group"),"class-name":"space_groups"},{header:w(()=>[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:w(()=>[_(u,{class:"el-icon--right"},{default:w(()=>[_(c)]),_:1})]),_:1},8,["content"])]),default:w(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:w(()=>[_(h,{value:0,label:t.$t("No Menu Group")},null,8,["label"]),(v(!0),A(ee,null,we(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",zYe,x(t.$t("The following data will be migrated to FluentCommunity")),1),g("ul",HYe,[s.featureConfig.has_groups?(v(),A("li",UYe,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(),A("li",jYe,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:w(()=>[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:w(()=>[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(),A("div",WYe,[_(y,{type:"error",closable:!1,"show-icon":""},{default:w(()=>[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}),_(b,{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:w(()=>[N(x(t.$t("Start Migrating Data")),1)]),_:1},8,["loading","disabled"])])):s.stage=="migrating"?(v(),A("div",YYe,[g("ul",qYe,[s.featureConfig.has_groups?(v(),A("li",GYe,[N(x(t.$t("Groups"))+" ",1),_(a,{type:"success"},{default:w(()=>[N(x(t.$t("Migrated")),1)]),_:1})])):O("",!0),s.featureConfig.has_groups?Re((v(),A("li",XYe,[N(x(t.$t("Group Members"))+" ",1),o.completedSteps.group_members?(v(),D(a,{key:0,type:"success"},{default:w(()=>[N(x(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[$,s.current_status.current_stage=="group_members"]]):O("",!0),Re((v(),A("li",null,[N(x(t.$t("Posts & Activities"))+" ",1),o.completedSteps.posts?(v(),D(a,{key:0,type:"success"},{default:w(()=>[N(x(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[$,s.current_status.current_stage=="posts"]]),Re((v(),A("li",null,[N(x(t.$t("Users"))+" ",1),o.completedSteps.users?(v(),D(a,{key:0,type:"success"},{default:w(()=>[N(x(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[$,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(),A("div",KYe,[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(),A("div",ZYe,[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(),A("div",JYe,[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(),A("div",QYe,[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,eqe)])):O("",!0)])):(v(),A("div",tqe,x(t.$t("Migration Completed")),1))])],64)}const sqe=ue(VYe,[["render",nqe]]),iqe={name:"ManageMigrations",components:{BuddyPress:sqe,Layout:_i,AppLayout:yi},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()}},oqe={class:"settings_router"},rqe={class:"fhr_content_layout_body"},aqe={key:0,class:"no_members"},lqe={key:1,class:"fcom_migration_selectors white_loaded"},cqe={key:1},uqe={style:{margin:"0"}},dqe={style:{margin:"10px 0 20px"}},hqe={class:"fcom_box_card_list"},fqe=["onClick"],pqe={style:{padding:"10px"},class:"fcom_box_card_avatar"},mqe=["src"],gqe={class:"fcom_box_card_info"},vqe={style:{"text-align":"center",display:"block"},class:"fcom_box_card_name"},_qe={href:"https://fluentcommunity.co/docs/fluentcommunity-buddyboss-migration",target:"_blank",rel:"noopener"},yqe={key:2,class:"fcom_migration_content"};function bqe(t,e,n,i,s,o){const r=Nt,a=sa,l=H("BuddyPress"),c=H("layout"),u=H("app-layout");return v(),D(u,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:w(()=>[_(c,{class:"no_bg_layout",title:t.$t("Manage Migrations")},{default:w(()=>[g("div",oqe,[g("div",rqe,[o.canManageMigrations?s.selectedMigration?(v(),A("div",yqe,[s.selectedMigration=="buddypress"||s.selectedMigration=="buddyboss"?(v(),D(l,{key:0,is_buddyboss:s.selectedMigration=="buddyboss"},null,8,["is_buddyboss"])):O("",!0)])):(v(),A("div",lqe,[s.loading?(v(),D(r,{key:0,animated:!0})):(v(),A("div",cqe,[g("h3",uqe,x(t.$t("Migrate Data from other plugins.")),1),g("p",dqe,x(t.$t("Please select a plugin from where you want to migrate data to FluentCommunity.")),1),g("div",hqe,[(v(!0),A(ee,null,we(s.migrations,d=>(v(),A("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",pqe,[d.logo?(v(),A("img",{key:0,style:{width:"200px","max-width":"100%","object-fit":"scale-down"},src:d.logo,alt:""},null,8,mqe)):O("",!0)]),g("div",gqe,[g("div",vqe,[g("h4",null,x(d.title),1)])])],8,fqe))),128))])])),_(a,{type:"warning",closable:!1,style:{"margin-top":"15px"}},{default:w(()=>[g("p",null,[N(x(t.$t("For large databases, please read our documentation and use wp-cli."))+" ",1),g("a",_qe,x(t.$t("Read Documentation")),1)])]),_:1})])):(v(),A("div",aqe,x(t.$t("Sorry, you do not have permission to view this page")),1))])])]),_:1},8,["title"])]),_:1})}const wqe=ue(iqe,[["render",bqe]]),kqe={name:"GeneticPromo",props:{placement:{type:String,default:"generic_promo"}}},Cqe={class:"fcom_generic_promo"},xqe={style:{"text-align":"center"},class:"fcom_upgrade_banner"},Sqe={style:{"font-size":"18px","margin-bottom":"10px"}},$qe=["href"];function Aqe(t,e,n,i,s,o){return v(),A("div",Cqe,[g("div",xqe,[g("h3",Sqe,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,$qe)])])}const pU=ue(kqe,[["render",Aqe]]),Eqe={name:"AccessAutomator",components:{GeneticPromo:pU,AppLayout:yi,Layout:_i},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()}},Mqe={class:"settings_router"},Tqe={class:"fhr_content_layout_body_"},Pqe={class:"fcom_settings_header"},Iqe={class:"setting_body_"},Lqe={key:0,class:"white_loaded"},Oqe={key:1,class:"white_loaded"},Dqe={key:2,class:"white_loaded"},Rqe={class:"fcom_generic_promo"},Vqe={style:{"text-align":"center"},class:"fcom_upgrade_banner"},Fqe={style:{"font-size":"18px","margin-bottom":"10px"}},Nqe={key:3},Bqe={class:"white_loaded fcom_mb_20"},zqe={class:"fcom_input_wrap"},Hqe={key:0},Uqe={class:"fcom_input_wrap"},jqe={class:"fcom_input_wrap"},Wqe={key:0,class:"fcom_input_wrap"},Yqe={key:0,class:"fcom_mapped_list"},qqe={class:"fcom_mapped_list__head"},Gqe={class:"fcom_mapped_list__group_title"},Xqe={class:"fcom_mapped_list__space"},Kqe=["innerHTML"],Zqe=["innerHTML"],Jqe={key:2,class:"fcom_mapped_list__icon fcom_no_avatar"},Qqe={class:"fcom_mapped_list__name"},eGe={class:"fcom_mapped_list__actions"},tGe={key:1,class:"white_loaded"},nGe={key:4};function sGe(t,e,n,i,s,o){const r=He,a=sa,l=Nt,c=H("genetic-promo"),u=Yt,d=tn,h=be,f=sn,p=Jt,m=H("layout"),y=H("app-layout");return v(),D(y,{wrapper_class:"fcom_single_layout fcom_access_automator fcom_max_layout"},{default:w(()=>[_(m,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Access Management with FluentCRM")},{actions:w(()=>[s.spaceGroups?(v(),D(r,{key:0,class:"fcom_primary_button",loading:s.saving,onClick:o.saveSettings},{default:w(()=>[g("span",null,x(t.$t("Save Settings")),1)]),_:1},8,["loading","onClick"])):O("",!0)]),default:w(()=>[g("div",Mqe,[g("div",Tqe,[g("div",Pqe,[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:w(()=>[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",Iqe,[s.loading?(v(),A("div",Lqe,[_(l,{rows:5,animated:!0})])):t.has_pro?s.has_fluentcrm?s.settings&&s.spaceGroups?(v(),A("div",Nqe,[g("div",Bqe,[_(d,{onSubmit:e[5]||(e[5]=Ee(b=>t.doNothing(),["prevent"])),modelValue:s.settings,"onUpdate:modelValue":e[6]||(e[6]=b=>s.settings=b),"label-position":"top"},{default:w(()=>[g("div",zqe,[_(u,{modelValue:s.settings.is_enabled,"onUpdate:modelValue":e[1]||(e[1]=b=>s.settings.is_enabled=b),"true-value":"yes","false-value":"no"},{default:w(()=>[N(x(t.$t("Enable Access Management with FluentCRM")),1)]),_:1},8,["modelValue"]),s.settings.is_enabled!="yes"?(v(),A("p",Hqe,x(t.$t("Enable to configure your access management with FluentCRM")),1)):O("",!0)]),s.settings.is_enabled=="yes"?(v(),A(ee,{key:0},[g("div",Uqe,[_(u,{modelValue:s.settings.create_crm_contact,"onUpdate:modelValue":e[2]||(e[2]=b=>s.settings.create_crm_contact=b),"true-value":"yes","false-value":"no"},{default:w(()=>[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",jqe,[_(u,{modelValue:s.settings.create_user,"onUpdate:modelValue":e[3]||(e[3]=b=>s.settings.create_user=b),"true-value":"yes","false-value":"no"},{default:w(()=>[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(),A("div",Wqe,[_(u,{modelValue:s.settings.send_welcome_email,"onUpdate:modelValue":e[4]||(e[4]=b=>s.settings.send_welcome_email=b),"true-value":"yes","false-value":"no"},{default:w(()=>[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(),A("div",Yqe,[g("div",qqe,[g("span",null,x(t.$t("Space")),1),g("span",null,x(t.$t("Mapped FluentCRM Tag")),1)]),(v(!0),A(ee,null,we(s.spaceGroups,b=>(v(),A("div",{class:"fcom_mapped_list__group",key:b.id},[g("div",Gqe,x(b.title),1),(v(!0),A(ee,null,we(b.spaces,k=>(v(),A("div",{class:"fcom_mapped_list__row",key:k.id},[g("div",Xqe,[k.icon?(v(),D(h,{key:0,class:"fcom_mapped_list__icon"},{default:w(()=>[g("span",{innerHTML:k.icon},null,8,Kqe)]),_:2},1024)):k.shape_svg?(v(),A("span",{key:1,class:"fcom_mapped_list__icon",innerHTML:k.shape_svg},null,8,Zqe)):(v(),A("span",Jqe)),g("span",Qqe,x(k.title),1)]),g("div",eGe,[_(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:w(()=>[(v(!0),A(ee,null,we(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:w(()=>[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:w(()=>[g("span",null,x(t.$t("Save Settings")),1)]),_:1},8,["loading","onClick"])):(v(),A("div",tGe,[_(c,{placement:"feature_lock_access_automator"})]))])):(v(),A("div",nGe,[g("p",null,x(t.$t("Settings could not be loaded")),1)])):(v(),A("div",Dqe,[g("div",Rqe,[g("div",Vqe,[g("h3",Fqe,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]=b=>o.installPlugin("fluent-crm"))},{default:w(()=>[N(x(t.$t("Install FluentCRM")),1)]),_:1},8,["loading"])])])])):(v(),A("div",Oqe,[_(c,{placement:"feature_lock_access_automator"})]))])])])]),_:1},8,["title"])]),_:1})}const iGe=ue(Eqe,[["render",sGe]]),oGe={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 rGe(t,e,n,i,s,o){const r=r2,a=en,l=Yt,c=He,u=tn,d=xt("loading");return v(),D(u,{onSubmit:e[4]||(e[4]=Ee(h=>t.doNothing(),["prevent"])),"label-position":"top",modelValue:s.config,"onUpdate:modelValue":e[5]||(e[5]=h=>s.config=h)},{default:w(()=>[_(a,{label:t.$t("Maximum Number of Topics a user can select when creating a post")},{default:w(()=>[_(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:w(()=>[_(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:w(()=>[_(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:w(()=>[N(x(t.$t("Show Topics on Post Card")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(a,null,{default:w(()=>[Re((v(),D(c,{class:"fcom_primary_button",onClick:e[3]||(e[3]=h=>o.update())},{default:w(()=>[N(x(t.$t("Update")),1)]),_:1})),[[d,s.loading]])]),_:1})]),_:1},8,["modelValue"])}const aGe=ue(oGe,[["render",rGe]]),lGe={name:"TopicCreateForm",components:{SpaceIcon:xp,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()}},cGe={class:"fcom_help_text"},uGe={key:0,class:"fcom_space_title"},dGe={key:0},hGe={key:1},fGe={class:"fcom_help_text"};function pGe(t,e,n,i,s,o){const r=ft,a=en,l=H("slug-input"),c=H("SpaceIcon"),u=sn,d=n2,h=Jt,f=Yt,p=He,m=tn,y=xt("loading");return v(),D(m,{onSubmit:e[5]||(e[5]=Ee(b=>t.doNothing(),["prevent"])),modelValue:s.editing_topic,"onUpdate:modelValue":e[6]||(e[6]=b=>s.editing_topic=b),"label-position":"top"},{default:w(()=>[_(a,{label:t.$t("Topic Title")},{default:w(()=>[_(r,{placeholder:t.$t("Title of your topic"),modelValue:s.editing_topic.title,"onUpdate:modelValue":e[0]||(e[0]=b=>s.editing_topic.title=b),type:"text"},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),_(a,{label:t.$t("Topic Slug")},{default:w(()=>[_(l,{disabled:!!s.editing_topic.id,modelValue:s.editing_topic.slug,"onUpdate:modelValue":e[1]||(e[1]=b=>s.editing_topic.slug=b),placeholder:t.$t("Slug of your topic")},null,8,["disabled","modelValue","placeholder"])]),_:1},8,["label"]),_(a,{label:t.$t("Topic sub-title")},{default:w(()=>[_(r,{placeholder:t.$t("Sub-title of your topic"),modelValue:s.editing_topic.description,"onUpdate:modelValue":e[2]||(e[2]=b=>s.editing_topic.description=b),type:"text"},null,8,["placeholder","modelValue"]),g("div",cGe,[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:w(()=>[_(h,{modelValue:s.editing_topic.space_ids,"onUpdate:modelValue":e[3]||(e[3]=b=>s.editing_topic.space_ids=b),multiple:"",placeholder:t.$t("Select Spaces"),style:{width:"100%"}},{default:w(()=>[(v(!0),A(ee,null,we(s.formattedSpaceGroups,b=>(v(),D(d,{key:b.label,label:b.label},{default:w(()=>[(v(!0),A(ee,null,we(b.spaces,k=>(v(),D(u,{key:k.slug,label:k.title,value:k.id.toString()},{default:w(()=>[k.id?(v(),A("span",uGe,[_(c,{space_profile:k},null,8,["space_profile"]),g("span",null,[N(x(t.getExcerpt(k.title,50))+" ",1),k.type=="course"?(v(),A("span",dGe," ("+x(t.$t("course"))+")",1)):O("",!0)])])):(v(),A("span",hGe,x(t.getExcerpt(k.title,50)),1))]),_:2},1032,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","placeholder"]),g("div",fGe,[g("p",null,x(t.$t("Select spaces where this topic will be visible.")),1)])]),_:1},8,["label"])),_(a,null,{default:w(()=>[_(f,{modelValue:s.editing_topic.admin_only,"onUpdate:modelValue":e[4]||(e[4]=b=>s.editing_topic.admin_only=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Only admins and moderators can select this topic")),1)]),_:1},8,["modelValue"])]),_:1}),_(a,null,{default:w(()=>[Re((v(),D(p,{class:"fcom_primary_button",onClick:o.createOrupdateTopic,disabled:s.saving},{default:w(()=>[N(x(t.$t("Save")),1)]),_:1},8,["onClick","disabled"])),[[y,s.saving]])]),_:1})]),_:1},8,["modelValue"])}const mGe=ue(lGe,[["render",pGe]]),gGe={name:"AllTopics",components:{TopicCreateForm:mGe,SlugInput:Yd,SpaceIcon:xp,Layout:_i,AppLayout:yi,TopicsConfig:aGe,FluentDnD:za},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)}},vGe=["href"],_Ge={key:0,class:"fhr_content_layout_body"},yGe={class:"fcom_mb_10"},bGe={class:"fcom_manager_actions fcom_mb_10"},wGe={class:"bulk_search"},kGe={class:"fcom_topics_dnd fcom_manager_table"},CGe={key:0,class:"fcom_topic_row fcom_topic_row_head"},xGe={class:"col_title"},SGe={class:"col_spaces"},$Ge={class:"col_admin"},AGe={class:"col_actions"},EGe={class:"fcom_topic_row"},MGe=["title"],TGe={class:"col_title"},PGe={class:"fcom_topic_title"},IGe={class:"fcom_meta_text"},LGe={class:"col_spaces"},OGe={class:"col_admin"},DGe={class:"col_actions"},RGe={class:"fcom_table_action_col"},VGe={key:2,class:"fcom_topic_empty"},FGe={key:1,class:"settings_router"},NGe={class:"fhr_content_layout_body"},BGe={class:"setting_body",style:{"text-align":"center"}},zGe={class:"promo_description"},HGe=["href"],UGe={class:"dialog_header"},jGe={class:"dialog_left"},WGe={key:0,class:"dialog_body"};function YGe(t,e,n,i,s,o){const r=H("Plus"),a=be,l=He,c=H("Operation"),u=ft,d=H("DeleteFilled"),h=H("FluentDnD"),f=H("layout"),p=H("app-layout"),m=H("TopicCreateForm"),y=$s,b=H("TopicsConfig"),k=xt("loading");return v(),A(ee,null,[_(p,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(f,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Topics")},{actions:w(()=>[t.has_pro?(v(),A(ee,{key:0},[_(l,{class:"fcom_primary_button",onClick:e[0]||(e[0]=C=>o.showForm(null))},{default:w(()=>[_(a,null,{default:w(()=>[_(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:w(()=>[_(a,null,{default:w(()=>[_(c)]),_:1}),g("span",null,x(t.$t("Settings")),1)]),_:1})],64)):(v(),A("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,vGe))]),default:w(()=>[t.has_pro?(v(),A("div",_Ge,[g("div",null,[g("p",yGe,x(t.$t("Categorize your content and allow members to filter posts with the topic navigation bar in spaces.")),1),g("div",bGe,[g("div",wGe,[_(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:w(()=>[...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(),A("div",kGe,[s.topics.length?(v(),A("div",CGe,[e[8]||(e[8]=g("span",{class:"col_handle"},null,-1)),g("span",xGe,x(t.$t("Title")),1),g("span",SGe,x(t.$t("Spaces")),1),g("span",$Ge,x(t.$t("Admin Only?")),1),g("span",AGe,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:w(({data:C})=>[g("div",EGe,[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,MGe),g("span",TGe,[g("p",PGe,x(C.title),1),g("span",IGe,x(C.description),1)]),g("span",LGe,x(o.formatTopics(C.space_ids)),1),g("span",OGe,x(C.admin_only=="yes"?t.$t("Yes"):t.$t("No")),1),g("span",DGe,[g("div",RGe,[_(l,{onClick:$=>o.showForm(C),size:"small"},{default:w(()=>[N(x(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(l,{"aria-label":t.$t("Delete"),onClick:$=>o.removeTopic(C),type:"danger",plain:"",size:"small"},{default:w(()=>[_(a,null,{default:w(()=>[_(d)]),_:1})]),_:1},8,["aria-label","onClick"])])])])]),_:1},8,["items","draggable","item-label","onDrop"])):(v(),A("p",VGe,x(t.$t("No Topics Found")),1))])),[[k,s.loading]])])])):(v(),A("div",FGe,[g("div",NGe,[g("div",BGe,[g("p",zGe,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,HGe)])])]))]),_:1},8,["title"])]),_:1}),_(y,{"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:w(({close:C})=>[g("div",UGe,[g("div",jGe,[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:w(()=>[s.showModal?(v(),A("div",WGe,[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"]),_(y,{"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:w(()=>[s.showConfig?(v(),D(b,{key:0,onSaved:e[5]||(e[5]=C=>{s.showConfig=!1})})):O("",!0)]),_:1},8,["width","title","modelValue"])],64)}const qGe=ue(gGe,[["render",YGe]]),GGe={name:"CustomizationSettings",components:{Layout:_i,AppLayout:yi},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"))}},XGe={class:"settings_router"},KGe={key:0,class:"white_loaded"},ZGe={key:1,class:"fhr_content_layout_body"},JGe={class:"setting_header"},QGe={class:"setting_body"},eXe={class:"fcom_input_wrap"},tXe={class:"fcom_input_wrap"},nXe={class:"fcom_input_wrap"},sXe={class:"fcom_input_wrap"},iXe={class:"fcom_input_wrap"},oXe={key:0},rXe={class:"fcom_input_wrap"},aXe={key:0,class:"fcom_input_wrap"},lXe=["innerHTML"],cXe={key:1,style:{cursor:"pointer","font-weight":"bold"}},uXe={class:"fcom_input_wrap"},dXe={style:{"font-weight":"bold"}},hXe={class:"fcom_help_text"},fXe={target:"_blank",rel:"noopener",href:"https://wpmanageninja.com/affiliate/"},pXe={class:"fcom_input_wrap"},mXe={class:"fcom_input_wrap"},gXe={class:"fcom_input_wrap"},vXe={key:0},_Xe={class:"fcom_help_text"},yXe={class:"fcom_input_wrap"},bXe={key:0},wXe={class:"fcom_help_text"},kXe={class:"fcom_input_wrap"},CXe={class:"fcom_help_text"},xXe={key:2,class:"fcom_input_wrap"},SXe={class:"fcom_help_text"},$Xe={class:"fcom_input_wrap"},AXe={class:"fcom_help_text"},EXe={key:0},MXe={key:1},TXe={class:"fcom_input_wrap"},PXe={class:"fcom_input_wrap"},IXe={style:{margin:"20px 0 0 0"},class:"fcom_input_wrap"},LXe={key:2},OXe={key:0,class:"white_loaded"},DXe={key:1,class:"fhr_content_layout_body"},RXe={class:"setting_header"},VXe={class:"setting_body"},FXe={class:"setting_sub_header"},NXe={class:"setting_sub_body"},BXe={class:"setting_sub_header"},zXe={class:"setting_sub_body"},HXe={style:{margin:"20px 0 0 0"},class:"fcom_input_wrap"},UXe={key:2},jXe={key:4,class:"fhr_content_layout_body",style:{"text-align":"center"}},WXe={class:"setting_header"},YXe={class:"setting_body"},qXe={class:"promo_description"},GXe=["href"];function XXe(t,e,n,i,s,o){const r=He,a=Nt,l=Yt,c=ft,u=Yo,d=Li,h=ws,f=en,p=sn,m=Jt,y=tn,b=b8,k=H("layout"),C=H("app-layout"),$=xt("loading");return v(),D(C,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(k,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Customize Your Portal")},{actions:w(()=>[_(r,{class:"fcom_primary_button",disabled:s.savingCustomizations||s.savingSnippets||s.loadingCustomizations||s.loadingSnippets,onClick:o.saveAll},{default:w(()=>[g("span",null,x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),default:w(()=>[g("div",XGe,[s.loadingCustomizations?(v(),A("div",KGe,[_(a,{rows:5,animated:!0})])):s.settings?(v(),A("div",ZGe,[g("div",JGe,[g("h2",null,x(t.$t("Customize the UI features of the portal")),1)]),g("div",QGe,[_(y,{onSubmit:e[20]||(e[20]=Ee(S=>t.doNothing(),["prevent"])),modelValue:s.settings,"onUpdate:modelValue":e[21]||(e[21]=S=>s.settings=S),"label-position":"top"},{default:w(()=>[g("div",eXe,[_(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:w(()=>[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",tXe,[_(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:w(()=>[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",nXe,[_(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:w(()=>[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",sXe,[_(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:w(()=>[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",iXe,[_(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:w(()=>[N(x(t.$t("Enable sidebar collapse on desktop"))+" ",1),t.has_pro?O("",!0):(v(),A("span",oXe,"("+x(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled","modelValue"]),g("p",null,x(t.$t("__SIDEBAR_TOGGLE_DESC")),1)]),g("div",rXe,[_(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:w(()=>[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(),A("div",aXe,[_(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:w(()=>[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:w(()=>[s.settings.affiliate_id?(v(),A("span",cXe,x(t.$t("Affiliate ID: %s",s.settings.affiliate_id)),1)):(v(),A("span",{key:0,style:{cursor:"pointer"},innerHTML:t.$t("%1$sClick here%2$s to add affiliate ID","<b>","</b>")},null,8,lXe))]),default:w(()=>[g("div",uXe,[g("label",dXe,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:w(()=>[N(x(t.$t("Save")),1)]),_:1},8,["onClick","disabled"])),[[$,s.savingCustomizations]])]),g("div",hXe,[g("p",null,[N(x(t.$t("Don't have an affiliate account?"))+" ",1),g("a",fXe,x(t.$t("Click here"))+".",1)])])]),_:1})])])):O("",!0),g("div",pXe,[_(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:w(()=>[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",mXe,[_(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:w(()=>[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",gXe,[_(f,{label:t.$t("Rich Media Post Layout")},{default:w(()=>[_(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:w(()=>[_(d,{value:"classic"},{default:w(()=>[N(x(t.$t("Classic")),1)]),_:1}),_(d,{disabled:!t.has_pro,value:"modern"},{default:w(()=>[N(x(t.$t("Modern"))+" ",1),t.has_pro?O("",!0):(v(),A("span",vXe,"("+x(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",_Xe,[g("p",null,x(t.$t("Classic: Image/Video after the content. Modern: Image/Video at first")),1)])]),_:1},8,["label"])]),g("div",yXe,[_(f,{label:t.$t("Members List Layout")},{default:w(()=>[_(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:w(()=>[_(d,{value:"classic"},{default:w(()=>[N(x(t.$t("List View")),1)]),_:1}),_(d,{disabled:!t.has_pro,value:"grid"},{default:w(()=>[N(x(t.$t("Grid View"))+" ",1),t.has_pro?O("",!0):(v(),A("span",bXe,"("+x(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",wXe,[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",kXe,[_(f,{label:t.$t("Post Title Requirements")},{default:w(()=>[_(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:w(()=>[_(d,{value:"optional"},{default:w(()=>[N(x(t.$t("Optional")),1)]),_:1}),_(d,{value:"required"},{default:w(()=>[N(x(t.$t("Required")),1)]),_:1}),_(d,{value:"disabled"},{default:w(()=>[N(x(t.$t("Disabled")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",CXe,[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(),A("div",xXe,[_(f,{label:t.$t("Default Theme Mode")},{default:w(()=>[_(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:w(()=>[_(d,{value:"light"},{default:w(()=>[N(x(t.$t("Light")),1)]),_:1}),_(d,{value:"dark"},{default:w(()=>[N(x(t.$t("Dark")),1)]),_:1}),_(d,{value:"system"},{default:w(()=>[N(x(t.$t("System")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",SXe,[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",$Xe,[_(f,{label:t.$t("Default Feed Layout")},{default:w(()=>[_(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:w(()=>[_(d,{value:"timeline"},{default:w(()=>[N(x(t.$t("Timeline View")),1)]),_:1}),_(d,{value:"list"},{default:w(()=>[N(x(t.$t("List View")),1)]),_:1}),_(d,{value:"card"},{default:w(()=>[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:w(()=>[N(x(t.$t("Disable Layout Style Change Option")),1)]),_:1},8,["modelValue"]),g("div",AXe,[s.settings.disable_feed_layout==="yes"?(v(),A("p",EXe,x(t.$t("The selected layout will be applied for all members. They cannot switch to a different view.")),1)):(v(),A("p",MXe,x(t.$t("User can change the layout style to their own preference.")),1))])]),g("div",TXe,[_(f,{label:t.$t("Max Media Per Post")},{default:w(()=>[_(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",PXe,[_(f,{label:t.$t("Default Feed Sort By")},{default:w(()=>[_(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:w(()=>[(v(!0),A(ee,null,we(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:w(()=>[N(x(t.$t("Disable Feed Sort By Options")),1)]),_:1},8,["modelValue"])]),g("div",IXe,[Re((v(),D(r,{onClick:o.saveCustomizations,disabled:s.savingCustomizations,class:"fcom_primary_button"},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[$,s.savingCustomizations]])])]),_:1},8,["modelValue"])])])):(v(),A("div",LXe,[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(),A(ee,{key:3},[s.loadingSnippets?(v(),A("div",OXe,[_(a,{rows:5,animated:!0})])):s.snippetsSettings?(v(),A("div",DXe,[g("div",RXe,[g("h2",null,x(t.$t("Custom Snippets")),1)]),g("div",VXe,[g("div",FXe,[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",NXe,[_(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"])]),_(b),g("div",BXe,[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",zXe,[_(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",HXe,[Re((v(),D(r,{onClick:o.saveSnippets,disabled:s.savingSnippets,class:"fcom_primary_button"},{default:w(()=>[N(x(t.$t("Save Custom CSS & JS")),1)]),_:1},8,["onClick","disabled"])),[[$,s.savingSnippets]])])])])):(v(),A("div",UXe,[g("p",null,x(t.$t("Custom Snippets could not be loaded")),1)]))],64)):(v(),A("div",jXe,[g("div",WXe,[g("h2",null,x(t.$t("Custom Snippets")),1)]),g("div",YXe,[g("p",qXe,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,GXe)])]))])]),_:1},8,["title"])]),_:1})}const KXe=ue(GGe,[["render",XXe]]),ZXe={name:"EmailNotification",components:{ImageUploader:Ll,CrepeEditor:cu,Layout:_i,AppLayout:yi},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"))}},JXe={class:"settings_router fcom_mb_20"},QXe={key:0,class:"white_loaded"},eKe={key:1,class:"fhr_content_layout_body"},tKe={class:"setting_body"},nKe={style:{"font-size":"18px",margin:"0",padding:"0"}},sKe={style:{margin:"5px 0","font-size":"90%","line-height":"120%"}},iKe={class:"fcom_help_text"},oKe={class:"fcom_help_text"},rKe={class:"fcom_help_text"},aKe={class:"fcom_help_text"},lKe={class:"fcom_extra_editor"},cKe={class:"fcom_help_text"},uKe=["innerHTML"],dKe=["src","alt"],hKe={class:"fcom_image_uploader_wrapper"},fKe={class:"setting_body"},pKe={style:{"font-size":"18px",margin:"0",padding:"0"}},mKe={style:{margin:"5px 0","font-size":"90%","line-height":"120%"}},gKe={key:0,class:"fcom_help_text"},vKe={key:0,class:"fcom_help_text"},_Ke={key:0,class:"fcom_help_text"},yKe={class:"fcom_help_text"},bKe={key:0,class:"fcom_help_text"},wKe={class:"fcom_meta_text"},kKe={class:"setting_body"},CKe={key:2};function xKe(t,e,n,i,s,o){const r=He,a=Nt,l=ft,c=en,u=jd,d=sn,h=Jt,f=Ud,p=H("crepe-editor"),m=H("EditPen"),y=be,b=H("Delete"),k=H("ImageUploader"),C=Yt,$=M8,S=tn,M=H("layout"),P=H("app-layout"),T=xt("loading");return v(),D(P,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(M,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Email Settings")},{actions:w(()=>[Re((v(),D(r,{class:"fcom_primary_button",onClick:o.save},{default:w(()=>[g("span",null,x(t.$t("Save Settings")),1)]),_:1},8,["onClick"])),[[T,s.saving]])]),default:w(()=>[g("div",JXe,[s.loading?(v(),A("div",QXe,[_(a,{rows:5,animated:!0})])):s.email_settings?(v(),A("div",eKe,[_(S,{onSubmit:e[14]||(e[14]=Ee(I=>t.doNothing(),["prevent"])),modelValue:s.email_settings,"onUpdate:modelValue":e[15]||(e[15]=I=>s.email_settings=I),"label-position":"top"},{default:w(()=>[g("div",tKe,[g("h3",nKe,x(t.$t("Mailing Settings")),1),g("p",sKe,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:w(()=>[_(u,{sm:24,md:12},{default:w(()=>[_(c,{label:t.$t("From Name")},{default:w(()=>[_(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",iKe,[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:w(()=>[_(c,{label:t.$t("From Email")},{default:w(()=>{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:w(()=>[(v(!0),A(ee,null,we(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",oKe,[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:w(()=>[_(u,{sm:24,md:12},{default:w(()=>[_(c,{label:t.$t("Reply to name (Optional)")},{default:w(()=>[_(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",rKe,[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:w(()=>[_(c,{label:t.$t("Reply to email (optional)")},{default:w(()=>[_(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",aKe,[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:w(()=>[g("div",lKe,[_(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",cKe,[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,uKe)])]),_:1},8,["label"]),_(f,{gutter:30},{default:w(()=>[_(u,{sm:24,md:12},{default:w(()=>[_(c,{label:t.$t("Logo for Email Header")},{default:w(()=>[s.email_settings.logo||s.email_settings.global_logo?(v(),A("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,dKe)):O("",!0),g("div",hKe,[_(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:w(()=>[_(y,null,{default:w(()=>[_(b)]),_:1})]),_:2},[s.email_settings.logo||s.email_settings.global_logo?{name:"trigger",fn:w(()=>[_(r,{"aria-label":t.$t("Change logo"),class:"fcom_plain_button"},{default:w(()=>[_(y,null,{default:w(()=>[_(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:w(()=>[t.has_pro?(v(),D(c,{key:0},{default:w(()=>[_(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:w(()=>[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",fKe,[g("h3",pKe,x(t.$t("Email Notification Settings")),1),g("p",mKe,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:w(()=>[_(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:w(()=>[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(),A("div",gKe,[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:w(()=>[_(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:w(()=>[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(),A("div",vKe,[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:w(()=>[_(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:w(()=>[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(),A("div",_Ke,[g("p",null,x(t.$t("You should enable this. Currently disabled.")),1)])):O("",!0)]),_:1},8,["label"]),_(c,null,{default:w(()=>[_(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:w(()=>[N(x(t.$t("Enable Weekly Digest Email for community members")),1)]),_:1},8,["modelValue"]),g("div",yKe,[g("p",null,x(t.$t("Members can enable/disable their own digest status")),1)])]),_:1}),_(f,{gutter:30},{default:w(()=>[_(u,{sm:24,md:12},{default:w(()=>[_(c,{label:t.$t("In which day, the digest email will be sent")},{default:w(()=>[_(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:w(()=>[_(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(),A("div",bKe,[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:w(()=>[_(c,{label:t.$t("Time to send the digest email")},{default:w(()=>[_($,{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",wKe,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",kKe,[Re((v(),D(r,{onClick:o.save,disabled:s.saving,class:"fcom_primary_button"},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[T,s.saving]])])]),_:1},8,["modelValue"])])):(v(),A("div",CKe,[g("p",null,x(t.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const SKe=ue(ZXe,[["render",xKe]]),$Ke={name:"UpgradeToProModal",props:{showModal:{type:Boolean,default:!0},upgrade_module:{type:String,required:!0}},data(){return{openModal:this.showModal,upgradeModule:Pwe[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")}}},AKe={class:"fcom_upgrade_header"},EKe={class:"dialog_body"},MKe={class:"fcom_upgrade_banner"},TKe=["href"],PKe={class:"fcom_upgrade_content"},IKe={key:0,class:"fcom_feature_image"},LKe=["src","alt"],OKe={class:"fcom_upgrade_body"},DKe={class:"fcom_upgrade_description"},RKe=["href"];function VKe(t,e,n,i,s,o){const r=Va;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:w(()=>[g("div",AKe,[g("h4",null,x(s.upgradeModule.headerTitle),1),g("p",null,x(s.upgradeModule.headerDescription),1)])]),default:w(()=>[g("div",EKe,[g("div",MKe,[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,TKe)]),g("div",PKe,[s.upgradeModule.featureImage?(v(),A("div",IKe,[g("img",{src:t.appVars.assets_url+"images/upgrades/"+s.upgradeModule.featureImage,alt:s.upgradeModule.headerTitle},null,8,LKe)])):O("",!0),g("div",OKe,[g("h4",null,x(s.upgradeModule.bodyTitle),1),g("p",DKe,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,RKe)])])])]),_:1},8,["modelValue"])}const Qd=ue($Ke,[["render",VKe]]),FKe={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()}},NKe={class:"fcom_storage_settings"},BKe={class:"dialog_header"},zKe={class:"dialog_left"},HKe={key:0,class:"white_loaded"},UKe={key:1,class:"dialog_body"},jKe={key:0},WKe=["innerHTML"],YKe={class:"fcom_cloudflare_settings"},qKe=["innerHTML"],GKe={class:"fcom_s3_settings"},XKe=["innerHTML"],KKe={class:"fcom_cloudflare_settings"},ZKe={key:3,class:"fcom_mb_10"},JKe={class:"dialog_footer"},QKe={key:2};function eZe(t,e,n,i,s,o){const r=He,a=Nt,l=Hd,c=ws,u=en,d=ft,h=sn,f=Jt,p=tn,m=$s,y=H("UpgradeToProModal"),b=xt("loading");return v(),A(ee,null,[g("div",NKe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=k=>o.openSettings())},{default:w(()=>{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:w(({close:k})=>[g("div",BKe,[g("div",zKe,[g("div",null,[g("h4",null,x(t.$t("Configure Media Storage")),1)])])])]),default:w(()=>[s.fetching?(v(),A("div",HKe,[_(a,{rows:5,animated:!0})])):s.storageConfig?(v(),A("div",UKe,[s.storageConfig.is_defined?(v(),A("p",jKe,x(t.$t("__CLOUD_STORAGE_CONFIGURED")),1)):(v(),A(ee,{key:1},[_(p,{onSubmit:e[17]||(e[17]=Ee(k=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(u,{label:t.$t("Storage Location")},{default:w(()=>[_(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:w(()=>[_(l,{type:"primary",value:"local"},{default:w(()=>[N(x(t.$t("Server Storage")),1)]),_:1}),_(l,{value:"cloudflare_r2"},{default:w(()=>[N(x(t.$t("Cloudflare R2 (Recommended)")),1)]),_:1}),_(l,{value:"amazon_s3"},{default:w(()=>[N(x(t.$t("Amazon S3")),1)]),_:1}),_(l,{value:"bunny_cdn"},{default:w(()=>[N(x(t.$t("BunnyCDN")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),s.storageConfig.driver==="cloudflare_r2"?(v(),A(ee,{key:0},[g("p",{innerHTML:o.docsNotice("https://fluentcommunity.co/docs/configuring-cloudflare-r2/","Cloudflare R2")},null,8,WKe),e[20]||(e[20]=g("hr",null,null,-1)),g("div",YKe,[_(u,{label:t.$t("Cloudflare Access Key")},{default:w(()=>[_(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:w(()=>[_(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:w(()=>[_(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:w(()=>[_(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:w(()=>[_(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(),A(ee,{key:1},[g("p",{innerHTML:o.docsNotice("https://fluentcommunity.co/docs/configuring-amazon-s3/","Amazon S3")},null,8,qKe),e[21]||(e[21]=g("hr",null,null,-1)),g("div",GKe,[_(u,{label:t.$t("Amazon S3 Access Key")},{default:w(()=>[_(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:w(()=>[_(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:w(()=>[_(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:w(()=>[_(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:w(()=>[(v(!0),A(ee,null,we(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:w(()=>[_(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(),A(ee,{key:2},[g("p",{innerHTML:o.docsNotice("https://fluentcommunity.co/docs/configuring-bunnycdn","BunnyCDN")},null,8,XKe),e[22]||(e[22]=g("hr",null,null,-1)),g("div",KKe,[_(u,{label:t.$t("BunnyCDN API Key")},{default:w(()=>[_(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:w(()=>[_(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:w(()=>[_(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:w(()=>[(v(!0),A(ee,null,we(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:w(()=>[_(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(),A("p",ZKe,x(t.$t("Your files will be stored in the default Uploads folder")),1))]),_:1}),g("div",JKe,[Re((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[b,s.saving]])])],64))])):(v(),A("div",QKe,[g("p",null,x(t.$t("Config could not be loaded")),1)]))]),_:1},8,["width","modelValue"]),s.openUpgradeModal?(v(),D(y,{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 tZe=ue(FKe,[["render",eZe]]),nZe={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})}}},sZe={class:"fcom_storage_settings"},iZe={key:0,class:"white_loaded"},oZe={key:1,class:"dialog_body"},rZe={class:"fcom_mb_20"},aZe={class:"fcom_level_table"},lZe={class:"fcom_level_table_row fcom_header_row"},cZe={class:"fcom_lavel_desc"},uZe={class:"fcom_lavel_actions"},dZe={class:"fcom_lavel_num"},hZe={class:"fcom_lavel_desc"},fZe={class:"fcom_lavel_actions"},pZe={class:"fcom_user_selector fcom_mb_20"},mZe={class:"fcom_mb_20"},gZe={style:{float:"left"}},vZe={style:{float:"right",color:"#8492a6","font-size":"13px"}},_Ze={class:"dialog_footer"},yZe={key:2};function bZe(t,e,n,i,s,o){const r=He,a=Nt,l=Yt,c=en,u=ft,d=sn,h=Jt,f=tn,p=Va,m=H("UpgradeToProModal"),y=xt("loading");return v(),A(ee,null,[g("div",sZe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=b=>o.openSettings())},{default:w(()=>[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]=b=>s.showSettings=b),direction:"rtl"},{header:w(({close:b})=>[g("h4",null,x(t.$t("Leaderboard / Gamification Settings")),1)]),default:w(()=>[s.fetching?(v(),A("div",iZe,[_(a,{rows:5,animated:!0})])):s.levels?(v(),A("div",oZe,[_(f,{onSubmit:e[3]||(e[3]=Ee(b=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,null,{default:w(()=>[_(l,{modelValue:n.features.leader_board_module,"onUpdate:modelValue":e[1]||(e[1]=b=>n.features.leader_board_module=b),"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(),A(ee,{key:0},[g("h5",rZe,x(t.$t("Leaderboard Levels")),1),g("div",aZe,[g("div",lZe,[e[6]||(e[6]=g("div",{class:"fcom_lavel_num"}," # ",-1)),g("div",cZe,x(t.$t("Title & Description")),1),g("div",uZe,x(t.$t("Minimum Points")),1)]),(v(!0),A(ee,null,we(s.levels,(b,k,C)=>(v(),A("div",{class:"fcom_level_table_row",key:k},[g("div",dZe,x(C+1),1),g("div",hZe,[_(u,{class:"fcom_bold_input",type:"text",modelValue:b.title,"onUpdate:modelValue":$=>b.title=$,placeholder:t.$t("Level Title")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),_(u,{type:"text",modelValue:b.tagline,"onUpdate:modelValue":$=>b.tagline=$,placeholder:t.$t("Level Tagline")},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),g("div",fZe,[_(c,{label:""},{default:w(()=>[_(u,{min:0,max:999999999,disabled:k==="level_1",type:"number",modelValue:b.min_points,"onUpdate:modelValue":$=>b.min_points=$,placeholder:t.$t("Minimum Points")},null,8,["disabled","modelValue","onUpdate:modelValue","placeholder"])]),_:2},1024)])]))),128))]),g("div",pZe,[g("h5",mZe,x(t.$t("Exclude Users")),1),_(c,{label:t.$t("Exclude selected users from the leaderboard")},{default:w(()=>[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]=b=>s.excludedUserIds=b)},{default:w(()=>[(v(!0),A(ee,null,we(s.users,b=>(v(),D(d,{key:b.ID,label:b.display_name+" ("+b.user_email+")",value:b.ID},{default:w(()=>[g("span",gZe,x(b.display_name),1),g("span",vZe,x(b.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",_Ze,[Re((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[y,s.saving]])])])):(v(),A("div",yZe,[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]=b=>s.openUpgradeModal=!1),upgrade_module:"leader_board_module"},null,8,["showModal"])):O("",!0)],64)}const wZe=ue(nZe,[["render",bZe]]),kZe={name:"UserBadgesConfig",components:{LogoEmojiSelector:Z1,UpgradeToProModal:Qd,Drawer:tu,FluentDnD:za},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)}},CZe={class:"fcom_storage_settings"},xZe={key:0,class:"white_loaded"},SZe={key:1},$Ze={class:"header_user_badge"},AZe={class:"fcom_user_badges fcom_manager_table fcom_badge_dnd"},EZe={key:0,class:"fcom_badge_row fcom_badge_row_head"},MZe={class:"col_title"},TZe={class:"col_preview"},PZe={class:"col_actions"},IZe={class:"fcom_badge_row"},LZe=["title"],OZe={class:"col_title"},DZe={class:"col_preview"},RZe={class:"fcom_badge_preview"},VZe={class:"col_actions"},FZe={class:"fcom_table_action_col"},NZe=["onClick"],BZe=["onClick"],zZe={key:2,class:"fcom_badge_empty"},HZe={key:2};function UZe(t,e,n,i,s,o){const r=He,a=Nt,l=Yt,c=en,u=H("UserBadge"),d=H("Edit"),h=be,f=H("Delete"),p=H("FluentDnD"),m=tn,y=H("Drawer"),b=H("logo-emoji-selector"),k=ft,C=Qc,$=jd,S=Ud,M=$s,P=H("UpgradeToProModal"),T=xt("loading");return v(),A(ee,null,[g("div",CZe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=I=>o.openSettings())},{default:w(()=>[N(x(t.$t("Settings")),1)]),_:1})]),_(y,{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:w(()=>[s.fetching?(v(),A("div",xZe,[_(a,{rows:5,animated:!0})])):s.badges?(v(),A("div",SZe,[_(m,{onSubmit:e[3]||(e[3]=Ee(I=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,null,{default:w(()=>[_(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(),A(ee,{key:0},[g("div",$Ze,[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:w(()=>[N(x(t.$t("Add New")),1)]),_:1})]),g("div",AZe,[s.badges.length?(v(),A("div",EZe,[e[16]||(e[16]=g("span",{class:"col_handle"},null,-1)),g("span",MZe,x(t.$t("Title")),1),g("span",TZe,x(t.$t("Preview")),1),g("span",PZe,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:w(({data:I})=>[g("div",IZe,[g("span",{class:"col_handle fcom_drag_handle",title:t.$t("Drag to reorder")},"⋮⋮",8,LZe),g("span",OZe,x(I.title),1),g("span",DZe,[g("div",RZe,[_(u,{is_preview:!0,badge:I},null,8,["badge"])])]),g("span",VZe,[g("div",FZe,[g("div",{onClick:L=>o.initEdit(I),class:"action_item clickable"},[_(h,null,{default:w(()=>[_(d)]),_:1})],8,NZe),g("div",{class:"action_item clickable",onClick:L=>o.deleteBadge(I)},[_(h,null,{default:w(()=>[_(f)]),_:1})],8,BZe)])])])]),_:1},8,["items","onDrop"])):(v(),A("p",zZe,x(t.$t("No badges have been configured.")),1))])],64)):O("",!0),_(c,null,{default:w(()=>[Re((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[T,s.saving]])]),_:1})]),_:1})])):(v(),A("div",HZe,[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:w(()=>[s.editingBadge?(v(),D(m,{key:0,onSubmit:e[13]||(e[13]=Ee(I=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,{label:t.$t("Title")},{default:w(()=>[_(k,{modelValue:s.editingBadge.title,"onUpdate:modelValue":e[6]||(e[6]=I=>s.editingBadge.title=I),placeholder:t.$t("Badge Title")},{prepend:w(()=>{var I,L;return[_(b,{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:w(()=>[_(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:w(()=>[N(x(t.$t("Show Label on Badge")),1)]),_:1},8,["modelValue"])]),_:1}),s.editingBadge.show_label=="yes"?(v(),A(ee,{key:0},[_(S,{gutter:20},{default:w(()=>[_($,{span:12},{default:w(()=>[_(c,{label:t.$t("Color")},{default:w(()=>[_(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}),_($,{span:12},{default:w(()=>[_(c,{label:t.$t("Background Color")},{default:w(()=>[_(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:w(()=>[_(r,{class:"fcom_primary_button",onClick:e[12]||(e[12]=I=>o.closeEdit())},{default:w(()=>[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 jZe=ue(kZe,[["render",UZe],["__scopeId","data-v-cde5da01"]]),WZe={name:"SocialMediaLinkConfig",components:{Drawer:tu},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})}}},YZe={class:"fcom_storage_settings"},qZe={key:0,class:"white_loaded"},GZe={key:1,class:"dialog_body"},XZe={class:"fcom_level_table"},KZe={class:"fcom_level_table_row fcom_header_row"},ZZe={class:"fcom_lavel_desc"},JZe={class:"fcom_lavel_actions"},QZe={style:{display:"flex","align-items":"center","column-gap":"10px"},class:"fcom_lavel_desc"},eJe=["innerHTML"],tJe={class:"fcom_lavel_actions"},nJe={class:"dialog_footer"},sJe={key:1,class:"fcom_upgrade_banner"},iJe={class:"fcom_upgrade_description"},oJe=["href"],rJe={key:2};function aJe(t,e,n,i,s,o){const r=He,a=Nt,l=be,c=hi,u=eu,d=H("Drawer"),h=xt("loading");return v(),A(ee,null,[g("div",YZe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=f=>o.openSettings())},{default:w(()=>[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:w(()=>[s.loading?(v(),A("div",qZe,[_(a,{rows:5,animated:!0})])):s.providers?(v(),A("div",GZe,[g("div",XZe,[g("div",KZe,[g("div",ZZe,x(t.$t("Provider")),1),g("div",JZe,x(t.$t("Status")),1)]),(v(!0),A(ee,null,we(s.providers,(f,p)=>(v(),A("div",{style:{padding:"5px 10px"},class:"fcom_level_table_row",key:p},[g("div",QZe,[_(l,null,{default:w(()=>[g("span",{innerHTML:f.icon_svg},null,8,eJe)]),_:2},1024),g("span",null,x(f.title),1),f.enabled==="yes"?(v(),D(c,{key:0,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1})):(v(),D(c,{key:1,type:"info",size:"small"},{default:w(()=>[N(x(t.$t("disabled")),1)]),_:1}))]),g("div",tJe,[_(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",nJe,[t.has_pro?Re((v(),D(r,{key:0,class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[h,s.saving]]):(v(),A("div",sJe,[g("p",iJe,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,oJe)]))])])):(v(),A("div",rJe,[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 lJe=ue(WZe,[["render",aJe]]),cJe={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()}},uJe={key:1},dJe={class:"fcom_help_text"},hJe={key:0},fJe={key:1},pJe={class:"fcom_help_text"},mJe={class:"fcom_help_text"},gJe={class:"fcom_section_divider"},vJe={class:"fcom_help_text"},_Je={key:0},yJe={key:1},bJe={class:"fcom_help_text"},wJe={key:0},kJe={key:1},CJe={key:2},xJe={class:"fcom_help_text"},SJe={key:2},$Je={class:"dialog_footer"},AJe={key:1,class:"fcom_upgrade_banner"},EJe={class:"fcom_upgrade_description"},MJe=["href"];function TJe(t,e,n,i,s,o){const r=Nt,a=Yt,l=en,c=Li,u=ws,d=r2,h=sa,f=ft,p=sn,m=Jt,y=tn,b=He,k=xt("loading");return v(),A(ee,null,[s.loading?(v(),D(r,{key:0,animated:!0,rows:5})):s.settings?(v(),A("div",uJe,[_(y,{modelValue:s.settings,"onUpdate:modelValue":e[14]||(e[14]=C=>s.settings=C),"label-position":"top"},{default:w(()=>[_(l,null,{default:w(()=>[_(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:w(()=>[N(x(t.$t("Send email notification on one-to-one messages (unread) to individual members")),1)]),_:1},8,["modelValue"]),g("div",dJe,[s.settings.messaging_email_status=="no"?(v(),A("p",hJe,x(t.$t("Email notification on messaging is disabled")),1)):(v(),A("p",fJe,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:w(()=>[_(u,{modelValue:s.settings.messaging_email_frequency,"onUpdate:modelValue":e[1]||(e[1]=C=>s.settings.messaging_email_frequency=C)},{default:w(()=>[_(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",pJe,[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:w(()=>[_(u,{modelValue:s.settings.who_can_initiate_message,"onUpdate:modelValue":e[2]||(e[2]=C=>s.settings.who_can_initiate_message=C)},{default:w(()=>[_(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:w(()=>[_(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",mJe,[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",gJe,[g("h4",null,x(t.$t("Real-time Chat")),1)]),_(l,null,{default:w(()=>[_(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:w(()=>[N(x(t.$t("Enable Real-time Chat")),1)]),_:1},8,["modelValue"]),g("div",vJe,[s.settings.realtime_enabled==="no"?(v(),A("p",_Je,x(t.$t("Real-time chat is disabled. Messages will be delivered on page refresh.")),1)):(v(),A("p",yJe,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:w(()=>[_(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:w(()=>[_(c,{value:"fluent-socket"},{default:w(()=>[N(x(t.$t("Fluent Socket")),1)]),_:1}),_(c,{value:"pusher"},{default:w(()=>[N(x(t.$t("Pusher")),1)]),_:1}),_(c,{value:"custom"},{default:w(()=>[N(x(t.$t("Custom")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",bJe,[s.settings.socket_provider==="fluent-socket"?(v(),A("p",wJe,[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(),A("p",kJe,x(t.$t("Use Pusher.com for WebSocket connections")),1)):(v(),A("p",CJe,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:w(()=>[N(x(t.$t("Socket configuration is defined in wp-config.php and cannot be changed here.")),1)]),_:1})):o.isRealTimeEnabled?(v(),A(ee,{key:4},[_(l,{label:t.$t("App ID")},{default:w(()=>[_(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:w(()=>[_(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:w(()=>[_(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:w(()=>[_(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",xJe,[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(),A(ee,{key:1},[_(l,{label:t.$t("Host")},{default:w(()=>[_(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:w(()=>[_(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:w(()=>[_(m,{modelValue:s.socketConfig.options.scheme,"onUpdate:modelValue":e[13]||(e[13]=C=>s.socketConfig.options.scheme=C),style:{width:"100%"}},{default:w(()=>[_(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(),A("div",SJe,[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",$Je,[t.has_pro?Re((v(),D(b,{key:0,class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[k,s.saving]]):(v(),A("div",AJe,[g("p",EJe,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,MJe)]))])],64)}const PJe=ue(cJe,[["render",TJe]]),IJe={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})}}},LJe={class:"fcom_storage_settings"},OJe={key:0,class:"white_loaded"},DJe={key:1,class:"dialog_body"},RJe={class:"fcom_mb_20"},VJe={class:"dialog_footer"},FJe={key:2};function NJe(t,e,n,i,s,o){const r=He,a=Nt,l=Yt,c=en,u=Li,d=ws,h=tn,f=Va,p=H("UpgradeToProModal"),m=xt("loading");return v(),A(ee,null,[g("div",LJe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=y=>o.openSettings())},{default:w(()=>[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]=y=>s.showSettings=y),direction:"rtl"},{header:w(({close:y})=>[g("h4",null,x(t.$t("Follower Module Settings")),1)]),default:w(()=>[s.fetching?(v(),A("div",OJe,[_(a,{rows:5,animated:!0})])):s.follower_settings?(v(),A("div",DJe,[_(h,{onSubmit:e[4]||(e[4]=Ee(y=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,null,{default:w(()=>[_(l,{modelValue:n.features.followers_module,"onUpdate:modelValue":e[1]||(e[1]=y=>n.features.followers_module=y),"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(),A(ee,{key:0},[g("h5",RJe,x(t.$t("Following Config")),1),_(c,{label:t.$t("Who can see the followers list on the user's profile?")},{default:w(()=>[_(d,{modelValue:s.follower_settings.who_can_see_followers,"onUpdate:modelValue":e[2]||(e[2]=y=>s.follower_settings.who_can_see_followers=y)},{default:w(()=>[_(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:w(()=>[_(d,{modelValue:s.follower_settings.who_can_see_followings,"onUpdate:modelValue":e[3]||(e[3]=y=>s.follower_settings.who_can_see_followings=y)},{default:w(()=>[_(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",VJe,[Re((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[m,s.saving]])])])):(v(),A("div",FJe,[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]=y=>s.openUpgradeModal=!1),upgrade_module:"follower_module"},null,8,["showModal"])):O("",!0)],64)}const BJe=ue(IJe,[["render",NJe]]),zJe={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}}},HJe={key:0,class:"fluent-player-top-title-overlay"},UJe={class:"fluent-player-title-stack"},jJe={class:"fluent-player-media-title"},WJe={key:1,class:"fp-media-controls-center"},YJe={class:"fp-controls-group center"},qJe={key:2,class:"fp-media-controls-bottom"},GJe={key:0,class:"fp-controls-group"},XJe={key:0,class:"fp-media-button vds-button"},KJe={key:1,class:"fp-media-button vds-button"},ZJe={key:2,class:"fp-media-button vds-button"},JJe={key:3,class:"fp-media-button vds-button"},QJe={key:4,class:"fp-media-slider vds-time-slider slider-volume"},eQe={key:5,class:"fp-media-time-group"},tQe={key:6,class:"fp-media-controls-spacer-slider"},nQe={key:7,class:"fp-media-button vds-button"},sQe={key:8,class:"fp-media-button vds-button"},iQe={key:9,class:"fp-media-button vds-button"},oQe={key:10,class:"fp-media-button vds-button"},rQe={key:11,class:"fp-media-button vds-button"},aQe={key:0,class:"fp-media-slider vds-time-slider"},lQe={key:1,class:"fp-controls-group"},cQe={key:0,class:"fp-media-button vds-button"},uQe={key:1,class:"fp-media-button vds-button"},dQe={key:2,class:"fp-media-button vds-button"},hQe={key:3,class:"fp-media-button vds-button"},fQe={key:4,class:"fp-media-slider vds-time-slider slider-volume"},pQe={key:5,class:"fp-media-time-group"},mQe={key:6,class:"fp-media-button vds-button"},gQe={key:7,class:"fp-media-button vds-button"},vQe={key:8,class:"fp-media-button vds-button"},_Qe={key:9,class:"fp-media-button vds-button"},yQe={key:10,class:"fp-media-button vds-button"},bQe={key:2,class:"fp-controls-group"},wQe={key:0,class:"fp-media-button vds-button"},kQe={key:1,class:"fp-media-button vds-button"},CQe={key:2,class:"fp-media-slider vds-time-slider slider-volume"},xQe={key:3,class:"fp-media-button vds-button"},SQe={key:4,class:"fp-media-button vds-button"},$Qe={key:5,class:"fp-media-button vds-button"},AQe={key:3,class:"fp-controls-group fp-floating-bar"},EQe={key:0,class:"fp-media-button vds-button"},MQe={key:1,class:"fp-media-button vds-button"},TQe={key:2,class:"fp-media-button vds-button"},PQe={key:3,class:"fp-media-time-group"},IQe={key:4,class:"fp-media-controls-spacer-slider"},LQe={key:5,class:"fp-media-button vds-button"},OQe={key:6,class:"fp-media-slider vds-time-slider slider-volume"},DQe={key:7,class:"fp-media-button vds-button"},RQe={key:8,class:"fp-media-button vds-button"},VQe={key:9,class:"fp-media-button vds-button"},FQe={key:10,class:"fp-media-button vds-button"},NQe={key:11,class:"fp-media-button vds-button"},BQe={class:"player_settings_wrap"},zQe={class:"setting_row"},HQe={class:"setting_row_flex"},UQe={class:"setting_row_flex"},jQe={class:"setting_row_flex"},WQe={class:"setting_row_flex"},YQe={key:0,class:"setting_row"},qQe={key:1,class:"setting_row"},GQe={key:2,class:"setting_row"},XQe={key:3,class:"setting_row"},KQe={key:4,class:"setting_row"},ZQe={key:5,class:"setting_row"},JQe={key:6,class:"setting_row"},QQe={key:7,class:"setting_row"},eet={key:8,class:"setting_row"},tet={key:9,class:"setting_row"},net={key:10,class:"setting_row"},set={key:1,class:"setting_row"},iet={class:"setting_row"},oet={key:2,class:"setting_row"},ret={key:3,class:"setting_row"},aet={key:4,class:"setting_row"},cet={class:"setting_row setting_row--column"},uet={class:"setting_row__label-with-icon"},det={class:"fcom_help_text"},het={class:"fcom_form_label"},fet={class:"fcom_help_text"};function pet(t,e,n,i,s,o){const r=jd,a=sn,l=Jt,c=Qc,u=eu,d=H("InfoFilled"),h=be,f=Ss,p=Ud,m=en,y=Li,b=ws;return v(),A("div",{class:q(["fluent_player_config_wrap",{is_disabled:o.localSettings.enable_fluent_player!=="yes"}])},[_(p,{gutter:30},{default:w(()=>[_(r,{span:17},{default:w(()=>[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(),A("div",HJe,[g("div",UJe,[g("span",jJe,x(t.$t("The Title of the Video")),1)])])):O("",!0),o.behaviors.hide_center_controls?O("",!0):(v(),A("div",WJe,[g("div",YJe,[g("button",{onClick:e[0]||(e[0]=Ee(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(),A("div",qJe,[o.localSettings.skin==="modern"?(v(),A("div",GJe,[o.controls.backward?(v(),A("button",XJe,[...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(),A("button",KJe,[...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(),A("button",ZJe,[...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(),A("button",JJe,[...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(),A("div",QJe,[...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(),A("div",eQe,[...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(),A("div",tQe,[...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(),A("button",nQe,[...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(),A("button",sQe,[...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(),A("button",iQe,[...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(),A("button",oQe,[...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(),A("button",rQe,[...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(),A(ee,{key:1},[o.controls.progress_bar?(v(),A("div",aQe,[...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(),A("div",lQe,[o.controls.backward?(v(),A("button",cQe,[...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(),A("button",uQe,[...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(),A("button",dQe,[...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(),A("button",hQe,[...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(),A("div",fQe,[...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(),A("div",pQe,[...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(),A("button",mQe,[...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(),A("button",gQe,[...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(),A("button",vQe,[...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(),A("button",_Qe,[...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(),A("button",yQe,[...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(),A("div",bQe,[o.controls.play?(v(),A("button",wQe,[...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(),A("button",kQe,[...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(),A("div",CQe,[...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(),A("button",xQe,[...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(),A("button",SQe,[...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(),A("button",$Qe,[...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(),A("div",AQe,[o.controls.backward?(v(),A("button",EQe,[...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(),A("button",MQe,[...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(),A("button",TQe,[...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(),A("div",PQe,[...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(),A("div",IQe,[...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(),A("button",LQe,[...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(),A("div",OQe,[...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(),A("button",DQe,[...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(),A("button",RQe,[...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(),A("button",VQe,[...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(),A("button",FQe,[...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(),A("button",NQe,[...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:w(()=>[g("div",BQe,[g("div",zQe,[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:w(()=>[_(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",HQe,[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",UQe,[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",jQe,[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",WQe,[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(),A(ee,{key:0},[g("h4",null,x(t.$t("Controls")),1),o.isControlVisible("progress_bar")?(v(),A("div",YQe,[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(),A("div",qQe,[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(),A("div",GQe,[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(),A("div",XQe,[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(),A("div",KQe,[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(),A("div",ZQe,[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(),A("div",JQe,[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(),A("div",QQe,[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(),A("div",eet,[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(),A("div",tet,[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(),A("div",net,[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(),A("div",set,[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",iet,[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(),A("div",oet,[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(),A("div",ret,[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(),A("div",aet,[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",cet,[g("span",uet,[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:w(()=>[_(h,{class:"setting_row__info-icon"},{default:w(()=>[_(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:w(()=>[_(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:w(()=>[_(r,{span:24,md:12},{default:w(()=>[_(m,{label:t.$t("Enable Video Upload"),class:"fcom_input_wrap",style:{"margin-bottom":"0"}},{default:w(()=>[_(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",det,[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:w(()=>[_(r,{span:24,style:{"margin-bottom":"4px"}},{default:w(()=>[g("label",het,x(t.$t("Who Can Upload Videos")),1)]),_:1}),_(r,{span:24},{default:w(()=>[_(b,{modelValue:o.localSettings.video_upload_role,"onUpdate:modelValue":e[24]||(e[24]=k=>o.localSettings.video_upload_role=k)},{default:w(()=>[_(y,{value:"admin",class:"fcom_radio"},{default:w(()=>[N(x(t.$t("Admins")),1)]),_:1}),_(y,{value:"admin_moderator",class:"fcom_radio"},{default:w(()=>[N(x(t.$t("Admins and Moderators")),1)]),_:1}),_(y,{value:"everyone",class:"fcom_radio"},{default:w(()=>[N(x(t.$t("Everyone")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})):O("",!0),_(p,{gutter:30},{default:w(()=>[_(r,{span:24},{default:w(()=>[_(m,{label:t.$t("Play Embedded Videos With FluentPlayer"),class:"fcom_input_wrap",style:{"margin-bottom":"0","margin-top":"20px"}},{default:w(()=>[_(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",fet,[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 met=ue(zJe,[["render",pet]]),get={name:"FluentPlayerSettings",components:{FluentPlayerCustomization:met},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()}},vet={key:1},_et={class:"fcom_help_text"},yet={class:"fcom_help_text"},bet={class:"dialog_footer fcom_mt_20"};function wet(t,e,n,i,s,o){const r=Nt,a=eu,l=en,c=H("FluentPlayerCustomization"),u=tn,d=He,h=xt("loading");return s.loading?(v(),D(r,{key:0,animated:!0,rows:5})):s.settings?(v(),A("div",vet,[_(u,null,{default:w(()=>[_(l,{label:t.$t("Enable FluentPlayer"),class:"fcom_input_wrap",style:{"margin-bottom":"0"}},{default:w(()=>[_(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",_et,[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:w(()=>[_(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",yet,[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",bet,[Re((v(),D(d,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[h,s.saving]])])])):O("",!0)}const ket=ue(get,[["render",wet]]),Cet={name:"CustomProfileFieldsConfig",components:{UpgradeToProModal:Qd,FluentDnD:za,Drawer:tu},props:["features"],data(){return{CloseBoldIcon:Pi(cR),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())}},xet={class:"fcom_storage_settings"},$et={key:0,class:"white_loaded"},Aet={key:1,class:"fcom_cpf_settings"},Eet={class:"fcom_cpf_header"},Met={key:0,style:{padding:"1rem"}},Tet={key:1,class:"fcom_card_sections fcom_cpf_groups"},Pet={class:"fcom_section_primary_item"},Iet={class:"fcom_section_primary_item_title"},Let={class:"fcom_heading_item"},Oet={class:"fcom_space_counts"},Det={class:"fcom_section_item_actions"},Ret={key:0,class:"fcom_section_items"},Vet={class:"fcom_heading_item"},Fet={key:0,style:{color:"var(--el-color-danger)"}},Net={class:"fcom_section_item_actions"},Bet={style:{position:"relative"}},zet={class:"fcom_action_field_popup"},Het={class:"fcom_move_popup_close"},Uet=["onDrop"],jet={key:2},Wet={class:"dialog_header"},Yet={class:"dialog_body"},qet={class:"dialog_footer"},Get={class:"dialog_header"},Xet={class:"dialog_body"},Ket={style:{display:"flex",gap:"8px","margin-bottom":"4px","font-size":"12px",color:"var(--fcom-text-off, #919399)",width:"100%"}},Zet={style:{flex:"1"}},Jet={style:{flex:"1"}},Qet={class:"dialog_footer"};function ett(t,e,n,i,s,o){const r=He,a=Nt,l=Yt,c=en,u=be,d=hi,h=H("Plus"),f=H("MoreFilled"),p=$r,m=Ar,y=Sr,b=eu,k=sn,C=Jt,$=tn,S=H("CloseBold"),M=H("FluentDnD"),P=H("drawer"),T=ft,I=$s,L=k8,R=Li,V=ws,B=H("UpgradeToProModal"),F=xt("loading");return v(),A(ee,null,[g("div",xet,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=z=>o.openSettings())},{default:w(()=>[N(x(t.$t("Settings")),1)]),_:1})]),_(P,{modelValue:s.showSettings,"onUpdate:modelValue":e[9]||(e[9]=z=>s.showSettings=z),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:w(()=>[s.fetching?(v(),A("div",$et,[_(a,{rows:5,animated:!0})])):s.config!==null?(v(),A("div",Aet,[_($,{onSubmit:e[8]||(e[8]=Ee(z=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,null,{default:w(()=>[_(l,{"true-value":"yes","false-value":"no",modelValue:n.features.custom_profile_fields,"onUpdate:modelValue":e[1]||(e[1]=z=>n.features.custom_profile_fields=z),label:t.$t("Enable Custom Profile Fields"),size:"large",class:"fcom_checkbox",onChange:e[2]||(e[2]=z=>{z==="yes"&&s.config.is_enabled!=="yes"&&!s.saving&&o.saveSettings()})},null,8,["modelValue","label"])]),_:1}),n.features.custom_profile_fields==="yes"?(v(),A(ee,{key:0},[g("div",Eet,[g("h3",null,x(t.$t("Field Groups")),1),_(r,{class:"fcom_primary_button",onClick:e[3]||(e[3]=z=>o.openGroupEditor())},{default:w(()=>[N(x(t.$t("Add Group")),1)]),_:1})]),s.config.groups.length?(v(),A("div",Tet,[_(M,{items:s.config.groups,"row-key":"slug"},{item:w(({data:z,index:U})=>[g("div",{class:q({fcom_collapsed_group:s.collapsedGroups.includes(z.slug)})},[g("div",Pet,[g("div",Iet,[e[28]||(e[28]=g("div",{class:"fcom_drag_handle"},"⋮⋮",-1)),g("div",Let,[g("h4",null,x(z.label),1),g("div",null,[o.getGroupFields(z.slug).length?(v(),D(r,{key:0,style:{"background-color":"var(--el-fill-color-light)"},class:"fcom_collapse_btn",onClick:G=>o.toggleGroup(z.slug),size:"small",text:""},{default:w(()=>[_(u,null,{default:w(()=>[...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",Oet,x(t.$t("%s fields",o.getGroupFields(z.slug).length)),1)]),_:2},1032,["onClick"])):O("",!0),z.is_system?(v(),D(d,{key:1,size:"small",type:"info",style:{"margin-left":"6px"}},{default:w(()=>[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:G=>o.openFieldEditor(null,z.slug)},{default:w(()=>[_(u,null,{default:w(()=>[_(h)]),_:1})]),_:1},8,["aria-label","onClick"])])])]),g("div",Det,[_(r,{class:"fcom_secondary_button",onClick:G=>o.openGroupEditor(U)},{default:w(()=>[N(x(t.$t("Edit Info")),1)]),_:1},8,["onClick"]),z.is_system?O("",!0):(v(),D(y,{key:0,trigger:"click",onCommand:G=>o.handleGroupAction(G,U)},{dropdown:w(()=>[_(m,null,{default:w(()=>[_(p,{command:"delete"},{default:w(()=>[N(x(t.$t("Delete")),1)]),_:1})]),_:1})]),default:w(()=>[_(r,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu edit_action",size:"small",text:""},{default:w(()=>[_(u,null,{default:w(()=>[_(f)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"]))])]),s.collapsedGroups.includes(z.slug)?O("",!0):(v(),A("div",Ret,[o.hasGroupFields(z.slug)?(v(),D(M,{key:0,items:o.getGroupFields(z.slug),"row-key":"slug",group:z.slug,"item-class":"fcom_section_item",onDrop:G=>o.onFieldDrop(G,z.slug),onCrossDrop:o.onFieldCrossDrop},{item:w(({data:G})=>[g("div",{class:"fcom_section_item_title",style:Xe(G.is_enabled?"":"opacity: 0.5")},[e[29]||(e[29]=g("div",{class:"fcom_drag_handle"},"⋮⋮",-1)),g("p",Vet,[N(x(G.label)+" ",1),G.is_required?(v(),A("span",Fet,"*")):O("",!0),_(d,{size:"small",type:"info"},{default:w(()=>[N(x(G.type),1)]),_:2},1024),_(d,{size:"small",type:o.privacyMeta(G.privacy).tag},{default:w(()=>[N(x(o.privacyMeta(G.privacy).short),1)]),_:2},1032,["type"])])],4),g("div",Net,[_(b,{modelValue:G.is_enabled,"onUpdate:modelValue":K=>G.is_enabled=K,size:"small",onChange:o.saveSettings},null,8,["modelValue","onUpdate:modelValue","onChange"]),_(r,{class:"fcom_secondary_button",size:"small",onClick:K=>o.openFieldEditor(G.slug)},{default:w(()=>[N(x(t.$t("Edit")),1)]),_:1},8,["onClick"]),g("div",Bet,[_(y,{trigger:"click",onCommand:K=>o.handleFieldAction(K,G)},{dropdown:w(()=>[_(m,{class:"fcom_cpf_field_dropdown"},{default:w(()=>[_(p,{command:"duplicate"},{default:w(()=>[N(x(t.$t("Duplicate")),1)]),_:1}),_(p,{command:"move"},{default:w(()=>[N(x(t.$t("Move")),1)]),_:1}),_(p,{command:"delete"},{default:w(()=>[N(x(t.$t("Delete")),1)]),_:1})]),_:1})]),default:w(()=>[_(r,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu edit_action",size:"small",text:""},{default:w(()=>[_(u,null,{default:w(()=>[_(f)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"]),Re(g("div",zet,[_($,{onSubmit:e[5]||(e[5]=Ee(K=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,{label:t.$t("Move to a different Group")},{default:w(()=>[_(C,{placeholder:t.$t("Select Group"),modelValue:s.moveTargetGroup,"onUpdate:modelValue":e[4]||(e[4]=K=>s.moveTargetGroup=K)},{default:w(()=>[(v(!0),A(ee,null,we(s.config.groups.filter(K=>K.slug!==G.group),K=>(v(),D(k,{key:K.slug,label:K.label,value:K.slug},null,8,["label","value"]))),128))]),_:2},1032,["placeholder","modelValue"])]),_:2},1032,["label"]),_(r,{disabled:!s.moveTargetGroup,onClick:K=>o.moveField(G.slug,s.moveTargetGroup),class:"fcom_primary_button"},{default:w(()=>[N(x(t.$t("Move Field")),1)]),_:1},8,["disabled","onClick"])]),_:2},1024),g("div",Het,[_(u,{onClick:e[6]||(e[6]=K=>s.openedFieldSlug=null)},{default:w(()=>[_(S)]),_:1})])],512),[[jt,s.openedFieldSlug===G.slug]])])])]),_:2},1032,["items","group","onDrop","onCrossDrop"])):(v(),A("div",{key:1,style:{padding:"10px 15px 10px 35px",color:"var(--fcom-text-off, #919399)","font-size":"13px"},onDragover:e[7]||(e[7]=Ee(()=>{},["prevent"])),onDrop:Ee(G=>o.onEmptyGroupDrop(G,z.slug),["prevent"])},x(t.$t("No fields in this group. Click + to add one.")),41,Uet))]))],2)]),_:1},8,["items"])])):(v(),A("div",Met,[g("p",null,x(t.$t("No groups configured yet.")),1)]))],64)):O("",!0),_(c,null,{default:w(()=>[Re((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[F,s.saving]])]),_:1})]),_:1})])):(v(),A("div",jet,[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]=z=>s.showGroupEditor=z),width:"40%"},{header:w(()=>[g("div",Wet,[g("h4",null,x(s.editingGroupIndex!==null?t.$t("Edit Group"):t.$t("Add Group")),1)])]),footer:w(()=>[g("div",qet,[_(r,{class:"fcom_secondary_button",onClick:e[13]||(e[13]=z=>s.showGroupEditor=!1)},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1}),_(r,{class:"fcom_primary_button",onClick:o.confirmGroup},{default:w(()=>[N(x(s.editingGroupIndex!==null?t.$t("Update Group"):t.$t("Add Group")),1)]),_:1},8,["onClick"])])]),default:w(()=>[g("div",Yet,[s.editingGroup?(v(),D($,{key:0,onSubmit:e[12]||(e[12]=Ee(z=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,{label:t.$t("Group Label")},{default:w(()=>[_(T,{modelValue:s.editingGroup.label,"onUpdate:modelValue":e[10]||(e[10]=z=>s.editingGroup.label=z),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:w(()=>[_(T,{modelValue:s.editingGroup.edit_description,"onUpdate:modelValue":e[11]||(e[11]=z=>s.editingGroup.edit_description=z),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]=z=>s.showFieldEditor=z),width:"40%"},{header:w(()=>[g("div",Get,[g("h4",null,x(s.editingFieldSlug!==null?t.$t("Edit Field"):t.$t("Add Field")),1)])]),footer:w(()=>[g("div",Qet,[_(r,{class:"fcom_secondary_button",onClick:e[24]||(e[24]=z=>s.showFieldEditor=!1)},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1}),_(r,{class:"fcom_primary_button",onClick:o.confirmField},{default:w(()=>[N(x(s.editingFieldSlug!==null?t.$t("Update Field"):t.$t("Add Field")),1)]),_:1},8,["onClick"])])]),default:w(()=>[g("div",Xet,[s.editingField?(v(),D($,{key:0,onSubmit:e[23]||(e[23]=Ee(z=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,{label:t.$t("Field Type")},{default:w(()=>[_(C,{modelValue:s.editingField.type,"onUpdate:modelValue":e[15]||(e[15]=z=>s.editingField.type=z),disabled:s.editingFieldSlug!==null,onChange:o.onTypeChange},{default:w(()=>[(v(!0),A(ee,null,we(s.fieldTypes,(z,U)=>(v(),D(k,{key:U,label:z,value:U},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled","onChange"])]),_:1},8,["label"]),_(c,{label:t.$t("Label")},{default:w(()=>[_(T,{modelValue:s.editingField.label,"onUpdate:modelValue":e[16]||(e[16]=z=>s.editingField.label=z),placeholder:t.$t("Field Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(c,{label:t.$t("Placeholder")},{default:w(()=>[_(T,{modelValue:s.editingField.placeholder,"onUpdate:modelValue":e[17]||(e[17]=z=>s.editingField.placeholder=z),placeholder:t.$t("Placeholder text")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(c,{label:t.$t("Privacy")},{default:w(()=>[_(C,{modelValue:s.editingField.privacy,"onUpdate:modelValue":e[18]||(e[18]=z=>s.editingField.privacy=z)},{default:w(()=>[(v(!0),A(ee,null,we(s.privacyOptions,z=>(v(),D(k,{key:z.value,label:z.label,value:z.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(c,{label:t.$t("Group")},{default:w(()=>[_(C,{modelValue:s.editingField.group,"onUpdate:modelValue":e[19]||(e[19]=z=>s.editingField.group=z)},{default:w(()=>[(v(!0),A(ee,null,we(s.config.groups,z=>(v(),D(k,{key:z.slug,label:z.label,value:z.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:w(()=>[(v(!0),A(ee,null,we(s.editingField.options,(z,U)=>(v(),A("div",{key:U,class:"fcom_question_option"},[_(T,{modelValue:s.editingField.options[U],"onUpdate:modelValue":G=>s.editingField.options[U]=G,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:G=>s.editingField.options.splice(U,1)},null,8,["title","icon","onClick"])):O("",!0)]))),128)),_(L,{type:"primary",underline:!1,onClick:e[20]||(e[20]=z=>s.editingField.options.push(`Option ${s.editingField.options.length+1}`))},{default:w(()=>[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:w(()=>[g("div",Ket,[g("span",Zet,x(t.$t("Key")),1),g("span",Jet,x(t.$t("Label")),1),e[30]||(e[30]=g("span",{style:{width:"32px"}},null,-1))]),(v(!0),A(ee,null,we(s.multiselectOptionsList,(z,U)=>(v(),A("div",{key:U,class:"fcom_question_option"},[_(T,{modelValue:z.key,"onUpdate:modelValue":G=>z.key=G,type:"text",placeholder:t.$t("Key")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),_(T,{modelValue:z.label,"onUpdate:modelValue":G=>z.label=G,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:G=>s.multiselectOptionsList.splice(U,1)},null,8,["title","icon","onClick"])):O("",!0)]))),128)),_(L,{type:"primary",underline:!1,onClick:e[21]||(e[21]=z=>s.multiselectOptionsList.push({key:`option_${s.multiselectOptionsList.length+1}`,label:`Option ${s.multiselectOptionsList.length+1}`}))},{default:w(()=>[N(x("+ "+t.$t("Add new option")),1)]),_:1})]),_:1},8,["label"])):O("",!0),_(c,{label:t.$t("Required")},{default:w(()=>[_(V,{modelValue:s.editingField.is_required,"onUpdate:modelValue":e[22]||(e[22]=z=>s.editingField.is_required=z)},{default:w(()=>[_(R,{value:!0},{default:w(()=>[N(x(t.$t("Yes")),1)]),_:1}),_(R,{value:!1},{default:w(()=>[N(x(t.$t("No")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1})):O("",!0)])]),_:1},8,["modelValue"]),s.openUpgradeModal?(v(),D(B,{key:0,showModal:s.openUpgradeModal,onCloseModal:e[26]||(e[26]=z=>s.openUpgradeModal=!1),upgrade_module:"custom_profile_fields"},null,8,["showModal"])):O("",!0)],64)}const ttt=ue(Cet,[["render",ett]]),ntt={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})}}},stt={class:"fcom_pwa_settings"},itt=["id"],ott={key:0,class:"white_loaded"},rtt={key:1,class:"dialog_body"},att={class:"fcom_help_text"},ltt={class:"fcom_help_text"},ctt={class:"fcom_help_text"},utt={class:"fcom_help_text"},dtt={class:"fcom_image_uploader_wrapper"},htt={class:"fcom_help_text"},ftt={class:"fcom_help_text"},ptt={class:"fcom_help_text"},mtt={class:"dialog_footer"},gtt={key:2};function vtt(t,e,n,i,s,o){const r=He,a=Nt,l=Yt,c=en,u=ft,d=Qc,h=Li,f=ws,p=sa,m=Wo,y=H("EditPen"),b=be,k=H("Delete"),C=H("ImageUploader"),$=tn,S=Va,M=H("UpgradeToProModal"),P=xt("loading");return v(),A(ee,null,[g("div",stt,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=T=>o.openSettings())},{default:w(()=>[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:w(({titleId:T,titleClass:I})=>[g("h4",{id:T,class:q(I)},x(t.$t("Progressive Web App (PWA) Settings")),11,itt)]),default:w(()=>[s.fetching?(v(),A("div",ott,[_(a,{rows:5,animated:!0})])):s.settings?(v(),A("div",rtt,[_($,{onSubmit:e[10]||(e[10]=Ee(T=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,null,{default:w(()=>[_(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(),A(ee,{key:0},[_(c,{label:t.$t("App Name")},{default:w(()=>[_(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",att,[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:w(()=>[_(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",ltt,[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:w(()=>[_(d,{modelValue:s.settings.background_color,"onUpdate:modelValue":e[4]||(e[4]=T=>s.settings.background_color=T)},null,8,["modelValue"]),g("div",ctt,[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:w(()=>[_(f,{modelValue:s.settings.icon_source,"onUpdate:modelValue":e[5]||(e[5]=T=>s.settings.icon_source=T)},{default:w(()=>[_(h,{value:"default"},{default:w(()=>[N(x(t.$t("Default (Site Icon)")),1)]),_:1}),_(h,{value:"custom"},{default:w(()=>[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:w(()=>[s.defaultIcon.url?s.defaultIcon.is_square===!1?(v(),D(p,{key:1,type:"warning",closable:!1,"show-icon":""},{default:w(()=>[N(x(t.$t("Icon is %s, not square — the install option will not appear.",s.defaultIcon.sizes)),1)]),_:1})):(v(),A(ee,{key:2},[_(m,{alt:t.$t("App Icon"),src:s.defaultIcon.url,style:{"max-width":"64px",height:"auto"}},null,8,["alt","src"]),g("div",utt,[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:w(()=>[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:w(()=>[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",dtt,[_(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:w(()=>[_(b,null,{default:w(()=>[_(k)]),_:1})]),_:2},[s.settings.custom_icon?{name:"trigger",fn:w(()=>[_(r,{class:"fcom_plain_button","aria-label":t.$t("Change App Icon")},{default:w(()=>[_(b,null,{default:w(()=>[_(y)]),_:1})]),_:1},8,["aria-label"])]),key:"0"}:void 0]),1032,["can_remove","remove_label"])]),g("div",htt,[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:w(()=>[_(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",ftt,[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:w(()=>[_(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",ptt,[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:w(()=>[_(f,{modelValue:s.settings.install_position,"onUpdate:modelValue":e[9]||(e[9]=T=>s.settings.install_position=T)},{default:w(()=>[_(h,{value:"top"},{default:w(()=>[N(x(t.$t("Sidebar Top")),1)]),_:1}),_(h,{value:"bottom"},{default:w(()=>[N(x(t.$t("Sidebar Bottom")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0)],64)):O("",!0)]),_:1}),g("div",mtt,[Re((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[P,s.saving]])])])):(v(),A("div",gtt,[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 _tt=ue(ntt,[["render",vtt]]),ytt={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()}},btt={key:1,class:"fluent-notify-settings"},wtt={key:0,class:"fcom_push_setup"},ktt={class:"fcom_push_track"},Ctt={class:"fcom_push_track_rail"},xtt={class:"fcom_push_track_node"},Stt={key:0,"aria-hidden":"true"},$tt={key:1},Att={class:"fcom_push_track_text"},Ett={class:"fcom_push_track_name"},Mtt={class:"fcom_push_track_note"},Ttt={class:"fcom_push_setup_actions"},Ptt=["href"],Itt={class:"fcom_push_setup_note"},Ltt={key:4,class:"fcom_push_setup_note"},Ott={key:5,class:"fcom_push_setup_note"},Dtt={key:0,class:"fcom_help_text"},Rtt={class:"setting_sub_header"},Vtt={class:"setting_sub_header"},Ftt={key:2,class:"fluent-notify-settings"};function Ntt(t,e,n,i,s,o){const r=Nt,a=He,l=Yt,c=en,u=tn,d=b8,h=s2;return s.loading?(v(),D(r,{key:0,animated:!0,rows:4})):s.push_settings?(v(),A("div",btt,[s.push_available?(v(),A(ee,{key:1},[_(u,{modelValue:s.push_settings,"onUpdate:modelValue":e[1]||(e[1]=f=>s.push_settings=f),"label-position":"top"},{default:w(()=>[_(c,null,{default:w(()=>[_(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:w(()=>[N(x(t.$t("Enable push notifications for this community")),1)]),_:1},8,["modelValue"]),o.isPushEnabled?O("",!0):(v(),A("div",Dtt,[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(),A(ee,{key:0},[_(d),g("div",Rtt,[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:w(()=>[_(c,null,{default:w(()=>[_(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:w(()=>[N(x(t.$t("Notify when someone comments on their post")),1)]),_:1},8,["modelValue"])]),_:1}),_(c,null,{default:w(()=>[_(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:w(()=>[N(x(t.$t("Notify when someone replies to their comment")),1)]),_:1},8,["modelValue"])]),_:1}),_(c,null,{default:w(()=>[_(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:w(()=>[N(x(t.$t("Notify when someone mentions them")),1)]),_:1},8,["modelValue"])]),_:1}),_(c,null,{default:w(()=>[_(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:w(()=>[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",Vtt,[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:w(()=>[_(c,null,{default:w(()=>[_(h,{modelValue:s.push_settings.prompt_placements,"onUpdate:modelValue":e[7]||(e[7]=f=>s.push_settings.prompt_placements=f)},{default:w(()=>[(v(!0),A(ee,null,we(o.placementOptions,f=>(v(),D(l,{key:f.value,value:f.value,disabled:f.upcoming,class:"fcom_checkbox"},{default:w(()=>[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:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["loading","disabled","onClick"])],64)):(v(),A("div",wtt,[g("ol",ktt,[(v(!0),A(ee,null,we(o.setupTrack,f=>(v(),A("li",{key:f.key,class:q("is_"+f.status)},[g("span",Ctt,[g("span",xtt,[f.status==="done"?(v(),A("span",Stt,"✓")):(v(),A("span",$tt,x(f.position),1))])]),g("span",Att,[g("span",Ett,x(f.name),1),g("span",Mtt,x(f.note),1)])],2))),128))]),g("div",Ttt,[o.setupAction==="activate"?(v(),D(a,{key:0,class:"fcom_primary_button",loading:s.installing,disabled:s.installing,onClick:o.installFluentNotify},{default:w(()=>[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:w(()=>[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:w(()=>[N(x(t.$t("Open FluentNotify Settings")),1)]),_:1},8,["onClick"])):o.setupAction==="guide"?(v(),A(ee,{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,Ptt),g("p",Itt,x(t.$t("Download and install FluentNotify, then come back here to finish the setup.")),1)],64)):o.isInactive?(v(),A("p",Ltt,x(t.$t("Ask a site administrator to activate FluentNotify.")),1)):(v(),A("p",Ott,x(t.$t("Ask a site administrator to install FluentNotify.")),1))])]))])):(v(),A("div",Ftt,[g("h3",null,x(t.$t("Sorry, the settings could not be loaded. Please reload the page and try again.")),1)]))}const Btt=ue(ytt,[["render",Ntt]]),ztt={name:"Features",components:{UserBadgesConfig:jZe,LeaderBoardConfig:wZe,StorageSettings:tZe,Layout:_i,AppLayout:yi,UpgradeToProModal:Qd,SocialMediaLinkConfig:lJe,MessagingSettings:PJe,FollowingConfigView:BJe,FluentPlayerSettings:ket,CustomProfileFieldsConfig:ttt,PwaConfig:_tt,PushNotificationSettings:Btt,Drawer:tu},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"&&JH(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"))}},Htt={class:"settings_router"},Utt={key:0,class:"white_loaded"},jtt={key:1,style:{"margin-bottom":"30px"}},Wtt={class:"fhr_content_layout_body"},Ytt={class:"setting_header"},qtt={class:"fcom_advanced_features"},Gtt={key:0,class:"setting_body"},Xtt={class:"setting_item"},Ktt={class:"setting_field_placeholder"},Ztt={class:"title"},Jtt={class:"info"},Qtt={class:"settings_field_data"},ent={class:"align-right"},tnt={class:"setting_item"},nnt={class:"setting_field_placeholder"},snt={class:"title"},int={class:"info"},ont={class:"settings_field_data"},rnt={class:"align-right"},ant={class:"setting_item"},lnt={class:"setting_field_placeholder"},cnt={class:"title"},unt={class:"info"},dnt={class:"settings_field_data"},hnt={class:"align-right"},fnt={class:"setting_item"},pnt={class:"setting_field_placeholder"},mnt={class:"title"},gnt={class:"info"},vnt={class:"settings_field_data"},_nt={class:"align-right"},ynt={class:"fcom_module_popover_content"},bnt={class:"setting_item"},wnt={class:"setting_field_placeholder"},knt={class:"title"},Cnt={class:"info"},xnt={class:"settings_field_data"},Snt={class:"align-right"},$nt={key:0,class:"fcom_giphy_api",style:{"margin-bottom":"5px"}},Ant={class:"fcom_module_popover_content"},Ent={class:"setting_item"},Mnt={class:"setting_field_placeholder"},Tnt={class:"title"},Pnt={class:"info"},Int={class:"settings_field_data"},Lnt={class:"align-right"},Ont={class:"fcom_module_popover_content"},Dnt={class:"setting_item"},Rnt={class:"setting_field_placeholder"},Vnt={class:"title"},Fnt={class:"info"},Nnt={class:"settings_field_data"},Bnt={class:"align-right"},znt={class:"setting_item"},Hnt={class:"setting_field_placeholder"},Unt={class:"title"},jnt={class:"info"},Wnt={class:"settings_field_data"},Ynt={class:"align-right"},qnt={class:"setting_item"},Gnt={class:"setting_field_placeholder"},Xnt={class:"title"},Knt={class:"info"},Znt={class:"settings_field_data"},Jnt={class:"align-right"},Qnt={class:"setting_item"},est={class:"setting_field_placeholder"},tst={class:"title"},nst={class:"info"},sst={class:"settings_field_data"},ist={class:"align-right"},ost={class:"fhr_content_layout_body"},rst={class:"setting_header"},ast={class:"fcom_advanced_features"},lst={key:0,class:"white_loaded"},cst={key:1,class:"setting_body"},ust={class:"setting_field_placeholder"},dst={class:"title recommend_plugin",style:{display:"flex","align-items":"flex-start"}},hst={class:"avatar",style:{"margin-right":"15px"}},fst=["src"],pst=["href"],mst={class:"info"},gst={class:"settings_field_data"},vst={class:"align-right"},_st=["href"],yst={key:0,class:"dialog_body"},bst={key:0,class:"dialog_body fluent_player_settings_body"};function wst(t,e,n,i,s,o){const r=Nt,a=hi,l=H("FollowingConfigView"),c=H("LeaderBoardConfig"),u=H("UserBadgesConfig"),d=Yt,h=He,f=Yo,p=ft,m=H("UpgradeToProModal"),y=H("storage-settings"),b=H("SocialMediaLinkConfig"),k=H("CustomProfileFieldsConfig"),C=H("PwaConfig"),$=H("messaging-settings"),S=Va,M=H("push-notification-settings"),P=H("drawer"),T=H("fluent-player-settings"),I=H("layout"),L=H("app-layout");return v(),D(L,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(I,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Advanced Features & Addons")},{default:w(()=>[g("div",Htt,[s.loading?(v(),A("div",Utt,[_(r,{rows:5,animated:!0}),e[15]||(e[15]=g("hr",null,null,-1)),_(r,{rows:7,animated:!0})])):(v(),A("div",jtt,[g("div",Wtt,[g("div",Ytt,[g("h2",null,x(t.$t("Advanced Features")),1)]),g("div",qtt,[s.features?(v(),A("div",Gtt,[g("div",Xtt,[g("div",Ktt,[g("div",Ztt,[N(x(t.$t("Follower Module"))+" ",1),t.has_pro?(v(),A(ee,{key:0},[s.features.followers_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.followers_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",Jtt,x(t.$t("Let your community users to follow each other and filter posts by their followings.")),1)]),g("div",Qtt,[g("div",ent,[_(l,{features:s.features},null,8,["features"])])])]),g("div",tnt,[g("div",nnt,[g("div",snt,[N(x(t.$t("Leaderboards Module"))+" ",1),t.has_pro?(v(),A(ee,{key:0},[s.features.leader_board_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[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:w(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",int,x(t.$t("__LEADERBOARD_DESC")),1)]),g("div",ont,[g("div",rnt,[_(c,{onSaveSettings:o.saveFeatures,features:s.features},null,8,["onSaveSettings","features"])])])]),g("div",ant,[g("div",lnt,[g("div",cnt,[N(x(t.$t("User Badges"))+" ",1),t.has_pro?(v(),A(ee,{key:0},[s.features.user_badge==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.user_badge==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",unt,x(t.$t("__USER_BADGE_DESC")),1)]),g("div",dnt,[g("div",hnt,[_(u,{onSaveSettings:o.saveFeatures,features:s.features},null,8,["onSaveSettings","features"])])])]),g("div",fnt,[g("div",pnt,[g("div",mnt,[N(x(t.$t("Course Module"))+" ",1),s.features.course_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.course_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)]),g("div",gnt,x(t.$t("__COURSE_STRUCTURED_LESSONS")),1)]),g("div",vnt,[g("div",_nt,[_(f,{persistent:!1,placement:"bottom",title:t.$t("Course Module Settings"),width:400,trigger:"click"},{reference:w(()=>[_(h,{size:"default",class:"fcom_secondary_button"},{default:w(()=>[N(x(t.$t("Settings")),1)]),_:1})]),default:w(()=>[g("div",ynt,[_(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:w(()=>[N(x(t.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])])])]),g("div",bnt,[g("div",wnt,[g("div",knt,[N(x(t.$t("Giphy Module"))+" ",1),t.has_pro?(v(),A(ee,{key:0},[s.features.giphy_module==="no"?(v(),D(a,{key:0,type:"info",size:"small",effect:"dark"},{default:w(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.giphy_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",Cnt,x(t.$t("Unlock potential by using Giphy when creating a new article, post, or comment")),1)]),g("div",xnt,[g("div",Snt,[s.openGiphyUpgradeModal?O("",!0):(v(),D(f,{key:0,persistent:!1,placement:"bottom",title:t.$t("Giphy Module Settings"),width:400,trigger:"click"},{reference:w(()=>[_(h,{size:"default",class:"fcom_secondary_button",onClick:e[3]||(e[3]=R=>!t.has_pro&&(s.openGiphyUpgradeModal=!0))},{default:w(()=>[N(x(t.$t("Settings")),1)]),_:1})]),default:w(()=>[s.features.giphy_module==="yes"?(v(),A("div",$nt,[_(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",Ant,[_(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:w(()=>[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",Ent,[g("div",Mnt,[g("div",Tnt,[N(x(t.$t("Emoji Module"))+" ",1),t.has_pro?(v(),A(ee,{key:0},[s.features.emoji_module==="no"?(v(),D(a,{key:0,type:"info",size:"small",effect:"dark"},{default:w(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.emoji_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",Pnt,x(t.$t("__EMOJIS_DESC")),1)]),g("div",Int,[g("div",Lnt,[s.openEmojiUpgradeModal?O("",!0):(v(),D(f,{key:0,persistent:!1,placement:"bottom",title:t.$t("Emoji Settings"),width:400,trigger:"click"},{reference:w(()=>[_(h,{size:"default",class:"fcom_secondary_button",onClick:e[6]||(e[6]=R=>!t.has_pro&&(s.openEmojiUpgradeModal=!0))},{default:w(()=>[N(x(t.$t("Settings")),1)]),_:1})]),default:w(()=>[g("div",Ont,[_(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:w(()=>[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",Dnt,[g("div",Rnt,[g("div",Vnt,[N(x(t.$t("Media Module"))+" ",1),s.features.cloud_storage==="yes"?(v(),D(a,{key:0,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1})):s.features.cloud_storage==="no"?(v(),D(a,{key:1,type:"info",size:"small"},{default:w(()=>[N(x(t.$t("Local")),1)]),_:1})):O("",!0)]),g("div",Fnt,x(t.$t("__CLOUD_STORAGE_DESC")),1)]),g("div",Nnt,[g("div",Bnt,[_(y,{features:s.features},null,8,["features"])])])]),g("div",znt,[g("div",Hnt,[g("div",Unt,x(t.$t("Profile Social Media Links")),1),g("div",jnt,x(t.$t("Enable/Disable Social Media Links for profiles")),1)]),g("div",Wnt,[g("div",Ynt,[_(b)])])]),g("div",qnt,[g("div",Gnt,[g("div",Xnt,[N(x(t.$t("Custom Profile Fields"))+" ",1),t.has_pro?(v(),A(ee,{key:0},[s.features.custom_profile_fields==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[N(x(t.$t("Disabled")),1)]),_:1})):(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1}))],64)):O("",!0)]),g("div",Knt,x(t.$t("Add custom fields to member profiles like Gender, DOB, Designation, Blood Group and more.")),1)]),g("div",Znt,[g("div",Jnt,[_(k,{features:s.features},null,8,["features"])])])]),g("div",Qnt,[g("div",est,[g("div",tst,[N(x(t.$t("Progressive Web App (PWA)"))+" ",1),t.has_pro?(v(),A(ee,{key:0},[s.features.pwa_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.pwa_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",nst,x(t.$t("Let members install your community as an app on their phone with your own name, icon and colors.")),1)]),g("div",sst,[g("div",ist,[_(C,{onSaveSettings:o.saveFeatures,features:s.features},null,8,["onSaveSettings","features"])])])])])):O("",!0)])])])),g("div",ost,[g("div",rst,[g("h2",null,x(t.$t("Recommended Plugins and Addons")),1)]),g("div",ast,[s.loading?(v(),A("div",lst,[_(r,{rows:6,animated:!0})])):s.features?(v(),A("div",cst,[(v(!0),A(ee,null,we(s.addOns,(R,V)=>(v(),A("div",{key:V,class:"setting_item"},[g("div",ust,[g("div",dst,[g("div",hst,[g("img",{alt:"",src:R.logo,style:{width:"60px"}},null,8,fst)]),g("div",null,[g("a",{target:"_blank",href:R.learn_more_url},x(R.title),9,pst),R.is_installed?(v(),D(a,{key:0,type:"success",size:"small",effect:"light",style:{"margin-left":"8px"}},{default:w(()=>[N(x(t.$t("Installed")),1)]),_:1})):O("",!0),g("div",mst,x(R.description),1)])])]),g("div",gst,[g("div",vst,[!R.is_installed&&!o.hasGuidedSetup(V)?(v(),D(h,{key:0,class:"fcom_secondary_button",onClick:B=>o.installPlugin(V),loading:s.installingSlug===V,disabled:!!s.installingSlug&&s.installingSlug!==V},{default:w(()=>[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]=B=>s.showMessagingSettings=!0),class:"fcom_secondary_button"},{default:w(()=>[N(x(t.$t("Messaging Settings")),1)]),_:1})):o.hasGuidedSetup(V)?(v(),D(h,{key:2,onClick:e[9]||(e[9]=B=>s.showNotifySettings=!0),class:"fcom_secondary_button"},{default:w(()=>[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]=B=>s.showFluentPlayerSettings=!0),class:"fcom_secondary_button"},{default:w(()=>[N(x(t.$t("Player Settings")),1)]),_:1})):R.settings_url?(v(),A("a",{key:4,href:R.settings_url,class:"el-button el-button--default fcom_secondary_button"},x(t.$t("View Settings")),9,_st)):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:w(({close:R})=>[g("h4",null,x(t.$t("Messaging Settings")),1)]),default:w(()=>[s.showMessagingSettings?(v(),A("div",yst,[_($)])):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:w(()=>[_(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:w(()=>[g("h4",null,x(t.$t("FluentPlayer Settings")),1)]),default:w(()=>[s.showFluentPlayerSettings?(v(),A("div",bst,[_(T)])):O("",!0)]),_:1},8,["modelValue"])]),_:1},8,["title"])]),_:1})}const kst=ue(ztt,[["render",wst]]),Cst={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()}}},xst={class:"fcom_color_item"};function Sst(t,e,n,i,s,o){const r=Qc,a=H("InfoFilled"),l=be,c=Ss;return v(),A("div",xst,[_(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:w(()=>[_(l,{class:"fcom_tip"},{default:w(()=>[_(a)]),_:1})]),_:1},8,["content"])):O("",!0)])}const $st=ue(Cst,[["render",Sst]]),Ast={name:"AuthMeta",components:{BgImageUpload:gv,CrepeEditor:cu,FComColorPicker:$st},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}}},Est={key:0,class:"fcom_lockscreen_meta"},Mst={class:"fcom_meta_section lockscreen_meta"},Tst={key:0,class:"fcom_description"},Pst={key:1,class:"fcom_description"},Ist={class:"fcom_meta_section lockscreen_meta"},Lst={key:0,class:"fcom_meta_label"},Ost={key:1,class:"fcom_meta_label"},Dst={class:"fcom_meta_content"},Rst={class:"fcom_meta_block"},Vst={class:"fcom_block_label"},Fst={class:"fcom_meta_sorting"},Nst={class:"fcom_block_action"},Bst={key:1,class:"fcom_lockscreen_meta"},zst={class:"fcom_edit_title"},Hst={class:"fcom_edit_content"},Ust={key:0,class:"fcom_help_text"},jst={key:0,class:"fcom_help_text"};function Wst(t,e,n,i,s,o){const r=be,a=H("Top"),l=H("Bottom"),c=H("EditPen"),u=H("Hide"),d=H("View"),h=H("Back"),f=H("BgImageUpload"),p=en,m=ft,y=H("crepe-editor"),b=tn,k=u2,C=H("FComColorPicker"),$=Li,S=ws,M=eu,P=Hfe,T=zfe,I=c2;return s.editing?(v(),A("div",Bst,[g("div",zst,[_(r,{onClick:o.backToFields},{default:w(()=>[_(h)]),_:1},8,["onClick"]),g("p",null,x(s.editingField.label),1)]),g("div",Hst,[o.isBannerField||o.isFormField?(v(),D(I,{key:0,modelValue:s.editTab,"onUpdate:modelValue":e[18]||(e[18]=L=>s.editTab=L)},{default:w(()=>[_(k,{label:t.$t("Content"),name:"content"},{default:w(()=>[_(b,{onSubmit:e[4]||(e[4]=Ee(L=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[o.isBannerField?(v(),D(p,{key:0,label:t.$t("Logo"),class:"fcom_bg_image"},{default:w(()=>[_(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:w(()=>[_(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:w(()=>[_(y,{modelValue:s.editingField.description,"onUpdate:modelValue":e[2]||(e[2]=L=>s.editingField.description=L)},null,8,["modelValue"]),s.isDirty?(v(),A("span",Ust,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:w(()=>[_(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:w(()=>[_(b,{onSubmit:e[11]||(e[11]=Ee(L=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(p,{label:t.$t("Background Image"),class:"fcom_bg_image"},{default:w(()=>[_(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:w(()=>[_(T,{modelValue:s.formField,"onUpdate:modelValue":e[17]||(e[17]=L=>s.formField=L),accordion:""},{default:w(()=>[_(P,{title:t.$t("Terms"),name:"terms"},{default:w(()=>[_(b,{onSubmit:e[15]||(e[15]=Ee(L=>t.doNothing(),["prevent"])),onInput:e[16]||(e[16]=L=>s.isDirty=!0),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(p,{label:t.$t("Label")},{default:w(()=>[_(y,{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(),A("span",jst,x(t.$t("Please save the changes to update the view")),1)):O("",!0)]),_:1},8,["label"]),_(p,{label:t.$t("Required")},{default:w(()=>[_(S,{modelValue:s.editingField.fields.terms.required,"onUpdate:modelValue":e[13]||(e[13]=L=>s.editingField.fields.terms.required=L)},{default:w(()=>[_($,{value:!0},{default:w(()=>[N(x(t.$t("Yes")),1)]),_:1}),_($,{value:!1},{default:w(()=>[N(x(t.$t("No")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(p,{label:t.$t("Disabled")},{default:w(()=>[_(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(),A("div",Est,[g("div",Mst,[n.currentTab=="login"?(v(),A("div",Tst,[g("p",null,x(t.$t("Configure the appearance and behavior of your login form.")),1)])):O("",!0),n.currentTab=="signup"?(v(),A("div",Pst,[g("p",null,x(t.$t("Configure the appearance and behavior of your signup form.")),1)])):O("",!0)]),g("div",Ist,[n.currentTab=="login"?(v(),A("div",Lst,x(t.$t("Customize Login")),1)):O("",!0),n.currentTab=="signup"?(v(),A("div",Ost,x(t.$t("Customize Sign Up")),1)):O("",!0),g("div",Dst,[g("ul",Rst,[(v(!0),A(ee,null,we(o.sortedFields,L=>(v(),A("li",{class:q(["fcom_block_list",{block_hidden:L.hidden}])},[g("div",Vst,[_(r,{class:"fcom_el_icon"},{default:w(()=>[(v(),D(Ct(o.getFieldIcon(L))))]),_:2},1024),g("p",null,x(o.getLabel(L.type)),1)]),g("div",Fst,[_(r,{onClick:o.togglePosition},{default:w(()=>[_(a)]),_:1},8,["onClick"]),_(r,{onClick:o.togglePosition},{default:w(()=>[_(l)]),_:1},8,["onClick"])]),g("div",Nst,[_(r,{onClick:R=>o.updateField(L)},{default:w(()=>[_(c)]),_:1},8,["onClick"]),L.type=="banner"?(v(),A(ee,{key:0},[L.hidden?(v(),D(r,{key:0,onClick:R=>o.toggleHidden(L)},{default:w(()=>[_(u)]),_:1},8,["onClick"])):(v(),D(r,{key:1,onClick:R=>o.toggleHidden(L)},{default:w(()=>[_(d)]),_:1},8,["onClick"]))],64)):O("",!0)])],2))),256))])])])]))}const Yst=ue(Ast,[["render",Wst]]),qst={name:"AuthEditor",emits:["updateAuthSettings"],props:["currentTab","savingCount","authSettings"],components:{AuthMeta:Yst},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})}}},Gst={class:"fcom_auth_content"},Xst={key:0,class:"fcom_auth_image"},Kst=["src","alt"],Zst={class:"fcom_auth_title"},Jst=["innerHTML"],Qst={class:"fcom_auth_content form_content"},eit={class:"fcom_auth_form_header"},tit={class:"fcom_auth_title"},nit=["innerHTML"],sit=["innerHTML"];function iit(t,e,n,i,s,o){const r=H("auth-meta"),a=U1,l=ft,c=en,u=Yt,d=tn,h=He,f=jo;return v(),A(ee,null,[_(a,{class:"fcom_full_editor_side lockscreen_editor auth_editor",width:"300px"},{default:w(()=>[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:w(()=>{var p,m,y,b,k,C,$,S,M;return[g("div",{class:"fcom_editor_content",style:Xe(o.contentStyles)},[(p=s.settings.banner)!=null&&p.hidden?O("",!0):(v(),A("div",{key:0,class:"fcom_auth_wrap",style:Xe(o.backgroundStyles(s.settings.banner))},[g("div",Gst,[(m=s.settings.banner)!=null&&m.logo?(v(),A("div",Xst,[g("img",{src:(y=s.settings.banner)==null?void 0:y.logo,alt:(b=s.settings.banner)==null?void 0:b.title},null,8,Kst)])):O("",!0),g("div",Zst,[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(),A("div",{key:1,class:"fcom_auth_description",style:Xe(o.descriptionStyles(s.settings.banner))},[g("p",{innerHTML:s.settings.banner.description_rendered},null,8,Jst)],4)):O("",!0)])],4)),g("div",{class:"fcom_auth_wrap",style:Xe(o.backgroundStyles(s.settings.form))},[g("div",Qst,[g("div",eit,[g("div",tit,[g("h2",{style:Xe(o.titleStyles(s.settings.form)),contenteditable:"true",onBlur:e[1]||(e[1]=P=>o.updateTitle(P,s.settings.form))},x(($=s.settings.form)==null?void 0:$.title),37)]),(S=s.settings.form)!=null&&S.description?(v(),A("div",{key:0,class:"fcom_auth_description",style:Xe(o.descriptionStyles(s.settings.form))},[g("p",{innerHTML:s.settings.form.description_rendered},null,8,nit)],4)):O("",!0)]),(M=s.settings.form)!=null&&M.fields?(v(),D(d,{key:0,"label-position":"top",class:"fcom_auth_form"},{default:w(()=>[(v(!0),A(ee,null,we(s.settings.form.fields,P=>(v(),A("div",{key:P.name},[["text","email","number","textarea","password"].includes(P.type)?(v(),D(c,{key:0,label:P.label},{default:w(()=>[_(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:w(()=>[_(u,{class:"fcom_checkbox"},{default:w(()=>[g("span",{innerHTML:P.inline_label},null,8,sit)]),_: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:w(()=>{var P;return[N(x((P=s.settings.form)==null?void 0:P.button_label),1)]}),_:1},8,["style"])])],4)],4)]}),_:1})],64)}const oit=ue(qst,[["render",iit]]),rit={name:"AuthSettings",emits:["completed"],components:{AuthEditor:oit},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()}},ait={class:"fcom_full_editor"},lit={class:"fcom_full_editor_header"},cit=["aria-label"],uit={class:"fcom_editor_menu object_menu"},dit={class:"fcom_space_menu_ul"},hit={class:"full_editor_actions"},fit={key:0},pit={key:1};function mit(t,e,n,i,s,o){const r=H("ArrowLeft"),a=be,l=He,c=j1,u=H("auth-editor"),d=Nt,h=U1,f=jo,p=H1,m=xt("loading");return v(),A("div",ait,[_(p,null,{default:w(()=>[_(c,{class:"fcom_full_editor_header_wrap"},{default:w(()=>[g("div",lit,[g("button",{type:"button",onClick:e[0]||(e[0]=y=>t.$emit("completed")),class:"fcom_back_header","aria-label":t.$t("Back to %s",t.$t("General Settings"))},[_(a,null,{default:w(()=>[_(r)]),_:1}),N(" "+x(t.$t("General Settings")),1)],8,cit),g("div",uit,[g("ul",dit,[g("li",{onClick:e[1]||(e[1]=y=>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]=y=>s.currentTab="signup")},[g("a",{class:q({"router-link-exact-active":s.currentTab=="signup"}),href:"#"},x(t.$t("Sign Up")),3)])])]),g("div",hit,[Re((v(),D(l,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[s.hasPro?(v(),A("span",fit,x(t.$t("Save Changes")),1)):(v(),A("span",pit,x(t.$t("Save Changes (Pro Required)")),1))]),_:1},8,["disabled","onClick"])),[[m,s.saving]])])])]),_:1}),_(p,{class:"fcom_full_editor_container"},{default:w(()=>[s.loading?(v(),A(ee,{key:1},[_(h,{class:"fcom_full_editor_side lockscreen_editor"},{default:w(()=>[_(d,{animated:!0,rows:5})]),_:1}),_(f,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(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 git=ue(rit,[["render",mit]]),vit={name:"GeneralSettings",components:{ImageUploader:Ll,Layout:_i,AppLayout:yi,CopyDocument:uR,AuthSettings:git},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"))}},_it={class:"settings_router"},yit={class:"fhr_content_layout_body"},bit={class:"setting_body"},wit={class:"settings_title"},kit={class:"settings_subtitle"},Cit={class:"settings_title"},xit={class:"settings_subtitle"},Sit=["src"],$it={class:"settings_title"},Ait={class:"settings_subtitle"},Eit=["src"],Mit={class:"settings_title"},Tit={class:"settings_subtitle"},Pit={class:"settings_title"},Iit={class:"settings_subtitle"},Lit=["src"],Oit={class:"settings_title"},Dit={class:"settings_subtitle"},Rit={class:"fcom_help_text"},Vit={class:"settings_title"},Fit={class:"settings_subtitle"},Nit={class:"settings_title"},Bit={class:"settings_subtitle"},zit={class:"help_text"},Hit={class:"settings_title"},Uit={class:"settings_subtitle"},jit={class:"settings_title"},Wit={class:"settings_subtitle"},Yit={class:"fcom_help_text"},qit={class:"settings_title"},Git={class:"settings_subtitle"},Xit={class:"fcom_help_text"},Kit=["href"],Zit={class:"settings_title"},Jit={class:"settings_subtitle"},Qit={key:0};function eot(t,e,n,i,s,o){const r=He,a=jd,l=ft,c=en,u=Ud,d=H("image-uploader"),h=Hd,f=ws,p=H("CopyDocument"),m=be,y=Yt,b=Li,k=sn,C=Jt,$=tn,S=Nt,M=H("auth-settings"),P=H("layout"),T=H("app-layout");return v(),D(T,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(P,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("General Settings")},{actions:w(()=>[_(r,{class:"fcom_primary_button",disabled:s.saving||s.loading,onClick:o.saveSettings},{default:w(()=>[g("span",null,x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),default:w(()=>[g("div",_it,[g("div",yit,[g("div",bit,[s.settings?(v(),D($,{key:0,onSubmit:e[19]||(e[19]=Ee(I=>t.doNothing(),["prevent"])),"label-position":"top","label-width":"120px"},{default:w(()=>[_(u,{gutter:20,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",wit,x(t.$t("Community Title")),1),g("span",kit,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:w(()=>[_(c,null,{default:w(()=>[_(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:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",Cit,x(t.$t("Site Logo (For Light Background)")),1),g("span",xit,x(t.$t("Recommended dimensions: 480 x 120, 4:1 aspect ratio.")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[s.settings.logo?(v(),A("img",{key:0,alt:"",class:"settings_img",src:s.settings.logo},null,8,Sit)):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:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",$it,x(t.$t("Site Logo (For Dark Mode)")),1),g("span",Ait,x(t.$t("Recommended dimensions: 480 x 120, 4:1 aspect ratio.")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[s.settings.white_logo?(v(),A("img",{key:0,alt:"",class:"settings_img",src:s.settings.white_logo},null,8,Eit)):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:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",Mit,x(t.$t("Logo Permalink")),1),g("span",Tit,x(t.$t("Define the permalink of the logo you want to use.")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[_(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:w(()=>[_(h,{value:"default"},{default:w(()=>[N(x(t.$t("Default")),1)]),_:1}),_(h,{value:"custom"},{default:w(()=>[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:w(()=>[_(l,{value:t.appVars.urls.portal_base,disabled:"",type:"url",placeholder:t.$t("Default Permalink")},{append:w(()=>[_(r,{onClick:e[4]||(e[4]=I=>o.copyToClipboard(t.appVars.urls.portal_base)),text:""},{default:w(()=>[_(m,null,{default:w(()=>[_(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:w(()=>[_(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:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",Pit,x(t.$t("Default Open Graph Image")),1),g("span",Iit,x(t.$t("This image will be used on social sharing preview. Recommended size: 1200 x 630 px")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[s.settings.featured_image?(v(),A("img",{key:0,alt:"",style:{"max-height":"100px"},class:"settings_img",src:s.settings.featured_image},null,8,Lit)):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:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",Oit,x(t.$t("Global Post Status")),1),g("span",Dit,x(t.$t("Enable/disable Post Status")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[_(y,{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:w(()=>[N(x(t.$t("Enable Global Posts Status Form")),1)]),_:1},8,["modelValue"]),g("div",Rit,[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:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",Vit,x(t.$t("Portal Access Settings")),1),g("span",Fit,x(t.$t("Who can access the portal.")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[_(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:w(()=>[_(b,{value:"public"},{default:w(()=>[N(x(t.$t("Everyone")),1)]),_:1}),_(b,{value:"logged_in"},{default:w(()=>[N(x(t.$t("Only Logged In Users")),1)]),_:1}),_(b,{value:"role_based"},{default:w(()=>[N(x(t.$t("Only Selected User Roles")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),o.isRoleBase?(v(),A(ee,{key:0},[_(u,{gutter:30,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",Nit,x(t.$t("User Roles")),1),g("span",Bit,x(t.$t("Select user roles who can access the portal.")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[_(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:w(()=>[(v(!0),A(ee,null,we(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",zit,x(t.$t("__ALL_ADMIN_ACCESS_DESC")),1)]),_:1})]),_:1})]),_:1}),_(u,{gutter:30,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",Hit,x(t.$t("Not Matched User Roles")),1),g("span",Uit,x(t.$t("Message to show for users without matching roles.")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[_(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:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",jit,x(t.$t("Redirect URL")),1),g("span",Wit,x(t.$t("Redirect URL for Public Users")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[_(l,{modelValue:s.settings.auth_url,"onUpdate:modelValue":e[11]||(e[11]=I=>s.settings.auth_url=I)},null,8,["modelValue"]),g("div",Yit,[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:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",qit,x(t.$t("Login / Registration URLs")),1),g("span",Git,x(t.$t("Find the default Login/Registration Urls")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[o.canManageAuthSettings?(v(),D(c,{key:0,label:t.$t("Login/Signup Form Type")},{default:w(()=>[_(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:w(()=>[_(h,{value:"default"},{default:w(()=>[N(x(t.$t("Use Default")),1)]),_:1}),_(h,{value:"custom"},{default:w(()=>[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:w(()=>[_(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:w(()=>[_(l,{disabled:"",value:o.loginUrl,placeholder:t.$t("Login URL for public Users")},{append:w(()=>[_(r,{onClick:e[14]||(e[14]=I=>o.copyToClipboard(o.loginUrl)),text:""},{default:w(()=>[_(m,null,{default:w(()=>[_(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:w(()=>[_(l,{disabled:"",value:o.signupUrl,placeholder:t.$t("Registration URL for public Users")},{append:w(()=>[_(r,{onClick:e[15]||(e[15]=I=>o.copyToClipboard(o.signupUrl)),text:""},{default:w(()=>[_(m,null,{default:w(()=>[_(p)]),_:1}),g("span",null,x(t.$t("Copy")),1)]),_:1})]),_:1},8,["value","placeholder"]),s.users_can_register?O("",!0):(v(),A(ee,{key:0},[g("div",Xit,[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,Kit)])]),e[21]||(e[21]=g("div",{style:{width:"100%"}},[g("hr")],-1)),o.canManageAuthSettings?(v(),D(y,{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:w(()=>[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(),A(ee,{key:2},[_(c,{class:"fcom_mt_20"},{default:w(()=>[_(y,{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:w(()=>[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:w(()=>[_(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:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",Zit,x(t.$t("Customize Login/Signup Form")),1),g("span",Jit,x(t.$t("Customize your login and registration form settings")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(r,{class:"fcom_secondary_button",onClick:o.openLoginCustomizeForm},{default:w(()=>[N(x(t.$t("Customize")),1)]),_:1},8,["onClick"])]),_:1})]),_:1})):O("",!0),_(u,{gutter:30},{default:w(()=>[_(r,{class:"fcom_primary_button",disabled:s.saving||s.loading,onClick:o.saveSettings},{default:w(()=>[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(),A("div",Qit,[(v(),D(ea,{to:"body"},[_(M,{onCompleted:e[20]||(e[20]=I=>s.showCustomLoginForm=!1)})]))])):O("",!0)]),_:1},8,["title"])]),_:1})}const tot=ue(vit,[["render",eot]]),not={name:"ContentDivider",props:{lineColor:{type:String,default:"var(--fcom-secondary-border, #e5e7eb)"},position:{type:String,default:"center",validator:t=>["center","left","right"].includes(t)}}},sot={class:"fcom_content_divider__content"};function iot(t,e,n,i,s,o){return v(),A("div",{class:q(["fcom_content_divider","fcom_content_divider--"+n.position])},[n.position!=="left"?(v(),A("span",{key:0,class:"fcom_content_divider__line",style:Xe({background:n.lineColor})},null,4)):O("",!0),g("div",sot,[le(t.$slots,"default")]),n.position!=="right"?(v(),A("span",{key:1,class:"fcom_content_divider__line",style:Xe({background:n.lineColor})},null,4)):O("",!0)],2)}const oot=ue(not,[["render",iot]]),rot={name:"MenuGroupSettings",components:{SpaceCourseSelector:CS,FluentDnD:za,LogoEmojiSelector:Z1,Drawer:tu,ActionPopover:oa},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)}},emits:["save"],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}},methods:{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.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.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()){if(!this.editingItem.slug)this.editingItem.slug="fcom_custom_"+this.editingItem.title.toLowerCase().replace(/[^a-z0-9]/g,"_"),this.menuItems.push(this.editingItem);else{const t=this.menuItems.findIndex(e=>e.slug===this.editingItem.slug);t!==-1?Object.assign(this.menuItems[t],this.editingItem):this.menuItems.push(this.editingItem)}this.openEditLinkDrawer=!1,this.editingItem=null,this.saveMenuItems()}},saveMenuItems({customSuccessMessage:t=null}={}){this.$emit("save",{customSuccessMessage:t})},drop({index:t}){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()}}},aot={key:0,class:"fcom_section_primary fcom_menu_group_settings"},lot={class:"fcom_section_primary_item"},cot={class:"fcom_section_primary_item_title"},uot={class:"fcom_heading_item"},dot={class:"fcom_section_item_actions"},hot={class:"fcom_section_items menu-items-container"},fot={key:0,style:{padding:"1rem"}},pot={class:"fcom_section_item_title"},mot={class:"fcom_heading_item"},got={key:0,class:"community_avatar"},vot=["src"],_ot={key:1,class:"fcom_emoji"},yot={key:2,class:"fcom_shape"},bot=["innerHTML"],wot={class:"fcom_section_item_actions"},kot={key:0},Cot={key:1},xot={key:0},Sot={class:"fcom_help_text"},$ot={class:"fcom_help_text"};function Aot(t,e,n,i,s,o){const r=He,a=be,l=hi,c=H("action-popover"),u=H("FluentDnD"),d=H("logo-emoji-selector"),h=ft,f=en,p=Yt,m=Li,y=ws,b=H("SpaceCourseSelector"),k=sa,C=tn,$=H("drawer");return v(),A(ee,null,[n.menuItems?(v(),A("div",aot,[g("div",lot,[g("div",cot,[g("div",uot,[le(t.$slots,"title",{},()=>[g("h4",null,x(n.title),1)])])]),g("div",dot,[_(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=S=>o.initEditLink({enabled:"yes",privacy:"public",membership_ids:[],new_tab:"yes"}))},{default:w(()=>[N(x(t.$t("Add New Link")),1)]),_:1})])]),g("div",hot,[n.menuItems.length?O("",!0):(v(),A("div",fot,[g("p",null,x(t.$t("No link has been added for this section")),1)])),_(u,{items:n.menuItems,"row-key":"slug",onDrop:o.drop,"item-class":"fcom_section_item"+(n.saving?"":" fcom_cursor_move"),"item-style":t.isMobile?"padding: 12px":"padding: 15px 15px 15px 35px"},{item:w(({data:S,index:M})=>[g("div",pot,[g("p",mot,[n.use_icon_selector?(v(),A(ee,{key:0},[e[12]||(e[12]=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)),S.icon_image?(v(),A("div",got,[_(a,null,{default:w(()=>[g("img",{alt:"",style:{"max-width":"16px","max-height":"16px"},src:S.icon_image},null,8,vot)]),_:2},1024)])):S.emoji?(v(),A("span",_ot,x(S.emoji),1)):S.shape_svg?(v(),A("span",yot,[_(a,{innerHTML:S.shape_svg},null,8,["innerHTML"])])):O("",!0)],64)):S.icon_svg?(v(),D(a,{key:1},{default:w(()=>[g("span",{innerHTML:S.icon_svg},null,8,bot)]),_:2},1024)):O("",!0),g("span",null,x(S.title),1),S.is_unavailable=="yes"?(v(),D(l,{key:2,type:"danger"},{default:w(()=>[N(x(t.$t("unavailable")),1)]),_:1})):S.enabled=="yes"?(v(),D(l,{key:3,type:"success"},{default:w(()=>[N(x(t.$t("enabled")),1)]),_:1})):(v(),D(l,{key:4,type:"info"},{default:w(()=>[N(x(t.$t("disabled")),1)]),_:1}))])]),g("div",wot,[_(c,{items:o.linkRowActions(S,M),placement:"bottom-end"},null,8,["items"])])]),_:1},8,["items","onDrop","item-class","item-style"])])])):O("",!0),_($,{modelValue:s.openEditLinkDrawer,"onUpdate:modelValue":e[11]||(e[11]=S=>s.openEditLinkDrawer=S),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:w(()=>[s.mode==="edit"?(v(),A("h4",kot,x(t.$t("Edit Link")),1)):(v(),A("h4",Cot,x(t.$t("Add Custom Link")),1))]),default:w(()=>[s.editingItem?(v(),A("div",xot,[_(C,{onSubmit:e[10]||(e[10]=Ee(S=>t.doNothing(),["prevent"])),"label-position":"top",disabled:n.saving},{default:w(()=>[_(f,{label:t.$t("Name of the Link")},{default:w(()=>[_(h,{disabled:n.saving,placeholder:t.$t("Public Name of the item"),modelValue:s.editingItem.title,"onUpdate:modelValue":e[2]||(e[2]=S=>s.editingItem.title=S)},hs({_:2},[n.use_icon_selector?{name:"prepend",fn:w(()=>[_(d,{custom_svg:n.custom_svg,fallback_mark:"<span style='font-size: 20px;'>☺</span>",onUpdate:e[1]||(e[1]=S=>{n.saving||(s.editingItem.emoji=S.emoji,s.editingItem.icon_image=S.logo,s.editingItem.shape_svg=S.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"]),_(f,{label:t.$t("URL")},{default:w(()=>[_(h,{disabled:n.saving||s.editingItem.is_system=="yes",type:"text",placeholder:t.$t("URL or path (e.g. https://example.com or /members)"),modelValue:s.editingItem.permalink,"onUpdate:modelValue":e[3]||(e[3]=S=>s.editingItem.permalink=S)},null,8,["disabled","placeholder","modelValue"]),g("div",Sot,[g("p",null,x(t.$t("For internal links, start with / (e.g. /members).")),1)])]),_:1},8,["label"]),n.has_svg?(v(),D(f,{key:0,label:t.$t("SVG Code for Icon (Simplified SVG Code) / Emoji")},{default:w(()=>[_(h,{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[4]||(e[4]=S=>s.editingItem.icon_svg=S)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["label"])):O("",!0),n.has_enable_disable?(v(),D(f,{key:1,style:{"margin-bottom":"5px"}},{default:w(()=>[_(p,{disabled:n.saving,"true-value":"yes","false-value":"no",modelValue:s.editingItem.enabled,"onUpdate:modelValue":e[5]||(e[5]=S=>s.editingItem.enabled=S),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Enable this link")),1)]),_:1},8,["disabled","modelValue"])]),_:1})):O("",!0),s.editingItem.is_system!="yes"?(v(),D(f,{key:2},{default:w(()=>[_(p,{disabled:n.saving,"true-value":"yes","false-value":"no",modelValue:s.editingItem.new_tab,"onUpdate:modelValue":e[6]||(e[6]=S=>s.editingItem.new_tab=S),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Open this link in a new tab.")),1)]),_:1},8,["disabled","modelValue"])]),_:1})):O("",!0),_(f,{label:t.$t("Visibility")},{default:w(()=>[_(y,{disabled:n.saving,modelValue:s.editingItem.privacy,"onUpdate:modelValue":e[7]||(e[7]=S=>s.editingItem.privacy=S)},{default:w(()=>[_(m,{label:t.$t("Everyone"),value:"public"},null,8,["label"]),_(m,{label:t.$t("Logged-in only"),value:"logged_in"},null,8,["label"]),_(m,{label:t.$t("Public only"),value:"logged_out_only"},null,8,["label"]),_(m,{label:t.$t("By Space/Course Memberships"),value:"members_only"},null,8,["label"])]),_:1},8,["disabled","modelValue"]),g("div",$ot,x(t.$t("Select who can see this link.")),1)]),_:1},8,["label"]),s.editingItem.privacy=="members_only"?(v(),D(f,{key:3,label:t.$t("Select Space/Course Memberships")},{default:w(()=>[_(b,{disabled:n.saving,modelValue:s.editingItem.membership_ids,"onUpdate:modelValue":e[8]||(e[8]=S=>s.editingItem.membership_ids=S),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(k,{key:s.validationAttempt,type:"warning",closable:!0,"show-icon":"",style:{margin:"8px 0"}},{title:w(()=>[g("div",null,[g("ul",null,[(v(!0),A(ee,null,we(s.urlErrors,(S,M)=>(v(),A("li",{style:{"margin-bottom":"0"},key:M},x(S),1))),128))])])]),_:1})):O("",!0),_(f,null,{default:w(()=>[_(r,{disabled:n.saving,class:"fcom_primary_button",onClick:e[9]||(e[9]=S=>o.createOrUpdateLink())},{default:w(()=>[N(x(n.saving?t.$t("Saving..."):t.$t("Save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1},8,["disabled"])])):O("",!0)]),_:1},8,["modelValue","size","before-close","has-close-confirmation","close-confirmation-message"])],64)}const mU=ue(rot,[["render",Aot]]),Eot={name:"MenuSettings",components:{MenuGroupSettings:mU,Layout:_i,AppLayout:yi,ContentDivider:oot,ActionPopover:oa},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()}},Mot={class:"settings_router"},Tot={key:0},Pot={class:"fcom_card_sections"},Iot={class:"fcom_card_sections"},Lot={class:"fcom_card_sections"},Oot={key:0,style:{display:"flex","align-items":"center",gap:"8px"}},Dot={key:1,style:{display:"flex","align-items":"center",gap:"8px"}},Rot={style:{margin:"0"}},Vot={style:{"margin-top":"20px","text-align":"center"}},Fot={key:1,class:"fcom_card_sections",style:{padding:"30px","text-align":"center"}},Not={style:{margin:"0 0 15px",color:"var(--fcom-secondary-text, #6b7280)"}},Bot={key:1,class:"white_loaded"};function zot(t,e,n,i,s,o){const r=He,a=H("menu-group-settings"),l=H("content-divider"),c=ft,u=H("action-popover"),d=Nt,h=H("layout"),f=H("app-layout");return v(),D(f,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(h,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Menu Settings")},{actions:w(()=>[_(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:w(()=>[g("span",null,x(t.$t("Save Settings")),1)]),_:1},8,["disabled"])]),default:w(()=>[g("div",Mot,[s.menuSettings?(v(),A("div",Tot,[g("div",Pot,[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",Iot,[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",Lot,[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(),A(ee,{key:0},[_(l,null,{default:w(()=>[N(x(t.$t("Sidebar Bottom Link Groups")),1)]),_:1}),s.menuSettings.afterCommunityLinkGroups.length?(v(),A(ee,{key:0},[(v(!0),A(ee,null,we(s.menuSettings.afterCommunityLinkGroups,(p,m)=>(v(),A("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:w(()=>[s.editingGroupSlug===p.slug?(v(),A("div",Oot,[_(c,{modelValue:s.editingGroupTitle,"onUpdate:modelValue":e[1]||(e[1]=y=>s.editingGroupTitle=y),disabled:s.saving,placeholder:t.$t("Group Title"),size:"default",onKeyup:ut(y=>o.saveGroupTitle(m),["enter"])},null,8,["modelValue","disabled","placeholder","onKeyup"]),_(r,{class:"fcom_primary_button",disabled:s.saving,onClick:y=>o.saveGroupTitle(m),style:{"padding-top":"18px","padding-bottom":"18px"}},{default:w(()=>[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:w(()=>[N(x(t.$t("Cancel")),1)]),_:1},8,["disabled","onClick"])])):(v(),A("div",Dot,[g("h4",Rot,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",Vot,[_(r,{disabled:s.saving,onClick:e[2]||(e[2]=p=>o.addFooterGroup()),class:"fcom_secondary_button"},{default:w(()=>[N(x(t.$t("Add Another Group")),1)]),_:1},8,["disabled"])])],64)):(v(),A("div",Fot,[g("p",Not,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:w(()=>[N(x(t.$t("Add Group")),1)]),_:1},8,["disabled"])]))],64)):O("",!0)])):(v(),A("div",Bot,[_(d,{animated:!0,rows:10})]))])]),_:1},8,["title"])]),_:1})}const Hot=ue(Eot,[["render",zot]]),Uot={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()}},jot={style:{float:"left"}},Wot={style:{float:"right",color:"#8492a6","font-size":"13px"}},Yot={key:1},qot={class:"dialog_footer"},Got={key:0},Xot={key:1};function Kot(t,e,n,i,s,o){const r=sn,a=Jt,l=en,c=sa,u=Yt,d=s2,h=He,f=tn,p=xt("loading");return v(),D(f,{onSubmit:e[3]||(e[3]=Ee(m=>t.doNothing(),["prevent"])),"label-position":"top",modelValue:s.form,"onUpdate:modelValue":e[4]||(e[4]=m=>s.form=m),size:"large"},{default:w(()=>[s.form.editing_user?(v(),A("p",Yot,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:w(()=>[_(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:w(()=>[(v(!0),A(ee,null,we(s.users,m=>(v(),D(r,{key:m.ID,label:m.display_name+" ("+m.user_email+")",value:m.ID},{default:w(()=>[g("span",jot,x(m.display_name),1),g("span",Wot,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:w(()=>[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:w(()=>[_(d,{modelValue:s.form.roles,"onUpdate:modelValue":e[1]||(e[1]=m=>s.form.roles=m)},{default:w(()=>[_(u,{value:"admin",class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Community Admin (All Access)")),1)]),_:1}),_(u,{disabled:s.form.roles.includes("admin"),value:"moderator",class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Space Moderator")),1)]),_:1},8,["disabled"]),_(u,{disabled:s.form.roles.includes("admin"),value:"course_admin",class:"fcom_checkbox"},{default:w(()=>[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:w(()=>[N(x(t.$t("Course Creator")),1)]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),g("div",qot,[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:w(()=>[s.form.editing_user?(v(),A("span",Got,x(t.$t("Update Role")),1)):(v(),A("span",Xot,x(t.$t("Add Manager")),1))]),_:1},8,["disabled"])),[[p,s.adding]])])])]),_:3},8,["modelValue"])}const Zot=ue(Uot,[["render",Kot]]),Jot={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"}}},Qot=["src"],ert={key:1,class:"fcom_no_image"},trt=["aria-label"];function nrt(t,e,n,i,s,o){return v(),A("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(),A("img",{key:0,onError:e[0]||(e[0]=(...r)=>o.setAltImg&&o.setAltImg(...r)),src:n.xprofile.avatar,alt:""},null,40,Qot)):(v(),A("span",ert))],6),o.level||n.is_online?(v(),A("div",{key:0,role:"region","aria-label":t.$t("User Level"),class:"fcom_user_level_mark"},[g("span",null,x(o.level),1)],8,trt)):O("",!0)],2)}const j2=ue(Jot,[["render",nrt]]),srt={name:"ModeratorSettings",components:{UserAvatar:j2,UserRouteLink:la,ManagerForm:Zot,Layout:_i,AppLayout:yi},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"))}},irt=["href"],ort={class:"settings_router manager_section"},rrt={class:"fhr_content_layout_body"},art={key:0,class:"setting_body"},lrt={class:"fcom_manager_actions"},crt={class:"bulk_search"},urt={class:"fcom_manager_table"},drt={class:"user_col"},hrt={class:"user_info"},frt={style:{display:"flex"}},prt={class:"user_id"},mrt={class:"user_email"},grt={class:"fcom_table_action_col"},vrt={key:1,class:"setting_body",style:{"text-align":"center"}},_rt={class:"promo_description"},yrt=["href"],brt={class:"dialog_header"},wrt={class:"dialog_left"},krt={class:"dialog_body"};function Crt(t,e,n,i,s,o){const r=H("Plus"),a=be,l=He,c=ft,u=o8,d=H("user-route-link"),h=Il,f=Pl,p=H("layout"),m=H("app-layout"),y=H("manager-form"),b=$s,k=xt("loading");return v(),A(ee,null,[_(m,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(p,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Community Managers")},{actions:w(()=>[t.has_pro?(v(),D(l,{key:0,class:"fcom_primary_button",onClick:e[0]||(e[0]=C=>o.showForm(null))},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),g("span",null,x(t.$t("Add Manager")),1)]),_:1})):(v(),A("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,irt))]),default:w(()=>[g("div",ort,[g("div",rrt,[t.has_pro?(v(),A("div",art,[g("div",lrt,[g("div",crt,[_(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:w(()=>[...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",urt,[Re((v(),D(f,{data:s.managers,"empty-text":t.$t("No Managers Found")},{default:w(()=>[_(h,{label:t.$t("Members"),sortable:"","min-width":"160"},{default:w(C=>[g("div",drt,[_(u,{src:C.row.xprofile.avatar},null,8,["src"]),g("div",hrt,[g("div",frt,[_(d,{xprofile:C.row.xprofile},null,8,["xprofile"]),g("span",prt,"#"+x(C.row.ID),1)]),g("span",mrt,x(C.row.user_email),1)])])]),_:1},8,["label"]),_(h,{label:t.$t("Role"),sortable:""},{default:w(C=>[g("span",null,x(o.formatRoles(C.row.community_role.value)),1)]),_:1},8,["label"]),_(h,null,{default:w(C=>[g("div",grt,[_(l,{onClick:$=>o.showForm(C.row),size:"small"},{default:w(()=>[N(x(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(l,{onClick:$=>o.removeManager(C.row),type:"danger",plain:"",size:"small"},{default:w(()=>[N(x(t.$t("Remove")),1)]),_:1},8,["onClick"])])]),_:1})]),_:1},8,["data","empty-text"])),[[k,s.loading]])])])):(v(),A("div",vrt,[g("p",_rt,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,yrt)]))])])]),_: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:w(({close:C})=>[g("div",brt,[g("div",wrt,[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:w(()=>[g("div",krt,[s.showModal?(v(),D(y,{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 xrt=ue(srt,[["render",Crt]]),Srt={name:"NestedReplyBox",mixins:[H2],components:{SingleComment:U2,FeedTextComposer:pv,CommentReactions:aU,HeartIcon:B2},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"),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)}}},$rt={key:0,class:"reply_box"},Art=["aria-expanded"],Ert={class:"fcom_comments_react fcom_reaction_list"},Mrt={class:"child_comments"},Trt=["id"],Prt={key:0,class:"reply_box"},Irt=["onClick","aria-expanded"],Lrt={class:"fcom_comments_react fcom_reaction_list"},Ort={key:0,class:"child_reply_wrap"},Drt={class:"feed_commenting"},Rrt={class:"person_avatar"},Vrt=["alt","src"];function Frt(t,e,n,i,s,o){var h;const r=H("HeartIcon"),a=be,l=H("CommentReactions"),c=H("single-comment"),u=He,d=H("feed-text-composer");return v(),A(ee,null,[o.canComment?(v(),A("div",$rt,[((h=n.feed.meta)==null?void 0:h.comments_disabled)!=="yes"?(v(),A("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,Art)):O("",!0),g("span",{class:q([{fcom_is_liked:n.comment.liked},"reply_btn"])},[g("div",Ert,[_(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(Ee(f=>o.toggleLike(n.comment),["prevent"]),["enter"])),e[3]||(e[3]=ut(Ee(f=>o.toggleLike(n.comment),["prevent"]),["space"]))]},{default:w(()=>[_(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(),A(ee,{key:1},[g("div",Mrt,[(v(!0),A(ee,null,we(n.comment.comments,(f,p)=>(v(),A("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:w(()=>{var m;return[o.canComment?(v(),A("div",Prt,[((m=n.feed.meta)==null?void 0:m.comments_disabled)!=="yes"?(v(),A("button",{key:0,type:"button",onClick:y=>o.toggleCommentBox(f),class:"reply_btn","aria-expanded":s.composerOpen&&s.replyingToId===f.id},x(t.$t("Reply")),9,Irt)):O("",!0),g("span",{class:q([{fcom_is_liked:f.liked},"reply_btn"])},[g("div",Lrt,[_(a,{role:"button",tabindex:"0","aria-label":t.$t("React"),"aria-pressed":!!f.liked,class:q({user_reacted:f.liked}),onClick:y=>o.toggleLike(f),onKeydown:[ut(Ee(y=>o.toggleLike(f),["prevent"]),["enter"]),ut(Ee(y=>o.toggleLike(f),["prevent"]),["space"])]},{default:w(()=>[_(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,Trt))),256))]),s.composerOpen?(v(),A("div",Ort,[g("div",Drt,[g("div",Rrt,[g("img",{alt:t.$t("Your Photo"),src:t.auth.avatar},null,8,Vrt)]),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:w(()=>[_(u,{loading:s.submitting,disabled:s.submitting,onClick:e[4]||(e[4]=f=>o.addComment()),class:"fcom_primary_button"},{default:w(()=>[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 Nrt=ue(Srt,[["render",Frt]]),Brt={name:"FeedComments",components:{SingleComment:U2,NestedReplyBox:Nrt},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()}},zrt={key:0,class:"feed_comments"},Hrt=["id"],Urt={key:1,class:"feed_comments"},jrt=["id"],Wrt=["onClick","aria-expanded"];function Yrt(t,e,n,i,s,o){const r=Nt,a=H("nested-reply-box"),l=H("single-comment");return n.show_all?(v(),A("div",zrt,[s.loading?(v(),D(r,{key:0,row:5,class:"feed_comments_skeleton"})):(v(),A(ee,{key:1},[le(t.$slots,"before_comments_start"),(v(!0),A(ee,null,we(o.displayComments,(c,u)=>(v(),A("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:w(()=>[_(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,Hrt))),128))],64))])):o.lastComment?(v(),A("div",Urt,[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:w(()=>[_(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:w(({toggleOpen:c,open:u})=>[o.lastComment.comments&&o.lastComment.comments.length?(v(),A("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,Wrt)):O("",!0)]),_:1},8,["defaultMentions","onCopyLink","checkPermission","feed","comment","is_modal"])]),key:"0"}]),1032,["comment","space_id","onCopyLink"])],8,jrt),n.feed.comments_count>1?(v(),A("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 qrt=ue(Brt,[["render",Yrt]]),Grt={name:"ReactedUsers",components:{UserRouteLink:la},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}))}}},Xrt=["title"],Krt={key:0,class:"reactions_avatars"},Zrt=["alt","src"],Jrt={key:0},Qrt={key:1},eat={class:"fcom_user_lists"},tat={key:2};function nat(t,e,n,i,s,o){const r=Nt,a=H("UserAvatar"),l=H("UserRouteLink"),c=qs,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:w(()=>[g("div",{title:t.$t("Click to view"),class:"fcom_reactions"},[o.reactedProfiles&&o.reactedProfiles.length?(v(),A("div",Krt,[(v(!0),A(ee,null,we(o.reactedProfiles,d=>(v(),A("span",{key:d.id,class:"fcom_reaction_avatar fcom_avatar_is_rounded fcom_user_avatar"},[d!=null&&d.avatar?(v(),A("img",{key:0,alt:t.$t("Reacted Users"),src:d.avatar},null,8,Zrt)):O("",!0)]))),128))])):O("",!0),g("span",null,x(t.$_n("%s like","%s likes",n.feed.reactions_count)),1)],8,Xrt)]),default:w(()=>[s.loading?(v(),A("div",Jrt,[_(r,{animated:!0,rows:3})])):s.reactions?(v(),A("div",Qrt,[_(c,{"max-height":"300px"},{default:w(()=>[g("ul",eat,[(v(!0),A(ee,null,we(s.reactions,d=>(v(),A("li",null,[d.xprofile?(v(),A(ee,{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(),A("div",tat,[g("p",null,x(t.$t("Failed to load the list")),1)]))]),_:1},8,["title","onShow"])}const sat=ue(Grt,[["render",nat]]);function iat(){this.__data__=[],this.size=0}var oat=iat;function rat(t,e){return t===e||t!==t&&e!==e}var gU=rat,aat=gU;function lat(t,e){for(var n=t.length;n--;)if(aat(t[n][0],e))return n;return-1}var W2=lat,cat=W2,uat=Array.prototype,dat=uat.splice;function hat(t){var e=this.__data__,n=cat(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():dat.call(e,n,1),--this.size,!0}var fat=hat,pat=W2;function mat(t){var e=this.__data__,n=pat(e,t);return n<0?void 0:e[n][1]}var gat=mat,vat=W2;function _at(t){return vat(this.__data__,t)>-1}var yat=_at,bat=W2;function wat(t,e){var n=this.__data__,i=bat(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}var kat=wat,Cat=oat,xat=fat,Sat=gat,$at=yat,Aat=kat;function Ep(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])}}Ep.prototype.clear=Cat;Ep.prototype.delete=xat;Ep.prototype.get=Sat;Ep.prototype.has=$at;Ep.prototype.set=Aat;var Y2=Ep,Eat=Y2;function Mat(){this.__data__=new Eat,this.size=0}var Tat=Mat;function Pat(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var Iat=Pat;function Lat(t){return this.__data__.get(t)}var Oat=Lat;function Dat(t){return this.__data__.has(t)}var Rat=Dat,Vat=Sp,Fat=Vat(Object,"create"),q2=Fat,mT=q2;function Nat(){this.__data__=mT?mT(null):{},this.size=0}var Bat=Nat;function zat(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Hat=zat,Uat=q2,jat="__lodash_hash_undefined__",Wat=Object.prototype,Yat=Wat.hasOwnProperty;function qat(t){var e=this.__data__;if(Uat){var n=e[t];return n===jat?void 0:n}return Yat.call(e,t)?e[t]:void 0}var Gat=qat,Xat=q2,Kat=Object.prototype,Zat=Kat.hasOwnProperty;function Jat(t){var e=this.__data__;return Xat?e[t]!==void 0:Zat.call(e,t)}var Qat=Jat,elt=q2,tlt="__lodash_hash_undefined__";function nlt(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=elt&&e===void 0?tlt:e,this}var slt=nlt,ilt=Bat,olt=Hat,rlt=Gat,alt=Qat,llt=slt;function Mp(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])}}Mp.prototype.clear=ilt;Mp.prototype.delete=olt;Mp.prototype.get=rlt;Mp.prototype.has=alt;Mp.prototype.set=llt;var clt=Mp,gT=clt,ult=Y2,dlt=SS;function hlt(){this.size=0,this.__data__={hash:new gT,map:new(dlt||ult),string:new gT}}var flt=hlt;function plt(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var mlt=plt,glt=mlt;function vlt(t,e){var n=t.__data__;return glt(e)?n[typeof e=="string"?"string":"hash"]:n.map}var G2=vlt,_lt=G2;function ylt(t){var e=_lt(this,t).delete(t);return this.size-=e?1:0,e}var blt=ylt,wlt=G2;function klt(t){return wlt(this,t).get(t)}var Clt=klt,xlt=G2;function Slt(t){return xlt(this,t).has(t)}var $lt=Slt,Alt=G2;function Elt(t,e){var n=Alt(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}var Mlt=Elt,Tlt=flt,Plt=blt,Ilt=Clt,Llt=$lt,Olt=Mlt;function Tp(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])}}Tp.prototype.clear=Tlt;Tp.prototype.delete=Plt;Tp.prototype.get=Ilt;Tp.prototype.has=Llt;Tp.prototype.set=Olt;var MS=Tp,Dlt=Y2,Rlt=SS,Vlt=MS,Flt=200;function Nlt(t,e){var n=this.__data__;if(n instanceof Dlt){var i=n.__data__;if(!Rlt||i.length<Flt-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new Vlt(i)}return n.set(t,e),this.size=n.size,this}var Blt=Nlt,zlt=Y2,Hlt=Tat,Ult=Iat,jlt=Oat,Wlt=Rat,Ylt=Blt;function Pp(t){var e=this.__data__=new zlt(t);this.size=e.size}Pp.prototype.clear=Hlt;Pp.prototype.delete=Ult;Pp.prototype.get=jlt;Pp.prototype.has=Wlt;Pp.prototype.set=Ylt;var vU=Pp,qlt="__lodash_hash_undefined__";function Glt(t){return this.__data__.set(t,qlt),this}var Xlt=Glt;function Klt(t){return this.__data__.has(t)}var Zlt=Klt,Jlt=MS,Qlt=Xlt,ect=Zlt;function Ky(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Jlt;++e<n;)this.add(t[e])}Ky.prototype.add=Ky.prototype.push=Qlt;Ky.prototype.has=ect;var _U=Ky;function tct(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 nct=tct;function sct(t,e){return t.has(e)}var yU=sct,ict=_U,oct=nct,rct=yU,act=1,lct=2;function cct(t,e,n,i,s,o){var r=n&act,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&lct?new ict:void 0;for(o.set(t,e),o.set(e,t);++d<a;){var p=t[d],m=e[d];if(i)var y=r?i(m,p,d,e,t,o):i(p,m,d,t,e,o);if(y!==void 0){if(y)continue;h=!1;break}if(f){if(!oct(e,function(b,k){if(!rct(f,k)&&(p===b||s(p,b,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 bU=cct,uct=Fa,dct=uct.Uint8Array,hct=dct;function fct(t){var e=-1,n=Array(t.size);return t.forEach(function(i,s){n[++e]=[s,i]}),n}var pct=fct;function mct(t){var e=-1,n=Array(t.size);return t.forEach(function(i){n[++e]=i}),n}var TS=mct,vT=h2,_T=hct,gct=gU,vct=bU,_ct=pct,yct=TS,bct=1,wct=2,kct="[object Boolean]",Cct="[object Date]",xct="[object Error]",Sct="[object Map]",$ct="[object Number]",Act="[object RegExp]",Ect="[object Set]",Mct="[object String]",Tct="[object Symbol]",Pct="[object ArrayBuffer]",Ict="[object DataView]",yT=vT?vT.prototype:void 0,N3=yT?yT.valueOf:void 0;function Lct(t,e,n,i,s,o,r){switch(n){case Ict:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Pct:return!(t.byteLength!=e.byteLength||!o(new _T(t),new _T(e)));case kct:case Cct:case $ct:return gct(+t,+e);case xct:return t.name==e.name&&t.message==e.message;case Act:case Mct:return t==e+"";case Sct:var a=_ct;case Ect:var l=i&bct;if(a||(a=yct),t.size!=e.size&&!l)return!1;var c=r.get(t);if(c)return c==e;i|=wct,r.set(t,e);var u=vct(a(t),a(e),i,s,o,r);return r.delete(t),u;case Tct:if(N3)return N3.call(t)==N3.call(e)}return!1}var Oct=Lct;function Dct(t,e){for(var n=-1,i=e.length,s=t.length;++n<i;)t[s+n]=e[n];return t}var Rct=Dct,Vct=Rct,Fct=Na;function Nct(t,e,n){var i=e(t);return Fct(t)?i:Vct(i,n(t))}var Bct=Nct;function zct(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 Hct=zct;function Uct(){return[]}var jct=Uct,Wct=Hct,Yct=jct,qct=Object.prototype,Gct=qct.propertyIsEnumerable,bT=Object.getOwnPropertySymbols,Xct=bT?function(t){return t==null?[]:(t=Object(t),Wct(bT(t),function(e){return Gct.call(t,e)}))}:Yct,Kct=Xct,Zct=Bct,Jct=Kct,Qct=D8;function eut(t){return Zct(t,Qct,Jct)}var tut=eut,wT=tut,nut=1,sut=Object.prototype,iut=sut.hasOwnProperty;function out(t,e,n,i,s,o){var r=n&nut,a=wT(t),l=a.length,c=wT(e),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in e:iut.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 y=r;++d<l;){h=a[d];var b=t[h],k=e[h];if(i)var C=r?i(k,b,h,e,t,o):i(b,k,h,t,e,o);if(!(C===void 0?b===k||s(b,k,n,i,o):C)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var $=t.constructor,S=e.constructor;$!=S&&"constructor"in t&&"constructor"in e&&!(typeof $=="function"&&$ instanceof $&&typeof S=="function"&&S instanceof S)&&(m=!1)}return o.delete(t),o.delete(e),m}var rut=out,B3=vU,aut=bU,lut=Oct,cut=rut,kT=ZH,CT=Na,xT=P8,uut=L8,dut=1,ST="[object Arguments]",$T="[object Array]",m0="[object Object]",hut=Object.prototype,AT=hut.hasOwnProperty;function fut(t,e,n,i,s,o){var r=CT(t),a=CT(e),l=r?$T:kT(t),c=a?$T:kT(e);l=l==ST?m0:l,c=c==ST?m0:c;var u=l==m0,d=c==m0,h=l==c;if(h&&xT(t)){if(!xT(e))return!1;r=!0,u=!1}if(h&&!u)return o||(o=new B3),r||uut(t)?aut(t,e,n,i,s,o):lut(t,e,l,n,i,s,o);if(!(n&dut)){var f=u&&AT.call(t,"__wrapped__"),p=d&&AT.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,y=p?e.value():e;return o||(o=new B3),s(m,y,n,i,o)}}return h?(o||(o=new B3),cut(t,e,n,i,s,o)):!1}var put=fut,mut=put,ET=X1;function wU(t,e,n,i,s){return t===e?!0:t==null||e==null||!ET(t)&&!ET(e)?t!==t&&e!==e:mut(t,e,n,i,wU,s)}var kU=wU,gut=vU,vut=kU,_ut=1,yut=2;function but(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 gut;if(i)var h=i(c,u,l,t,e,d);if(!(h===void 0?vut(u,c,_ut|yut,i,d):h))return!1}}return!0}var wut=but,kut=K1;function Cut(t){return t===t&&!kut(t)}var CU=Cut,xut=CU,Sut=D8;function $ut(t){for(var e=Sut(t),n=e.length;n--;){var i=e[n],s=t[i];e[n]=[i,s,xut(s)]}return e}var Aut=$ut;function Eut(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var xU=Eut,Mut=wut,Tut=Aut,Put=xU;function Iut(t){var e=Tut(t);return e.length==1&&e[0][2]?Put(e[0][0],e[0][1]):function(n){return n===t||Mut(n,t,e)}}var Lut=Iut,Out=Na,Dut=z2,Rut=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vut=/^\w*$/;function Fut(t,e){if(Out(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Dut(t)?!0:Vut.test(t)||!Rut.test(t)||e!=null&&t in Object(e)}var PS=Fut,SU=MS,Nut="Expected a function";function IS(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Nut);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(IS.Cache||SU),n}IS.Cache=SU;var But=IS,zut=But,Hut=500;function Uut(t){var e=zut(t,function(i){return n.size===Hut&&n.clear(),i}),n=e.cache;return e}var jut=Uut,Wut=jut,Yut=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qut=/\\(\\)?/g,Gut=Wut(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Yut,function(n,i,s,o){e.push(s?o.replace(qut,"$1"):i||n)}),e}),Xut=Gut;function Kut(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 Zut=Kut,MT=h2,Jut=Zut,Qut=Na,edt=z2,tdt=1/0,TT=MT?MT.prototype:void 0,PT=TT?TT.toString:void 0;function $U(t){if(typeof t=="string")return t;if(Qut(t))return Jut(t,$U)+"";if(edt(t))return PT?PT.call(t):"";var e=t+"";return e=="0"&&1/t==-tdt?"-0":e}var ndt=$U,sdt=ndt;function idt(t){return t==null?"":sdt(t)}var odt=idt,rdt=Na,adt=PS,ldt=Xut,cdt=odt;function udt(t,e){return rdt(t)?t:adt(t,e)?[t]:ldt(cdt(t))}var AU=udt,ddt=z2,hdt=1/0;function fdt(t){if(typeof t=="string"||ddt(t))return t;var e=t+"";return e=="0"&&1/t==-hdt?"-0":e}var X2=fdt,pdt=AU,mdt=X2;function gdt(t,e){e=pdt(e,t);for(var n=0,i=e.length;t!=null&&n<i;)t=t[mdt(e[n++])];return n&&n==i?t:void 0}var EU=gdt,vdt=EU;function _dt(t,e,n){var i=t==null?void 0:vdt(t,e);return i===void 0?n:i}var ydt=_dt;function bdt(t,e){return t!=null&&e in Object(t)}var wdt=bdt,kdt=AU,Cdt=T8,xdt=Na,Sdt=TF,$dt=I8,Adt=X2;function Edt(t,e,n){e=kdt(e,t);for(var i=-1,s=e.length,o=!1;++i<s;){var r=Adt(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&&$dt(s)&&Sdt(r,s)&&(xdt(t)||Cdt(t)))}var Mdt=Edt,Tdt=wdt,Pdt=Mdt;function Idt(t,e){return t!=null&&Pdt(t,e,Tdt)}var Ldt=Idt,Odt=kU,Ddt=ydt,Rdt=Ldt,Vdt=PS,Fdt=CU,Ndt=xU,Bdt=X2,zdt=1,Hdt=2;function Udt(t,e){return Vdt(t)&&Fdt(e)?Ndt(Bdt(t),e):function(n){var i=Ddt(n,t);return i===void 0&&i===e?Rdt(n,t):Odt(e,i,zdt|Hdt)}}var jdt=Udt;function Wdt(t){return function(e){return e==null?void 0:e[t]}}var Ydt=Wdt,qdt=EU;function Gdt(t){return function(e){return qdt(e,t)}}var Xdt=Gdt,Kdt=Ydt,Zdt=Xdt,Jdt=PS,Qdt=X2;function eht(t){return Jdt(t)?Kdt(Qdt(t)):Zdt(t)}var tht=eht,nht=Lut,sht=jdt,iht=OF,oht=Na,rht=tht;function aht(t){return typeof t=="function"?t:t==null?iht:typeof t=="object"?oht(t)?sht(t[0],t[1]):nht(t):rht(t)}var lht=aht;function cht(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 uht=cht;function dht(t){return t!==t}var hht=dht;function fht(t,e,n){for(var i=n-1,s=t.length;++i<s;)if(t[i]===e)return i;return-1}var pht=fht,mht=uht,ght=hht,vht=pht;function _ht(t,e,n){return e===e?vht(t,e,n):mht(t,ght,n)}var yht=_ht,bht=yht;function wht(t,e){var n=t==null?0:t.length;return!!n&&bht(t,e,0)>-1}var kht=wht;function Cht(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 xht=Cht;function Sht(){}var $ht=Sht,z3=XH,Aht=$ht,Eht=TS,Mht=1/0,Tht=z3&&1/Eht(new z3([,-0]))[1]==Mht?function(t){return new z3(t)}:Aht,Pht=Tht,Iht=_U,Lht=kht,Oht=xht,Dht=yU,Rht=Pht,Vht=TS,Fht=200;function Nht(t,e,n){var i=-1,s=Lht,o=t.length,r=!0,a=[],l=a;if(n)r=!1,s=Oht;else if(o>=Fht){var c=e?null:Rht(t);if(c)return Vht(c);r=!1,s=Dht,l=new Iht}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 Bht=Nht,zht=lht,Hht=Bht;function Uht(t,e){return t&&t.length?Hht(t,zht(e)):[]}var jht=Uht;const Wht=vi(jht),Yht={name:"FeedFooter",mixins:[H2],components:{ReactedUsers:sat,FeedComments:qrt,FeedTextComposer:pv,ChatIcon:nU,HeartIcon:B2},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),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=Wht(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)}},qht={ref:"feed_footer",class:"feed_footer"},Ght={class:"fcom_feed_footer_actions"},Xht=["aria-label","aria-pressed"],Kht={class:"fcom_sr_only"},Zht={class:"fcom_sr_only"},Jht={class:"fcom_feed_footer_meta"},Qht={key:0},eft={key:0,class:"fcom_reactions_count feed_reaction_meta"},tft={class:"feed_comment_count"},nft={key:2,class:"feed_reaction_meta"},sft={key:0,ref:"fcom_comment_sorting",class:"fcom_comment_sorting"},ift=["id"],oft={key:0,style:{padding:"0",margin:"0","text-align":"center"}},rft={key:1,class:"feed_commenting"},aft={class:"person_avatar"},lft=["src"],cft={key:2,class:""},uft={style:{padding:"0",margin:"0","text-align":"center"}},dft={key:0,style:{margin:"10px 0"}},hft=["href"];function fft(t,e,n,i,s,o){var m,y,b,k;const r=H("HeartIcon"),a=be,l=H("ChatIcon"),c=H("ReactedUsers"),u=sn,d=Jt,h=H("feed-comments"),f=He,p=H("feed-text-composer");return v(),A(ee,null,[g("div",qht,[g("div",Ght,[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(Ee(C=>o.toggleReact(),["prevent"]),["enter"])),e[2]||(e[2]=ut(Ee(C=>o.toggleReact(),["prevent"]),["space"]))]},[_(a,{class:q({user_reacted:n.feed.has_user_react})},{default:w(()=>[_(r,{filled:n.feed.has_user_react},null,8,["filled"])]),_:1},8,["class"]),g("span",null,[g("span",Kht,x(t.$t("React")),1)])],42,Xht),((m=n.feed.meta)==null?void 0:m.comments_disabled)!=="yes"?(v(),A("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(Ee(C=>o.showCommentForm(),["prevent"]),["enter"])),e[5]||(e[5]=ut(Ee(C=>o.showCommentForm(),["prevent"]),["space"]))]},[_(a,null,{default:w(()=>[_(l)]),_:1}),g("span",null,[g("span",Zht,x(t.$t("Comment")),1)])],32)):O("",!0)])]),g("div",Jht,[n.feed.reactions_count||n.feed.comments_count||((y=n.feed.meta)==null?void 0:y.comments_disabled)==="yes"?(v(),A("ul",Qht,[n.feed.reactions_count?(v(),A("li",eft,[_(c,{feed:n.feed},null,8,["feed"])])):O("",!0),n.feed.comments_count>0?(v(),A("li",{key:1,onClick:e[6]||(e[6]=(...C)=>o.maybeShowFeedModal&&o.maybeShowFeedModal(...C)),class:"feed_reaction_meta"},[g("div",tft,x(t.$_n("%d comment","%d comments",n.feed.comments_count)),1)])):((b=n.feed.meta)==null?void 0:b.comments_disabled)==="yes"?(v(),A("li",nft,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:w(()=>[n.feed.comments_count>=2?(v(),A("div",sft,[_(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:w(()=>[_(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(),A("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(),A(ee,{key:0},[n.feed.comments_count?(v(),A("p",oft,x(t.$t("Comments are disabled for this post.")),1)):O("",!0)],64)):t.hasCommentPermission(n.feed)?(v(),A("div",rft,[g("div",aft,[g("img",{alt:"",src:t.auth.photo},null,8,lft)]),s.showCommentBox?(v(),A("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:w(()=>[_(f,{loading:s.saving,disabled:s.saving,class:"fcom_primary_button",onClick:e[9]||(e[9]=C=>o.postComment())},{default:w(()=>[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(),A("div",cft,[g("p",uft,[N(x(t.$t("Please join the Space to post a comment."))+" ",1),t.appVars.auth.user_id?(v(),A("div",dft,[_(f,{class:"fcom_primary_button",onClick:e[11]||(e[11]=()=>{t.$emit("joinSpace")})},{default:w(()=>[N(x(t.$t("Join Space")),1)]),_:1})])):(v(),A("a",{key:1,href:t.getCurrentAuthUrl()},x(t.appVars.allow_signup?t.$t("Login / Signup"):t.$t("Login")),9,hft))])]))],8,ift)):O("",!0)],64)}const pft=ue(Yht,[["render",fft]]),mft={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)}}},gft=["value","maxlength","placeholder"];function vft(t,e,n,i,s,o){return v(),A("textarea",{value:n.modelValue,onInput:e[0]||(e[0]=(...r)=>o.onInput&&o.onInput(...r)),onKeydown:e[1]||(e[1]=ut(Ee(r=>t.$emit("enter"),["prevent"]),["enter"])),ref:"textarea",maxlength:n.maxlength,class:"fcom_status_title_input",rows:"1",placeholder:n.placeholder},null,40,gft)}const _ft=ue(mft,[["render",vft]]),yft={name:"EyeIcon"},bft={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function wft(t,e,n,i,s,o){return v(),A("svg",bft,[...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 kft=ue(yft,[["render",wft]]),Cft={name:"CalendarIcon"},xft={width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Sft(t,e,n,i,s,o){return v(),A("svg",xft,[...e[0]||(e[0]=[Ra('<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 $ft=ue(Cft,[["render",Sft]]),Aft={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:xp,FeedTextComposer:pv,SingleLineTextarea:_ft,EyeIcon:kft,CalendarIcon:$ft},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:{...Fye($S,["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:{...Nye(cT,["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 cT().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)}},Eft={class:"person_avatar"},Mft=["alt","src"],Tft={class:"create_header_content"},Pft={key:0,class:"fcom_create_status_box_header"},Ift={class:"user_infos"},Lft={class:"feed_user_name"},Oft={class:"feed_meta_info"},Dft={key:1,class:"feed_timestamp"},Rft={class:"create_header_action"},Vft={key:0,ref:"fcom_topics_input",class:"fcom_topics_input"},Fft={style:{margin:"0",display:"block",width:"100%",padding:"5px 0","font-weight":"500"}},Nft={key:0,class:"fcom_meta_text"},Bft={class:"fcom_post_actions"},zft={key:0,class:"fcom_post_space_name"},Hft={class:"target_label"},Uft={ref:"fcom_posting_space",style:{"margin-right":"10px"}},jft={key:0,class:"fcom_space_title"},Wft={key:1},Yft={class:"fcom_empty_spaces_dropdown"},qft={key:0,class:"fcom_composer_admin_actions"},Gft={key:0},Xft={class:"dialog_header"},Kft={class:"dialog_left schedule_header_left"},Zft={class:"dialog_body"},Jft={class:"fcom_input_help"},Qft={class:"dialog_footer"};function ept(t,e,n,i,s,o){const r=H("EditPen"),a=be,l=H("CalendarIcon"),c=He,u=H("EyeIcon"),d=H("Close"),h=H("SingleLineTextarea"),f=sn,p=Jt,m=H("SpaceIcon"),y=n2,b=Yt,k=H("feed-text-composer"),C=Wd,$=en,S=M8,M=tn,P=$s;return o.canPost?(v(),A("div",{key:0,class:q([{state_active:o.isStateActive},"create_status_holder"])},[g("div",{class:q(["create_header",{state_active:o.isStateActive}])},[g("div",Eft,[g("img",{alt:n.author.name||t.$t("Your Photo"),src:n.author.avatar||t.auth.avatar},null,8,Mft)]),g("div",Tft,[o.isStateActive?O("",!0):(v(),A("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(),A("div",Pft,[g("div",Ift,[g("div",Lft,x(o.getPostTitle),1),g("div",Oft,[!n.editing_feed.id&&o.showScheduleInfo?(v(),A("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:w(()=>[_(r)]),_:1})])):(v(),A("span",Dft,x(n.editing_feed.id?t.humanDateDiff(n.editing_feed.created_at):t.dayjs().format(t.siteDateTimeFormat)),1))])]),g("div",Rft,[o.showScheduleIcon?(v(),D(c,{key:0,"aria-label":t.$t("Schedule post"),onClick:o.openScheduleModal,text:""},{default:w(()=>[_(a,null,{default:w(()=>[_(l)]),_:1})]),_:1},8,["aria-label","onClick"])):O("",!0),_(c,{"aria-label":t.$t("Preview"),onClick:o.previewPost,text:""},{default:w(()=>[_(a,null,{default:w(()=>[_(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:w(()=>[_(a,null,{default:w(()=>[_(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:w(()=>[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:w(()=>[le(t.$slots,"before_footer")]),after_input:w(()=>[t.has_pro&&o.currentTopics.length?(v(),A("div",Vft,[_(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:w(()=>[(v(!0),A(ee,null,we(o.currentTopics,T=>(v(),D(f,{key:T.slug,label:T.title,value:T.id},{default:w(()=>[g("span",Fft,x(T.title),1),T.description?(v(),A("span",Nft,x(T.description),1)):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["multiple-limit","modelValue","multiple","placeholder"])],512)):O("",!0)]),after_composer_footer:w(()=>[t.hasFeature("mention_mail")&&o.isCurrentSpaceAdmin&&s.feed.send_announcement_email?(v(),A("div",qft,[_(b,{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:w(()=>[N(x(t.$t("Send announcement email to space members"))+" ",1),t.has_pro?O("",!0):(v(),A("span",Gft,"("+x(t.$t("Require Pro"))+")",1))]),_:1},8,["disabled","modelValue"])])):O("",!0)]),default:w(()=>[g("div",Bft,[n.space&&o.isStateActive?(v(),A("div",zft,[g("span",null,"#"+x(n.space),1)])):O("",!0),!n.space&&!n.disableSpace?(v(),A(ee,{key:1},[g("span",Hft,x(t.$t("Posting in:")),1),g("span",Uft,[_(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:w(()=>[g("p",Yft,x(Object.keys(o.allSpaces).length?t.$t("No spaces to post in"):t.$t("Join a space to post")),1)]),default:w(()=>[(v(!0),A(ee,null,we(s.postableSpaces,T=>(v(),D(y,{key:T.label,label:T.label},{default:w(()=>[(v(!0),A(ee,null,we(T.spaces,I=>(v(),D(f,{key:I.slug,label:I.title,value:I.slug},{default:w(()=>[I.id?(v(),A("span",jft,[_(m,{space_profile:I},null,8,["space_profile"]),g("span",null,x(t.getExcerpt(I.title,30)),1)])):(v(),A("span",Wft,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:w(()=>[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:w(()=>[g("div",Xft,[g("div",Kft,[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:w(()=>[g("div",Qft,[_(c,{class:"fcom_secondary_button",onClick:o.cancelSchedule},{default:w(()=>[N(x(t.$t("Remove Schedule")),1)]),_:1},8,["onClick"]),_(c,{class:"fcom_primary_button",disabled:o.isScheduleDisabled,onClick:o.schedulePost},{default:w(()=>[N(x(t.$t("Select Schedule")),1)]),_:1},8,["disabled","onClick"])])]),default:w(()=>[g("div",Zft,[_(M,{"label-position":"top",class:"fcom_schedule_form"},{default:w(()=>[_($,{label:t.$t("Date")},{default:w(()=>[_(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"]),_($,{label:t.$t("Time")},{default:w(()=>[_(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}),_($,null,{default:w(()=>[g("p",Jft,x(t.$t("The date and time is based on your site's Timezone")),1)]),_:1})])]),_:1},8,["modelValue","width"])],2)):O("",!0)}const tpt=ue(Aft,[["render",ept]]),npt={name:"EditFeed",components:{SpaceIcon:xp,CreateStatusForm:tpt},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()}},spt={class:"fcom_feed_edit"},ipt={class:"fcom_feed_edit_dialog_header"},opt={key:0,class:"fcom_feed_edit_dialog_body"},rpt={key:0},apt={key:0,style:{"margin-top":"5px"}},lpt={class:"fcom_space_title"};function cpt(t,e,n,i,s,o){const r=H("Close"),a=be,l=Yt,c=sn,u=H("SpaceIcon"),d=Jt,h=Ss,f=H("create-status-form"),p=Nt,m=$s,y=xt("loading");return v(),A("div",spt,[_(m,{class:"fcom_feed_edit_dialog",modelValue:s.localDialogVisible,"onUpdate:modelValue":e[3]||(e[3]=b=>s.localDialogVisible=b),width:t.dialogWidth,"append-to-body":!0,overflow:"","before-close":()=>{},"show-close":!1},{default:w(()=>{var b,k;return[Re((v(),A("div",null,[g("div",ipt,[g("span",null,x(t.$t("Edit Feed")),1),_(a,{onClick:o.handleClose},{default:w(()=>[_(r)]),_:1},8,["onClick"])]),s.feed.id?(v(),A("div",opt,[!(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=(b=s.feed)==null?void 0:b.space)==null?void 0:k.slug},{after_composer:w(()=>[o.canMovePost?(v(),A("div",rpt,[_(l,{modelValue:s.changeSpace,"onUpdate:modelValue":e[0]||(e[0]=C=>s.changeSpace=C),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Move to a different space")),1)]),_:1},8,["modelValue"]),s.changeSpace?(v(),A("div",apt,[_(d,{modelValue:s.newSpaceId,"onUpdate:modelValue":e[1]||(e[1]=C=>s.newSpaceId=C),placeholder:t.$t("Select destination"),style:{width:"100%"}},{default:w(()=>[_(c,{value:"profile",label:o.profileOptionLabel,disabled:!s.feed.space_id},{default:w(()=>[g("span",null,x(o.profileOptionLabel),1)]),_:1},8,["label","disabled"]),(v(!0),A(ee,null,we(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:w(()=>[g("span",lpt,[_(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:w(()=>[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:w(()=>[_(l,{modelValue:s.makeUnlisted,"onUpdate:modelValue":e[2]||(e[2]=C=>s.makeUnlisted=C),class:"fcom_checkbox"},{default:w(()=>[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}))])),[[y,s.loading]])]}),_:1},8,["modelValue","width"])])}const MU=ue(npt,[["render",cpt]]),upt={name:"SurveyVoters",props:["feed","option","options","totalCount"],components:{UserRouteLink:la,UserAvatar:j2},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()}},dpt={class:"dialog_header"},hpt={class:"fcom_filter_menu"},fpt={class:"fcom_filter_menu_ul"},ppt=["onClick"],mpt={key:1},gpt={class:"feed_meta_info survey_voters_meta"},vpt={class:"meta_line"},_pt={class:"meta_line"},ypt={class:"voters_list"},bpt={class:"voter_avatar"},wpt={class:"voter_info"},kpt=["title"],Cpt={key:2,class:"not_found"};function xpt(t,e,n,i,s,o){const r=Nt,a=H("UserAvatar"),l=H("UserRouteLink"),c=qs,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:w(({close:d})=>[g("div",dpt,[g("div",hpt,[g("ul",fpt,[(v(!0),A(ee,null,we(n.options,h=>(v(),A("li",{key:h.slug},[g("a",{onClick:Ee(f=>o.switchOption(h.slug),["prevent"]),class:q({"router-link-exact-active":n.option.slug==h.slug}),href:"#"},x(h.label),11,ppt)]))),128))])])])]),default:w(()=>[s.loading?(v(),D(r,{key:0,animated:"",rows:4})):s.voters.length?(v(),A("div",mpt,[g("div",gpt,[g("span",vpt,x(o.getVotePercentage),1),g("span",_pt,x(t.$_n("%s Vote","%s Votes",n.option.vote_counts)),1)]),_(c,{"max-height":"800px"},{default:w(()=>[g("div",ypt,[(v(!0),A(ee,null,we(s.voters,d=>(v(),A("div",{key:d.id,class:"voter_item"},[d.xprofile?(v(),A(ee,{key:0},[g("div",bpt,[_(a,{with_level:!1,xprofile:d.xprofile},null,8,["xprofile"])]),g("div",wpt,[_(l,{show_badge:!0,xprofile:d.xprofile},null,8,["xprofile"]),d.xprofile.created_at?(v(),A("div",{key:0,title:d.xprofile.created_at,class:"voter_time"},x(t.$t("Joined %s",t.humanDateDiff(d.xprofile.created_at))),9,kpt)):O("",!0)])],64)):O("",!0)]))),128))])]),_:1})])):(v(),A("div",Cpt,[g("p",null,x(t.$t("No voters yet")),1)]))]),_:1},8,["modelValue","width","onClose"])}const Spt=ue(upt,[["render",xpt]]),$pt={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:Spt},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()}},Apt={class:"fcom_app_options"},Ept=["onClick"],Mpt={class:"fcom_app_text"},Tpt={class:"fcom_app_input_wrap"},Ppt={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 6"},Ipt={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8 8"},Lpt=["onClick"],Opt={key:0},Dpt={class:"feed_meta_info"},Rpt={key:0,class:"meta_line"},Vpt=["title"],Fpt=["title"];function Npt(t,e,n,i,s,o){const r=H("ArrowRight"),a=be,l=H("SurveyVoters");return v(),A(ee,null,[g("div",{class:q(["fcom_app_render",{"no-border":o.shouldHideBorder}])},[g("div",Apt,[(v(!0),A(ee,null,we(s.formattedOptions,(c,u)=>(v(),A("div",{key:c.slug,onClick:d=>o.toggleVote(u),class:q([c.voted?"fcom_is_voted":"","fcom_app_option"])},[g("div",Mpt,[g("span",Tpt,[g("span",{class:q("fcom_input_"+s.inputType)},[s.inputType=="single_choice"?(v(),A("svg",Ppt,[...e[1]||(e[1]=[g("circle",{cx:"3",cy:"3",r:"2.5",fill:"currentColor"},null,-1)])])):(v(),A("svg",Ipt,[...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(),A("span",Opt,"("+x(c.vote_counts)+")",1)):O("",!0),c.vote_counts?(v(),D(a,{key:1,class:"fcom_arrow_icon"},{default:w(()=>[_(r)]),_:1})):O("",!0)],8,Lpt),s.totalCount?(v(),A("span",{key:0,style:Xe(o.getVoteStyle(c.vote_counts)),class:"fc_app_shadow"},null,4)):O("",!0)],10,Ept))),128))]),g("div",Dpt,[s.totalCount?(v(),A("span",Rpt,x(t.$_n("%d vote","%d votes",s.totalCount)),1)):O("",!0),s.endingDate?(v(),A(ee,{key:1},[o.isEnded?(v(),A("span",{key:0,title:t.$t("Ended at: %s",s.endingDate),class:"meta_line"},x(o.endedDateLabel),9,Vpt)):(v(),A("span",{key:1,title:t.$t("Will end at: %s",s.endingDate),class:"meta_line"},x(o.endingDateLabel),9,Fpt))],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 TU=ue($pt,[["render",Npt]]),Bpt={name:"BookmarkIcon",props:["is_active"]},zpt={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"},Hpt={key:1,width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Upt(t,e,n,i,s,o){return n.is_active?(v(),A("svg",zpt,[...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(),A("svg",Hpt,[...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 jpt=ue(Bpt,[["render",Upt]]),Wpt={name:"RenderChildPost",components:{ImageCarousel:AS,SurveyRenderer:TU,DocumentLists:fv,UserRouteLink:la,MediaPreview:Ap,FeedMdContent:mv},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()}},Ypt=["id"],qpt={key:0,class:"fcom_top_media"},Gpt={class:"fcom_feed_header_wrap"},Xpt={class:"feed_header"},Kpt={key:0,class:"feed_user"},Zpt={class:"feed_user_name"},Jpt={class:"feed_meta_info"},Qpt={key:0,class:"meta_line"},emt=["title","href"],tmt={key:1,class:"feed_timestamp"},nmt={key:0,class:"feed_title"},smt={class:"feed_title_heading"},imt={key:1,class:"expand-button"};function omt(t,e,n,i,s,o){var p,m,y,b,k,C,$,S,M,P,T;const r=H("media-preview"),a=H("UserAvatar"),l=H("UserRouteLink"),c=H("FeedMdContent"),u=He,d=H("DocumentLists"),h=H("SurveyRenderer"),f=H("ImageCarousel");return s.feed?(v(),A("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(),A("div",qpt,[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",Gpt,[g("div",Xpt,[s.feed.xprofile?(v(),A("div",Kpt,[_(a,{with_level:!1,xprofile:s.feed.xprofile},null,8,["xprofile"]),g("div",null,[g("div",Zpt,[_(l,{show_badge:!0,xprofile:s.feed.xprofile,show_follow:!0},null,8,["xprofile"])]),g("div",Jpt,[s.feed.content_type=="survey"&&((b=(y=(m=(p=s.feed)==null?void 0:p.meta)==null?void 0:m.survey_config)==null?void 0:y.options)!=null&&b.length)?(v(),A("span",Qpt,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,emt),!s.in_space&&s.feed.space?(v(),A("span",tmt,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(),A("div",nmt,[g("h2",smt,x(s.feed.title),1)])):O("",!0),_(c,{class_name:"feed_texts",content:s.feed.message_rendered},null,8,["content"]),s.hasOverflowContent?(v(),A("div",imt,[_(u,{class:"btn_expand"},{default:w(()=>[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(),A(ee,{key:2},[s.feed.content_type=="survey"&&((P=(M=(S=($=s.feed)==null?void 0:$.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(),A(ee,{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,Ypt)])):O("",!0)}const rmt=ue(Wpt,[["render",omt]]),amt={name:"CustomAppMeta",components:{RenderChildPost:rmt},props:{feed:{type:Object,required:!0}}},lmt={ref:"fcom_custom_app"},cmt={key:0},umt=["innerHTML"];function dmt(t,e,n,i,s,o){const r=H("RenderChildPost");return v(),A("div",lmt,[n.feed.meta.custom_app_preview.app_name=="child_post"&&n.feed.meta.custom_app_preview.feed_id?(v(),A("div",cmt,[_(r,{feed_id:n.feed.meta.custom_app_preview.feed_id},null,8,["feed_id"])])):n.feed.meta.custom_app_preview.custom_html?(v(),A("div",{key:1,innerHTML:n.feed.meta.custom_app_preview.custom_html},null,8,umt)):O("",!0)],512)}const hmt=ue(amt,[["render",dmt]]),fmt={name:"FeedAction",components:{EditFeed:MU},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(()=>{}))}}},pmt={class:"actions_items"},mmt={key:0},gmt={key:1},vmt={key:0},_mt={key:1},ymt={key:0},bmt={key:1},wmt={key:0},kmt={key:1};function Cmt(t,e,n,i,s,o){var d,h;const r=H("MoreFilled"),a=be,l=He,c=Yo,u=H("EditFeed");return v(),A(ee,null,[_(c,{persistent:!1,ref:"popover",placement:"bottom",width:200,trigger:"click",teleported:!1,"popper-class":"fcom_menu_below_nav"},{reference:w(()=>[_(l,{"aria-label":t.$t("View Post actions"),class:"fcom_dot_menu",size:"small",text:""},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1})]),_:1},8,["aria-label"])]),default:w(()=>{var f,p;return[g("ul",pmt,[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(),A("li",{key:0,onClick:e[1]||(e[1]=m=>o.reportPost())},x(t.$t("Report Post")),1)):O("",!0),t.canEditFeed(n.feed)?(v(),A(ee,{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(),A("li",{key:0,onClick:e[3]||(e[3]=m=>o.toggleUnlist())},[n.feed.status=="unlisted"?(v(),A("span",mmt,x(t.$t("List Post")),1)):(v(),A("span",gmt,x(t.$t("Unlist Post")),1))])):O("",!0),n.feed.space&&t.hasSpaceAdminAccess(n.feed.space)?(v(),A(ee,{key:1},[g("li",{onClick:e[4]||(e[4]=m=>o.toggleSticky())},[n.feed.is_sticky?(v(),A("span",vmt,x(t.$t("Unpin from Top")),1)):(v(),A("span",_mt,x(t.$t("Pin to top")),1))]),g("li",{onClick:e[5]||(e[5]=m=>o.toggleSidebarPin())},[n.feed.priority?(v(),A("span",bmt,x(t.$t("Unpin from sidebar")),1)):(v(),A("span",ymt,x(t.$t("Pin to sidebar")),1))])],64)):O("",!0),(f=n.feed.meta)!=null&&f.media_preview?(v(),A("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(),A("li",{key:3,onClick:e[7]||(e[7]=m=>o.toggleCommentStatus())},[((p=n.feed.meta)==null?void 0:p.comments_disabled)=="yes"?(v(),A("span",wmt,x(t.$t("Enable comments")),1)):(v(),A("span",kmt,x(t.$t("Disable comments")),1))])):O("",!0)],64)):O("",!0),t.canDeleteFeed(n.feed)?(v(),A("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 xmt=ue(fmt,[["render",Cmt]]),Smt={name:"Feed",components:{DocumentLists:fv,CustomAppMeta:hmt,BookmarkIcon:jpt,StickyIcon:cU,UserRouteLink:la,EditFeed:MU,FeedFooter:pft,MediaPreview:Ap,ImageCarousel:AS,SurveyRenderer:TU,ReportReview:lU,FeedAction:xmt,FeedMdContent:mv},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)}},$mt=["id"],Amt={key:1,class:"fcom_top_media"},Emt={key:2,class:"fcom_feed_header_wrap"},Mmt={class:"feed_actions fcom_concat_buttons"},Tmt={key:0,class:"fcom_feed_topics"},Pmt={class:"feed_header"},Imt={key:0,class:"feed_user"},Lmt={class:"feed_user_info"},Omt={class:"feed_user_name"},Dmt={key:0,class:"feed_status"},Rmt={key:1,class:"feed_status"},Vmt={key:2,class:"feed_status"},Fmt={class:"feed_meta_info"},Nmt={key:0,class:"meta_line"},Bmt=["title","href"],zmt=["title","href"],Hmt={key:3},Umt={key:0,class:"feed_title"},jmt={key:0,class:"feed_title_heading"},Wmt=["href"],Ymt={key:1,class:"feed_title_heading"};function qmt(t,e,n,i,s,o){var T,I,L,R,V,B,F,z,U,G,K,X,W,Q,ne;const r=H("report-review"),a=H("media-preview"),l=He,c=H("StickyIcon"),u=be,d=H("BookmarkIcon"),h=H("FeedAction"),f=H("router-link"),p=H("UserAvatar"),m=H("UserRouteLink"),y=hi,b=H("FeedMdContent"),k=H("SurveyRenderer"),C=H("ImageCarousel"),$=H("DocumentLists"),S=H("CustomAppMeta"),M=H("feed-footer"),P=xt("loading");return Re((v(),A("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(),A("div",Amt,[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(),A("div",Emt,[g("div",Mmt,[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]=Z=>o.joinSpace())},{default:w(()=>[N(x(t.$t("Join")),1)]),_:1},8,["loading"])):O("",!0),n.show_actions?(v(),A(ee,{key:1},[n.feed.is_sticky&&s.in_space?(v(),D(l,{key:0,onClick:e[1]||(e[1]=Z=>o.toggleSticky()),"aria-label":t.$t("Toggle Sticky"),class:"no_pad_btn",text:"",size:"small"},{default:w(()=>[_(u,{class:"fcom_sticky"},{default:w(()=>[_(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]=Z=>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:w(()=>[_(u,{style:{"font-size":"14px"}},{default:w(()=>[_(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:w(()=>[n.is_route?(v(),A("li",{key:0,onClick:e[3]||(e[3]=Z=>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(),A("div",Tmt,[(v(!0),A(ee,null,we(n.feed.terms,Z=>(v(),D(f,{onClick:Ee(ae=>o.gotoTopicUrl(Z.slug),["prevent"]),key:Z.slug,to:o.getTopicRoute(Z.slug),class:"feed_timestamp"},{default:w(()=>[N("#"+x(Z.title),1)]),_:2},1032,["onClick","to"]))),128))])):O("",!0),g("div",Pmt,[n.feed.xprofile?(v(),A("div",Imt,[_(p,{with_level:!1,xprofile:n.feed.xprofile},null,8,["xprofile"]),g("div",Lmt,[g("div",Omt,[_(m,{show_badge:!0,xprofile:n.feed.xprofile,show_follow:!0},null,8,["xprofile"]),n.feed.status=="pending"?(v(),A("span",Dmt,[_(y,{type:"warning"},{default:w(()=>[N(x(t.$t("In Review")),1)]),_:1})])):O("",!0),n.feed.status=="scheduled"?(v(),A("span",Rmt,[_(y,{type:"warning"},{default:w(()=>[N(x(t.$t("Scheduled")),1)]),_:1})])):O("",!0),n.feed.status=="unlisted"&&!n.is_single?(v(),A("span",Vmt,[_(y,{class:"fcom_unlisted_tag"},{default:w(()=>[N(x(t.$t("Unlisted")),1)]),_:1})])):O("",!0)]),g("div",Fmt,[n.feed.content_type=="survey"&&((F=(B=(V=(R=n.feed)==null?void 0:R.meta)==null?void 0:V.survey_config)==null?void 0:B.options)!=null&&F.length)?(v(),A("span",Nmt,x(t.$t("created a poll")),1)):O("",!0),n.feed.status=="scheduled"?(v(),A("a",{key:1,title:n.feed.scheduled_at,onClick:e[4]||(e[4]=(...Z)=>o.gotoFeed&&o.gotoFeed(...Z)),href:n.feed.permalink,class:"feed_timestamp"},x(o.getScheduledTime(n.feed.scheduled_at)),9,Bmt)):(v(),A("a",{key:2,title:n.feed.created_at,onClick:e[5]||(e[5]=(...Z)=>o.gotoFeed&&o.gotoFeed(...Z)),href:n.feed.permalink,class:"feed_timestamp"},x(t.humanDateDiff(n.feed.created_at)),9,zmt)),!s.in_space&&n.feed.space?(v(),A("span",Hmt,[_(f,{to:o.getSpaceRoute(n.feed.space.slug),class:"feed_timestamp"},{default:w(()=>[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(),A("div",Umt,[n.is_single?(v(),A("h2",Ymt,x(n.feed.title),1)):(v(),A("h2",jmt,[g("a",{onClick:e[6]||(e[6]=Ee((...Z)=>o.showFullContent&&o.showFullContent(...Z),["prevent"])),href:n.feed.permalink},x(n.feed.title),9,Wmt)]))])):O("",!0),_(b,{class_name:"feed_texts",content:o.parsedMessage},null,8,["content"]),s.hasOverflowContent&&!s.isExpanded?(v(),A("div",{key:1,onClick:e[7]||(e[7]=Z=>o.expandInline()),class:"expand-button"},[_(l,{class:"btn_expand"},{default:w(()=>[N(x(t.$t("Show More")),1)]),_:1})])):O("",!0)],2),n.feed.content_type=="survey"&&((K=(G=(U=(z=n.feed)==null?void 0:z.meta)==null?void 0:U.survey_config)==null?void 0:G.options)!=null&&K.length)?(v(),A(ee,{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||(X=n.feed.meta.audio_medias)!=null&&X.length)?(v(),D(a,{key:1,feed:n.feed},null,8,["feed"])):O("",!0)],64)):n.feed.content_type=="document"?(v(),D($,{key:4,document_lists:((Q=(W=n.feed)==null?void 0:W.meta)==null?void 0:Q.document_lists)||[]},null,8,["document_lists"])):n.feed.meta?(v(),A(ee,{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]=Z=>{t.$emit("commented",Z)})},null,8,["feed","is_modal","is_single","space_slug"])):O("",!0),le(t.$slots,"after_feed_footer")],10,$mt)),[[P,s.working]])}const Gmt=ue(Smt,[["render",qmt]]),Xmt={name:"ReportDetails",components:{Feed:Gmt,SingleComent:U2,Pagination:uu},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()}},Kmt={class:"dialog_header report_details_header"},Zmt={class:"report_details_header_left"},Jmt={class:"report_details_header_right"},Qmt=["href"],egt=["href"],tgt=["href"],ngt=["href"],sgt={class:"meta_line"},igt=["href","title"],ogt={key:0,class:"dialog_body"},rgt={class:"fcom_filter_menu"},agt={class:"fcom_filter_menu_ul"},lgt={key:0,class:"report_details"},cgt={key:1,class:"report_details"},ugt={class:"report_details_header"},dgt={class:"report_details_header_left"},hgt={class:"report_details_header_right"},fgt={key:0},pgt={key:1},mgt={key:1},ggt={class:"report_reason"},vgt=["title"],_gt={key:0,class:"report_details_body"},ygt=["textContent"],bgt=["aria-label"],wgt={class:"dialog_footer report_footer"};function kgt(t,e,n,i,s,o){const r=H("UserAvatar"),a=H("UserRouteLink"),l=H("SingleComent"),c=H("Feed"),u=Nt,d=H("Pagination"),h=He,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:w(()=>{var p,m,y,b,k,C,$,S,M,P,T,I,L;return[g("div",Kmt,[g("div",Zmt,[_(r,{with_level:!1,xprofile:o.getAuthorProfile(n.report)},null,8,["xprofile"])]),g("div",Jmt,[g("div",null,[_(a,{show_verified:!1,xprofile:o.getAuthorProfile(n.report)},null,8,["xprofile"]),o.isCommentReport(n.report)?(v(),A("a",{key:0,href:o.getPermalink(n.report)},x(t.$t("commented ")),9,Qmt)):(v(),A("a",{key:1,href:o.getPermalink(n.report)},x(t.$t("posted ")),9,egt)),g("span",null,x(t.$t("in ")),1),o.isCommentReport(n.report)?(v(),A("a",{key:2,href:(m=(p=n.report)==null?void 0:p.post)==null?void 0:m.permalink},x(((b=(y=n.report)==null?void 0:y.post)==null?void 0:b.title)||(($=(C=(k=n.report)==null?void 0:k.post)==null?void 0:C.space)==null?void 0:$.title)),9,tgt)):(v(),A("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,ngt))]),g("div",sgt,[g("a",{href:o.getPermalink(n.report),title:n.report.created_at},x(t.$t("Reported at ")+t.humanDateDiff(n.report.created_at)),9,igt)])])])]}),footer:w(()=>[g("div",wgt,[n.status!="ignored"?(v(),D(h,{key:0,class:"fcom_secondary_button",onClick:e[3]||(e[3]=p=>o.ignoreReport(n.report))},{default:w(()=>[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:w(()=>[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:w(()=>[N(x(t.$t("Delete Report")),1)]),_:1}))])]),default:w(()=>[n.report?(v(),A("div",ogt,[g("div",rgt,[g("ul",agt,[g("li",null,[g("a",{onClick:e[0]||(e[0]=Ee(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]=Ee(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(),A("div",lgt,[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(),A("div",cgt,[s.loading?(v(),D(u,{key:1,rows:5,animated:!0})):(v(!0),A(ee,{key:0},we(s.postReports,p=>(v(),A("div",{key:p.id,class:"report_details_item"},[g("div",ugt,[g("div",dgt,[p.reporter?(v(),D(r,{key:0,with_level:!1,xprofile:p.reporter},null,8,["xprofile"])):O("",!0)]),g("div",hgt,[!p.reporter&&!o.getReason(p.reason)?(v(),A("div",fgt,x(t.$t("Flagged automatically by the site rule")),1)):(v(),A("div",pgt,[p.reporter?(v(),D(a,{key:0,show_verified:!1,xprofile:p.reporter},null,8,["xprofile"])):(v(),A("span",mgt,x(t.$t("By System ")),1)),o.getReason(p.reason)?(v(),A(ee,{key:2},[g("span",null,x(t.$t("reported for ")),1),g("span",ggt,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,vgt)])]),p.explanation?(v(),A("div",_gt,[g("div",{textContent:x(p.explanation)},null,8,ygt)])):O("",!0)]))),128)),s.pagination.total?(v(),A("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,bgt)):O("",!0)])):O("",!0)])):O("",!0)]),_:1},8,["modelValue","title","width"])}const Cgt=ue(Xmt,[["render",kgt]]),xgt={name:"ModerationConfig",components:{Drawer:tu},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})}},Sgt={class:"fcom_moderation_settings"},$gt={class:"fcom_moderation_section"},Agt={class:"fcom_input_wrap"},Egt={class:"fcom_moderation_section"},Mgt={class:"fcom_moderation_section_head"},Tgt={class:"help_text"},Pgt={class:"fcom_moderation_section"},Igt={class:"fcom_moderation_section_head"},Lgt={class:"fcom_inline_field"},Ogt={class:"fcom_inline_row"},Dgt={class:"fcom_inline_field"},Rgt={class:"fcom_inline_row"},Vgt={class:"fcom_inline_field"},Fgt={class:"fcom_inline_row"},Ngt={class:"fcom_moderation_section"},Bgt={class:"fcom_moderation_section_head"},zgt={class:"fcom_input_wrap"},Hgt={class:"fcom_input_wrap"},Ugt={class:"fcom_input_wrap"},jgt={class:"help_text"},Wgt={class:"fcom_moderation_footer"};function Ygt(t,e,n,i,s,o){const r=H("InfoFilled"),a=be,l=Ss,c=Yt,u=ft,d=en,h=r2,f=sa,p=sn,m=Jt,y=tn,b=He,k=H("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:w(()=>[g("div",Wgt,[_(b,{class:"fcom_secondary_button",onClick:o.handleCancel},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1},8,["onClick"]),_(b,{class:"fcom_primary_button",loading:n.saving,disabled:n.saving,onClick:o.saveConfig},{default:w(()=>[N(x(t.$t("Update")),1)]),_:1},8,["loading","disabled","onClick"])])]),default:w(()=>[g("div",Sgt,[_(y,{onSubmit:e[13]||(e[13]=Ee(C=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[g("div",$gt,[g("div",Agt,[_(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:w(()=>[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:w(()=>[_(a,{class:"fcom_label_tooltip",onClick:e[0]||(e[0]=Ee(()=>{},["stop"])),role:"button",tabindex:"0","aria-label":t.$t("When enabled, reported and pending content will appear here for review.")},{default:w(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])]),_:1},8,["modelValue"])])]),s.config.is_enabled=="yes"?(v(),A(ee,{key:0},[g("div",Egt,[g("div",Mgt,[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:w(()=>[_(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",Tgt,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",Pgt,[g("div",Igt,[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",Lgt,[g("div",Ogt,[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:w(()=>[_(a,{class:"fcom_label_tooltip",role:"button",tabindex:"0","aria-label":t.$t("__FLAG_AFTER_THRESHOLD_DESC")},{default:w(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])])]),g("div",Dgt,[g("div",Rgt,[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:w(()=>[_(a,{class:"fcom_label_tooltip",role:"button",tabindex:"0","aria-label":t.$t("__AUTO_FLAG_USER_REJECT_THRESHOLD_DESC")},{default:w(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])])]),g("div",Vgt,[g("div",Fgt,[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:w(()=>[_(a,{class:"fcom_label_tooltip",role:"button",tabindex:"0","aria-label":t.$t("__AUTO_FLAG_USER_REPORT_THRESHOLD_DESC")},{default:w(()=>[_(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",Ngt,[g("div",Bgt,[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",zgt,[_(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:w(()=>[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:w(()=>[_(a,{class:"fcom_label_tooltip",onClick:e[6]||(e[6]=Ee(()=>{},["stop"])),role:"button",tabindex:"0","aria-label":t.$t("__FLAG_ALL_NEW_POSTS_DESC")},{default:w(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])]),_:1},8,["modelValue"])]),g("div",Hgt,[_(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:w(()=>[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:w(()=>[_(a,{class:"fcom_label_tooltip",onClick:e[8]||(e[8]=Ee(()=>{},["stop"])),role:"button",tabindex:"0","aria-label":t.$t("__FIRST_POST_APPROVAL_DESC")},{default:w(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])]),_:1},8,["modelValue"])]),g("div",Ugt,[_(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:w(()=>[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:w(()=>[_(a,{class:"fcom_label_tooltip",onClick:e[10]||(e[10]=Ee(()=>{},["stop"])),role:"button",tabindex:"0","aria-label":t.$t("__FIRST_COMMENT_APPROVAL_DESC")},{default:w(()=>[_(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:w(()=>[_(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:w(()=>[(v(!0),A(ee,null,we(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",jgt,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 qgt=ue(xgt,[["render",Ygt]]),Ggt={name:"Moderation",components:{Layout:_i,AppLayout:yi,Pagination:uu,ReportDetails:Cgt,ModerationConfigDrawer:qgt},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"))}},Xgt=["href"],Kgt={style:{padding:"20px"},class:"fhr_content_layout_body moderation_layout"},Zgt={key:0,class:"card_header"},Jgt=["aria-label"],Qgt={key:1,class:q("fcom_dir_layout fcom_dir_layout_classic")},e1t={key:0,class:"loading"},t1t={key:1,class:"fcom_moderation_table"},n1t={class:"moderation_table"},s1t={class:"moderation_table_header"},i1t={style:{"min-width":"100px"}},o1t={class:"moderation_table_body"},r1t=["onClick"],a1t={key:0,class:"user_avatar moderation_avatar"},l1t={class:"feed_user_name"},c1t={key:1},u1t={key:2,class:"no_reports"},d1t=["aria-label"],h1t={key:2,style:{"max-width":"800px",margin:"0 auto"},class:"setting_body white_loaded"},f1t={style:{"text-align":"center"}},p1t={style:{"font-size":"18px","margin-bottom":"10px"}},m1t={class:"promo_description"},g1t={key:1,class:"setting_body",style:{"text-align":"center"}},v1t={class:"promo_description"},_1t=["href"];function y1t(t,e,n,i,s,o){const r=H("Operation"),a=be,l=He,c=Hd,u=ws,d=Nt,h=H("UserAvatar"),f=H("UserRouteLink"),p=H("MoreFilled"),m=$r,y=Ar,b=Sr,k=H("Pagination"),C=H("layout"),$=H("app-layout"),S=H("report-details"),M=H("moderation-config-drawer");return v(),A(ee,null,[_($,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_full_layout"},{default:w(()=>[_(C,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Moderation")},{actions:w(()=>[t.has_pro?(v(),D(l,{key:0,onClick:e[0]||(e[0]=P=>s.showConfig=!0),class:"fcom_secondary_button"},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),g("span",null,x(t.$t("Settings")),1)]),_:1})):(v(),A("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,Xgt))]),default:w(()=>[g("div",Kgt,[t.has_pro?(v(),A(ee,{key:0},[s.moderationConfig.is_enabled=="yes"?(v(),A("div",Zgt,[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:w(()=>[_(c,{value:"pending"},{default:w(()=>[N(x(t.$t("Pending")),1)]),_:1}),_(c,{value:"flagged"},{default:w(()=>[N(x(t.$t("Flagged")),1)]),_:1}),_(c,{value:"ignored"},{default:w(()=>[N(x(t.$t("Dismissed")),1)]),_:1}),_(c,{value:"unpublished"},{default:w(()=>[N(x(t.$t("Unpublished")),1)]),_:1})]),_:1},8,["modelValue"])],8,Jgt)])):O("",!0),s.moderationConfig.is_enabled=="yes"?(v(),A("div",Qgt,[s.loading?(v(),A("div",e1t,[_(d,{class:"white_loaded",rows:3,animated:!0})])):s.reports.length?(v(),A("div",t1t,[g("table",n1t,[g("thead",s1t,[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",i1t,x(t.$t("Date")),1),g("th",null,x(t.$t("Reports")),1)])]),g("tbody",o1t,[(v(!0),A(ee,null,we(s.reports,P=>{var T,I;return v(),A("tr",{key:P.id},[g("td",{onClick:L=>o.openReportDetails(P),class:"report_reason"},x(o.getTitle(P)),9,r1t),g("td",null,x(P.content_type),1),g("td",null,[P.reporter?(v(),A("div",a1t,[_(h,{xprofile:P.reporter},null,8,["xprofile"]),g("div",l1t,[_(f,{xprofile:P.reporter},null,8,["xprofile"])])])):(T=P.meta)!=null&&T.flagged_by?(v(),A("div",c1t,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,[_(b,{trigger:"click"},{dropdown:w(()=>[_(y,null,{default:w(()=>[_(m,null,{default:w(()=>[_(l,{"aria-label":t.$t("Review report"),class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:L=>o.openReportDetails(P)},{default:w(()=>[N(x(t.$t("Review Report")),1)]),_:1},8,["aria-label","onClick"])]),_:2},1024),P.status!="ignored"?(v(),D(m,{key:0},{default:w(()=>[_(l,{class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:L=>o.confirmAndIgnoreReport(P)},{default:w(()=>[N(x(o.getIgnoreBtnText(P)),1)]),_:2},1032,["onClick"])]),_:2},1024)):O("",!0),P.status!="unpublished"?(v(),D(m,{key:1},{default:w(()=>[_(l,{class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:L=>o.confirmAndUnpublishReport(P)},{default:w(()=>[N(x(o.getUnpublishBtnText(P)),1)]),_:2},1032,["onClick"])]),_:2},1024)):O("",!0),P.status!="pending"?(v(),D(m,{key:2},{default:w(()=>[_(l,{class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:L=>o.deleteReport(P)},{default:w(()=>[N(x(t.$t("Delete Report")),1)]),_:1},8,["onClick"])]),_:2},1024)):O("",!0)]),_:2},1024)]),default:w(()=>[_(l,{class:"fcom_dot_menu edit_action",size:"small",text:""},{default:w(()=>[_(a,null,{default:w(()=>[_(p)]),_:1})]),_:1})]),_:2},1024)])])}),128))])])])):(v(),A("div",u1t,x(t.$t("No reports to review")),1)),s.pagination.total?(v(),A("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,d1t)):O("",!0)])):(v(),A("div",h1t,[g("div",f1t,[g("h3",p1t,x(t.$t("Content Moderation is disabled")),1),g("p",m1t,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:w(()=>[N(x(t.$t("Enable Content Moderation")),1)]),_:1},8,["loading"])])]))],64)):(v(),A("div",g1t,[g("p",v1t,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,_1t)]))])]),_: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 b1t=ue(Ggt,[["render",y1t]]),w1t={name:"Tools",components:{Layout:_i,AppLayout:yi},computed:{sitemapUrl(){return this.appVars.urls.portal_base+"site-maps/index.xml"},isPublicPortal(){return this.appVars.access_level==="public"}}},k1t=["href"],C1t={class:"settings_router"},x1t={class:"fhr_content_layout_body"},S1t={class:"setting_header"},$1t={key:0,class:"setting_body tools_body"},A1t={key:0,class:"sitemap_configured"},E1t={class:"sitemap_header"},M1t={class:"sitemap_body"},T1t=["href"],P1t={key:1,class:"setting_body",style:{"text-align":"center"}},I1t={class:"promo_description"},L1t=["href"];function O1t(t,e,n,i,s,o){const r=be,a=sa,l=H("layout"),c=H("app-layout");return v(),D(c,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(l,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Tools")},{actions:w(()=>[t.has_pro?O("",!0):(v(),A("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,k1t))]),default:w(()=>[g("div",C1t,[g("div",x1t,[g("div",S1t,[g("h2",null,x(t.$t("Sitemap Configuration")),1)]),t.has_pro?(v(),A("div",$1t,[o.isPublicPortal?(v(),A("div",A1t,[g("div",E1t,[_(r,null,{default:w(()=>[...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",M1t,[_(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,T1t)])])])):(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(),A("div",P1t,[g("p",I1t,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,L1t)]))])])]),_:1},8,["title"])]),_:1})}const D1t=ue(w1t,[["render",O1t]]),R1t={name:"PrivacySettings",components:{Layout:_i,AppLayout:yi},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"))}},V1t={class:"settings_router"},F1t={key:0,class:"white_loaded"},N1t={key:1,class:"fhr_content_layout_body"},B1t={class:"setting_body"},z1t={class:"fcom_help_text fcom_mt_10"},H1t={class:"fcom_help_text fcom_mt_10"},U1t={class:"fcom_help_text fcom_mt_10"},j1t={class:"fcom_help_text fcom_mt_10"},W1t={class:"fcom_input_wrap"},Y1t={key:0},q1t={class:"fcom_input_wrap"},G1t={key:0},X1t={class:"fcom_input_wrap"},K1t={class:"fcom_input_wrap"},Z1t={key:0},J1t={class:"fcom_input_wrap"},Q1t={class:"fcom_input_wrap"},evt={key:0,class:"fcom_input_wrap"},tvt={class:"fcom_input_wrap"},nvt={class:"fcom_input_wrap"},svt={style:{"margin-top":"50px"},class:"fcom_input_wrap"},ivt={key:2};function ovt(t,e,n,i,s,o){const r=He,a=Nt,l=b8,c=Li,u=ws,d=en,h=Yt,f=tn,p=H("layout"),m=H("app-layout"),y=xt("loading");return v(),D(m,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(p,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Privacy Settings")},{actions:w(()=>[Re((v(),D(r,{class:"fcom_primary_button",onClick:o.save},{default:w(()=>[g("span",null,x(t.$t("Save Settings")),1)]),_:1},8,["onClick"])),[[y,s.saving]])]),default:w(()=>[g("div",V1t,[s.loading?(v(),A("div",F1t,[_(a,{rows:5,animated:!0})])):s.settings?(v(),A("div",N1t,[g("div",B1t,[g("p",null,x(t.$t("Customize the privacy and compliance settings as per your needs.")),1),_(l),_(f,{onSubmit:e[13]||(e[13]=Ee(b=>t.doNothing(),["prevent"])),modelValue:s.settings,"onUpdate:modelValue":e[14]||(e[14]=b=>s.settings=b),"label-position":"top"},{default:w(()=>[_(d,{label:t.$t("Who can view all members page?")},{default:w(()=>[_(u,{modelValue:s.settings.members_page_status,"onUpdate:modelValue":e[0]||(e[0]=b=>s.settings.members_page_status=b),class:"fcom_radio_group"},{default:w(()=>[_(c,{border:"",value:"everybody"},{default:w(()=>[N(x(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:w(()=>[N(x(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:w(()=>[N(x(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",z1t,[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:w(()=>[_(u,{modelValue:s.settings.profile_page_visibility,"onUpdate:modelValue":e[1]||(e[1]=b=>s.settings.profile_page_visibility=b),class:"fcom_radio_group"},{default:w(()=>[_(c,{border:"",value:"everybody"},{default:w(()=>[N(x(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:w(()=>[N(x(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:w(()=>[N(x(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",H1t,[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:w(()=>[_(u,{modelValue:s.settings.leaderboard_members_visibility,"onUpdate:modelValue":e[2]||(e[2]=b=>s.settings.leaderboard_members_visibility=b),class:"fcom_radio_group"},{default:w(()=>[_(c,{border:"",value:"everybody"},{default:w(()=>[N(x(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:w(()=>[N(x(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:w(()=>[N(x(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",U1t,[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:w(()=>[_(u,{modelValue:s.settings.user_space_visibility,"onUpdate:modelValue":e[3]||(e[3]=b=>s.settings.user_space_visibility=b),class:"fcom_radio_group"},{default:w(()=>[_(c,{border:"",value:"everybody"},{default:w(()=>[N(x(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:w(()=>[N(x(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:w(()=>[N(x(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",j1t,[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",W1t,[_(h,{modelValue:s.settings.can_customize_username,"onUpdate:modelValue":e[4]||(e[4]=b=>s.settings.can_customize_username=b),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Allow users to change their community username"))+" ",1),t.has_pro?O("",!0):(v(),A("span",Y1t,"("+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",q1t,[_(h,{modelValue:s.settings.can_change_email,"onUpdate:modelValue":e[5]||(e[5]=b=>s.settings.can_change_email=b),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Allow users to change their account email address"))+" ",1),t.has_pro?O("",!0):(v(),A("span",G1t,"("+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",X1t,[_(h,{modelValue:s.settings.can_change_password,"onUpdate:modelValue":e[6]||(e[6]=b=>s.settings.can_change_password=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[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",K1t,[_(h,{modelValue:s.settings.email_auto_login,"onUpdate:modelValue":e[7]||(e[7]=b=>s.settings.email_auto_login=b),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[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(),A("span",Z1t,"("+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",J1t,[_(h,{modelValue:s.settings.enable_gravatar,"onUpdate:modelValue":e[8]||(e[8]=b=>s.settings.enable_gravatar=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[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",Q1t,[_(h,{modelValue:s.settings.enable_user_sync,"onUpdate:modelValue":e[9]||(e[9]=b=>s.settings.enable_user_sync=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[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(),A("div",evt,[_(h,{modelValue:s.settings.skip_crm_undeliverable_emails,"onUpdate:modelValue":e[10]||(e[10]=b=>s.settings.skip_crm_undeliverable_emails=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[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",tvt,[_(h,{"true-value":"yes","false-value":"no",modelValue:s.settings.show_last_activity,"onUpdate:modelValue":e[11]||(e[11]=b=>s.settings.show_last_activity=b),class:"fcom_checkbox"},{default:w(()=>[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",nvt,[_(h,{"true-value":"yes","false-value":"no",modelValue:s.settings.can_deactive_account,"onUpdate:modelValue":e[12]||(e[12]=b=>s.settings.can_deactive_account=b),class:"fcom_checkbox"},{default:w(()=>[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",svt,[Re((v(),D(r,{onClick:o.save,disabled:s.saving,class:"fcom_primary_button"},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[y,s.saving]])])]),_:1},8,["modelValue"])])])):(v(),A("div",ivt,[g("p",null,x(t.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const rvt=ue(R1t,[["render",ovt]]),avt={name:"SettingsRoute",components:{},data(){return{loading:!1}}};function lvt(t,e,n,i,s,o){const r=H("router-view");return v(),D(r)}const cvt=ue(avt,[["render",lvt]]),uvt={name:"CreateGroupForm",emits:["completed","dirty"],components:{ImageUploader:Ll,SlugInput:Yd,ErrorAlerts:J1},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})}},dvt={key:0},hvt={key:1};function fvt(t,e,n,i,s,o){const r=ft,a=en,l=H("slug-input"),c=Yt,u=H("error-alerts"),d=He,h=tn;return v(),D(h,{onSubmit:e[5]||(e[5]=Ee(f=>t.doNothing(),["prevent"])),modelValue:s.form,"onUpdate:modelValue":e[6]||(e[6]=f=>s.form=f),"label-position":"top"},{default:w(()=>[_(a,{label:t.$t("Group Title")},{default:w(()=>[_(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:w(()=>[_(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:w(()=>[_(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:w(()=>[_(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:w(()=>[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:w(()=>[_(d,{class:"fcom_primary_button",disabled:s.saving,onClick:e[4]||(e[4]=f=>o.submit()),loading:s.saving},{default:w(()=>[s.form.id?(v(),A("span",dvt,x(t.$t("Update Info")),1)):(v(),A("span",hvt,x(t.$t("Create")),1))]),_:1},8,["disabled","loading"])]),_:1})]),_:1},8,["modelValue"])}const pvt=ue(uvt,[["render",fvt]]),mvt={name:"MoveGroupPopup",components:{ActionPopover:oa},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})}}},gvt={style:{display:"inline-block",cursor:"pointer",width:"100%","text-align":"left"}};function vvt(t,e,n,i,s,o){const r=sn,a=Jt,l=en,c=He,u=tn,d=H("action-popover"),h=xt("loading");return v(),D(d,{placement:"bottom",width:350},{trigger:w(()=>[g("span",gvt,x(t.$t("Move")),1)]),default:w(({hide:f})=>[_(u,{onSubmit:e[1]||(e[1]=Ee(p=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(l,{label:t.$t("Move to a different Group")},{default:w(()=>[_(a,{placeholder:t.$t("Select Group"),modelValue:s.selectedGroupId,"onUpdate:modelValue":e[0]||(e[0]=p=>s.selectedGroupId=p)},{default:w(()=>[(v(!0),A(ee,null,we(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:w(()=>[N(x(t.$t("Move Space")),1)]),_:1},8,["disabled","onClick"])),[[h,s.working]])]),_:2},1024)]),_:1})}const _vt=ue(mvt,[["render",vvt]]),yvt={name:"SpaceLinkEditModal",components:{SidebarLinkForm:YH},emits:["completed"],props:["link"],data(){return{showModal:!0}}};function bvt(t,e,n,i,s,o){const r=H("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:w(()=>[_(r,{onCompleted:e[0]||(e[0]=l=>t.$emit("completed")),link:n.link},null,8,["link"])]),_:1},8,["width","modelValue","title"])}const wvt=ue(yvt,[["render",bvt]]),kvt={name:"SpaceGroups",components:{FluentDnD:za,ActionPopover:oa,ArrowDownBold:Kre,Drawer:tu,CreateSpaceForm:N8,CreateGroupForm:pvt,Layout:_i,AppLayout:yi,MoveGroupPopup:_vt,SpaceLinkEditModal:wvt},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)}},Cvt={class:"settings_router"},xvt={class:"fcom_communities"},Svt={class:"fcom_card_sections",style:{"margin-bottom":"16px"}},$vt={class:"fcom_card_section_heading"},Avt={key:1},Evt={class:"fcom_card_sections",style:{"margin-bottom":"0"}},Mvt={class:"fcom_section_primary_item_title"},Tvt={class:"fcom_heading_item"},Pvt={class:"fcom_space_counts"},Ivt={class:"fcom_section_item_actions"},Lvt={key:0,class:"fcom_section_items"},Ovt={class:"fcom_section_item_title"},Dvt={class:"fcom_heading_item"},Rvt={class:"fcom_section_item_actions"},Vvt=["href"],Fvt={class:"actions_items"},Nvt=["onClick"],Bvt=["onClick"],zvt={key:0,class:"fcom_card_sections",style:{"margin-top":"16px"}},Hvt={class:"fcom_section_primary_item fcom_no_top_border"},Uvt={class:"fcom_heading_item"},jvt={class:"fcom_section_items"},Wvt={class:"fcom_section_item"},Yvt={class:"fcom_section_item_title"},qvt={class:"fcom_heading_item"},Gvt={class:"fcom_section_item_actions"},Xvt=["href"],Kvt={class:"actions_items"},Zvt=["onClick"],Jvt=["onClick"],Qvt={key:0};function e0t(t,e,n,i,s,o){const r=He,a=Nt,l=H("ArrowDownBold"),c=be,u=H("Plus"),d=H("action-popover"),h=hi,f=H("MoveGroupPopup"),p=H("FluentDnD"),m=H("layout"),y=H("app-layout"),b=H("create-group-form"),k=H("drawer"),C=H("SpaceLinkEditModal"),$=xt("loading");return v(),A(ee,null,[_(y,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(m,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("All Space Groups")},{actions:w(()=>[_(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=S=>o.initCreateGroup())},{default:w(()=>[N(x(t.$t("Create New Group")),1)]),_:1})]),default:w(()=>[g("div",Cvt,[Re((v(),A("div",xvt,[g("div",Svt,[g("div",$vt,[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(),A("div",Avt,[_(p,{items:s.groups,onDrop:o.dropGroup,"item-class":"fcom_cursor_move",gap:"16px"},{item:w(({data:S})=>[g("div",Evt,[g("div",{class:q([{fcom_collapsed_group:s.collapsedGroups.indexOf(S.id)!==-1},"fcom_section_primary_item fcom_no_top_border"])},[g("div",Mvt,[e[6]||(e[6]=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)),g("div",Tvt,[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:w(()=>[_(c,null,{default:w(()=>[_(l)]),_:1}),g("span",Pvt,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:w(()=>[_(c,null,{default:w(()=>[_(u)]),_:1})]),_:1},8,["onClick"])])])]),g("div",Ivt,[_(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(),A("div",Lvt,[_(p,{items:S.spaces,"item-class":"fcom_section_item cursor-move","item-style":"padding: 15px 15px 15px 35px",onDrop:o.dropSpace},{item:w(({data:M,index:P})=>[g("div",Ovt,[e[7]||(e[7]=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)),g("p",Dvt,[N(x(M.title)+" ",1),M.status!="published"?(v(),D(h,{key:0,type:"info"},{default:w(()=>[N(x(t.$labelize(M.status)),1)]),_:2},1024)):O("",!0),_(h,null,{default:w(()=>[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:w(()=>[N(x(M.settings.permalink),1)]),_:2},1024)):(v(),D(h,{key:2,type:"info",class:"fcom_hover_show"},{default:w(()=>[N("ID: "+x(M.id),1)]),_:2},1024))])]),g("div",Rvt,[g("a",{target:"_blank",class:"el-button el-button--small el-button--secondary",href:M.permalink},x(t.$t("View")),9,Vvt),_(d,null,{default:w(({hide:T})=>[g("ul",Fvt,[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,Nvt),g("li",{class:"fcom_action_popover_item fcom_action_popover_item_danger",onClick:I=>{T(),o.initDeleteSpace(M)}},x(t.$t("Delete")),9,Bvt)])]),_:2},1024)])]),_:1},8,["items","onDrop"])])):O("",!0)])]),_:1},8,["items","onDrop"]),s.orphanedSpaces&&s.orphanedSpaces.length?(v(),A("div",zvt,[g("div",Hvt,[g("div",Uvt,[g("h4",null,x(t.$t("Other Spaces - No Assigned Group")),1)])]),g("div",jvt,[(v(!0),A(ee,null,we(s.orphanedSpaces,S=>(v(),A("div",Wvt,[g("div",Yvt,[g("p",qvt,[N(x(S.title)+" ",1),S.status!="published"?(v(),D(h,{key:0,type:"info"},{default:w(()=>[N(x(t.$labelize(S.status)),1)]),_:2},1024)):O("",!0),_(h,null,{default:w(()=>[N(x(o.getTypeTitle(S.type)),1)]),_:2},1024),_(h,{type:"info",class:"fcom_hover_show"},{default:w(()=>[N(" ID: "+x(S.id),1)]),_:2},1024)])]),g("div",Gvt,[g("a",{class:"el-button el-button--small el-button--secondary",target:"_blank",href:S.permalink},x(t.$t("View")),9,Xvt),_(d,null,{default:w(({hide:M})=>[g("ul",Kvt,[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,Zvt),g("li",{class:"fcom_action_popover_item fcom_action_popover_item_danger",onClick:P=>{M(),o.initDeleteSpace(S)}},x(t.$t("Delete")),9,Jvt)])]),_:2},1024)])]))),256))])])):O("",!0)]))])),[[$,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:w(()=>[s.showGroupDrawer?(v(),D(b,{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(),A("div",Qvt,[(v(),D(ea,{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 t0t=ue(kvt,[["render",e0t]]),n0t={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:""}}},s0t={class:"fcom_full_editor"},i0t=["aria-label"],o0t={class:"fcom_editor_menu object_menu"},r0t={class:"fcom_space_menu_ul"},a0t={class:"full_editor_actions"};function l0t(t,e,n,i,s,o){const r=H("ArrowLeft"),a=be,l=H("router-link"),c=He,u=j1,d=H1;return v(),D(ea,{to:"body"},[g("div",s0t,[_(d,null,{default:w(()=>[_(u,{class:"fcom_full_editor_header_wrap"},{default:w(()=>[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:w(()=>[_(r)]),_:1}),N(" "+x(n.back_title),1)],8,i0t),g("div",o0t,[g("ul",r0t,[(v(!0),A(ee,null,we(n.tabs,h=>(v(),A("li",{key:h.name},[_(l,{to:h.route},{default:w(()=>[N(x(h.title),1)]),_:2},1032,["to"])]))),128))])]),g("div",a0t,[n.show_save?(v(),D(c,{key:0,class:"fcom_primary_button",size:t.isMobile?"small":"default",disabled:n.saving,loading:n.saving,onClick:e[1]||(e[1]=h=>t.$emit("save"))},{default:w(()=>[N(x(n.save_label||t.$t("Save Changes")),1)]),_:1},8,["size","disabled","loading"])):O("",!0),n.show_close?(v(),D(c,{key:1,"aria-label":t.$t("Close"),onClick:e[2]||(e[2]=h=>t.$emit("back")),text:""},{default:w(()=>[...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:w(()=>[le(t.$slots,"default")]),_:3},8,["class"])]),_:3})])])}const PU=ue(n0t,[["render",l0t]]),IU={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)}}},c0t={name:"SpaceSettingsRoute",inheritAttrs:!1,mixins:[IU],components:{CustomizerShell:PU},setup(){return{spaceStore:$S()}},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"},tabs(){const t={space:this.space},e=[{name:"general",title:this.$t("General Settings"),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("Space Links"),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 u0t(t,e,n,i,s,o){const r=H("router-view"),a=H("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,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:w(()=>[_(r,null,{default:w(({Component:l})=>[(v(),D(Ct(l),Wt(o.childProps,xb(o.childListeners)),null,16))]),_:1})]),_:1},8,["back_title","tabs","saving","save_label","show_save"])):O("",!0)}const d0t=ue(c0t,[["render",u0t]]),h0t={name:"CourseSettingsRoute",inheritAttrs:!1,mixins:[IU],components:{CustomizerShell:PU},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 f0t(t,e,n,i,s,o){const r=H("router-view"),a=H("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:w(()=>[_(r,null,{default:w(({Component:l})=>[(v(),D(Ct(l),Wt(o.childProps,xb(o.childListeners)),null,16))]),_:1})]),_:1},8,["back_title","tabs","saving","save_label"])):O("",!0)}const p0t=ue(h0t,[["render",f0t]]),m0t={name:"WebhookForm",components:{SpaceIcon:xp},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})}}},g0t={key:0,class:"fcom_highlight_block"},v0t={style:{color:"#E6A23C"}},_0t={target:"_blank",rel:"noopener",href:"https://github.com/WPManageNinja/fluent-community-docs/blob/master/incoming-webhook-config.md"},y0t={key:0,class:"fcom_space_title"},b0t={key:0,class:"fcom_space_title"},w0t={key:0,class:"fcom_space_title"},k0t={key:0,class:"fcom_space_title"},C0t={class:"dialog_footer fcom_mt_20"},x0t={key:0},S0t={key:1};function $0t(t,e,n,i,s,o){const r=H("CopyDocument"),a=be,l=He,c=ft,u=sa,d=Il,h=Pl,f=en,p=H("SpaceIcon"),m=sn,y=Jt,b=jd,k=Ud,C=Yt,$=tn,S=xt("loading");return v(),D($,{onSubmit:e[8]||(e[8]=Ee(M=>t.doNothing(),["prevent"])),"label-position":"top",modelValue:s.form,"onUpdate:modelValue":e[9]||(e[9]=M=>s.form=M),size:"large"},{default:w(()=>[s.form.webhook_url?(v(),A("div",g0t,[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:w(()=>[_(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:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["value"]),_(u,{type:"info",closable:!1,class:"fcom_mb_20"},{default:w(()=>[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",v0t,x(t.$t("The email address is required!")),1),e[10]||(e[10]=N()),g("a",_0t,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:w(()=>[_(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:w(()=>[_(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:w(()=>[_(b,{sm:24,md:12},{default:w(()=>[_(f,{label:t.$t("Add to Spaces")},{default:w(()=>[_(y,{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:w(()=>[(v(!0),A(ee,null,we(n.spaces,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:w(()=>[M.id?(v(),A("span",y0t,[_(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}),_(b,{sm:24,md:12},{default:w(()=>[_(f,{label:t.$t("Remove from Spaces")},{default:w(()=>[_(y,{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:w(()=>[(v(!0),A(ee,null,we(n.spaces,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:w(()=>[M.id?(v(),A("span",b0t,[_(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:w(()=>[_(b,{sm:24,md:12},{default:w(()=>[_(f,{label:t.$t("Add to Courses")},{default:w(()=>[_(y,{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:w(()=>[(v(!0),A(ee,null,we(n.courses,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:w(()=>[M.id?(v(),A("span",w0t,[_(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}),_(b,{sm:24,md:12},{default:w(()=>[_(f,{label:t.$t("Remove from Courses")},{default:w(()=>[_(y,{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:w(()=>[(v(!0),A(ee,null,we(n.courses,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:w(()=>[M.id?(v(),A("span",k0t,[_(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:w(()=>[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:w(()=>[s.form.id?(v(),A("span",x0t,x(t.$t("Update Webhook")),1)):(v(),A("span",S0t,x(t.$t("Add Webhook")),1))]),_:1},8,["disabled"])),[[S,s.adding]])])])]),_:3},8,["modelValue"])}const A0t=ue(m0t,[["render",$0t]]),E0t={name:"IncomingWebhooks",components:{Pagination:uu,UserAvatar:j2,UserRouteLink:la,WebhookForm:A0t,Layout:_i,AppLayout:yi},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"],T0t={class:"settings_router manager_section"},P0t={class:"fhr_content_layout_body"},I0t={key:0,class:"setting_body"},L0t={class:"fcom_manager_actions"},O0t={class:"bulk_search"},D0t={class:"fcom_manager_table"},R0t={class:"fcom_webhook_url"},V0t={class:"fcom_table_action_col"},F0t=["aria-label"],N0t={key:1,class:"setting_body",style:{"text-align":"center"}},B0t=["href"],z0t={class:"dialog_header"},H0t={class:"dialog_body"};function U0t(t,e,n,i,s,o){const r=H("Plus"),a=be,l=He,c=ft,u=hi,d=Il,h=H("CopyDocument"),f=Pl,p=H("Pagination"),m=H("layout"),y=H("app-layout"),b=H("webhook-form"),k=$s,C=xt("loading");return v(),A(ee,null,[_(y,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(m,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Incoming Webhooks")},{actions:w(()=>[t.has_pro?(v(),D(l,{key:0,class:"fcom_primary_button",onClick:e[0]||(e[0]=$=>o.showForm(null))},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),g("span",null,x(t.$t("Add New Webhook")),1)]),_:1})):(v(),A("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:w(()=>[g("div",T0t,[g("div",P0t,[t.has_pro?(v(),A("div",I0t,[g("div",L0t,[g("div",O0t,[_(c,{modelValue:s.search,"onUpdate:modelValue":e[1]||(e[1]=$=>s.search=$),onKeydown:ut(o.fetch,["enter"]),placeholder:t.$t("Search"),class:"el-input-round"},{prefix:w(()=>[...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",D0t,[Re((v(),D(f,{data:s.webhooks,"empty-text":t.$t("No Webhooks Found")},{default:w(()=>[_(d,{label:t.$t("Title"),sortable:"","min-width":"160"},{default:w($=>[N(x($.row.value.title)+" ",1),$.row.value.running_count?(v(),D(u,{key:0,title:t.$t("Ran count"),size:"small"},{default:w(()=>[N(x($.row.value.running_count),1)]),_:2},1032,["title"])):O("",!0)]),_:1},8,["label"]),_(d,{label:t.$t("Webhook URL"),sortable:""},{default:w($=>[g("div",R0t,[_(c,{size:"small",value:$.row.webhook_url,readonly:""},{append:w(()=>[_(l,{"aria-label":t.$t("Copy webhook URL"),onClick:S=>o.copyToClipboard($.row.webhook_url),size:"small"},{default:w(()=>[_(a,null,{default:w(()=>[_(h)]),_:1})]),_:1},8,["aria-label","onClick"])]),_:2},1032,["value"])])]),_:1},8,["label"]),_(d,{label:t.$t("Actions"),width:150},{default:w($=>[g("div",V0t,[_(l,{onClick:S=>o.showForm($.row),size:"small"},{default:w(()=>[N(x(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(l,{onClick:S=>o.removeWebhook($.row),type:"danger",plain:"",size:"small"},{default:w(()=>[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]=$=>o.fetch()),pagination:s.paginate},null,8,["pagination"])],8,F0t)])):(v(),A("div",N0t,[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,B0t)]))])])]),_: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]=$=>s.showModal=$),direction:"rtl"},{header:w(({close:$})=>[g("div",z0t,[g("h4",null,x(t.$t(s.editing_webhook.id?"Update Webhook":"Add Webhook")),1)])]),default:w(()=>[g("div",H0t,[s.showModal?(v(),D(b,{key:0,onCompleted:e[3]||(e[3]=()=>{o.fetch(),s.showModal=!1}),modelValue:s.editing_webhook,"onUpdate:modelValue":e[4]||(e[4]=$=>s.editing_webhook=$),courses:s.courses,spaces:s.spaces},null,8,["modelValue","courses","spaces"])):O("",!0)])]),_:1},8,["width","modelValue"])],64)}const j0t=ue(E0t,[["render",U0t]]),W0t={name:"Overview",components:{AppLayout:yi,Layout:_i},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"))}},Y0t={class:"object_menu"},q0t={class:"fcom_space_menu_ul"};function G0t(t,e,n,i,s,o){const r=H("router-link"),a=H("RouterView"),l=H("layout"),c=H("app-layout");return v(),D(c,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:w(()=>[_(l,{wrapper_class:"no_bg_layout",title:t.$t("Reports")+" (Beta)"},{actions:w(()=>[g("div",Y0t,[g("ul",q0t,[(v(!0),A(ee,null,we(s.analyticsNavigations,(u,d)=>(v(),A("li",{key:`analytics-navigation-${d}`},[_(r,{to:{name:u.route}},{default:w(()=>[N(x(t.$t(u.title)),1)]),_:2},1032,["to"])]))),128))])])]),default:w(()=>[_(a)]),_:1},8,["title"])]),_:1})}const X0t=ue(W0t,[["render",G0t]]),K0t={name:"CheckProStatus"},Z0t={class:"upgrade-pro-wrapper"},J0t={class:"upgrade-text"},Q0t={class:"upgrade-button"},e_t=["href"];function t_t(t,e,n,i,s,o){return v(),A("div",Z0t,[g("div",J0t,[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",Q0t,[g("a",{href:t.$upgradeUrl("feature_lock_analytics"),class:"button",target:"_blank"},x(t.$t("Upgrade Now")),9,e_t)])])}const LS=ue(K0t,[["render",t_t],["__scopeId","data-v-492a58f0"]]),n_t={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)}}},s_t={class:"fcom-report-header"},i_t={class:"fcom-report-header-action"};function o_t(t,e,n,i,s,o){const r=sn,a=Jt,l=Wd;return v(),A("div",s_t,[g("h4",null,x(t.$t("Overview")),1),g("div",i_t,[_(a,{modelValue:s.localPredefinedDate,"onUpdate:modelValue":e[0]||(e[0]=c=>s.localPredefinedDate=c),onChange:o.setDateRange,class:"date-selector"},{default:w(()=>[(v(!0),A(ee,null,we(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 r_t=ue(n_t,[["render",o_t]]),a_t={name:"Loading",props:{section:{type:Number,default:()=>1}}};function l_t(t,e,n,i,s,o){const r=Nt;return v(!0),A(ee,null,we(n.section,a=>(v(),A("div",{class:"fcom-loading",key:`loading-spinner-item-${a}`},[_(r,{rows:5,loading:"",animated:""})]))),128)}const Ha=ue(a_t,[["render",l_t]]),c_t={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()}},u_t={key:1,class:"fcom-report-stat-widgets"},d_t={class:"stat-title"};function h_t(t,e,n,i,s,o){const r=H("Loading");return s.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",u_t,[(v(!0),A(ee,null,we(s.widgets,(a,l)=>(v(),A("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",d_t,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 f_t=ue(c_t,[["render",h_t]]);/*!
136 * ApexCharts v4.3.0
137 * (c) 2018-2024 ApexCharts
138 * Released under the MIT License.
139 */function Vx(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 LU(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 IT(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,RU(i.key),i)}}function ct(t,e,n){return e&&IT(t.prototype,e),n&&IT(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Am(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=OS(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 vv(t){var e=OU();return function(){var n,i=Jy(t);if(e){var s=Jy(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 LU(o)}(this,n)}}function Zy(t,e,n){return(e=RU(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Jy(t){return Jy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Jy(t)}function _v(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&&Fx(t,e)}function OU(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OU=function(){return!!t})()}function LT(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?LT(Object(n),!0).forEach(function(i){Zy(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):LT(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Fx(t,e){return Fx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Fx(t,e)}function DU(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)||OS(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 Vx(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||OS(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 RU(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 OS(t,e){if(t){if(typeof t=="string")return Vx(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)?Vx(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,Zy({},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}(),Ip=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 Nx={},VU=[];function Zt(t,e){if(Array.isArray(t))for(const n of t)Zt(n,e);else if(typeof t!="object")FU(Object.getOwnPropertyNames(e)),Nx[t]=Object.assign(Nx[t]||{},e);else for(const n in t)Zt(n,t[n])}function to(t){return Nx[t]||{}}function FU(t){VU.push(...t)}function DS(t,e){let n;const i=t.length,s=[];for(n=0;n<i;n++)s.push(e(t[n]));return s}function H3(t){return t%360*Math.PI/180}function Lp(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Op(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 Bx(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 p_t=new Set(["desc","metadata","title"]),zx=t=>p_t.has(t.nodeName),NU=(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"))},RS="http://www.w3.org/2000/svg",U3="http://www.w3.org/2000/xmlns/",Dp="http://www.w3.org/1999/xlink",vn={window:typeof window>"u"?null:window,document:typeof document>"u"?null:document};function yv(){return vn.window}let VS=class{};const cd={},FS="___SYMBOL___ROOT___";function v1(t,e=RS){return vn.document.createElementNS(e,t)}function Ui(t,e=!1){if(t instanceof VS)return t;if(typeof t=="object")return j3(t);if(t==null)return new cd[FS];if(typeof t=="string"&&t.charAt(0)!=="<")return j3(vn.document.querySelector(t));const n=e?vn.document.createElement("div"):v1("svg");return n.innerHTML=t,t=j3(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:v1(t)}function sr(t){if(!t)return null;if(t.instance instanceof VS)return t.instance;if(t.nodeName==="#document-fragment")return new cd.Fragment(t);let e=Lp(t.nodeName||"Dom");return e==="LinearGradient"||e==="RadialGradient"?e="Gradient":cd[e]||(e="Dom"),new cd[e](t)}let j3=sr;function yn(t,e=t.name,n=!1){return cd[e]=t,n&&(cd[FS]=t),FU(Object.getOwnPropertyNames(t.prototype)),t}let m_t=1e3;function BU(t){return"Svgjs"+Lp(t)+m_t++}function zU(t){for(let e=t.children.length-1;e>=0;e--)zU(t.children[e]);return t.id&&(t.id=BU(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)}}Zt("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 HU=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,g_t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,v_t=/rgb\((\d+),(\d+),(\d+)\)/,__t=/(#[a-z_][a-z0-9\-_]*)/i,y_t=/\)\s*,?\s*/,b_t=/\s/g,OT=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,DT=/^rgb\(/,RT=/^(\s+)?$/,VT=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,w_t=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Rl=/[\s,]+/,NS=/[MLHVCSQTAZ]/i;function k_t(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 W3(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}Zt("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)}}),Zt("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||RT.test(t[i])?"":t[i])}return arguments.length===2&&this.node.style.setProperty(t,e==null||RT.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return this.css("display")!=="none"}}),Zt("Dom",{data:function(t,e,n){if(t==null)return this.data(DS(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}}),Zt("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"&&(OT.test(e)||DT.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(DT.test(e)){const d=e.replace(b_t,""),[h,f,p]=v_t.exec(d).slice(1,4).map(m=>parseInt(m));Object.assign(this,{_a:h,_b:f,_c:p,_d:0,space:"rgb"})}else{if(!OT.test(e))throw Error("Unsupported string format, can't construct Color");{const d=m=>parseInt(m,16),[,h,f,p]=g_t.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 y=(f+16)/116,b=p/500+y,k=y-m/200,C=16/116,$=.008856,S=7.787;n=.95047*(b**3>$?b**3:(b-C)/S),i=1*(y**3>$?y**3:(y-C)/S),s=1.08883*(k**3>$?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*W3(r,o,n+1/3),l=255*W3(r,o,n),c=255*W3(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(k_t);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(y=>y/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 UU{constructor(...e){this.init(...e)}clone(){return new UU(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,y=p.y,b=new Dn(e.translate||e.tx||e.translateX,e.ty||e.translateY),k=b.x,C=b.y,$=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:$.x,ry:$.y,tx:k,ty:C,ox:h,oy:f,px:m,py:y}}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),y=(i*o+s*r)/c,b=o*d/(y*i-s)||r*d/(y*s+i);return{scaleX:d,scaleY:b,shear:y,rotate:f,translateX:a-e+e*p*d+n*(y*p*d-m*b),translateY:l-n+e*m*d+n*(y*m*d+p*b),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 pi?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=H3(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=H3(e),n=H3(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 jU(t){return!(t.width||t.height||t.x||t.y)}yn(ln,"Matrix");let Ws=class w_{constructor(...e){this.init(...e)}addOffset(){return this.x+=vn.window.pageXOffset,this.y+=vn.window.pageYOffset,new w_(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 jU(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 w_(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 w_(n,s,i-n,o-s)}};function FT(t,e,n){let i;try{if(i=e(t.node),jU(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}Zt({viewbox:{viewbox(t,e,n,i){return t==null?new Ws(this.attr("viewBox")):this.attr("viewBox",new Ws(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 Ws(s).transform(new ln({scale:l,origin:e}));return this.viewbox(c)}}}),yn(Ws,"Box");let Ed=class extends Array{constructor(e=[],...n){if(super(e,...n),typeof e=="number")return this;this.length=0,this.push(...e)}};At([Ed],{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 C_t=["toArray","constructor","each"];function eh(t,e){return new Ed(DS((e||vn.document).querySelectorAll(t),function(n){return sr(n)}))}Ed.extend=function(t){t=t.reduce((e,n)=>(C_t.includes(n)||n[0]==="_"||(n in Array.prototype&&(e["$"+n]=Array.prototype[n]),e[n]=function(...i){return this.each(n,...i)}),e),{}),At([Ed],t)};let x_t=0;const WU={};function YU(t){let e=t.getEventHolder();return e===vn.window&&(e=WU),e.events||(e.events={}),e.events}function BS(t){return t.getEventTarget()}function cl(t,e,n,i,s){const o=n.bind(i||t),r=Ui(t),a=YU(r),l=BS(r);e=Array.isArray(e)?e:e.split(Rl),n._svgjsListenerId||(n._svgjsListenerId=++x_t),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=YU(s),r=BS(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=WU),f.events&&(f.events={})})(s)}})}class bv extends VS{addEventListener(){}dispatch(e,n,i){return function(s,o,r,a){const l=BS(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 NT(){}yn(bv,"EventTarget");const Y3=400,S_t=">",$_t=0,A_t={"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 Md 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(HU))&&(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 E_t=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),qU=[];class Wc extends bv{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 Ed(DS(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=zU(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(v1(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=BU(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,RS)}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=v1("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]=VT.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?A_t[t]:VT.test(e)?parseFloat(e):e;typeof(e=qU.reduce((i,s)=>s(t,i,this),e))=="number"?e=new Ht(e):E_t.has(t)&&Ln.isColor(e)?e=new Ln(e):e.constructor===Array&&(e=new Md(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 pi=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 Ed;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(__t);return e?Ui(e[1]):null}root(){const t=this.parent(function(e){return cd[e]}(FS));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=Op(this,t,e);return this.width(new Ht(n.width)).height(new Ht(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return NU(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}};At(pi,{bbox:function(){const t=FT(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 Ws(t)},rbox:function(t){const e=FT(this,i=>i.getBoundingClientRect(),i=>{throw new Error(`Getting rbox of element "${i.node.nodeName}" is not possible`)}),n=new Ws(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(pi,"Element");const Qp={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 pi)this.attr(t,i);else for(n=Qp[t].length-1;n>=0;n--)i[Qp[t][n]]!=null&&this.attr(Qp.prefix(t,Qp[t][n]),i[Qp[t][n]]);return this},Zt(["Element","Runner"],e)}),Zt(["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)}}),Zt("radius",{radius:function(t,e=t){return(this._element||this).type==="radialGradient"?this.attr("r",new Ht(t)):this.rx(t).ry(e)}}),Zt("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Dn(this.node.getPointAtLength(t))}}),Zt(["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)}});Zt("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},{})),Zt("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(y_t).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(zx(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:Bx(t,this)});const n=new ln(e===!0?this:e||!1).transform(t);return this.attr("transform",n)}});class Ji extends pi{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 K2 extends Ji{constructor(e,n=e){super(Bn("defs",e),n)}flatten(){return this}ungroup(){return this}}yn(K2,"Defs");class Xo extends pi{}function zS(t){return this.attr("rx",t)}function HS(t){return this.attr("ry",t)}function GU(t){return t==null?this.cx()-this.rx():this.cx(t+this.rx())}function XU(t){return t==null?this.cy()-this.ry():this.cy(t+this.ry())}function KU(t){return this.attr("cx",t)}function ZU(t){return this.attr("cy",t)}function JU(t){return t==null?2*this.rx():this.rx(new Ht(t).divide(2))}function QU(t){return t==null?2*this.ry():this.ry(new Ht(t).divide(2))}yn(Xo,"Shape");var M_t=Object.freeze({__proto__:null,cx:KU,cy:ZU,height:QU,rx:zS,ry:HS,width:JU,x:GU,y:XU});class k_ extends Xo{constructor(e,n=e){super(Bn("ellipse",e),n)}size(e,n){const i=Op(this,e,n);return this.rx(new Ht(i.width).divide(2)).ry(new Ht(i.height).divide(2))}}At(k_,M_t),Zt("Container",{ellipse:Nn(function(t=0,e=t){return this.put(new k_).size(t,e).move(0,0)})}),yn(k_,"Ellipse");class ej 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(v1("wrapper",i));return s.add(this.node.cloneNode(!0)),s.xml(!1,i)}return super.xml(e,!1,i)}}function tj(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 nj(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(ej,"Fragment");var T_t=Object.freeze({__proto__:null,from:tj,to:nj});class vg 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 Ws}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(vg,T_t),Zt({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:Nn(function(t,e){return this.put(new vg(t)).update(e)})}}),yn(vg,"Gradient");class _1 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 Ws}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()+")"}}Zt({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:Nn(function(t,e,n){return this.put(new _1).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})})}}),yn(_1,"Pattern");let C_=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(_1);this.width()===0&&this.height()===0&&this.size(n.width,n.height),s instanceof _1&&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,Dp)}};var BT;BT=function(t,e,n){return t!=="fill"&&t!=="stroke"||w_t.test(e)&&(e=n.root().defs().image(e)),e instanceof C_&&(e=n.root().defs().pattern(0,0,i=>{i.add(e)})),e},qU.push(BT),Zt({Container:{image:Nn(function(t,e){return this.put(new C_).size(0,0).load(t,e)})}}),yn(C_,"Image");class Yc extends Md{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 Ws(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 P_t=Yc;var US=Object.freeze({__proto__:null,MorphArray:P_t,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 Uu=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=Op(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}};At(Uu,US),Zt({Container:{line:Nn(function(...t){return Uu.prototype.plot.apply(this.put(new Uu),t[0]!=null?t:[0,0,0,0])})}}),yn(Uu,"Line");let x_=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)}}Zt({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:Nn(function(t,e,n){return this.put(new x_).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 x_?arguments[1]:this.defs().marker(e,n,i),this.attr(s,t)}}}),yn(x_,"Marker");const I_t={"-":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 jS{done(){return!1}}class Hx extends jS{constructor(e=S_t){super(),this.ease=I_t[e]||e}step(e,n,i){return typeof e!="number"?i<1?e:n:e+(n-e)*this.ease(i)}}class Qy extends jS{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,n,i,s){return this.stepper(e,n,i,s)}}function zT(){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 Qy{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",zT),overshoot:Xh("_overshoot",zT)});At(class extends Qy{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 L_t={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Ux={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]]}},q3="mlhvqtcsaz".split("");for(let t=0,e=q3.length;t<e;++t)Ux[q3[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 Ux[n](i,s,o)}}(q3[t].toUpperCase());function jx(t){return t.segment.length&&t.segment.length-1===L_t[t.segment[0].toUpperCase()]}function O_t(t,e){t.inNumber&&Mu(t,!1);const n=NS.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 Mu(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,jx(t)&&Wx(t)}function Wx(t){t.inSegment=!1,t.absolute&&(t.segment=function(e){const n=e.segment[0];return Ux[n](e.segment.slice(1),e.p,e.p0)}(t)),t.segments.push(t.segment)}function D_t(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 R_t(t){return t.lastToken.toUpperCase()==="E"}const V_t=new Set([" ",","," ",`
143 `,"\r","\f"]);class Dr extends Md{bbox(){return _c().path.setAttribute("d",this.toString()),new Ws(_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||!O_t(r,o))if(o!==".")if(isNaN(parseInt(o)))if(V_t.has(o))r.inNumber&&Mu(r,!1);else if(o!=="-"&&o!=="+")if(o.toUpperCase()!=="E"){if(NS.test(o)){if(r.inNumber)Mu(r,!1);else{if(!jx(r))throw new Error("parser Error");Wx(r)}--s}}else r.number+=o,r.hasExponent=!0;else{if(r.inNumber&&!R_t(r)){Mu(r,!1),--s;continue}r.number+=o,r.inNumber=!0}else{if(r.number==="0"||D_t(r)){r.inNumber=!0,r.number=o,Mu(r,!0);continue}r.inNumber=!0,r.number+=o}else{if(r.pointSeen||r.hasExponent){Mu(r,!1),--s;continue}r.inNumber=!0,r.pointSeen=!0,r.number+=o}return r.inNumber&&Mu(r,!1),r.inSegment&&jx(r)&&Wx(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 sj=t=>{const e=typeof t;return e==="number"?Ht:e==="string"?Ln.isColor(t)?Ln:Rl.test(t)?NS.test(t)?Dr:Md:HU.test(t)?Ht:Yx:qx.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Md:e==="object"?y1:Yx};class Tu{constructor(e){this._stepper=e||new Hx("-"),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(sj(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===y1&&(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 Yx{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 wv{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,wv.defaults,e),this}toArray(){const e=this;return[e.scaleX,e.scaleY,e.shear,e.rotate,e.translateX,e.translateY,e.originX,e.originY]}}wv.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const F_t=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class y1{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=sj(e[i]),o=new s(e[i]).toArray();n.push([i,s,o.length,...o])}return n.sort(F_t),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 qx=[Yx,wv,y1];class bf extends Xo{constructor(e,n=e){super(Bn("path",e),n)}array(){return this._array||(this._array=new Dr(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 Dr(e))}size(e,n){const i=Op(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=Dr,Zt({Container:{path:Nn(function(t){return this.put(new bf).plot(t||new Dr)})}}),yn(bf,"Path");var ij=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=Op(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}});class ju extends Xo{constructor(e,n=e){super(Bn("polygon",e),n)}}Zt({Container:{polygon:Nn(function(t){return this.put(new ju).plot(t||new Yc)})}}),At(ju,US),At(ju,ij),yn(ju,"Polygon");class Wu extends Xo{constructor(e,n=e){super(Bn("polyline",e),n)}}Zt({Container:{polyline:Nn(function(t){return this.put(new Wu).plot(t||new Yc)})}}),At(Wu,US),At(Wu,ij),yn(Wu,"Polyline");class S_ extends Xo{constructor(e,n=e){super(Bn("rect",e),n)}}At(S_,{rx:zS,ry:HS}),Zt({Container:{rect:Nn(function(t,e){return this.put(new S_).size(t,e)})}}),yn(S_,"Rect");class G3{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 G3,timeouts:new G3,immediates:new G3,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}},N_t=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},B_t=function(){const t=vn.window;return(t.performance||t.Date).now()};class oj extends bv{constructor(e=B_t){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(N_t);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)}}Zt({Element:{timeline:function(t){return t==null?(this._timeline=this._timeline||new oj,this._timeline):(this._timeline=t,this)}}});class No extends bv{constructor(e){super(),this.id=No.id++,e=typeof(e=e??Y3)=="function"?new Qy(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration=typeof e=="number"&&e,this._isDeclarative=e instanceof Qy,this._stepper=this._isDeclarative?e:new Hx,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??$_t,i=i||"last",typeof(e=e??Y3)!="object"||e instanceof jS||(n=e.delay??n,i=e.when??i,o=e.swing||o,s=e.times??s,r=e.wait??r,e=e.duration??Y3),{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=No.sanitise(e,n,i),o=new No(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 Hx(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,y=Math.pow(-1,m)*(f%(s+i))/i+m;return Math.max(Math.min(y,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||NT,runner:n||NT,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 oj||(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}}No.id=0;class eb{constructor(e=new ln,n=-1,i=!0){this.transforms=e,this.id=n,this.done=i}clearTransformsFromQueue(){}}At([No,eb],{mergeWith(t){return new eb(t.transforms.lmultiply(this.transforms),t.id)}});const rj=(t,e)=>t.lmultiplyO(e),aj=t=>t.transforms;function z_t(){const t=this._transformationRunners.runners.map(aj).reduce(rj,new ln);this.transform(t),this._transformationRunners.merge(),this._transformationRunners.length()===1&&(this._frameId=null)}class H_t{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 eb).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}}Zt({Element:{animate(t,e,n){const i=No.sanitise(t,e,n),s=this.timeline();return new No(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(aj).reduce(rj,new ln)},_addRunner(t){this._transformationRunners.add(t),Tn.cancelImmediate(this._frameId),this._frameId=Tn.immediate(z_t.bind(this))},_prepareRunner(){this._frameId==null&&(this._transformationRunners=new H_t().add(new eb(new ln(this))))}}});At(No,{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 Tu(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 y1(s.from()).valueOf();Object.assign(h,d),s.from(h)}const u=new y1(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 Tu(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 Tu(this._stepper).type(n?wv:ln);let o,r,a,l,c;return this.queue(function(){r=r||this.element(),o=o||Bx(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 y=f.rotate,b=p.rotate,k=[y-360,y,y+360],C=k.map(M=>Math.abs(M-b)),$=Math.min(...C),S=C.indexOf($);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=Bx(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 Tu(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 Tu(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 Tu(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 Ws(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(No,{rx:zS,ry:HS,from:tj,to:nj}),yn(No,"Runner");class Gx 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 K2):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:RS,version:"1.1"}).attr("xmlns:xlink",Dp,U3):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,U3).attr("xmlns:svgjs",null,U3)}root(){return this.isRoot()?this:super.root()}}Zt({Container:{nested:Nn(function(){return this.put(new Gx)})}}),yn(Gx,"Svg",!0);let Xx=class extends Ji{constructor(t,e=t){super(Bn("symbol",t),e)}};Zt({Container:{symbol:Nn(function(){return this.put(new Xx)})}}),yn(Xx,"Symbol");var lj=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 Rr 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(zx(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 NU(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"||zx(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(Rr,lj),Zt({Container:{text:Nn(function(t=""){return this.put(new Rr).text(t)}),plain:Nn(function(t=""){return this.put(new Rr).plain(t)})}}),yn(Rr,"Text");class $_ 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 Rr))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($_,lj),Zt({Tspan:{tspan:Nn(function(t=""){const e=new $_;return this._build||this.clear(),this.put(e).text(t)})},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),yn($_,"Tspan");class X3 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(X3,{x:GU,y:XU,cx:KU,cy:ZU,width:JU,height:QU}),Zt({Container:{circle:Nn(function(t=0){return this.put(new X3).size(t).move(0,0)})}}),yn(X3,"Circle");class K3 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()+"]")}}Zt({Container:{clip:Nn(function(){return this.defs().put(new K3)})},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof K3?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),yn(K3,"ClipPath");class HT extends pi{constructor(e,n=e){super(Bn("foreignObject",e),n)}}Zt({Container:{foreignObject:Nn(function(t,e){return this.put(new HT).size(t,e)})}}),yn(HT,"ForeignObject");var cj=Object.freeze({__proto__:null,dmove:function(t,e){return this.children().forEach(n=>{let i;try{i=n.node instanceof yv().SVGSVGElement?new Ws(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=Op(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,cj),Zt({Container:{group:Nn(function(){return this.put(new Oc)})}}),yn(Oc,"G");class g0 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,Dp)}}At(g0,cj),Zt({Container:{link:Nn(function(t){return this.put(new g0).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 g0,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(g0,"A");class Z3 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()+"]")}}Zt({Container:{mask:Nn(function(){return this.defs().put(new Z3)})},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof Z3?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),yn(Z3,"Mask");class UT extends pi{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}}Zt({Gradient:{stop:function(t,e,n){return this.put(new UT).update(t,e,n)}}}),yn(UT,"Stop");class J3 extends pi{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))}}Zt("Dom",{style(t,e){return this.put(new J3).rule(t,e)},fontface(t,e,n){return this.put(new J3).font(t,e,n)}}),yn(J3,"Style");class Q3 extends Rr{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")}}Zt({Container:{textPath:Nn(function(t,e){return t instanceof Rr||(t=this.text(t)),t.path(e)})},Text:{path:Nn(function(t,e=!0){const n=new Q3;let i;if(t instanceof bf||(t=this.defs().path(t)),n.attr("href","#"+t,Dp),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 Rr||(t=new Rr().addTo(this.parent()).text(t)),t.path(this)}),targets(){return eh("svg textPath").filter(t=>(t.attr("href")||"").includes(this.id()))}}}),Q3.prototype.MorphArray=Dr,yn(Q3,"TextPath");class jT extends Xo{constructor(e,n=e){super(Bn("use",e),n)}use(e,n){return this.attr("href",(n||"")+"#"+e,Dp)}}Zt({Container:{use:Nn(function(t,e){return this.put(new jT).use(t,e)})}}),yn(jT,"Use");const U_t=Ui;At([Gx,Xx,C_,_1,x_],to("viewbox")),At([Uu,Wu,ju,bf],to("marker")),At(Rr,to("Text")),At(bf,to("Path")),At(K2,to("Defs")),At([Rr,$_],to("Tspan")),At([S_,k_,vg,No],to("radius")),At(bv,to("EventTarget")),At(Wc,to("Dom")),At(pi,to("Element")),At(Xo,to("Shape")),At([Ji,ej],to("Container")),At(vg,to("Gradient")),At(No,to("Runner")),Ed.extend([...new Set(VU)]),function(t=[]){qx.push(...[].concat(t))}([Ht,Ln,Ws,ln,Md,Yc,Dr,Dn]),At(qx,{to(t){return new Tu().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 pi{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 WS extends pi{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])},j_t={blend:Jo(["in","in2","mode"]),colorMatrix:Jo(["type","values"]),composite:Jo(["in","in2","operator"]),convolveMatrix:function(t){t=new Md(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,Dp)},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=Lp(t),n=j_t[t];Xn[e+"Effect"]=class extends WS{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=Lp(t);Xn[e]=class extends WS{constructor(n){super(Bn("fe"+e,n),n)}}});["funcR","funcG","funcB","funcA"].forEach(function(t){const e=Xn[Lp(t)],n=Nn(function(){return this.put(new e)});Xn.ComponentTransferEffect.prototype[t]=n});["distantLight","pointLight","spotLight"].forEach(t=>{const e=Xn[Lp(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(K2,{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(pi,{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 W_t={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(WS,W_t),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 ci=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,B=Math.sqrt(R*R+V*V);return s(T,I,Math.min(1,L/B))}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,y,b=r(h),k=r(f),C=r(p);m=i(k,b,n),y=i(k,C,n),o(f,m),f.origPoint=k,l.push(f);var $=s(m,k,.5),S=s(k,y,.5),M=["C",$.x,$.y,S.x,S.y,y.x,y.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,y=e.strokeDashArray,b=y===void 0?0:y,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":b,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,y=e.shouldClipToGrid,b=y===void 0||y,k=e.bindEventsOnPaths,C=k===void 0||k,$=e.drawShadow,S=$===void 0||$,M=this.w,P=new ci(this.ctx),T=new Ip(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,B=0;B=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:B});F.attr("index",s),b&&(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 z={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({},z),{},{speed:h})),M.globals.dataChanged&&L&&R&&T.animatePathsGradually(tt(tt({},z),{},{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 y=!(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(y?"radial":"linear",function(C){(Array.isArray(c[u])?c[u]:c).forEach(function($){C.stop($.offset/100,$.color,$.opacity)})}):d.globals.dom.Paper.gradient(y?"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)}),y){var b=d.globals.gridWidth/2,k=d.globals.gridHeight/2;d.config.chart.type!=="bubble"?r.attr({gradientUnits:"userSpaceOnUse",cx:b,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,y=m===void 0||m,b=e.dominantBaseline,k=b===void 0?"auto":b,C=this.w;o===void 0&&(o="");var $=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++)$=o[T],h&&($=n.getTextBasedOnMaxWidth(tt({text:o[T]},M))),T===0?P.tspan($):P.tspan($).newLine()}):(h&&($=this.getTextBasedOnMaxWidth(tt({text:o},M))),S=y?C.globals.dom.Paper.plain(o):C.globals.dom.Paper.text(function(P){return P.tspan($)})),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 ci(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 ci(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 ci(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(y,b){if(y.name===m){var k=b;h===b||r?!r||o.indexOf(b)>-1?i[h].push([h,b]):console.warn("Series '"+y.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[b].push([b,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(y,b){var k=o.config.yaxis[o.globals.seriesYAxisReverseMap[b]],C=y<0?-1:1;return y=Math.abs(y),k.logarithmic&&(y=s.getBaseLog(k.logBase,y)),-C*y/a[b]};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}(),Z2=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}(),Y_t=function(){function t(e){lt(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Z2(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 y=this.annoCtx.graphics.getTextRects(u,parseFloat(e.label.style.fontSize)),b=e.label.position==="top"?4:e.label.position==="center"?o.globals.gridHeight/2+(e.label.orientation==="vertical"?y.width/2:0):o.globals.gridHeight,k=this.annoCtx.graphics.drawText({x:a+e.label.offsetX,y:b+e.label.offsetY-(e.label.orientation==="vertical"?e.label.position==="top"?y.width/2-12:-y.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}(),ii=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 y=s?e.getUTCSeconds():e.getSeconds();n=(n=n.replace(/(^|[^\\])ss+/g,"$1"+c(y))).replace(/(^|[^\\])s/g,"$1"+y);var b=s?e.getUTCMilliseconds():e.getMilliseconds();n=n.replace(/(^|[^\\])fff+/g,"$1"+c(b,3)),b=Math.round(b/10),n=n.replace(/(^|[^\\])ff/g,"$1"+c(b)),b=Math.round(b/10);var k=f<12?"AM":"PM";n=(n=(n=n.replace(/(^|[^\\])f/g,"$1"+b)).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 $=-e.getTimezoneOffset(),S=s||!$?"Z":$>0?"+":"-";if(!s){var M=($=Math.abs($))%60;S+=c(Math.floor($/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}(),kv=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 ii(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 kv(this.ctx),m=c;a&&(u=p.xLabelFormat(d,c,m,{i:s,dateFormatter:new ii(this.ctx).formatDate,w:l}),h!==void 0&&(u=h(c,e[s],{i:s,dateFormatter:new ii(this.ctx).formatDate,w:l})));var y,b;n.length>0?(y=n[s].unit,b=null,n.forEach(function(S){S.unit==="month"?b="year":S.unit==="day"?b="month":S.unit==="hour"?b="day":S.unit==="minute"&&(b="hour")}),f=b===y,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 $=!l.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(u)&&(String(u)==="NaN"||o.indexOf(u)>=0&&$)&&(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}(),q_t=function(){function t(e){lt(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Z2(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 y=e.label.position==="right"?o.globals.gridWidth:e.label.position==="center"?o.globals.gridWidth/2:0,b=this.annoCtx.graphics.drawText({x:y+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:"")});b.attr({rel:i}),n.appendChild(b.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}(),G_t=function(){function t(e){lt(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Z2(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}(),uj={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"}}},Ou=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:[uj],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}(),X_t=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 Z2(this),this.xAxisAnnotations=new Y_t(this),this.yAxisAnnotations=new q_t(this),this.pointsAnnotations=new G_t(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,y=e.borderColor,b=e.appendTo,k=b===void 0?".apexcharts-svg":b,C=e.paddingLeft,$=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}),B=R.globals.dom.baseEl.querySelector(k);B&&B.appendChild(V.node);var F=V.bbox();if(o){var z=this.graphics.drawRect(F.x-$,F.y-L,F.width+$+M,F.height+T+L,m,h||"transparent",1,f,y,p);B.insertBefore(z.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 y=i.globals.dom.baseEl.querySelector(p);return y&&y.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 Ou,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}(),ek=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 kv(i).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new ii(i).formatDate,w:l})),typeof f=="function"&&(d=f(d,m)),Number.isFinite(r)&&Number.isFinite(a)&&(c=r,u=a);var y="",b="",k=l.globals.colors[s];if(l.config.tooltip.x.formatter===void 0)if(l.config.xaxis.type==="datetime"){var C=new ii(i);y=C.formatDate(C.getDate(c),l.config.tooltip.x.format),b=C.formatDate(C.getDate(u),l.config.tooltip.x.format)}else y=c,b=u;else y=l.config.tooltip.x.formatter(c),b=l.config.tooltip.x.formatter(u);return{start:c,end:u,startVal:y,endVal:b,ylabel:d,color:k,seriesName:h}},tk=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>"},b1=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=ek(tt(tt({},n),{},{isTimeline:!0})),s=i.color,o=i.seriesName,r=i.ylabel,a=i.startVal,l=i.endVal;return tk(tt(tt({},n),{},{color:s,seriesName:o,ylabel:r,start:a,end:l}))}(e):function(n){var i=ek(n),s=i.color,o=i.seriesName,r=i.ylabel,a=i.start,l=i.end;return tk(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=ek(n),s=i.color,o=i.seriesName,r=i.ylabel,a=i.start,l=i.end;return tk(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}(),w1=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 Ou,o=new b1(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,y,b,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||(y=window.Apex.chart)!==null&&y!==void 0&&(b=y.sparkline)!==null&&b!==void 0&&b.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 b1(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 Ou;(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 Ou;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 Ou;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 Ou;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}(),dj=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}(),K_t=function(){function t(e){lt(this,t),this.opts=e}return ct(t,[{key:"init",value:function(){var e=new w1(this.opts).init({responsiveOverride:!1});return{config:e,globals:new dj().init(e)}}}]),t}(),qr=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=Am(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),y=Array.isArray(c.fill.opacity)?c.fill.opacity[this.seriesIndex]:c.fill.opacity,b=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,y)):d.indexOf("rgba")>-1?y=he.getOpacityFromRGBA(d):k=he.hexToRgba(he.rgb2hex(d),y),e.opacity&&(y=e.opacity),m==="pattern"&&(a=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:a,fillColor:d,fillOpacity:y,defaultColor:k})),b){var C=Ns(c.fill.gradient.colorStops)||[],$=c.fill.gradient.type;u&&(C[this.seriesIndex]=this.computeColorStops(o.globals.series[this.seriesIndex],c.plotOptions.line.colors),$="vertical"),l=this.handleGradientFill({type:$,fillConfig:e.fillConfig,fillColor:d,fillOpacity:y,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:y,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=b?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 y=l.gradient.gradientToColors[c.seriesNumber];h=y,y.indexOf("rgba")>-1&&(m=he.getOpacityFromRGBA(y))}else h=i;if(l.gradient.gradientFrom&&(f=l.gradient.gradientFrom),l.gradient.gradientTo&&(h=l.gradient.gradientTo),l.gradient.inverseColors){var b=f;f=h,h=b}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}(),Rp=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 y="apexcharts-marker";if(r.config.chart.type!=="line"&&r.config.chart.type!=="area"||r.globals.comboCharts||r.config.tooltip.intersect||(y+=" no-pointer-events"),(Array.isArray(r.config.markers.size)?r.globals.markers.size[n]>0:r.config.markers.size>0)||o||d){m||(y+=" w".concat(he.randomId()));var b=this.getMarkerConfig({cssClass:y,seriesIndex:n,dataPointIndex:p});r.config.series[a].data[p]&&(r.config.series[a].data[p].fillColor&&(b.pointFillColor=r.config.series[a].data[p].fillColor),r.config.series[a].data[p].strokeColor&&(b.pointStrokeColor=r.config.series[a].data[p].strokeColor)),s!==void 0&&(b.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)&&(b.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],b)).attr("rel",p),f.attr("j",p),f.attr("index",n),f.node.setAttribute("default-marker-size",b.pSize),new ci(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(y){y.seriesIndex===i&&y.dataPointIndex===o&&(f.pointStrokeColor=y.strokeColor,f.pointFillColor=y.fillColor,p=y.size,f.pointShape=y.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}(),hj=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 y=a.x[d],b=a.y[d];if(p=p||0,b!==null&&s.globals.series[r][h]!==void 0||(f=!1),f){var k=this.drawPoint(y,b,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 Ip(this.ctx),u=new ci(this.ctx),d=new qr(this.ctx),h=new Rp(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]}),y=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),y.attr({fill:m}),a.config.chart.dropShadow.enabled){var b=a.config.chart.dropShadow;u.dropShadow(y,b,s)}if(!this.initialAnim||a.globals.dataChanged||a.globals.resized)a.globals.animationEnded=!0;else{var k=a.config.chart.animations.speed;c.animateMarker(y,k,a.globals.easing,function(){window.setTimeout(function(){c.animationCompleted(y)},100)})}return y.attr({rel:o,j:o,index:s,"default-marker-size":p.pSize}),u.setSelectionFilter(y,s,o),h.addEvents(y),y.node.classList.add("apexcharts-marker"),y}},{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,y=null;if(u.globals.collapsedSeriesIndices.indexOf(o)!==-1||!h.enabled||!Array.isArray(s.x))return y;y=d.group({class:"apexcharts-data-labels"});for(var b=0;b<s.x.length;b++)if(f=s.x[b]+h.offsetX,p=s.y[b]+h.offsetY+c,!isNaN(f)){r===1&&b===0&&(m=0),r===1&&b===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="",$=function(M){return u.config.dataLabels.formatter(M,{ctx:n.ctx,seriesIndex:o,dataPointIndex:m,w:u})};u.config.chart.type==="bubble"?(C=$(k=u.globals.seriesZ[o][m]),p=s.y[b],p=new hj(this.ctx).centerTextInBubble(p,o,m).y):k!==void 0&&(C=$(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:y,offsetCorrection:!0,dataLabelsConfig:u.config.dataLabels,textAnchor:S})}return y}},{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,y=e.className,b=null;if(Array.isArray(n.config.dataLabels.enabledOnSeries)&&n.config.dataLabels.enabledOnSeries.indexOf(r)<0)return b;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 $=h.offsetX,S=h.offsetY;if(n.config.chart.type!=="bar"&&n.config.chart.type!=="rangeBar"||($=0,S=0),n.globals.isSlopeChart&&(a!==0&&($=-2*h.offsetX+5),a!==0&&a!==n.config.series[r].data.length-1&&($=0)),k.drawnextLabel){if((b=i.drawText({width:100,height:parseInt(h.style.fontSize,10),x:s+$,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:y||"apexcharts-datalabel",cx:s,cy:o}),h.dropShadow.enabled){var M=h.dropShadow;new ci(this.ctx).dropShadow(b,M)}d.add(b),n.globals.lastDrawnDataLabelsIndexes[r]===void 0&&(n.globals.lastDrawnDataLabelsIndexes[r]=[]),n.globals.lastDrawnDataLabelsIndexes[r].push(a)}return b}},{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 ci(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}(),YS=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 ii(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(y){return y.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 ii(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 b1(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(y){return y.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}(),tb=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},y=Math.max.apply(Math,Ns(i.map(function(S){return S.data?S.data.length:0}))),b=new YS(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(""))},$=function(S,M){if(u.length&&M===0&&d.push(u.join(r)),S.data){S.data=S.data.length&&S.data||Ns(Array(y)).map(function(){return""});for(var P=0;P<S.data.length;P++){u=[];var T=C(P);if(T!=="nullvalue"){if(T||(b.isFormatXY()?T=i[M].data[P].x:b.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=b.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?$(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(b.isFormatXY())L=I.x,R=I.y;else{if(!b.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}(),k1=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,y=c.fontWeight||h.config.xaxis.labels.style.fontWeight,b=c.cssClass||h.config.xaxis.labels.style.cssClass,k=h.globals.padHorizontal,C=s.length,$=h.config.xaxis.type==="category"?h.globals.dataPoints:C;if($===0&&C>$&&($=C),o){var S=Math.max(Number(h.config.xaxis.tickAmount)||1,$>1?$-1:$);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/$,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&&$===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:y,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 ")+b});if(i.add(V),V.on("click",function(F){if(typeof h.config.chart.events.xAxisLabelClick=="function"){var z=Object.assign({},h,{labelIndex:T});h.config.chart.events.xAxisLabelClick(F,l.ctx,z)}}),e){var B=document.createElementNS(h.globals.SVGNS,"title");B.textContent=Array.isArray(L.text)?L.text.join(" "):L.text,V.node.appendChild(B),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 z=Object.assign({},o,{labelIndex:S});o.config.chart.events.xAxisLabelClick(F,s.ctx,z)}});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 B=r.rotateAroundCenter(R.node);R.node.setAttribute("transform","rotate(".concat(o.config.yaxis[e].labels.rotate," 0 ").concat(B.y,")"))}i+=n},m=0;m<=u.length-1;m++)p(m);if(o.config.yaxis[0].title.text!==void 0){var y=r.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+a+", 0)"}),b=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});y.add(b),l.add(y)}var k=0;this.isCategoryBarHorizontal&&o.config.yaxis[0].opposite&&(k=o.globals.gridWidth);var C=o.config.xaxis.axisBorder;if(C.show){var $=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($):l.add($)}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(y){n.placeTextWithEllipsis(y,y.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}(),fj=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 k1(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,y=p.x1,b=p.y1,k=p.x2,C=p.y2,$=0;$<m;$++)y=n.xaxisLabels[$].position,k=n.xaxisLabels[$].position,n._drawGridLines({i:$,x1:y,y1:b,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,y=p.x1,b=p.y1,k=p.x2,C=p.y2,$=0;$<m+(o.globals.isXNumeric?0:1);$++)$===0&&m===1&&o.globals.dataPoints===1&&(k=y=o.globals.gridWidth/2),n._drawGridLines({i:$,x1:y,y1:b,x2:k,y2:C,xCount:i,parent:n.elgridLinesV}),k=y+=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 k1(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,y,b,k,C){for(var $=0,S=0;$<m;$++,S++)S>=r.config.grid[p].colors.length&&(S=0),o._drawGridBandRect({c:S,x1:y,y1:b,x2:k,y2:C,type:p}),b+=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}(),pj=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 y=f,b=Math.abs(n-e);!o&&e>0&&e/b<.15&&(e=0,o=!0),!r&&n<0&&-n/b<.15&&(n=0,r=!0);var k=(b=Math.abs(n-e))/y,C=k,$=Math.floor(Math.log10(C)),S=Math.pow(10,$),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,$-P)}if(o&&r){var T=b/y;if(h)if(d)if(he.mod(b,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(b,k)==0?T=k:k=T;else if(he.mod(b,k)==0)T=k;else{T=b/(y=Math.ceil(b/k));var L=he.getGCD(b,k);b/L<s&&(T=L),k=T}y=Math.round(b/k)}else{if(o||r){if(r)if(h)e=n-k*y;else{var R=e;e=k*Math.floor(e/k),Math.abs(n-e)/he.getGCD(b,k)>s&&(e=n-k*f,e+=k*Math.floor((R-e)/k))}else if(o)if(h)n=e+k*y;else{var V=n;n=k*Math.ceil(n/k),Math.abs(n-e)/he.getGCD(b,k)>s&&(n=e+k*f,n+=k*Math.ceil((V-n)/k))}}else if(u.isMultipleYAxis&&h){var B=k*Math.floor(e/k),F=B+k*y;F<n&&(k*=2),F=n,n=(e=B)+k*y,b=Math.abs(n-e),e>0&&e<Math.abs(F-n)&&(e=0,n=k*y),n<0&&-n<Math.abs(B-e)&&(n=0,e=-k*y)}else e=k*Math.floor(e/k),n=k*Math.ceil(n/k);b=Math.abs(n-e),k=he.getGCD(b,k),y=Math.round(b/k)}if(h||o||r||(y=Math.ceil((b-l)/(k+l)))>16&&he.getPrimeFactors(y).length<2&&y++,!h&&i.forceNiceScale&&u.yValueDecimal===0&&y>b&&(y=b,k=Math.round(b/y)),y>s&&(!h&&!d||i.forceNiceScale)){var z=he.getPrimeFactors(y),U=z.length-1,G=y;e:for(var K=0;K<U;K++)for(var X=0;X<=U-K;X++){for(var W=Math.min(X+K,U),Q=G,ne=1,Z=X;Z<=W;Z++)ne*=z[Z];if((Q/=ne)<s){G=Q;break e}}k=G===y?b:b/G,y=Math.round(b/k)}u.isMultipleYAxis&&u.multiAxisTickAmount==0&&u.ignoreYAxisIndexes.indexOf(a)<0&&(u.multiAxisTickAmount=y);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=[],$=[],S=[];c.forEach(function(){C.push(k.map(function(){return Number.MIN_VALUE})),$.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 B=i.series[I][V];B>=0?$[R][V]+=B:S[R][V]+=B,C[R][V]+=B,p=Math.min(p,B),m=Math.max(m,B)}})),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,$[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 y=0;y<a.length;y++){var b=a[y];h=Math.min(h,o[b]),f=Math.max(f,r[b]),!(i.collapsedSeriesIndices.indexOf(b)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(b)<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,$){return $.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}(),Kx=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.scales=new pj(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 y=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 b=0,k=c[m].length-1;if(h){if(o.xaxis.min)for(;b<k&&r.seriesX[m][b]<o.xaxis.min;b++);if(o.xaxis.max)for(;k>b&&r.seriesX[m][k]>o.xaxis.max;k--);}for(var C=b;C<=k&&C<r.series[m].length;C++){var $=c[m][C];if($!==null&&he.isNumber($)){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])),y){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]))}y&&y!=="candlestick"&&y!=="boxPlot"&&y!=="rangeArea"&&y!=="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($)&&($=he.noExponents($),r.yValueDecimal=Math.max(r.yValueDecimal,$.toString().split(".")[1].length)),l>u[m][C]&&u[m][C]<0&&(l=u[m][C])}else r.hasNullValues=!0}y!=="bar"&&y!=="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 ii(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=DU(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 y=h(f[m],m,n),b=n.config.yaxis[e].labels.padding;n.config.yaxis[e].opposite&&n.config.yaxis.length!==0&&(b*=-1);var k=this.getTextAnchor(n.config.yaxis[e].labels.align,n.config.yaxis[e].opposite),C=this.axesUtils.getYAxisForeColor(s.colors,e),$=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:b,y:p,text:S.includes(y)&&!n.config.yaxis[e].labels.showDuplicates?"":y,textAnchor:k,fontSize:o,fontFamily:r,fontWeight:a,maxWidth:n.config.yaxis[e].labels.maxWidth,foreColor:$,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(s.cssClass)});c.add(M),this.addTooltip(M,y),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 y=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(y),y.tspan(f),this.addTooltip(y,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}(),Z_t=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}(),J_t=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(uj,i);this.w.globals.locale=s.options}}]),t}(),Q_t=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 k1(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}(),Zx=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 ci(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,y=o.color,b=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 $=e.globals.gridHeight;(!he.isNumber($)||$<0)&&($=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:$,width:S,height:$,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:y,opacity:b})),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}(),eyt=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 w1({}),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 w1(e).init({responsiveOverride:!0});this.w.config=n}}]),t}(),tyt=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}(),nyt=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}(),syt=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}(),iyt=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 kv(this.dCtx.ctx),c=r;r=l.xLabelFormat(o,r,c,{i:void 0,dateFormatter:new ii(this.dCtx.ctx).formatDate,w:n}),a=l.xLabelFormat(o,a,c,{i:void 0,dateFormatter:new ii(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,y=i.config.legend.position==="right"&&n.dCtx.lgRect.width>0?n.dCtx.lgRect.width:0;p>s.svgWidth-s.translateX-y&&(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}(),oyt=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($,S){var M,P;return((M=String(d($,l)))===null||M===void 0?void 0:M.length)>((P=String(d(S,l)))===null||P===void 0?void 0:P.length)?$: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 y=new Ne(e.dCtx.ctx),b="rotate(".concat(r.labels.rotate," 0 0)"),k=y.getTextRects(f,r.labels.style.fontSize,r.labels.style.fontFamily,b,!1),C=k;f!==p&&(C=y.getTextRects(p,r.labels.style.fontSize,r.labels.style.fontFamily,b,!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}(),ryt=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}(),nb=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 syt(this),this.dimYAxis=new oyt(this),this.dimXAxis=new iyt(this),this.dimGrid=new ryt(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=DU(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}(),ayt=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}(),mj=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 ayt(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 Rp(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(y){y.node.classList.contains("apexcharts-marker-triangle")?y.node.style.transform="translate(50%, 45%)":y.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}),y=!1,b=!1;if(i.globals.collapsedSeries.length>0)for(var k=0;k<i.globals.collapsedSeries.length;k++)i.globals.collapsedSeries[k].index===f&&(y=!0);if(i.globals.ancillaryCollapsedSeriesIndices.length>0)for(var C=0;C<i.globals.ancillaryCollapsedSeriesIndices.length;C++)i.globals.ancillaryCollapsedSeriesIndices[C]===f&&(b=!0);var $=e.createLegendMarker({i:f,fillcolor:r});Ne.setAttrs($,{rel:f+1,"data:collapsed":y||b}),(y||b)&&$.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":y||b}),S.appendChild($),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":y||b}),(y||b)&&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 nb(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 nb(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}(),gj=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 tb(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}(),lyt=function(t){_v(n,gj);var e=vv(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 Ws(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 y=(l+c)/2;l=y-m/2,c=y+m/2}}var b=this._getNewMinXMaxX(l,c);isNaN(b.minX)||isNaN(b.maxX)||this.zoomUpdateOptions(b.minX,b.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,y=p-u,b={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,y=Math.abs(y)),b=tt(tt({},b=o==="x"?{x:d?c-m:c,y:0,width:m,height:r.globals.gridHeight}:o==="y"?{x:0,y:h?u-y:u,width:r.globals.gridWidth,height:y}:{x:d?c-m:c,y:h?u-y:u,width:m,height:y}),{},{translateX:r.globals.translateX,translateY:r.globals.translateY}),a.drawSelectionRect(b),a.selectionDragging("resizing"),b}},{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(b){return parseFloat(f.node.getAttribute(b))},y={x:m("x"),y:m("y"),width:m("width"),height:m("height")};r.globals.selection=y,typeof r.config.chart.events.selection=="function"&&r.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var b,k,C,$,S=o.gridRect.getBoundingClientRect(),M=f.node.getBoundingClientRect();r.globals.isRangeBar?(b=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,$=1):(b=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],$=r.globals.yAxisScale[0].niceMax-(M.top-S.top)*h.yRatio[0]);var P={xaxis:{min:b,max:k},yaxis:{min:C,max:$}};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 y=he.clone(r.globals.initialConfig.yaxis),b=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"||(b={min:h,max:f}),o!=="xy"&&o!=="y"||y.forEach(function(M,P){y[P].min=m[P],y[P].max=p[P]}),c){var k=c.getBeforeZoomRange(b,y);k&&(b=k.xaxis?k.xaxis:b,y=k.yaxis?k.yaxis:y)}var C={xaxis:b};r.config.chart.group||(C.yaxis=y),a.ctx.updateHelpers._updateOptions(C,!1,a.w.config.chart.animations.dynamicAnimation.enabled),typeof r.config.chart.events.zoomed=="function"&&c.zoomCallback(b,y)}else if(r.globals.selectionEnabled){var $,S=null;$={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:$,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}(),vj=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),y=Math.floor(p/d);h&&!r.config.xaxis.convertedCatToNumeric&&(m=Math.ceil(f/u),m-=1);var b=null,k=null,C=r.globals.seriesXvalues.map(function(T){return T.filter(function(I){return he.isNumber(I)})}),$=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);b=(k=this.closestInMultiArray(M,P,C,$)).index,m=k.j,b!==null&&r.globals.hasNullValues&&(C=r.globals.seriesXvalues[b],m=(k=this.closestInArray(M,C)).j)}return r.globals.capturedSeriesIndex=b===null?-1:b,(!m||m<1)&&(m=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=y:r.globals.capturedDataPointIndex=m,{capturedSeries:b,j:r.globals.isBarHorizontal?y: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],y=n-h[p],b=Math.sqrt(m*m+y*y);b<a&&(a=b,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}(),cyt=function(){function t(e){lt(this,t),this.w=e.w,this.ctx=e.ctx,this.ttCtx=e,this.tooltipUtil=new vj(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,y="",b=u.globals.colors[s];o!==null&&u.config.plotOptions.bar.distributed&&(b=u.globals.colors[o]);for(var k=function(S,M){var P=i.getFormatters(s);y=i.getSeriesName({fn:P.yLbTitleFormatter,index:s,seriesIndex:s,j:o}),u.config.chart.type==="treemap"&&(y=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 B,F,z,U;return u.globals.isRangeData?P.yLbFormatter((B=u.globals.seriesRangeStart)===null||B===void 0||(F=B[V])===null||F===void 0?void 0:F[o],{series:u.globals.seriesRangeStart,seriesIndex:V,dataPointIndex:o,w:u})+" - "+P.yLbFormatter((z=u.globals.seriesRangeEnd)===null||z===void 0||(U=z[V])===null||U===void 0?void 0:U[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),y=i.getSeriesName({fn:P.yLbTitleFormatter,index:T,seriesIndex:s,j:o}),b=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&&(b=u.globals.dom.baseEl.querySelector(R.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke")):b=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:y,shared:l,pColor:b})},C=0,$=u.globals.series.length-1;C<u.globals.series.length;C++,$--)k(C,$)}},{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,y=null;y=s[n].children,c.config.tooltip.fillSeriesColor&&(s[n].style.backgroundColor=l,y[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 b=s[n].querySelector(".apexcharts-tooltip-text-y-label");b&&(b.innerHTML=r||"");var k=s[n].querySelector(".apexcharts-tooltip-text-y-value");k&&(k.innerHTML=d!==void 0?d:""),y[0]&&y[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]),y[0].style.backgroundColor=l),c.config.tooltip.marker.show||(y[0].style.display="none");var C=s[n].querySelector(".apexcharts-tooltip-text-goals-label"),$=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>",$.innerHTML=I+"</div>"};a?c.globals.seriesGoals[n][i]&&Array.isArray(c.globals.seriesGoals[n][i])?S():(C.innerHTML="",$.innerHTML=""):S()}else C.innerHTML="",$.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&&y[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?y[0].parentNode.style.display="none":y[0].parentNode.style.display=c.config.tooltip.items.display}else Array.isArray(u.tConfig.enabledOnSeries)&&u.tConfig.enabledOnSeries.indexOf(n)===-1&&(y[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 YS(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 kv(this.ctx).xLabelFormat(s.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new ii(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}(),_j=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 y=d[h].getAttribute("shape");if(s.config.chart.type==="rangeArea"&&!s.globals.comboCharts){var b=e+s.globals.series[h].length;m=a[h][b][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,y,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}(),uyt=function(){function t(e){lt(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new _j(e)}return ct(t,[{key:"drawDynamicPoints",value:function(){var e=this.w,n=new Ne(this.ctx),i=new Rp(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}(),dyt=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(),y=s.elGrid.getBoundingClientRect(),b=m.height;h=m.height;var k=m.width,C=parseInt(p.getAttribute("cx"),10),$=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.dataPointsDividedHeight+b/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-y.left+15,u=I()):(c=T(),u=i.clientY-y.top-a.tooltipRect.ttHeight/2-15):o.globals.isBarHorizontal?((c=C)<a.xyRatios.baseLineInvertedY&&(c=C-a.tooltipRect.ttWidth),u=I()):(c=T(),u=$)}return{x:c,y:u,barHeight:h,barWidth:d,i:l,j:r}}}]),t}(),hyt=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}(),WT=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 vj(this),this.tooltipLabels=new cyt(this),this.tooltipPosition=new _j(this),this.marker=new uyt(this),this.intersect=new dyt(this),this.axesTooltip=new hyt(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 k1(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 y=this.intersect.handleHeatTreeTooltip({e:s,opt:o,x:n,y:i,type:r.config.chart.type});n=y.x,i=y.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 b=0;b<r.config.yaxis.length;b++)this.axesTooltip.drawYaxisTooltipText(b,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,y,b,k,C,$,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,B=Array.from(this.legendLabels);B.forEach(function(Z){var ae=Z.getAttribute("data:default-text");Z.innerHTML=decodeURIComponent(ae)});for(var F=0;F<B.length;F++){var z=B[F],U=parseInt(z.getAttribute("i"),10),G=decodeURIComponent(z.getAttribute("data:default-text")),K=V(G,{seriesIndex:M?U:i,dataPointIndex:s,w:P});if(M)z.innerHTML=P.globals.collapsedSeriesIndices.indexOf(U)<0?K:G;else if(z.innerHTML=U===i?K:G,i===U)break}}var X=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||(y=m[s])===null||y===void 0||(b=y.y[0])===null||b===void 0?void 0:b.y2)!==void 0&&{y2:(k=P.globals.seriesRange)===null||k===void 0||(C=k[i])===null||C===void 0||($=C[s])===null||$===void 0||(S=$.y[0])===null||S===void 0?void 0:S.y2});if(M){if(T.tooltipLabels.drawSeriesTexts(tt(tt({},X),{},{shared:!this.showOnIntersect&&this.tConfig.shared})),I)R();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var W=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++)W.pathMouseEnter(Q[ne])}}else T.tooltipLabels.drawSeriesTexts(tt({shared:!1},X)),this.tooltipUtil.hasBars()&&T.tooltipPosition.moveStickyTooltipOverBars(s,i),I&&T.tooltipPosition.moveMarkers(i,s)}}]),t}(),fyt=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,y=e.barYPosition,b=e.visibleSeries,k=e.renderedPath,C=this.w,$=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*(b+1)),i=o+parseFloat(f*(b+1))-S):(n=s+parseFloat(p*b),i=o+parseFloat(f*b));var M,P=null,T=s,I=o,L={},R=C.config.dataLabels,V=this.barCtx.barOptions.dataLabels,B=this.barCtx.barOptions.dataLabels.total;y!==void 0&&this.barCtx.isRangeBar&&(i=y,I=y),m!==void 0&&this.barCtx.isVerticalGroupedRangeBar&&(n=m,T=m);var F=R.offsetX,z=R.offsetY,U={width:0,height:0};if(C.config.dataLabels.enabled){var G=C.globals.series[l][c];U=$.getTextRects(C.config.dataLabels.formatter?C.config.dataLabels.formatter(G,tt(tt({},C),{},{seriesIndex:l,dataPointIndex:c,w:C})):C.globals.yLabelFormatters[0](G),parseFloat(R.style.fontSize))}var K={x:s,y:o,i:l,j:c,realIndex:u,columnGroupIndex:d,renderedPath:k,bcx:n,bcy:i,barHeight:f,barWidth:p,textRects:U,strokeWidth:S,dataLabelsX:T,dataLabelsY:I,dataLabelsConfig:R,barDataLabelsConfig:V,barTotalDataLabelsConfig:B,offX:F,offY:z};return L=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(K):this.calculateColumnsDataLabelsPosition(K),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:U,dataLabelsConfig:R}),C.config.chart.stacked&&B.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:B})),{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,y=e.barDataLabelsConfig,b=e.barTotalDataLabelsConfig,k=e.strokeWidth,C=e.offX,$=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)),y.position){case"center":p=M?I?L-d/2+$:L+d/2-$:I?L-d/2+h.height/2+$:L+d/2+h.height/2-$;break;case"bottom":p=M?I?L-d+$:L+d-$:I?L-d+h.height+k+$:L+d-h.height/2+k-$;break;case"top":p=M?I?L+$:L-$:I?L-h.height/2-$:L+h.height+$}if(this.barCtx.lastActiveBarSerieIndex===o&&b.enabled){var R=new Ne(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:s}),m.fontSize);r=I?L-R.height/2-$-b.offsetY+18:L+R.height+$+b.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)+b.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,y=e.offX,b=e.offY,k=n.globals.gridHeight/n.globals.dataPoints;c=Math.abs(c);var C,$,S=a-(this.barCtx.isRangeBar?0:k)+l/2+u.height/2+b-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-y:Math.max(u.width/2,T-c/2)+y;break;case"bottom":d=P?T+c-h-y:T-c+h+y;break;case"top":d=P?T-h-y:T-h+y}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-y-m.offsetX,M="end"):C=T+y+m.offsetX+(this.barCtx.isReversed?-(c+h):h),$=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:$,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,y=null,b=d.globals.collapsedSeriesIndices.indexOf(o)>-1;if(u.enabled&&!b){y=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,$=d.config.plotOptions.bar.dataLabels.position;d.config.plotOptions.bar.dataLabels.orientation==="vertical"&&($==="top"&&(u.textAnchor=C?"end":"start"),$==="center"&&(u.textAnchor="middle"),$==="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:y,dataLabelsConfig:S,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return y}},{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}(),pyt=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],y=c[c.length-1],b=Am(c);try{for(b.s();!(p=b.n()).done;){var k=p.value;a[k][l]=k===m?"bottom":k===y?"top":"none"}}catch(U){b.e(U)}finally{b.f()}}else if(u.length>0&&c.length===0)if(u.length===1)a[u[0]][l]="both";else{var C,$=Math.max.apply(Math,u),S=Math.min.apply(Math,u),M=Am(u);try{for(M.s();!(C=M.n()).done;){var P=C.value;a[P][l]=P===$?"bottom":P===S?"top":"none"}}catch(U){M.e(U)}finally{M.f()}}else if(c.length>0&&u.length>0){var T,I=c[c.length-1],L=Am(c);try{for(L.s();!(T=L.n()).done;){var R=T.value;a[R][l]=R===I?"top":"none"}}catch(U){L.e(U)}finally{L.f()}var V,B=Math.max.apply(Math,u),F=Am(u);try{for(F.s();!(V=F.n()).done;){var z=V.value;a[z][l]=z===B?"bottom":"none"}}catch(U){F.e(U)}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 y=i,b=s;(n=p.config.series[d].data[f])!==null&&n!==void 0&&n.columnWidthOffset&&(b=s-p.config.series[d].data[f].columnWidthOffset/2,y=i+p.config.series[d].data[f].columnWidthOffset);var k=a/2,C=b+k,$=b+y-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($,o);if(p.globals.previousPaths.length>0&&(P=this.barCtx.getPreviousPath(d,f,!1)),M=M+m.line(C,r)+m.line($,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 y=i,b=s;(n=p.config.series[d].data[f])!==null&&n!==void 0&&n.barHeightOffset&&(y=i-p.config.series[d].data[f].barHeightOffset/2,b=s+p.config.series[d].data[f].barHeightOffset);var k=a/2,C=y+k,$=y+b-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,$);if(M=M+m.line(r,C)+m.line(r,$)+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((Zy(m={},e,e==="x"?a.getXForValue(f,n,!1):a.getYForValue(f,i,r,!1)),Zy(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 pyt(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=[],y=[],b=i.globals.comboCharts?n[a]:a,k=this.barHelpers.getGroupIndex(b).columnGroupIndex,C=s.group({class:"apexcharts-series",rel:a+1,seriesName:he.escapeString(i.globals.seriesNames[b]),"data:realIndex":b});this.ctx.series.addCollapsedClassToSeries(C,b),e[a].length>0&&(this.visibleI=this.visibleI+1);var $=0,S=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[b],this.translationsIndex=b);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,$=P.barHeight,u=P.yDivision,h=P.zeroW,f=P.x,S=P.barWidth,c=P.xDivision,d=P.zeroH,this.isHorizontal||y.push(f+S/2);var T=s.group({class:"apexcharts-datalabels","data:realIndex":b});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,b),B=null,F={indexes:{i:a,j:R,realIndex:b,translationsIndex:M,bc:l},x:f,y:p,strokeWidth:V,elSeries:C};this.isHorizontal?(B=this.drawBarPaths(tt(tt({},F),{},{barHeight:$,zeroW:h,yDivision:u})),S=this.series[a][R]/this.invertedYRatio):(B=this.drawColumnPaths(tt(tt({},F),{},{xDivision:c,barWidth:S,zeroH:d})),$=this.series[a][R]/this.yRatio[M]);var z=this.barHelpers.getPathFillColor(e,a,R,b);if(this.isFunnel&&this.barOptions.isFunnel3d&&this.pathArr.length&&R>0){var U,G=this.barHelpers.drawBarShadow({color:typeof z.color=="string"&&((U=z.color)===null||U===void 0?void 0:U.indexOf("url"))===-1?z.color:he.hexToRgba(i.globals.colors[a]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:B});L.add(G),i.config.chart.dropShadow.enabled&&new ci(this.ctx).dropShadow(G,i.config.chart.dropShadow,b)}this.pathArr.push(B);var K=this.barHelpers.drawGoalLine({barXPosition:B.barXPosition,barYPosition:B.barYPosition,goalX:B.goalX,goalY:B.goalY,barHeight:$,barWidth:S});K&&I.add(K),p=B.y,f=B.x,R>0&&y.push(f+S/2),m.push(p),this.renderSeries(tt(tt({realIndex:b,pathFill:z.color},z.useRangeColor?{lineFill:z.color}:{}),{},{j:R,i:a,columnGroupIndex:k,pathFrom:B.pathFrom,pathTo:B.pathTo,strokeWidth:V,elSeries:C,x:f,y:p,series:e,barHeight:Math.abs(B.barHeight?B.barHeight:$),barWidth:Math.abs(B.barWidth?B.barWidth:S),elDataLabelsWrap:T,elGoalsMarkers:I,elBarShadows:L,visibleSeries:this.visibleI,type:"bar"}))}i.globals.seriesXvalues[b]=y,i.globals.seriesYvalues[b]=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,y=e.series,b=e.barHeight,k=e.barWidth,C=e.barXPosition,$=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 B=typeof R.globals.stroke.colors[n]=="function"?function(K){var X,W=R.config.stroke.colors;return Array.isArray(W)&&W.length>0&&((X=W[K])||(X=""),typeof X=="function")?X({value:R.globals.series[K][o],dataPointIndex:o,w:R}):X}(n):R.globals.stroke.colors[n];s=this.barOptions.distributed?R.globals.stroke.colors[o]:B}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,z=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});z.attr("clip-path","url(#gridRectBarMask".concat(R.globals.cuid,")"));var U=R.config.forecastDataPoints;U.count>0&&o>=R.globals.dataPoints-U.count&&(z.node.setAttribute("stroke-dasharray",U.dashArray),z.node.setAttribute("stroke-width",U.strokeWidth),z.node.setAttribute("fill-opacity",U.fillOpacity)),p!==void 0&&m!==void 0&&(z.attr("data-range-y1",p),z.attr("data-range-y2",m)),new ci(this.ctx).setSelectionFilter(z,n,o),d.add(z);var G=new fyt(this).handleBarDataLabels({x:h,y:f,y1:p,y2:m,i:r,j:o,series:y,realIndex:n,columnGroupIndex:a,barHeight:b,barWidth:k,barXPosition:C,barYPosition:$,renderedPath:z,visibleSeries:T});return G.dataLabels!==null&&S.add(G.dataLabels),G.totalDataLabels&&S.add(G.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(b,k){b[f]&&p++,k<h&&b[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 y=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:y.pathTo,pathFrom:y.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,y=i.bc;if(d.globals.isXNumeric){var b=this.getBarXForNumericXAxis({x:s,j:m,realIndex:h,barWidth:a});s=b.x,n=b.barXPosition}else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var k=this.barHelpers.getZeroValueEncounters({i:p,j:m}),C=k.nonZeroColumns,$=k.zeroEncounters;C>0&&(a=this.seriesLen*a/C),n=s+a*this.visibleI,n-=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:y,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}(),YT=function(t){_v(n,sp);var e=vv(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 y=void 0,b=void 0,k=void 0,C=void 0,$=r.globals.comboCharts?s[p]:p,S=o.barHelpers.getGroupIndex($),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[$][0],L=$),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[$]),rel:p+1,"data:realIndex":$});o.ctx.series.addCollapsedClassToSeries(R,$);var V=o.graphics.group({class:"apexcharts-datalabels","data:realIndex":$}),B=o.graphics.group({class:"apexcharts-bar-goals-markers"}),F=0,z=0,U=o.initialPositions(c,u,y,b,k,C,L);u=U.y,F=U.barHeight,b=U.yDivision,C=U.zeroW,c=U.x,z=U.barWidth,y=U.xDivision,k=U.zeroH,r.globals.barHeight=F,r.globals.barWidth=z,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 G=0;G<r.globals.dataPoints;G++){var K=o.barHelpers.getStrokeWidth(p,G,$),X={indexes:{i:p,j:G,realIndex:$,translationsIndex:L,bc:m},strokeWidth:K,x:c,y:u,elSeries:R,columnGroupIndex:P,seriesGroup:r.globals.seriesGroups[M]},W=null;o.isHorizontal?(W=o.drawStackedBarPaths(tt(tt({},X),{},{zeroW:C,barHeight:F,yDivision:b})),z=o.series[p][G]/o.invertedYRatio):(W=o.drawStackedColumnPaths(tt(tt({},X),{},{xDivision:y,barWidth:z,zeroH:k})),F=o.series[p][G]/o.yRatio[L]);var Q=o.barHelpers.drawGoalLine({barXPosition:W.barXPosition,barYPosition:W.barYPosition,goalX:W.goalX,goalY:W.goalY,barHeight:F,barWidth:z});Q&&B.add(Q),u=W.y,c=W.x,T.push(c),I.push(u);var ne=o.barHelpers.getPathFillColor(i,p,G,$),Z="",ae=r.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y";(o.barHelpers.arrBorderRadius[$][G]==="bottom"&&r.globals.series[$][G]>0||o.barHelpers.arrBorderRadius[$][G]==="top"&&r.globals.series[$][G]<0)&&(Z=ae),R=o.renderSeries(tt(tt({realIndex:$,pathFill:ne.color},ne.useRangeColor?{lineFill:ne.color}:{}),{},{j:G,i:p,columnGroupIndex:P,pathFrom:W.pathFrom,pathTo:W.pathTo,strokeWidth:K,elSeries:R,x:c,y:u,series:i,barHeight:F,barWidth:z,elDataLabelsWrap:V,elGoalsMarkers:B,type:"bar",visibleSeries:P,classes:Z}))}r.globals.seriesXvalues[$]=T,r.globals.seriesYvalues[$]=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,y=u+d*r,b=o.i,k=o.j,C=o.realIndex,$=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[b][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[b][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[b][k]===null?s:s+this.series[b][k]/this.invertedYRatio-2*(this.isReversed?this.series[b][k]/this.invertedYRatio:0);var I=this.barHelpers.getBarpaths({barYPosition:y,barHeight:r,x1:s,x2:c,strokeWidth:a,isReversed:this.isReversed,series:this.series,realIndex:o.realIndex,seriesGroup:h,i:b,j:k,w:m});return this.barHelpers.barBackground({j:k,i:b,y1:y,y2:r,elSeries:p}),u+=f,{pathTo:I.pathTo,pathFrom:I.pathFrom,goalX:this.barHelpers.getGoalValues("x",l,null,b,k,$),barXPosition:s,barYPosition:y,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,y=s.bc,b=s.realIndex,k=s.translationsIndex;if(f.globals.isXNumeric){var C=f.globals.seriesX[b][m];C||(C=0),o=(C-f.globals.minX)/this.xRatio-l/2*f.globals.barGroups.length}for(var $,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[b])),T>0&&!f.globals.isXNumeric||T>0&&f.globals.isXNumeric&&f.globals.seriesX[b-1][m]===f.globals.seriesX[b][m]){var I,L,R,V=Math.min(this.yRatio.length+1,b+1);if(this.groupCtx.prevY[T-1]!==void 0&&this.groupCtx.prevY[T-1].length)for(var B=1;B<V;B++){var F;if(!isNaN((F=this.groupCtx.prevY[T-B])===null||F===void 0?void 0:F[m])){R=this.groupCtx.prevY[T-B][m];break}}for(var z=1;z<V;z++){var U,G;if(((U=this.groupCtx.prevYVal[T-z])===null||U===void 0?void 0:U[m])<0){L=this.series[p][m]>=0?R-M+2*(this.isReversed?M:0):R;break}if(((G=this.groupCtx.prevYVal[T-z])===null||G===void 0?void 0:G[m])>=0){L=this.series[p][m]>=0?R:R+M-2*(this.isReversed?M:0);break}}L===void 0&&(L=f.globals.gridHeight),$=(I=this.groupCtx.prevYF[0])!==null&&I!==void 0&&I.every(function(X){return X===0})&&this.groupCtx.prevYF.slice(1,T).every(function(X){return X.every(function(W){return isNaN(W)})})?c:L}else $=c;r=this.series[p][m]?$-this.series[p][m]/this.yRatio[k]+2*(this.isReversed?this.series[p][m]/this.yRatio[k]:0):$;var K=this.barHelpers.getColumnPaths({barXPosition:S,barWidth:l,y1:$,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:y,j:m,i:p,x1:S,x2:l,elSeries:h}),{pathTo:K.pathTo,pathFrom:K.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,c,p,m),barXPosition:S,x:f.globals.isXNumeric?o:o+a,y:r}}}]),n}(),nk=function(t){_v(n,sp);var e=vv(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 qr(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 y,b,k,C,$=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,B=0;r.yRatio.length>1&&(r.yaxisIndex=a.globals.seriesYAxisReverseMap[T][0],B=T);var F=r.barHelpers.initialPositions();S=F.y,R=F.barHeight,b=F.yDivision,C=F.zeroW,$=F.x,V=F.barWidth,y=F.xDivision,k=F.zeroH,P.push($+V/2);for(var z=l.group({class:"apexcharts-datalabels","data:realIndex":T}),U=l.group({class:"apexcharts-bar-goals-markers"}),G=function(X){var W=r.barHelpers.getStrokeWidth(m,X,T),Q=null,ne={indexes:{i:m,j:X,realIndex:T,translationsIndex:B},x:$,y:S,strokeWidth:W,elSeries:L};Q=r.isHorizontal?r.drawHorizontalBoxPaths(tt(tt({},ne),{},{yDivision:b,barHeight:R,zeroW:C})):r.drawVerticalBoxPaths(tt(tt({},ne),{},{xDivision:y,barWidth:V,zeroH:k})),S=Q.y,$=Q.x;var Z=r.barHelpers.drawGoalLine({barXPosition:Q.barXPosition,barYPosition:Q.barYPosition,goalX:Q.goalX,goalY:Q.goalY,barHeight:R,barWidth:V});Z&&U.add(Z),X>0&&P.push($+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:X,color:Q.color[ge],value:i[m][X]});r.renderSeries({realIndex:T,pathFill:oe,lineFill:Ce,j:X,i:m,pathFrom:Q.pathFrom,pathTo:ae,strokeWidth:W,elSeries:L,x:$,y:S,series:i,columnGroupIndex:I,barHeight:R,barWidth:V,elDataLabelsWrap:z,elGoalsMarkers:U,visibleSeries:r.visibleI,type:a.config.chart.type})})},K=0;K<a.globals.dataPoints;K++)G(K);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,y=s.realIndex,b=function(z){return Array.isArray(z)?z[y]:z},k=b(p.upward),C=b(p.downward),$=this.yRatio[s.translationsIndex],S=this.getOHLCValue(y,f),M=l,P=l,T=S.o<S.c?[k]:[C];this.isBoxPlot&&(T=[b(m.lower),b(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[y][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/$,L=l-L/$,M=l-S.h/$,P=l-S.l/$,R=l-S.m/$);var B=d.move(V,l),F=d.move(V+a/2,I);return u.globals.previousPaths.length>0&&(F=this.getPreviousPath(y,f,!0)),B=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:B,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,y=s.realIndex,b=this.getOHLCValue(y,f),k=l,C=l,$=Math.min(b.o,b.c),S=Math.max(b.o,b.c),M=b.m;u.globals.isXNumeric&&(o=(u.globals.seriesX[y][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?($=l,S=l):($=l+$/m,S=l+S/m,k=l+b.h/m,C=l+b.l/m,M=l+b.m/m);var T=d.move(l,P),I=d.move($,P+a/2);return u.globals.previousPaths.length>0&&(I=this.getPreviousPath(y,f,!0)),T=[d.move($,P)+d.line($,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($,P+a/2)+d.line($,P+a)+d.line(M,P+a)+d.line(M,P)+d.line($+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($,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}(),yj=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 y=Math.abs(d)+Math.abs(u);f=100*o/(y===0?y-1e-6:y)}}),{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,y=s+parseFloat(c.style.fontSize)/3+p;d.plotDataLabelsText({x:m,y,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}(),myt=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 yj(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 ci(this.ctx).dropShadow(d,h,u)}for(var f=0,p=n.config.plotOptions.heatmap.shadeIntensity,m=0,y=0;y<n.globals.dataPoints;y++)if(n.globals.seriesX.length&&!n.globals.allSeriesHasEqualX&&n.globals.minX+n.globals.minXDiff*y<n.globals.seriesX[u][m])f+=o;else{if(m>=c[u].length)break;var b=this.helpers.getShadeColor(n.config.chart.type,u,m,this.negRange),k=b.color,C=b.colorProps;n.config.fill.type==="image"&&(k=new qr(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 $=this.rectRadius,S=i.drawRect(f,a,o,r,$);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 Ip(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}(),bj=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}(),wj=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 y=s.drawCircle(this.donutSize);y.attr({cx:this.centerX,cy:this.centerY,fill:i.config.plotOptions.pie.donut.background?i.config.plotOptions.pie.donut.background:"transparent"}),c.add(y)}var b=this.drawArcs(l,e);if(this.sliceLabels.forEach(function(C){b.add(C)}),c.attr({transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(i.config.plotOptions.pie.customScale,")")}),c.add(b),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 ci(this.ctx),o=new Ne(this.ctx),r=new qr(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]}),y=this.getChangedPath(c,d),b=o.drawPath({d:y,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(b.attr({index:0,j:h}),s.setSelectionFilter(b,0,h),i.config.chart.dropShadow.enabled){var k=i.config.chart.dropShadow;s.dropShadow(b,k,h)}this.addListeners(b,this.donutDataLabels),Ne.setAttrs(b.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(b);var $=0;if(!this.initialAnim||i.globals.resized||i.globals.dataChanged?this.animBeginArr.push(0):(($=p/this.fullAngle*i.config.chart.animations.speed)===0&&($=1),this.animDur=$+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&i.globals.dataChanged?this.animatePaths(b,{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(b,{size:this.sliceSizes[h],endAngle:u,startAngle:l,i:h,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:$}),i.config.plotOptions.pie.expandOnClick&&this.chartType!=="polarArea"&&b.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 Ip(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),y=he.polarToCartesian(i.centerX,i.centerY,i.donutSize,u),b=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",y.x,y.y,"A",i.donutSize,i.donutSize,0,k,0,b.x,b.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 pj(this.ctx),s=new Ne(this.ctx),o=new bj(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="",y="";if(r?(a=n.total.color,d=n.total.fontSize,h=n.total.fontFamily,f=n.total.fontWeight,y=this.donutDataLabels.total.label?n.total.label:"",m=n.total.formatter(s)):s.globals.series.length===1&&(m=p(s.globals.series[0],s),y=s.globals.seriesNames[0]),y&&(y=n.name.formatter(y,n.total.show,s)),n.name.show){var b=o.drawText({x:c,y:u+parseFloat(n.name.offsetY),text:y,textAnchor:"middle",foreColor:a,fontSize:d,fontWeight:f,fontFamily:h});b.node.classList.add("apexcharts-datalabel-label"),e.add(b)}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}(),gyt=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 qr(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(y,b){var k=y.length===i.globals.dataPoints,C=n.graphics.group().attr({class:"apexcharts-series","data:longestSeries":k,seriesName:he.escapeString(i.globals.seriesNames[b]),rel:b+1,"data:realIndex":b});n.dataRadiusOfPercent[b]=[],n.dataRadius[b]=[],n.angleArr[b]=[],y.forEach(function(B,F){var z=Math.abs(n.maxValue-n.minValue);B-=n.minValue,n.isLog&&(B=n.coreUtils.getLogVal(n.logBase,B,0)),n.dataRadiusOfPercent[b][F]=B/z,n.dataRadius[b][F]=n.dataRadiusOfPercent[b][F]*n.size,n.angleArr[b][F]=F*n.disAngle}),h=n.getDataPointsPos(n.dataRadius[b],n.angleArr[b]);var $=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":b}),i.globals.delayedElements.push({el:f.node,index:b});var S={i:b,realIndex:b,animationDelay:b,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[b],strokeLineCap:i.config.stroke.lineCap},M=null;i.globals.previousPaths.length>0&&(M=n.getPreviousPath(b));for(var P=0;P<$.linePathsTo.length;P++){var T=n.graphics.renderPaths(tt(tt({},S),{},{pathFrom:M===null?$.linePathsFrom[P]:M,pathTo:$.linePathsTo[P],strokeWidth:Array.isArray(n.strokeWidth)?n.strokeWidth[b]:n.strokeWidth,fill:"none",drawShadow:!1}));C.add(T);var I=s.fillPath({seriesNumber:b}),L=n.graphics.renderPaths(tt(tt({},S),{},{pathFrom:M===null?$.areaPathsFrom[P]:M,pathTo:$.areaPathsTo[P],strokeWidth:0,fill:I,drawShadow:!1}));if(i.config.chart.dropShadow.enabled){var R=new ci(n.ctx),V=i.config.chart.dropShadow;R.dropShadow(L,Object.assign({},V,{noUserSpaceOnUse:!0}),b)}C.add(L)}y.forEach(function(B,F){var z=new Rp(n.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:b,dataPointIndex:F}),U=n.graphics.drawMarker(h[F].x,h[F].y,z);U.attr("rel",F),U.attr("j",F),U.attr("index",b),U.node.setAttribute("default-marker-size",z.pSize);var G=n.graphics.group({class:"apexcharts-series-markers"});G&&G.add(U),f.add(G),C.add(f);var K=i.config.dataLabels;if(K.enabled){var X=K.formatter(i.globals.series[b][F],{seriesIndex:b,dataPointIndex:F,w:i});r.plotDataLabelsText({x:h[F].x,y:h[F].y,text:X,textAnchor:"middle",i:b,j:b,parent:p,offsetCorrection:!1,dataLabelsConfig:tt({},K)})}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(y){d.add(y)}),d.add(this.yaxisLabels),d}},{key:"drawPolygons",value:function(e){for(var n=this,i=this.w,s=e.parent,o=new bj(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),y="";m.forEach(function(b,k){if(p===0){var C=n.graphics.drawLine(b.x,b.y,0,0,Array.isArray(n.polygons.connectorColors)?n.polygons.connectorColors[k]:n.polygons.connectorColors);h.push(C)}k===0&&n.yaxisLabelsTextsPos.push({x:b.x,y:b.y}),y+=b.x+","+b.y+" "}),d.push(y)}),d.forEach(function(f,p){var m=n.polygons.strokeColors,y=n.polygons.strokeWidth,b=n.graphics.drawPolygon(f,Array.isArray(m)?m[p]:m,Array.isArray(y)?y[p]:y,i.globals.radarPolygons.fill.colors[p]);s.add(b)}),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}(),vyt=function(t){_v(n,wj);var e=vv(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(LU(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 y=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);s.globals.radialSize+=y*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 ci(this.ctx),l=new qr(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 y=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 b=h.dropShadow;a.dropShadow(y,b)}d.add(y),y.attr("id","apexcharts-radialbarTrack-"+u),this.animatePaths(y,{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 qr(this.ctx),a=new ci(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 y=null;if(this.radialDataLabels.show){var b=s.globals.dom.Paper.findOne(".apexcharts-datalabels-group");y=this.renderInnerDataLabels(b,this.radialDataLabels,{hollowSize:d,centerX:i.centerX,centerY:i.centerY,opacity:m})}s.config.plotOptions.radialBar.hollow.position==="back"&&(l.add(f),y&&l.add(y));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 $=o.group({class:"apexcharts-series apexcharts-radial-series",seriesName:he.escapeString(s.globals.seriesNames[C])});l.add($),$.attr({rel:C+1,"data:realIndex":C}),this.ctx.series.addCollapsedClassToSeries($,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,B=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(B.node,{"data:angle":R,"data:value":i.series[C]}),s.config.chart.dropShadow.enabled){var F=s.config.chart.dropShadow;a.dropShadow(B,F,C)}if(a.setSelectionFilter(B,0,C),this.addListeners(B,this.radialDataLabels),$.add(B),B.attr({index:0,j:C}),this.barLabels.enabled){var z=he.polarToCartesian(i.centerX,i.centerY,i.size,M),U=this.barLabels.formatter(s.globals.seriesNames[C],{seriesIndex:C,w:s}),G=["apexcharts-radialbar-label"];this.barLabels.onClick||G.push("apexcharts-no-click");var K=this.barLabels.useSeriesColors?s.globals.colors[C]:s.config.chart.foreColor;K||(K=s.config.chart.foreColor);var X=z.x+this.barLabels.offsetX,W=z.y+this.barLabels.offsetY,Q=o.drawText({x:X,y:W,text:U,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:K,cssClass:G.join(" ")});Q.on("click",this.onBarLabelClick),Q.attr({rel:C+1}),M!==0&&Q.attr({"transform-origin":"".concat(X," ").concat(W),transform:"rotate(".concat(M," 0 0)")}),$.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(B,{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:y}}},{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 qr(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}(),_yt=function(t){_v(n,sp);var e=vv(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,y=this.barHelpers.getGroupIndex(m).columnGroupIndex,b=r.group({class:"apexcharts-series",seriesName:he.escapeString(o.globals.seriesNames[m]),rel:l+1,"data:realIndex":m});this.ctx.series.addCollapsedClassToSeries(b,m),i[l].length>0&&(this.visibleI=this.visibleI+1);var k=0,C=0,$=0;this.yRatio.length>1&&(this.yaxisIndex=o.globals.seriesYAxisReverseMap[m][0],$=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,B=null,F=null,z={x:f,y:p,strokeWidth:I,elSeries:b},U=this.seriesLen;if(o.config.plotOptions.bar.rangeBarGroupRows&&(U=1),o.config.series[l].data[T]===void 0)break;if(this.isHorizontal){F=p+k*this.visibleI;var G=(u-k*U)/2;if(o.config.series[l].data[T].x){var K=this.detectOverlappingBars({i:l,j:T,barYPosition:F,srty:G,barHeight:k,yDivision:u,initPositions:S});k=K.barHeight,F=K.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},z))).barWidth}else{o.globals.isXNumeric&&(f=(o.globals.seriesX[l][T]-o.globals.minX)/this.xRatio-C/2),B=f+C*this.visibleI;var X=(c-C*U)/2;if(o.config.series[l].data[T].x){var W=this.detectOverlappingBars({i:l,j:T,barXPosition:B,srtx:X,barWidth:C,xDivision:c,initPositions:S});C=W.barWidth,B=W.barXPosition}k=(V=this.drawRangeColumnPaths(tt({indexes:{i:l,j:T,realIndex:m,translationsIndex:$},barWidth:C,barXPosition:B,zeroH:d,xDivision:c},z))).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:b,series:i,barHeight:k,barWidth:C,barXPosition:B,barYPosition:F,columnGroupIndex:y,elDataLabelsWrap:M,elGoalsMarkers:P,visibleSeries:this.visibleI,type:"rangebar"})}a.add(b)}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,y=[],b=m.config.series[s].data[o].rangeName,k=m.config.series[s].data[o].x,C=Array.isArray(k)?k.join(" "):k,$=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*$:l+u*this.visibleI+h*$,S>-1&&!m.config.plotOptions.bar.rangeBarOverlap&&(y=m.globals.seriesRange[s][S].overlaps).indexOf(b)>-1&&(r=(u=p.barHeight/y.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+u*(this.visibleI+y.indexOf(b))+h*$)):($>-1&&!m.globals.timescaleLabels.length&&(a=m.config.plotOptions.bar.rangeBarGroupRows?c+f*$:c+d*this.visibleI+f*$),S>-1&&!m.config.plotOptions.bar.rangeBarOverlap&&(y=m.globals.seriesRange[s][S].overlaps).indexOf(b)>-1&&(a=(d=p.barWidth/y.length)*this.visibleI+f*(100-parseInt(this.barOptions.barWidth,10))/100/2+d*(this.visibleI+y.indexOf(b))+f*$)),{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],y=this.getRangeValue(f,h),b=Math.min(y.start,y.end),k=Math.max(y.start,y.end);this.series[d][h]===void 0||this.series[d][h]===null?b=c:(b=c-b/m,k=c-k/m);var C=Math.abs(k-b),$=this.barHelpers.getColumnPaths({barXPosition:l,barWidth:a,y1:b,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:$.pathTo,pathFrom:$.pathFrom,barHeight:C,x:o,y:y.start<0&&y.end<0?b: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),y=this.preventBarOverflow(d+a/this.invertedYRatio),b=this.getRangeValue(f,p),k=Math.abs(y-m),C=this.barHelpers.getBarpaths({barYPosition:u,barHeight:c,x1:m,x2:y,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:b.start<0&&b.end<0?m:y,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}(),yyt=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}(),byt=function(t){for(var e,n,i,s,o=function(u){for(var d=[],h=u[0],f=u[1],p=d[0]=sk(h,f),m=1,y=u.length-1;m<y;m++)h=f,f=u[m+1],d[m]=.5*(p+(p=sk(h,f)));return d[m]=p,d}(t),r=t.length-1,a=[],l=0;l<r;l++)i=sk(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},wyt=function(t){var e=byt(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},kyt=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 sk(t,e){return(e[1]-t[1])/(e[0]-t[0])}var ik=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 hj(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new yyt(this),this.markers=new Rp(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=[],y=[],b=[],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),b.push(k);var C,$=k,S=void 0,M=$,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,y.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=[y[0]],V={type:l,series:e,realIndex:f,translationsIndex:p,i:h,x:k,y:1,pX:$,pY:C,pathsFrom:I,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:b,yArrj:m,y2Arrj:y,seriesRangeEnd:s},B=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}),z=this._iterateOverDataPoints(tt(tt({},V),{},{series:s,xArrj:[k],yArrj:L,y2Arrj:R,pY:S,areaPaths:B.areaPaths,pathsFrom:F,iterations:s[h].length-1,isRangeStart:!1})),U=B.linePaths.length/2,G=0;G<U;G++)B.linePaths[G]=z.linePaths[G+U]+B.linePaths[G];B.linePaths.splice(U),B.pathFromLine=z.pathFromLine+B.pathFromLine}else B.pathFromArea+="z";this._handlePaths({type:l,realIndex:f,i:h,paths:B}),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(W,Q){return Number(W.node.getAttribute("zIndex"))-Number(Q.node.getAttribute("zIndex"))}),r.config.chart.stacked)for(var K=d.length-1;K>=0;K--)c.add(d[K]);else for(var X=0;X<d.length;X++)c.add(d[X]);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 y=0;y<a[l].length;y++)if(a[l][y]!==null){d=this.xDivision*y,h=this.zeroY-a[l][y]/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 b=this.lineHelpers.checkPreviousPaths({pathFromLine:s,pathFromArea:o,realIndex:c});s=b.pathFromLine,o=b.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 qr(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 y=a.renderPaths(tt(tt({},f),{},{pathFrom:o.pathFromArea,pathTo:o.areaPaths[m],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:p}));this.elSeries.add(y)}if(r.config.stroke.show&&!this.pointsChart){var b=null;if(n==="line")b=l.fillPath({seriesNumber:i,i:s});else if(r.config.stroke.fill.type==="solid")b=r.globals.stroke.colors[i];else{var k=r.config.fill;r.config.fill=r.config.stroke.fill,b=l.fillPath({seriesNumber:i,i:s}),r.config.fill=k}for(var C=0;C<o.linePaths.length;C++){var $=b;n==="rangeArea"&&($=l.fillPath({seriesNumber:i}));var S=tt(tt({},f),{},{pathFrom:o.pathFromLine,pathTo:o.linePaths[C],stroke:b,strokeWidth:this.strokeWidth,strokeLineCap:r.config.stroke.lineCap,fill:n==="rangeArea"?$:"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,y=e.linePaths,b=e.areaPaths,k=e.seriesIndex,C=e.lineYPosition,$=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,B=m.linePath,F=m.areaPath,z=m.pathFromLine,U=m.pathFromArea,G=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 K=function(ie,re){return re-ie/R[c]+2*(s.isReversed?ie/R[c]:0)},X=h,W=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,Z=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;W?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=K(G,C):(h=K(r[u][ae+1],C),o==="rangeArea"&&(X=K(T[u][ae+1],C))),$.push(r[u][ae+1]===null?null:d),!ge||I.config.stroke.curve!=="smooth"&&I.config.stroke.curve!=="monotoneCubic"?(S.push(h),M.push(X)):(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:X,xArrj:$,yArrj:S,y2Arrj:M,pX:f,pY:p,pathState:Z,segmentStartX:ne,linePath:B,areaPath:F,linePaths:y,areaPaths:b,curve:Q,isRangeStart:P});b=pe.areaPaths,y=pe.linePaths,f=pe.pX,p=pe.pY,Z=pe.pathState,ne=pe.segmentStartX,F=pe.areaPath,B=pe.linePath,!this.appendPathFrom||I.globals.hasNullValues||Q==="monotoneCubic"&&o==="rangeArea"||(z+=L.line(d,this.areaBottomY),U+=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:$,pathFromArea:U,areaPaths:b,pathFromLine:z,linePaths:y,linePath:B,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,y=e.segmentStartX,b=e.linePath,k=e.areaPath,C=e.linePaths,$=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(),B=M?R:R.slice().reverse(),F=(o=B,V.map(function(Ce,oe){return[Ce,o[oe]]}).filter(function(Ce){return Ce[1]!==null})),z=F.length>1?wyt(F):F,U=[];I&&(L?$=F:U=$.reverse());var G=0,K=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]=kyt(oe,ke,ke+pe[re]);return ie}(B,z).forEach(function(Ce){G++;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=K,ie=(K+=Ce.length)-1;L?b=P.move(F[pe][0],F[pe][1])+oe:I?b=P.move(U[pe][0],U[pe][1])+P.line(F[pe][0],F[pe][1])+oe+P.line(U[ie][0],U[ie][1]):(b=P.move(F[pe][0],F[pe][1])+oe,k=b+P.line(F[ie][0],T)+P.line(F[pe][0],T)+"z",$.push(k)),C.push(b)}),I&&G>1&&!L){var X=C.slice(G).reverse();C.splice(G),X.forEach(function(Ce){return C.push(Ce)})}m=0}break;case"smooth":var W=.35*(a-f);if(i[s][r]===null)m=0;else switch(m){case 0:if(y=f,b=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(b),$.push(k);break}if(m=1,r<i[s].length-2){var Q=P.curve(f+W,p,a-W,l,a,l);b+=Q,k+=Q;break}case 1:if(i[s][r+1]===null)b+=L?P.line(f,d):P.move(f,p),k+=P.line(f,T)+P.line(y,T)+"z",C.push(b),$.push(k),m=-1;else{var ne=P.curve(f+W,p,a-W,l,a,l);b+=ne,k+=ne,r>=i[s].length-2&&(L&&(b+=P.curve(a,l,a,l,a,d)+P.move(a,d)),k+=P.curve(a,l,a,l,a,T)+P.line(y,T)+"z",C.push(b),$.push(k),m=-1)}}f=a,p=l;break;default:var Z=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(y=f,b=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(b),$.push(k);break}if(m=1,r<i[s].length-2){var ae=Z(S,a,l);b+=ae,k+=ae;break}case 1:if(i[s][r+1]===null)b+=L?P.line(f,d):P.move(f,p),k+=P.line(f,T)+P.line(y,T)+"z",C.push(b),$.push(k),m=-1;else{var ge=Z(S,a,l);b+=ge,k+=ge,r>=i[s].length-2&&(L&&(b+=P.line(a,d)),k+=P.line(a,T)+P.line(y,T)+"z",C.push(b),$.push(k),m=-1)}}f=a,p=l}return{linePaths:C,areaPaths:$,pX:f,pY:p,pathState:m,segmentStartX:y,linePath:b,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,y=o(d)/this.height,b=o(d)/this.width;if(this.width>=this.height)for(h=0;h<d.length;h++)f.push([p,m,p+y,m+d[h]/y]),m+=d[h]/y;else for(h=0;h<d.length;h++)f.push([p,m,p+d[h]/b,m+b]),p+=d[h]/b;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,y=this.height-m;h=new t(this.xoffset,this.yoffset+m,this.width,y)}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,y=[],b=p/o(f);for(m=0;m<f.length;m++)y[m]=f[m]*b;return y}(a,l*c),[],new t(u,d,l,c),[]);return function(f){var p,m,y=[];for(p=0;p<f.length;p++)for(m=0;m<f[p].length;m++)y.push(f[p][m]);return y}(h)}function n(a,l,c,u){var d,h,f;if(a.length!==0)return d=c.shortestEdge(),function(p,m,y){var b;if(p.length===0)return!0;(b=p.slice()).push(m);var k=i(p,y),C=i(b,y);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=[],y=[];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++)y.push(a(l[p],f[p][2]-f[p][0],f[p][3]-f[p][1],f[p][0],f[p][1]))}else y=e(l,c,u,d,h);return y}}();var Cyt=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 yj(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 qr(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 ci(n.ctx).dropShadow(r,d,c)}var h=s.group({class:"apexcharts-data-labels"});l.forEach(function(f,p){var m=f[0],y=f[1],b=f[2],k=f[3],C=s.drawRect(m,y,b-m,k-y,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:y,index:c,i:c,j:p,width:b-m,height:k-y});var $=n.helpers.getShadeColor(i.config.chart.type,c,p,n.negRange),S=$.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+(b-m)/2,y:y+(k-y)/2,width:0,height:0},T={x:m,y,width:b-m,height:k-y};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,y,b,k));var B=null;i.globals.series[c][p]&&(B=n.helpers.calculateDataLabels({text:V,x:(m+b)/2,y:(y+k)/2+n.strokeWidth/2+R/3,i:c,j:p,colorProps:$,fontSize:R,series:e})),i.config.dataLabels.enabled&&B&&n.rotateToFitLabel(B,R,V,m,y,b,k),u.add(C),B!==null&&u.add(B)}),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 Ip(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}(),kj=86400,xyt=10/kj,Syt=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 ii(this.ctx),r=(n-e)/864e5;this.determineInterval(r),s.globals.disableZoomIn=!1,s.globals.disableZoomOut=!1,r<xyt?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*kj),m=Math.floor(r),y=Math.floor(r/30),b=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:y,numberOfYears:b};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 $=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 $.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),$.length>P&&(M=Math.floor($.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 nb(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 ii(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 ii(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 y=l+1,b=c,k=0,C=1;k<a;k++,C++){(y=he.monthMod(y))===0?(d="year",h+=1):d="month";var $=this._getYear(o,y,h);b=u.determineDaysOfMonths(y,$)*r+b;var S=y===0?$:y;this.timeScaleArray.push({position:b,value:S,unit:d,year:$,month:y===0?1:y}),y++}}},{key:"generateDayScale",value:function(e){var n=e.firstVal,i=e.currentMonth,s=e.currentYear,o=e.hoursWidthOnXAxis,r=e.numberOfDays,a=new ii(this.ctx),l="day",c=n.minDate+1,u=c,d=function(C,$,S){return C>a.determineDaysOfMonths($+1,S)&&(u=1,l="month",f=$+=1),$},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,y=0;y<r;y++){l="day",p=d(u+=1,p,this._getYear(s,p,0));var b=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:b,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 ii(this.ctx),c="hour",u=function(M,P){return M>l.determineDaysOfMonths(P+1,o)&&(y=1,P+=1),{month:P,date:y}},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 y=i;m>=24&&(m=0,c="day",p=y+=1);var b=u(y,s).month;b=d(y,b),p>31&&(p=y=1),this.timeScaleArray.push({position:f,value:p,unit:c,day:y,hour:m,year:o,month:he.monthMod(b)}),m++;for(var k=f,C=0;C<a;C++){c="hour",m>=24&&(m=0,c="day",b=u(y+=1,b).month,b=d(y,b));var $=this._getYear(o,b,0);k=60*r+k;var S=m===0?y:m;this.timeScaleArray.push({position:k,value:S,unit:c,hour:m,day:y,year:$,month:he.monthMod(b)}),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,y=o,b=(60-i-n/1e3)*u,k=0;k<d;k++)h>=60&&(h=0,(y+=1)===24&&(y=0)),this.timeScaleArray.push({position:b,value:h,unit:"minute",hour:y,minute:h,day:f,year:this._getYear(m,p,0),month:he.monthMod(p)}),b+=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,y=o,b=(1e3-n)/1e3*c,k=0;k<u;k++)d>=60&&(d=0,++h>=60&&(h=0,++y===24&&(y=0))),this.timeScaleArray.push({position:b,value:d,unit:"second",hour:y,minute:h,second:d,day:f,year:this._getYear(m,p,0),month:he.monthMod(p)}),b+=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 ii(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}(),$yt=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 ik(s,n),h=new nk(s,n);s.pie=new wj(s);var f=new vyt(s);s.rangeBar=new _yt(s,n);var p=new gyt(s),m=[];if(r.comboCharts){var y,b,k=new ys(s);if(a.area.series.length>0&&(y=m).push.apply(y,Ns(k.drawSeriesByGroup(a.area,r.areaGroups,"area",d))),a.column.series.length>0)if(o.chart.stacked){var C=new YT(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&&(b=m).push.apply(b,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 $=new ik(s,n,!0);m.push($.draw(a.scatter.series,"scatter",a.scatter.i))}if(a.bubble.series.length>0){var S=new ik(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 YT(s,n).draw(r.series):(s.bar=new sp(s,n),m=s.bar.draw(r.series));break;case"candlestick":m=new nk(s,n).draw(r.series,"candlestick");break;case"boxPlot":m=new nk(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 myt(s,n).draw(r.series);break;case"treemap":m=new Cyt(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 mj(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 Kx(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,n=function(){return e.w.config.series.map(function(){return[]})},i=new dj,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 Zx(this.ctx).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position==="back"&&new Zx(this.ctx).drawYCrosshairs(),e.config.xaxis.type==="datetime"&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new Syt(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}(),Ayt=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 w1(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 b1(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]},y={pos:[0,0],start:[0,0]};h[p]=e.call(m,h[p]),f[p]=e.call(y,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(y,f[p])))):(h[p]=n.call(m,h[p]),f[p]=n.call(y,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",y.pos[0],y.pos[1],y.pos[0],y.pos[1],y.pos[0],y.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,y,b,k,C,$,S,M,P,T,I,L,R,V,B,F,z,U,G,K,X=Math.abs(l[1]),W=Math.abs(l[2]),Q=l[3]%360,ne=l[4],Z=l[5],ae=l[6],ge=l[7],Ce=new Dn(a),oe=new Dn(ae,ge),pe=[];if(X===0||W===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/(X*X)+c.y*c.y/(W*W),u>1&&(X*=u=Math.sqrt(u),W*=u),d=new ln().rotate(Q).scale(1/X,1/W).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===Z&&(m*=-1),y=new Dn((oe.x+Ce.x)/2+m*-h[1],(oe.y+Ce.y)/2+m*h[0]),b=new Dn(Ce.x-y.x,Ce.y-y.y),k=new Dn(oe.x-y.x,oe.y-y.y),C=Math.acos(b.x/Math.sqrt(b.x*b.x+b.y*b.y)),b.y<0&&(C*=-1),$=Math.acos(k.x/Math.sqrt(k.x*k.x+k.y*k.y)),k.y<0&&($*=-1),Z&&C>$&&($+=2*Math.PI),!Z&&C<$&&($-=2*Math.PI),M=Math.ceil(2*Math.abs(C-$)/Math.PI),T=[],I=C,S=($-C)/M,P=4*Math.tan(S/4)/3,B=0;B<=M;B++)R=Math.cos(I),L=Math.sin(I),V=new Dn(y.x+R,y.y+L),T[B]=[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(X,W).rotate(-Q),B=0,F=T.length;B<F;B++)T[B][0]=T[B][0].transform(d),T[B][1]=T[B][1].transform(d),T[B][2]=T[B][2].transform(d);for(B=1,F=T.length;B<F;B++)z=(V=T[B-1][2]).x,U=V.y,G=(V=T[B][0]).x,K=V.y,ae=(V=T[B][1]).x,ge=V.y,pe.push(["C",z,U,G,K,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(Dr,{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 y;p=s(u,h!==!1&&h+1),m=s(d,f!==!1&&f+1),h===!1&&(h=(y=new Dr(b.start).bbox()).height==0||y.width==0?u.push(u[0])-1:u.push(["M",y.x+y.width/2,y.y+y.height/2])-1),f===!1&&(f=(y=new Dr(b.dest).bbox()).height==0||y.width==0?d.push(d[0])-1:d.push(["M",y.x+y.width/2,y.y+y.height/2])-1);var b=t(u,h,p,d,f,m);u=u.slice(0,h).concat(b.start,p===!1?[]:u.slice(p)),d=d.slice(0,f).concat(b.dest,m===!1?[]:d.slice(m)),h=p!==!1&&h+b.start.length,f=m!==!1&&f+b.dest.length}this._array=u,this.destination=new Dr,this.destination._array=d;var k=this.fromArray(u.map(function(C,$){var S=d[$].map(function(M,P){return P===0?M:l.step(C[P],d[$][P],a,c[$],c)});return S}));return k}})})();const qT=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class Eyt{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(qT(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(qT(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 Ws(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 Jx(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 Qx([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(pi,{draggable(t=!0){return(this.remember("_draggable")||new Eyt(this)).init(t),this}});let Cj=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=yv();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",Jx(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",Jx("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=>Qx(n,e)),this.rotationPoint=Qx(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 GT=t=>function(e=!0,n={}){typeof e=="object"&&(n=e,e=!0);let i=this.remember("_"+t.name);return i||(e.prototype instanceof Cj?(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 e6(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 t6([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(pi,{select:GT(Cj)}),At([ju,Wu,Uu],{pointSelect:GT(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=yv();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",Jx("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=>Qx(e,t))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class xj{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=yv();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",e6(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",e6("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=>t6(i,n)),this.rotationPoint=t6(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 XT=t=>function(e=!0,n={}){typeof e=="object"&&(n=e,e=!0);let i=this.remember("_"+t.name);return i||(e.prototype instanceof xj?(i=new e(this),e=!0):i=new t(this),this.remember("_"+t.name,i)),i.active(e,n),this};At(pi,{select:XT(xj)}),At([ju,Wu,Uu],{pointSelect:XT(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=yv();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",e6("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=>t6(e,t))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const v0=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),KT=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 Ws(e,n,i-e,s-n)};class ZT{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(v0(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(v0(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 Ws(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(y,b,k){const C=[[y.x,y.y],[y.x+y.width,y.y],[y.x+y.width,y.y+y.height],[y.x,y.y+y.height]].map(([$,S])=>{const M=$-b[0],P=(S-b[1])*k;return[M*k+b[0],P+b[1]]});return KT(C)}(this.box,p,m)}this.el.dispatch("resize",{box:new Ws(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(v0(e))),s=this.el.array().slice();s[this.index]=[n,i],this.el.dispatch("resize",{box:KT(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(v0(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(),y=this.snapToAngle(m+d)-m;this.el.dispatch("resize",{box:this.box,angle:y,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.transform(h.rotateO(y,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(pi,{resize:function(t=!0,e={}){typeof t=="object"&&(e=t,t=!0);let n=this.remember("_ResizeHandler");return n||(t.prototype instanceof ZT?(n=new t(this),t=!0):n=new ZT(this),this.remember("_resizeHandler",n)),n.active(t,e),this}}),window.SVG===void 0&&(window.SVG=U_t),window.Apex===void 0&&(window.Apex={});var JT=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 Ip(this.ctx),this.ctx.axes=new Q_t(this.ctx),this.ctx.core=new $yt(this.ctx.el,this.ctx),this.ctx.config=new w1({}),this.ctx.data=new YS(this.ctx),this.ctx.grid=new fj(this.ctx),this.ctx.graphics=new Ne(this.ctx),this.ctx.coreUtils=new ys(this.ctx),this.ctx.crosshairs=new Zx(this.ctx),this.ctx.events=new Z_t(this.ctx),this.ctx.exports=new tb(this.ctx),this.ctx.fill=new qr(this.ctx),this.ctx.localization=new J_t(this.ctx),this.ctx.options=new Ou,this.ctx.responsive=new eyt(this.ctx),this.ctx.series=new gr(this.ctx),this.ctx.theme=new tyt(this.ctx),this.ctx.formatters=new kv(this.ctx),this.ctx.titleSubtitle=new nyt(this.ctx),this.ctx.legend=new mj(this.ctx),this.ctx.toolbar=new gj(this.ctx),this.ctx.tooltip=new WT(this.ctx),this.ctx.dimensions=new nb(this.ctx),this.ctx.updateHelpers=new Ayt(this.ctx),this.ctx.zoomPanSelection=new lyt(this.ctx),this.ctx.w.globals.tooltip=new WT(this.ctx)}}]),t}(),QT=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}(),ok=new WeakMap,Myt=function(){function t(e,n){lt(this,t),this.opts=n,this.ctx=this,this.w=new K_t(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 JT(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 y=new ResizeObserver(function(b){p&&f.call(h,b),p=!0});h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(h.children).forEach(function(b){return y.observe(b)}):y.observe(h),ok.set(f,y)}(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 JT(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 b1(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 Rp(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 fj(i);var a,l,c=i.grid.drawGrid();if(i.annotations=new X_t(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 k1(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=ok.get(i);s&&(s.disconnect(),ok.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 QT(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 QT(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 Kx(this.ctx).getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new Kx(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 tb(this.ctx).dataURI(e)}},{key:"exportToCSV",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new tb(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}(),Tyt=Myt;const eP=vi(Tyt),tP=["animationEnd","beforeMount","mounted","updated","click","mouseMove","mouseLeave","legendClick","markerClick","selection","dataPointSelection","dataPointMouseEnter","dataPointMouseLeave","beforeZoom","beforeResetZoom","zoomed","scrolled","brushScrolled"],sb=fe({name:"apexchart",props:{options:{type:Object},type:{type:String},series:{type:Array,required:!0},width:{default:"100%"},height:{default:"auto"}},emits:tP,setup(t,{emit:e}){const n=J(null),i=J(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 z=Object(F);for(let U=1;U<arguments.length;U++){let G=arguments[U];if(G!=null)for(let K in G)G.hasOwnProperty(K)&&(z[K]=G[K])}return z}}();let B=Object.assign({},R);return s(R)&&s(V)&&Object.keys(V).forEach(F=>{s(V[F])?F in R?B[F]=o(R[F],V[F]):Object.assign(B,{[F]:V[F]}):Object.assign(B,{[F]:V[F]})}),B},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;tP.forEach(F=>{let z=(...U)=>e(F,...U);R.chart.events[F]=(...U)=>{z(...U),V&&V.hasOwnProperty(F)&&V[F](...U)}});const B=o(t.options,R);return i.value=new eP(n.value,B),i.value.render()},a=()=>(l(),r()),l=()=>{i.value.destroy(),i.value=null},c=(R,V)=>i.value.updateSeries(R,V),u=(R,V,B,F)=>i.value.updateOptions(R,V,B,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()},y=(R,V)=>{i.value.toggleDataPointSelection(R,V)},b=R=>i.value.appendData(R),k=(R,V)=>i.value.zoomX(R,V),C=R=>i.value.dataURI(R),$=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()};Od(()=>{window.ApexCharts=eP}),Ft(()=>{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:y,appendData:b,appendSeries:p,addXaxisAnnotation:S,addYaxisAnnotation:M,addPointAnnotation:P,removeAnnotation:T,clearAnnotations:I,setLocale:$,dataURI:C}},render(){return bt("div",{class:"vue-apexcharts"})}}),Pyt=t=>{t.component(sb.name,sb)};sb.install=Pyt;const Iyt={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()}},Lyt={name:"ReportsChart",mixins:[Iyt],props:{data:{type:Array,default:()=>[]},seriesName:{type:String},series:{type:Array},categories:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},components:{VueApexCharts:sb},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()}},Oyt={class:"reports-chart"};function Dyt(t,e,n,i,s,o){const r=H("VueApexCharts");return v(),A("div",Oyt,[_(r,{ref:"apexChart",height:"350",options:o.chartOptions,series:o.chartSeries},null,8,["options","series"])])}const GS=ue(Lyt,[["render",Dyt]]),Ryt={name:"ActivitiesChart",components:{ReportsChart:GS,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()}},Vyt={class:"fcom-report-chart",style:{"min-height":"400px"}},Fyt={key:1},Nyt={class:"fcom-report-chart-header"},Byt={class:"fcom-report-header-action"},zyt={key:0};function Hyt(t,e,n,i,s,o){const r=H("Loading"),a=sn,l=Jt,c=H("ReportsChart");return v(),A("div",Vyt,[s.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",Fyt,[g("div",Nyt,[g("h4",null,x(t.$t("Activities")),1),g("div",Byt,[_(l,{modelValue:s.activity,"onUpdate:modelValue":e[0]||(e[0]=u=>s.activity=u),onChange:o.fetchActivity},{default:w(()=>[(v(!0),A(ee,null,we(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(),A("div",zyt,[(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 Uyt=ue(Ryt,[["render",Hyt]]),jyt={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()}},Wyt={class:"fcom-report-popular-time"},Yyt={key:1},qyt={class:"fcom-report-chart-header"};function Gyt(t,e,n,i,s,o){const r=H("Loading"),a=H("InfoFilled"),l=be,c=Ss,u=Il,d=Pl;return v(),A("div",Wyt,[s.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",Yyt,[g("div",qyt,[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:w(()=>[_(l,null,{default:w(()=>[_(a)]),_:1})]),_:1},8,["content"])])]),_(d,{data:s.weekly_activities.data,style:{width:"100%"}},{default:w(()=>[(v(!0),A(ee,null,we(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 Xyt=ue(jyt,[["render",Gyt]]),Kyt={name:"Overview",components:{CheckProStatus:LS,AnalyticsHeader:r_t,AnalyticsWidgets:f_t,ActivitiesChart:Uyt,PopularDayTime:Xyt},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}}},Zyt={key:0},Jyt={key:1},Qyt={class:"fcom-report-body"};function ebt(t,e,n,i,s,o){const r=H("CheckProStatus"),a=H("AnalyticsHeader"),l=H("AnalyticsWidgets"),c=H("ActivitiesChart"),u=H("PopularDayTime");return o.isAnalyticsEnabled?(v(),A("div",Jyt,[(v(),A("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",Qyt,[_(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(),A("div",Zyt,[_(r)]))}const tbt=ue(Kyt,[["render",ebt]]),nbt={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}}},sbt={class:"fcom-report-header"},ibt={class:"fcom-report-header-action"};function obt(t,e,n,i,s,o){const r=sn,a=Jt,l=Wd;return v(),A("div",sbt,[g("h4",null,x(t.$t("Members")),1),g("div",ibt,[_(a,{modelValue:s.localPredefinedDate,"onUpdate:modelValue":e[0]||(e[0]=c=>s.localPredefinedDate=c),onChange:o.setDateRange,class:"date-selector"},{default:w(()=>[(v(!0),A(ee,null,we(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 rbt=ue(nbt,[["render",obt]]),abt={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)}}},lbt={key:1,class:"fcom-report-stat-widgets"},cbt={class:"stat-title"};function ubt(t,e,n,i,s,o){const r=H("Loading");return s.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",lbt,[(v(!0),A(ee,null,we(s.widgets,(a,l)=>(v(),A("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",cbt,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 dbt=ue(abt,[["render",ubt]]),hbt={name:"MembersActivitiesChart",components:{Loading:Ha,ReportsChart:GS},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))}}},fbt={class:"fcom-report-chart",style:{"min-height":"400px"}},pbt={key:1},mbt={class:"fcom-report-chart-header"},gbt={key:0};function vbt(t,e,n,i,s,o){const r=H("Loading"),a=H("ReportsChart");return v(),A("div",fbt,[s.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",pbt,[g("div",mbt,[g("h4",null,x(t.$t("Members Activities")),1)]),s.renderChart?(v(),A("div",gbt,[(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 _bt=ue(hbt,[["render",vbt]]),ybt={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)}}},bbt={class:"fcom-top-members-wrap"},wbt={key:1},kbt={class:"fcom-report-chart-header"},Cbt={class:"fcom-members-activity-lists"},xbt={key:0},Sbt={class:"image-box"},$bt=["src","alt"],Abt={class:"number"},Ebt={class:"content-box"},Mbt=["title"],Tbt={class:"points"};function Pbt(t,e,n,i,s,o){const r=H("Loading"),a=H("InfoFilled"),l=be,c=Ss;return v(),A("div",bbt,[s.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",wbt,[g("div",kbt,[g("h4",null,[N(x(t.$t(n.title))+" ",1),_(c,{class:"box-item",effect:"dark",content:n.tooltipContent,placement:"top-start"},{default:w(()=>[_(l,null,{default:w(()=>[_(a)]),_:1})]),_:1},8,["content"])])]),g("div",Cbt,[s.members.length?(v(!0),A(ee,{key:1},we(s.members,(u,d)=>(v(),A("div",{class:"fcom-members-activity-box",key:`top-member-${d}`},[g("div",Sbt,[g("img",{src:u.avatar,alt:t.$t("Member")},null,8,$bt),g("span",Abt,x(s.members.length-d),1)]),g("div",Ebt,[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,Mbt)]),g("div",Tbt,x(u[n.pointLabel]),1)]))),128)):(v(),A("div",xbt,x(t.$t("No Activity")),1))])]))])}const Ibt=ue(ybt,[["render",Pbt]]),Lbt={name:"MembersAnalytics",components:{CheckProStatus:LS,AnalyticsHeader:rbt,AnalyticsWidgets:dbt,MembersActivitiesChart:_bt,TopMembersSection:Ibt},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}}},Obt={key:0},Dbt={key:1},Rbt={class:"fcom-report-body"},Vbt={class:"fcom-members-activities-wrap"};function Fbt(t,e,n,i,s,o){const r=H("CheckProStatus"),a=H("AnalyticsHeader"),l=H("AnalyticsWidgets"),c=H("MembersActivitiesChart"),u=H("TopMembersSection");return o.isAnalyticsEnabled?(v(),A("div",Dbt,[(v(),A("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",Rbt,[_(l,{"date-ranges":s.dateRanges},null,8,["date-ranges"]),_(c,{"date-ranges":s.dateRanges},null,8,["date-ranges"]),g("div",Vbt,[_(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(),A("div",Obt,[_(r)]))}const Nbt=ue(Lbt,[["render",Fbt]]),Bbt={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}}},zbt={class:"fcom-report-header"},Hbt={class:"fcom-report-header-action"};function Ubt(t,e,n,i,s,o){const r=sn,a=Jt,l=Wd;return v(),A("div",zbt,[g("h4",null,x(t.$t("Spaces")),1),g("div",Hbt,[_(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:w(()=>[(v(!0),A(ee,null,we(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:w(()=>[(v(!0),A(ee,null,we(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 jbt=ue(Bbt,[["render",Ubt]]),Wbt={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()}},Ybt={class:"fcom-report-stat-widgets"},qbt={class:"stat-title"};function Gbt(t,e,n,i,s,o){const r=H("Loading");return v(),A("div",Ybt,[s.loading?(v(),D(r,{key:0,section:1})):O("",!0),s.loading?O("",!0):(v(!0),A(ee,{key:1},we(s.widgets,(a,l)=>(v(),A("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",qbt,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 Xbt=ue(Wbt,[["render",Gbt]]),Kbt={name:"AnalyticsChart",components:{ReportsChart:GS,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()}},Zbt={class:"fcom-report-chart",style:{"min-height":"400px"}},Jbt={key:1},Qbt={class:"fcom-report-chart-header"},e2t={key:0};function t2t(t,e,n,i,s,o){const r=H("Loading"),a=H("ReportsChart");return v(),A("div",Zbt,[s.loading?(v(),D(r,{key:0,section:1})):O("",!0),s.loading?O("",!0):(v(),A("div",Jbt,[g("div",Qbt,[g("h4",null,x(t.$t("Space Activities")),1)]),s.renderChart?(v(),A("div",e2t,[(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 n2t=ue(Kbt,[["render",t2t]]),s2t={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()}},i2t={class:"fcom-report-popular-time"},o2t={key:1},r2t={class:"fcom-report-chart-header"};function a2t(t,e,n,i,s,o){const r=H("Loading"),a=H("InfoFilled"),l=be,c=Ss,u=Il,d=Pl;return v(),A("div",i2t,[s.loading?(v(),D(r,{key:0,section:1})):O("",!0),s.loading?O("",!0):(v(),A("div",o2t,[g("div",r2t,[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:w(()=>[_(l,null,{default:w(()=>[_(a)]),_:1})]),_:1},8,["content"])])]),_(d,{data:s.popularSpaces.data,style:{width:"100%"}},{default:w(()=>[(v(!0),A(ee,null,we(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 l2t=ue(s2t,[["render",a2t]]),c2t={name:"SpaceAnalytics",components:{CheckProStatus:LS,Loading:Ha,AnalyticsHeader:jbt,AnalyticsWidgets:Xbt,AnalyticsChart:n2t,PopularSpaces:l2t},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"))}},u2t={key:0},d2t={key:1},h2t={class:"fcom-report-body"};function f2t(t,e,n,i,s,o){const r=H("CheckProStatus"),a=H("Loading"),l=H("AnalyticsHeader"),c=H("AnalyticsWidgets"),u=H("AnalyticsChart"),d=H("PopularSpaces");return o.isAnalyticsEnabled?(v(),A("div",d2t,[s.pageLoaded?(v(),A("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",h2t,[_(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(),A("div",u2t,[_(r)]))}const p2t=ue(c2t,[["render",f2t]]),m2t=[{path:"/settings",component:cvt,meta:{active_menu:"settings"},children:[{name:"settings",path:"",component:tot,meta:{active_menu:"settings"}},{name:"customization",path:"customization",component:KXe,meta:{active_menu:"settings"}},{name:"admin_moderators",path:"moderators",component:xrt,meta:{active_menu:"settings"}},{name:"email_notifications",path:"email-notifications",component:SKe,meta:{active_menu:"settings"}},{name:"features",path:"features",component:kst,meta:{active_menu:"settings"}},{name:"menu_settings",path:"menu-settings",component:Hot,meta:{active_menu:"settings"}},{path:"space_groups",name:"space_groups",component:t0t,meta:{active_menu:"settings"}},{path:"topics-settings",name:"all_topics",component:qGe,meta:{active_menu:"settings"}},{path:"content-moderation",name:"content_moderation",component:b1t,meta:{active_menu:"settings"}},{path:"privacy-settings",name:"privacy_settings",component:rvt,meta:{active_menu:"settings"}},{path:"tools",name:"tools",component:D1t,meta:{active_menu:"settings"}},{path:"crm-access-config",name:"crm_access_config",component:iGe,meta:{active_menu:"settings"}},{path:"incoming-webhooks",name:"incoming_webhooks",component:j0t,meta:{active_menu:"settings"}}]},{path:"/manage-spaces/:space/settings",component:d0t,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:()=>Qs(()=>Promise.resolve().then(()=>Dkt),void 0)},{name:"space_settings_paywalls",path:"paywalls",component:()=>Qs(()=>Promise.resolve().then(()=>EP),void 0)},{name:"space_settings_lockscreen",path:"lock-screen",component:()=>Qs(()=>Promise.resolve().then(()=>I6t),void 0)},{name:"space_settings_links",path:"links",component:()=>Qs(()=>Promise.resolve().then(()=>MP),void 0)},{name:"space_settings_pages",path:"pages",component:()=>Qs(()=>Promise.resolve().then(()=>N4t),void 0)}]},{path:"/manage-courses/edit/:course_id/settings",component:p0t,props:!0,redirect:t=>({name:"course_settings_general",params:t.params}),meta:{active_menu:"manage_courses"},children:[{name:"course_settings_general",path:"general",component:()=>Qs(()=>Promise.resolve().then(()=>j4t),void 0)},{name:"course_settings_paywalls",path:"paywalls",component:()=>Qs(()=>Promise.resolve().then(()=>EP),void 0)},{name:"course_settings_lockscreen",path:"lock-screen",component:()=>Qs(()=>Promise.resolve().then(()=>K4t),void 0)},{name:"course_settings_welcome_banner",path:"welcome-banner",component:()=>Qs(()=>Promise.resolve().then(()=>w8t),void 0)},{name:"course_settings_links",path:"links",component:()=>Qs(()=>Promise.resolve().then(()=>MP),void 0)}]},{path:"/manage-courses",component:RYe,name:"manage_courses",meta:{active_menu:"manage_courses"}},{path:"/manage-courses/edit/:course_id",component:iUe,props:!0,meta:{active_menu:"manage_courses"},children:[{name:"edit_lessons",path:"lessons",component:aYe,props:!0,meta:{active_menu:"manage_courses"}},{name:"course_students",path:"students",component:KDe,props:!0,meta:{active_menu:"manage_courses"}},{name:"quiz_results",path:"quiz-results",component:eVe,props:!0,meta:{active_menu:"manage_courses"}},{name:"course_overview",path:"overview",component:zHe,props:!0,meta:{active_menu:"manage_courses"}}]},{path:"/analytics",component:X0t,name:"analytics",meta:{active_menu:"analytics"},children:[{name:"analytics_overview",path:"overview",component:tbt,meta:{active_menu:"analytics_overview"}},{name:"analytics_members",path:"members",component:Nbt,meta:{active_menu:"analytics_members"}},{name:"analytics_spaces",path:"spaces",component:p2t,meta:{active_menu:"analytics_spaces"}}]},{path:"/manage-migrations",component:wqe,name:"manage_migrations",meta:{active_menu:"manage_migrations"}}],g2t={name:"VerifiedSign"},v2t={class:"fcom_verified"},_2t=["aria-label"];function y2t(t,e,n,i,s,o){const r=Ss;return v(),D(r,{content:t.$t("Verified"),placement:"top"},{default:w(()=>[g("span",v2t,[(v(),A("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,_2t))])]),_:1},8,["content"])}const b2t=ue(g2t,[["render",y2t]]),w2t={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]}}},k2t=["src"],C2t={key:1,class:"fcom_emoji"},x2t={key:2,class:"fcom_shape"},S2t={key:1};function $2t(t,e,n,i,s,o){const r=be,a=Ss;return o.renderingBadges?(v(!0),A(ee,{key:0},we(o.renderingBadges,l=>(v(),A("div",{class:q([{user_icon_only:l.show_label!="yes"},"user_badge"])},[_(a,{content:l.title,placement:"top"},{default:w(()=>[g("div",{style:Xe({backgroundColor:l.background_color,color:l.color,borderColor:l.color}),class:"user_badge_inner"},[l.config?(v(),A(ee,{key:0},[l.config.logo?(v(),A("img",{key:0,alt:"",src:l.config.logo},null,8,k2t)):l.config.emoji?(v(),A("span",C2t,x(l.config.emoji),1)):l.config.shape_svg?(v(),A("span",x2t,[_(r,{innerHTML:l.config.shape_svg},null,8,["innerHTML"])])):O("",!0)],64)):O("",!0),l.show_label=="yes"?(v(),A("span",S2t,x(l.title),1)):O("",!0)],4)]),_:2},1032,["content"])],2))),256)):O("",!0)}const A2t=ue(w2t,[["render",$2t]]),E2t={name:"WelcomeBanner",components:{MediaPreview:Ap},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}}},M2t={key:0,class:"fcom_welcome_title"},T2t=["innerHTML"],P2t={key:2,class:"fcom_welcome_cta_buttons"},I2t=["href","target"];function L2t(t,e,n,i,s,o){const r=H("media-preview"),a=Wo,l=H("MoreFilled"),c=be,u=He,d=$r,h=Ar,f=Sr;return o.effectiveConfig&&o.showBanner?(v(),A("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(),A("h2",M2t,x(o.effectiveConfig.title),1)):O("",!0),o.effectiveConfig.description_rendered?(v(),A("div",{key:1,class:"fcom_welcome_sub",innerHTML:o.effectiveConfig.description_rendered},null,8,T2t)):O("",!0),o.showCtaButtons?(v(),A("div",P2t,[(v(!0),A(ee,null,we(o.effectiveConfig.ctaButtons,p=>(v(),A(ee,null,[p.link&&p.label?(v(),A("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,I2t)):O("",!0)],64))),256))])):O("",!0)],2),o.isRemovable?(v(),D(f,{key:2,trigger:"click",class:"fcom_welcome_close"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{onClick:o.closeBanner},{default:w(()=>[N(x(t.$t("Hide Banner")),1)]),_:1},8,["onClick"])]),_:1})]),default:w(()=>[_(u,{"aria-label":t.$t("Hide Banner"),class:"fcom_dot_menu",size:"small",text:""},{default:w(()=>[_(c,null,{default:w(()=>[_(l)]),_:1})]),_:1},8,["aria-label"])]),_:1})):O("",!0)],2)):O("",!0)}const O2t=ue(E2t,[["render",L2t]]);Qs(()=>Promise.resolve().then(()=>C8t),void 0);Qs(()=>Promise.resolve().then(()=>S8t),void 0);const D2t=[vae,pR,Lae,uR,dR,kle,Rle,Qae,ole,dle,Ble,cae,fae,gR,fR,ple,rR,ale,Zb,hR,sle,K4,Hr,Fle,bd,Bd,yae,sC,Z4,Hae,Kae,Ale,iae,Bo,cR,_le,X4,Wae,aae,Eae,gle,Jb,mR,wl,Qb,Bae,Ule];function _g(t){const e=[];if(typeof t=="object"&&t.join===void 0)for(const n in t)e.push(_g(t[n]));else if(typeof t=="object"&&t.join!==void 0)for(const n in t)e.push(_g(t[n]));else typeof t=="function"||typeof t=="string"&&e.push(t);return e.join("<br />")}const Rs=Pg(bOe),XS=Iye();XS.use(Yye);XS.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(XS);Rs.use(K_e);Rs.config.globalProperties.appVars=window.fluentComAdmin;Rs.config.globalProperties.auth=window.fluentComAdmin.auth;Rs.config.globalProperties.has_pro=!!window.fluentComAdmin.pro;let n6="40%",s6="60%",Sj="500px";window.innerWidth<600?(s6="95%",n6="90%",Sj="90%"):window.innerWidth<800&&(s6="80%",n6="80%");D2t.forEach(t=>{Rs.component(t.name,t)});Rs.component("VerifiedSign",b2t);Rs.component("UserAvatar",j2);Rs.component("UserRouteLink",la);Rs.component("WelcomeBanner",O2t);Rs.component("UserBadge",A2t);function nP(){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:n6,dialogWidth:s6,modalWidth:Sj,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=_g(s),o||(o="Something is wrong!"),typeof o!="string"&&(o=_g(o)),this.$notify({type:"error",title:this.$t("Error"),message:o,dangerouslyUseHTMLString:!0})},convertToText:_g,$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=kye,Rs.config.globalProperties.$confirm=Ww.confirm,Rs.config.globalProperties.$promt=Ww.prompt,Rs.config.globalProperties.$messageBox=Ww,Rs.config.globalProperties.$gloablStorage={};const e=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_admin_routes",m2t);let n=null;window.fluentComAdmin.routing_system=="hash"?n=D7({routes:e,history:AZ()}):n=D7({routes:e,history:CO(window.fluentComAdmin.portal_slug)});const i=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_admin_app",Rs);QH().initialize(),window.fluentFrameworkApp=i.use(n).mount("#fluent_com_portal"),window.fluentFrameworkAppRouter=n}window.FluentCommunityUtil?nP():document.addEventListener("fluentCommunityUtilReady",function(){nP()});var Yu,wf;class R2t{constructor(e){ua(this,Yu,void 0);ua(this,wf,new Set);Qi(this,Yu,e)}get current(){return Gt(this,Yu)}set current(e){Gt(this,Yu)!=e&&(Qi(this,Yu,e),Gt(this,wf).forEach(n=>n(e)))}on(e){return Gt(this,wf).add(e),()=>Gt(this,wf).delete(e)}}Yu=new WeakMap,wf=new WeakMap;const $j=t=>new R2t(t),i6=Symbol.for("atomico.hooks");globalThis[i6]=globalThis[i6]||{};let ip=globalThis[i6];const V2t=Symbol.for("Atomico.suspense"),Aj=Symbol.for("Atomico.effect"),F2t=Symbol.for("Atomico.layoutEffect"),Ej=Symbol.for("Atomico.insertionEffect"),Cv=(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},ud=t=>Cv((e=$j(t))=>e),KS=()=>Cv((t=$j(ip.c.host))=>t),Mj=()=>ip.c.update,N2t=(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!==V2t)throw d;s=!0}finally{ip.c=null}return u},cleanEffects:c=>(r(Ej,c),()=>(r(F2t,c),()=>{r(Aj,c)})),isSuspense:o}},xv=Symbol.for;function Tj(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",yg=t=>typeof t=="object",{isArray:B2t}=Array,o6=(t,e)=>(e?t instanceof HTMLStyleElement:!0)&&"hydrate"in((t==null?void 0:t.dataset)||{});function Pj(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 Ij=(t,e,n)=>(t.addEventListener(e,n),()=>t.removeEventListener(e,n));let Lj=class{constructor(e,n,i){this.message=n,this.target=e,this.value=i}};class z2t extends Lj{}class H2t extends Lj{}const ib="Custom",U2t=null,j2t={true:1,"":1,1:1};function W2t(t,e,n,i,s){const{type:o,reflect:r,event:a,value:l,attr:c=q2t(e)}=(n==null?void 0:n.name)!=ib&&yg(n)&&n!=U2t?n:{type:n},u=(o==null?void 0:o.name)===ib&&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?K2t:Z2t)(o,h);if(p&&m!=null)throw new z2t(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&&Y2t(this,a),this.updated.then(()=>{r&&(this._ignoreAttr=c,G2t(this,o,c,this[e]),this._ignoreAttr=null)}))},get(){return this._props[e]}}),d&&(s[e]=d()),i[c]={prop:e,type:o}}const Y2t=(t,{type:e,base:n=CustomEvent,...i})=>t.dispatchEvent(new n(e,i)),q2t=t=>t.replace(/([A-Z])/g,"-$1").toLowerCase(),G2t=(t,e,n,i)=>i==null||e==Boolean&&!i?t.removeAttribute(n):t.setAttribute(n,(e==null?void 0:e.name)===ib&&(e!=null&&e.serialize)?e==null?void 0:e.serialize(i):yg(i)?JSON.stringify(i):e==Boolean?"":i),X2t=(t,e)=>t==Boolean?!!j2t[e]:t==Number?Number(e):t==String?e:t==Array||t==Object?JSON.parse(e):t.name==ib?e:new t(e),K2t=({map:t},e)=>{try{return{value:t(e),error:!1}}catch{return{value:e,error:!0}}},Z2t=(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 J2t=0;const Q2t=t=>{var n;const e=((n=(t==null?void 0:t.dataset)||{})==null?void 0:n.hydrate)||"";return e||"c"+J2t++},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(y=>this.mount=()=>{y(),u!=this.parentNode&&(d!=u?this.unmounted.then(this.update):this.update()),u=this.parentNode}),this.unmounted=new Promise(y=>this.unmount=()=>{y(),(u!=this.parentNode||!this.isConnected)&&(h.cleanEffects(!0)()(),d=this.parentNode,u=null)}),this.symbolId=this.symbolId||Symbol(),this.symbolIdParent=Symbol();const h=N2t(()=>this.update(),this,Q2t(this));let f,p=!0;const m=o6(this);this.update=()=>(f||(f=!0,this.updated=(this.updated||this.mounted).then(()=>{try{const y=h.load(this._render),b=h.cleanEffects();return y&&y.render(this,this.symbolId,m),f=!1,p&&!h.isSuspense()&&(p=!1,!m&&ewt(this)),b()}finally{f=!1}}).then(y=>{y&&y()})),this.updated),this.update()}connectedCallback(){this.mount(),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this.unmount()}attributeChangedCallback(u,d,h){if(n[u]){if(u===this._ignoreAttr||d===h)return;const{prop:f,type:p}=n[u];try{this[f]=X2t(p,h)}catch{throw new H2t(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)W2t(this.prototype,d,r[d],n,i);return Object.keys(n).concat(u)}}return l};function ewt(t){const{styles:e}=t.constructor,{shadowRoot:n}=t;if(n&&e.length){const i=[];Pj(e,s=>{s&&(s instanceof Element?n.appendChild(s.cloneNode(!0)):i.push(s))}),i.length&&(n.adoptedStyleSheets=i)}}const Oj=t=>(e,n)=>{Cv(([i,s]=[])=>((s||!s)&&(s&&Tj(s,n)?i=i||!0:(rl(i)&&i(),i=null)),[i,n]),([i,s],o)=>o?(rl(i)&&i(),[]):[i||e(),s],t)},Td=Oj(Aj),twt=Oj(Ej);class nwt 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 Or=t=>{const e=Mj();return Cv((n=new nwt(t,(i,s,o)=>{i=rl(i)?i(s[0]):i,i!==s[0]&&(s[0]=i,o||e())}))=>n)},ob=(t,e)=>{const[n]=Cv(([i,s,o=0]=[])=>((!s||s&&!Tj(s,e))&&(i=t()),[i,e,o]));return n},vh=(t,e)=>ob(()=>t,e),r6=xv("atomico/options");globalThis[r6]=globalThis[r6]||{sheet:!!document.adoptedStyleSheets};const Dj=globalThis[r6];new Promise(t=>{Dj.ssr||(document.readyState==="loading"?Ij(document,"DOMContentLoaded",t):t())});const swt={checked:1,value:1,selected:1},iwt={list:1,type:1,size:1,form:1,width:1,height:1,src:1,href:1,slot:1},owt={shadowDom:1,staticNode:1,cloneNode:1,children:1,key:1},A_={},a6=[];class l6 extends Text{}const rwt=xv("atomico/id"),bg=xv("atomico/type"),rk=xv("atomico/ref"),Rj=xv("atomico/vnode"),awt=()=>{};function lwt(t,e,n){return Fj(this,t,e,n)}const Vj=(t,e,...n)=>{const i=e||A_;let{children:s}=i;if(s=s??(n.length?n:a6),t===awt)return s;const o=t?t instanceof Node?1:t.prototype instanceof HTMLElement&&2:0;if(o===!1&&t instanceof Function)return t(s!=a6?{children:s,...i}:i);const r=Dj.render||lwt;return{[bg]:Rj,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 Fj(t,e,n=rwt,i,s){let o;if(e&&e[n]&&e[n].vnode==t||t[bg]!=Rj)return e;(t||!e)&&(s=s||t.type=="svg",o=t.type!="host"&&(t.raw==1?(e&&t.clone?e[rk]:e)!=t.type:t.raw==2?!(e instanceof t.type):e?e[rk]||e.localName!=t.type:!e),o&&t.type!=null&&(t.raw==1&&t.clone?(i=!0,e=t.type.cloneNode(!0),e[rk]=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]:A_,{vnode:a=A_,cycle:l=0}=r;let{fragment:c,handlers:u}=r;const{children:d=a6,props:h=A_}=a;if(u=o?{}:u||{},t.static&&!o)return e;if(t.shadow&&!e.shadowRoot&&e.attachShadow({mode:"open",...t.shadow}),t.props!=h&&dwt(e,h,t.props,u,s),t.children!==d){const f=t.shadow?e.shadowRoot:e;c=uwt(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 cwt(t,e){const n=new l6(""),i=new l6("");let s;if(t[e?"prepend":"append"](n),e){let{lastElementChild:o}=t;for(;o;){const{previousElementSibling:r}=o;if(o6(o,!0)&&!o6(r,!0)){s=o;break}o=r}}return s?s.before(i):t.append(i),{markStart:n,markEnd:i}}function uwt(t,e,n,i,s,o){t=t==null?null:B2t(t)?t:[t];const r=e||cwt(n,s),{markStart:a,markEnd:l,keyes:c}=r;let u;const d=c&&new Set;let h=a;if(t&&Pj(t,f=>{if(typeof f=="object"&&!f[bg])return;const p=f[bg]&&f.key,m=c&&p!=null&&c.get(p);h!=l&&h===m?d.delete(h):h=h==l?l:h.nextSibling;const y=c?m:h;let b=y;if(f[bg])b=Fj(f,y,i,s,o);else{const k=f+"";!(b instanceof Text)||b instanceof l6?b=new Text(k):b.data!=k&&(b.data=k)}b!=h&&(c&&d.delete(b),!y||c?(n.insertBefore(b,h),c&&h!=l&&d.add(h)):y==l?n.insertBefore(b,l):(n.replaceChild(b,y),h=b)),p!=null&&(u=u||new Map,u.set(p,b))}),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 dwt(t,e,n,i,s){for(const o in e)!(o in n)&&sP(t,o,e[o],null,s,i);for(const o in n)sP(t,o,e[o],n[o],s,i)}function sP(t,e,n,i,s,o){if(e=e=="class"&&!s?"className":e,n=n??null,i=i??null,e in t&&swt[e]&&(n=t[e]),!(i===n||owt[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)))hwt(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=yg(n),l=yg(i);if(a)for(const c in n)if(l)!(c in i)&&iP(r,c,null);else break;if(l)for(const c in i){const u=i[c];a&&n[c]===u||iP(r,c,u)}else r.cssText=i}else{const r=e[0]=="$"?e.slice(1):e;r===e&&(!s&&!iwt[e]&&e in t||rl(i)||rl(n))?t[e]=i??"":i==null?t.removeAttribute(r):t.setAttribute(r,yg(i)?JSON.stringify(i):i)}}function hwt(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 iP(t,e,n){let i="setProperty";n==null&&(i="removeProperty",n=null),~e.indexOf("-")?t[i](e,n):t[e]=n}const fwt=Vj("host",{style:"display: contents"}),pwt="value",mwt=(t,e)=>{const n=KS(),i=ud();twt(()=>Ij(n.current,"ConnectContext",s=>{s.composedPath().at(0)!==s.currentTarget&&t===s.detail.id&&(s.stopPropagation(),s.detail.connect(i))}),[t]),i.current=e},gwt=t=>{const e=th(({value:n})=>(mwt(e,n),fwt),{props:{value:{type:Object,value:()=>t}}});return e[pwt]=t,e};gwt({dispatch(t,e){}});const vwt=0,_h=1,_0=2,y0=3,oP=4,Em=5,c6=6,Nj=0,_wt=2,Bj=3,zj=4,Hj=Em,ywt=c6,Uj=(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===Bj?i[0]=a:r===zj?i[1]=Object.assign(i[1]||{},a):r===Hj?(i[1]=i[1]||{})[e[++o]]=a:r===ywt?i[1][e[++o]]+=a+"":r?(s=t.apply(a,Uj(t,a,n,["",null])),i.push(s),a[0]?e[0]|=2:(e[o-2]=Nj,e[o]=s)):i.push(a)}return i},bwt=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(Nj,l,n):e===y0&&(l||n)?(s.push(Bj,l,n),e=_0):e===_0&&n==="..."&&l?s.push(zj,l,0):e===_0&&n&&!l?s.push(Hj,0,!0,n):e>=Em&&((n||!l&&e===Em)&&(s.push(e,0,n,r),e=c6),l&&(s.push(e,l,0,r),e=c6)),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=y0):n+=o:e===oP?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=Em,r=n,n=""):o==="/"&&(e<Em||t[l][c+1]===">")?(a(),e===y0&&(s=s[0]),e=s,(s=s[0]).push(_wt,0,e),e=vwt):o===" "||o===" "||o===`
986 `||o==="\r"?(a(),e=_0):n+=o),e===y0&&n==="!--"&&(e=oP,s=s[0])}return a(),s},wwt=new Map;function It(t){let e=wwt;return e=Uj(Vj,e.get(t)||(e.set(t,e=bwt(t)),e),arguments,[]),e.length>1?e:e[0]}var ZS=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},yh=(t,e,n)=>(ZS(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)=>(ZS(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),kwt=(t,e,n)=>(ZS(t,e,"access private method"),n),E_,M_,Mm,Tm,T_,u6,jj;let JS=class{constructor(e){bh(this,u6),bh(this,E_,void 0),bh(this,M_,void 0),bh(this,Mm,void 0),bh(this,Tm,void 0),bh(this,T_,void 0),wh(this,Mm,!1),this.onShow=()=>{},this.onHide=()=>{},wh(this,T_,(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,Mm)||((s=n.dom.parentElement)==null||s.appendChild(this.element),wh(this,Mm,!0)),!(r||h)){if(!yh(this,M_).call(this,n,i)){this.hide();return}nC({getBoundingClientRect:()=>C2(n,u,d)},this.element,{placement:"top",middleware:[tC(),eC(yh(this,Tm))]}).then(({x:f,y:p})=>{Object.assign(this.element.style,{left:`${f}px`,top:`${p}px`})}),this.show()}}),this.update=(n,i)=>{N2(yh(this,T_),yh(this,E_))(n,i)},this.destroy=()=>{},this.show=n=>{this.element.dataset.show="true",n&&nC(n,this.element,{placement:"top",middleware:[tC(),eC(yh(this,Tm))]}).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,E_,e.debounce??200),wh(this,M_,e.shouldShow??kwt(this,u6,jj)),wh(this,Tm,e.offset),this.element.dataset.show="false"}};E_=new WeakMap,M_=new WeakMap,Mm=new WeakMap,Tm=new WeakMap,T_=new WeakMap,u6=new WeakSet,jj=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 QS(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 Wj(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=Wj(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function ei(){for(var t,e,n=0,i="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=Wj(t))&&(i&&(i+=" "),i+=e);return i}var Cwt=Object.defineProperty,rP=Object.getOwnPropertySymbols,xwt=Object.prototype.hasOwnProperty,Swt=Object.prototype.propertyIsEnumerable,aP=(t,e,n)=>e in t?Cwt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$wt=(t,e)=>{for(var n in e||(e={}))xwt.call(e,n)&&aP(t,n,e[n]);if(rP)for(var n of rP(e))Swt.call(e,n)&&aP(t,n,e[n]);return t};function nh(t,e){return Object.assign(t,{meta:$wt({package:"@milkdown/components"},e)}),t}var Awt=Object.defineProperty,lP=Object.getOwnPropertySymbols,Ewt=Object.prototype.hasOwnProperty,Mwt=Object.prototype.propertyIsEnumerable,cP=(t,e,n)=>e in t?Awt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,e9=(t,e)=>{for(var n in e||(e={}))Ewt.call(e,n)&&cP(t,n,e[n]);if(lP)for(var n of lP(e))Mwt.call(e,n)&&cP(t,n,e[n]);return t};const Twt={mode:"preview"},kl=ms(e9({},Twt),"linkTooltipStateCtx");nh(kl,{displayName:"State<link-tooltip>",group:"LinkTooltip"});const Pwt={addLink:()=>{},editLink:()=>{},removeLink:()=>{}},op=ms(e9({},Pwt),"linkTooltipAPICtx");nh(kl,{displayName:"API<link-tooltip>",group:"LinkTooltip"});const Iwt={linkIcon:()=>"🔗",editButton:()=>"✎",removeButton:()=>"⌫",confirmButton:()=>It`Confirm ⏎`,onCopyLink:()=>{},inputPlaceholder:"Paste link..."},J2=ms(e9({},Iwt),"linkTooltipConfigCtx");nh(kl,{displayName:"Config<link-tooltip>",group:"LinkTooltip"});const Sv=QS("LINK_PREVIEW");nh(Sv[0],{displayName:"PreviewTooltipSpec<link-tooltip>",group:"LinkTooltip"});nh(Sv[1],{displayName:"PreviewTooltipPlugin<link-tooltip>",group:"LinkTooltip"});const Q2=QS("LINK_EDIT");nh(Q2[0],{displayName:"EditTooltipSpec<link-tooltip>",group:"LinkTooltip"});nh(Q2[1],{displayName:"EditTooltipPlugin<link-tooltip>",group:"LinkTooltip"});function Lwt(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 Owt(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===Yr.mark.type(t));if(!(!r||!Sv.pluginKey()))return{show:!0,pos:s,node:o,mark:r}}function Yj(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 qj=({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`
987 <host>
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})}}>
989 <span class="link-icon">
990 ${t==null?void 0:t.linkIcon()}
991 </span>
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()}
995 </span>
996 <span class="button link-remove-button" onmousedown=${o}>
997 ${t==null?void 0:t.removeButton()}
998 </span>
999 </div>
1000 </host>
1001 `};qj.props={config:Object,src:String,onEdit:Function,onRemove:Function};const Gj=th(qj);var Xj=t=>{throw TypeError(t)},Kj=(t,e,n)=>e.has(t)||Xj("Cannot "+n),Wn=(t,e,n)=>(Kj(t,e,"read from private field"),n?n.call(t):e.get(t)),jl=(t,e,n)=>e.has(t)?Xj("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),b0=(t,e,n,i)=>(Kj(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),sc,Tr,Pm,Im,P_,I_,L_,Lm;class Dwt{constructor(e,n){this.ctx=e,jl(this,sc,new Gj),jl(this,Tr),jl(this,Pm,this.ctx.use(kl.key)),jl(this,Im,!1),jl(this,P_,({mode:i})=>{i==="edit"&&Wn(this,Lm).call(this)}),jl(this,I_,()=>{b0(this,Im,!0)}),jl(this,L_,()=>{b0(this,Im,!1)}),jl(this,Lm,()=>{Wn(this,Tr).hide(),Wn(this,Tr).element.removeEventListener("mouseenter",Wn(this,I_)),Wn(this,Tr).element.removeEventListener("mouseleave",Wn(this,L_))}),this.show=(i,s,o,r)=>{Wn(this,sc).config=this.ctx.get(J2.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,Lm).call(this)},Wn(this,Tr).show({getBoundingClientRect:()=>r}),Wn(this,Tr).element.addEventListener("mouseenter",Wn(this,I_)),Wn(this,Tr).element.addEventListener("mouseleave",Wn(this,L_))},this.hide=()=>{Wn(this,Im)||Wn(this,Lm).call(this)},this.update=()=>{},this.destroy=()=>{Wn(this,Pm).off(Wn(this,P_)),Wn(this,Tr).destroy(),Wn(this,sc).remove()},b0(this,Tr,new JS({debounce:0,content:Wn(this,sc),shouldShow:()=>!1})),Wn(this,Tr).update(n),b0(this,Pm,e.use(kl.key)),Wn(this,Pm).on(Wn(this,P_))}}sc=new WeakMap;Tr=new WeakMap;Pm=new WeakMap;Im=new WeakMap;P_=new WeakMap;I_=new WeakMap;L_=new WeakMap;Lm=new WeakMap;Yj("milkdown-link-preview",Gj);function Rwt(t){let e;const i=N2((o,r)=>{if(!e||!o.hasFocus()||t.get(kl.key).mode==="edit")return;const l=Owt(t,o,r);if(l){const c=o.state.doc.resolve(l.pos),u=Lwt(l.mark,l.node,o.state.doc,c.before(),c.after()),d=u.start,h=u.end;e.show(l.mark,d,h,C2(o,d,h));return}e.hide()},200),s=()=>{setTimeout(()=>{e==null||e.hide()},200)};t.set(Sv.key,{props:{handleDOMEvents:{mousemove:i,mouseleave:s}},view:o=>(e=new Dwt(t,o),e)})}const Zj=({src:t,onConfirm:e,onCancel:n,config:i})=>{const s=ud(),[o,r]=Or(t);Td(()=>{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`
1002 <host>
1003 <div class="link-edit">
1004 <input
1005 class="input-area"
1006 placeholder=${i==null?void 0:i.inputPlaceholder}
1007 ref=${s}
1008 onkeydown=${l}
1009 oninput=${c=>r(c.target.value)}
1010 value=${o}
1011 />
1012 <span class=${ei("button confirm",!o&&"hidden")} onclick=${a}>
1013 ${i==null?void 0:i.confirmButton()}
1014 </span>
1015 </div>
1016 </host>
1017 `};Zj.props={config:Object,src:String,onConfirm:Function,onCancel:Function};const Jj=th(Zj);var Vwt=Object.defineProperty,Fwt=Object.defineProperties,Nwt=Object.getOwnPropertyDescriptors,uP=Object.getOwnPropertySymbols,Bwt=Object.prototype.hasOwnProperty,zwt=Object.prototype.propertyIsEnumerable,Qj=t=>{throw TypeError(t)},dP=(t,e,n)=>e in t?Vwt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,w0=(t,e)=>{for(var n in e||(e={}))Bwt.call(e,n)&&dP(t,n,e[n]);if(uP)for(var n of uP(e))zwt.call(e,n)&&dP(t,n,e[n]);return t},hP=(t,e)=>Fwt(t,Nwt(e)),eW=(t,e,n)=>e.has(t)||Qj("Cannot "+n),cs=(t,e,n)=>(eW(t,e,"read from private field"),n?n.call(t):e.get(t)),kh=(t,e,n)=>e.has(t)?Qj("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),k0=(t,e,n,i)=>(eW(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),pa,ic,oc,Pu,d6,O_;const fP={from:-1,to:-1,mark:null};class Hwt{constructor(e,n){this.ctx=e,kh(this,pa,new Jj),kh(this,ic),kh(this,oc,w0({},fP)),kh(this,Pu,()=>{cs(this,ic).hide(),this.ctx.update(kl.key,i=>hP(w0({},i),{mode:"preview"})),k0(this,oc,w0({},fP))}),kh(this,d6,i=>{const s=this.ctx.get(Vn),{from:o,to:r,mark:a}=cs(this,oc),l=Yr.type(this.ctx);if(a&&a.attrs.href===i){cs(this,Pu).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,Pu).call(this)}),kh(this,O_,(i,s,o)=>{const r=this.ctx.get(J2.key);cs(this,pa).config=r,cs(this,pa).src=i,this.ctx.update(kl.key,l=>hP(w0({},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:()=>C2(a,s,o)}),requestAnimationFrame(()=>{var l;(l=cs(this,pa).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,Pu).call(this)},this.destroy=()=>{cs(this,ic).destroy(),cs(this,pa).remove()},this.addLink=(i,s)=>{k0(this,oc,{from:i,to:s,mark:null}),cs(this,O_).call(this,"",i,s)},this.editLink=(i,s,o)=>{k0(this,oc,{from:s,to:o,mark:i}),cs(this,O_).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,Yr.type(this.ctx)),o.dispatch(r),cs(this,Pu).call(this)},k0(this,ic,new JS({content:cs(this,pa),debounce:0,shouldShow:()=>!1})),cs(this,ic).onHide=()=>{cs(this,pa).update().catch(i=>{throw i}),n.dom.focus({preventScroll:!0})},cs(this,ic).update(n),cs(this,pa).onConfirm=cs(this,d6),cs(this,pa).onCancel=cs(this,Pu)}}pa=new WeakMap;ic=new WeakMap;oc=new WeakMap;Pu=new WeakMap;d6=new WeakMap;O_=new WeakMap;var Uwt=Object.defineProperty,jwt=Object.defineProperties,Wwt=Object.getOwnPropertyDescriptors,pP=Object.getOwnPropertySymbols,Ywt=Object.prototype.hasOwnProperty,qwt=Object.prototype.propertyIsEnumerable,mP=(t,e,n)=>e in t?Uwt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gwt=(t,e)=>{for(var n in e||(e={}))Ywt.call(e,n)&&mP(t,n,e[n]);if(pP)for(var n of pP(e))qwt.call(e,n)&&mP(t,n,e[n]);return t},Xwt=(t,e)=>jwt(t,Wwt(e));Yj("milkdown-link-edit",Jj);function Kwt(t){let e;t.update(op.key,n=>Xwt(Gwt({},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(Q2.key,{view:n=>(e=new Hwt(t,n),e)})}function Zwt(t){Rwt(t),Kwt(t)}const Jwt=[kl,op,J2,Sv,Q2].flat();It`
1018 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
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"/>
1020 </svg>
1021 `;It`
1022 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
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"/>
1024 </svg>
1025 `;It`
1026 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
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"/>
1028 </svg>
1029 `;const Qwt=It`
1030 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
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"/>
1032 </svg>
1033 `;It`
1034 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1035 <g clip-path="url(#clip0_952_6527)">
1036 <circle cx="12" cy="12" r="3"/>
1037 </g>
1038 <defs>
1039 <clipPath id="clip0_952_6527">
1040 <rect width="24" height="24"/>
1041 </clipPath>
1042 </defs>
1043 </svg>
1044 `;const e3t=It`
1045 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1046 <g clip-path="url(#clip0_977_8070)">
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"/>
1048 </g>
1049 <defs>
1050 <clipPath id="clip0_977_8070">
1051 <rect width="24" height="24"/>
1052 </clipPath>
1053 </defs>
1054 </svg>
1055 `,t3t=It`
1056 <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
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"/>
1058 </svg>
1059 `;It`
1060 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1061 <g clip-path="url(#clip0_1803_1151)">
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"/>
1063 </g>
1064 <defs>
1065 <clipPath id="clip0_1803_1151">
1066 <rect width="24" height="24"/>
1067 </clipPath>
1068 </defs>
1069 </svg>
1070 `;It`
1071 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1072 <g clip-path="url(#clip0_1803_535)">
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"/>
1074 </g>
1075 <defs>
1076 <clipPath id="clip0_1803_535">
1077 <rect width="24" height="24"/>
1078 </clipPath>
1079 </defs>
1080 </svg>
1081 `;It`
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">
1083 <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
1084 </svg>
1085 `;It`
1086 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1087 <g clip-path="url(#clip0_1098_15553)">
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"/>
1089 </g>
1090 <defs>
1091 <clipPath id="clip0_1098_15553">
1092 <rect width="24" height="24"/>
1093 </clipPath>
1094 </defs>
1095 </svg>
1096 `;const tW=It`
1097 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1098 <g clip-path="url(#clip0_977_8081)">
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"/>
1100 </g>
1101 <defs>
1102 <clipPath id="clip0_977_8081">
1103 <rect width="24" height="24"/>
1104 </clipPath>
1105 </defs>
1106 </svg>
1107 `,nW=It`
1108 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
1109 <g clip-path="url(#clip0_1013_1606)">
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"/>
1111 </g>
1112 <defs>
1113 <clipPath id="clip0_1013_1606">
1114 <rect width="24" height="24" />
1115 </clipPath>
1116 </defs>
1117 </svg>
1118 `,n3t=It`
1119 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1120 <g clip-path="url(#clip0_977_7900)">
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"/>
1122 </g>
1123 <defs>
1124 <clipPath id="clip0_977_7900">
1125 <rect width="24" height="24"/>
1126 </clipPath>
1127 </defs>
1128 </svg>
1129 `;It`
1130 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
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"/>
1132 </svg>
1133 `;const s3t=It`
1134 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1135 <g clip-path="url(#clip0_1013_1585)">
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"/>
1137 </g>
1138 <defs>
1139 <clipPath id="clip0_1013_1585">
1140 <rect width="24" height="24"/>
1141 </clipPath>
1142 </defs>
1143 </svg>
1144 `;It`
1145 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1146 <g clip-path="url(#clip0_992_5553)">
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"/>
1148 </g>
1149 <defs>
1150 <clipPath id="clip0_992_5553">
1151 <rect width="24" height="24"/>
1152 </clipPath>
1153 </defs>
1154 </svg>
1155 `;const i3t=It`
1156 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1157 <g clip-path="url(#clip0_992_5559)">
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"/>
1159 </g>
1160 <defs>
1161 <clipPath id="clip0_992_5559">
1162 <rect width="24" height="24"/>
1163 </clipPath>
1164 </defs>
1165 </svg>
1166 `,o3t=It`
1167 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1168 <g clip-path="url(#clip0_992_5565)">
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"/>
1170 </g>
1171 <defs>
1172 <clipPath id="clip0_992_5565">
1173 <rect width="24" height="24"/>
1174 </clipPath>
1175 </defs>
1176 </svg>
1177 `,r3t=It`
1178 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1179 <g clip-path="url(#clip0_977_7757)">
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"/>
1181 </g>
1182 <defs>
1183 <clipPath id="clip0_977_7757">
1184 <rect width="24" height="24"/>
1185 </clipPath>
1186 </defs>
1187 </svg>
1188 `;It`
1189 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1190 <g clip-path="url(#clip0_977_7760)">
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"/>
1192 </g>
1193 <defs>
1194 <clipPath id="clip0_977_7760">
1195 <rect width="24" height="24"/>
1196 </clipPath>
1197 </defs>
1198 </svg>
1199 `;It`
1200 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1201 <g clip-path="url(#clip0_977_7763)">
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"/>
1203 </g>
1204 <defs>
1205 <clipPath id="clip0_977_7763">
1206 <rect width="24" height="24"/>
1207 </clipPath>
1208 </defs>
1209 </svg>
1210 `;const h6=It`
1211 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1212 <g clip-path="url(#clip0_977_8075)">
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"/>
1214 </g>
1215 <defs>
1216 <clipPath id="clip0_977_8075">
1217 <rect width="24" height="24"/>
1218 </clipPath>
1219 </defs>
1220 </svg>
1221 `,a3t=It`
1222 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
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"/>
1224 </svg>
1225 `,sW=It`
1226 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
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"/>
1228 </svg>
1229 `;It`
1230 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1231 <g clip-path="url(#clip0_971_7680)">
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" />
1233 </g>
1234 <defs>
1235 <clipPath id="clip0_971_7680">
1236 <rect width="24" height="24"/>
1237 </clipPath>
1238 </defs>
1239 </svg>
1240 `;const l3t=It`
1241 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1242 <g clip-path="url(#clip0_977_8067)">
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"/>
1244 </g>
1245 <defs>
1246 <clipPath id="clip0_977_8067">
1247 <rect width="24" height="24"/>
1248 </clipPath>
1249 </defs>
1250 </svg>
1251 `;It`
1252 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1253 <g clip-path="url(#clip0_971_7676)">
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"/>
1255 </g>
1256 <defs>
1257 <clipPath id="clip0_971_7676">
1258 <rect width="24" height="24"/>
1259 </clipPath>
1260 </defs>
1261 </svg>
1262 `;const c3t=It`
1263 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1264 <g clip-path="url(#clip0_977_7897)">
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"/>
1266 </g>
1267 <defs>
1268 <clipPath id="clip0_977_7897">
1269 <rect width="24" height="24"/>
1270 </clipPath>
1271 </defs>
1272 </svg>
1273 `,u3t=It`
1274 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
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"/>
1276 </svg>
1277 `;It`
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">
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" />
1280 </svg>
1281 `;const d3t=It`
1282 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
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"/>
1284 </svg>
1285 `;It`
1286 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1287 <g clip-path="url(#clip0_977_8078)">
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"/>
1289 </g>
1290 <defs>
1291 <clipPath id="clip0_977_8078">
1292 <rect width="24" height="24"/>
1293 </clipPath>
1294 </defs>
1295 </svg>
1296 `;const h3t=It`
1297 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
1298 <g clip-path="url(#clip0_992_5547)">
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"/>
1300 </g>
1301 <defs>
1302 <clipPath id="clip0_992_5547">
1303 <rect width="24" height="24"/>
1304 </clipPath>
1305 </defs>
1306 </svg>
1307 `;It`
1308 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
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"/>
1310 </svg>
1311 `;const f3t=(t,e)=>{t.config(Zwt).config(n=>{n.update(J2.key,i=>({...i,linkIcon:(e==null?void 0:e.linkIcon)??(()=>sW),editButton:(e==null?void 0:e.editButton)??(()=>s3t),removeButton:(e==null?void 0:e.removeButton)??(()=>u3t),confirmButton:(e==null?void 0:e.confirmButton)??(()=>nW),inputPlaceholder:(e==null?void 0:e.inputPlaceholder)??"Paste link...",onCopyLink:(e==null?void 0:e.onCopyLink)??(()=>{})}))}).use(Jwt)},p3t=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:f3t},Symbol.toStringTag,{value:"Module"}));var iW="Expected a function",gP=0/0,m3t="[object Symbol]",g3t=/^\s+|\s+$/g,v3t=/^[-+]0x[0-9a-f]+$/i,_3t=/^0b[01]+$/i,y3t=/^0o[0-7]+$/i,b3t=parseInt,w3t=typeof xs=="object"&&xs&&xs.Object===Object&&xs,k3t=typeof self=="object"&&self&&self.Object===Object&&self,C3t=w3t||k3t||Function("return this")(),x3t=Object.prototype,S3t=x3t.toString,$3t=Math.max,A3t=Math.min,ak=function(){return C3t.Date.now()};function E3t(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(iW);e=vP(e)||0,rb(n)&&(u=!!n.leading,d="maxWait"in n,o=d?$3t(vP(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(b,e),u?f(M):r}function m(M){var P=M-l,T=M-c,I=e-P;return d?A3t(I,o-T):I}function y(M){var P=M-l,T=M-c;return l===void 0||P>=e||P<0||d&&T>=o}function b(){var M=ak();if(y(M))return k(M);a=setTimeout(b,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 $(){return a===void 0?r:k(ak())}function S(){var M=ak(),P=y(M);if(i=arguments,s=this,l=M,P){if(a===void 0)return p(l);if(d)return a=setTimeout(b,e),f(l)}return a===void 0&&(a=setTimeout(b,e)),r}return S.cancel=C,S.flush=$,S}function M3t(t,e,n){var i=!0,s=!0;if(typeof t!="function")throw new TypeError(iW);return rb(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),E3t(t,e,{leading:i,maxWait:e,trailing:s})}function rb(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function T3t(t){return!!t&&typeof t=="object"}function P3t(t){return typeof t=="symbol"||T3t(t)&&S3t.call(t)==m3t}function vP(t){if(typeof t=="number")return t;if(P3t(t))return gP;if(rb(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=rb(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(g3t,"");var n=_3t.test(t);return n||y3t.test(t)?b3t(t.slice(2),n?2:8):v3t.test(t)?gP:+t}var I3t=M3t;const L3t=vi(I3t);var oW=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Cn=(t,e,n)=>(oW(t,e,"read from private field"),n?n.call(t):e.get(t)),ki=(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)=>(oW(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);function ew(t,e){return Object.assign(t,{meta:{package:"@milkdown/plugin-block",...e}}),t}const O3t=t=>!Q8(e=>e.type.name==="table")(t),$v=ms({filterNodes:O3t},"blockConfig");ew($v,{displayName:"Ctx<blockConfig>"});function D3t(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 _P=null;function R3t(){return _P||(_P=document.implementation.createHTMLDocument("title"))}const V3t={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 F3t(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")||su.fromSchema(t.state.schema),a=R3t(),l=a.createElement("div");l.appendChild(r.serializeFragment(o,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType===1&&(u=V3t[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,`
1312
1313 `);return{dom:l,text:h}}const yP=u0.ie&&u0.ie_version<15||u0.ios&&u0.webkit_version<604,bP=20;var wg,D_,Hh,ma,Om,ga,f6,rW,Uh,Dm,jh,Wh,R_,Rm,Vm,Fm,V_,Yh;class N3t{constructor(){ki(this,f6),ki(this,Uh),ki(this,wg,void 0),ki(this,D_,void 0),ki(this,Hh,void 0),ki(this,ma,void 0),ki(this,Om,void 0),ki(this,ga,void 0),ki(this,jh,void 0),ki(this,Wh,void 0),ki(this,R_,void 0),ki(this,Rm,void 0),ki(this,Vm,void 0),ki(this,Fm,void 0),ki(this,V_,void 0),ki(this,Yh,void 0),Yn(this,D_,()=>{if(!Cn(this,ma))return null;const e=Cn(this,ma),n=Cn(this,Uh,Dm);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,ma,null),Yn(this,Om,void 0),Yn(this,ga,!1),Yn(this,Wh,()=>{var e;(e=Cn(this,jh))==null||e.call(this,{type:"hide"}),Yn(this,ma,null)}),Yn(this,R_,e=>{var n;Yn(this,ma,e),(n=Cn(this,jh))==null||n.call(this,{type:"show",active:e})}),this.bind=(e,n)=>{Yn(this,wg,e),Yn(this,jh,n)},this.addEvent=e=>{e.addEventListener("mousedown",Cn(this,Rm)),e.addEventListener("mouseup",Cn(this,Vm)),e.addEventListener("dragstart",Cn(this,Fm))},this.removeEvent=e=>{e.removeEventListener("mousedown",Cn(this,Rm)),e.removeEventListener("mouseup",Cn(this,Vm)),e.removeEventListener("dragstart",Cn(this,Fm))},this.unBind=()=>{Yn(this,jh,void 0)},Yn(this,Rm,()=>{var e;Yn(this,Om,(e=Cn(this,ma))==null?void 0:e.el.getBoundingClientRect()),Cn(this,D_).call(this)}),Yn(this,Vm,()=>{if(!Cn(this,ga)){requestAnimationFrame(()=>{var e;Cn(this,Om)&&((e=Cn(this,Uh,Dm))==null||e.focus())});return}Yn(this,ga,!1),Yn(this,Hh,null)}),Yn(this,Fm,e=>{var n;Yn(this,ga,!0);const i=Cn(this,Uh,Dm);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}=F3t(i,o);e.dataTransfer.clearData(),e.dataTransfer.setData(yP?"Text":"text/html",r.innerHTML),yP||e.dataTransfer.setData("text/plain",a);const l=(n=Cn(this,ma))==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,ga,!1),e.dom.dataset.dragging="false",!1),Yn(this,V_,L3t((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,f6,rW);if(!o)return;const r=D3t(e,{x:s,y:n.clientY},o);if(!r){Cn(this,Wh).call(this);return}Cn(this,R_).call(this,r)},200)),this.mousemoveCallback=(e,n)=>(e.composing||!e.editable||Cn(this,V_).call(this,e,n),!1),this.dragoverCallback=(e,n)=>{var i;if(Cn(this,ga)){const s=(i=Cn(this,Uh,Dm))==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)<bP){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))<bP){const l=s.scrollTop+10;return s.scrollTop=l,!1}}}return!1},this.dragenterCallback=e=>{e.dragging&&(Yn(this,ga,!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,ma,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,ga,!1),e.dom.dataset.dragging="false"})}}wg=new WeakMap,D_=new WeakMap,Hh=new WeakMap,ma=new WeakMap,Om=new WeakMap,ga=new WeakMap,f6=new WeakSet,rW=function(){var t;return(t=Cn(this,wg))==null?void 0:t.get($v.key).filterNodes},Uh=new WeakSet,Dm=function(){var t;return(t=Cn(this,wg))==null?void 0:t.get(Vn)},jh=new WeakMap,Wh=new WeakMap,R_=new WeakMap,Rm=new WeakMap,Vm=new WeakMap,Fm=new WeakMap,V_=new WeakMap,Yh=new WeakMap;const aW=ms(new N3t,"blockService");ew($v,{displayName:"Ctx<blockService>"});const t9=ms({},"blockSpec");ew($v,{displayName:"Ctx<blockSpec>"});const n9=Ls(t=>{const e=new ps("MILKDOWN_BLOCK"),n=t.get(aW.key),i=t.get(t9.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)}}})});ew(n9,{displayName:"Prose<block>"});const s9=[t9,$v,aW,n9];s9.key=t9.key;s9.pluginKey=n9.key;var i9=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},yc=(t,e,n)=>(i9(t,e,"read from private field"),n?n.call(t):e.get(t)),_u=(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)},yu=(t,e,n,i)=>(i9(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),B3t=(t,e,n)=>(i9(t,e,"access private method"),n);function z3t(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 Nm,F_,Kh,N_,B_,z_,p6,lW;class H3t{constructor(e){_u(this,p6),_u(this,Nm,void 0),_u(this,F_,void 0),_u(this,Kh,void 0),_u(this,N_,void 0),_u(this,B_,void 0),_u(this,z_,void 0),yu(this,Nm,!1),this.onShow=()=>{},this.onHide=()=>{},yu(this,z_,(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,Nm)||((s=n.dom.parentElement)==null||s.appendChild(this.element),yu(this,Nm,!0)),!(r||h)){if(!yc(this,N_).call(this,n,i)){this.hide();return}nC({getBoundingClientRect:()=>C2(n,u,d)},this.element,{placement:"bottom-start",middleware:[tC(),eC(yc(this,B_))]}).then(({x:f,y:p})=>{Object.assign(this.element.style,{left:`${f}px`,top:`${p}px`})}),this.show()}}),this.update=(n,i)=>{N2(yc(this,z_),yc(this,F_))(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=!Y5e(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,yu(this,F_,e.debounce??200),yu(this,N_,e.shouldShow??B3t(this,p6,lW)),yu(this,Kh,e.trigger??"/"),yu(this,B_,e.offset)}}Nm=new WeakMap,F_=new WeakMap,Kh=new WeakMap,N_=new WeakMap,B_=new WeakMap,z_=new WeakMap,p6=new WeakSet,lW=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 cW(t){return t.$from.parent.type.name==="code_block"}function uW(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 dW(t,e){customElements.get(t)==null&&customElements.define(t,e)}var U3t=Object.defineProperty,wP=Object.getOwnPropertySymbols,j3t=Object.prototype.hasOwnProperty,W3t=Object.prototype.propertyIsEnumerable,kP=(t,e,n)=>e in t?U3t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Y3t=(t,e)=>{for(var n in e||(e={}))j3t.call(e,n)&&kP(t,n,e[n]);if(wP)for(var n of wP(e))W3t.call(e,n)&&kP(t,n,e[n]);return t};function Av(t,e){return Object.assign(t,{meta:Y3t({package:"@milkdown/components"},e)}),t}var q3t=Object.defineProperty,CP=Object.getOwnPropertySymbols,G3t=Object.prototype.hasOwnProperty,X3t=Object.prototype.propertyIsEnumerable,xP=(t,e,n)=>e in t?q3t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,K3t=(t,e)=>{for(var n in e||(e={}))G3t.call(e,n)&&xP(t,n,e[n]);if(CP)for(var n of CP(e))X3t.call(e,n)&&xP(t,n,e[n]);return t};const m6="image-block",tw=zs("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="${m6}"]`,getAttrs:t=>{var e;if(!(t instanceof HTMLElement))throw ra(t);return{src:t.getAttribute("src")||"",caption:t.getAttribute("caption")||"",ratio:Number((e=t.getAttribute("ratio"))!=null?e:1)}}}],toDOM:t=>["img",K3t({"data-type":m6},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()}}}));Av(tw.node,{displayName:"NodeSchema<image-block>",group:"ImageBlock"});function Z3t(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 o9=Gd("remark-image-block",()=>()=>Z3t);Av(o9.plugin,{displayName:"Remark<remarkImageBlock>",group:"ImageBlock"});Av(o9.options,{displayName:"RemarkConfig<remarkImageBlock>",group:"ImageBlock"});const J3t={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))},nw=ms(J3t,"imageBlockConfigCtx");Av(nw,{displayName:"Config<image-block>",group:"ImageBlock"});function Q3t(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 ekt({image:t,resizeHandle:e,ratio:n,setRatio:i,src:s}){const o=KS(),r=ob(()=>o.current.getRootNode(),[o]);Td(()=>{const a=t.current;a&&(delete a.dataset.origin,delete a.dataset.height,a.style.height="")},[s]),Td(()=>{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,y=Number(m<100?100:m).toFixed(2);l.dataset.height=y,l.style.height=`${y}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,y=m.height,b=m.width,k=b<p?y:p*(y/b),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 tkt=(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 hW=({src:t="",caption:e="",ratio:n=1,selected:i=!1,readonly:s=!1,setAttr:o,config:r})=>{const a=ud(),l=ud(),c=ud(),[u,d]=Or(e.length>0),[h,f]=Or(t.length!==0),[p]=Or(crypto.randomUUID()),[m,y]=Or(!1),[b,k]=Or(t);ekt({image:a,resizeHandle:l,ratio:n,setRatio:V=>o==null?void 0:o("ratio",V),src:t}),Td(()=>{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)},$=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=>tkt(void 0,null,function*(){var B;const F=(B=V.target.files)==null?void 0:B[0];if(!F)return;const z=yield r==null?void 0:r.onUpload(F);z&&(o==null||o("src",z),f(!0))}),P=V=>{V.preventDefault(),V.stopPropagation(),!s&&d(B=>!B)},T=()=>{var V,B;o==null||o("src",(B=(V=c.current)==null?void 0:V.value)!=null?B:"")},I=V=>{V.key==="Enter"&&T()},L=V=>{V.preventDefault(),V.stopPropagation()},R=V=>{V.stopPropagation(),V.preventDefault()};return It`<host class=${ei(i&&"selected")}>
1314 <div class=${ei("image-edit",t.length>0&&"hidden")}>
1315 <div class="image-icon">
1316 ${r==null?void 0:r.imageIcon()}
1317 </div>
1318 <div class=${ei("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=${b}
1326 oninput=${S}
1327 onkeydown=${I}
1328 onfocus=${()=>y(!0)}
1329 onblur=${()=>y(!1)}
1330 />
1331 <div class=${ei("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=${ei("confirm",b.length===0&&"hidden")}
1343 onclick=${()=>T()}
1344 >
1345 ${r==null?void 0:r.confirmButton()}
1346 </div>
1347 </div>
1348 <div class=${ei("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=${m6} 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=${ei("caption-input",!u&&"hidden")}
1359 placeholder=${r==null?void 0:r.captionPlaceholderText}
1360 oninput=${C}
1361 onblur=${$}
1362 value=${e}
1363 />
1364 </host>`};hW.props={src:String,caption:String,ratio:Number,selected:Boolean,readonly:Boolean,setAttr:Function,config:Object};const nkt=th(hW);Q3t("milkdown-image-block",nkt);const fW=gz(tw.node,t=>(e,n,i)=>{const s=document.createElement("milkdown-image-block"),o=t.get(nw.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()}}});Av(fW,{displayName:"NodeView<image-block>",group:"ImageBlock"});const skt=[o9,tw,fW,nw].flat();function r9(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 ikt(t,e,n=null){const{from:i,to:s}=t.selection;return t.setBlockType(i,s,e,n)}function okt(t,e,n=null){const{$from:i,$to:s}=t.selection,o=i.blockRange(s),r=o&&X8(o,e,n);return r?t.wrap(o,r):null}function rkt(t,e,n=null){const i=e.createAndFill(n);return i?t.replaceSelectionWith(i):null}function C0(t,e=null){return(n,i)=>{if(i){const s=ikt(r9(n.tr),t,e);i(s.scrollIntoView())}return!0}}function lk(t,e=null){return(n,i)=>{const s=okt(r9(n.tr),t,e);return s?(i&&i(s.scrollIntoView()),!0):!1}}function ck(t,e=null){return(n,i)=>{const s=rkt(r9(n.tr),t,e);return s?(i&&i(s.scrollIntoView()),!0):!1}}var bc,kf;class akt{constructor(){ua(this,bc,void 0);ua(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 Gt(this,bc).push(s),Gt(this,kf).call(this,s)},this.getGroup=e=>{const n=Gt(this,bc).find(i=>i.key===e);if(!n)throw new Error(`Group with key ${e} not found`);return Gt(this,kf).call(this,n)},this.build=()=>Gt(this,bc)}}bc=new WeakMap,kf=new WeakMap;function xo(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 lkt(t,e){var o,r,a,l,c,u,d,h,f,p,m;const n=new akt;n.addGroup("text",(e==null?void 0:e.slashMenuTextGroupLabel)??xo("Text")).addItem("text",{label:(e==null?void 0:e.slashMenuTextGroupLabel)??xo("Text"),icon:((o=e==null?void 0:e.slashMenuTextIcon)==null?void 0:o.call(e))??h3t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;C0(Ol.type(y))(C,k)}}).addItem("h2",{label:(e==null?void 0:e.slashMenuH2Label)??xo("Heading 2"),icon:((r=e==null?void 0:e.slashMenuH2Icon)==null?void 0:r.call(e))??i3t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;C0($a.type(y),{level:2})(C,k)}}).addItem("h3",{label:(e==null?void 0:e.slashMenuH3Label)??xo("Heading 3"),icon:((a=e==null?void 0:e.slashMenuH3Icon)==null?void 0:a.call(e))??o3t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;C0($a.type(y),{level:3})(C,k)}}).addItem("h4",{label:(e==null?void 0:e.slashMenuH4Label)??xo("Heading 4"),icon:((l=e==null?void 0:e.slashMenuH4Icon)==null?void 0:l.call(e))??r3t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;C0($a.type(y),{level:4})(C,k)}}).addItem("quote",{label:(e==null?void 0:e.slashMenuQuoteLabel)??xo("Quote"),icon:((c=e==null?void 0:e.slashMenuQuoteIcon)==null?void 0:c.call(e))??c3t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;lk(_p.type(y))(C,k)}}).addItem("code",{label:(e==null?void 0:e.slashMenuCodeBlockLabel)??xo("Code"),icon:((u=e==null?void 0:e.slashMenuCodeBlockIcon)==null?void 0:u.call(e))??tW,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;ck(yp.type(y))(C,k)}}).addItem("divider",{label:(e==null?void 0:e.slashMenuDividerLabel)??xo("Divider"),icon:((d=e==null?void 0:e.slashMenuDividerIcon)==null?void 0:d.call(e))??n3t,onRun:y=>{const b=y.get(Vn);ck(bp.type(y))(b.state,b.dispatch);const{state:k}=b,C=Ot.near(k.doc.resolve(k.selection.to));b.dispatch(k.tr.setSelection(C).scrollIntoView()),b.focus()}}),n.addGroup("list",(e==null?void 0:e.slashMenuListGroupLabel)??xo("List")).addItem("bullet-list",{label:(e==null?void 0:e.slashMenuBulletListLabel)??xo("Bullet List"),icon:((h=e==null?void 0:e.slashMenuBulletListIcon)==null?void 0:h.call(e))??e3t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;lk(Zd.type(y))(C,k)}}).addItem("ordered-list",{label:(e==null?void 0:e.slashMenuOrderedListLabel)??xo("Ordered List"),icon:((f=e==null?void 0:e.slashMenuOrderedListIcon)==null?void 0:f.call(e))??l3t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;lk(Jd.type(y))(C,k)}}),(e==null?void 0:e.hasImageBlock)!==!1&&n.addGroup("media",(e==null?void 0:e.slashMenuMediaGroupLabel)??xo("Media")).addItem("image",{label:(e==null?void 0:e.slashMenuImageLabel)??xo("Image"),icon:((p=e==null?void 0:e.slashMenuImageIcon)==null?void 0:p.call(e))??h6,onRun:y=>{if(e!=null&&e.canAddImage&&!e.canAddImage())return;const b=y.get(Vn),{dispatch:k,state:C}=b;ck(tw.type(y))(C,k)}}),(m=e==null?void 0:e.buildMenu)==null||m.call(e,n);let i=n.build();t&&(i=i.map(y=>{const b=y.items.filter(k=>k.label.toLowerCase().includes(t.toLowerCase()));return{...y,items:b}}).filter(y=>y.items.length>0));const s=i.flatMap(y=>y.items);return s.forEach((y,b)=>{Object.assign(y,{index:b})}),i.reduce((y,b)=>{const k=y+b.items.length;return Object.assign(b,{range:[y,k]}),k},0),{groups:i,size:s.length}}const pW=({show:t,hide:e,ctx:n,filter:i,config:s})=>{const{groups:o,size:r}=ob(()=>lkt(i,s),[i]),a=KS(),[l,c]=Or(0),u=ob(()=>a.current.getRootNode(),[a]),d=ud({x:-999,y:-999}),h=vh(k=>{const C=d.current;if(!C)return;const{x:$,y:S}=k;C.x=$,C.y=S},[]);Td(()=>{r===0&&t&&(e==null||e())},[r,t]);const f=vh((k,C)=>{c($=>{const S=typeof k=="function"?k($):k;return C==null||C(S),S})},[]),p=vh(k=>{const C=a.current.querySelector(`[data-index="${k}"]`),$=a.current.querySelector(".menu-groups");!C||!$||($.scrollTop=C.offsetTop-$.offsetTop)},[]),m=vh(k=>{const C=o.flatMap($=>$.items).at(k);C&&n&&C.onRun(n),e==null||e()},[o]),y=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 $=o.find(M=>M.range[0]<=C&&M.range[1]>C);if(!$)return C;const S=o[o.indexOf($)-1];return S?S.range[1]-1:C},p);if(k.key==="ArrowRight")return k.preventDefault(),f(C=>{const $=o.find(M=>M.range[0]<=C&&M.range[1]>C);if(!$)return C;const S=o[o.indexOf($)+1];return S?S.range[0]:C},p);k.key==="Enter"&&(k.preventDefault(),m(l))},[e,o,l]),b=vh(k=>C=>{const $=d.current;if(!$)return;const{x:S,y:M}=C;S===$.x&&M===$.y||f(k)},[]);return Td(()=>(t?u.addEventListener("keydown",y,{capture:!0}):u.removeEventListener("keydown",y,{capture:!0}),()=>{u.removeEventListener("keydown",y,{capture:!0})}),[t,y]),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">
1369 <ul>
1370 ${k.items.map(C=>It`<li
1371 key=${C.key}
1372 data-index=${C.index}
1373 class=${l===C.index?"hover":""}
1374 onmouseenter=${b(C.index)}
1375 onmousedown=${()=>{var $;($=a.current.querySelector(`[data-index="${C.index}"]`))==null||$.classList.add("active")}}
1376 onmouseup=${()=>{var $;($=a.current.querySelector(`[data-index="${C.index}"]`))==null||$.classList.remove("active"),m(C.index)}}
1377 >
1378 ${C.icon}
1379 <span>${C.label}</span>
1380 </li>`)}
1381 </ul>
1382 </div>
1383 `)}
1384 </div>
1385 </host>
1386 `};pW.props={ctx:Object,config:Object,show:Boolean,filter:String,hide:Function};const mW=th(pW),gW=z3t("CREPE_MENU"),vW=ms({show:()=>{},hide:()=>{}},"menuAPICtx");dW("milkdown-slash-menu",mW);function ckt(t,e){t.set(gW.key,{view:n=>new ukt(t,n,e)})}var Ao,wa,wc;class ukt{constructor(e,n,i){ua(this,Ao,void 0);ua(this,wa,void 0);ua(this,wc,void 0);Qi(this,wc,null),this.update=o=>{Gt(this,wa).update(o)},this.show=o=>{Qi(this,wc,o),Gt(this,Ao).filter="",Gt(this,wa).show()},this.hide=()=>{Qi(this,wc,null),Gt(this,wa).hide()},this.destroy=()=>{Gt(this,wa).destroy(),Gt(this,Ao).remove()},Qi(this,Ao,new mW),Gt(this,Ao).hide=this.hide,Gt(this,Ao).ctx=e,Gt(this,Ao).config=i;const s=this;Qi(this,wa,new H3t({content:Gt(this,Ao),debounce:20,shouldShow(o){if(cW(o.state.selection)||uW(o.state.selection))return!1;const r=this.getContent(o,l=>["paragraph","heading"].includes(l.type.name));if(r==null)return!1;const a=Gt(s,wc);return Gt(s,Ao).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})),Gt(this,wa).onShow=()=>{Gt(this,Ao).show=!0},Gt(this,wa).onHide=()=>{Gt(this,Ao).show=!1},this.update(n),e.set(vW.key,{show:o=>this.show(o),hide:()=>this.hide()})}}Ao=new WeakMap,wa=new WeakMap,wc=new WeakMap;const dkt=(t,e)=>{t.config(n=>ckt(n,e)).use(vW).use(s9).use(gW)},hkt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:dkt},Symbol.toStringTag,{value:"Module"}));function fkt(t){var e;return t.childCount<=1&&!((e=t.firstChild)!=null&&e.content.size)}function pkt(t,e){const{selection:n}=t;if(!n.empty)return null;const i=n.$anchor,s=i.parent;if(s.content.size>0||Q8(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 ab=ms({text:"Please enter...",mode:"block"},"placeholderConfigCtx"),_W=Ls(t=>new rs({key:new ps("CREPE_PLACEHOLDER"),props:{decorations:e=>{const n=t.get(ab.key);if(n.mode==="doc"&&!fkt(e.doc)||cW(e.selection)||uW(e.selection))return null;const i=n.text??"Please enter...",s=pkt(e,i);return s?Kn.create(e.doc,[s]):null}}})),mkt=(t,e)=>{t.config(n=>{e&&n.update(ab.key,i=>({...i,...e}))}).use(_W).use(ab)},gkt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:mkt,placeholderConfig:ab,placeholderPlugin:_W},Symbol.toStringTag,{value:"Module"})),yW=({ctx:t,hide:e,show:n,config:i})=>{var a,l,c,u,d;const s=Mj();Td(()=>{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>
1387 <button
1388 class=${ei("toolbar-item",t&&r(vp.type(t))&&"active")}
1389 onmousedown=${o(h=>{h.get(gn).call(I2.key)})}
1390 >
1391 ${((a=i==null?void 0:i.boldIcon)==null?void 0:a.call(i))??Qwt}
1392 </button>
1393 <button
1394 class=${ei("toolbar-item",t&&r(Xd.type(t))&&"active")}
1395 onmousedown=${o(h=>{h.get(gn).call(P2.key)})}
1396 >
1397 ${((l=i==null?void 0:i.italicIcon)==null?void 0:l.call(i))??a3t}
1398 </button>
1399 <button
1400 class=${ei("toolbar-item",t&&r(wp.type(t))&&"active")}
1401 onmousedown=${o(h=>{h.get(gn).call(R2.key)})}
1402 >
1403 ${((c=i==null?void 0:i.strikethroughIcon)==null?void 0:c.call(i))??d3t}
1404 </button>
1405 <div class="divider"></div>
1406 <button
1407 class=${ei("toolbar-item",t&&r(ll.type(t))&&"active")}
1408 onmousedown=${o(h=>{h.get(gn).call(L2.key)})}
1409 >
1410 ${((u=i==null?void 0:i.codeIcon)==null?void 0:u.call(i))??tW}
1411 </button>
1412 <button
1413 class=${ei("toolbar-item",t&&r(Yr.type(t))&&"active")}
1414 onmousedown=${o(h=>{const f=h.get(Vn),{selection:p}=f.state;if(r(Yr.type(h))){h.get(op.key).removeLink(p.from,p.to);return}h.get(op.key).addLink(p.from,p.to),e==null||e()})}
1415 >
1416 ${((d=i==null?void 0:i.linkIcon)==null?void 0:d.call(i))??sW}
1417 </button>
1418 </host>`};yW.props={ctx:Object,hide:Function,show:Boolean,config:Object};const bW=th(yW),SP=QS("CREPE_TOOLBAR");var el,io;class vkt{constructor(e,n,i){ua(this,el,void 0);ua(this,io,void 0);this.update=(o,r)=>{Gt(this,el).update(o,r)},this.destroy=()=>{Gt(this,el).destroy(),Gt(this,io).remove()},this.hide=()=>{Gt(this,el).hide()};const s=new bW;Qi(this,io,s),Gt(this,io).ctx=e,Gt(this,io).hide=this.hide,Gt(this,io).config=i,Qi(this,el,new JS({content:Gt(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,y=!o.editable;return!(m||h||l||d||y)}})),Gt(this,el).onShow=()=>{Gt(this,io).show=!0,setTimeout(()=>{let o=Gt(this,io).style.left;o=parseInt(o),o<0?Gt(this,io).style.left=0:o>350&&(Gt(this,io).style.left="350px")},0)},Gt(this,el).onHide=()=>{Gt(this,io).show=!1},this.update(n)}}el=new WeakMap,io=new WeakMap;dW("milkdown-toolbar",bW);const _kt=(t,e)=>{t.config(n=>{n.set(SP.key,{view:i=>new vkt(n,i,e)})}).use(SP)},ykt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:_kt},Symbol.toStringTag,{value:"Module"}));var bkt=Object.defineProperty,$P=Object.getOwnPropertySymbols,wkt=Object.prototype.hasOwnProperty,kkt=Object.prototype.propertyIsEnumerable,AP=(t,e,n)=>e in t?bkt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ckt=(t,e)=>{for(var n in e||(e={}))wkt.call(e,n)&&AP(t,n,e[n]);if($P)for(var n of $P(e))kkt.call(e,n)&&AP(t,n,e[n]);return t};function wW(t,e){return Object.assign(t,{meta:Ckt({package:"@milkdown/components"},e)}),t}const xkt={imageIcon:()=>"🌌",uploadButton:()=>It`Upload`,confirmButton:()=>It`⏎`,uploadPlaceholderText:"/Paste",onUpload:t=>Promise.resolve(URL.createObjectURL(t))},sw=ms(xkt,"inlineImageConfigCtx");wW(sw,{displayName:"Config<image-inline>",group:"ImageInline"});function Skt(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 $kt=(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 kW=({src:t="",selected:e=!1,alt:n,title:i,setAttr:s,config:o})=>{const r=ud(),[a]=Or(crypto.randomUUID()),[l,c]=Or(!1),[u,d]=Or(t.length!==0),[h,f]=Or(t),p=$=>{const M=$.target.value;d(M.length!==0),f(M)},m=$=>$kt(void 0,null,function*(){var S;const M=(S=$.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))}),y=()=>{var $,S;s==null||s("src",(S=($=r.current)==null?void 0:$.value)!=null?S:"")},b=$=>{$.key==="Enter"&&y()},k=$=>{$.preventDefault(),$.stopPropagation()},C=$=>{$.stopPropagation(),$.preventDefault()};return It`<host class=${ei(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=${ei("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=${b}
1432 onfocus=${()=>c(!0)}
1433 onblur=${()=>c(!1)}
1434 />
1435 <div class=${ei("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 $;return($=r.current)==null?void 0:$.focus()}}>
1441 ${o==null?void 0:o.uploadPlaceholderText}
1442 </span>
1443 </div>
1444 </div>
1445 <div
1446 class=${ei("confirm",h.length===0&&"hidden")}
1447 onclick=${()=>y()}
1448 >
1449 ${o==null?void 0:o.confirmButton()}
1450 </div>
1451 </div>`}
1452 </host>`};kW.props={src:String,alt:String,title:String,selected:Boolean,setAttr:Function,config:Object};const Akt=th(kW);Skt("milkdown-image-inline",Akt);const CW=gz(Kd.node,t=>(e,n,i)=>{const s=document.createElement("milkdown-image-inline"),o=t.get(sw.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()}}});wW(CW,{displayName:"NodeView<image-inline>",group:"ImageInline"});const Ekt=[sw,CW],Mkt=(t,e)=>{t.config(n=>{n.update(sw.key,i=>({uploadButton:(e==null?void 0:e.inlineUploadButton)??(()=>"Upload"),imageIcon:(e==null?void 0:e.inlineImageIcon)??(()=>h6),confirmButton:(e==null?void 0:e.inlineConfirmButton)??(()=>nW),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(nw.key,i=>({uploadButton:(e==null?void 0:e.blockUploadButton)??(()=>"Upload file"),imageIcon:(e==null?void 0:e.blockImageIcon)??(()=>h6),captionIcon:(e==null?void 0:e.blockCaptionIcon)??(()=>t3t),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(skt).use(Ekt)},Tkt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:Mkt},Symbol.toStringTag,{value:"Module"})),Pkt={name:"SpaceGeneralTab",components:{CreateSpaceForm:N8},props:["community","savingCount"],emits:["completed"]},Ikt={style:{"max-width":"800px",margin:"0 auto"},class:"fcom_full_editor_content"};function Lkt(t,e,n,i,s,o){const r=H("create-space-form"),a=qs,l=jo;return v(),D(l,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(a,null,{default:w(()=>[g("div",Ikt,[_(r,{savingCount:n.savingCount,community:n.community,onCompleted:e[0]||(e[0]=c=>t.$emit("completed",c))},null,8,["savingCount","community"])])]),_:1})]),_:1})}const Okt=ue(Pkt,[["render",Lkt]]),Dkt=Object.freeze(Object.defineProperty({__proto__:null,default:Okt},Symbol.toStringTag,{value:"Module"})),Rkt={name:"ImagePlaceholder"},Vkt={width:"240",height:"240",viewBox:"0 0 240 240",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fkt(t,e,n,i,s,o){return v(),A("svg",Vkt,[...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 a9=ue(Rkt,[["render",Fkt]]),Nkt={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()}},Bkt={class:"fcom_topic_selector"},zkt={class:"fcom_select_photo",style:{float:"left"}},Hkt=["src","alt"],Ukt=["innerHTML"];function jkt(t,e,n,i,s,o){const r=sn,a=Jt,l=H("Plus"),c=be,u=He,d=ft,h=en,f=tn,p=Yo,m=Va,y=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]=b=>o.addPaywallModal=b),"close-on-click-modal":!1,visible:o.addPaywallModal,direction:"rtl"},{header:w(()=>[g("h4",null,x(t.$t("Add Paywall")),1)]),default:w(()=>[_(f,{onSubmit:e[5]||(e[5]=Ee(b=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(h,null,{default:w(()=>[g("div",Bkt,[Re((v(),D(a,{style:{width:"100%"},"fit-input-width":"",modelValue:s.productID,"onUpdate:modelValue":e[0]||(e[0]=b=>s.productID=b),filterable:"",clearable:"",remote:"",loading:s.fetchingProducts,"remote-method":o.searchProducts,placeholder:t.$t("Search Product")},{default:w(()=>[(v(!0),A(ee,null,we(s.products,b=>(v(),D(r,{key:b.id,label:b.title,value:b.id,disabled:o.isProductAdded(b.id),class:"fcom_with_photo_option"},{default:w(()=>[g("span",zkt,[g("img",{src:b.image,alt:b.title},null,8,Hkt),g("span",null,x(b.title),1)]),g("span",{style:{float:"right",color:"#8492a6","font-size":"13px"},innerHTML:b.price},null,8,Ukt)]),_:2},1032,["label","value","disabled"]))),128))]),_:1},8,["modelValue","loading","remote-method","placeholder"])),[[y,s.fetchingProducts]]),_(p,{ref:"creating_product_ref",onShow:o.initCreateProduct,placement:"bottom",width:400,trigger:"click"},{reference:w(()=>[_(u,{class:"fcom_secondary_button"},{default:w(()=>[_(c,null,{default:w(()=>[_(l)]),_:1}),g("span",null,x(t.$t("New")),1)]),_:1})]),default:w(()=>[_(f,{modelValue:s.newPaywall,"onUpdate:modelValue":e[4]||(e[4]=b=>s.newPaywall=b),"label-position":"top"},{default:w(()=>[_(h,{label:t.$t("Title")},{default:w(()=>[_(d,{modelValue:s.newPaywall.title,"onUpdate:modelValue":e[1]||(e[1]=b=>s.newPaywall.title=b),placeholder:t.$t("Title of the product")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(h,{label:t.$t("Price")},{default:w(()=>[_(d,{modelValue:s.newPaywall.price,"onUpdate:modelValue":e[2]||(e[2]=b=>s.newPaywall.price=b),type:"number",placeholder:t.$t("Price of the product"),min:0},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(h,null,{default:w(()=>[_(u,{class:"fcom_primary_button",onClick:e[3]||(e[3]=b=>o.createProduct()),loading:s.creatingProduct,disabled:s.creatingProduct},{default:w(()=>[N(x(t.$t("Create")),1)]),_:1},8,["loading","disabled"])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["onShow"])])]),_:1}),_(h,null,{default:w(()=>[_(u,{class:"fcom_primary_button",loading:s.saving,onClick:o.addPaywall},{default:w(()=>[N(x(t.$t("Add")),1)]),_:1},8,["loading","onClick"])]),_:1})]),_:1})]),_:1},8,["size","modelValue","visible"])}const Wkt=ue(Nkt,[["render",jkt]]),Ykt={name:"ManagePaywalls",components:{ImagePlaceholder:a9,AddPaywallModal:Wkt},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()}},qkt={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},Gkt={class:"fcom_card_sections"},Xkt={class:"fcom_card_section_heading"},Kkt={class:"fcom_section_primary_item_title"},Zkt={class:"fcom_heading_item"},Jkt={key:0,class:"fcom_section_item_actions"},Qkt={class:"fcom_section_primary"},eCt={class:"fcom_section_primary_item"},tCt={class:"fcom_section_primary_item_title"},nCt={class:"fcom_heading_item"},sCt={class:"fcom_shape"},iCt={class:"fcom_section_item_actions"},oCt=["href"],rCt=["href"],aCt={class:"fcom_section_items"},lCt={class:"fcom_section_item_title"},cCt={class:"fcom_heading_item"},uCt={class:"fcom_shape"},dCt={class:"fcom_section_item_actions"},hCt=["innerHTML"],fCt={key:2,style:{padding:"1rem"}},pCt={key:1,class:"fcom_section_item"},mCt={class:"fcom_section_primary"},gCt={class:"fcom_section_primary_item"},vCt=["disabled"],_Ct={class:"dialog_header"},yCt={class:"dialog_left"},bCt={class:"dialog_body"},wCt={style:{"text-align":"center"}},kCt={class:"fcom_heading_item",style:{"justify-content":"center"}},CCt={class:"fcom_shape"},xCt={style:{margin:"1rem 0px 0.8rem"}},SCt={class:"dialog_footer"};function $Ct(t,e,n,i,s,o){const r=He,a=Nt,l=o8,c=H("MoreFilled"),u=be,d=$r,h=Ar,f=Sr,p=H("ImagePlaceholder"),m=qs,y=jo,b=H("AddPaywallModal"),k=Yt,C=$s,$=xt("loading");return v(),A(ee,null,[_(y,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(m,null,{default:w(()=>[g("div",qkt,[g("div",Gkt,[g("div",Xkt,[g("div",Kkt,[g("div",Zkt,[le(t.$slots,"title",{},()=>[g("h4",null,x(t.$t("Manage Paywalls")),1)])])]),s.hasFluentCart?(v(),A("div",Jkt,[_(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=S=>o.initAddPaywall())},{default:w(()=>[N(x(t.$t("Add Paywall")),1)]),_:1})])):O("",!0)]),s.hasFluentCart?(v(),A(ee,{key:0},[s.loading||s.removing?(v(),D(a,{key:0,class:"white_loaded",rows:5,animated:!0})):s.paywalls.length?(v(!0),A(ee,{key:1},we(s.paywalls,S=>(v(),A("div",{class:"fcom_section_item",key:S.ID},[g("div",Qkt,[g("div",eCt,[g("div",tCt,[g("h4",nCt,[g("span",sCt,[_(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",iCt,[_(f,{trigger:"click","popper-class":"fcom_pop_action"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,null,{default:w(()=>[g("a",{href:S==null?void 0:S.view_url,target:"_blank",rel:"noopener"},x(t.$t("View Product")),9,oCt)]),_:2},1024),_(d,null,{default:w(()=>[g("a",{href:S==null?void 0:S.admin_url,target:"_blank",rel:"noopener"},x(t.$t("Edit Product")),9,rCt)]),_:2},1024),_(d,{type:"danger",onClick:M=>o.initRemovePaywall(S)},{default:w(()=>[N(x(t.$t("Delete Paywall")),1)]),_:1},8,["onClick"])]),_:2},1024)]),default:w(()=>[_(r,{"aria-label":t.$t("View actions"),size:"small",class:"fcom_dot_menu",text:""},{default:w(()=>[_(u,null,{default:w(()=>[_(c)]),_:1})]),_:1},8,["aria-label"])]),_:2},1024)])]),g("div",aCt,[(v(!0),A(ee,null,we(S.variants,M=>(v(),A("div",{class:"fcom_section_item",key:M.id},[g("div",lCt,[g("div",cCt,[g("span",uCt,[M.photo?(v(),D(l,{key:0,src:M.photo},null,8,["src"])):(v(),D(l,{key:1},{default:w(()=>[_(p)]),_:1}))]),g("span",null,x(M.variation_title),1)])]),g("div",dCt,[g("span",{class:"fcom_price",innerHTML:M.total_price},null,8,hCt),_(f,{trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{onClick:P=>o.copyCheckoutUrl(M.checkout_url)},{default:w(()=>[N(x(t.$t("Copy Checkout URL")),1)]),_:1},8,["onClick"])]),_:2},1024)]),default:w(()=>[_(r,{"aria-label":t.$t("View actions"),size:"small",class:"fcom_dot_menu",text:"",style:{padding:"0 6px"}},{default:w(()=>[_(u,null,{default:w(()=>[_(c)]),_:1})]),_:1},8,["aria-label"])]),_:2},1024)])]))),128))])])]))),128)):(v(),A("div",fCt,[g("p",null,x(t.$t("No paywall has been added yet")),1)]))],64)):(v(),A("div",pCt,[g("div",mCt,[g("div",gCt,[g("span",null,[N(x(t.$t("To monetize your ")+o.spaceType+", ")+" ",1),Re((v(),A("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,vCt)),[[$,s.installing]]),N(" "+x(t.$t("to install and activate FluentCart.")),1)])])])]))])])]),_:3})]),_:3}),s.addPaywallModal?(v(),D(b,{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:w(()=>[g("div",_Ct,[g("div",yCt,[g("h4",null,x(t.$t("Delete Paywall")),1)])])]),footer:w(()=>[g("div",SCt,[_(r,{class:"fcom_primary_button",disabled:s.removing,onClick:o.deletePaywall},{default:w(()=>[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:w(()=>[N(x(t.$t("Cancel")),1)]),_:1})])]),default:w(()=>{var S,M;return[g("div",bCt,[g("div",wCt,[g("h4",kCt,[g("span",CCt,[_(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",xCt,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:w(()=>[N(x(t.$t("Also remove the this space from the product integration?")),1)]),_:1},8,["modelValue"])])])]}),_:1},8,["width","modelValue"])],64)}const ACt=ue(Ykt,[["render",$Ct]]),EP=Object.freeze(Object.defineProperty({__proto__:null,default:ACt},Symbol.toStringTag,{value:"Module"})),ECt={name:"LockscreenPaywallMeta",components:{ImagePlaceholder:a9},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()}},MCt={key:0,class:"fcom_paywalls"},TCt={class:"fcom_paywall"},PCt={class:"fcom_select_photo",style:{float:"left"}},ICt=["src"],LCt={key:0,class:"fcom_description"},OCt={class:"fcom_paywall_actions"},DCt={class:"fcom_color_input_wrap"},RCt={class:"fcom_color_input_wrap"},VCt={class:"fcom_color_input_wrap"},FCt={class:"fcom_color_input_wrap"};function NCt(t,e,n,i,s,o){const r=H("image-placeholder"),a=sn,l=n2,c=Jt,u=H("Delete"),d=be,h=He,f=Nt,p=u2,m=ft,y=en,b=Yt,k=tn,C=Qc,$=c2;return v(),D($,{modelValue:s.editTab,"onUpdate:modelValue":e[12]||(e[12]=S=>s.editTab=S)},{default:w(()=>[_(p,{label:t.$t("Paywalls"),name:"paywall"},{default:w(()=>[s.loading?(v(),D(f,{key:1,rows:2,animated:""})):(v(),A("div",MCt,[(v(!0),A(ee,null,we(n.field.paywalls,(S,M)=>(v(),A("div",TCt,[_(c,{"fit-input-width":"",modelValue:n.field.paywalls[M],"onUpdate:modelValue":P=>n.field.paywalls[M]=P,placeholder:t.$t("Select Paywall")},{default:w(()=>[(v(!0),A(ee,null,we(s.availablePaywalls,P=>(v(),D(l,{key:P.ID,label:P.post_title},{default:w(()=>[(v(!0),A(ee,null,we(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:w(()=>[g("span",PCt,[T.photo?(v(),A("img",{key:0,src:T.photo},null,8,ICt)):(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:w(()=>[_(u)]),_:1},8,["onClick"])]))),256)),!n.field.paywalls||Object.keys(n.field.paywalls).length<1?(v(),A("div",LCt,[g("p",null,x(t.$t("Please add paywall pricing options")),1)])):O("",!0),g("div",OCt,[_(h,{style:{width:"100%"},class:"fcom_plain_button",onClick:o.initAddPaywall},{default:w(()=>[g("span",null,x("+ "+t.$t("Add Paywall")),1)]),_:1},8,["onClick"])])]))]),_:1},8,["label"]),_(p,{label:t.$t("Content"),name:"content"},{default:w(()=>[_(k,{onSubmit:e[2]||(e[2]=Ee(S=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(y,{label:t.$t("Button Label")},{default:w(()=>[_(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"]),_(y,null,{default:w(()=>[_(b,{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:w(()=>[N(x(t.$t("Show Paywall Description")),1)]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["label"]),_(p,{label:t.$t("Design"),name:"design"},{default:w(()=>[_(k,{onSubmit:e[11]||(e[11]=Ee(S=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(y,{label:t.$t("Background Color")},{default:w(()=>[g("div",DCt,[_(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"]),_(y,{label:t.$t("Text Color")},{default:w(()=>[g("div",RCt,[_(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"]),_(y,{label:t.$t("Button Label")},{default:w(()=>[g("div",VCt,[_(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"]),_(y,{label:t.$t("Button Background")},{default:w(()=>[g("div",FCt,[_(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 BCt=ue(ECt,[["render",NCt]]),zCt={name:"LockscreenMeta",components:{BgImageUpload:gv,LockscreenPaywallMeta:BCt},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)}}},HCt={key:0,class:"fcom_lockscreen_meta"},UCt={class:"fcom_meta_section lockscreen_meta"},jCt={class:"fcom_description"},WCt={class:"fcom_meta_section lockscreen_meta"},YCt={class:"fcom_meta_label"},qCt={class:"fcom_meta_content"},GCt={class:"fcom_meta_block"},XCt={class:"fcom_block_label"},KCt={class:"fcom_meta_sorting"},ZCt={class:"fcom_block_action"},JCt={key:1,class:"fcom_lockscreen_meta"},QCt={class:"fcom_edit_title"},ext={class:"fcom_edit_content"},txt={class:"fcom_color_input_wrap"},nxt={class:"fcom_color_input_wrap"},sxt={class:"fcom_color_input_wrap"},ixt={class:"fcom_color_input_wrap"},oxt={class:"fcom_color_input_wrap"},rxt={key:1,class:"fcom_description"},axt={key:2,class:"fcom_description"},lxt={key:3,class:"fcom_description"};function cxt(t,e,n,i,s,o){const r=be,a=H("Top"),l=H("Bottom"),c=H("EditPen"),u=H("Hide"),d=H("View"),h=H("Back"),f=ft,p=en,m=Yt,y=tn,b=u2,k=H("BgImageUpload"),C=Qc,$=c2,S=H("lockscreen-paywall-meta");return s.editing?(v(),A("div",JCt,[g("div",QCt,[_(r,{onClick:o.backToFields},{default:w(()=>[_(h)]),_:1},8,["onClick"]),g("p",null,x(t.$labelize(s.editingField.label)),1)]),g("div",ext,[s.editingField.type=="image"?(v(),D($,{key:0,modelValue:s.editTab,"onUpdate:modelValue":e[18]||(e[18]=M=>s.editTab=M)},{default:w(()=>[_(b,{label:t.$t("Content"),name:"content"},{default:w(()=>[_(y,{onSubmit:e[5]||(e[5]=Ee(M=>t.doNothing(),["prevent"])),model:s.editingField,"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(p,{label:t.$t("Heading")},{default:w(()=>[_(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:w(()=>[_(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:w(()=>[_(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:w(()=>[_(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:w(()=>[_(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:w(()=>[N(x(t.$t("Open in New Tab")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0)]),_:1},8,["model"])]),_:1},8,["label"]),_(b,{label:t.$t("Design"),name:"design"},{default:w(()=>[_(y,{onSubmit:e[17]||(e[17]=Ee(M=>t.doNothing(),["prevent"])),model:s.editingField,"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(p,{label:t.$t("Background Image"),class:"fcom_bg_image"},{default:w(()=>[_(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:w(()=>[g("div",txt,[_(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:w(()=>[g("div",nxt,[_(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:w(()=>[g("div",sxt,[_(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:w(()=>[g("div",ixt,[_(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:w(()=>[g("div",oxt,[_(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(),A("div",rxt,x(t.$t("Edit the field from block editor ")),1)):s.editingField.type=="lesson"?(v(),A("div",axt,x(t.$t("Edit lessons from lesson editor ")),1)):s.editingField.type=="welcome_banner"?(v(),A("div",lxt,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(),A("div",HCt,[g("div",UCt,[g("div",jCt,[g("p",null,x(t.$t("This page is only visible to non-members viewing a private space.")),1)])]),g("div",WCt,[g("div",YCt,x(t.$t("Page Blocks")),1),g("div",qCt,[g("ul",GCt,[(v(!0),A(ee,null,we(o.lockscreenFields,(M,P)=>(v(),A("li",{class:q(["fcom_block_list",{block_hidden:M.hidden}])},[g("div",XCt,[_(r,{class:"fcom_el_icon"},{default:w(()=>[(v(),D(Ct(o.getFieldIcon(M))))]),_:2},1024),g("p",null,x(t.$labelize(M.label)),1)]),g("div",KCt,[_(r,{onClick:T=>o.moveUp(P)},{default:w(()=>[_(a)]),_:1},8,["onClick"]),_(r,{onClick:T=>o.moveDown(P)},{default:w(()=>[_(l)]),_:1},8,["onClick"])]),g("div",ZCt,[_(r,{onClick:T=>o.updateField(M)},{default:w(()=>[_(c)]),_:1},8,["onClick"]),M.hidden?(v(),D(r,{key:0,onClick:T=>o.toggleHidden(M)},{default:w(()=>[_(u)]),_:1},8,["onClick"])):(v(),D(r,{key:1,onClick:T=>o.toggleHidden(M)},{default:w(()=>[_(d)]),_:1},8,["onClick"]))])],2))),256))])])])]))}const uxt=ue(zCt,[["render",cxt]]),dxt={name:"CircleIcon",props:{fill:{type:String,default:"currentColor"}}},hxt=["fill"];function fxt(t,e,n,i,s,o){return v(),A("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,hxt)}const pxt=ue(dxt,[["render",fxt]]),mxt={name:"LessonIcon"},gxt={width:"60",height:"48",viewBox:"0 0 60 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function vxt(t,e,n,i,s,o){return v(),A("svg",gxt,[...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 _xt=ue(mxt,[["render",vxt]]),yxt={name:"PlayIcon"},bxt={width:"20",height:"19",viewBox:"0 0 20 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function wxt(t,e,n,i,s,o){return v(),A("svg",bxt,[...e[0]||(e[0]=[Ra('<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 kxt=ue(yxt,[["render",wxt]]),Cxt={name:"PlayPlaceholderIcon"},xxt={width:"60",height:"48",viewBox:"0 0 60 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Sxt(t,e,n,i,s,o){return v(),A("svg",xxt,[...e[0]||(e[0]=[Ra('<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 $xt=ue(Cxt,[["render",Sxt]]),Axt={name:"_LockscreenLessonEditor",components:{CircleIcon:pxt,LessonIcon:_xt,PlayIcon:kxt,PlayPlaceholderIcon:$xt},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}}},Ext={class:"fcom_course_sections"},Mxt={class:"fcom_course_intro"},Txt={class:"fcom_course_labels"},Pxt={class:"fcom_course_info"},Ixt={class:"fcom_card_sections"},Lxt={class:"fcom_section_items"},Oxt=["onClick"],Dxt={class:"fcom_section_primary_item_title"},Rxt={class:"title_line_container"},Vxt={class:"title_line"},Fxt={class:"fcom_meta_text"},Nxt={key:0,class:"fcom_meta_text"},Bxt={class:"fcom_section_primary_item_actions"},zxt=["onClick"],Hxt={class:"fcom_heading_item clickable"},Uxt={class:"lesson_feature_media"},jxt=["src","alt"],Wxt=["src","alt"],Yxt={class:"lesson_title"},qxt=["innerHTML"],Gxt={class:"lesson_duration"},Xxt={key:0},Kxt={key:1},Zxt=["innerHTML"];function Jxt(t,e,n,i,s,o){const r=H("ArrowRight"),a=H("ArrowDown"),l=be,c=H("CircleIcon"),u=H("Lock"),d=H("PlayPlaceholderIcon"),h=H("LessonIcon"),f=H("PlayIcon");return v(),A("div",Ext,[g("div",Mxt,[g("div",Txt,[g("h3",null,x(t.$t("Course Content")),1),g("p",Pxt,[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",Ixt,[g("div",Lxt,[(v(!0),A(ee,null,we(n.sections,p=>(v(),A("div",{key:p.id,class:"fcom_section_primary"},[p.lessons.length?(v(),A("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",Dxt,[g("div",Rxt,[g("div",Vxt,[g("h4",null,x(p.title),1)]),g("span",Fxt,x(t.$t("%d lessons",p.lessons.length)),1),o.lessonDuration(p)?(v(),A("span",Nxt," • "+x(o.lessonDuration(p)),1)):O("",!0)])]),g("div",Bxt,[_(l,{class:"clickable"},{default:w(()=>[p.is_closed?(v(),D(r,{key:0,class:"fcom_arrow_icon"})):(v(),D(a,{key:1}))]),_:2},1024)])],10,Oxt)):O("",!0),p.is_closed?O("",!0):(v(!0),A(ee,{key:1},we(p.lessons,m=>(v(),A("div",{key:m.id,class:q(["fcom_section_item",{is_locked:!o.isFreePreview(m)}])},[g("div",{onClick:y=>o.maybeGotoLesson(m,p),class:"fcom_section_item_title"},[g("p",Hxt,[_(l,null,{default:w(()=>[o.isFreePreview(m)?(v(),D(c,{key:0})):(v(),D(u,{key:1}))]),_:2},1024),o.isModernLayout?(v(),A(ee,{key:0},[g("span",Uxt,[m.featured_image?(v(),A("img",{key:0,src:m.featured_image,alt:m.title},null,8,jxt)):o.hasMediaImage(m)?(v(),A("img",{key:1,src:m.meta.media.image,alt:m.title},null,8,Wxt)):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",Yxt,[g("span",{innerHTML:m.title},null,8,qxt),g("span",Gxt,[m.meta.video_length?(v(),A("span",Xxt,x(o.formatSeconds(m.meta.video_length)),1)):(v(),A("span",Kxt,x("---")))])])],64)):(v(),A("span",{key:1,innerHTML:m.title},null,8,Zxt))])],8,zxt)],2))),128))]))),128))])])])}const Qxt=ue(Axt,[["render",Jxt]]),e6t={name:"LockscreenPaywallView",components:{ImagePlaceholder:a9},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()}},t6t={class:"fcom_paywall_cards"},n6t={class:"paywall_header"},s6t={class:"paywall_body"},i6t=["innerHTML"],o6t={key:0,class:"subscription"},r6t={class:"paywall_footer"},a6t={key:0,class:"fcom_mb_10"},l6t=["href"];function c6t(t,e,n,i,s,o){const r=Nt,a=o8,l=H("ImagePlaceholder");return v(),A("div",t6t,[s.loading?(v(),D(r,{key:0,rows:3,animated:!0})):(v(!0),A(ee,{key:1},we(o.filteredPaywalls,c=>(v(),A("div",{key:c.id,class:"fcom_paywall",style:Xe(o.cardStyles)},[g("div",n6t,[c.photo?(v(),D(a,{key:0,src:c.photo},null,8,["src"])):(v(),D(a,{key:1},{default:w(()=>[_(l)]),_:1})),g("span",null,x(c.variation_title),1)]),g("div",s6t,[g("span",{innerHTML:c.total_price},null,8,i6t),o.isSubscriptionPaywall(c)?(v(),A("span",o6t," / "+x(o.getRepeatInterval(c)),1)):O("",!0)]),g("div",r6t,[n.field.show_description=="yes"&&(c!=null&&c.description)?(v(),A("span",a6t,x(c.description),1)):O("",!0),n.editable?Re((v(),A("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)),[[md,n.field.button_text]]):(v(),A("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,l6t))])],4))),128))])}const u6t=ue(e6t,[["render",c6t]]),d6t={name:"LockScreenEditor",props:["title","lockscreen","sections","saving","loading","space_id","settings"],emits:["save","close"],components:{LockscreenLessonEditor:Qxt,MediaEmbeder:hv,BlockEditor:uU,LockscreenMeta:uxt,LockscreenPaywallView:u6t,FullEditorFrame:ES},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}}},h6t={class:"fcom_editor_topbar"},f6t={class:"fcom_editor_content"},p6t={class:"fcom_item"},m6t={class:"fcom_content"},g6t=["onBlur"],v6t=["onBlur"],_6t=["onBlur"],y6t={key:1,class:"fcom_content_wrap"},b6t={id:"fcomBlockContent"},w6t={key:2,class:"fcom_content_wrap"},k6t={key:1,class:"fcom_description"},C6t={key:3,class:"fcom_content_wrap"},x6t={key:4,class:"fcom_paywall_wrap"};function S6t(t,e,n,i,s,o){const r=H("lockscreen-meta"),a=U1,l=H("Lock"),c=be,u=H("block-editor"),d=H("FullEditorFrame"),h=H("welcome-banner"),f=H("lockscreen-lesson-editor"),p=Nt,m=H("lockscreen-paywall-view"),y=qs,b=jo;return v(),A(ee,null,[_(a,{class:"fcom_full_editor_side lockscreen_editor",width:"250px"},{default:w(()=>[le(t.$slots,"before_meta"),_(r,{lockscreen:n.lockscreen,space_id:n.space_id,onEditField:o.updateEditField},null,8,["lockscreen","space_id","onEditField"])]),_:3}),_(b,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(y,null,{default:w(()=>[g("div",h6t,[_(c,null,{default:w(()=>[_(l)]),_:1}),g("h3",null,x(n.title),1)]),g("div",f6t,[(v(!0),A(ee,null,we(o.lockscreenFields,k=>{var C;return v(),A("div",p6t,[k.type=="image"?(v(),A("div",{key:0,class:"fcom_image_wrap",style:Xe(o.imageStyles(k))},[g("div",m6t,[g("h2",{style:Xe(o.headingStyles(k)),contenteditable:"true",onBlur:$=>o.updateHeading($,k)},x(k.heading),45,g6t),k.description?(v(),A("p",{key:0,style:Xe(o.descriptionStyles(k)),contenteditable:"true",onBlur:$=>o.updateDescription($,k)},x(k.description),45,v6t)):O("",!0),k.button_text?(v(),A("button",{key:1,class:"fcom_btn",style:Xe(o.buttonStyles(k)),contenteditable:"true",onBlur:$=>o.updateButtonLabel($,k)},x(k.button_text),45,_6t)):O("",!0)])],4)):O("",!0),k.type=="block"?(v(),A("div",y6t,[g("div",b6t,[s.useClassic?(v(),D(u,{key:0,modelValue:k.content,"onUpdate:modelValue":$=>k.content=$},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":$=>k.content=$},null,8,["onUseAlternateEditor","editorParams","modelValue","onUpdate:modelValue"]))])])):O("",!0),k.type=="welcome_banner"?(v(),A("div",w6t,[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(),A("div",k6t,x(t.$t("__COURSE_BANNER_EMPTY_DESC")),1))])):O("",!0),k.type=="lesson"?(v(),A("div",C6t,[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(),A("div",x6t,[_(m,{space_id:n.space_id,field:k,editable:!0},null,8,["space_id","field"])])):O("",!0)])}),256))])]),_:1})]),_:1})],64)}const xW=ue(d6t,[["render",S6t]]),$6t={name:"SpaceLockscreen",props:["spaceProfile","savingCount"],emits:["close"],components:{LockScreenEditor:xW},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()}},A6t={key:0,class:"fcom_lockscreen_meta"},E6t={class:"fcom_description"},M6t={class:"white_loaded"};function T6t(t,e,n,i,s,o){const r=H("lock-screen-editor"),a=Nt,l=jo;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:w(()=>[n.spaceProfile.settings.custom_lock_screen!="yes"?(v(),A("div",A6t,[g("div",E6t,[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:w(()=>[g("div",M6t,[_(a,{animated:!0,rows:10})])]),_:1})):O("",!0)}const P6t=ue($6t,[["render",T6t]]),I6t=Object.freeze(Object.defineProperty({__proto__:null,default:P6t},Symbol.toStringTag,{value:"Module"})),L6t={name:"ManageSpaceLinks",components:{MenuGroupSettings:mU},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})}}},O6t={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},D6t={class:"fcom_card_sections"};function R6t(t,e,n,i,s,o){const r=H("menu-group-settings"),a=qs,l=jo;return v(),D(l,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(a,null,{default:w(()=>[g("div",O6t,[g("div",D6t,[_(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 V6t=ue(L6t,[["render",R6t]]),MP=Object.freeze(Object.defineProperty({__proto__:null,default:V6t},Symbol.toStringTag,{value:"Module"})),F6t={name:"SpacePageEditor",components:{FullEditorFrame:ES},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)}},N6t={class:"fcom_full_editor fcom_space_page_editor"},B6t={class:"fcom_full_editor_header"},z6t=["aria-label"],H6t={class:"fcom_desktop_only"},U6t={class:"full_editor_actions"},j6t=["title","href"],W6t={key:0,style:{padding:"40px"}};function Y6t(t,e,n,i,s,o){const r=H("ArrowLeft"),a=be,l=H("arrow-down"),c=He,u=$r,d=Ar,h=Sr,f=H("View"),p=j1,m=Nt,y=H("FullEditorFrame"),b=jo,k=H1;return v(),A("div",N6t,[_(k,null,{default:w(()=>[_(p,{class:"fcom_full_editor_header_wrap"},{default:w(()=>[g("div",B6t,[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:w(()=>[_(r)]),_:1}),g("span",H6t,x(t.$t("Back to Pages")),1)],8,z6t),g("div",U6t,[_(h,{onCommand:e[1]||(e[1]=C=>{s.form.status=C}),trigger:"click"},{dropdown:w(()=>[_(d,null,{default:w(()=>[_(u,{command:"draft"},{default:w(()=>[N(x(t.$t("Draft")),1)]),_:1}),_(u,{command:"published"},{default:w(()=>[N(x(t.$t("Published")),1)]),_:1})]),_:1})]),default:w(()=>[_(c,{type:s.form.status=="published"?"success":"info",bg:"",text:"",class:"el-dropdown-link"},{default:w(()=>[N(x(t.$labelize(s.form.status))+" ",1),_(a,{class:"el-icon--right"},{default:w(()=>[_(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:w(()=>[N(x(t.$t("Save")),1)]),_:1},8,["disabled","loading"]),n.page.permalink?(v(),A("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:w(()=>[_(f)]),_:1})],8,j6t)):O("",!0)])])]),_:1}),_(k,{class:"fcom_full_editor_container"},{default:w(()=>[_(b,{style:{overflow:"hidden",padding:"0"},class:"fcom_full_editor_main"},{default:w(()=>[s.loading?(v(),A("div",W6t,[_(m,{rows:8,animated:!0})])):(v(),D(y,{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 q6t=ue(F6t,[["render",Y6t]]),G6t={name:"ManageSpacePages",components:{FluentDnD:za,ActionPopover:oa,SpacePageEditor:q6t,GenericPromo:pU},emits:["close"],props:["spaceProfile","savingCount"],setup(){return{spaceStore:$S()}},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)}},X6t={style:{"max-width":"1200px",padding:"20px",margin:"0 auto"}},K6t={class:"fcom_card_sections"},Z6t={class:"fcom_section_primary fcom_space_pages_settings"},J6t={class:"fcom_section_primary_item"},Q6t={class:"fcom_section_primary_item_title"},e4t={class:"fcom_heading_item"},t4t={class:"fcom_section_subtitle"},n4t={key:0,class:"fcom_section_item_actions"},s4t={key:0,class:"fcom_section_items"},i4t={style:{padding:"1rem"}},o4t={key:1,class:"fcom_section_items"},r4t={key:0,style:{padding:"1rem"}},a4t={key:1,style:{padding:"1rem"}},l4t={class:"fcom_pages_toolbar"},c4t={key:0,class:"fcom_pages_filter_note"},u4t={key:0},d4t={key:1},h4t={class:"fcom_pages_table",role:"table"},f4t={class:"fcom_pages_table_head",role:"row"},p4t={class:"fcom_pages_col_main",role:"columnheader"},m4t={class:"fcom_pages_col_status",role:"columnheader"},g4t={class:"fcom_pages_col_layout",role:"columnheader"},v4t={class:"fcom_pages_col_updated",role:"columnheader"},_4t={class:"fcom_pages_col_actions",role:"columnheader"},y4t={class:"fcom_visually_hidden"},b4t={class:"fcom_pages_col_main",role:"cell"},w4t=["title"],k4t=["src"],C4t=["textContent"],x4t=["textContent"],S4t={class:"fcom_page_identity"},$4t=["title","onClick","textContent"],A4t=["href","title"],E4t={class:"fcom_pages_col_status",role:"cell"},M4t={class:"fcom_pages_col_layout",role:"cell"},T4t=["textContent"],P4t={key:0,class:"fcom_page_cell_sub"},I4t={key:1,class:"fcom_page_cell_sub fcom_page_empty"},L4t={class:"fcom_pages_col_updated",role:"cell"},O4t=["title"],D4t=["title"],R4t={class:"fcom_pages_col_actions fcom_section_item_actions",role:"cell"};function V4t(t,e,n,i,s,o){const r=hi,a=He,l=H("generic-promo"),c=Nt,u=ft,d=Hd,h=ws,f=H("action-popover"),p=H("FluentDnD"),m=qs,y=H("space-page-editor"),b=jo;return v(),D(b,{class:"fcom_full_editor_main"},{default:w(()=>[_(m,null,{default:w(()=>[g("div",X6t,[g("div",K6t,[g("div",Z6t,[g("div",J6t,[g("div",Q6t,[g("div",e4t,[g("h4",null,x(t.$t("Pages")),1),s.pages.length?(v(),D(r,{key:0,type:"info",size:"small",round:""},{default:w(()=>[N(x(s.pages.length),1)]),_:1})):O("",!0)]),g("p",t4t,x(t.$t("Static pages for this space, like rules, an FAQ or current offers.")),1)]),t.has_pro?(v(),A("div",n4t,[_(a,{class:"fcom_primary_button",disabled:s.creating,onClick:e[0]||(e[0]=k=>o.promptCreate())},{default:w(()=>[N(x(t.$t("Add New Page")),1)]),_:1},8,["disabled"])])):O("",!0)]),t.has_pro?(v(),A("div",o4t,[s.loading?(v(),A("div",r4t,[_(c,{rows:4,animated:!0})])):s.pages.length?(v(),A(ee,{key:2},[g("div",l4t,[_(u,{modelValue:s.search,"onUpdate:modelValue":e[1]||(e[1]=k=>s.search=k),clearable:"",size:"small",class:"fcom_pages_search",placeholder:t.$t("Search pages")},null,8,["modelValue","placeholder"]),_(h,{modelValue:s.statusFilter,"onUpdate:modelValue":e[2]||(e[2]=k=>s.statusFilter=k),size:"small"},{default:w(()=>[_(d,{value:"all"},{default:w(()=>[N(x(t.$t("All"))+" ("+x(o.counts.all)+") ",1)]),_:1}),_(d,{value:"published"},{default:w(()=>[N(x(t.$t("Published"))+" ("+x(o.counts.published)+") ",1)]),_:1}),_(d,{value:"draft"},{default:w(()=>[N(x(t.$t("Draft"))+" ("+x(o.counts.draft)+") ",1)]),_:1})]),_:1},8,["modelValue"])]),o.isFiltered?(v(),A("div",c4t,[o.filteredPages.length?(v(),A("span",u4t,x(t.$t("Showing %1$s of %2$s pages. Clear the filters to reorder.",o.filteredPages.length,s.pages.length)),1)):(v(),A("span",d4t,x(t.$t("No page matches these filters.")),1)),_(a,{link:"",type:"primary",size:"small",onClick:e[3]||(e[3]=k=>o.clearFilters())},{default:w(()=>[N(x(t.$t("Clear")),1)]),_:1})])):O("",!0),g("div",h4t,[g("div",f4t,[g("span",p4t,x(t.$t("Page")),1),g("span",m4t,x(t.$t("Status")),1),g("span",g4t,x(t.$t("Template")),1),g("span",v4t,x(t.$t("Last Updated")),1),g("span",_4t,[g("span",y4t,x(t.$t("Actions")),1)])]),_(p,{items:o.filteredPages,"row-key":"id",draggable:o.canReorder,handle:".fcom_drag_handle",onDrop:o.onReorder,"item-class":"fcom_pages_row"},{item:w(({data:k})=>[g("div",b4t,[o.canReorder?(v(),A("span",{key:0,class:"fcom_drag_handle",title:t.$t("Drag to reorder")},"⋮⋮",8,w4t)):O("",!0),g("span",{class:q(["fcom_page_thumb",{has_image:!!k.featured_image}])},[k.featured_image?(v(),A("img",{key:0,src:k.featured_image,alt:""},null,8,k4t)):o.pageEmoji(k)?(v(),A("span",{key:1,class:"fcom_page_thumb_emoji",textContent:x(o.pageEmoji(k))},null,8,C4t)):(v(),A("span",{key:2,class:"fcom_page_thumb_letter",textContent:x(o.pageInitial(k))},null,8,x4t))],2),g("span",S4t,[g("a",{href:"#",class:"fcom_page_title",title:k.title,onClick:Ee(C=>o.openEditor(k),["prevent"]),textContent:x(k.title)},null,8,$4t),g("a",{class:"fcom_page_slug",href:k.permalink,target:"_blank",rel:"noopener",title:k.status==="published"?t.$t("View page"):t.$t("Preview draft")},"/"+x(k.slug),9,A4t)])]),g("div",E4t,[_(r,{type:k.status==="published"?"success":"warning",size:"small","disable-transitions":""},{default:w(()=>[N(x(k.status==="published"?t.$t("Published"):t.$t("Draft")),1)]),_:2},1032,["type"]),k.privacy==="members_only"?(v(),D(r,{key:0,type:"info",size:"small","disable-transitions":""},{default:w(()=>[N(x(t.$t("Members Only")),1)]),_:1})):O("",!0),o.isInNav(k)?O("",!0):(v(),D(r,{key:1,type:"info",size:"small","disable-transitions":""},{default:w(()=>[N(x(t.$t("Hidden from menu")),1)]),_:1}))]),g("div",M4t,[g("span",{textContent:x(k.layout_label||t.$labelize(k.meta&&k.meta.layout))},null,8,T4t),k.word_count?(v(),A("span",P4t,x(t.$_n("%s word","%s words",k.word_count)),1)):(v(),A("span",I4t,x(t.$t("No content yet")),1))]),g("div",L4t,[g("span",{title:k.updated_at},x(k.updated_at?t.humanDateDiff(k.updated_at):"-"),9,O4t),k.author?(v(),A("span",{key:0,class:"fcom_page_cell_sub",title:k.author.name},x(t.$t("by %s",k.author.name)),9,D4t)):O("",!0)]),g("div",R4t,[_(a,{size:"small",onClick:C=>o.openEditor(k)},{default:w(()=>[N(x(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(f,{items:o.pageRowActions(k),placement:"bottom-end",width:180},null,8,["items"])])]),_:1},8,["items","draggable","onDrop"])])],64)):(v(),A("div",a4t,[g("p",null,x(t.$t("No page has been created for this space yet.")),1)]))])):(v(),A("div",s4t,[g("div",i4t,[_(l,{placement:"feature_lock_space_pages"})])]))])])])]),_:1}),(v(),D(ea,{to:"body"},[s.editingPage?(v(),D(y,{key:0,page:s.editingPage,spaceProfile:n.spaceProfile,onClose:e[4]||(e[4]=k=>o.closeEditor()),onSaved:o.onPageSaved},null,8,["page","spaceProfile","onSaved"])):O("",!0)]))]),_:1})}const F4t=ue(G6t,[["render",V4t]]),N4t=Object.freeze(Object.defineProperty({__proto__:null,default:F4t},Symbol.toStringTag,{value:"Module"})),B4t={name:"CourseGeneralTab",components:{CreateCourseForm:kS},props:["course","savingCount"],emits:["completed"]},z4t={style:{"max-width":"800px",margin:"0 auto"}};function H4t(t,e,n,i,s,o){const r=H("create-course-form"),a=qs,l=jo;return v(),D(l,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(a,null,{default:w(()=>[g("div",z4t,[_(r,{savingCount:n.savingCount,course:n.course,onCompleted:e[0]||(e[0]=c=>t.$emit("completed",c))},null,8,["savingCount","course"])])]),_:1})]),_:1})}const U4t=ue(B4t,[["render",H4t]]),j4t=Object.freeze(Object.defineProperty({__proto__:null,default:U4t},Symbol.toStringTag,{value:"Module"})),W4t={name:"CourseLockscreen",props:["spaceProfile","savingCount"],emits:["close"],components:{LockScreenEditor:xW},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()}},Y4t={key:0,class:"fcom_lockscreen_meta"},q4t={class:"fcom_description"};function G4t(t,e,n,i,s,o){const r=H("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:w(()=>[n.spaceProfile.settings.custom_lock_screen!="yes"?(v(),A("div",Y4t,[g("div",q4t,[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 X4t=ue(W4t,[["render",G4t]]),K4t=Object.freeze(Object.defineProperty({__proto__:null,default:X4t},Symbol.toStringTag,{value:"Module"})),Z4t={name:"CourseWelcomeBannerConfig",props:["course","savingCount","hasPro"],emits:["saved"],components:{MediaEmbeder:hv,BgImageUpload:gv,CrepeEditor:cu},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()}},J4t={class:"fcom_customizer_container"},Q4t={class:"fcom_wc_banner_header"},e8t={class:"fcom_wc_banner_options"},t8t={class:"fcom_filter_menu"},n8t={class:"fcom_filter_menu_ul"},s8t={key:0,class:"fcom_wc_banner_load_error"},i8t={key:1,class:"fcom_wc_banner_content"},o8t={class:"fcom_wc_banner_content_header"},r8t={class:"fcom_wc_banner_media_type"},a8t={key:0,class:"fcom_banner_image_holder"},l8t={key:1,class:"fcom_banner_image_preview"},c8t={key:0,class:"fcom_wc_banner_cta_buttons"},u8t={class:"fcom_course_wc_help_text"},d8t={class:"fcom_wc_banner_content_footer"},h8t={key:1,class:"fcom_upgrade_banner"},f8t={class:"fcom_upgrade_description"},p8t=["href"];function m8t(t,e,n,i,s,o){const r=He,a=eu,l=Li,c=ws,u=H("BgImageUpload"),d=Wo,h=H("CloseBold"),f=be,p=H("media-embeder"),m=ft,y=en,b=H("crepe-editor"),k=sn,C=Jt,$=k8,S=Yt,M=tn,P=Nt;return v(),A("div",J4t,[g("div",Q4t,[g("h4",null,x(t.$t("Welcome Banner")),1)]),g("div",e8t,[g("div",t8t,[g("ul",n8t,[g("li",null,[g("a",{onClick:e[0]||(e[0]=Ee(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]=Ee(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(),A("div",s8t,[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:w(()=>[N(x(t.$t("Retry")),1)]),_:1},8,["onClick"])])):s.loading?(v(),D(P,{key:2,rows:5})):(v(),A("div",i8t,[g("div",o8t,[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",r8t,[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:w(()=>[_(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(),A(ee,{key:0},[s.bannerData[s.currentTab].bannerImage?(v(),A("div",l8t,[_(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:w(()=>[_(f,null,{default:w(()=>[_(h)]),_:1})]),_:1})])):(v(),A("div",a8t,[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:Ee(t.doNothing,["prevent"]),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(y,{label:t.$t("Title")},{default:w(()=>[_(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"]),_(y,{label:t.$t("Description")},{default:w(()=>[s.appReady?(v(),D(b,{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"]),_(y,{label:t.$t("Call to Action")},{default:w(()=>{var T;return[((T=s.bannerData[s.currentTab].ctaButtons)==null?void 0:T.length)>0?(v(),A("div",c8t,[(v(!0),A(ee,null,we(s.bannerData[s.currentTab].ctaButtons,(I,L)=>(v(),A("div",{key:L,class:"fcom_wc_banner_cta_button"},[_(y,{label:L?"":t.$t("Button Label")},{default:w(()=>[_(m,{modelValue:I.label,"onUpdate:modelValue":R=>I.label=R},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),_(y,{label:L?"":t.$t("Button Link")},{default:w(()=>[_(m,{modelValue:I.link,"onUpdate:modelValue":R=>I.link=R},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),_(y,{label:L?"":t.$t("Button Type"),class:"fcom_wc_banner_select"},{default:w(()=>[_(C,{modelValue:I.type,"onUpdate:modelValue":R=>I.type=R,class:"fcom_select",placeholder:t.$t("Select type")},{default:w(()=>[_(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"]),_(y,{label:L?"":t.$t("Open in new tab"),class:"fcom_wc_banner_select"},{default:w(()=>[_(C,{modelValue:I.newTab,"onUpdate:modelValue":R=>I.newTab=R,class:"fcom_select"},{default:w(()=>[_(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:w(()=>[_(f,null,{default:w(()=>[_(h)]),_:1})]),_:1},8,["onClick"])]))),128)),_($,{underline:!1,onClick:o.addButton},{default:w(()=>[N(x("+ "+t.$t("Add button")),1)]),_:1},8,["onClick"])])):(v(),D($,{key:1,underline:!1,onClick:o.addButton},{default:w(()=>[N(x("+ "+t.$t("Add button")),1)]),_:1},8,["onClick"]))]}),_:1},8,["label"]),s.currentTab=="enrolled"?(v(),D(y,{key:0,class:"fcom_course_wc_allowclose"},{default:w(()=>[_(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:w(()=>[N(x(t.$t("Allow members to close the welcome banner")),1)]),_:1},8,["modelValue"]),g("div",u8t,x(t.$t("If allowed, members will be able to hide the banner")),1)]),_:1})):O("",!0)]),_:1},8,["onSubmit"])],2),g("div",d8t,[n.hasPro?(v(),D(r,{key:0,class:"fcom_primary_button",disabled:s.saving,loading:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Update Info")),1)]),_:1},8,["disabled","loading","onClick"])):(v(),A("div",h8t,[g("p",f8t,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,p8t)]))])]))])}const g8t=ue(Z4t,[["render",m8t]]),v8t={name:"CourseWelcomeBannerTab",components:{CourseWelcomeBannerConfig:g8t},props:["course","savingCount","hasPro"]},_8t={class:"fcom_course_welcome_banner_wrap"};function y8t(t,e,n,i,s,o){const r=H("course-welcome-banner-config"),a=qs,l=jo;return v(),D(l,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(a,null,{default:w(()=>[g("div",_8t,[_(r,{course:n.course,savingCount:n.savingCount,hasPro:n.hasPro},null,8,["course","savingCount","hasPro"])])]),_:1})]),_:1})}const b8t=ue(v8t,[["render",y8t]]),w8t=Object.freeze(Object.defineProperty({__proto__:null,default:b8t},Symbol.toStringTag,{value:"Module"})),k8t=`.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 `,C8t=Object.freeze(Object.defineProperty({__proto__:null,default:k8t},Symbol.toStringTag,{value:"Module"})),x8t=`.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 `,S8t=Object.freeze(Object.defineProperty({__proto__:null,default:x8t},Symbol.toStringTag,{value:"Module"}))});export default $8t();
1455